@namiml/web-sdk 1.6.4 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +171 -163
- package/dist/components/ContextConsumer.d.ts +4 -2
- package/dist/components/ContextProvider.d.ts +25 -7
- package/dist/components/NamiElement.d.ts +13 -1
- package/dist/components/Paywall.d.ts +27 -16
- package/dist/components/PaywallContext.d.ts +4 -0
- package/dist/components/PaywallScreen.d.ts +23 -0
- package/dist/components/TemplateComponent.d.ts +2 -1
- package/dist/components/containers/BackgroundContainer.d.ts +0 -1
- package/dist/components/containers/CarouselContainer.d.ts +5 -2
- package/dist/components/containers/CollapseContainer.d.ts +1 -1
- package/dist/components/containers/Footer.d.ts +2 -2
- package/dist/components/containers/Header.d.ts +3 -2
- package/dist/components/elements/Button.d.ts +1 -1
- package/dist/components/elements/QRCode.d.ts +4 -1
- package/dist/components/elements/RadioButton.d.ts +12 -0
- package/dist/components/elements/SegmentPicker.d.ts +1 -1
- package/dist/components/elements/SegmentPickerItem.d.ts +1 -1
- package/dist/components/elements/ToggleSwitch.d.ts +18 -0
- package/dist/components/elements/Video.d.ts +1 -0
- package/dist/components/index.d.ts +7 -1
- package/dist/components/styles/animations.d.ts +2 -0
- package/dist/components/utils/actionTap.d.ts +15 -7
- package/dist/components/utils/helpers.d.ts +9 -9
- package/dist/components/utils/state.d.ts +5 -5
- package/dist/components/utils/swipe.d.ts +74 -0
- package/dist/nami/campaign.d.ts +3 -3
- package/dist/nami/flow/NamiFlow.d.ts +14 -6
- package/dist/nami/flow/NamiFlowManager.d.ts +4 -2
- package/dist/nami-web-ssr.d.ts +1 -0
- package/dist/nami-web.cjs +172 -38
- package/dist/nami-web.mjs +173 -39
- package/dist/nami-web.umd.js +173 -39
- package/dist/services/video.service.d.ts +8 -6
- package/dist/types/components/animation.d.ts +40 -0
- package/dist/types/components/containers.d.ts +53 -6
- package/dist/types/components/elements.d.ts +1 -1
- package/dist/types/components/index.d.ts +10 -5
- package/dist/types/conditions.d.ts +16 -14
- package/dist/types/externals/flow.d.ts +6 -0
- package/dist/types/externals/product.d.ts +2 -2
- package/dist/types/flow.d.ts +33 -8
- package/dist/types/paywall.d.ts +5 -6
- package/dist/utils/animations.d.ts +2 -0
- package/package.json +19 -13
- package/dist/nami-web.js +0 -96
package/dist/nami-web.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import{css as e,LitElement as t,adoptStyles as n,html as i,unsafeCSS as a,svg as r}from"lit";const o=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(e){this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColSpan="",this.ariaCurrent="",this.ariaDescription="",this.ariaDisabled="",this.ariaExpanded="",this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=e}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}},s=new WeakMap,l=e=>{let t=s.get(e);return void 0===t&&s.set(e,t=new Map),t},d=class{constructor(){this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(l(this)).map((([e,t])=>({name:e,value:t})))}get shadowRoot(){return"closed"===this.__shadowRootMode?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(e,t){l(this).set(e,String(t))}removeAttribute(e){l(this).delete(e)}toggleAttribute(e,t){return this.hasAttribute(e)?!(void 0===t||!t)||(this.removeAttribute(e),!1):!(void 0!==t&&!t)&&(this.setAttribute(e,""),!0)}hasAttribute(e){return l(this).has(e)}attachShadow(e){const t={host:this};return this.__shadowRootMode=e.mode,e&&"open"===e.mode&&(this.__shadowRoot=t),t}attachInternals(){if(null!==this.__internals)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");const e=new o(this);return this.__internals=e,e}getAttribute(e){return l(this).get(e)??null}},u=class extends d{};function c(e,t,n,i){var a,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,n,o):a(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}function h(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}"undefined"==typeof HTMLElement&&(globalThis.HTMLElement=u),"function"==typeof SuppressedError&&SuppressedError;var m;!function(e){e.SDK="sdk",e.ML="ml",e.THIRD_PARTY_ANALYTICS="third_party_analytics",e.THIRD_PARTY_TRANSACTIONS="third_party_transactions",e.PAYWALL_PERSONALIZATION="paywall_personalization",e.ANONYMOUS_MODE_CAPABILITY="anonymous_allowed",e.LANGUAGE_MANAGEMENT="language_management",e.ENTITLEMENT_MANAGEMENT="entitlement_management"}(m||(m={}));const{NAMI_SDK_VERSION:f="3.3.1",PRODUCTION:p="production",DEVELOPMENT:g="development",PLATFORM_ID_REQUIRED:v="Platform ID is required",DEVICE_ID_REQUIRED:y="Device ID is required",EXTERNAL_ID_REQUIRED:w="External ID is required",SDK_NOT_INITIALIZED:b="SDK has not been initialized. Make sure to call Nami.configure() first!",CAMPAIGN_NOT_AVAILABLE:k="Campaign is not available",FLOW_SCREENS_NOT_AVAILABLE:S="Flow screens not available",UNABLE_TO_UPDATE_CDP_ID:M="Unable to update CDP id in anonymous mode",ANONYMOUS_MODE_ALREADY_ON:E="Anonymous mode is already turned on.",ANONYMOUS_MODE_ALREADY_OFF:T="Anonymous mode is already turned off.",ANONYMOUS_MODE_LOGIN_NOT_ALLOWED:P="Login/logout are not available in anonymous mode",SESSION_REQUIRED:A="Session is required",DEVICE_ID_NOT_SET:x="Nami Device ID is not set",AUTH_DEVICE:_="nami_auth_device",NAMI_CONFIGURATION:C="nami_configuration",NAMI_PROFILE:L="nami_profile",API_CONFIG:I="api_config",API_CAMPAIGN_RULES:D="api_campaign_rules",API_PAYWALLS:R="api_paywalls",API_PRODUCTS:W="api_products",API_ACTIVE_ENTITLEMENTS:N="api_active_entitlements",SERVER_NAMI_ENTITLEMENTS:O="server_active_entitlements",INITIAL_APP_CONFIG:F="initial_app_config",INITIAL_CAMPAIGN_RULES:j="initial_campaign_rules",INITIAL_PAYWALLS:z="initial_paywalls",INITIAL_PRODUCTS:$="initial_products",LOCAL_NAMI_ENTITLEMENTS:U="local_active_entitlements",CUSTOMER_ATTRIBUTES_KEY_PREFIX:H="nami_cmr_attributes_",NAMI_CUSTOMER_JOURNEY_STATE:B="nami_customer_journey_state",ANONYMOUS_MODE:G="nami_anonymous_mode",ANONYMOUS_UUID:X="nami_anonymous_uuid",KEY_SESSION_COUNTER:Y="nami_session_counter",INITIAL_SESSION_COUNTER_VALUE:V=1,NAMI_LAST_IMPRESSION_ID:K="nami_last_impression_id",NAMI_PURCHASE_IMPRESSION_ID:q="nami_purchase_impression_id",NAMI_SESSION_ID:J="nami_session_id",NAMI_LANGUAGE_CODE:Q="nami_language_code",NAMI_PURCHASE_CHANNEL:Z="nami_purchase_channel",API_VERSION:ee="v3",BASE_URL_PATH:te=`sdk/${ee}/platform`,BASE_URL:ne="https://app.namiml.com",BASE_STAGING_URL:ie="https://app-staging.namiml.com",CUSTOM_HOST_PREFIX:ae="namiAPIHost=",USE_STAGING_API:re="useStagingAPI",EXTENDED_CLIENT_INFO_PREFIX:oe="extendedClientInfo",EXTENDED_CLIENT_INFO_DELIMITER:se=":",VALIDATE_PRODUCT_GROUPS:le="validateProductGroups",EXTENDED_PLATFORM:de="extended-platform",EXTENDED_PLATFORM_VERSION:ue="extended-platform-version",API_MAX_CALLS_LIMIT:ce=2,API_RETRY_DELAY_SEC:he=2,API_TIMEOUT_LIMIT:me=2e4,DEVICE_API_TIMEOUT_LIMIT:fe=3e3,STATUS_SUCCESS:pe=200,STATUS_BAD_REQUEST:ge=400,STATUS_NOT_FOUND:ve=404,STATUS_CONFLICT:ye=409,STATUS_INTERNAL_SERVER_ERROR:we=500,INITIAL_SUCCESS:be="Initial success",RECONFIG_SUCCESS:ke="Reconfig success",ALREADY_CONFIGURED:Se="Already configured",AVAILABLE_CAMPAIGNS_CHANGED:Me="AvailableCampaignsChanged",PAYWALL_ACTION_EVENT:Ee="PaywallActionEvent",AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED:Te="AvailableActiveEntitlementsChanged",CUSTOMER_JOURNEY_STATE_CHANGED:Pe="CustomerJourneyStateChanged",SKU_TEXT_REGEX:Ae=/\$\{sku\.(\w+)(:\d+)?\}/g,VAR_REGEX:xe=/\$\{\s*(\w+(\.[a-zA-Z\d_:${}-]{0,99})*?)\s*}/g,HTML_REGEX:_e=/<\/?[a-z][\s\S]*>/i,SMART_TEXT_PATTERN:Ce="${",CORS_PROXY_URL:Le="https://hosted-content-staging.namiml.com",CORS_PROXY_URL_LOCAL:Ie="http://localhost:8001"}={};var De;!function(e){e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR"}(De||(De={}));const Re={debug:De.DEBUG,info:De.INFO,warn:De.WARN,error:De.ERROR};const We=new class{constructor(){this.currentLogLevel=De.DEBUG,this.setLogger=e=>{this.currentLogLevel=e?Re[e]:De.WARN}}debug(e,...t){this.shouldLog(De.DEBUG)&&console.debug(this.formatMessage(De.DEBUG,e,...t))}info(e,...t){this.shouldLog(De.INFO)&&console.info(this.formatMessage(De.INFO,e,...t))}warn(e,...t){this.shouldLog(De.WARN)&&console.warn(this.formatMessage(De.WARN,e,...t))}error(e,...t){this.shouldLog(De.ERROR)&&console.error(this.formatMessage(De.ERROR,e,...t))}shouldLog(e){return e>=this.currentLogLevel}formatMessage(e,t,...n){const i=De[e];return`[${(new Date).toISOString()}] [${i}] ${t} ${n=n.map((e=>"object"==typeof e?JSON.stringify(e):e))}`}};function Ne(e){for(var t=-1,n=null==e?0:e.length,i=0,a=[];++t<n;){var r=e[t];r&&(a[i++]=r)}return a}function Oe(e,t){return e===t||e!=e&&t!=t}function Fe(e,t){for(var n=e.length;n--;)if(Oe(e[n][0],t))return n;return-1}var je=Array.prototype.splice;function ze(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}ze.prototype.clear=function(){this.__data__=[],this.size=0},ze.prototype.delete=function(e){var t=this.__data__,n=Fe(t,e);return!(n<0)&&(n==t.length-1?t.pop():je.call(t,n,1),--this.size,!0)},ze.prototype.get=function(e){var t=this.__data__,n=Fe(t,e);return n<0?void 0:t[n][1]},ze.prototype.has=function(e){return Fe(this.__data__,e)>-1},ze.prototype.set=function(e,t){var n=this.__data__,i=Fe(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};var $e="object"==typeof global&&global&&global.Object===Object&&global,Ue="object"==typeof self&&self&&self.Object===Object&&self,He=$e||Ue||Function("return this")(),Be=He.Symbol,Ge=Object.prototype,Xe=Ge.hasOwnProperty,Ye=Ge.toString,Ve=Be?Be.toStringTag:void 0;var Ke=Object.prototype.toString;var qe="[object Null]",Je="[object Undefined]",Qe=Be?Be.toStringTag:void 0;function Ze(e){return null==e?void 0===e?Je:qe:Qe&&Qe in Object(e)?function(e){var t=Xe.call(e,Ve),n=e[Ve];try{e[Ve]=void 0;var i=!0}catch(e){}var a=Ye.call(e);return i&&(t?e[Ve]=n:delete e[Ve]),a}(e):function(e){return Ke.call(e)}(e)}function et(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var tt="[object AsyncFunction]",nt="[object Function]",it="[object GeneratorFunction]",at="[object Proxy]";function rt(e){if(!et(e))return!1;var t=Ze(e);return t==nt||t==it||t==tt||t==at}var ot,st=He["__core-js_shared__"],lt=(ot=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||""))?"Symbol(src)_1."+ot:"";var dt=Function.prototype.toString;function ut(e){if(null!=e){try{return dt.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var ct=/^\[object .+?Constructor\]$/,ht=Function.prototype,mt=Object.prototype,ft=ht.toString,pt=mt.hasOwnProperty,gt=RegExp("^"+ft.call(pt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vt(e){return!(!et(e)||(t=e,lt&< in t))&&(rt(e)?gt:ct).test(ut(e));var t}function yt(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return vt(n)?n:void 0}var wt=yt(He,"Map"),bt=yt(Object,"create");var kt=Object.prototype.hasOwnProperty;var St=Object.prototype.hasOwnProperty;function Mt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Et(e,t){var n,i,a=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function Tt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Mt.prototype.clear=function(){this.__data__=bt?bt(null):{},this.size=0},Mt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Mt.prototype.get=function(e){var t=this.__data__;if(bt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return kt.call(t,e)?t[e]:void 0},Mt.prototype.has=function(e){var t=this.__data__;return bt?void 0!==t[e]:St.call(t,e)},Mt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=bt&&void 0===t?"__lodash_hash_undefined__":t,this},Tt.prototype.clear=function(){this.size=0,this.__data__={hash:new Mt,map:new(wt||ze),string:new Mt}},Tt.prototype.delete=function(e){var t=Et(this,e).delete(e);return this.size-=t?1:0,t},Tt.prototype.get=function(e){return Et(this,e).get(e)},Tt.prototype.has=function(e){return Et(this,e).has(e)},Tt.prototype.set=function(e,t){var n=Et(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this};function Pt(e){var t=this.__data__=new ze(e);this.size=t.size}Pt.prototype.clear=function(){this.__data__=new ze,this.size=0},Pt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Pt.prototype.get=function(e){return this.__data__.get(e)},Pt.prototype.has=function(e){return this.__data__.has(e)},Pt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ze){var i=n.__data__;if(!wt||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Tt(i)}return n.set(e,t),this.size=n.size,this};function At(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Tt;++t<n;)this.add(e[t])}function xt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function _t(e,t){return e.has(t)}At.prototype.add=At.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},At.prototype.has=function(e){return this.__data__.has(e)};var Ct=1,Lt=2;function It(e,t,n,i,a,r){var o=n&Ct,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var d=r.get(e),u=r.get(t);if(d&&u)return d==t&&u==e;var c=-1,h=!0,m=n&Lt?new At:void 0;for(r.set(e,t),r.set(t,e);++c<s;){var f=e[c],p=t[c];if(i)var g=o?i(p,f,c,t,e,r):i(f,p,c,e,t,r);if(void 0!==g){if(g)continue;h=!1;break}if(m){if(!xt(t,(function(e,t){if(!_t(m,t)&&(f===e||a(f,e,n,i,r)))return m.push(t)}))){h=!1;break}}else if(f!==p&&!a(f,p,n,i,r)){h=!1;break}}return r.delete(e),r.delete(t),h}var Dt=He.Uint8Array;function Rt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function Wt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Nt=1,Ot=2,Ft="[object Boolean]",jt="[object Date]",zt="[object Error]",$t="[object Map]",Ut="[object Number]",Ht="[object RegExp]",Bt="[object Set]",Gt="[object String]",Xt="[object Symbol]",Yt="[object ArrayBuffer]",Vt="[object DataView]",Kt=Be?Be.prototype:void 0,qt=Kt?Kt.valueOf:void 0;var Jt=Array.isArray;var Qt=Object.prototype.propertyIsEnumerable,Zt=Object.getOwnPropertySymbols,en=Zt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,a=0,r=[];++n<i;){var o=e[n];t(o,n,e)&&(r[a++]=o)}return r}(Zt(e),(function(t){return Qt.call(e,t)})))}:function(){return[]};function tn(e){return null!=e&&"object"==typeof e}function nn(e){return tn(e)&&"[object Arguments]"==Ze(e)}var an=Object.prototype,rn=an.hasOwnProperty,on=an.propertyIsEnumerable,sn=nn(function(){return arguments}())?nn:function(e){return tn(e)&&rn.call(e,"callee")&&!on.call(e,"callee")};var ln="object"==typeof exports&&exports&&!exports.nodeType&&exports,dn=ln&&"object"==typeof module&&module&&!module.nodeType&&module,un=dn&&dn.exports===ln?He.Buffer:void 0,cn=(un?un.isBuffer:void 0)||function(){return!1},hn=9007199254740991,mn=/^(?:0|[1-9]\d*)$/;function fn(e,t){var n=typeof e;return!!(t=null==t?hn:t)&&("number"==n||"symbol"!=n&&mn.test(e))&&e>-1&&e%1==0&&e<t}var pn=9007199254740991;function gn(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=pn}var vn={};vn["[object Float32Array]"]=vn["[object Float64Array]"]=vn["[object Int8Array]"]=vn["[object Int16Array]"]=vn["[object Int32Array]"]=vn["[object Uint8Array]"]=vn["[object Uint8ClampedArray]"]=vn["[object Uint16Array]"]=vn["[object Uint32Array]"]=!0,vn["[object Arguments]"]=vn["[object Array]"]=vn["[object ArrayBuffer]"]=vn["[object Boolean]"]=vn["[object DataView]"]=vn["[object Date]"]=vn["[object Error]"]=vn["[object Function]"]=vn["[object Map]"]=vn["[object Number]"]=vn["[object Object]"]=vn["[object RegExp]"]=vn["[object Set]"]=vn["[object String]"]=vn["[object WeakMap]"]=!1;var yn,wn="object"==typeof exports&&exports&&!exports.nodeType&&exports,bn=wn&&"object"==typeof module&&module&&!module.nodeType&&module,kn=bn&&bn.exports===wn&&$e.process,Sn=function(){try{var e=bn&&bn.require&&bn.require("util").types;return e||kn&&kn.binding&&kn.binding("util")}catch(e){}}(),Mn=Sn&&Sn.isTypedArray,En=Mn?(yn=Mn,function(e){return yn(e)}):function(e){return tn(e)&&gn(e.length)&&!!vn[Ze(e)]},Tn=Object.prototype.hasOwnProperty;function Pn(e,t){var n=Jt(e),i=!n&&sn(e),a=!n&&!i&&cn(e),r=!n&&!i&&!a&&En(e),o=n||i||a||r,s=o?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],l=s.length;for(var d in e)!Tn.call(e,d)||o&&("length"==d||a&&("offset"==d||"parent"==d)||r&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||fn(d,l))||s.push(d);return s}var An=Object.prototype;var xn=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),_n=Object.prototype.hasOwnProperty;function Cn(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||An))return xn(e);var t,n,i=[];for(var a in Object(e))_n.call(e,a)&&"constructor"!=a&&i.push(a);return i}function Ln(e){return null!=(t=e)&&gn(t.length)&&!rt(t)?Pn(e):Cn(e);var t}function In(e){return function(e,t,n){var i=t(e);return Jt(e)?i:function(e,t){for(var n=-1,i=t.length,a=e.length;++n<i;)e[a+n]=t[n];return e}(i,n(e))}(e,Ln,en)}var Dn=1,Rn=Object.prototype.hasOwnProperty;var Wn=yt(He,"DataView"),Nn=yt(He,"Promise"),On=yt(He,"Set"),Fn=yt(He,"WeakMap"),jn="[object Map]",zn="[object Promise]",$n="[object Set]",Un="[object WeakMap]",Hn="[object DataView]",Bn=ut(Wn),Gn=ut(wt),Xn=ut(Nn),Yn=ut(On),Vn=ut(Fn),Kn=Ze;(Wn&&Kn(new Wn(new ArrayBuffer(1)))!=Hn||wt&&Kn(new wt)!=jn||Nn&&Kn(Nn.resolve())!=zn||On&&Kn(new On)!=$n||Fn&&Kn(new Fn)!=Un)&&(Kn=function(e){var t=Ze(e),n="[object Object]"==t?e.constructor:void 0,i=n?ut(n):"";if(i)switch(i){case Bn:return Hn;case Gn:return jn;case Xn:return zn;case Yn:return $n;case Vn:return Un}return t});var qn=1,Jn="[object Arguments]",Qn="[object Array]",Zn="[object Object]",ei=Object.prototype.hasOwnProperty;function ti(e,t,n,i,a,r){var o=Jt(e),s=Jt(t),l=o?Qn:Kn(e),d=s?Qn:Kn(t),u=(l=l==Jn?Zn:l)==Zn,c=(d=d==Jn?Zn:d)==Zn,h=l==d;if(h&&cn(e)){if(!cn(t))return!1;o=!0,u=!1}if(h&&!u)return r||(r=new Pt),o||En(e)?It(e,t,n,i,a,r):function(e,t,n,i,a,r,o){switch(n){case Vt:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Yt:return!(e.byteLength!=t.byteLength||!r(new Dt(e),new Dt(t)));case Ft:case jt:case Ut:return Oe(+e,+t);case zt:return e.name==t.name&&e.message==t.message;case Ht:case Gt:return e==t+"";case $t:var s=Rt;case Bt:var l=i&Nt;if(s||(s=Wt),e.size!=t.size&&!l)return!1;var d=o.get(e);if(d)return d==t;i|=Ot,o.set(e,t);var u=It(s(e),s(t),i,a,r,o);return o.delete(e),u;case Xt:if(qt)return qt.call(e)==qt.call(t)}return!1}(e,t,l,n,i,a,r);if(!(n&qn)){var m=u&&ei.call(e,"__wrapped__"),f=c&&ei.call(t,"__wrapped__");if(m||f){var p=m?e.value():e,g=f?t.value():t;return r||(r=new Pt),a(p,g,n,i,r)}}return!!h&&(r||(r=new Pt),function(e,t,n,i,a,r){var o=n&Dn,s=In(e),l=s.length;if(l!=In(t).length&&!o)return!1;for(var d=l;d--;){var u=s[d];if(!(o?u in t:Rn.call(t,u)))return!1}var c=r.get(e),h=r.get(t);if(c&&h)return c==t&&h==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++d<l;){var p=e[u=s[d]],g=t[u];if(i)var v=o?i(g,p,u,t,e,r):i(p,g,u,e,t,r);if(!(void 0===v?p===g||a(p,g,n,i,r):v)){m=!1;break}f||(f="constructor"==u)}if(m&&!f){var y=e.constructor,w=t.constructor;y==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof w&&w instanceof w||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,n,i,a,r))}function ni(e,t,n,i,a){return e===t||(null==e||null==t||!tn(e)&&!tn(t)?e!=e&&t!=t:ti(e,t,n,i,ni,a))}var ii=1,ai=2;function ri(e){return e==e&&!et(e)}function oi(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function si(e){var t=function(e){for(var t=Ln(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,ri(a)]}return t}(e);return 1==t.length&&t[0][2]?oi(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,i){var a=n.length,r=a;if(null==e)return!r;for(e=Object(e);a--;){var o=n[a];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<r;){var s=(o=n[a])[0],l=e[s],d=o[1];if(o[2]){if(void 0===l&&!(s in e))return!1}else{var u=new Pt;if(!ni(d,l,ii|ai,i,u))return!1}}return!0}(n,0,t)}}var li="[object Symbol]";function di(e){return"symbol"==typeof e||tn(e)&&Ze(e)==li}var ui=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ci=/^\w*$/;function hi(e,t){if(Jt(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!di(e))||(ci.test(e)||!ui.test(e)||null!=t&&e in Object(t))}var mi="Expected a function";function fi(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(mi);var n=function(){var i=arguments,a=t?t.apply(this,i):i[0],r=n.cache;if(r.has(a))return r.get(a);var o=e.apply(this,i);return n.cache=r.set(a,o)||r,o};return n.cache=new(fi.Cache||Tt),n}fi.Cache=Tt;var pi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gi=/\\(\\)?/g,vi=function(e){var t=fi(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(pi,(function(e,n,i,a){t.push(i?a.replace(gi,"$1"):n||e)})),t}));var yi=1/0,wi=Be?Be.prototype:void 0,bi=wi?wi.toString:void 0;function ki(e){if("string"==typeof e)return e;if(Jt(e))return function(e,t){for(var n=-1,i=null==e?0:e.length,a=Array(i);++n<i;)a[n]=t(e[n],n,e);return a}(e,ki)+"";if(di(e))return bi?bi.call(e):"";var t=e+"";return"0"==t&&1/e==-yi?"-0":t}function Si(e){return null==e?"":ki(e)}function Mi(e,t){return Jt(e)?e:hi(e,t)?[e]:vi(Si(e))}var Ei=1/0;function Ti(e){if("string"==typeof e||di(e))return e;var t=e+"";return"0"==t&&1/e==-Ei?"-0":t}function Pi(e,t){for(var n=0,i=(t=Mi(t,e)).length;null!=e&&n<i;)e=e[Ti(t[n++])];return n&&n==i?e:void 0}function Ai(e,t){return null!=e&&t in Object(e)}function xi(e,t){return null!=e&&function(e,t,n){for(var i=-1,a=(t=Mi(t,e)).length,r=!1;++i<a;){var o=Ti(t[i]);if(!(r=null!=e&&n(e,o)))break;e=e[o]}return r||++i!=a?r:!!(a=null==e?0:e.length)&&gn(a)&&fn(o,a)&&(Jt(e)||sn(e))}(e,t,Ai)}var _i=1,Ci=2;function Li(e,t){return hi(e)&&ri(t)?oi(Ti(e),t):function(n){var i=function(e,t,n){var i=null==e?void 0:Pi(e,t);return void 0===i?n:i}(n,e);return void 0===i&&i===t?xi(n,e):ni(t,i,_i|Ci)}}function Ii(e){return e}function Di(e){return hi(e)?(t=Ti(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Pi(t,e)}}(e);var t}function Ri(e){return e!=e}function Wi(e,t){return!!(null==e?0:e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===t)return i;return-1}(e,t,n):function(e,t,n){for(var i=e.length,a=n+-1;++a<i;)if(t(e[a],a,e))return a;return-1}(e,Ri,n)}(e,t,0)>-1}var Ni=On&&1/Wt(new On([,-0]))[1]==1/0?function(e){return new On(e)}:function(){},Oi=200;function Fi(e,t){return e&&e.length?function(e,t,n){var i=-1,a=Wi,r=e.length,o=!0,s=[],l=s;if(r>=Oi){var d=t?null:Ni(e);if(d)return Wt(d);o=!1,a=_t,l=new At}else l=t?[]:s;e:for(;++i<r;){var u=e[i],c=t?t(u):u;if(u=0!==u?u:0,o&&c==c){for(var h=l.length;h--;)if(l[h]===c)continue e;t&&l.push(c),s.push(u)}else a(l,c,n)||(l!==s&&l.push(c),s.push(u))}return s}(e,"function"==typeof(n=t)?n:null==n?Ii:"object"==typeof n?Jt(n)?Li(n[0],n[1]):si(n):Di(n)):[];var n}const ji=new class{constructor(){this.memoryStore={}}setDevice(e){this.setItem(_,e)}getDevice(){return this.getItem(_)}resetDevice(){this.resetItem(_)}getAnonymousMode(){return this.getItem(G)||!1}setAnonymousMode(e){this.setItem(G,e)}clearAnonymousMode(){this.resetItem(G)}setAppConfig(e,t){this.setItem(e,t)}getAppConfig(e){return this.getItem(e)}setLanguageCode(e){this.setItem(Q,e||"en")}getLanguageCode(){return this.getItem(Q)||"en"}setCampaignRules(e,t){this.setItem(e,t)}getCampaignRules(e){return this.getItem(e)}setPaywalls(e,t){this.setItem(e,t)}getPaywalls(e){return this.getItem(e)}setActiveEntitlements(e,t){this.setItem(e,t)}getActiveEntitlements(e){return this.getItem(e)||[]}setNamiEntitlements(e,t){this.setItem(e,t)}getNamiEntitlements(e){return this.getItem(e)||[]}setProducts(e,t){this.setItem(e,t)}getProducts(e){return this.getItem(e)}getCachedProducts(){const e=this.getItem(W)??[];return Fi(Ne([...this.getItem($)??[],...e]),"sku_ref_id")}setNamiConfig(e){this.setItem(C,e)}getNamiConfig(){return this.getItem(C)}setCustomerAttribute(e,t){this.setItem(H+e,t)}getCustomerAttribute(e){return this.getItem(H+e)}getAllCustomerAttributes(){return Object.entries(localStorage).filter((([e])=>e.includes(H))).map((([e,t])=>e.replace(H,"")+":"+t))}getAllCustomerAttributesKeys(){return Object.keys(localStorage).filter((e=>e.includes(H))).map((e=>e.replace(H,"")))}clearCustomerAttribute(e){const t=H+e,n=this.getItem(t);return n&&this.resetItem(t),!!n}clearAllCustomerAttributes(){Object.keys(localStorage).filter((e=>e.includes(H))).map((e=>this.resetItem(e)))}setNamiProfile(e){this.setItem(L,e)}getNamiProfile(){return this.getItem(L)}removeNamiProfile(){this.resetItem(L)}setCustomerJourneyState(e){this.setItem(B,e)}getCustomerJourneyState(){return this.getItem(B)}setSessionCounter(){const e=this.getItem(Y),t=e?parseInt(e):V||V;this.setItem(Y,t+1)}getSessionCounter(){const e=this.getItem(Y);return e?parseInt(e):V}setLastImpressionId(e){this.setItem(K,e)}getLastImpressionId(){return this.getItem(K)??""}setPurchaseImpression(){const e=this.getLastImpressionId()??"";this.setItem(q,e)}getPurchaseImpression(){return this.getItem(q)??""}setSessionId(e){e&&this.setItem(J,e)}getSessionId(){return this.getItem(J)??""}clearSessionId(){this.resetItem(J)}setPurchaseChannel(e){e&&this.setItem(Z,e)}getPurchaseChannel(){return this.getItem(Z)}getAnonymousUUID(){return this.getItem(X)}setAnonymousUUID(e){this.setItem(X,e)}clearAnonymousUUID(){this.resetItem(X)}setItem(e,t){let n;try{n=JSON.stringify(t)}catch(t){return void We.error(`Serialization failed for ${e}`,t)}try{localStorage.setItem(e,n)}catch(t){We.error("Error setting item in localStorage:",t),this.resetItem(e),this.memoryStore[e]=n}}getItem(e){try{const t=localStorage.getItem(e);if(null!==t)return JSON.parse(t)}catch(t){We.error("Error getting item from localStorage:",e,": ",t)}const t=this.memoryStore[e];return null!=t?JSON.parse(t):null}resetItem(e){try{localStorage.removeItem(e)}catch(e){We.error("Error removing item from localStorage:",e)}delete this.memoryStore[e]}clear(){try{localStorage.clear()}catch(e){We.error("Error clearing localStorage:",e)}this.memoryStore={}}};class zi extends Error{constructor(e,t){super(t),this.statusCode=e,this.status=e,this.message=`RetryLimitExceededError: ${this.message}`}}class $i extends Error{}class Ui extends $i{constructor(){super(),this.status=409,this.name="ConflictError",this.message="ConflictError: Server responded with conflict"}}class Hi extends Error{constructor(){super(b)}}class Bi extends Error{constructor(){super(v)}}class Gi extends Error{constructor(){super(y)}}class Xi extends Error{constructor(){super(w)}}class Yi extends Error{constructor(){super(k)}}class Vi extends Error{constructor(){super(S)}}class Ki extends Error{constructor(){super(E)}}class qi extends Error{constructor(){super(T)}}class Ji extends Error{constructor(){super(T)}}class Qi extends Error{constructor(){super(M)}}class Zi extends $i{constructor(e){super(e),this.message=`BadRequestError: ${this.message}`}}class ea extends $i{constructor(e){super(e),this.message=`NotFoundError: ${this.message}`}}class ta extends $i{constructor(e,t){super(t),this.statusCode=e,this.message=`ClientError: ${this.message}`}}class na extends $i{constructor(e){super(e),this.message=`ServerError: ${this.message}`}}const ia=(e,t)=>{if(e==ge)throw new Zi(t);if(e==ve)throw new ea(t);if(e==ye)throw new Ui;if(e>ge&&e<we)throw new ta(e,t);if(e>=we)throw new na(t)};async function aa(e,t,n=me,i=ce){let a=0;const r=async()=>{const o=await async function(e,t={},n){const i=new AbortController,a=setTimeout((()=>i.abort()),n);t.signal=i.signal;const r=await fetch(e,t);return clearTimeout(a),r}(e,t,n);if(!o.ok){if(o.status==ye)throw new Ui;if(a++,a<=i){const e=1e3*(a+he);return await new Promise((t=>setTimeout(t,e))),r()}throw new zi(o.status,`Request failed after ${i} retries`)}return o};return(await r()).json()}function ra(e){let t=e.length;for(;--t>=0;)e[t]=0}const oa=256,sa=286,la=30,da=15,ua=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),ca=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),ha=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),ma=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),fa=new Array(576);ra(fa);const pa=new Array(60);ra(pa);const ga=new Array(512);ra(ga);const va=new Array(256);ra(va);const ya=new Array(29);ra(ya);const wa=new Array(la);function ba(e,t,n,i,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=i,this.max_length=a,this.has_stree=e&&e.length}let ka,Sa,Ma;function Ea(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}ra(wa);const Ta=e=>e<256?ga[e]:ga[256+(e>>>7)],Pa=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},Aa=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,Pa(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},xa=(e,t,n)=>{Aa(e,n[2*t],n[2*t+1])},_a=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},Ca=(e,t,n)=>{const i=new Array(16);let a,r,o=0;for(a=1;a<=da;a++)o=o+n[a-1]<<1,i[a]=o;for(r=0;r<=t;r++){let t=e[2*r+1];0!==t&&(e[2*r]=_a(i[t]++,t))}},La=e=>{let t;for(t=0;t<sa;t++)e.dyn_ltree[2*t]=0;for(t=0;t<la;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Ia=e=>{e.bi_valid>8?Pa(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Da=(e,t,n,i)=>{const a=2*t,r=2*n;return e[a]<e[r]||e[a]===e[r]&&i[t]<=i[n]},Ra=(e,t,n)=>{const i=e.heap[n];let a=n<<1;for(;a<=e.heap_len&&(a<e.heap_len&&Da(t,e.heap[a+1],e.heap[a],e.depth)&&a++,!Da(t,i,e.heap[a],e.depth));)e.heap[n]=e.heap[a],n=a,a<<=1;e.heap[n]=i},Wa=(e,t,n)=>{let i,a,r,o,s=0;if(0!==e.sym_next)do{i=255&e.pending_buf[e.sym_buf+s++],i+=(255&e.pending_buf[e.sym_buf+s++])<<8,a=e.pending_buf[e.sym_buf+s++],0===i?xa(e,a,t):(r=va[a],xa(e,r+oa+1,t),o=ua[r],0!==o&&(a-=ya[r],Aa(e,a,o)),i--,r=Ta(i),xa(e,r,n),o=ca[r],0!==o&&(i-=wa[r],Aa(e,i,o)))}while(s<e.sym_next);xa(e,256,t)},Na=(e,t)=>{const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,r=t.stat_desc.elems;let o,s,l,d=-1;for(e.heap_len=0,e.heap_max=573,o=0;o<r;o++)0!==n[2*o]?(e.heap[++e.heap_len]=d=o,e.depth[o]=0):n[2*o+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=d<2?++d:0,n[2*l]=1,e.depth[l]=0,e.opt_len--,a&&(e.static_len-=i[2*l+1]);for(t.max_code=d,o=e.heap_len>>1;o>=1;o--)Ra(e,n,o);l=r;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Ra(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[2*l]=n[2*o]+n[2*s],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[2*o+1]=n[2*s+1]=l,e.heap[1]=l++,Ra(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,i=t.max_code,a=t.stat_desc.static_tree,r=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length;let d,u,c,h,m,f,p=0;for(h=0;h<=da;h++)e.bl_count[h]=0;for(n[2*e.heap[e.heap_max]+1]=0,d=e.heap_max+1;d<573;d++)u=e.heap[d],h=n[2*n[2*u+1]+1]+1,h>l&&(h=l,p++),n[2*u+1]=h,u>i||(e.bl_count[h]++,m=0,u>=s&&(m=o[u-s]),f=n[2*u],e.opt_len+=f*(h+m),r&&(e.static_len+=f*(a[2*u+1]+m)));if(0!==p){do{for(h=l-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[l]--,p-=2}while(p>0);for(h=l;0!==h;h--)for(u=e.bl_count[h];0!==u;)c=e.heap[--d],c>i||(n[2*c+1]!==h&&(e.opt_len+=(h-n[2*c+1])*n[2*c],n[2*c+1]=h),u--)}})(e,t),Ca(n,d,e.bl_count)},Oa=(e,t,n)=>{let i,a,r=-1,o=t[1],s=0,l=7,d=4;for(0===o&&(l=138,d=3),t[2*(n+1)+1]=65535,i=0;i<=n;i++)a=o,o=t[2*(i+1)+1],++s<l&&a===o||(s<d?e.bl_tree[2*a]+=s:0!==a?(a!==r&&e.bl_tree[2*a]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,r=a,0===o?(l=138,d=3):a===o?(l=6,d=3):(l=7,d=4))},Fa=(e,t,n)=>{let i,a,r=-1,o=t[1],s=0,l=7,d=4;for(0===o&&(l=138,d=3),i=0;i<=n;i++)if(a=o,o=t[2*(i+1)+1],!(++s<l&&a===o)){if(s<d)do{xa(e,a,e.bl_tree)}while(0!=--s);else 0!==a?(a!==r&&(xa(e,a,e.bl_tree),s--),xa(e,16,e.bl_tree),Aa(e,s-3,2)):s<=10?(xa(e,17,e.bl_tree),Aa(e,s-3,3)):(xa(e,18,e.bl_tree),Aa(e,s-11,7));s=0,r=a,0===o?(l=138,d=3):a===o?(l=6,d=3):(l=7,d=4)}};let ja=!1;const za=(e,t,n,i)=>{Aa(e,0+(i?1:0),3),Ia(e),Pa(e,n),Pa(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n};var $a=e=>{ja||((()=>{let e,t,n,i,a;const r=new Array(16);for(n=0,i=0;i<28;i++)for(ya[i]=n,e=0;e<1<<ua[i];e++)va[n++]=i;for(va[n-1]=i,a=0,i=0;i<16;i++)for(wa[i]=a,e=0;e<1<<ca[i];e++)ga[a++]=i;for(a>>=7;i<la;i++)for(wa[i]=a<<7,e=0;e<1<<ca[i]-7;e++)ga[256+a++]=i;for(t=0;t<=da;t++)r[t]=0;for(e=0;e<=143;)fa[2*e+1]=8,e++,r[8]++;for(;e<=255;)fa[2*e+1]=9,e++,r[9]++;for(;e<=279;)fa[2*e+1]=7,e++,r[7]++;for(;e<=287;)fa[2*e+1]=8,e++,r[8]++;for(Ca(fa,287,r),e=0;e<la;e++)pa[2*e+1]=5,pa[2*e]=_a(e,5);ka=new ba(fa,ua,257,sa,da),Sa=new ba(pa,ca,0,la,da),Ma=new ba(new Array(0),ha,0,19,7)})(),ja=!0),e.l_desc=new Ea(e.dyn_ltree,ka),e.d_desc=new Ea(e.dyn_dtree,Sa),e.bl_desc=new Ea(e.bl_tree,Ma),e.bi_buf=0,e.bi_valid=0,La(e)},Ua=(e,t,n,i)=>{let a,r,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<oa;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),Na(e,e.l_desc),Na(e,e.d_desc),o=(e=>{let t;for(Oa(e,e.dyn_ltree,e.l_desc.max_code),Oa(e,e.dyn_dtree,e.d_desc.max_code),Na(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*ma[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),a=e.opt_len+3+7>>>3,r=e.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!==t?za(e,t,n,i):4===e.strategy||r===a?(Aa(e,2+(i?1:0),3),Wa(e,fa,pa)):(Aa(e,4+(i?1:0),3),((e,t,n,i)=>{let a;for(Aa(e,t-257,5),Aa(e,n-1,5),Aa(e,i-4,4),a=0;a<i;a++)Aa(e,e.bl_tree[2*ma[a]+1],3);Fa(e,e.dyn_ltree,t-1),Fa(e,e.dyn_dtree,n-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Wa(e,e.dyn_ltree,e.dyn_dtree)),La(e),i&&Ia(e)},Ha=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(va[n]+oa+1)]++,e.dyn_dtree[2*Ta(t)]++),e.sym_next===e.sym_end),Ba=e=>{Aa(e,2,3),xa(e,256,fa),(e=>{16===e.bi_valid?(Pa(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)},Ga={_tr_init:$a,_tr_stored_block:za,_tr_flush_block:Ua,_tr_tally:Ha,_tr_align:Ba};var Xa=(e,t,n,i)=>{let a=65535&e,r=e>>>16&65535,o=0;for(;0!==n;){o=n>2e3?2e3:n,n-=o;do{a=a+t[i++]|0,r=r+a|0}while(--o);a%=65521,r%=65521}return a|r<<16};const Ya=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var Va=(e,t,n,i)=>{const a=Ya,r=i+n;e^=-1;for(let n=i;n<r;n++)e=e>>>8^a[255&(e^t[n])];return~e},Ka={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},qa={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:Ja,_tr_stored_block:Qa,_tr_flush_block:Za,_tr_tally:er,_tr_align:tr}=Ga,{Z_NO_FLUSH:nr,Z_PARTIAL_FLUSH:ir,Z_FULL_FLUSH:ar,Z_FINISH:rr,Z_BLOCK:or,Z_OK:sr,Z_STREAM_END:lr,Z_STREAM_ERROR:dr,Z_DATA_ERROR:ur,Z_BUF_ERROR:cr,Z_DEFAULT_COMPRESSION:hr,Z_FILTERED:mr,Z_HUFFMAN_ONLY:fr,Z_RLE:pr,Z_FIXED:gr,Z_DEFAULT_STRATEGY:vr,Z_UNKNOWN:yr,Z_DEFLATED:wr}=qa,br=258,kr=262,Sr=42,Mr=113,Er=666,Tr=(e,t)=>(e.msg=Ka[t],t),Pr=e=>2*e-(e>4?9:0),Ar=e=>{let t=e.length;for(;--t>=0;)e[t]=0},xr=e=>{let t,n,i,a=e.w_size;t=e.hash_size,i=t;do{n=e.head[--i],e.head[i]=n>=a?n-a:0}while(--t);t=a,i=t;do{n=e.prev[--i],e.prev[i]=n>=a?n-a:0}while(--t)};let _r=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const Cr=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},Lr=(e,t)=>{Za(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Cr(e.strm)},Ir=(e,t)=>{e.pending_buf[e.pending++]=t},Dr=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Rr=(e,t,n,i)=>{let a=e.avail_in;return a>i&&(a=i),0===a?0:(e.avail_in-=a,t.set(e.input.subarray(e.next_in,e.next_in+a),n),1===e.state.wrap?e.adler=Xa(e.adler,t,a,n):2===e.state.wrap&&(e.adler=Va(e.adler,t,a,n)),e.next_in+=a,e.total_in+=a,a)},Wr=(e,t)=>{let n,i,a=e.max_chain_length,r=e.strstart,o=e.prev_length,s=e.nice_match;const l=e.strstart>e.w_size-kr?e.strstart-(e.w_size-kr):0,d=e.window,u=e.w_mask,c=e.prev,h=e.strstart+br;let m=d[r+o-1],f=d[r+o];e.prev_length>=e.good_match&&(a>>=2),s>e.lookahead&&(s=e.lookahead);do{if(n=t,d[n+o]===f&&d[n+o-1]===m&&d[n]===d[r]&&d[++n]===d[r+1]){r+=2,n++;do{}while(d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&r<h);if(i=br-(h-r),r=h-br,i>o){if(e.match_start=t,o=i,i>=s)break;m=d[r+o-1],f=d[r+o]}}}while((t=c[t&u])>l&&0!=--a);return o<=e.lookahead?o:e.lookahead},Nr=e=>{const t=e.w_size;let n,i,a;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-kr)&&(e.window.set(e.window.subarray(t,t+t-i),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),xr(e),i+=t),0===e.strm.avail_in)break;if(n=Rr(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=n,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=_r(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=_r(e,e.ins_h,e.window[a+3-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<kr&&0!==e.strm.avail_in)},Or=(e,t)=>{let n,i,a,r=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,o=0,s=e.strm.avail_in;do{if(n=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a)break;if(a=e.strm.avail_out-a,i=e.strstart-e.block_start,n>i+e.strm.avail_in&&(n=i+e.strm.avail_in),n>a&&(n=a),n<r&&(0===n&&t!==rr||t===nr||n!==i+e.strm.avail_in))break;o=t===rr&&n===i+e.strm.avail_in?1:0,Qa(e,0,0,o),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,Cr(e.strm),i&&(i>n&&(i=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,n-=i),n&&(Rr(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(0===o);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?4:t!==nr&&t!==rr&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(Rr(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,r=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=r||(i||t===rr)&&t!==nr&&0===e.strm.avail_in&&i<=a)&&(n=i>a?a:i,o=t===rr&&0===e.strm.avail_in&&n===i?1:0,Qa(e,e.block_start,n,o),e.block_start+=n,Cr(e.strm)),o?3:1)},Fr=(e,t)=>{let n,i;for(;;){if(e.lookahead<kr){if(Nr(e),e.lookahead<kr&&t===nr)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=_r(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-kr&&(e.match_length=Wr(e,n)),e.match_length>=3)if(i=er(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=_r(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=_r(e,e.ins_h,e.window[e.strstart+1]);else i=er(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(Lr(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===rr?(Lr(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Lr(e,!1),0===e.strm.avail_out)?1:2},jr=(e,t)=>{let n,i,a;for(;;){if(e.lookahead<kr){if(Nr(e),e.lookahead<kr&&t===nr)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=_r(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-kr&&(e.match_length=Wr(e,n),e.match_length<=5&&(e.strategy===mr||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,i=er(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=_r(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,i&&(Lr(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(i=er(e,0,e.window[e.strstart-1]),i&&Lr(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=er(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===rr?(Lr(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Lr(e,!1),0===e.strm.avail_out)?1:2};function zr(e,t,n,i,a){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=i,this.func=a}const $r=[new zr(0,0,0,0,Or),new zr(4,4,8,4,Fr),new zr(4,5,16,8,Fr),new zr(4,6,32,32,Fr),new zr(4,4,16,16,jr),new zr(8,16,32,32,jr),new zr(8,16,128,128,jr),new zr(8,32,128,256,jr),new zr(32,128,258,1024,jr),new zr(32,258,258,4096,jr)];function Ur(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=wr,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Ar(this.dyn_ltree),Ar(this.dyn_dtree),Ar(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Ar(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Ar(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Hr=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Sr&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Mr&&t.status!==Er?1:0},Br=e=>{if(Hr(e))return Tr(e,dr);e.total_in=e.total_out=0,e.data_type=yr;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?Sr:Mr,e.adler=2===t.wrap?0:1,t.last_flush=-2,Ja(t),sr},Gr=e=>{const t=Br(e);return t===sr&&(e=>{e.window_size=2*e.w_size,Ar(e.head),e.max_lazy_match=$r[e.level].max_lazy,e.good_match=$r[e.level].good_length,e.nice_match=$r[e.level].nice_length,e.max_chain_length=$r[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0})(e.state),t},Xr=(e,t,n,i,a,r)=>{if(!e)return dr;let o=1;if(t===hr&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),a<1||a>9||n!==wr||i<8||i>15||t<0||t>9||r<0||r>gr||8===i&&1!==o)return Tr(e,dr);8===i&&(i=9);const s=new Ur;return e.state=s,s.strm=e,s.status=Sr,s.wrap=o,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=a+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<a+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=3*(s.lit_bufsize-1),s.level=t,s.strategy=r,s.method=n,Gr(e)};var Yr=(e,t)=>{if(Hr(e)||t>or||t<0)return e?Tr(e,dr):dr;const n=e.state;if(!e.output||0!==e.avail_in&&!e.input||n.status===Er&&t!==rr)return Tr(e,0===e.avail_out?cr:dr);const i=n.last_flush;if(n.last_flush=t,0!==n.pending){if(Cr(e),0===e.avail_out)return n.last_flush=-1,sr}else if(0===e.avail_in&&Pr(t)<=Pr(i)&&t!==rr)return Tr(e,cr);if(n.status===Er&&0!==e.avail_in)return Tr(e,cr);if(n.status===Sr&&0===n.wrap&&(n.status=Mr),n.status===Sr){let t=wr+(n.w_bits-8<<4)<<8,i=-1;if(i=n.strategy>=fr||n.level<2?0:n.level<6?1:6===n.level?2:3,t|=i<<6,0!==n.strstart&&(t|=32),t+=31-t%31,Dr(n,t),0!==n.strstart&&(Dr(n,e.adler>>>16),Dr(n,65535&e.adler)),e.adler=1,n.status=Mr,Cr(e),0!==n.pending)return n.last_flush=-1,sr}if(57===n.status)if(e.adler=0,Ir(n,31),Ir(n,139),Ir(n,8),n.gzhead)Ir(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Ir(n,255&n.gzhead.time),Ir(n,n.gzhead.time>>8&255),Ir(n,n.gzhead.time>>16&255),Ir(n,n.gzhead.time>>24&255),Ir(n,9===n.level?2:n.strategy>=fr||n.level<2?4:0),Ir(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(Ir(n,255&n.gzhead.extra.length),Ir(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Va(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(Ir(n,0),Ir(n,0),Ir(n,0),Ir(n,0),Ir(n,0),Ir(n,9===n.level?2:n.strategy>=fr||n.level<2?4:0),Ir(n,3),n.status=Mr,Cr(e),0!==n.pending)return n.last_flush=-1,sr;if(69===n.status){if(n.gzhead.extra){let t=n.pending,i=(65535&n.gzhead.extra.length)-n.gzindex;for(;n.pending+i>n.pending_buf_size;){let a=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=Va(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=a,Cr(e),0!==n.pending)return n.last_flush=-1,sr;t=0,i-=a}let a=new Uint8Array(n.gzhead.extra);n.pending_buf.set(a.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending+=i,n.gzhead.hcrc&&n.pending>t&&(e.adler=Va(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){let t,i=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=Va(e.adler,n.pending_buf,n.pending-i,i)),Cr(e),0!==n.pending)return n.last_flush=-1,sr;i=0}t=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,Ir(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>i&&(e.adler=Va(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){let t,i=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=Va(e.adler,n.pending_buf,n.pending-i,i)),Cr(e),0!==n.pending)return n.last_flush=-1,sr;i=0}t=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,Ir(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>i&&(e.adler=Va(e.adler,n.pending_buf,n.pending-i,i))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Cr(e),0!==n.pending))return n.last_flush=-1,sr;Ir(n,255&e.adler),Ir(n,e.adler>>8&255),e.adler=0}if(n.status=Mr,Cr(e),0!==n.pending)return n.last_flush=-1,sr}if(0!==e.avail_in||0!==n.lookahead||t!==nr&&n.status!==Er){let i=0===n.level?Or(n,t):n.strategy===fr?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(Nr(e),0===e.lookahead)){if(t===nr)return 1;break}if(e.match_length=0,n=er(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Lr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===rr?(Lr(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Lr(e,!1),0===e.strm.avail_out)?1:2})(n,t):n.strategy===pr?((e,t)=>{let n,i,a,r;const o=e.window;for(;;){if(e.lookahead<=br){if(Nr(e),e.lookahead<=br&&t===nr)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(a=e.strstart-1,i=o[a],i===o[++a]&&i===o[++a]&&i===o[++a])){r=e.strstart+br;do{}while(i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&a<r);e.match_length=br-(r-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=er(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=er(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Lr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===rr?(Lr(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Lr(e,!1),0===e.strm.avail_out)?1:2})(n,t):$r[n.level].func(n,t);if(3!==i&&4!==i||(n.status=Er),1===i||3===i)return 0===e.avail_out&&(n.last_flush=-1),sr;if(2===i&&(t===ir?tr(n):t!==or&&(Qa(n,0,0,!1),t===ar&&(Ar(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),Cr(e),0===e.avail_out))return n.last_flush=-1,sr}return t!==rr?sr:n.wrap<=0?lr:(2===n.wrap?(Ir(n,255&e.adler),Ir(n,e.adler>>8&255),Ir(n,e.adler>>16&255),Ir(n,e.adler>>24&255),Ir(n,255&e.total_in),Ir(n,e.total_in>>8&255),Ir(n,e.total_in>>16&255),Ir(n,e.total_in>>24&255)):(Dr(n,e.adler>>>16),Dr(n,65535&e.adler)),Cr(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?sr:lr)},Vr=(e,t)=>{let n=t.length;if(Hr(e))return dr;const i=e.state,a=i.wrap;if(2===a||1===a&&i.status!==Sr||i.lookahead)return dr;if(1===a&&(e.adler=Xa(e.adler,t,n,0)),i.wrap=0,n>=i.w_size){0===a&&(Ar(i.head),i.strstart=0,i.block_start=0,i.insert=0);let e=new Uint8Array(i.w_size);e.set(t.subarray(n-i.w_size,n),0),t=e,n=i.w_size}const r=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Nr(i);i.lookahead>=3;){let e=i.strstart,t=i.lookahead-2;do{i.ins_h=_r(i,i.ins_h,i.window[e+3-1]),i.prev[e&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=e,e++}while(--t);i.strstart=e,i.lookahead=2,Nr(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,e.next_in=o,e.input=s,e.avail_in=r,i.wrap=a,sr},Kr={deflateInit:(e,t)=>Xr(e,t,wr,15,8,vr),deflateInit2:Xr,deflateReset:Gr,deflateResetKeep:Br,deflateSetHeader:(e,t)=>Hr(e)||2!==e.state.wrap?dr:(e.state.gzhead=t,sr),deflate:Yr,deflateEnd:e=>{if(Hr(e))return dr;const t=e.state.status;return e.state=null,t===Mr?Tr(e,ur):sr},deflateSetDictionary:Vr,deflateInfo:"pako deflate (from Nodeca project)"};const qr=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Jr={assign:function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const t in n)qr(n,t)&&(e[t]=n[t])}}return e},flattenChunks:e=>{let t=0;for(let n=0,i=e.length;n<i;n++)t+=e[n].length;const n=new Uint8Array(t);for(let t=0,i=0,a=e.length;t<a;t++){let a=e[t];n.set(a,i),i+=a.length}return n}};let Qr=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Qr=!1}const Zr=new Uint8Array(256);for(let e=0;e<256;e++)Zr[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Zr[254]=Zr[254]=1;var eo={string2buf:e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,n,i,a,r,o=e.length,s=0;for(a=0;a<o;a++)n=e.charCodeAt(a),55296==(64512&n)&&a+1<o&&(i=e.charCodeAt(a+1),56320==(64512&i)&&(n=65536+(n-55296<<10)+(i-56320),a++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),r=0,a=0;r<s;a++)n=e.charCodeAt(a),55296==(64512&n)&&a+1<o&&(i=e.charCodeAt(a+1),56320==(64512&i)&&(n=65536+(n-55296<<10)+(i-56320),a++)),n<128?t[r++]=n:n<2048?(t[r++]=192|n>>>6,t[r++]=128|63&n):n<65536?(t[r++]=224|n>>>12,t[r++]=128|n>>>6&63,t[r++]=128|63&n):(t[r++]=240|n>>>18,t[r++]=128|n>>>12&63,t[r++]=128|n>>>6&63,t[r++]=128|63&n);return t},buf2string:(e,t)=>{const n=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let i,a;const r=new Array(2*n);for(a=0,i=0;i<n;){let t=e[i++];if(t<128){r[a++]=t;continue}let o=Zr[t];if(o>4)r[a++]=65533,i+=o-1;else{for(t&=2===o?31:3===o?15:7;o>1&&i<n;)t=t<<6|63&e[i++],o--;o>1?r[a++]=65533:t<65536?r[a++]=t:(t-=65536,r[a++]=55296|t>>10&1023,r[a++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Qr)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n})(r,a)},utf8border:(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Zr[e[n]]>t?n:t}};var to=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const no=Object.prototype.toString,{Z_NO_FLUSH:io,Z_SYNC_FLUSH:ao,Z_FULL_FLUSH:ro,Z_FINISH:oo,Z_OK:so,Z_STREAM_END:lo,Z_DEFAULT_COMPRESSION:uo,Z_DEFAULT_STRATEGY:co,Z_DEFLATED:ho}=qa;function mo(e){this.options=Jr.assign({level:uo,method:ho,chunkSize:16384,windowBits:15,memLevel:8,strategy:co},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new to,this.strm.avail_out=0;let n=Kr.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==so)throw new Error(Ka[n]);if(t.header&&Kr.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?eo.string2buf(t.dictionary):"[object ArrayBuffer]"===no.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=Kr.deflateSetDictionary(this.strm,e),n!==so)throw new Error(Ka[n]);this._dict_set=!0}}mo.prototype.push=function(e,t){const n=this.strm,i=this.options.chunkSize;let a,r;if(this.ended)return!1;for(r=t===~~t?t:!0===t?oo:io,"string"==typeof e?n.input=eo.string2buf(e):"[object ArrayBuffer]"===no.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(i),n.next_out=0,n.avail_out=i),(r===ao||r===ro)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(a=Kr.deflate(n,r),a===lo)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),a=Kr.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===so;if(0!==n.avail_out){if(r>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},mo.prototype.onData=function(e){this.chunks.push(e)},mo.prototype.onEnd=function(e){e===so&&(this.result=Jr.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const fo=16209;var po=function(e,t){let n,i,a,r,o,s,l,d,u,c,h,m,f,p,g,v,y,w,b,k,S,M,E,T;const P=e.state;n=e.next_in,E=e.input,i=n+(e.avail_in-5),a=e.next_out,T=e.output,r=a-(t-e.avail_out),o=a+(e.avail_out-257),s=P.dmax,l=P.wsize,d=P.whave,u=P.wnext,c=P.window,h=P.hold,m=P.bits,f=P.lencode,p=P.distcode,g=(1<<P.lenbits)-1,v=(1<<P.distbits)-1;e:do{m<15&&(h+=E[n++]<<m,m+=8,h+=E[n++]<<m,m+=8),y=f[h&g];t:for(;;){if(w=y>>>24,h>>>=w,m-=w,w=y>>>16&255,0===w)T[a++]=65535&y;else{if(!(16&w)){if(64&w){if(32&w){P.mode=16191;break e}e.msg="invalid literal/length code",P.mode=fo;break e}y=f[(65535&y)+(h&(1<<w)-1)];continue t}for(b=65535&y,w&=15,w&&(m<w&&(h+=E[n++]<<m,m+=8),b+=h&(1<<w)-1,h>>>=w,m-=w),m<15&&(h+=E[n++]<<m,m+=8,h+=E[n++]<<m,m+=8),y=p[h&v];;){if(w=y>>>24,h>>>=w,m-=w,w=y>>>16&255,16&w){if(k=65535&y,w&=15,m<w&&(h+=E[n++]<<m,m+=8,m<w&&(h+=E[n++]<<m,m+=8)),k+=h&(1<<w)-1,k>s){e.msg="invalid distance too far back",P.mode=fo;break e}if(h>>>=w,m-=w,w=a-r,k>w){if(w=k-w,w>d&&P.sane){e.msg="invalid distance too far back",P.mode=fo;break e}if(S=0,M=c,0===u){if(S+=l-w,w<b){b-=w;do{T[a++]=c[S++]}while(--w);S=a-k,M=T}}else if(u<w){if(S+=l+u-w,w-=u,w<b){b-=w;do{T[a++]=c[S++]}while(--w);if(S=0,u<b){w=u,b-=w;do{T[a++]=c[S++]}while(--w);S=a-k,M=T}}}else if(S+=u-w,w<b){b-=w;do{T[a++]=c[S++]}while(--w);S=a-k,M=T}for(;b>2;)T[a++]=M[S++],T[a++]=M[S++],T[a++]=M[S++],b-=3;b&&(T[a++]=M[S++],b>1&&(T[a++]=M[S++]))}else{S=a-k;do{T[a++]=T[S++],T[a++]=T[S++],T[a++]=T[S++],b-=3}while(b>2);b&&(T[a++]=T[S++],b>1&&(T[a++]=T[S++]))}break}if(64&w){e.msg="invalid distance code",P.mode=fo;break e}y=p[(65535&y)+(h&(1<<w)-1)]}}break}}while(n<i&&a<o);b=m>>3,n-=b,m-=b<<3,h&=(1<<m)-1,e.next_in=n,e.next_out=a,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=a<o?o-a+257:257-(a-o),P.hold=h,P.bits=m};const go=15,vo=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),yo=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),wo=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),bo=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var ko=(e,t,n,i,a,r,o,s)=>{const l=s.bits;let d,u,c,h,m,f,p=0,g=0,v=0,y=0,w=0,b=0,k=0,S=0,M=0,E=0,T=null;const P=new Uint16Array(16),A=new Uint16Array(16);let x,_,C,L=null;for(p=0;p<=go;p++)P[p]=0;for(g=0;g<i;g++)P[t[n+g]]++;for(w=l,y=go;y>=1&&0===P[y];y--);if(w>y&&(w=y),0===y)return a[r++]=20971520,a[r++]=20971520,s.bits=1,0;for(v=1;v<y&&0===P[v];v++);for(w<v&&(w=v),S=1,p=1;p<=go;p++)if(S<<=1,S-=P[p],S<0)return-1;if(S>0&&(0===e||1!==y))return-1;for(A[1]=0,p=1;p<go;p++)A[p+1]=A[p]+P[p];for(g=0;g<i;g++)0!==t[n+g]&&(o[A[t[n+g]]++]=g);if(0===e?(T=L=o,f=20):1===e?(T=vo,L=yo,f=257):(T=wo,L=bo,f=0),E=0,g=0,p=v,m=r,b=w,k=0,c=-1,M=1<<w,h=M-1,1===e&&M>852||2===e&&M>592)return 1;for(;;){x=p-k,o[g]+1<f?(_=0,C=o[g]):o[g]>=f?(_=L[o[g]-f],C=T[o[g]-f]):(_=96,C=0),d=1<<p-k,u=1<<b,v=u;do{u-=d,a[m+(E>>k)+u]=x<<24|_<<16|C}while(0!==u);for(d=1<<p-1;E&d;)d>>=1;if(0!==d?(E&=d-1,E+=d):E=0,g++,0==--P[p]){if(p===y)break;p=t[n+o[g]]}if(p>w&&(E&h)!==c){for(0===k&&(k=w),m+=v,b=p-k,S=1<<b;b+k<y&&(S-=P[b+k],!(S<=0));)b++,S<<=1;if(M+=1<<b,1===e&&M>852||2===e&&M>592)return 1;c=E&h,a[c]=w<<24|b<<16|m-r}}return 0!==E&&(a[m+E]=p-k<<24|64<<16),s.bits=w,0};const{Z_FINISH:So,Z_BLOCK:Mo,Z_TREES:Eo,Z_OK:To,Z_STREAM_END:Po,Z_NEED_DICT:Ao,Z_STREAM_ERROR:xo,Z_DATA_ERROR:_o,Z_MEM_ERROR:Co,Z_BUF_ERROR:Lo,Z_DEFLATED:Io}=qa,Do=16180,Ro=16190,Wo=16191,No=16192,Oo=16194,Fo=16199,jo=16200,zo=16206,$o=16209,Uo=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Ho(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Bo=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<Do||t.mode>16211?1:0},Go=e=>{if(Bo(e))return xo;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Do,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,To},Xo=e=>{if(Bo(e))return xo;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Go(e)},Yo=(e,t)=>{let n;if(Bo(e))return xo;const i=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?xo:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,Xo(e))},Vo=(e,t)=>{if(!e)return xo;const n=new Ho;e.state=n,n.strm=e,n.window=null,n.mode=Do;const i=Yo(e,t);return i!==To&&(e.state=null),i};let Ko,qo,Jo=!0;const Qo=e=>{if(Jo){Ko=new Int32Array(512),qo=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ko(1,e.lens,0,288,Ko,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ko(2,e.lens,0,32,qo,0,e.work,{bits:5}),Jo=!1}e.lencode=Ko,e.lenbits=9,e.distcode=qo,e.distbits=5},Zo=(e,t,n,i)=>{let a;const r=e.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Uint8Array(r.wsize)),i>=r.wsize?(r.window.set(t.subarray(n-r.wsize,n),0),r.wnext=0,r.whave=r.wsize):(a=r.wsize-r.wnext,a>i&&(a=i),r.window.set(t.subarray(n-i,n-i+a),r.wnext),(i-=a)?(r.window.set(t.subarray(n-i,n),0),r.wnext=i,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=a))),0};var es=(e,t)=>{let n,i,a,r,o,s,l,d,u,c,h,m,f,p,g,v,y,w,b,k,S,M,E=0;const T=new Uint8Array(4);let P,A;const x=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Bo(e)||!e.output||!e.input&&0!==e.avail_in)return xo;n=e.state,n.mode===Wo&&(n.mode=No),o=e.next_out,a=e.output,l=e.avail_out,r=e.next_in,i=e.input,s=e.avail_in,d=n.hold,u=n.bits,c=s,h=l,M=To;e:for(;;)switch(n.mode){case Do:if(0===n.wrap){n.mode=No;break}for(;u<16;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(2&n.wrap&&35615===d){0===n.wbits&&(n.wbits=15),n.check=0,T[0]=255&d,T[1]=d>>>8&255,n.check=Va(n.check,T,2,0),d=0,u=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&d)<<8)+(d>>8))%31){e.msg="incorrect header check",n.mode=$o;break}if((15&d)!==Io){e.msg="unknown compression method",n.mode=$o;break}if(d>>>=4,u-=4,S=8+(15&d),0===n.wbits&&(n.wbits=S),S>15||S>n.wbits){e.msg="invalid window size",n.mode=$o;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&d?16189:Wo,d=0,u=0;break;case 16181:for(;u<16;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(n.flags=d,(255&n.flags)!==Io){e.msg="unknown compression method",n.mode=$o;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=$o;break}n.head&&(n.head.text=d>>8&1),512&n.flags&&4&n.wrap&&(T[0]=255&d,T[1]=d>>>8&255,n.check=Va(n.check,T,2,0)),d=0,u=0,n.mode=16182;case 16182:for(;u<32;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.head&&(n.head.time=d),512&n.flags&&4&n.wrap&&(T[0]=255&d,T[1]=d>>>8&255,T[2]=d>>>16&255,T[3]=d>>>24&255,n.check=Va(n.check,T,4,0)),d=0,u=0,n.mode=16183;case 16183:for(;u<16;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.head&&(n.head.xflags=255&d,n.head.os=d>>8),512&n.flags&&4&n.wrap&&(T[0]=255&d,T[1]=d>>>8&255,n.check=Va(n.check,T,2,0)),d=0,u=0,n.mode=16184;case 16184:if(1024&n.flags){for(;u<16;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.length=d,n.head&&(n.head.extra_len=d),512&n.flags&&4&n.wrap&&(T[0]=255&d,T[1]=d>>>8&255,n.check=Va(n.check,T,2,0)),d=0,u=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&(m=n.length,m>s&&(m=s),m&&(n.head&&(S=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(i.subarray(r,r+m),S)),512&n.flags&&4&n.wrap&&(n.check=Va(n.check,i,m,r)),s-=m,r+=m,n.length-=m),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===s)break e;m=0;do{S=i[r+m++],n.head&&S&&n.length<65536&&(n.head.name+=String.fromCharCode(S))}while(S&&m<s);if(512&n.flags&&4&n.wrap&&(n.check=Va(n.check,i,m,r)),s-=m,r+=m,S)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===s)break e;m=0;do{S=i[r+m++],n.head&&S&&n.length<65536&&(n.head.comment+=String.fromCharCode(S))}while(S&&m<s);if(512&n.flags&&4&n.wrap&&(n.check=Va(n.check,i,m,r)),s-=m,r+=m,S)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;u<16;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(4&n.wrap&&d!==(65535&n.check)){e.msg="header crc mismatch",n.mode=$o;break}d=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Wo;break;case 16189:for(;u<32;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}e.adler=n.check=Uo(d),d=0,u=0,n.mode=Ro;case Ro:if(0===n.havedict)return e.next_out=o,e.avail_out=l,e.next_in=r,e.avail_in=s,n.hold=d,n.bits=u,Ao;e.adler=n.check=1,n.mode=Wo;case Wo:if(t===Mo||t===Eo)break e;case No:if(n.last){d>>>=7&u,u-=7&u,n.mode=zo;break}for(;u<3;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}switch(n.last=1&d,d>>>=1,u-=1,3&d){case 0:n.mode=16193;break;case 1:if(Qo(n),n.mode=Fo,t===Eo){d>>>=2,u-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=$o}d>>>=2,u-=2;break;case 16193:for(d>>>=7&u,u-=7&u;u<32;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if((65535&d)!=(d>>>16^65535)){e.msg="invalid stored block lengths",n.mode=$o;break}if(n.length=65535&d,d=0,u=0,n.mode=Oo,t===Eo)break e;case Oo:n.mode=16195;case 16195:if(m=n.length,m){if(m>s&&(m=s),m>l&&(m=l),0===m)break e;a.set(i.subarray(r,r+m),o),s-=m,r+=m,l-=m,o+=m,n.length-=m;break}n.mode=Wo;break;case 16196:for(;u<14;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(n.nlen=257+(31&d),d>>>=5,u-=5,n.ndist=1+(31&d),d>>>=5,u-=5,n.ncode=4+(15&d),d>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=$o;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;u<3;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.lens[x[n.have++]]=7&d,d>>>=3,u-=3}for(;n.have<19;)n.lens[x[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,P={bits:n.lenbits},M=ko(0,n.lens,0,19,n.lencode,0,n.work,P),n.lenbits=P.bits,M){e.msg="invalid code lengths set",n.mode=$o;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;E=n.lencode[d&(1<<n.lenbits)-1],g=E>>>24,v=E>>>16&255,y=65535&E,!(g<=u);){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(y<16)d>>>=g,u-=g,n.lens[n.have++]=y;else{if(16===y){for(A=g+2;u<A;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(d>>>=g,u-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=$o;break}S=n.lens[n.have-1],m=3+(3&d),d>>>=2,u-=2}else if(17===y){for(A=g+3;u<A;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}d>>>=g,u-=g,S=0,m=3+(7&d),d>>>=3,u-=3}else{for(A=g+7;u<A;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}d>>>=g,u-=g,S=0,m=11+(127&d),d>>>=7,u-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=$o;break}for(;m--;)n.lens[n.have++]=S}}if(n.mode===$o)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=$o;break}if(n.lenbits=9,P={bits:n.lenbits},M=ko(1,n.lens,0,n.nlen,n.lencode,0,n.work,P),n.lenbits=P.bits,M){e.msg="invalid literal/lengths set",n.mode=$o;break}if(n.distbits=6,n.distcode=n.distdyn,P={bits:n.distbits},M=ko(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,P),n.distbits=P.bits,M){e.msg="invalid distances set",n.mode=$o;break}if(n.mode=Fo,t===Eo)break e;case Fo:n.mode=jo;case jo:if(s>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=r,e.avail_in=s,n.hold=d,n.bits=u,po(e,h),o=e.next_out,a=e.output,l=e.avail_out,r=e.next_in,i=e.input,s=e.avail_in,d=n.hold,u=n.bits,n.mode===Wo&&(n.back=-1);break}for(n.back=0;E=n.lencode[d&(1<<n.lenbits)-1],g=E>>>24,v=E>>>16&255,y=65535&E,!(g<=u);){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(v&&!(240&v)){for(w=g,b=v,k=y;E=n.lencode[k+((d&(1<<w+b)-1)>>w)],g=E>>>24,v=E>>>16&255,y=65535&E,!(w+g<=u);){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}d>>>=w,u-=w,n.back+=w}if(d>>>=g,u-=g,n.back+=g,n.length=y,0===v){n.mode=16205;break}if(32&v){n.back=-1,n.mode=Wo;break}if(64&v){e.msg="invalid literal/length code",n.mode=$o;break}n.extra=15&v,n.mode=16201;case 16201:if(n.extra){for(A=n.extra;u<A;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.length+=d&(1<<n.extra)-1,d>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;E=n.distcode[d&(1<<n.distbits)-1],g=E>>>24,v=E>>>16&255,y=65535&E,!(g<=u);){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(!(240&v)){for(w=g,b=v,k=y;E=n.distcode[k+((d&(1<<w+b)-1)>>w)],g=E>>>24,v=E>>>16&255,y=65535&E,!(w+g<=u);){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}d>>>=w,u-=w,n.back+=w}if(d>>>=g,u-=g,n.back+=g,64&v){e.msg="invalid distance code",n.mode=$o;break}n.offset=y,n.extra=15&v,n.mode=16203;case 16203:if(n.extra){for(A=n.extra;u<A;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.offset+=d&(1<<n.extra)-1,d>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=$o;break}n.mode=16204;case 16204:if(0===l)break e;if(m=h-l,n.offset>m){if(m=n.offset-m,m>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=$o;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),p=n.window}else p=a,f=o-n.offset,m=n.length;m>l&&(m=l),l-=m,n.length-=m;do{a[o++]=p[f++]}while(--m);0===n.length&&(n.mode=jo);break;case 16205:if(0===l)break e;a[o++]=n.length,l--,n.mode=jo;break;case zo:if(n.wrap){for(;u<32;){if(0===s)break e;s--,d|=i[r++]<<u,u+=8}if(h-=l,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=n.flags?Va(n.check,a,h,o-h):Xa(n.check,a,h,o-h)),h=l,4&n.wrap&&(n.flags?d:Uo(d))!==n.check){e.msg="incorrect data check",n.mode=$o;break}d=0,u=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;u<32;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(4&n.wrap&&d!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=$o;break}d=0,u=0}n.mode=16208;case 16208:M=Po;break e;case $o:M=_o;break e;case 16210:return Co;default:return xo}return e.next_out=o,e.avail_out=l,e.next_in=r,e.avail_in=s,n.hold=d,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<$o&&(n.mode<zo||t!==So))&&Zo(e,e.output,e.next_out,h-e.avail_out),c-=e.avail_in,h-=e.avail_out,e.total_in+=c,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=n.flags?Va(n.check,a,h,e.next_out-h):Xa(n.check,a,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Wo?128:0)+(n.mode===Fo||n.mode===Oo?256:0),(0===c&&0===h||t===So)&&M===To&&(M=Lo),M},ts={inflateReset:Xo,inflateReset2:Yo,inflateResetKeep:Go,inflateInit:e=>Vo(e,15),inflateInit2:Vo,inflate:es,inflateEnd:e=>{if(Bo(e))return xo;let t=e.state;return t.window&&(t.window=null),e.state=null,To},inflateGetHeader:(e,t)=>{if(Bo(e))return xo;const n=e.state;return 2&n.wrap?(n.head=t,t.done=!1,To):xo},inflateSetDictionary:(e,t)=>{const n=t.length;let i,a,r;return Bo(e)?xo:(i=e.state,0!==i.wrap&&i.mode!==Ro?xo:i.mode===Ro&&(a=1,a=Xa(a,t,n,0),a!==i.check)?_o:(r=Zo(e,t,n,n),r?(i.mode=16210,Co):(i.havedict=1,To)))},inflateInfo:"pako inflate (from Nodeca project)"};var ns=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const is=Object.prototype.toString,{Z_NO_FLUSH:as,Z_FINISH:rs,Z_OK:os,Z_STREAM_END:ss,Z_NEED_DICT:ls,Z_STREAM_ERROR:ds,Z_DATA_ERROR:us,Z_MEM_ERROR:cs}=qa;function hs(e){this.options=Jr.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new to,this.strm.avail_out=0;let n=ts.inflateInit2(this.strm,t.windowBits);if(n!==os)throw new Error(Ka[n]);if(this.header=new ns,ts.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=eo.string2buf(t.dictionary):"[object ArrayBuffer]"===is.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ts.inflateSetDictionary(this.strm,t.dictionary),n!==os)))throw new Error(Ka[n])}function ms(e,t){const n=new hs(t);if(n.push(e),n.err)throw n.msg||Ka[n.err];return n.result}hs.prototype.push=function(e,t){const n=this.strm,i=this.options.chunkSize,a=this.options.dictionary;let r,o,s;if(this.ended)return!1;for(o=t===~~t?t:!0===t?rs:as,"[object ArrayBuffer]"===is.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(i),n.next_out=0,n.avail_out=i),r=ts.inflate(n,o),r===ls&&a&&(r=ts.inflateSetDictionary(n,a),r===os?r=ts.inflate(n,o):r===us&&(r=ls));n.avail_in>0&&r===ss&&n.state.wrap>0&&0!==e[n.next_in];)ts.inflateReset(n),r=ts.inflate(n,o);switch(r){case ds:case us:case ls:case cs:return this.onEnd(r),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(0===n.avail_out||r===ss))if("string"===this.options.to){let e=eo.utf8border(n.output,n.next_out),t=n.next_out-e,a=eo.buf2string(n.output,e);n.next_out=t,n.avail_out=i-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(a)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(r!==os||0!==s){if(r===ss)return r=ts.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},hs.prototype.onData=function(e){this.chunks.push(e)},hs.prototype.onEnd=function(e){e===os&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Jr.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var fs={Inflate:hs,inflate:ms,inflateRaw:function(e,t){return(t=t||{}).raw=!0,ms(e,t)},ungzip:ms,constants:qa};const{Inflate:ps,inflate:gs,inflateRaw:vs,ungzip:ys}=fs;var ws=ys;const bs=e=>{let t;if(e?.includes(re))t=ie;else{const n=e?.find((e=>e.includes(ae)));t=n?n.split("=")[1]:ne}return t=t.replace(/\/$/,""),t+"/"+te},ks=e=>{const t=ji.getAppConfig(I)||ji.getAppConfig(F);return t?.capabilities?.includes(e)??!1},Ss=e=>{const t=!ks(m.THIRD_PARTY_TRANSACTIONS);return e&&!t&&We.info(`[${e}] Your plan does not have purchase management features.`),t};function Ms(e){try{const t=function(e){if("undefined"!=typeof Buffer)return new Uint8Array(Buffer.from(e,"base64"));const t=atob(e),n=t.length,i=new Uint8Array(n);for(let e=0;e<n;e++)i[e]=t.charCodeAt(e);return i}(e.trim()),n=ws(t),i=(new TextDecoder).decode(n);return JSON.parse(i)}catch{return}}function Es(e,t,n){const i=n.value;return n.value=function(...e){if(!this.platformID)throw new Bi;return i.apply(this,e)},n}function Ts(e,t,n){const i=n.value;return n.value=function(...e){const t=ji.getDevice();if(!t?.id)throw new Gi;return i.apply(this,e)},n}class Ps{get deviceID(){return ji.getDevice()?.id}constructor(){const e=ji.getNamiConfig();!this.platformID&&e&&this.configure(e)}static configure(e){this.instance.configure(e)}configure(e){this.baseURL=bs(e.namiCommands),this.platformID=e.appPlatformID}async login(e){if(!e)throw new Xi;const t=`device/${this.deviceID}/login/`,n={external_id:e};return await this.requestBodyAPI(t,n,"PUT")}async logout(){const e=`device/${this.deviceID}/logout/`;return await this.requestBodyAPI(e,{},"PUT")}async startSession(e){const t=`device/${this.deviceID}/session/`,n=await this.requestBodyAPI(t,{start_time:e,app_env:"production"});ji.setSessionCounter(),n.id&&ji.setSessionId(n.id)}async postImpression(e){const t=`device/${this.deviceID}/impression/`,n=await this.requestBodyAPI(t,e,"POST",!0);n.id&&ji.setLastImpressionId(n.id)}async postConversion(e){const t=`device/${this.deviceID}/transaction/`;await this.requestBodyAPI(t,e,"POST",!0)}async purchaseValidation(e){const t=`device/${this.deviceID}/purchase_event/`;await this.requestBodyAPI(t,e,"PUT")}async fetchAPI(e,t,n){const i=`${this.baseURL}/${this.platformID}/`+e;return await aa(i,void 0,t,n)}async requestBodyAPI(e,t,n="POST",i=!1,a,r){const o=`${this.baseURL}/${this.platformID}/`+e,s={method:n,headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:i};return await aa(o,s,a,r)}}function As(e){return null!=e?.flow}var xs;Ps.instance=new Ps,c([Ts],Ps.prototype,"login",null),c([Ts],Ps.prototype,"logout",null),c([Ts],Ps.prototype,"startSession",null),c([Ts],Ps.prototype,"postImpression",null),c([Ts],Ps.prototype,"postConversion",null),c([Ts],Ps.prototype,"purchaseValidation",null),c([Es],Ps.prototype,"fetchAPI",null),c([Es],Ps.prototype,"requestBodyAPI",null),function(e){e.DEFAULT="default",e.LABEL="label",e.UNKNOWN="unknown",e.URL="url"}(xs||(xs={}));const _s=()=>ji.getPaywalls(z)??[],Cs=()=>ji.getPaywalls(R)??[],Ls=()=>Fi(Ne([...Cs(),..._s()]),"id"),Is=e=>Ls().find((t=>t.id===e)),Ds=e=>{const t=Ls(),n=new Set(t.map((e=>e.id)));return e.every((e=>n.has(e)))};function Rs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ws,Ns={exports:{}};var Os=(Ws||(Ws=1,Ns.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var i=n(18),a=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,i){void 0===i&&(i=!1);var a=e.getVersionPrecision(t),r=e.getVersionPrecision(n),o=Math.max(a,r),s=0,l=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),i=t+new Array(n+1).join(".0");return e.map(i.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(i&&(s=o-Math.min(a,r)),o-=1;o>=s;){if(l[0][o]>l[1][o])return 1;if(l[0][o]===l[1][o]){if(o===s)return 0;o-=1}else if(l[0][o]<l[1][o])return-1}},e.map=function(e,t){var n,i=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)i.push(t(e[n]));return i},e.find=function(e,t){var n,i;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,i=e.length;n<i;n+=1){var a=e[n];if(t(a,n))return a}},e.assign=function(e){for(var t,n,i=e,a=arguments.length,r=new Array(a>1?a-1:0),o=1;o<a;o++)r[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(r));var s=function(){var e=r[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){i[t]=e[t]}))};for(t=0,n=r.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return i.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return i.BROWSER_MAP[e]||""},e}();t.default=a,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(91))&&i.__esModule?i:{default:i},r=n(18);function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var s=function(){function e(){}var t,n,i;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new a.default(e,t)},e.parse=function(e){return new a.default(e).getResult()},t=e,i=[{key:"BROWSER_MAP",get:function(){return r.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return r.ENGINE_MAP}},{key:"OS_MAP",get:function(){return r.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return r.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),i&&o(t,i),e}();t.default=s,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var i=l(n(92)),a=l(n(93)),r=l(n(94)),o=l(n(95)),s=l(n(17));function l(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},i=0,a={},r=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(a[t]=o,r+=1):"object"==typeof o&&(n[t]=o,i+=1)})),i>0){var o=Object.keys(n),l=s.default.find(o,(function(e){return t.isOS(e)}));if(l){var d=this.satisfies(n[l]);if(void 0!==d)return d}var u=s.default.find(o,(function(e){return t.isPlatform(e)}));if(u){var c=this.satisfies(n[u]);if(void 0!==c)return c}}if(r>0){var h=Object.keys(a),m=s.default.find(h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==m)return this.compareVersion(a[m])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),i=e.toLowerCase(),a=s.default.getBrowserTypeByAlias(i);return t&&a&&(i=a.toLowerCase()),i===n},t.compareVersion=function(e){var t=[0],n=e,i=!1,a=this.getBrowserVersion();if("string"==typeof a)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(i=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(i=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(a,n,i))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=d,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(17))&&i.__esModule?i:{default:i},r=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=a.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=a.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=a.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=a.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=a.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=a.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=a.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=a.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=a.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=a.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=a.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=a.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=a.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=a.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=a.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=a.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=a.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=a.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=a.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=a.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=a.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=a.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=a.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=a.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=a.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=a.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=a.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:a.default.getFirstMatch(t,e),version:a.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(17))&&i.__esModule?i:{default:i},r=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=a.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:r.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=a.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=a.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=a.default.getWindowsVersionName(t);return{name:r.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:r.OS_MAP.iOS},n=a.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=a.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=a.default.getMacOSVersionName(t),i={name:r.OS_MAP.MacOS,version:t};return n&&(i.versionName=n),i}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=a.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:r.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=a.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=a.default.getAndroidVersionName(t),i={name:r.OS_MAP.Android,version:t};return n&&(i.versionName=n),i}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=a.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:r.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=a.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||a.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||a.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:r.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=a.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=a.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:r.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:r.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=a.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(17))&&i.__esModule?i:{default:i},r=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=a.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:r.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=a.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:r.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:r.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(17))&&i.__esModule?i:{default:i},r=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:r.ENGINE_MAP.Blink};var t=a.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:r.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:r.ENGINE_MAP.Trident},n=a.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:r.ENGINE_MAP.Presto},n=a.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:r.ENGINE_MAP.Gecko},n=a.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:r.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:r.ENGINE_MAP.WebKit},n=a.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})),Ns.exports),Fs=Rs(Os);const js={tablet:"tablet",mobile:"phone",tv:"television",desktop:"desktop"},zs=e=>{if("undefined"==typeof window)return{os_version:"X.X.X",os_name:"Server",browser_name:"Unknown",browser_version:"X.X.X",sdk_client:"web",sdk_version:f,language:"en"};const t=Fs.getParser(window.navigator.userAgent),n=t.getPlatform(),i={os_version:t.getOSVersion(),os_name:t.getOSName(),browser_name:t.getBrowserName(),browser_version:t.getBrowserVersion(),sdk_client:"web",sdk_version:f,language:window.navigator.language};if(n.type&&(i.form_factor=js[n.type]),n.model&&(i.device_model=n.model),e&&e.length>0){const t=(e=>{const t=e.find((e=>e.includes(oe))),n={platform:"",version:""};if(t){const e=t.split(se);n.platform=e[1],n.version=e[2]}return n})(e);i.extended_platform=t.platform,i.extended_platform_version=t.version}return i},$s=()=>{const e=ji.getNamiConfig();if(e?.formFactor)return e.formFactor;if("undefined"==typeof window)return js.desktop;const t=Fs.getParser(window.navigator.userAgent).getPlatform();return t.type?js[t.type]:js.desktop},Us={"1280x720":.67,"1920x1080":1,"3840x2160":2,"7680x4320":4};const Hs=()=>{const{innerWidth:e,innerHeight:t}=window;return Math.min(e/1920,t/1080)||1};function Bs(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function Gs(e){try{const t=BigInt("0xffffffffffffffffffffffffffffffff"),n=function(e){const t=e.replace(/-/g,"");return BigInt("0x"+t)}(e);return Number(n)/Number(t)*100}catch(t){throw We.error(`Error calculating audience split position for UUID ${e}`,t),new Error(`Invalid UUID format: ${e}`)}}const Xs=e=>{try{return Boolean(new URL(e))}catch{return!1}},Ys=(e,t,n)=>e?e.flatMap((e=>{let i;if(i="string"==typeof n?e.segments.filter((e=>e.form_factors.some((e=>e.form_factor===n)))):e.segments,0===i.length)return[];const a=((e,t)=>{const n=[...e].sort(((e,t)=>e.split-t.split));for(const e of n)if(t<=e.split)return e;return n[n.length-1]})(i,t);return{form_factors:a.form_factors,paywall:a.paywall,flow:a.flow,segment:a.segment,split:a.split,conversion_event_type:a.conversion_event_type,conversion_event_url:a.conversion_event_url,rule:e.rule,name:e.name,type:e.type,value:e.value,external_segment:e.external_segment}})):[],Vs=()=>{const e=ji.getCampaignRules(D)??[],t=ji.getCampaignRules(j)??[],n=$s(),i=Ne([...e,...t]).filter((e=>e.form_factors?.some((e=>e.form_factor===n))));return Fi(i,"rule")},Ks=e=>{const t=ji.getCampaignRules(e)??[],n=$s();return Ne(t).filter((e=>e.form_factors?.some((e=>e.form_factor===n))))},qs=()=>Ks(j),Js=()=>Ks(D),Qs=(e,t,n,i)=>{const a=e().find((e=>i?e.type==i&&e.value==n:e.type==xs.DEFAULT));if(!a)return{};const r=t().find((e=>a?.paywall===e.id));return{campaign:a,paywall:r}},Zs=(e,t)=>{const n=Qs(Js,Cs,e,t);if(n.campaign&&n.paywall)return{campaign:n.campaign,paywall:n.paywall};const i=Qs(qs,_s,e,t);return i.campaign&&i.paywall?{campaign:i.campaign,paywall:i.paywall}:n.campaign||n.paywall?{campaign:n.campaign,paywall:n.paywall}:{campaign:i.campaign,paywall:i.paywall}};var el,tl="object"==typeof Reflect?Reflect:null,nl=tl&&"function"==typeof tl.apply?tl.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};el=tl&&"function"==typeof tl.ownKeys?tl.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var il=Number.isNaN||function(e){return e!=e};function al(){al.init.call(this)}al.EventEmitter=al,al.prototype._events=void 0,al.prototype._eventsCount=0,al.prototype._maxListeners=void 0;var rl=10;function ol(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function sl(e){return void 0===e._maxListeners?al.defaultMaxListeners:e._maxListeners}function ll(e,t,n,i){var a,r,o,s;if(ol(n),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),r=e._events),o=r[t]),void 0===o)o=r[t]=n,++e._eventsCount;else if("function"==typeof o?o=r[t]=i?[n,o]:[o,n]:i?o.unshift(n):o.push(n),(a=sl(e))>0&&o.length>a&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,s=l,console&&console.warn&&console.warn(s)}return e}function dl(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function ul(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=dl.bind(i);return a.listener=n,i.wrapFn=a,a}function cl(e,t,n){var i=e._events;if(void 0===i)return[];var a=i[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(a):ml(a,a.length)}function hl(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function ml(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}Object.defineProperty(al,"defaultMaxListeners",{enumerable:!0,get:function(){return rl},set:function(e){if("number"!=typeof e||e<0||il(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");rl=e}}),al.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},al.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||il(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},al.prototype.getMaxListeners=function(){return sl(this)},al.prototype.emit=function(e){var t=[];for(let e=1;e<arguments.length;e++)t.push(arguments[e]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var r=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw r.context=a,r}var o=i[e];if(void 0===o)return!1;if("function"==typeof o)nl(o,this,t);else{var s=o.length,l=ml(o,s);for(let e=0;e<s;++e)nl(l[e],this,t)}return!0},al.prototype.addListener=function(e,t){return ll(this,e,t,!1)},al.prototype.on=al.prototype.addListener,al.prototype.prependListener=function(e,t){return ll(this,e,t,!0)},al.prototype.once=function(e,t){return ol(t),this.on(e,ul(this,e,t)),this},al.prototype.prependOnceListener=function(e,t){return ol(t),this.prependListener(e,ul(this,e,t)),this},al.prototype.removeListener=function(e,t){var n,i,a,r,o;if(ol(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(a=-1,r=n.length-1;r>=0;r--)if(n[r]===t||n[r].listener===t){o=n[r].listener,a=r;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,o||t)}return this},al.prototype.off=al.prototype.removeListener,al.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var a,r=Object.keys(n);for(i=0;i<r.length;++i)"removeListener"!==(a=r[i])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},al.prototype.listeners=function(e){return cl(this,e,!0)},al.prototype.rawListeners=function(e){return cl(this,e,!1)},al.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):hl.call(e,t)},al.prototype.listenerCount=hl,al.prototype.eventNames=function(){return this._eventsCount>0?el(this._events):[]};class fl{constructor(){this.emitter=new al}static getInstance(){return this.instance||(this.instance=new fl),this.instance}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}emit(e,...t){this.emitter.emit(e,...t)}addListener(e,t){this.emitter.addListener(e,t)}removeListener(e,t){this.emitter.removeListener(e,t)}removeAllListeners(e){e?this.emitter.removeAllListeners(e):this.emitter.removeAllListeners()}listeners(e){return this.emitter.listeners(e)}listenerCount(e){return this.emitter.listenerCount(e)}}class pl{constructor(e){this.currentFormFactor=e}async fetchCampaignRules(e){const t=ji.getDevice();let n;return n=t?.id?await this.getCampaigns(t.id):await this.getAnonymousCampaigns(),n=n?.filter((e=>e.paywall&&e.form_factors.some((e=>e.form_factor===this.currentFormFactor))||e.flow&&e.flow?.object?.form_factors?.some((e=>e.form_factor===this.currentFormFactor)))),n=n?.filter((t=>{if(t.paywall){const n=e.find((e=>e.id==t.paywall));if(n)return t}else if(t.flow)return t})),ji.setCampaignRules(D,n),this.invokeAvailableCampaignsResponseHandler(),n}invokeAvailableCampaignsResponseHandler(e){fl.getInstance().listeners(Me).forEach((t=>{t(e??Vs())}))}async getAnonymousCampaigns(e=f){const t=`campaign_rules/?sdk_version=${e}`;try{const e=await Ps.instance.fetchAPI(t);return Ys(e.results??[],this.splitPosition,this.currentFormFactor)}catch(e){const n=this.fallbackData();if(!n)throw We.error(ia(e.status,t)),e;return n.results}}async getCampaigns(e){const t=`device/${e}/campaign_rules/`;let n;try{n=await Ps.instance.fetchAPI(t)}catch(e){if(n=this.fallbackData(),!n)throw We.error(ia(e.status,t)),e}return n?.results||[]}fallbackData(){const e=ji.getCampaignRules(D)||ji.getCampaignRules(j);return e?{count:e.length,results:e}:null}}function gl(e,t){return ni(e,t)}pl.instance=new pl($s());class vl{async createOrUpdateDevice(e){const t=ji.getDevice();if(!t?.id){const t={...e,id:this.getAnonymousUUID()??Bs()};return this.createDevice(t)}return this.isEqualDevices(t,e)?t:this.updateDevice(t.id,e)}async createDevice(e){try{const t=0,n=await this.requestAPIData("device/",e,void 0,void 0,t);return n&&ji.setDevice(n),n}catch(e){if(e instanceof zi)return ji.setAnonymousMode(!0),null;throw e}}async updateDevice(e,t){const n=await this.requestAPIData(`device/${e}/`,t,"PUT");return n&&ji.setDevice(n),n}async updateDeviceField(e,t){const n={[e]:t},i=ji.getDevice();if(!i?.id)throw new Gi;const a=await this.requestAPIData(`device/${i.id}/`,n,"PATCH");return a&&ji.setDevice(a),a}async requestAPIData(e,t,n="POST",i=fe,a){let r;try{r=await Ps.instance.requestBodyAPI(e,t,n,!1,i,a)}catch(t){if(t instanceof Bi)throw t;if("device/"===e&&t instanceof zi)throw t;if(r=ji.getDevice(),!r)return We.error(ia(t.status,e)),null}return r}isEqualDevices(e,t){const n={...e,...t};return gl(Object.keys(e).reduce(((e,t)=>(e[t]=n[t],e)),{}),e)}getOrCreateAnonymousUUID(){let e=ji.getAnonymousUUID();return e||(e=Bs(),ji.setAnonymousUUID(e)),e}getAnonymousUUID(){const e=ji.getAnonymousUUID();return e?(ji.clearAnonymousUUID(),e):null}}vl.instance=new vl;class yl{async fetchProducts(){if(ks(m.THIRD_PARTY_TRANSACTIONS))return[];let e;try{e=await Ps.instance.fetchAPI("products/")}catch(t){if(e=this.fallbackData(),!e)throw We.error(ia(t.status,"products/")),t}return e?.results&&ji.setProducts(W,e.results),e?.results||[]}fallbackData(){const e=ji.getProducts(W)||ji.getProducts($);return e?{count:e.length,results:e}:null}}yl.instance=new yl;class wl{async fetchPaywalls(){const e=ji.getDevice();let t;return t=e?.id?await this.getPaywalls(e.id):await this.getAnonymousPaywalls(),t&&ji.setPaywalls(R,t),t}async getAnonymousPaywalls(e=f){const t=`paywalls/?sdk_version=${e}`;let n=null;try{n=await Ps.instance.fetchAPI(t)}catch(e){if(n=this.fallbackData(),!n)throw We.error(ia(e.status,t)),e}return n?.results||[]}async getPaywalls(e){const t=`device/${e}/paywalls/`;let n;try{n=await Ps.instance.fetchAPI(t)}catch(e){if(n=this.fallbackData(),!n)throw We.error(ia(e.status,t)),e}return n?.results||[]}fallbackData(){const e=ji.getPaywalls(R)||ji.getPaywalls(z);return e?{count:e.length,results:e}:null}}wl.instance=new wl;class bl{async fetchConfig(){let e;try{e=await Ps.instance.fetchAPI("config/")}catch(t){if(e=ji.getAppConfig(I)||ji.getAppConfig(F),!e)throw We.error(ia(t.status,"config/")),t}return e&&ji.setAppConfig(I,e),e}}bl.instance=new bl;class kl{async startSession(){if(ji.getAnonymousMode())We.debug("Skipping session start call - anonymous mode");else try{await Ps.instance.startSession(new Date)}catch(e){We.error("error on start session: ",e)}}}kl.instance=new kl;const Sl=e=>"subscription"===e;function Ml(e){const t=function(e){if(!e)return[];const t=e.offers.filter((e=>"promo"===e.offer_type));return Tl(t,e.subscription_period)}(e).find((e=>0===e.priceAmountMicros));return t?.billingPeriod||null}function El(e){if(!e)return[];return Tl(e.offers.filter((e=>"default"===e.offer_type)),e.subscription_period)}function Tl(e,t){return e.map((e=>Pl(e,t)))}function Pl(e,t){if(!e)return{};const n=e.promo_period?.count??t?.count,i=e.promo_period?.type??t?.type,a=e.promo_price?.price??e.price,r=e.promo_price?.currency??e.currency;return{priceAmountMicros:1e6*a,priceCurrencyCode:r,billingPeriod:i?`P${n}${i[0].toUpperCase()}`:"",formattedPrice:xl(r).format(a)}}function Al(e,t=!1,n=!1,i=!1){if(!e)return null;const a=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!a)return null;const[r,o,s,l]=a.slice(1).map((e=>parseInt(e))),d=(e,t,n,i,a,r)=>i?e.toString():n?1===e||t?a:r:1===e||t?`${e} ${a}`:`${e} ${r}`;switch(e.at(-1)){case"D":return d(l,t,n,i,"day","days");case"W":return d(s,t,n,i,"week","weeks");case"M":return d(o,t,n,i,"month","months");case"Y":return d(r,t,n,i,"year","years")}return null}function xl(e){const t={maximumFractionDigits:2,minimumFractionDigits:0};try{return new Intl.NumberFormat(navigator.language,{...t,style:"currency",currency:e})}catch{return new Intl.NumberFormat(navigator.language,{...t,style:"currency",currency:"USD"})}}const _l=(e,t,n)=>e&&t&&n?n.format(e-t):null,Cl=(e,t,n,i)=>{if(e&&t&&n&&i){const a=100*(1-e/(n/i*t));return`${Math.round(a)}%`}return null},Ll=(e,t)=>{if(""==t)return;const n=parseInt(t)-1;return n>=0&&n<e?.length?e[n]:e?.find((e=>e.sku_ref_id===t))},Il=e=>Rl(e.priceAmountMicros)/Dl(e.billingPeriod),Dl=e=>{let t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},Rl=e=>e/1e6;function Wl(e){return parseFloat((Math.round(e)/100).toFixed(2))}const Nl=(e,t,n,i=[])=>{if(!t)return null;const a={price:()=>Ol(t),name:()=>t?.name,title:()=>t?.name,description:()=>t?.description,duration:()=>Fl(t),durationSingular:()=>Fl(t,!0),period:()=>Fl(t,!1,!0),periodNumber:()=>Fl(t,!1,!1,!0),freeTrialDuration:()=>jl(t),freeTrialDurationSingular:()=>jl(t,!0),freeTrialPeriod:()=>jl(t,!1,!0),freeTrialPeriodNumber:()=>jl(t,!1,!1,!0),pricePerMonth:()=>zl(t),pricePerMonthRounded:()=>zl(t,!0),periodInMonths:()=>$l(t),durationInMonths:()=>Ul(t),durationInMonthsSingular:()=>Ul(t,!0),periodNumberInMonths:()=>Hl(t),percentagePriceDifferenceFromSku:()=>Bl(t,n,i),priceDifferenceFromSku:()=>Gl(t,n,i),promoEligible:()=>null===Xl(t)&&null!==Yl(t,n),freeTrialEligible:()=>null!==Xl(t),promo:()=>Yl(t,n)?.offer_ref_id,promoCode:()=>"XXXXX",promoPrice:()=>Vl(t,n)?.formattedPrice,promoPeriod:()=>Kl(t,n,!1,!0),promoPeriodNumber:()=>Kl(t,n,!1,!1,!0),promoDuration:()=>Kl(t,n),promoDurationSingular:()=>Kl(t,n,!0),introEligible:()=>!1,pricePerDay:()=>ql(t),pricePerWeek:()=>Jl(t),pricePerWeekRounded:()=>Jl(t,!0),introductoryPrice:()=>Ql(t,n),introductoryPeriod:()=>Zl(t,n,!1,!0),introductoryPeriodNumber:()=>Zl(t,n,!1,!1,!0),introductoryDuration:()=>Zl(t,n),introductoryDurationSingular:()=>Zl(t,n,!0),introductoryPricePerMonth:()=>ed(t,n),introductoryPricePerMonthRounded:()=>ed(t,n,!0),invalid:()=>!1,unavailable:()=>!1};return a[e]?a[e]():null},Ol=e=>{const t=El(e);return t&&t.length?t[0].formattedPrice:null},Fl=(e,t,n,i)=>Al(function(e){if(Sl(e?.product_type)){const t=El(e);if(t.length>0)return t[0].billingPeriod}return null}(e),t,n,i),jl=(e,t,n,i)=>Al(Ml(e),t,n,i),zl=(e,t)=>{const n=El(e);if(!n||0===n.length)return null;const i=Il(n[0]);return i?xl(n[0].priceCurrencyCode).format(t?Math.round(i):i):null},$l=e=>{const t=El(e);return"P1Y"===t[0].billingPeriod&&(t[0].billingPeriod="P12M"),t&&t.length?Al(t[0].billingPeriod):null},Ul=(e,t,n,i)=>{const a=El(e);return a&&0!==a.length?("P1Y"===a[0].billingPeriod&&(a[0].billingPeriod="P12M"),Al(a[0].billingPeriod,t,n,i)):null},Hl=e=>{if(!e)return 0;const t=El(e);return t&&t.length?Dl(t[0].billingPeriod):0},Bl=(e,t,n=[])=>{const i=El(e);if(!i||0===i.length)return null;const a=Ll(n,t??"")?.product_details;if(!t||!a)return Cl(Wl(i[0].priceAmountMicros),Hl(e));const r=El(a);return Cl(Wl(i[0].priceAmountMicros),Hl(e),r?.length>0?Wl(r[0].priceAmountMicros):0,Hl(a))},Gl=(e,t,n=[])=>{const i=El(e);if(!i||0===i.length)return null;const a=Ll(n,t??"")?.product_details;if(!t||!a)return _l(Il(i[0]));const r=El(a);return _l(Il(i[0]),Il(r[0]),xl(r[0].priceCurrencyCode))},Xl=e=>Ml(e),Yl=(e,t)=>{if(!e)return null;const n=e.offers.filter((e=>"promo"===e.offer_type));if(!t)return n[0]||null;const i=n[parseInt(t)];return i?i||null:n.find((e=>e.offer_ref_id===t))||null},Vl=(e,t)=>{if(!e)return null;return Pl(Yl(e,t),e.subscription_period)},Kl=(e,t,n,i,a)=>{const r=Vl(e,t);return Al(r?.billingPeriod||null,n,i,a)},ql=(e,t)=>{const n=El(e);if(!n||0===n.length)return null;const i=Rl(n[0].priceAmountMicros)/(e=>{const t=Dl(e);return t?30.437*t:1})(n[0].billingPeriod);return i?xl(n[0].priceCurrencyCode).format(i):null},Jl=(e,t)=>{const n=El(e);if(!n||0===n.length)return null;const i=Rl(n[0].priceAmountMicros)/(e=>{const t=Dl(e);return t?52*t/12:1})(n[0].billingPeriod);return i?xl(n[0].priceCurrencyCode).format(t?Math.round(i):i):null},Ql=(e,t)=>{const n=td(e,t);return n?.formattedPrice||null},Zl=(e,t,n,i,a)=>{const r=td(e,t);return Al(r?.billingPeriod||null,n,i,a)},ed=(e,t,n)=>{const i=td(e,t);if(!i)return;const a=Rl(i.priceAmountMicros),r=Dl(i.billingPeriod),o=n?Math.round(a/r):a/r;return xl(i.priceCurrencyCode).format(o)},td=(e,t)=>{if(!e)return null;let n;return t?(n=e.offers[parseInt(t)],n||(n=e.offers.find((e=>e.offer_ref_id===t))||null)):n=e.offers[0],Pl(n,e.subscription_period)};function nd(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:function(e,t,n){var i=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(a);++i<a;)r[i]=e[i+t];return r}(e,t,n)}var id=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function ad(e){return id.test(e)}var rd="\\ud800-\\udfff",od="["+rd+"]",sd="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ld="\\ud83c[\\udffb-\\udfff]",dd="[^"+rd+"]",ud="(?:\\ud83c[\\udde6-\\uddff]){2}",cd="[\\ud800-\\udbff][\\udc00-\\udfff]",hd="(?:"+sd+"|"+ld+")"+"?",md="[\\ufe0e\\ufe0f]?",fd=md+hd+("(?:\\u200d(?:"+[dd,ud,cd].join("|")+")"+md+hd+")*"),pd="(?:"+[dd+sd+"?",sd,ud,cd,od].join("|")+")",gd=RegExp(ld+"(?="+ld+")|"+pd+fd,"g");function vd(e){return ad(e)?function(e){return e.match(gd)||[]}(e):function(e){return e.split("")}(e)}var yd,wd=(yd="toUpperCase",function(e){var t=ad(e=Si(e))?vd(e):void 0,n=t?t[0]:e.charAt(0),i=t?nd(t,1).join(""):e.slice(1);return n[yd]()+i});var bd,kd=(bd={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},function(e){return null==bd?void 0:bd[e]}),Sd=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Md=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Ed=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Td=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Pd="\\ud800-\\udfff",Ad="\\u2700-\\u27bf",xd="a-z\\xdf-\\xf6\\xf8-\\xff",_d="A-Z\\xc0-\\xd6\\xd8-\\xde",Cd="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ld="["+Cd+"]",Id="\\d+",Dd="["+Ad+"]",Rd="["+xd+"]",Wd="[^"+Pd+Cd+Id+Ad+xd+_d+"]",Nd="(?:\\ud83c[\\udde6-\\uddff]){2}",Od="[\\ud800-\\udbff][\\udc00-\\udfff]",Fd="["+_d+"]",jd="(?:"+Rd+"|"+Wd+")",zd="(?:"+Fd+"|"+Wd+")",$d="(?:['’](?:d|ll|m|re|s|t|ve))?",Ud="(?:['’](?:D|LL|M|RE|S|T|VE))?",Hd="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Bd="[\\ufe0e\\ufe0f]?",Gd=Bd+Hd+("(?:\\u200d(?:"+["[^"+Pd+"]",Nd,Od].join("|")+")"+Bd+Hd+")*"),Xd="(?:"+[Dd,Nd,Od].join("|")+")"+Gd,Yd=RegExp([Fd+"?"+Rd+"+"+$d+"(?="+[Ld,Fd,"$"].join("|")+")",zd+"+"+Ud+"(?="+[Ld,Fd+jd,"$"].join("|")+")",Fd+"?"+jd+"+"+$d,Fd+"+"+Ud,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Id,Xd].join("|"),"g");function Vd(e,t,n){return e=Si(e),void 0===t?function(e){return Td.test(e)}(e)?function(e){return e.match(Yd)||[]}(e):function(e){return e.match(Ed)||[]}(e):e.match(t)||[]}var Kd=RegExp("['’]","g");var qd,Jd=(qd=function(e,t,n){return t=t.toLowerCase(),e+(n?wd(Si(t).toLowerCase()):t)},function(e){return function(e,t,n){for(var i=-1,a=null==e?0:e.length;++i<a;)n=t(n,e[i],i,e);return n}(Vd(function(e){return(e=Si(e))&&e.replace(Sd,kd).replace(Md,"")}(e).replace(Kd,"")),qd,"")});function Qd(e,t,n){const i=t?.find((e=>n===e.id))?.products||[];return i.map((t=>{t.product_details=iu(e,t.sku_ref_id||"")})),i.forEach((e=>{Zd(e.product_details,e,i)})),i||[]}function Zd(e,t,n){if(!t)return{};const i=t.variables;return i?(Object.keys(i).forEach((t=>{if("string"==typeof(a=i[t])&&a.includes(Ce)){const a=tu(i[t],e,n);i[t]=function(e){if(!e||null==e)return"";if(e.includes("null")||e.includes("undefined"))return"";if(/\$\{\s*(launch\.customAttributes\.|sku\.)\w+\s*}/.test(e))return"";return e}(a)}var a})),{...t,...i}):{...t}}function eu(e,t,n){return t?(Object.keys(t).forEach((i=>{"string"==typeof t[i]&&t[i].includes(Ce)&&(t[i]=t[Jd(i)]=tu(t[i],e,n))})),{...t}):{}}const tu=(e,t,n)=>e.replace(Ae,((i,a)=>{const r=Ae.exec(e)?.slice(1)||[];a=r[0]??a;const o=r[1]?.replace(":","")??"";return Nl(a,t,o,n)}));function nu(e,t,n){return au(t,n)?.some((t=>1==Nl("freeTrialEligible",iu(e,t.sku_ref_id))))??!1}function iu(e=[],t){return e.find((e=>e.product_ref_id===t))||null}function au(e,t){const n=e?.filter((e=>t?.some((t=>t===e.ref))));return n?.filter((t=>e.find((e=>e.id===t.id))))?.map((e=>e.products))[0]}function ru(e){return!e||"object"==typeof e&&0==Object.keys(e).length}const ou={paywallId:"",livePaywalls:[],selectedPaywall:void 0,selectedCampaign:void 0,campaignRules:[],anySkuHasTrialOffer:!1,anySkuHasIntroOffer:!1,anySkuHasPromoOffer:!1,isLoggedIn:!1,darkMode:!1,safeAreaTop:0,groups:[],selectedProducts:{},currentPage:"page1",currentGroupId:"",currentGroupName:"",fullScreenPresentation:!1,launch:{productGroups:[],customAttributes:{}},sku:{},orientation:"portrait",focusedState:!1,platformId:"",mediaList:{},skuItems:[],customer:{},hasNotch:!1,purchaseInProgress:!1,formFactor:"desktop",slides:{},userInteractionEnabled:!0,currentSlideIndex:void 0};class su extends EventTarget{constructor(){super(),this.host=null,this.state=ou,this.defineDynamicStateProps(),this.subscribers=new Set}subscribe(e){return this.subscribers.add(e),()=>this.unsubscribe(e)}unsubscribe(e){this.subscribers.delete(e)}emitEvent(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t}))}onEvent(e,t){const n=e=>t(e.detail);return this.addEventListener(e,n),()=>this.removeEventListener(e,n)}hostConnected(){}hostDisconnected(){this.subscribers.clear()}defineDynamicStateProps(){Object.defineProperty(this.state,"tvQuality",{get:this.getTVQuality.bind(this),enumerable:!1,configurable:!0})}setState(e){this.state=e,this.defineDynamicStateProps(),this.subscribers.forEach((e=>e())),this.host&&this.host.requestUpdate()}setProductDetails(e){this.productDetails=e}getProductDetails(){return this.productDetails}setCurrentGroupData(e,t){this.setState({...this.state,currentGroupId:e,currentGroupName:t})}getCurrentGroupId(){return this.state.currentGroupId}getCurrentGroupName(){return this.state.currentGroupName}setSelectedProdcuts(e){this.setState({...this.state,selectedProducts:e})}selectedProducts(){return this.state.selectedProducts}setPaywall(e,t,n){this.state.paywallId!=e.id||n||(n=this.state.selectedCampaign);let i={...this.state,formFactor:$s(),selectedPaywall:e,selectedCampaign:n};if(!ru(e)){const n=e.template?.initialState;i={...i,...n};const s=function(e,t){const n=t?.productGroups?.length?t.productGroups:[],i={customAttributes:t?.customAttributes??e.customAttributes??{},productGroups:n};return i.customObject={...e.customObject,...t?.customObject},i}(i.launch,t);if(1==s.productGroups?.length){const e=s.productGroups[0],t=n.groups.find((t=>t.ref==e));i.currentGroupId=t?.id||i.currentGroupId}const l=Qd(this.productDetails,e.sku_menus,i.currentGroupId);i.skuItems=l,i.launch=s,i.anySkuHasTrialOffer=nu(this.productDetails,e.sku_menus,s.productGroups??[]),i.anySkuHasPromoOffer=(a=this.productDetails,r=e.sku_menus,o=s.productGroups??[],!nu(a,r,o)&&(au(r,o)?.some((e=>1==Nl("promoEligible",iu(a,e.sku_ref_id))))??!1)),i.paywallId=e.id,i.sku=function(e,t,n,i){const a=n?.flatMap((e=>e.products)).find((e=>e.id===t.selectedProducts[t.currentGroupId]));return Zd(iu(e,a?.sku_ref_id??""),a,i)}(this.productDetails,n,e.sku_menus,l)}var a,r,o;this.setState(i)}getSelectedPaywall(){return this.state.selectedPaywall}getSelectedCampaign(){return this.state.selectedCampaign}paywallId(){return this.state.paywallId}setCurrentPage(e){this.setState({...this.state,currentPage:e})}setCustomerAttribute(e){this.setState({...this.state,customer:{...this.state.customer,...e}})}removeCustomerAttribute(e){delete this.state.customer[e],this.setState(this.state)}setIsLoggedIn(e){this.setState({...this.state,isLoggedIn:e})}setMediaList(e){this.setState({...this.state,mediaList:e.reduce(((e,t)=>({...e,[t.name]:t})))})}setSafeAreaTop(e){this.setState({...this.state,safeAreaTop:e})}setFullScreenPresentation(e){this.setState({...this.state,fullScreenPresentation:e})}setFormFactor(e){this.setState({...this.state,formFactor:e})}getFormFactor(){return this.state.formFactor}getTVQuality(){if("television"!==this.getFormFactor())return"";const e=window.devicePixelRatio||1,t=window.innerWidth||window.screen?.availWidth,n=window.innerHeight||window.screen?.availHeight;if(!t||!n)return"720p";const i=Math.max(t,n)*e,a=Math.min(t,n)*e;return i>=3840||a>=2160?"4K":i>=1920||a>=1080?"1080p":"720p"}setPurchaseInProgress(e){this.setState({...this.state,purchaseInProgress:e})}setPurchase(e,t){this.setState({...this.state,purchaseInProgress:e,productBeingPurchased:t})}setTimeSpentOnPaywall(e){this.setState({...this.state,timeSpentOnPaywall:e})}setAppSuppliedVideoDetails({url:e,name:t}){this.setState({...this.state,appSuppliedVideoUrl:e,appSuppliedVideoName:t})}resetAppSuppliedVideoDetails(){delete this.state.appSuppliedVideoUrl,delete this.state.appSuppliedVideoName,this.setState(this.state)}setLaunchDetails(e,t){this.setState({...this.state,launchValue:e,launchType:t})}setOpenHeaderIds(e,t){e=t?.skuId?`${e}_${t.skuId}`:e;const n=[...this.state.openHeaderIds],i=n.indexOf(e);-1!==i?n.splice(i,1):n.push(e),this.setState({...this.state,openHeaderIds:n,currentCollapsibleSku:t??null})}getCurrentCollapsibleSku(){return this.state.currentCollapsibleSku}setFlow(e){this.flow=e}setUserInteractionEnabled(e){this.setState({...this.state,userInteractionEnabled:e}),this.emitEvent("user-interaction-changed",{enabled:e})}setCurrentSlideIndex(e){this.state.currentSlideIndex=e}}const lu=new su;class du{constructor(){this.refIdToPurchasedSKUs={},this.refIdToRelatedSKUs={},this.refIdToActivePurchases={}}}du.instance=new du;const uu=()=>Fi(Ne([...ji.getNamiEntitlements(O),...ji.getNamiEntitlements(U)]),"referenceId"),cu=()=>{fl.getInstance().emit(Te,uu())};function hu(e){return{id:e.id,skuId:e.sku_ref_id,name:e.name,type:e.sku_type||"unknown",entitlements:e.entitlements,productDetails:"product_details"in e?e.product_details:null}}class mu{constructor(){}async fetchActiveEntitlements(){let e=null;if(ji.getAnonymousMode()||ks(m.THIRD_PARTY_TRANSACTIONS)||!ks(m.ENTITLEMENT_MANAGEMENT))ji.getAnonymousMode()&&We.debug("Skipping active entitlements update - anonymous mode"),ks(m.THIRD_PARTY_TRANSACTIONS)&&We.debug("Skipping active entitlements update - paywalls-only mode"),ks(m.ENTITLEMENT_MANAGEMENT)||We.debug("Skipping active entitlements update - no entitlement_management capability");else{const t=ji.getDevice();if(t?.id){const n=await this.getAPIEntitlements(t.id);e=n?.results,e&&(ji.setActiveEntitlements(N,e),this.invokeActiveEntitlementsHandler(e))}}return e}async getAPIEntitlements(e){const t=`device/${e}/active_entitlements/`;let n={};try{n=await Ps.instance.fetchAPI(t)}catch(e){throw We.error(ia(e.status,t)),e}return n}invokeActiveEntitlementsHandler(e){if(Ss()){(e=>{ji.setNamiEntitlements(O,e);const t=ji.getNamiEntitlements(U),n=new Set(e.map((e=>e.referenceId))),i=t.filter((e=>{const t=n.has(e.referenceId);return t&&We.debug(`Server granted verified entitlement for ${e.referenceId}, so replacing provisional entitlement grant.`),!t}));i.length!==t.length&&ji.setNamiEntitlements(U,i),cu()})(e.map((e=>(e=>{const t=e.entitlement_ref_id;return{name:e.name||"",desc:e.description||"",namiId:"",referenceId:t,relatedSkus:du.instance.refIdToRelatedSKUs[t]||[],activePurchases:du.instance.refIdToActivePurchases[t]||[],purchasedSkus:du.instance.refIdToPurchasedSKUs[t]||[],expires:e.expires?new Date(e.expires).valueOf():0}})(e))))}}}mu.instance=new mu;class fu{async fetchCustomerJourneyState(){if(ji.getAnonymousMode())return We.debug("Skipping customer journey state update - anonymous mode"),null;const e=ji.getDevice();if(!e?.id)return null;const t=`device/${e.id}/profile/`;let n=null;try{n=await Ps.instance.fetchAPI(t,void 0,0)}catch(e){throw We.error(ia(e.status,t)),e}return n?(ji.setCustomerJourneyState(n.customer_journey_state),n.customer_journey_state):null}}fu.instance=new fu;class pu{async init(e){this.setInitialValues(e),bl.instance.fetchConfig(),await this.initAndFetchRequiredData(e),kl.instance.startSession()}setInitialValues(e){const t={...e};delete t.initialConfig,ji.clearSessionId(),ji.setNamiConfig(t),ji.setLanguageCode(e.namiLanguageCode),ji.setPurchaseChannel(e.purchaseChannel);const n=e.initialConfig;if(n.appConfig||n.platform_config){const e=n?.appConfig||n?.platform_config;e&&ji.setAppConfig(F,e)}n?.paywalls&&ji.setPaywalls(z,n.paywalls),n?.products&&ji.setProducts($,n.products)}async initAndFetchRequiredData(e,t=0,n=1){const i=e.initialConfig,a=ji.getAnonymousMode();let r,o=null;if(!a){const t=zs(e.namiCommands);e.formFactor&&(t.form_factor=e.formFactor),o=await vl.instance.createOrUpdateDevice(t)}r=Gs(o?o.id:vl.instance.getOrCreateAnonymousUUID());const s=e.formFactor??o?.form_factor??$s();lu.setFormFactor(s),pl.instance.currentFormFactor=s,pl.instance.splitPosition=r,i.campaign_rules&&ji.setCampaignRules(j,Ys(i.campaign_rules,r,s));const l=Promise.all([yl.instance.fetchProducts(),fu.instance.fetchCustomerJourneyState(),mu.instance.fetchActiveEntitlements(),wl.instance.fetchPaywalls().then((e=>pl.instance.fetchCampaignRules(e)))]).catch((async i=>{if(i instanceof Ui){if(ji.resetDevice(),t<n){const i=100*Math.pow(2,t);return await new Promise((e=>setTimeout(e,i))),this.initAndFetchRequiredData(e,t+1,n)}if(!a)return We.warn(`Max retries reached for ConflictError. ${i.message}`),ji.setAnonymousMode(!0),this.initAndFetchRequiredData(e,0,n)}throw i}));i.campaign_rules?.length&&i.paywalls?.length||await l,l.then((()=>this.reRenderPaywall()))}reRenderPaywall(){if("undefined"==typeof document)return;const{launchValue:e,launchType:t}=lu.state,{campaign:n,paywall:i}=Zs(e,t),a=document.querySelector("nami-paywall");a&&i&&n&&a.setPaywallData(i,n)}}function gu(e){return Array.isArray(e)?e.map(gu):e&&"object"==typeof e?Object.entries(e).reduce(((e,[t,n])=>(void 0!==n&&(e[t]=gu(n)),e)),{}):e}var vu;pu.instance=new pu;class yu{constructor(){vu.set(this,!1)}get isInitialized(){return h(this,vu,"f")||null!=ji.getNamiConfig()}static sdkVersion(){return f}static async configure(e){if(!e.appPlatformID)throw new Bi;return this.setInitialConfig(e),await yu.instance.initializeSDK(e)}static setInitialConfig(e){if(null!=e.initialConfig){if("string"==typeof e.initialConfig){const t=function(e){const t=e.trim();if(t.startsWith("{")||t.startsWith("["))try{return JSON.parse(t)}catch{return}}(e.initialConfig);if(!t)return We.error("Failed to parse NamiConfiguration.initialConfig"),void(e.initialConfig={});e.initialConfig=t}if("object"!=typeof e.initialConfig)e.initialConfig={};else if((e=>"object"==typeof e&&"initial_config"in e)(e.initialConfig)){const t=Ms(e.initialConfig.initial_config);t?e.initialConfig=t:(e.initialConfig={},We.error("Failed to parse NamiConfiguration.initialConfig as base64-gzipped JSON"))}}else e.initialConfig={}}async initializeSDK(e){let t=!1,n=!1;const i=h(this,vu,"f")?ji.getNamiConfig():null;if(We.setLogger(e.logLevel),null!==i){const r={...e};if(delete r.initialConfig,a=i,gl(gu(r),gu(a)))return We.warn("Nami SDK is already configured, ignoring this configure call."),{sdkInitialized:!0,configureState:Se};n=!0;const o=bs(e.namiCommands),s=bs(i.namiCommands);e.appPlatformID==i.appPlatformID&&o==s||(t=!0),e.namiLanguageCode===i.namiLanguageCode&&e.logLevel==i.logLevel||(n=!0)}var a;t&&(We.info("SDK full reconfigure called"),ji.resetDevice()),function(e,t,n,i,a){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===i?a.call(e,n):a?a.value=n:t.set(e,n)}(this,vu,!0,"f"),Ps.configure(e),await pu.instance.init(e),We.info("SDK successfully initialized!");return{sdkInitialized:!0,configureState:n||t?ke:be}}}vu=new WeakMap,yu.instance=new yu;const wu=e`
|
|
2
|
-
:host {
|
|
3
|
-
-webkit-font-smoothing: antialiased;
|
|
4
|
-
}
|
|
5
|
-
:host *, :host *::before, :host *::after {
|
|
6
|
-
box-sizing: border-box;
|
|
7
|
-
}
|
|
8
|
-
:host img, :host picture, :host video, :host canvas, :host svg {
|
|
9
|
-
display: block;
|
|
10
|
-
max-width: 100%;
|
|
11
|
-
}
|
|
12
|
-
:host input, :host button, :host textarea, :host select {
|
|
13
|
-
font: inherit;
|
|
14
|
-
}
|
|
15
|
-
:host p, :host h1, :host h2, :host h3, :host h4, :host h5, :host h6 {
|
|
16
|
-
overflow-wrap: break-word;
|
|
17
|
-
}
|
|
18
|
-
`;class bu{constructor(e){this.host=e,this.state=lu.state,e.addController(this),this.handleStateChange=this.handleStateChange.bind(this),lu.subscribe(this.handleStateChange)}handleStateChange(){this.state=lu.state,this.host.requestUpdate()}hostConnected(){}hostDisconnected(){lu.unsubscribe(this.handleStateChange)}}const ku=e=>(t,n)=>{void 0!==n?n.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)},Su=globalThis,Mu=Su.ShadowRoot&&(void 0===Su.ShadyCSS||Su.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Eu=Symbol(),Tu=new WeakMap;let Pu=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==Eu)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Mu&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=Tu.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Tu.set(t,e))}return e}toString(){return this.cssText}};const Au=(e,t)=>{if(Mu)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const n of t){const t=document.createElement("style"),i=Su.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=n.cssText,e.appendChild(t)}},xu=Mu?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new Pu("string"==typeof e?e:e+"",void 0,Eu))(t)})(e):e,{is:_u,defineProperty:Cu,getOwnPropertyDescriptor:Lu,getOwnPropertyNames:Iu,getOwnPropertySymbols:Du,getPrototypeOf:Ru}=Object,Wu=globalThis,Nu=Wu.trustedTypes,Ou=Nu?Nu.emptyScript:"",Fu=Wu.reactiveElementPolyfillSupport,ju=(e,t)=>e,zu={toAttribute(e,t){switch(t){case Boolean:e=e?Ou:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},$u=(e,t)=>!_u(e,t),Uu={attribute:!0,type:String,converter:zu,reflect:!1,hasChanged:$u};Symbol.metadata??=Symbol("metadata"),Wu.litPropertyMetadata??=new WeakMap;class Hu extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Uu){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),i=this.getPropertyDescriptor(e,n,t);void 0!==i&&Cu(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){const{get:i,set:a}=Lu(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return i?.call(this)},set(t){const r=i?.call(this);a.call(this,t),this.requestUpdate(e,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Uu}static _$Ei(){if(this.hasOwnProperty(ju("elementProperties")))return;const e=Ru(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ju("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ju("properties"))){const e=this.properties,t=[...Iu(e),...Du(e)];for(const n of t)this.createProperty(n,e[n])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const n=this._$Eu(e,t);void 0!==n&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(xu(e))}else void 0!==e&&t.push(xu(e));return t}static _$Eu(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Au(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EC(e,t){const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(void 0!==i&&!0===n.reflect){const a=(void 0!==n.converter?.toAttribute?n.converter:zu).toAttribute(t,n.type);this._$Em=e,null==a?this.removeAttribute(i):this.setAttribute(i,a),this._$Em=null}}_$AK(e,t){const n=this.constructor,i=n._$Eh.get(e);if(void 0!==i&&this._$Em!==i){const e=n.getPropertyOptions(i),a="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:zu;this._$Em=i,this[i]=a.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,n){if(void 0!==e){if(n??=this.constructor.getPropertyOptions(e),!(n.hasChanged??$u)(this[e],t))return;this.P(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,n){this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,n]of e)!0!==n.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],n)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}Hu.elementStyles=[],Hu.shadowRootOptions={mode:"open"},Hu[ju("elementProperties")]=new Map,Hu[ju("finalized")]=new Map,Fu?.({ReactiveElement:Hu}),(Wu.reactiveElementVersions??=[]).push("2.0.4");const Bu={attribute:!0,type:String,converter:zu,reflect:!1,hasChanged:$u},Gu=(e=Bu,t,n)=>{const{kind:i,metadata:a}=n;let r=globalThis.litPropertyMetadata.get(a);if(void 0===r&&globalThis.litPropertyMetadata.set(a,r=new Map),r.set(n.name,e),"accessor"===i){const{name:i}=n;return{set(n){const a=t.get.call(this);t.set.call(this,n),this.requestUpdate(i,a,e)},init(t){return void 0!==t&&this.P(i,void 0,e),t}}}if("setter"===i){const{name:i}=n;return function(n){const a=this[i];t.call(this,n),this.requestUpdate(i,a,e)}}throw Error("Unsupported decorator location: "+i)};function Xu(e){return(t,n)=>"object"==typeof n?Gu(e,t,n):((e,t,n)=>{const i=t.hasOwnProperty(n);return t.constructor.createProperty(n,i?{...e,wrapped:!0}:e),i?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}class Yu extends t{constructor(){super(),this.contextConsumer=new bu(this)}styles(){return e``}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return n(e,[wu,this.styles()]),e}willUpdate(e){super.willUpdate(e),this.shadowRoot&&n(this.shadowRoot,[wu,this.styles()])}disconnectedCallback(){super.disconnectedCallback(),this.contextConsumer.hostDisconnected()}}c([Xu({type:Object})],Yu.prototype,"contextConsumer",void 0);const Vu=async e=>{const t=new Set(Array.from(document.fonts.values()).map((e=>e.family)));return e.forEach((e=>{const n=function(e){return t=`${e.family}-${e.style}`,t.replace(/ /g,"");var t}(e);if(t.has(n))return;const i=new FontFace(n,`url(${e.file})`);document.fonts.add(i)})),document.fonts.ready.then()};var Ku,qu,Ju,Qu,Zu;!function(e){e.BUY_SKU="BUY_SKU",e.SELECT_SKU="SELECT_SKU",e.RESTORE_PURCHASES="RESTORE_PURCHASES",e.SIGN_IN="SIGN_IN",e.CLOSE_PAYWALL="CLOSE_PAYWALL",e.SHOW_PAYWALL="SHOW_PAYWALL",e.PURCHASE_SELECTED_SKU="PURCHASE_SELECTED_SKU",e.PURCHASE_SUCCESS="PURCHASE_SUCCESS",e.PURCHASE_FAILED="PURCHASE_FAILED",e.PURCHASE_CANCELLED="PURCHASE_CANCELLED",e.PURCHASE_PENDING="PURCHASE_PENDING",e.PURCHASE_UNKNOWN="PURCHASE_UNKNOWN",e.PURCHASE_DEFERRED="PURCHASE_DEFERRED",e.DEEPLINK="DEEPLINK",e.TOGGLE_CHANGE="TOGGLE_CHANGE",e.PAGE_CHANGE="PAGE_CHANGE",e.SLIDE_CHANGE="SLIDE_CHANGE",e.COLLAPSIBLE_DRAWER_OPEN="COLLAPSIBLE_DRAWER_OPEN",e.COLLAPSIBLE_DRAWER_CLOSE="COLLAPSIBLE_DRAWER_CLOSE",e.VIDEO_STARTED="VIDEO_STARTED",e.VIDEO_PAUSED="VIDEO_PAUSED",e.VIDEO_RESUMED="VIDEO_RESUMED",e.VIDEO_ENDED="VIDEO_ENDED",e.VIDEO_CHANGED="VIDEO_CHANGED",e.VIDEO_MUTED="VIDEO_MUTED",e.VIDEO_UNMUTED="VIDEO_UNMUTED",e.UNKNOWN="UNKNOWN"}(Ku||(Ku={})),function(e){e.ENTRY="entry",e.SCREEN="screen",e.BRANCH="branch",e.EXIT="exit",e.UNKNOWN="unknown"}(qu||(qu={})),function(e){e.NAVIGATE="flowNav",e.BACK="flowPrev",e.NEXT="flowNext",e.FINISHED="flowDone",e.DISMISS="flowDismiss",e.EXIT="flowExit",e.HANDOFF="flowHandoff",e.TRACK="trackEvent",e.LOG="logEvent",e.SET_VIDEO="setVideo",e.FLOW_EVENT="flowEvent",e.BLOCK_BACK="blockBackToStep",e.FLOW_ENABLED="flowInteractionEnabled",e.FLOW_DISABLED="flowInteractionDisabled"}(Ju||(Ju={})),function(e){e.NONE="none",e.AND="and",e.OR="or"}(Qu||(Qu={})),function(e){e.I_CONTAINS="i_contains",e.EQUALS="equals",e.I_EQUALS="i_equals",e.NOT_EQUALS="not_equals",e.NOT_I_EQUALS="not_i_equals",e.NOT_CONTAINS="not_contains"}(Zu||(Zu={}));class ec{constructor(){this.resolvers=new Map,this.namespaceResolvers=new Map}static get shared(){return ec.instance||(ec.instance=new ec),ec.instance}registerNamespaceResolver(e,t){this.namespaceResolvers.set(e,t)}resetResolvers(){this.resolvers.clear()}evaluate(e){const t=e.filter??[];if(0===t.length)return!0;const n=t.map((e=>this.evaluateFilter(e)));switch(e.operatorType){case Qu.AND:return n.every((e=>e));case Qu.OR:return n.some((e=>e));case Qu.NONE:default:return n.every((e=>e))}}evaluateOrdered(e){if(!e)return!0;const t=e.filter??[];if(0===t.length)return!0;switch(e.operatorType){case Qu.AND:for(const e of t)if(!this.evaluateFilter(e))return!1;return!0;case Qu.OR:for(const e of t)if(this.evaluateFilter(e))return!0;return!1;case Qu.NONE:default:for(const e of t)if(!this.evaluateFilter(e))return!1;return!0}}evaluateFilter(e){const t=this.resolve(e.identifier);if(null==t)return!![Zu.NOT_EQUALS,Zu.NOT_I_EQUALS,Zu.NOT_CONTAINS].includes(e.operator);switch(e.operator){case Zu.I_CONTAINS:if(Array.isArray(t)){return e.values.some((e=>t.some((t=>0===t.localeCompare(e,void 0,{sensitivity:"accent"})))))}return this.log("Resolved value is not an array of strings for i_contains."),!1;case Zu.EQUALS:return e.values.some((e=>{if("string"==typeof t)return t===e;if("boolean"==typeof t){const n="true"===e.toLowerCase();return t===n}return this.log("Unsupported type for equals comparison: "+typeof t),!1}));case Zu.I_EQUALS:return e.values.some((e=>{if("string"==typeof t){return 0===t.localeCompare(e,void 0,{sensitivity:"accent"})}if("boolean"==typeof t){const n="true"===e.toLowerCase();return t===n}return this.log("Unsupported type for i_equals comparison: "+typeof t),!1}));case Zu.NOT_EQUALS:return e.values.every((e=>"string"!=typeof t||t!==e));case Zu.NOT_I_EQUALS:return e.values.every((e=>"string"!=typeof t||0!==t.localeCompare(e,void 0,{sensitivity:"accent"})));case Zu.NOT_CONTAINS:return e.values.every((e=>"string"!=typeof t||!t.includes(e)));default:return this.log(`Unsupported operator: ${e.operator}`),!1}}resolve(e){const t=this.resolveRaw(e);if(void 0!==t)return t;const n=e.lastIndexOf(".");if(-1!==n){const t=e.slice(0,n),i=e.slice(n+1),a=this.resolveRaw(t);return void 0!==a?this.extractProperty(i,a):void this.log(`Could not resolve base identifier: ${t}`)}}resolveRaw(e){const t=[...this.namespaceResolvers.keys()].sort(((e,t)=>t.length-e.length));for(const n of t)if(e.startsWith(n)){const t=this.namespaceResolvers.get(n);if(t)return t(e)}}extractProperty(e,t){switch(e){case"last":if(Array.isArray(t))return t[t.length-1];break;case"first":if(Array.isArray(t))return t[0];break;case"count":if(Array.isArray(t))return t.length;if(t&&"object"==typeof t)return Object.keys(t).length;break;default:return}this.log(`Could not extract .${e} from type ${typeof t}`)}log(e){We.debug(`[NamiConditionEvaluator] ${e}`)}}class tc{constructor(){}register(){ec.shared.registerNamespaceResolver(this.namespace,(e=>{const t=e.replace(new RegExp(`^${this.namespace}\\.`),"");return this.resolveValue(t)}))}resolveKeyPath(e,t){const n=e.replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean);let i=t;for(const e of n){if(null==i||"object"!=typeof i)return;i=i[e]}return i}}class nc extends tc{constructor(e){super(),this.namespace="LaunchContext",this.context=e,this.register()}resolveValue(e){if(e.startsWith("customAttributes.")){const t=e.substring(17);return this.resolveKeyPath(t,this.context.customAttributes)}if(e.startsWith("customObject.")){const t=e.substring(13);return this.resolveKeyPath(t,this.context.customObject)}return this.resolveKeyPath(e,{customAttributes:this.context.customAttributes,customObject:this.context.customObject})}}class ic extends tc{constructor(){super(),this.namespace="Device";const e=Intl.DateTimeFormat().resolvedOptions().locale.split("-")[1]||"",t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=zs();this.context={osName:n.os_name,osVersion:n.os_version,appVersion:n.extended_platform_version,sdkVersion:n.sdk_version,deviceModel:n.device_model,screenWidth:window.innerWidth,screenHeight:window.innerHeight,formFactor:n.form_factor,tvQuality:this.tvQuality(n.form_factor??"desktop"),tvResolution:this.tvResolution(n.form_factor??"desktop"),screenSize:this.screenSizeTier(n.form_factor??"desktop"),language:n.language,country:e,timezone:t},this.register()}screenSizeTier(e){const t=window.screen.width,n=window.screen.height,i=window.devicePixelRatio||1,a=Math.round(t*i),r=Math.round(n*i),o=Math.max(a,r);switch(e){case"phone":return o<1136?"tiny":o<1334?"small":o<1920?"medium":o<2560?"large":"huge";case"tablet":return o<2048?"medium":o<2732?"large":"huge";case"television":return o<1920?"medium":o<3840?"large":"huge";case"desktop":return o<1440?"small":o<2560?"medium":o<3840?"large":"huge";default:return"medium"}}tvQuality(e){if("television"!==e)return"";const t=window.screen.width,n=window.screen.height,i=window.devicePixelRatio||1,a=Math.round(t*i),r=Math.round(n*i),o=Math.max(a,r),s=Math.min(a,r);return o>=3840||s>=2160?"4K":o>=1920||s>=1080?"1080p":"720p"}tvResolution(e){if("television"!==e)return"";const t=window.screen.width,n=window.screen.height,i=window.devicePixelRatio||1,a=Math.round(t*i),r=Math.round(n*i),o=Math.max(a,r),s=Math.min(a,r);return s<720&&o<1280?"SD":s>=720&&s<1080&&o>=1280&&o<1920?"720p":s>=1080&&s<1440&&o>=1920&&o<2560?"1080p":s>=1440&&s<2160&&o>=2560&&o<3840?"1440p":s>=2160&&s<3e3&&o>=3840&&o<5e3?"4K":s>=3e3&&o>=5e3?"8K":"Unknown"}resolveValue(e){return this.resolveKeyPath(e,this.context)}}const ac=/\{\{\s*(\w+)\s*\}\}/g;class rc{constructor(e){this.flowManager=e}resolve(e){const t=this.flowManager.currentFlow,n=t?.component;switch(e){case"campaignId":return n?.campaign?.rule;case"campaignName":return n?.campaign?.name;case"pageName":return n?.paywall?.name;case"pageId":return n?.paywall?.id;case"flowName":return t?.name;case"flowId":return t?.id;case"stepName":return t?.currentFlowStep?.name;case"buttonText":return t?.currentButton?.firstTextValue();case"slideNumber":{const e=n?.getSelectedSlideIndexForCurrentCarousel();return null!=e?`${e+1}`:void 0}default:return}}interpolateLiquidVariables(e){return e.replace(ac,((e,t)=>{const n=this.resolve(t);return null!=n?n:""}))}interpolateDeep(e){return"string"==typeof e?this.interpolateLiquidVariables(e):Array.isArray(e)?e.map((e=>this.interpolateDeep(e))):e&&"object"==typeof e?Object.entries(e).reduce(((e,[t,n])=>({...e,[t]:this.interpolateDeep(n)})),{}):e}}var oc;!function(e){e.REGISTER_BUY_SKU="RegisterBuySKU",e.PAYWALL_CLOSE_REQUESTED="PaywallCloseRequested",e.PAYWALL_SIGNIN_REQUESTED="PaywallSignInRequested",e.PAYWALL_RESTORE_REQUESTED="PaywallRestoreRequested",e.PAYWALL_DEEPLINK_ACTION="PaywallDeeplinkAction"}(oc||(oc={}));class sc{constructor(e={}){this.id=e.id??"",this.name=e.name??"",this.steps=e.steps??[],this.screens=e.screens??[],this.resumeFromBookmark=Boolean(e.resume_from_bookmark)}get allScreensAvailable(){return this.screens.length>0&&Ds(this.screens)}}class lc extends sc{constructor(e,t,n,i){super(e.flow.object??{}),this.stepcrumbs=[],this.branchcrumbs=[],this.campaign=e,this.component=t,this.context=i,this.manager=n,this.branchcrumbs=[],this.stepcrumbs=[],this.registerResolvers(i);const a=this.findStepByType(qu.ENTRY);a&&this.forward(a.id)}registerResolvers(e){e&&new nc(e),new ic,ec.shared.registerNamespaceResolver("Flow",(e=>{switch(e){case"Flow.stepcrumbs":return this.stepcrumbs.map((e=>e.id));case"Flow.branchcrumbs":return this.branchcrumbs;default:return}}))}get currentFlowStep(){return this.stepcrumbs.at(-1)}get nextStepAvailable(){return void 0!==this.nextStep(this.currentFlowStep)}get previousStepAvailable(){const e=!!this.previousFlowStep,t=!1!==this.previousFlowStep?.allow_back_to,n=this.stepcrumbs.slice(0,-1).some((e=>"screen"===e.type));return e&&t&&n}get previousFlowStep(){const e=this.stepcrumbs.length-2;return e>=0?this.stepcrumbs[e]:void 0}getStep(e){return this.steps.find((t=>t.id===e))}findStepByType(e){return this.steps.find((t=>t.type===e))}isStepActive(e){return!e.branch_tags||!e.branch_tags.length||e.branch_tags.some((e=>this.branchcrumbs.includes(e)))}finished(){this.manager.flowOpen=!1,this.manager.currentFlow=void 0;const e=oc.PAYWALL_CLOSE_REQUESTED,t=fl.getInstance();0!==t.listenerCount(e)?t.emit(e):We.warn("No paywall close handler registered. Use NamiPaywallManager.registerCloseHandler.")}back(){this.previousFlowStep&&this.backToPreviousScreenStep()}backToPreviousScreenStep(){if(!1!==this.previousFlowStep?.allow_back_to){for(let e=this.stepcrumbs.length-2;e>=0;e--){const t=this.stepcrumbs[e];if(this.stepcrumbs.pop(),"branch"===t.type&&this.branchcrumbs.length>0&&this.branchcrumbs.pop(),"screen"===t.type&&t.screen){const e=Is(t.screen);return void(e&&this.component.flowNavigateToScreen(e))}}We.warn("No previous screen step found to return to")}else We.warn(`Not allowed to go back to ${this.previousFlowStep.id}`)}forward(e){const t=this.getStep(e);if(t){if(this.isStepActive(t))switch(t.type){case qu.ENTRY:case qu.EXIT:return this.stepcrumbs.push(t),void this.executeLifecycle(t,"__default__");case qu.BRANCH:return void this.handleBranchStep(t);case qu.SCREEN:return void this.handleScreenStep(t);case qu.UNKNOWN:return}}else We.error(`No step found with id: ${e}`)}executeLifecycle(e,t){const n=e.actions[t];n&&this.executeFullLifecycles(n)}lifecycles(e){if(!this.currentFlowStep)return;const t=this.currentFlowStep.actions[e];if(t)return t;We.info(`No actions found for button ${e} on step ${this.currentFlowStep.id}`)}triggerActions(e,t){const n=this.lifecycles(e);n&&(this.currentButton=t,this.executeFullLifecycles(n))}executeFullLifecycles(e){for(const t of e)[t.before,t.action,t.after].forEach((e=>e?.forEach((e=>this.shouldRun(e)&&this.performAction(e)))))}triggerBeforeActions(e,t){const n=this.lifecycles(e);if(n){this.currentButton=t;for(const e of n)e.before?.forEach((e=>this.shouldRun(e)&&this.performAction(e)))}}triggerAfterActions(e,t){const n=this.lifecycles(e);if(n){this.currentButton=t;for(const e of n)e.after?.forEach((e=>this.shouldRun(e)&&this.performAction(e)))}}currentStepHasHoistedPrimaryActions(e){const t=this.lifecycles(e);return!!t&&t.some((e=>e.action?.length))}shouldRun(e){return!e.conditions||e.conditions.every((e=>ec.shared.evaluate(e)))}performAction(e){if(!this.currentFlowStep)return void We.warn("No current flow step");const t=(e.parameters?.delay?+e.parameters.delay:0)||0,n=t=>{if(this.currentFlowStep?.id===t)switch(e.function){case Ju.BACK:this.back();break;case Ju.NEXT:e.parameters?.step?this.forward(e.parameters.step):this.currentFlowStep&&this.nextStep(this.currentFlowStep)&&this.forward(this.currentFlowStep.id);break;case Ju.NAVIGATE:e.parameters?.step?this.previousFlowStep?.id===e.parameters.step?this.back():this.forward(e.parameters.step):this.nextStep(this.currentFlowStep)&&this.forward(this.nextStep(this.currentFlowStep).id);break;case Ju.FINISHED:case Ju.DISMISS:case Ju.EXIT:this.finished();break;case Ju.HANDOFF:e.parameters?.handoffTag&&(this.manager.handoffStepHandler?e.parameters.handoffData?(We.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} ${JSON.stringify(e.parameters.handoffData)}`),this.manager.handoffStepHandler(e.parameters.handoffTag,e.parameters.handoffData)):e.parameters.handoffFormId?We.error("Missing implementation for handoff with handoffFormId"):(We.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} and no data`),this.manager.handoffStepHandler(e.parameters.handoffTag)):We.debug("No handoffStepHandler found",e));break;case Ju.LOG:e.parameters?.eventName?We.info(`logEvent → ${e.parameters.eventName}`):We.warn(`Missing 'eventName' in logEvent action ${e.id??"unknown"}`);break;case Ju.TRACK:e.parameters?.eventName?We.info(`trackEvent → ${e.parameters.eventName}`):We.warn(`Missing 'eventName' in logEvent action ${e.id??"unknown"}`);break;case Ju.SET_VIDEO:e.parameters?.name&&e.parameters.url?lu.setAppSuppliedVideoDetails({name:e.parameters.name,url:e.parameters.url}):We.warn("Missing name, url for setting video details");break;case Ju.BLOCK_BACK:{const t=e.parameters?.step,n=t?this.getStep(t):void 0;n?n.allow_back_to=!1:this.currentFlowStep?this.currentFlowStep.allow_back_to=!1:We.warn("Missing step for blocking back");break}case Ju.FLOW_EVENT:{const t=new rc(this.manager),n=Object.fromEntries(Object.entries(e.parameters??{}).map((([e,n])=>[e,t.interpolateDeep(n)])));this.manager.eventHandler?this.manager.eventHandler(n):We.warn("Missing event handler",n);break}case Ju.FLOW_ENABLED:lu.setUserInteractionEnabled(!0);break;case Ju.FLOW_DISABLED:lu.setUserInteractionEnabled(!1);break;default:We.warn(`Missing action handler for ${e.function}`,e)}else We.debug(`Skipped action for stale flow step ${t}`)};t?setTimeout(n.bind(this,this.currentFlowStep.id),t):n(this.currentFlowStep.id)}nextStep(e){if(!e)return void We.error("Next step not found");const t=this.steps.findIndex((t=>t.id===e.id));if(-1===t)return void We.error(`Could not find next step for step ${e.id}`);const n=this.steps.slice(t+1);for(const e of n){if(this.isStepActive(e))return e}We.warn(`No active next step found after ${e.id}`)}handleScreenStep(e){const t=Is(e.screen??"");e.screen&&t&&this.campaign?(this.stepcrumbs.push(e),this.component.flowNavigateToScreen(t)):We.error("No paywall or campaign found for next step")}handleBranchStep(e){this.stepcrumbs.push(e);for(const[t,n]of Object.entries(e.actions))if(n)for(const e of n)if(e.action){for(const n of e.action)if(this.shouldRun(n))return this.branchcrumbs.push(t),e.before?.forEach((e=>{this.performAction(e)})),e.action.forEach((e=>{this.shouldRun(e)&&this.performAction(e)})),void e.after?.forEach((e=>{this.performAction(e)}))}else We.warn(`No actions defined for branch tag ${t}`);We.warn(`No matching branch condition matched for step ${e.id}`)}}let dc=class e{static get instance(){return e._instance||(e._instance=new e),e._instance}constructor(){this.flowOpen=!1}static registerStepHandoff(e){this.instance.handoffStepHandler=e}static registerEventHandler(e){this.instance.eventHandler=e}static resume(){const{flowOpen:t,currentFlow:n}=e.instance;t&&n&&n.currentFlowStep?(We.debug(`Resuming flow at step ${n.currentFlowStep.id}`),n.executeLifecycle(n.currentFlowStep,"__resume__")):We.warn("Cannot resume: no active flow or current step")}presentFlow(e,t,n){const i=new lc(e,t,this,n);return this.flowOpen=!0,this.currentFlow=i,i}static finish(){const{flowOpen:t,currentFlow:n}=e.instance;t&&n&&n.currentFlowStep?(We.debug(`Finishing flow programmatically at step ${n.currentFlowStep.id}`),n.finished()):We.debug("Cannot finish: no active flow or current step")}static isFlowOpen(){return e.instance.flowOpen}};const uc="nami-disabled";let cc=class extends Yu{constructor(e,t,n,i){super(),this.paywallEvent={},this.paywallEvent=t??{},this.paywall=e,this.campaign=n,this.context=i,As(n)?(lu.setPaywall({},i,n),this.flow=dc.instance.presentFlow(n,this,i),lu.setFlow(this.flow)):e&&lu.setPaywall(e,i,n)}connectedCallback(){super.connectedCallback(),this.contextConsumer.state.userInteractionEnabled||this.classList.add(uc),window.TVJS?.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=this),"television"===lu.getFormFactor()&&document.addEventListener("keydown",this.handleKeyDownEvent.bind(this)),this.teardownEvent=lu.onEvent("user-interaction-changed",this.userInteractionListener.bind(this))}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvent(),window.TVJS?.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=document.body),"television"===lu.getFormFactor()&&document.removeEventListener("keydown",this.handleKeyDownEvent.bind(this)),fl.getInstance().removeAllListeners(Ee)}handleKeyDownEvent(e){this.flow&&10009===e.keyCode&&(this.flow.previousFlowStep&&e.preventDefault(),this.flow.back())}userInteractionListener(e){this.classList.toggle(uc,!e.enabled)}setPaywallData(e,t){this.paywall=e,this.campaign=t,lu.setPaywall(e,this.context,t)}firstUpdated(){lu.setTimeSpentOnPaywall(Date.now()),fl.getInstance().emit(Ee,{...this.paywallEvent,action:Ku.SHOW_PAYWALL})}updated(e){if(e.has("campaign")||e.has("paywall")){const t=e.get("paywall"),n=e.get("campaign");t?.id===this.paywall?.id&&n?.segment===this.campaign?.segment||this.postImpression(this.paywall,this.campaign),this.paywallEvent.paywallId=this.paywall?.id,this.paywallEvent.paywallName=this.paywall?.name}}postImpression(e,t){e?.id&&(async e=>{if(ji.getAnonymousMode())return void We.info("Skipping paywall impression - anonymous mode");const t=ji.getSessionId();t&&(e.session=t),e.app_env="production",We.info("Post paywall impression - segment ",e.segment);try{await Ps.instance.postImpression(e)}catch(e){We.error("Error posting impression",e)}})({segment:t?.segment,call_to_action:e.id})}getTemplate(){const{currentPage:e,selectedPaywall:t}=this.contextConsumer.state;return t?.template?.pages.find((t=>t.name===e))||{}}styles(){return e`
|
|
19
|
-
:host {
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
width: 100%;
|
|
22
|
-
display: inline-block;
|
|
23
|
-
}
|
|
24
|
-
:host(.nami-disabled) {
|
|
25
|
-
pointer-events: none;
|
|
26
|
-
}`}async flowNavigateToScreen(e){this.flow?.previousFlowStep&&this.flow.executeLifecycle(this.flow.previousFlowStep,"__disappear__"),this.setPaywallData({},this.campaign),await this.updateComplete,this.setPaywallData(e,this.campaign),await this.updateComplete,this.flow?.currentFlowStep&&this.flow.executeLifecycle(this.flow.currentFlowStep,"__appear__")}getSelectedSlideIndexForCurrentCarousel(){return this.contextConsumer.state.currentSlideIndex}render(){const{state:e}=this.contextConsumer,t=this.getTemplate();if(ru(this.paywall))return i``;const{backgroundContainer:n,header:a=[],footer:r=[],contentContainer:o}=t;e.selectedPaywall?.fonts&&"undefined"!=typeof document&&function(e){const t=Object.values(e).map((({id:e,family:t,style:n,file:i})=>("production"===g&&(i=i.replace(Le,Ie)),{id:e,family:t,style:n,file:i})));Vu(t)}(e.selectedPaywall.fonts);const s=e.fullScreenPresentation??!1,l=lu.getFormFactor(),d=function(e){if(e||(e=$s()),"television"!==e)return 1;const{innerWidth:t,innerHeight:n}=window,i=t.toString()+"x"+n.toString();return Us[i]??Hs()}(l);return i`
|
|
27
|
-
<nami-background-container
|
|
28
|
-
.component=${n}
|
|
29
|
-
.scaleFactor=${d}
|
|
30
|
-
></nami-background-container>
|
|
31
|
-
<nami-header
|
|
32
|
-
.components=${a}
|
|
33
|
-
.scaleFactor=${d}
|
|
34
|
-
.inFullScreen=${s}
|
|
35
|
-
></nami-header>
|
|
36
|
-
<nami-content-container
|
|
37
|
-
.component=${o}
|
|
38
|
-
.scaleFactor=${d}
|
|
39
|
-
.device=${l}>
|
|
40
|
-
</nami-content-container>
|
|
41
|
-
<nami-footer
|
|
42
|
-
.components=${r}
|
|
43
|
-
.scaleFactor=${d}>
|
|
44
|
-
</nami-footer>
|
|
45
|
-
`}};var hc,mc;c([Xu({type:Object})],cc.prototype,"campaign",void 0),c([Xu({type:Object})],cc.prototype,"paywall",void 0),c([Xu({type:Object})],cc.prototype,"flow",void 0),cc=c([ku("nami-paywall")],cc),function(e){e.DEFAULT_CAMPAIGN_NOT_FOUND="Default campaign not found",e.LABELED_CAMPAIGN_NOT_FOUND="Labeled campaign not found",e.CAMPAIGN_DATA_NOT_FOUND="Campaign data not found",e.PAYWALL_ALREADY_DISPLAYED="Paywall is already being displayed",e.SDK_NOT_INITIALIZED="SDK has not been initialized",e.PAYWALL_COULD_NOT_DISPLAY="Failed to display paywall",e.URL_CAMPAIGN_NOT_FOUND="URL campaign not found",e.PRODUCT_DATA_NOT_FOUND="Product data not found",e.PRODUCT_GROUPS_NOT_FOUND="Product groups not found",e.FLOW_SCREEN_DATA_UNAVILABLE="Flow unavailable due to missing screen data"}(hc||(hc={}));class fc{constructor(){this.emitter=fl.getInstance()}static allCampaigns(){if(!this.instance.sdkInitialized)throw new Hi;return Vs()}static isCampaignAvailable(e){if(!this.instance.sdkInitialized)throw new Hi;const{type:t,value:n}=this.instance.campaignTypeAndLabel(e),{campaign:i,paywall:a}=Zs(n,t);if(i?.flow){return new sc(i.flow.object).allScreensAvailable}return Boolean(i&&a)}static async refresh(){if(!this.instance.sdkInitialized)throw new Hi;const e=await wl.instance.fetchPaywalls();return await pl.instance.fetchCampaignRules(e),Vs()}static registerAvailableCampaignsHandler(e){return this.instance.emitter.addListener(Me,e),()=>{this.instance.emitter.removeListener(Me,e)}}static launch(e,t,n,i,a){i=i??(()=>{});const{type:r,value:o}=this.instance.campaignTypeAndLabel(e,t);if(!this.instance.sdkInitialized)throw i(!1,hc.SDK_NOT_INITIALIZED),new Hi;lu.setLaunchDetails(o,r);const s=Zs(o,r);let l=s.paywall;const d=s.campaign;if(!d||!l&&!d.flow){let n;n=e||t?e?hc.LABELED_CAMPAIGN_NOT_FOUND:t?hc.URL_CAMPAIGN_NOT_FOUND:hc.CAMPAIGN_DATA_NOT_FOUND:hc.DEFAULT_CAMPAIGN_NOT_FOUND,i(!1,n),l={}}let u={campaignId:d?.rule??"",campaignName:d?.name??"",campaignType:d?.type??"",campaignLabel:e?o:"",campaignUrl:t?o:"",paywallId:d?.flow?void 0:l?.id||"",paywallName:d?.flow?void 0:l?.name||"",segmentId:d?.segment,externalSegmentId:d?.external_segment??null,action:Ku.UNKNOWN};const c=ji.getPurchaseChannel();c&&(u={...u,purchaseChannel:c});const h=n?.productGroups,m=l?.sku_menus?.map((e=>e.ref));if((()=>{const e=ji.getNamiConfig()?.namiCommands;return e?.includes(le)??!1})()&&h?.length&&null!=m){const e=m?.filter((e=>h?.some((t=>t===e))));if(0==e.length)throw i(!1,hc.PRODUCT_GROUPS_NOT_FOUND),new Yi}if(d?.flow&&!Ds(d.flow.object?.screens??[]))throw i(!1,hc.FLOW_SCREEN_DATA_UNAVILABLE),new Vi;const f=new cc(l,u,d,n);return a&&this.instance.emitter.addListener(Ee,(({action:e,sku:t,videoMetaData:n,timeSpentOnPaywall:i,componentChange:r,purchaseError:o,purchases:s})=>{a({...u,action:e,sku:t,componentChange:r,purchaseError:o,purchases:s,timeSpentOnPaywall:i,videoMetaData:n})})),setTimeout((()=>i(!0)),0),f}static getProductGroups(e,t){const{type:n,value:i}=this.instance.campaignTypeAndLabel(e,t),a=Zs(i,n);return a.paywall?.sku_menus?.map((e=>e.ref))??[]}get sdkInitialized(){return yu.instance.isInitialized}campaignTypeAndLabel(e,t){let n,i="";return e&&!t&&Xs(e)?(i=e,n=xs.URL):e?(i=e,n=xs.LABEL):t&&(i=t,n=xs.URL),{type:n,value:i}}}fc.instance=new fc;class pc{constructor(){this.load()}setExternalId(e){return this.externalId=e,this}getExternalId(){return this.externalId}isLoggedIn(){return!!this.externalId}save(){return this.externalId?ji.setNamiProfile({externalId:this.externalId}):ji.removeNamiProfile(),this}load(){const e=ji.getNamiProfile();e&&(this.externalId=e.externalId),lu.setIsLoggedIn(!!this.externalId)}async login(e){const t=await Ps.instance.login(e);t.external_id&&lu.setIsLoggedIn(!0),this.setExternalId(t.external_id).save()}async logout(){await Ps.instance.logout(),lu.setIsLoggedIn(!1),this.setExternalId(void 0).save()}}pc.instance=new pc,function(e){e.LOGIN="login",e.LOGOUT="logout",e.ADVERTISING_ID_SET="advertising_id_set",e.ADVERTISING_ID_CLEARED="advertising_id_cleared",e.VENDOR_ID_SET="vendor_id_set",e.VENDOR_ID_CLEARED="vendor_id_cleared",e.CUSTOMER_DATA_PLATFORM_ID_SET="customer_data_platform_id_set",e.CUSTOMER_DATA_PLATFORM_ID_CLEARED="customer_data_platform_id_cleared",e.ANONYMOUS_MODE_ON="anonymous_mode_on",e.ANONYMOUS_MODE_OFF="anonymous_mode_off",e.NAMI_DEVICE_ID_SET="nami_device_id_set",e.NAMI_DEVICE_ID_CLEARED="nami_device_id_cleared"}(mc||(mc={}));class gc{constructor(){this.emitter=fl.getInstance(),ec.shared.registerNamespaceResolver("UserTags",(e=>{const t=e.replace("UserTags.",""),n=gc.getCustomerAttribute(t);if(null!=n){const e=n.toLowerCase();return"true"===e||"false"===e?"true"===e:isNaN(Number(n))?n:parseInt(n,10)}return null}))}static isLoggedIn(){return pc.instance.isLoggedIn()}static loggedInId(){return this.instance.isSDKInitialized||We.debug(b),pc.instance.getExternalId()}static async login(e){if(!this.instance.isSDKInitialized){const e=new Hi;throw this.invokeStateHandler(mc.LOGIN,!1,e),e}if(this.inAnonymousMode()){const e=new Ji;throw this.invokeStateHandler(mc.LOGIN,!1,e),e}try{if(await pc.instance.login(e),await mu.instance.fetchActiveEntitlements(),this.invokeStateHandler(mc.LOGIN,!0),dc.instance.flowOpen){const e=dc.instance.currentFlow,t=e?.currentFlowStep;t&&e.executeLifecycle(t,"__login_success__")}}catch(e){if(this.invokeStateHandler(mc.LOGIN,!1,e),dc.instance.flowOpen){const e=dc.instance.currentFlow,t=e?.currentFlowStep;t&&e.executeLifecycle(t,"__login_failure__")}throw e}}static async logout(){if(!this.instance.isSDKInitialized){const e=new Hi;throw this.invokeStateHandler(mc.LOGOUT,!1,e),e}if(this.inAnonymousMode()){const e=new Ji;throw this.invokeStateHandler(mc.LOGOUT,!1,e),e}try{if(await pc.instance.logout(),await mu.instance.fetchActiveEntitlements(),this.invokeStateHandler(mc.LOGOUT,!0),dc.instance.flowOpen){const e=dc.instance.currentFlow,t=e?.currentFlowStep;t&&e.executeLifecycle(t,"__logout_success__")}}catch(e){if(this.invokeStateHandler(mc.LOGOUT,!1,e),dc.instance.flowOpen){const e=dc.instance.currentFlow,t=e?.currentFlowStep;t&&e.executeLifecycle(t,"__logout_failure__")}throw e}}static async setCustomerDataPlatformId(e){await this.updateCustomerDataPlatformId(e)}static async clearCustomerDataPlatformId(){await this.updateCustomerDataPlatformId(null)}static registerAccountStateHandler(e){return this.instance.emitter.on("accountStateChange",e),()=>{this.instance.emitter.off("accountStateChange",e)}}static async setAnonymousMode(e){const t=e?mc.ANONYMOUS_MODE_ON:mc.ANONYMOUS_MODE_OFF;if(!this.instance.isSDKInitialized){const e=new Hi;throw this.invokeStateHandler(t,!1,e),e}if(this.anonymousModeCapability())if(this.inAnonymousMode()!==e)if(e)ji.setAnonymousMode(e),ji.resetDevice(),this.refetchConfig(),this.invokeStateHandler(mc.ANONYMOUS_MODE_ON,!0);else{ji.clearAnonymousMode();const e=ji.getNamiConfig()?.namiCommands;await vl.instance.createOrUpdateDevice(zs(e)),ji.clearAnonymousUUID(),this.refetchConfig(),this.invokeStateHandler(mc.ANONYMOUS_MODE_OFF,!0)}else{const n=e?new Ki:new qi;this.invokeStateHandler(t,!1,n)}else We.warn("Anonymous mode feature is not enabled for your Nami account. Contact support@nami.ml for details.")}static inAnonymousMode(){return!!this.instance.isSDKInitialized&&ji.getAnonymousMode()}static setCustomerAttribute(e,t){if(!this.instance.isSDKInitialized)throw new Hi;ji.setCustomerAttribute(e,t),ks(m.PAYWALL_PERSONALIZATION)?(lu.setCustomerAttribute({[e]:t}),We.debug(`This customer attribute you set is now available for paywall personalization using the smart text variable: ${e}`)):We.warn(`The customer attribute ${e} is not available for using on a paywall, because your account's plan does not include paywall personalization. Contact support@nami.ml for details.`)}static getCustomerAttribute(e){if(!this.instance.isSDKInitialized)throw new Hi;const t=ji.getCustomerAttribute(e);return null!=t?ks(m.PAYWALL_PERSONALIZATION)?We.debug(`Found customer attribute. ${e} is available for paywall personalization on this device.`):We.warn(`Found customer attribute. ${e} is not available for use on a paywall because paywall personalization is not included in your account's plan. Contact support@nami.ml for details.`):We.warn(`No ${e} customer attribute found.`),t}static getAllCustomerAttributes(){if(!this.instance.isSDKInitialized)throw new Hi;return ji.getAllCustomerAttributes()}static clearCustomerAttribute(e){if(!this.instance.isSDKInitialized)throw new Hi;ji.clearCustomerAttribute(e)?(lu.removeCustomerAttribute(e),We.warn(`This customer attribute has been cleared. ${e} is no longer available for paywall personalization on this device. A default value will be used if set in the Nami Control Center.`)):We.warn(`No value to clear for attribute ${e}.`)}static clearAllCustomerAttributes(){if(!this.instance.isSDKInitialized)throw new Hi;ji.getAllCustomerAttributesKeys().forEach((e=>{lu.removeCustomerAttribute(e)})),ji.clearAllCustomerAttributes(),We.warn("All customer attribute have been cleared. customer's smart text will no longer be personalized for this device. A default value will be used if set in the Nami Control Center.")}static journeyState(){if(!this.instance.isSDKInitialized)throw new Hi;return ji.getCustomerJourneyState()}static deviceId(){return this.instance.isSDKInitialized?ji.getDevice()?.id??x:x}static registerJourneyStateHandler(e){if(Ss("NamiCustomerManager.registerJourneyStateHandler"))return this.instance.emitter.addListener(Pe,e),()=>{this.instance.emitter.removeListener(Pe,e)}}static invokeStateHandler(e,t,n){this.instance.emitter.emit("accountStateChange",e,t,n)}get isSDKInitialized(){return yu.instance.isInitialized}static async updateCustomerDataPlatformId(e){if(!this.instance.isSDKInitialized){const e=new Hi;throw this.invokeStateHandler(mc.CUSTOMER_DATA_PLATFORM_ID_SET,!1,e),e}if(this.inAnonymousMode()){const e=new Qi;throw this.invokeStateHandler(mc.CUSTOMER_DATA_PLATFORM_ID_SET,!1,e),e}try{await vl.instance.updateDeviceField("customer_data_platform_id",e),this.invokeStateHandler(mc.CUSTOMER_DATA_PLATFORM_ID_SET,!0)}catch(e){this.invokeStateHandler(mc.CUSTOMER_DATA_PLATFORM_ID_SET,!1,e)}}static anonymousModeCapability(){if(!this.instance.isSDKInitialized)return!1;const e=ks(m.ANONYMOUS_MODE_CAPABILITY),t=ks(m.THIRD_PARTY_TRANSACTIONS);return e&&t}static async refetchConfig(){this.instance.isSDKInitialized&&await Promise.all([yl.instance.fetchProducts(),wl.instance.fetchPaywalls().then((e=>pl.instance.fetchCampaignRules(e)))])}}gc.instance=new gc;class vc{constructor(){this.emitter=fl.getInstance()}static allPaywalls(){if(!this.instance.sdkInitialized)throw new Hi;return Ls()}static setProductDetails(e){this.instance.productDetails=e,lu.setProductDetails(e)}static registerSignInHandler(e){return this.instance.emitter.addListener(oc.PAYWALL_SIGNIN_REQUESTED,e),()=>{this.instance.emitter.removeListener(oc.PAYWALL_SIGNIN_REQUESTED,e)}}static registerCloseHandler(e){return this.instance.emitter.addListener(oc.PAYWALL_CLOSE_REQUESTED,e),()=>{this.instance.emitter.removeListener(oc.PAYWALL_CLOSE_REQUESTED,e)}}static registerDeeplinkActionHandler(e){return this.instance.emitter.addListener(oc.PAYWALL_DEEPLINK_ACTION,e),()=>{this.instance.emitter.removeListener(oc.PAYWALL_DEEPLINK_ACTION,e)}}static registerBuySkuHandler(e){return Ss()&&We.debug("This handler will not be invoked because this account's plan includes built-in purchase management. Contact support@namiml.com for details."),this.instance.emitter.addListener(oc.REGISTER_BUY_SKU,e),()=>{this.instance.emitter.removeListener(oc.REGISTER_BUY_SKU,e)}}static registerRestoreHandler(e){return this.instance.emitter.addListener(oc.PAYWALL_RESTORE_REQUESTED,e),()=>{this.instance.emitter.removeListener(oc.PAYWALL_RESTORE_REQUESTED,e)}}static async buySkuComplete(e){if(lu.setPurchaseInProgress(!1),dc.instance.flowOpen){const e=dc.instance.currentFlow,t=e?.currentFlowStep;e&&t&&e.executeLifecycle(t,"__purchase_success__")}if(gc.inAnonymousMode())return void We.debug("Skipping purchase validation - anonymous mode");const t=ji.getSessionId(),n=ji.getPurchaseImpression();if(n){try{await(async e=>{if(ji.getAnonymousMode())We.info("Skipping transaction post - anonymous mode");else try{await Ps.instance.postConversion(e)}catch(e){We.error("Error posting conversion",e)}})({purchase_env:"production",app_env:"production",impression:n,session:t,amount:e.amount,currency:e.currency,transaction_id:e.transactionId,sku:e.skuId})}catch(e){We.error("Error posting conversion",e)}if(!ks(m.THIRD_PARTY_TRANSACTIONS))try{await Ps.instance.purchaseValidation({app_env:"production",payload:"",sku:e.skuId})}catch(e){We.error("Error validating purchase",e)}}else We.debug("Not sending paywall conversion call complete due to unknown impression")}static buySkuCancel(){ks(m.THIRD_PARTY_TRANSACTIONS)?lu.setPurchase(!1):We.warn("Call this method is not needed for this app because Nami is responsible for purchase management. Contact support@nami.ml for details.")}static setAppSuppliedVideoDetails(e,t){Xs(e)?(We.debug(`NamiPaywallManager: setAppSuppliedVideoDetails received valid url ${e}`),lu.setAppSuppliedVideoDetails({url:e,name:t})):We.debug(`NamiPaywallManager: setAppSuppliedVideoDetails received invalid url ${e}`)}static allowUserInteraction(e){We.debug(`NamiPaywallManager: allowUserInteraction called with ${e}`),lu.setUserInteractionEnabled(e)}get sdkInitialized(){return yu.instance.isInitialized}}vc.instance=new vc;class yc{constructor(){this.emitter=fl.getInstance()}static active(){return Ss(),uu()}static isEntitlementActive(e){return!!Ss("NamiEntitlementManager.isEntitlementActive")&&this.active().some((t=>t.referenceId==e))}static async refresh(){if(!this.instance.sdkInitialized)throw new Hi;return Ss("NamiEntitlementManager.refresh")?(await mu.instance.fetchActiveEntitlements(),uu()):[]}static registerActiveEntitlementsHandler(e){if(Ss("NamiEntitlementManager.registerActiveEntitlementsHandler"))return this.instance.emitter.addListener(Te,e),()=>{this.instance.emitter.removeListener(Te,e)}}static clearProvisionalEntitlementGrants(){let e=uu();e=e.filter((e=>e.expires&&e.expires>(new Date).valueOf())),ji.setNamiEntitlements(U,e),this.instance.emitter.emit(Te)}get sdkInitialized(){return yu.instance.isInitialized}}yc.instance=new yc;const wc={registerStepHandoff:dc.registerStepHandoff.bind(dc),registerEventHandler:dc.registerEventHandler.bind(dc),resume:dc.resume.bind(dc),finish:dc.finish.bind(dc),isFlowOpen:dc.isFlowOpen.bind(dc)},bc={upperLeft:"border-top-left-radius",upperRight:"border-top-right-radius",lowerLeft:"border-bottom-left-radius",lowerRight:"border-bottom-right-radius"},kc={left:"border-left-style",right:"border-right-style",top:"border-top-style",bottom:"border-bottom-style"},Sc={top:"start",left:"start",right:"end",bottom:"end",center:"center"};function Mc(e,t){let n;return n="number"==typeof e?e*t+"px":"fitContent"==e?"fit-content":e,`${n} !important`}function Ec(e,t){return e.includes("gradient")?`${t?`background-color: ${t};`:""} background-image: ${e};`:`${t?`background-color: ${t};`:""} background-color: ${e}; `}function Tc(e,t){return t&&e.focusedFillColor?Ec(e.focusedFillColor,e.focusedFillColorFallback):Ec(e.fillColor||"transparent",e.fillColorFallback)}function Pc({direction:e}){return`flex-direction: ${"vertical"===e?"column":"row"};`}function Ac(e){const{alignment:t,verticalAlignment:n,horizontalAlignment:i,direction:a}=e,r=n?Sc[n]:void 0,o=i?Sc[i]:void 0,s=t?Sc[t]:"center";let l,d;return r&&o?"vertical"===a?(d=r,l=o):(l=r,d=o):"vertical"===a?(l=o||s,d=r||"center"):(l=r||"center",d=o||s),`align-items:${l};justify-content:${d};`}function xc({grow:e}){return e?"flex-grow: 1;":""}function _c(e,t){return`\n padding-right: ${(e.rightPadding??0)*t}px;\n padding-left: ${(e.leftPadding??0)*t}px;\n padding-top: ${(e.topPadding??0)*t}px;\n padding-bottom: ${(e.bottomPadding??0)*t}px;\n margin-right: ${(e.rightMargin??0)*t}px;\n margin-left: ${(e.leftMargin??0)*t}px;\n margin-top: ${(e.topMargin??0)*t}px;\n margin-bottom: ${(e.bottomMargin??0)*t}px;\n `}function Cc({moveX:e=0,moveY:t=0}){return`\n left: ${"number"==typeof e?`${e}px`:e};\n transform: translate(\n 0,\n ${"number"==typeof t?`${t}px`:t}\n );\n `}function Lc(e,t,n){const i=n&&e.focusedBorderColor?e.focusedBorderColor:e.borderColor,a=(n&&e.focusedBorderRadius?e.focusedBorderRadius:e.borderRadius??0)*t,r=n&&e.focusedRoundBorders?e.focusedRoundBorders:e.roundBorders||null,o=r?r.map((e=>`${bc[e]}: ${a}px;`)).join("\n"):`border-radius: ${a}px;`,s=n&&e.focusedBorderWidth?e.focusedBorderWidth:e.borderWidth||0,l=n&&e.focusedBorders?e.focusedBorders:e.borders||[];return`\n border-color: ${i?`${i} !important`:"transparent"};\n border-width: ${s*t}px !important;\n ${l.length?l.map((e=>`${kc[e]}: solid;`)).join("\n"):"border-style: solid;"}\n ${o}\n `}function Ic(e,t){const n=e.width||e.fixedWidth,i=e.height||e.fixedHeight;return`\n max-width:100%;\n width: ${void 0!==n?`${Mc(n,t)};`:"100%;"}\n ${void 0!==i?`height: ${Mc(i,t)};`:""}\n `}function Dc({zIndex:e}){return`z-index: ${e??"initial"};`}function Rc(e){if(!e.dropShadow)return"";const t=new RegExp("(-?[0-9]+)\\s(-?[0-9]+)\\s([0-9]+)\\s(rgba?\\([0-9\\s\\/.]+\\))","gi").exec(e.dropShadow);return t&&5===t.length?`\n box-shadow: ${t[1]}px ${t[2]}px\n ${t[3]}px ${t[4]};\n `:""}function Wc(e){return e?"\n text-decoration: line-through;\n text-decoration-thickness: auto;\n ":""}function Nc({fontName:e}){const[t]=(e||"").split("-");return`font-family: '${e}', '${t}', 'Helvetica';`}function Oc(e,t,n){return`\n transition: all 0.3s;\n ${xc(e)}\n ${_c(e,t)}\n ${Cc(e)}\n ${Lc(e,t,n)}\n ${Ac(e)}\n ${Ic(e,t)}\n ${Dc(e)}\n ${Rc(e)}\n `}function Fc(e,t,n=1){return`\n transition: all 0.3s;\n ${xc(e)}\n ${_c(e,n)}\n ${Cc(e)}\n ${Lc(e,n,t)}\n ${Ic(e,n)}\n ${Dc(e)}\n ${Rc(e)}\n `}function jc(e){if(!e)return"position: relative;";const[t,n]=e.split("-");return`\n position: absolute;\n align-self: ${t};\n ${n}: 0;\n `}function zc(e,t){return Object.keys(t).filter((t=>t.startsWith(e))).reduce(((n,i)=>{const a=function(e,t){const n=e.replace(t,"");return n.charAt(0).toLowerCase()+n.slice(1)}(i,e);return n[a]=t[i],n}),{})}function $c(e,t,n){return`\n ${Tc(e,n)}\n ${Uc(e,t)}\n ${Oc(e,t,n)}\n width: 50% !important;\n height: 100% !important;\n `}function Uc(e,t){return`\n ${e.fontColor?`color: ${e.fontColor};`:""}\n font-size: ${(e.fontSize??12)*t}px;\n text-align: ${e.alignment||"center"};\n font-family: '${e.fontName}', '${(e.fontName||"").split("-")}', 'Helvetica';\n `}let Hc=class extends Yu{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1}styles(){const e=this.component,t=e.height||e.fixedHeight||e.width||e.fixedWidth;return a(`\n :host {\n display: ${e.hidden?"none":"block"};\n ${t?"":"flex-grow: 1;"}\n ${Oc(e,this.scaleFactor,this.inFocusedState)}\n }\n `)}render(){return i``}};function Bc(e,t){return Array.isArray(e)?e.reduce(((e,n)=>{const i=Bc(n,t);return Array.isArray(i)?[...e,...i]:[...e,i]}),[]):null==e?e:"object"==typeof e?Object.entries(e).reduce(((e,[n,i])=>{const a="newRow"===n?i:Bc(i,t);return{...e,[n]:a}}),{}):"string"==typeof e?qc(e,t):e}function Gc(e,t,n={}){const i=t.productBaseComponents||t.components||[],a=t.productFeaturedComponents||i;return e.map((e=>{const t=e.featured?a:i,r=e.entitlements.map((e=>e.entitlement_ref_id)),o=iu(lu.productDetails,e.sku_ref_id),s={freeTrialEligible:1==Nl("freeTrialEligible",o),introEligible:1==Nl("introEligible",o),promoEligible:1==Nl("promoEligible",o)},l={...e,...e.variables,...s,id:e.id,entitlements:r};!function(e,t){const n=e=>{for(const i of e)i.sku=hu(t),i.components&&n(i.components),i.collapseHeader&&i.collapseHeader.components&&n(i.collapseHeader.components)};n(e)}(t,e);const d={sku:l,media:Kc(n,{convertToUrl:!0})};return[e.featured??!1,Bc(t,Bc(d,d))]}),[])}function Xc(e){return e.assertions?e.assertions.every(Vc):!!e.orAssertions&&(!e.orAssertions.length||e.orAssertions.some(Vc))}function Yc(e,t,n=null){const i=lu.state;let a={};return n&&(a={block:n}),a={...a,state:i,launch:i.launch,sku:i.sku,customer:i.customer},"string"==typeof e&&e.includes(Ce)&&(e=qc(e,a)),e}function Vc({value:e,expected:t,operator:n},i){const a=/\${[A-Za-z.]+}/g;return e=Yc(e,0,i),t=Yc(t,0,i),"equals"===n?e===t:"notEquals"===n?e!==t:"contains"===n?(Array.isArray(e)||"string"==typeof e||e instanceof String||(e=e.toString()),"collapse"==t&&(t+="_"+lu.getCurrentCollapsibleSku()?.skuId),e.includes(t)):"notContains"===n?(Array.isArray(e)||"string"==typeof e||e instanceof String||(e=e.toString()),!e.includes(t)):"set"===n?!!e&&!e.toString().match(a):"notSet"===n&&(!e||e.toString().match(a))}function Kc(e,{convertToUrl:t}={convertToUrl:!1}){return Object.entries(e).reduce(((e,[n,{content:i}])=>(t&&"string"!=typeof i&&i&&(i=URL.createObjectURL(i)),{...e,[n]:i})),{})}function qc(e,t){let n=e;if("string"!=typeof e)return n;for(const[a,r]of Array.from(e.matchAll(xe))){const o=qc(r,t);if(a===e)return i(a,o);o!==r&&(n=n.replace(r,o)),n=n.replace(xe,i)}return n;function i(e,n){const i=function(e,...t){let n=e;for(const e of t){if(null==n)return;n=Array.isArray(n)?n[+e]:n[e]}return n}(t,...n.split("."));return void 0===i?e:"string"!=typeof i?i:qc(i,t)}}c([Xu({type:Object})],Hc.prototype,"component",void 0),c([Xu({type:Boolean})],Hc.prototype,"inFocusedState",void 0),c([Xu({type:Number})],Hc.prototype,"scaleFactor",void 0),Hc=c([ku("nami-spacer")],Hc);const Jc=()=>{const e=lu.state.timeSpentOnPaywall;if(e)return Date.now()-e},Qc=e=>{if(e?.includes("#"))return e;const t=e?.match(/\d+/g);if(!t||t.length<3)return null;return"#"+t.slice(0,3).map((e=>{const t=parseInt(e).toString(16);return 1===t.length?"0"+t:t})).join("")},Zc=(e,t)=>{if(!e||!t)return!0;const n=e?.includes("rgb")?Qc(e):e,i=t?.includes("rgb")?Qc(t):t;return n?.toLowerCase()===i?.toLowerCase()};function eh(e,t,n){if("condition"===e.component){if(!Xc(e))return null;const i=e.components?.map((e=>eh(e,t,n)));return i}return e.conditionAttributes&&(e=function({conditionAttributes:e,...t}){return e?e.reduce(((e,t)=>Xc(t)?(Object.entries(t.attributes).forEach((([e,n])=>{t.attributes[e]=Yc(n)})),{...e,...t.attributes}):e),t):t}(e)),Object.keys(e).forEach((t=>{e[t]=Yc(e[t])})),((e,t,n)=>{const a=e.component;switch(a){case"spacer":return i`<nami-spacer .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-spacer>`;case"button":return i`<nami-button .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-button>`;case"text":return i`<nami-text .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-text>`;case"text-list":return i`<nami-text-list .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-text-list>`;case"segmentPicker":return i`<nami-segment-picker .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-segment-picker>`;case"segmentPickerItem":return i`<nami-segment-picker-item .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-segment-picker-item>`;case"container":return i`<nami-container .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-container>`;case"productContainer":return i`<nami-product-container .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-product-container>`;case"image":return i`<nami-image .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-image>`;case"videoUrl":return i`<nami-video .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-video>`;case"symbol":return i`<nami-symbol .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-symbol>`;case"collapseContainer":return i`<nami-collapse-container .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-collapse-container>`;case"responsiveGrid":return i`<nami-responsive-grid .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-responsive-grid>`;case"carouselContainer":return i`<nami-carousel-container .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-carousel-container>`;case"playPauseButton":return i`<nami-play-pause-button .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-play-pause-button>`;case"volumeButton":return i`<nami-volume-button .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-volume-button>`;case"stack":return i`<nami-stack .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-stack>`;case"qrCode":return i`<nami-qr-code .component=${e} .scaleFactor=${t} .inFocusedState=${n}></nami-qr-code>`;default:return We.debug("Cannot render component:",a),i``}})(e,t,n??!1)}const{NAMI_CLOSE_PAYWALL:th="namiClosePaywall",NAMI_RESTORE_PURCHASES:nh="namiRestorePurchases",NAMI_SIGN_IN:ih="namiSignIn",NAMI_BUY_SKU:ah="namiBuySKU",SET_STATE:rh="setState",NAMI_SELECT_SKU:oh="namiSelectSKU",NAMI_PURCHASE_SELECTED_SKU:sh="namiPurchaseSelectedSKU",NAMI_DEEP_LINK:lh="namiDeeplink",NAMI_NAVIGATE_TO_SCREEN:dh="namiNavigateToScreen",NAMI_RELOAD_PRODUCTS:uh="namiReloadProducts",UNSUPPORTED:ch="",NAMI_PURCHASE_SUCCESS:hh="namiPurchaseSuccess",NAMI_PURCHASE_CANCELLED:mh="namiPurchaseCancelled",NAMI_PURCHASE_FAILED:fh="namiPurchaseFailed",NAMI_PURCHASE_PENDING:ph="namiPurchasePending",NAMI_PURCHASE_UNKNOWN:gh="namiPurchaseUnknown",NAMI_SHOW_PAYWALL:vh="namiShowPaywall",NAMI_PAGE_CHANGE:yh="namiPageChange",NAMI_TOGGLE_CHANGE:wh="namiToggleChange",NAMI_SLIDE_CHANGE:bh="namiSlideChange",NAMI_PLAY_VIDEO:kh="namiPlayVideo",NAMI_PAUSE_VIDEO:Sh="namiPauseVideo",NAMI_MUTE_VIDEO:Mh="namiMuteVideo",NAMI_UNMUTE_VIDEO:Eh="namiUnmuteVideo"}={};var Th,Ph;!function(e){e.DEFAULT="default",e.LABEL="label",e.URL="url"}(Th||(Th={})),function(e){e.DEEPLINK="deeplink",e.IN_APP="in_app"}(Ph||(Ph={}));class Ah{constructor(e,t="",n=""){this.playing=!0,this.toggling=!1,this.handleVideoEvents=()=>{this.video.onended=()=>{this.handlePlayerAnalytics(Ku.VIDEO_ENDED)},this.video.onpause=()=>{this.toggling||this.handlePlayerAnalytics(Ku.VIDEO_PAUSED)},this.video.onplay=()=>{this.toggling||this.handlePlayerAnalytics(this.video.currentTime>.05?Ku.VIDEO_RESUMED:Ku.VIDEO_STARTED)},this.video.onvolumechange=()=>{this.toggling||(this.muted=!this.muted,this.handlePlayerAnalytics(this.muted?Ku.VIDEO_MUTED:Ku.VIDEO_UNMUTED))}},this.video=e??this.video,Ah.instance?.videoSrc&&e.src!=Ah.instance.videoSrc&&this.handlePlayerAnalytics(Ku.VIDEO_CHANGED),this.videoSrc=e.src,this.video&&(this.muteByDefault=e.muted,this.loopVideo=e.loop,this.autoplayVideo=e.autoplay,this.muted=this.video.muted,this.videoComponentName=t,this.videoComponentId=n,this.playing=this.video.readyState>2?!(!(this.video.currentTime>0)||this.video.paused||this.video.ended):this.playing,this.handleVideoEvents())}togglePlayVideo(){this.toggling=!0,this.playing?this.video.pause():this.video.play(),this.playing=!this.playing,this.handlePlayerAnalytics()}toggleMuteVideo(){this.toggling=!0,this.video.muted=!this.video.muted,this.muted=this.video.muted,this.handlePlayerAnalytics(this.muted?Ku.VIDEO_MUTED:Ku.VIDEO_UNMUTED)}videoPlayingAction(){return this.video?.currentTime<=0?Ku.VIDEO_STARTED:this.video.paused?Ku.VIDEO_PAUSED:this.video.ended?Ku.VIDEO_ENDED:this.video?.currentTime>.05?Ku.VIDEO_RESUMED:Ku.UNKNOWN}handlePlayerAnalytics(e){if(!this.video)return;const t={id:this.videoComponentId,name:this.videoComponentName,url:this.video.src,loopVideo:this.loopVideo,muteByDefault:this.muteByDefault,autoplayVideo:this.autoplayVideo,contentDuration:this.video.duration/1e3,contentTimecode:this.video.currentTime/1e3};fl.getInstance().emit(Ee,{action:e??this.videoPlayingAction(),videoMetaData:t,timeSpentOnPaywall:Jc()})}}const xh=(e,t,n)=>{let i,a=Ku.UNKNOWN;switch(e?.function){case th:a=Ku.CLOSE_PAYWALL,i=Jc(),_h(),Ah.instance?.handlePlayerAnalytics(Ku.VIDEO_ENDED);break;case nh:a=Ku.RESTORE_PURCHASES,Ch();break;case ih:a=Ku.SIGN_IN,Lh();break;case lh:Ih(e.parameters?.url);break;case ah:t&&(a=Ku.BUY_SKU,t=Dh(e,t));break;case dh:a=Ku.PAGE_CHANGE,n={name:e?.parameters?.screen},Rh(e?.parameters?.screen);break;case rh:a=Ku.TOGGLE_CHANGE,n=Wh();break;case oh:t&&(a=Ku.SELECT_SKU,Nh(t));break;case sh:t&&(a=Ku.PURCHASE_SELECTED_SKU,Oh(t));break;case uh:break;case kh:case Sh:Ah.instance.togglePlayVideo();break;case Mh:case Eh:Ah.instance.toggleMuteVideo()}a!==Ku.UNKNOWN&&fl.getInstance().emit(Ee,{action:a,sku:t,timeSpentOnPaywall:i,componentChange:n,purchaseError:undefined,purchases:undefined})},_h=()=>{if(!Fh(oc.PAYWALL_CLOSE_REQUESTED)&&"undefined"!=typeof window)return window.history.back(),void lu.resetAppSuppliedVideoDetails()},Ch=()=>{const e=ks(m.THIRD_PARTY_TRANSACTIONS);Fh(oc.PAYWALL_RESTORE_REQUESTED)||e||We.warn("NamiPaywallManager.registerRestoreHandler is not registered, so restore option on the paywall will use default behavior.")},Lh=()=>{Fh(oc.PAYWALL_SIGNIN_REQUESTED)},Ih=e=>{e?Fh(oc.PAYWALL_DEEPLINK_ACTION,e)||"undefined"!=typeof window&&window.open(e,"_blank"):We.debug("Paywall deep link action invoked, but no url present.")},Dh=(e,t)=>{const n=e.parameters?.promo,i=t;if(n)We.debug(`promo id is not null ${t?.id}`),i.promoId=n.toString();else{We.debug(`promo id is null for ${t.id}, product details: ${JSON.stringify(t.productDetails)}`);const e=t.productDetails;if(Sl(e?.product_type)){const t=function(e){return e.offers.find((e=>"promo"===e.offer_type&&0===e.price))}(e);if(t&&t.offer_ref_id)We.debug(`Found a free trial offer ${t.offer_ref_id}`),i.promoId=t.offer_ref_id.toString();else{const t=e.offers[0];t&&(We.debug(`Found an offer ${t.offer_ref_id}`),i.promoId=t.offer_ref_id?.toString())}}}return function(e){if(ks(m.THIRD_PARTY_TRANSACTIONS)){if(ji.setPurchaseImpression(),fl.getInstance().listenerCount(oc.REGISTER_BUY_SKU)<=0)return void We.warn("In order for Nami to hand off the purchase so the transaction can be handled by, you must register a NamiBuySkuHandler callbackwith NamiPaywallManager.registerBuySkuHandler.");We.info(`Handing off purchase for processing by developer skuId=${e.skuId} promoId=${e.promoId}`),Fh(oc.REGISTER_BUY_SKU,e)}else{const t=function(e){if(!Ss("NamiPurchaseManager.buySKU"))return;const t=ji.getCachedProducts(),n=t?.find((t=>t.sku_ref_id==e));return{success:!!n,billingResponseCode:n?0:-999}}(e.skuId);if(t&&(We.info(`Purchase flow completed, success=${t.success}, code=${t.billingResponseCode}, message=${t.message}`),t.success)){fl.getInstance().emit(Ee,{action:Ku.CLOSE_PAYWALL,sku:e,timeSpentOnPaywall:Jc()}),Ah.instance?.handlePlayerAnalytics(Ku.VIDEO_ENDED);const t=lu.getSelectedCampaign();t&&t.conversion_event_type==Ph.IN_APP&&t.conversion_event_url?window.location.href=t.conversion_event_url:_h()}}}(i),i},Rh=e=>{e&&(window.history.state?.prevUrl==e?window.history.back():lu.setCurrentPage(e))},Wh=()=>{const e=vc.allPaywalls().find((e=>e.id===lu.paywallId())),t=lu.getCurrentGroupId(),n=lu.getCurrentGroupName();return e&&(e.template.initialState={...e.template.initialState,currentGroupId:t,currentGroupName:n},lu.setPaywall(e)),{id:t,name:n}},Nh=e=>{const t=lu.getCurrentGroupId(),n=lu.selectedProducts();t&&e.id!=n[t]&&(n[t]=e.id,lu.setSelectedProdcuts(n))},Oh=e=>{lu.setPurchase(!0,e)};function Fh(e,...t){const n=fl.getInstance();return n.emit(e,...t),n.listenerCount(e)>0}const{SHOULD_SHOW_LOADING_INDICATOR:jh=!1}={};let zh=class extends Yu{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this._handleKeyUp=e=>{"Enter"!==e.key&&" "!==e.key||(this._handleClick(),e.preventDefault())},this._handleClick=()=>{if(this.component.url)return void window.open(this.component.url,"_blank");const{onTap:e,sku:t}=this.component;if(e?.parameters?.partialState?.currentGroupId&&lu.setCurrentGroupData(e?.parameters?.partialState?.currentGroupId,""),lu.flow&&this.component.id){if(lu.flow.currentStepHasHoistedPrimaryActions(this.component.id))return We.debug(`Trigger NamiFlow action for component ${this.component.id}`),void lu.flow.triggerActions(this.component.id);if(function(e){return[ih,lh,nh,th].includes(e?.function??"")}(e))return lu.flow.triggerBeforeActions(this.component.id,this),xh(e,t),void lu.flow.triggerAfterActions(this.component.id,this)}xh(e,t)},this.addEventListener("click",this._handleClick,!1),this.addEventListener("focus",this._handleFocus.bind(this),!0),this.addEventListener("blur",this._handleBlur.bind(this),!0),this.addEventListener("keyup",this._handleKeyUp)}firstTextValue(){const{components:e=[]}=this.component;for(const t of e)if("text"===t.component&&"text"in t)return t.text}connectedCallback(){super.connectedCallback(),this.inFocusedState&&setTimeout((()=>{this._dispatchPageChange(),this.focus()}),0)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}updated(){this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=this.component.screenreaderHint??""}firstUpdated(){this.component.focused&&(this._dispatchPageChange(),this.focus())}_handleFocus(){this.inFocusedState=!0,this._dispatchFocusChange()}_handleBlur(){this.inFocusedState=!1,this._dispatchFocusChange()}_dispatchFocusChange(){this.dispatchEvent(new CustomEvent("focus-changed",{detail:{inFocusedState:this.inFocusedState},bubbles:!0,composed:!0}))}_dispatchPageChange(){this.dispatchEvent(new CustomEvent("page-changed",{bubbles:!0,composed:!0,detail:{lastTarget:this}}))}styles(){const{component:e,scaleFactor:t}=this;return a(`\n :host {\n display: ${e.hidden?"none":"flex"};\n gap: ${e.spacing??0}px;\n flex-direction: column;\n cursor: pointer;\n height: 100%;\n ${Tc(e,!1)}\n ${Pc(e)}\n ${Oc(e,t,!1)}\n }\n :host(:focus){\n ${Tc(e,!0)}\n ${Oc(e,t,!0)}\n }\n .loader {\n display: inline-block;\n width: 20px;\n height: 20px;\n border: 2px solid #fff;\n border-radius: 50%;\n border-top: 2px solid #000;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n `)}render(){this.tabIndex=0;const e=this.contextConsumer.state.purchaseInProgress&&this.component.sku?.id==this.contextConsumer.state.productBeingPurchased?.id;if(this.role="button",this.ariaDisabled=e?"true":"false",jh&&e)return i`<span class="loader"></span>`;return function(e){const t={sku:lu.state.sku};return Bc(e.components||[],Bc(t,t))}(this.component).map((e=>eh(e,this.scaleFactor,this.inFocusedState)))}};c([Xu({type:Object})],zh.prototype,"component",void 0),c([Xu({type:Boolean})],zh.prototype,"inFocusedState",void 0),c([Xu({type:Number})],zh.prototype,"scaleFactor",void 0),zh=c([ku("nami-button")],zh);let $h=class extends Yu{constructor(){super(...arguments),this.components=[],this.zIndex="2",this.inFocusedState=!1,this.scaleFactor=1}styles(){const{formFactor:e}=this.contextConsumer.state,t="phone"!==e||this.inFullScreen?0:40;return a(`\n :host {\n display: flex;\n position: relative;\n width: 100%;\n align-items: center;\n justify-content: center;\n z-index: ${parseInt(this.zIndex,10)};\n margin-top: ${t}px;\n }`)}render(){return this.components.map((e=>eh(e,this.scaleFactor,this.inFocusedState)))}};c([Xu({type:Array})],$h.prototype,"components",void 0),c([Xu({type:String})],$h.prototype,"zIndex",void 0),c([Xu({type:Boolean})],$h.prototype,"inFullScreen",void 0),c([Xu({type:Boolean})],$h.prototype,"inFocusedState",void 0),c([Xu({type:Number})],$h.prototype,"scaleFactor",void 0),$h=c([ku("nami-header")],$h);let Uh=class extends Yu{constructor(){super(...arguments),this.components=[],this.zIndex="3",this.inFocusedState=!1,this.scaleFactor=1}styles(){return a(`\n :host {\n text-align: center !important;\n bottom: 0;\n position: absolute;\n width: 100%;\n z-index: ${this.zIndex};\n transition: all 0.3s;\n }\n `)}render(){return(this.components??[]).map((e=>eh(e,this.scaleFactor,this.inFocusedState)))}};function Hh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}c([Xu({type:Array})],Uh.prototype,"components",void 0),c([Xu({type:String})],Uh.prototype,"zIndex",void 0),c([Xu({type:Boolean})],Uh.prototype,"inFocusedState",void 0),c([Xu({type:Number})],Uh.prototype,"scaleFactor",void 0),Uh=c([ku("nami-footer")],Uh);let Bh={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Gh(e){Bh=e}const Xh=/[&<>"']/,Yh=new RegExp(Xh.source,"g"),Vh=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Kh=new RegExp(Vh.source,"g"),qh={"&":"&","<":"<",">":">",'"':""","'":"'"},Jh=e=>qh[e];function Qh(e,t){if(t){if(Xh.test(e))return e.replace(Yh,Jh)}else if(Vh.test(e))return e.replace(Kh,Jh);return e}const Zh=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function em(e){return e.replace(Zh,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const tm=/(^|[^\[])\^/g;function nm(e,t){let n="string"==typeof e?e:e.source;t=t||"";const i={replace:(e,t)=>{let a="string"==typeof t?t:t.source;return a=a.replace(tm,"$1"),n=n.replace(e,a),i},getRegex:()=>new RegExp(n,t)};return i}function im(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const am={exec:()=>null};function rm(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let i=!1,a=t;for(;--a>=0&&"\\"===n[a];)i=!i;return i?"|":" |"})).split(/ \|/);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(/\\\|/g,"|");return n}function om(e,t,n){const i=e.length;if(0===i)return"";let a=0;for(;a<i;){const r=e.charAt(i-a-1);if(r!==t||n){if(r===t||!n)break;a++}else a++}return e.slice(0,i-a)}function sm(e,t,n,i){const a=t.href,r=t.title?Qh(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){i.state.inLink=!0;const e={type:"link",raw:n,href:a,title:r,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,e}return{type:"image",raw:n,href:a,title:r,text:Qh(o)}}class lm{options;rules;lexer;constructor(e){this.options=e||Bh}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:om(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const i=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=i.length?e.slice(i.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=om(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1");e=om(e.replace(/^ *>[ \t]?/gm,""),"\n");const n=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:i,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");const r=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let o="",s="",l=!1;for(;e;){let n=!1;if(!(t=r.exec(e)))break;if(this.rules.block.hr.test(e))break;o=t[0],e=e.substring(o.length);let i=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),d=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,s=i.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,s=i.slice(u),u+=t[1].length);let c=!1;if(!i&&/^ *$/.test(d)&&(o+=d+"\n",e=e.substring(d.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),a=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),r=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const l=e.split("\n",1)[0];if(d=l,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),a.test(d))break;if(r.test(d))break;if(t.test(d))break;if(n.test(e))break;if(d.search(/[^ ]/)>=u||!d.trim())s+="\n"+d.slice(u);else{if(c)break;if(i.search(/[^ ]/)>=4)break;if(a.test(i))break;if(r.test(i))break;if(n.test(i))break;s+="\n"+d}c||d.trim()||(c=!0),o+=l+"\n",e=e.substring(l.length+1),i=d.slice(u)}}a.loose||(l?a.loose=!0:/\n *\n *$/.test(o)&&(l=!0));let h,m=null;this.options.gfm&&(m=/^\[[ xX]\] /.exec(s),m&&(h="[ ] "!==m[0],s=s.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:o,task:!!m,checked:h,loose:!1,text:s,tokens:[]}),a.raw+=o}a.items[a.items.length-1].raw=o.trimEnd(),a.items[a.items.length-1].text=s.trimEnd(),a.raw=a.raw.trimEnd();for(let e=0;e<a.items.length;e++)if(this.lexer.state.top=!1,a.items[e].tokens=this.lexer.blockTokens(a.items[e].text,[]),!a.loose){const t=a.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));a.loose=n}if(a.loose)for(let e=0;e<a.items.length;e++)a.items[e].loose=!0;return a}}html(e){const t=this.rules.block.html.exec(e);if(t){return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:i}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=rm(t[1]),i=t[2].replace(/^\||\| *$/g,"").split("|"),a=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],r={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===i.length){for(const e of i)/^ *-+: *$/.test(e)?r.align.push("right"):/^ *:-+: *$/.test(e)?r.align.push("center"):/^ *:-+ *$/.test(e)?r.align.push("left"):r.align.push(null);for(const e of n)r.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of a)r.rows.push(rm(e,r.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return r}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Qh(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=om(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let i=0;i<e.length;i++)if("\\"===e[i])i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&(n--,n<0))return i;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],i="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],i=e[3])}else i=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),sm(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return sm(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i)return;if(i[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...i[0]].length-1;let a,r,o=n,s=0;const l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(i=l.exec(t));){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(r=[...a].length,i[3]||i[4]){o+=r;continue}if((i[5]||i[6])&&n%3&&!((n+r)%3)){s+=r;continue}if(o-=r,o>0)continue;r=Math.min(r,r+o+s);const t=[...i[0]][0].length,l=e.slice(0,n+i.index+t+r);if(Math.min(n,r)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const d=l.slice(2,-2);return{type:"strong",raw:l,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),i=/^ /.test(e)&&/ $/.test(e);return n&&i&&(e=e.substring(1,e.length-1)),e=Qh(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=Qh(t[1]),n="mailto:"+e):(e=Qh(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=Qh(t[0]),n="mailto:"+e;else{let i;do{i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(i!==t[0]);e=Qh(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:Qh(t[0]),{type:"text",raw:t[0],text:e}}}}const dm=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,um=/(?:[*+-]|\d{1,9}[.)])/,cm=nm(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,um).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),hm=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,mm=/(?!\s*\])(?:\\.|[^\[\]\\])+/,fm=nm(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",mm).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),pm=nm(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,um).getRegex(),gm="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",vm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ym=nm("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",vm).replace("tag",gm).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wm=nm(hm).replace("hr",dm).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",gm).getRegex(),bm={blockquote:nm(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",wm).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:fm,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:dm,html:ym,lheading:cm,list:pm,newline:/^(?: *(?:\n|$))+/,paragraph:wm,table:am,text:/^[^\n]+/},km=nm("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",dm).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",gm).getRegex(),Sm={...bm,table:km,paragraph:nm(hm).replace("hr",dm).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",km).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",gm).getRegex()},Mm={...bm,html:nm("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",vm).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:am,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:nm(hm).replace("hr",dm).replace("heading"," *#{1,6} *[^\n]").replace("lheading",cm).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Em=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Tm=/^( {2,}|\\)\n(?!\s*$)/,Pm="\\p{P}\\p{S}",Am=nm(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Pm).getRegex(),xm=nm(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Pm).getRegex(),_m=nm("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Pm).getRegex(),Cm=nm("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Pm).getRegex(),Lm=nm(/\\([punct])/,"gu").replace(/punct/g,Pm).getRegex(),Im=nm(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[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])?)+(?![-_])/).getRegex(),Dm=nm(vm).replace("(?:--\x3e|$)","--\x3e").getRegex(),Rm=nm("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Dm).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Wm=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Nm=nm(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Wm).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Om=nm(/^!?\[(label)\]\[(ref)\]/).replace("label",Wm).replace("ref",mm).getRegex(),Fm=nm(/^!?\[(ref)\](?:\[\])?/).replace("ref",mm).getRegex(),jm={_backpedal:am,anyPunctuation:Lm,autolink:Im,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:Tm,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:am,emStrongLDelim:xm,emStrongRDelimAst:_m,emStrongRDelimUnd:Cm,escape:Em,link:Nm,nolink:Fm,punctuation:Am,reflink:Om,reflinkSearch:nm("reflink|nolink(?!\\()","g").replace("reflink",Om).replace("nolink",Fm).getRegex(),tag:Rm,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:am},zm={...jm,link:nm(/^!?\[(label)\]\((.*?)\)/).replace("label",Wm).getRegex(),reflink:nm(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Wm).getRegex()},$m={...jm,escape:nm(Em).replace("])","~|])").getRegex(),url:nm(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Um={...$m,br:nm(Tm).replace("{2,}","*").getRegex(),text:nm($m.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Hm={normal:bm,gfm:Sm,pedantic:Mm},Bm={normal:jm,gfm:$m,breaks:Um,pedantic:zm};class Gm{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Bh,this.options.tokenizer=this.options.tokenizer||new lm,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:Hm.normal,inline:Bm.normal};this.options.pedantic?(t.block=Hm.pedantic,t.inline=Bm.pedantic):this.options.gfm&&(t.block=Hm.gfm,this.options.breaks?t.inline=Bm.breaks:t.inline=Bm.gfm),this.tokenizer.rules=t}static get rules(){return{block:Hm,inline:Bm}}static lex(e,t){return new Gm(t).lex(e)}static lexInline(e,t){return new Gm(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[]){let n,i,a,r;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,n)=>t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((i=>!!(n=i.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),i=t[t.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?t.push(n):(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),i=t[t.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(i.raw+="\n"+n.raw,i.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(a=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let i;this.options.extensions.startBlock.forEach((e=>{i=e.call({lexer:this},n),"number"==typeof i&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a)))i=t[t.length-1],r&&"paragraph"===i.type?(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(n),r=a.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),i=t[t.length-1],i&&"text"===i.type?(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,i,a,r,o,s,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,r.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(o||(s=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((i=>!!(n=i.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),i=t[t.length-1],i&&"text"===n.type&&"text"===i.type?(i.raw+=n.raw,i.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),i=t[t.length-1],i&&"text"===n.type&&"text"===i.type?(i.raw+=n.raw,i.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,l,s))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(a=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let i;this.options.extensions.startInline.forEach((e=>{i=e.call({lexer:this},n),"number"==typeof i&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(a))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),o=!0,i=t[t.length-1],i&&"text"===i.type?(i.raw+=n.raw,i.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class Xm{options;constructor(e){this.options=e||Bh}code(e,t,n){const i=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",i?'<pre><code class="language-'+Qh(i)+'">'+(n?e:Qh(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:Qh(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e,t){return e}heading(e,t,n){return`<h${t}>${e}</h${t}>\n`}hr(){return"<hr>\n"}list(e,t,n){const i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+i+">\n"}listitem(e,t,n){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){const i=im(e);if(null===i)return n;let a='<a href="'+(e=i)+'"';return t&&(a+=' title="'+t+'"'),a+=">"+n+"</a>",a}image(e,t,n){const i=im(e);if(null===i)return n;let a=`<img src="${e=i}" alt="${n}"`;return t&&(a+=` title="${t}"`),a+=">",a}text(e){return e}}class Ym{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class Vm{options;renderer;textRenderer;constructor(e){this.options=e||Bh,this.options.renderer=this.options.renderer||new Xm,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ym}static parse(e,t){return new Vm(t).parse(e)}static parseInline(e,t){return new Vm(t).parseInline(e)}parse(e,t=!0){let n="";for(let i=0;i<e.length;i++){const a=e[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const e=a,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}switch(a.type){case"space":continue;case"hr":n+=this.renderer.hr();continue;case"heading":{const e=a;n+=this.renderer.heading(this.parseInline(e.tokens),e.depth,em(this.parseInline(e.tokens,this.textRenderer)));continue}case"code":{const e=a;n+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=a;let t="",i="";for(let t=0;t<e.header.length;t++)i+=this.renderer.tablecell(this.parseInline(e.header[t].tokens),{header:!0,align:e.align[t]});t+=this.renderer.tablerow(i);let r="";for(let t=0;t<e.rows.length;t++){const n=e.rows[t];i="";for(let t=0;t<n.length;t++)i+=this.renderer.tablecell(this.parseInline(n[t].tokens),{header:!1,align:e.align[t]});r+=this.renderer.tablerow(i)}n+=this.renderer.table(t,r);continue}case"blockquote":{const e=a,t=this.parse(e.tokens);n+=this.renderer.blockquote(t);continue}case"list":{const e=a,t=e.ordered,i=e.start,r=e.loose;let o="";for(let t=0;t<e.items.length;t++){const n=e.items[t],i=n.checked,a=n.task;let s="";if(n.task){const e=this.renderer.checkbox(!!i);r?n.tokens.length>0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):s+=e+" "}s+=this.parse(n.tokens,r),o+=this.renderer.listitem(s,a,!!i)}n+=this.renderer.list(o,t,i);continue}case"html":{const e=a;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=a;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let r=a,o=r.tokens?this.parseInline(r.tokens):r.text;for(;i+1<e.length&&"text"===e[i+1].type;)r=e[++i],o+="\n"+(r.tokens?this.parseInline(r.tokens):r.text);n+=t?this.renderer.paragraph(o):o;continue}default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let i=0;i<e.length;i++){const a=e[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const e=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=e||"";continue}}switch(a.type){case"escape":{const e=a;n+=t.text(e.text);break}case"html":{const e=a;n+=t.html(e.text);break}case"link":{const e=a;n+=t.link(e.href,e.title,this.parseInline(e.tokens,t));break}case"image":{const e=a;n+=t.image(e.href,e.title,e.text);break}case"strong":{const e=a;n+=t.strong(this.parseInline(e.tokens,t));break}case"em":{const e=a;n+=t.em(this.parseInline(e.tokens,t));break}case"codespan":{const e=a;n+=t.codespan(e.text);break}case"br":n+=t.br();break;case"del":{const e=a;n+=t.del(this.parseInline(e.tokens,t));break}case"text":{const e=a;n+=t.text(e.text);break}default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class Km{options;constructor(e){this.options=e||Bh}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}const qm=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(Gm.lex,Vm.parse);parseInline=this.#e(Gm.lexInline,Vm.parseInline);Parser=Vm;Renderer=Xm;TextRenderer=Ym;Lexer=Gm;Tokenizer=lm;Hooks=Km;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const i of e)switch(n=n.concat(t.call(this,i)),i.type){case"table":{const e=i;for(const i of e.header)n=n.concat(this.walkTokens(i.tokens,t));for(const i of e.rows)for(const e of i)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=i;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=i;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((i=>{const a=e[i].flat(1/0);n=n.concat(this.walkTokens(a,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let i=e.renderer.apply(this,t);return!1===i&&(i=n.apply(this,t)),i}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new Xm(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if("options"===n)continue;const i=n,a=e.renderer[i],r=t[i];t[i]=(...e)=>{let n=a.apply(t,e);return!1===n&&(n=r.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new lm(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const i=n,a=e.tokenizer[i],r=t[i];t[i]=(...e)=>{let n=a.apply(t,e);return!1===n&&(n=r.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new Km;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const i=n,a=e.hooks[i],r=t[i];Km.passThroughHooks.has(n)?t[i]=e=>{if(this.defaults.async)return Promise.resolve(a.call(t,e)).then((e=>r.call(t,e)));const n=a.call(t,e);return r.call(t,n)}:t[i]=(...e)=>{let n=a.apply(t,e);return!1===n&&(n=r.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,i=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(i.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Gm.lex(e,t??this.defaults)}parser(e,t){return Vm.parse(e,t??this.defaults)}#e(e,t){return(n,i)=>{const a={...i},r={...this.defaults,...a};!0===this.defaults.async&&!1===a.async&&(r.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),r.async=!0);const o=this.#t(!!r.silent,!!r.async);if(null==n)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(r.hooks&&(r.hooks.options=r),r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then((t=>e(t,r))).then((e=>r.hooks?r.hooks.processAllTokens(e):e)).then((e=>r.walkTokens?Promise.all(this.walkTokens(e,r.walkTokens)).then((()=>e)):e)).then((e=>t(e,r))).then((e=>r.hooks?r.hooks.postprocess(e):e)).catch(o);try{r.hooks&&(n=r.hooks.preprocess(n));let i=e(n,r);r.hooks&&(i=r.hooks.processAllTokens(i)),r.walkTokens&&this.walkTokens(i,r.walkTokens);let a=t(i,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(e){return o(e)}}}#t(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+Qh(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Jm(e,t){return qm.parse(e,t)}Jm.options=Jm.setOptions=function(e){return qm.setOptions(e),Jm.defaults=qm.defaults,Gh(Jm.defaults),Jm},Jm.getDefaults=Hh,Jm.defaults=Bh,Jm.use=function(...e){return qm.use(...e),Jm.defaults=qm.defaults,Gh(Jm.defaults),Jm},Jm.walkTokens=function(e,t){return qm.walkTokens(e,t)},Jm.parseInline=qm.parseInline,Jm.Parser=Vm,Jm.parser=Vm.parse,Jm.Renderer=Xm,Jm.TextRenderer=Ym,Jm.Lexer=Gm,Jm.lexer=Gm.lex,Jm.Tokenizer=lm,Jm.Hooks=Km,Jm.parse=Jm,Jm.options,Jm.setOptions,Jm.use,Jm.walkTokens,Jm.parseInline,Vm.parse,Gm.lex;const Qm={CheckCircleFilled:r`<path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" />`,CheckCircleOutlined:r`<path d="M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" /><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" />`,CheckOutlined:r`<path d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" />`,InfoCircleFilled:r`<path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" />`,InfoCircleOutlined:r`<path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" /><path d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" />`,PlusOutlined:r`<path d="M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" /><path d="M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" />`,PlusCircleFilled:r`<path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm192 472c0 4.4-3.6 8-8 8H544v152c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V544H328c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h152V328c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v152h152c4.4 0 8 3.6 8 8v48z" />`,PlusCircleOutlined:r`<path d="M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" /><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" />`,CloseCircleFilled:r`<path d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" />`,CloseCircleOutlined:r`<path d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z" />`,CloseOutlined:r`<path d="M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" />`,QuestionCircleFilled:r`<path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 00-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z" />`,QuestionCircleOutlined:r`<path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" /><path d="M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" />`,QuestionOutlined:r`<path d="M764 280.9c-14-30.6-33.9-58.1-59.3-81.6C653.1 151.4 584.6 125 512 125s-141.1 26.4-192.7 74.2c-25.4 23.6-45.3 51-59.3 81.7-14.6 32-22 65.9-22 100.9v27c0 6.2 5 11.2 11.2 11.2h54c6.2 0 11.2-5 11.2-11.2v-27c0-99.5 88.6-180.4 197.6-180.4s197.6 80.9 197.6 180.4c0 40.8-14.5 79.2-42 111.2-27.2 31.7-65.6 54.4-108.1 64-24.3 5.5-46.2 19.2-61.7 38.8a110.85 110.85 0 00-23.9 68.6v31.4c0 6.2 5 11.2 11.2 11.2h54c6.2 0 11.2-5 11.2-11.2v-31.4c0-15.7 10.9-29.5 26-32.9 58.4-13.2 111.4-44.7 149.3-88.7 19.1-22.3 34-47.1 44.3-74 10.7-27.9 16.1-57.2 16.1-87 0-35-7.4-69-22-100.9zM512 787c-30.9 0-56 25.1-56 56s25.1 56 56 56 56-25.1 56-56-25.1-56-56-56z" />`,BellFilled:r`<path d="M816 768h-24V428c0-141.1-104.3-257.8-240-277.2V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.8C336.3 170.2 232 286.9 232 428v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48z" />`,BellOutlined:r`<path d="M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z" />`,ThunderboltFilled:r`<path d="M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7z" />`,CalendarOutlined:r`<path d="M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z" />`,CloudFilled:r`<path d="M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3z" />`,CloudOutlined:r`<path d="M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z" />`,FireFilled:r`<path d="M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9z" />`,FireOutlined:r`<path d="M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z" />`,HeartFilled:r`<path d="M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9z" />`,HeartOutlined:r`<path d="M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z" />`,BulbFilled:r`<path d="M348 676.1C250 619.4 184 513.4 184 392c0-181.1 146.9-328 328-328s328 146.9 328 328c0 121.4-66 227.4-164 284.1V792c0 17.7-14.3 32-32 32H380c-17.7 0-32-14.3-32-32V676.1zM392 888h240c4.4 0 8 3.6 8 8v32c0 17.7-14.3 32-32 32H416c-17.7 0-32-14.3-32-32v-32c0-4.4 3.6-8 8-8z" />`,BulbOutlined:r`<path d="M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z" />`,MessageFilled:r`<path d="M924.3 338.4a447.57 447.57 0 00-96.1-143.3 443.09 443.09 0 00-143-96.3A443.91 443.91 0 00512 64h-2c-60.5.3-119 12.3-174.1 35.9a444.08 444.08 0 00-141.7 96.5 445 445 0 00-95 142.8A449.89 449.89 0 0065 514.1c.3 69.4 16.9 138.3 47.9 199.9v152c0 25.4 20.6 46 45.9 46h151.8a447.72 447.72 0 00199.5 48h2.1c59.8 0 117.7-11.6 172.3-34.3A443.2 443.2 0 00827 830.5c41.2-40.9 73.6-88.7 96.3-142 23.5-55.2 35.5-113.9 35.8-174.5.2-60.9-11.6-120-34.8-175.6zM312.4 560c-26.4 0-47.9-21.5-47.9-48s21.5-48 47.9-48 47.9 21.5 47.9 48-21.4 48-47.9 48zm199.6 0c-26.4 0-47.9-21.5-47.9-48s21.5-48 47.9-48 47.9 21.5 47.9 48-21.5 48-47.9 48zm199.6 0c-26.4 0-47.9-21.5-47.9-48s21.5-48 47.9-48 47.9 21.5 47.9 48-21.5 48-47.9 48z" />`,MessageOutlined:r`<path d="M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z" />`,SmileFilled:r`<path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zM288 421a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm224 272c-85.5 0-155.6-67.3-160-151.6a8 8 0 018-8.4h48.1c4.2 0 7.8 3.2 8.1 7.4C420 589.9 461.5 629 512 629s92.1-39.1 95.8-88.6c.3-4.2 3.9-7.4 8.1-7.4H664a8 8 0 018 8.4C667.6 625.7 597.5 693 512 693zm176-224a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" />`,SmileOutlined:r`<path d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z" />`,StarFilled:r`<path d="M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z" />`,StarOutlined:r`<path d="M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z" />`,StopOutlined:r`<path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z" />`,LikeFilled:r`<path d="M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311h-.3v428h472.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM112 528v364c0 17.7 14.3 32 32 32h65V496h-65c-17.7 0-32 14.3-32 32z" />`,LikeOutlined:r`<path d="M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z" />`,UnlockOutlined:r`<path d="M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zm-40 376H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z" />`,UnlockFilled:r`<path d="M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM540 701v53c0 4.4-3.6 8-8 8h-40c-4.4 0-8-3.6-8-8v-53a48.01 48.01 0 1156 0z" />`,CaretDownOutlined:r`<path d="M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" />`,CaretLeftOutlined:r`<path d="M689 165.1L308.2 493.5c-10.9 9.4-10.9 27.5 0 37L689 858.9c14.2 12.2 35 1.2 35-18.5V183.6c0-19.7-20.8-30.7-35-18.5z" />`,CaretRightOutlined:r`<path d="M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z" />`,CaretUpOutlined:r`<path d="M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z" />`,DownOutlined:r`<path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" />`,LeftOutlined:r`<path d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" />`,RightOutlined:r`<path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" />`,UpOutlined:r`<path d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" />`,PauseOutlined:r` <path d="M304 176h80v672h-80zm408 0h-64c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8z"/>`,PauseCircleOutlined:r`<path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm-88-532h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z"/>`,PauseCircleFilled:r`<path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-80 600c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V360c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v304zm224 0c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V360c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v304z"/>`,PlayCircleOutlined:r`<path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"/><path d="M719.4 499.1l-296.1-215A15.9 15.9 0 0 0 398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 0 0 0-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"/>`,PlayCircleFilled:r`<path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm144.1 454.9L437.7 677.8a8.02 8.02 0 0 1-12.7-6.5V353.7a8 8 0 0 1 12.7-6.5L656.1 506a7.9 7.9 0 0 1 0 12.9z"/>`,MutedOutlined:r`<path d="M771.915 115c-5.863 0-11.877 1.644-17.42 5.267L400 351.966H236c-8.837 0-16 7.165-16 16.003V656.03c0 8.838 7.163 16.003 16 16.003h164l354.495 231.7c5.542 3.621 11.558 5.267 17.42 5.267C788.566 909 804 895.749 804 876.94V147.06c0-18.808-15.436-32.06-32.085-32.06M732 220.997v582.005L439.386 611.75l-17.948-11.73H292V423.98h129.438l17.948-11.73z"/>`,MutedFilled:r`<path d="M771.915 115c-5.863 0-11.877 1.644-17.42 5.267L400 351.966H236c-8.837 0-16 7.165-16 16.003V656.03c0 8.838 7.163 16.003 16 16.003h164l354.495 231.7c5.542 3.621 11.558 5.267 17.42 5.267C788.566 909 804 895.749 804 876.94V147.06c0-18.808-15.436-32.06-32.085-32.06"/>`,SoundOutlined:r`<path d="M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 0 0-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0 0 21.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0 0 21.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 0 0-21.7-5.9L746 287.8a15.99 15.99 0 0 0-5.8 21.8L760 344z"/>`,SoundFilled:r` <path d="M892.1 737.8l-110.3-63.7a15.9 15.9 0 0 0-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0 0 21.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0 0 21.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 0 0-21.7-5.9L746 287.8a15.99 15.99 0 0 0-5.8 21.8L760 344zm174 132H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zM625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1z"/>`},Zm={lessThanXSeconds:{one:"minder as 'n sekonde",other:"minder as {{count}} sekondes"},xSeconds:{one:"1 sekonde",other:"{{count}} sekondes"},halfAMinute:"'n halwe minuut",lessThanXMinutes:{one:"minder as 'n minuut",other:"minder as {{count}} minute"},xMinutes:{one:"'n minuut",other:"{{count}} minute"},aboutXHours:{one:"ongeveer 1 uur",other:"ongeveer {{count}} ure"},xHours:{one:"1 uur",other:"{{count}} ure"},xDays:{one:"1 dag",other:"{{count}} dae"},aboutXWeeks:{one:"ongeveer 1 week",other:"ongeveer {{count}} weke"},xWeeks:{one:"1 week",other:"{{count}} weke"},aboutXMonths:{one:"ongeveer 1 maand",other:"ongeveer {{count}} maande"},xMonths:{one:"1 maand",other:"{{count}} maande"},aboutXYears:{one:"ongeveer 1 jaar",other:"ongeveer {{count}} jaar"},xYears:{one:"1 jaar",other:"{{count}} jaar"},overXYears:{one:"meer as 1 jaar",other:"meer as {{count}} jaar"},almostXYears:{one:"byna 1 jaar",other:"byna {{count}} jaar"}};function ef(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const tf={date:ef({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"yyyy/MM/dd"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},nf={lastWeek:"'verlede' eeee 'om' p",yesterday:"'gister om' p",today:"'vandag om' p",tomorrow:"'môre om' p",nextWeek:"eeee 'om' p",other:"P"};function af(e){return(t,n)=>{let i;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):t;i=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;i=e.values[a]||e.values[t]}return i[e.argumentCallback?e.argumentCallback(t):t]}}const rf={ordinalNumber:e=>{const t=Number(e),n=t%100;if(n<20)switch(n){case 1:case 8:return t+"ste";default:return t+"de"}return t+"ste"},era:af({values:{narrow:["vC","nC"],abbreviated:["vC","nC"],wide:["voor Christus","na Christus"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1ste kwartaal","2de kwartaal","3de kwartaal","4de kwartaal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des"],wide:["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember"]},defaultWidth:"wide"}),day:af({values:{narrow:["S","M","D","W","D","V","S"],short:["So","Ma","Di","Wo","Do","Vr","Sa"],abbreviated:["Son","Maa","Din","Woe","Don","Vry","Sat"],wide:["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"vm",pm:"nm",midnight:"middernag",noon:"middaguur",morning:"oggend",afternoon:"middag",evening:"laat middag",night:"aand"},abbreviated:{am:"vm",pm:"nm",midnight:"middernag",noon:"middaguur",morning:"oggend",afternoon:"middag",evening:"laat middag",night:"aand"},wide:{am:"vm",pm:"nm",midnight:"middernag",noon:"middaguur",morning:"oggend",afternoon:"middag",evening:"laat middag",night:"aand"}},defaultWidth:"wide",formattingValues:{narrow:{am:"vm",pm:"nm",midnight:"middernag",noon:"uur die middag",morning:"uur die oggend",afternoon:"uur die middag",evening:"uur die aand",night:"uur die aand"},abbreviated:{am:"vm",pm:"nm",midnight:"middernag",noon:"uur die middag",morning:"uur die oggend",afternoon:"uur die middag",evening:"uur die aand",night:"uur die aand"},wide:{am:"vm",pm:"nm",midnight:"middernag",noon:"uur die middag",morning:"uur die oggend",afternoon:"uur die middag",evening:"uur die aand",night:"uur die aand"}},defaultFormattingWidth:"wide"})};function of(e){return(t,n={})=>{const i=n.width,a=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],r=t.match(a);if(!r)return null;const o=r[0],s=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(s,(e=>e.test(o))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(s,(e=>e.test(o)));let d;d=e.valueCallback?e.valueCallback(l):l,d=n.valueCallback?n.valueCallback(d):d;return{value:d,rest:t.slice(o.length)}}}function sf(e){return(t,n={})=>{const i=t.match(e.matchPattern);if(!i)return null;const a=i[0],r=t.match(e.parsePattern);if(!r)return null;let o=e.valueCallback?e.valueCallback(r[0]):r[0];o=n.valueCallback?n.valueCallback(o):o;return{value:o,rest:t.slice(a.length)}}}const lf={ordinalNumber:sf({matchPattern:/^(\d+)(ste|de)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^([vn]\.? ?C\.?)/,abbreviated:/^([vn]\. ?C\.?)/,wide:/^((voor|na) Christus)/},defaultMatchWidth:"wide",parsePatterns:{any:[/^v/,/^n/]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^K[1234]/i,wide:/^[1234](st|d)e kwartaal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(Jan|Feb|Mrt|Apr|Mei|Jun|Jul|Aug|Sep|Okt|Nov|Dec)\.?/i,wide:/^(Januarie|Februarie|Maart|April|Mei|Junie|Julie|Augustus|September|Oktober|November|Desember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^J/i,/^F/i,/^M/i,/^A/i,/^M/i,/^J/i,/^J/i,/^A/i,/^S/i,/^O/i,/^N/i,/^D/i],any:[/^Jan/i,/^Feb/i,/^Mrt/i,/^Apr/i,/^Mei/i,/^Jun/i,/^Jul/i,/^Aug/i,/^Sep/i,/^Okt/i,/^Nov/i,/^Dec/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[smdwv]/i,short:/^(So|Ma|Di|Wo|Do|Vr|Sa)/i,abbreviated:/^(Son|Maa|Din|Woe|Don|Vry|Sat)/i,wide:/^(Sondag|Maandag|Dinsdag|Woensdag|Donderdag|Vrydag|Saterdag)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^S/i,/^M/i,/^D/i,/^W/i,/^D/i,/^V/i,/^S/i],any:[/^So/i,/^Ma/i,/^Di/i,/^Wo/i,/^Do/i,/^Vr/i,/^Sa/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(vm|nm|middernag|(?:uur )?die (oggend|middag|aand))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^vm/i,pm:/^nm/i,midnight:/^middernag/i,noon:/^middaguur/i,morning:/oggend/i,afternoon:/middag/i,evening:/laat middag/i,night:/aand/i}},defaultParseWidth:"any"})},df={code:"af",formatDistance:(e,t,n)=>{let i;const a=Zm[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"oor "+i:i+" gelede":i},formatLong:tf,formatRelative:(e,t,n,i)=>nf[e],localize:rf,match:lf,options:{weekStartsOn:0,firstWeekContainsDate:1}},uf={lessThanXSeconds:{one:"أقل من ثانية",two:"أقل من ثانيتين",threeToTen:"أقل من {{count}} ثواني",other:"أقل من {{count}} ثانية"},xSeconds:{one:"ثانية واحدة",two:"ثانيتان",threeToTen:"{{count}} ثواني",other:"{{count}} ثانية"},halfAMinute:"نصف دقيقة",lessThanXMinutes:{one:"أقل من دقيقة",two:"أقل من دقيقتين",threeToTen:"أقل من {{count}} دقائق",other:"أقل من {{count}} دقيقة"},xMinutes:{one:"دقيقة واحدة",two:"دقيقتان",threeToTen:"{{count}} دقائق",other:"{{count}} دقيقة"},aboutXHours:{one:"ساعة واحدة تقريباً",two:"ساعتين تقريبا",threeToTen:"{{count}} ساعات تقريباً",other:"{{count}} ساعة تقريباً"},xHours:{one:"ساعة واحدة",two:"ساعتان",threeToTen:"{{count}} ساعات",other:"{{count}} ساعة"},xDays:{one:"يوم واحد",two:"يومان",threeToTen:"{{count}} أيام",other:"{{count}} يوم"},aboutXWeeks:{one:"أسبوع واحد تقريبا",two:"أسبوعين تقريبا",threeToTen:"{{count}} أسابيع تقريبا",other:"{{count}} أسبوعا تقريبا"},xWeeks:{one:"أسبوع واحد",two:"أسبوعان",threeToTen:"{{count}} أسابيع",other:"{{count}} أسبوعا"},aboutXMonths:{one:"شهر واحد تقريباً",two:"شهرين تقريبا",threeToTen:"{{count}} أشهر تقريبا",other:"{{count}} شهرا تقريباً"},xMonths:{one:"شهر واحد",two:"شهران",threeToTen:"{{count}} أشهر",other:"{{count}} شهرا"},aboutXYears:{one:"سنة واحدة تقريباً",two:"سنتين تقريبا",threeToTen:"{{count}} سنوات تقريباً",other:"{{count}} سنة تقريباً"},xYears:{one:"سنة واحد",two:"سنتان",threeToTen:"{{count}} سنوات",other:"{{count}} سنة"},overXYears:{one:"أكثر من سنة",two:"أكثر من سنتين",threeToTen:"أكثر من {{count}} سنوات",other:"أكثر من {{count}} سنة"},almostXYears:{one:"ما يقارب سنة واحدة",two:"ما يقارب سنتين",threeToTen:"ما يقارب {{count}} سنوات",other:"ما يقارب {{count}} سنة"}},cf={date:ef({formats:{full:"EEEE، do MMMM y",long:"do MMMM y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss",long:"HH:mm:ss",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'عند الساعة' {{time}}",long:"{{date}} 'عند الساعة' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},hf={lastWeek:"eeee 'الماضي عند الساعة' p",yesterday:"'الأمس عند الساعة' p",today:"'اليوم عند الساعة' p",tomorrow:"'غدا عند الساعة' p",nextWeek:"eeee 'القادم عند الساعة' p",other:"P"},mf={code:"ar",formatDistance:(e,t,n)=>{const i=uf[e];let a;return a="string"==typeof i?i:1===t?i.one:2===t?i.two:t<=10?i.threeToTen.replace("{{count}}",String(t)):i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"خلال "+a:"منذ "+a:a},formatLong:cf,formatRelative:e=>hf[e],localize:{ordinalNumber:e=>String(e),era:af({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["ي","ف","م","أ","م","ي","ي","أ","س","أ","ن","د"],abbreviated:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],wide:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},defaultWidth:"wide"}),day:af({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],wide:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ص",pm:"م",morning:"الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"المساء",night:"الليل",midnight:"منتصف الليل"},abbreviated:{am:"ص",pm:"م",morning:"الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"المساء",night:"الليل",midnight:"منتصف الليل"},wide:{am:"ص",pm:"م",morning:"الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"المساء",night:"الليل",midnight:"منتصف الليل"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ص",pm:"م",morning:"في الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل",midnight:"منتصف الليل"},abbreviated:{am:"ص",pm:"م",morning:"في الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل",midnight:"منتصف الليل"},wide:{am:"ص",pm:"م",morning:"في الصباح",noon:"الظهر",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل",midnight:"منتصف الليل"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/[قب]/,abbreviated:/[قب]\.م\./,wide:/(قبل|بعد) الميلاد/},defaultMatchWidth:"wide",parsePatterns:{any:[/قبل/,/بعد/]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/ر[1234]/,wide:/الربع (الأول|الثاني|الثالث|الرابع)/},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[أيفمسند]/,abbreviated:/^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/,wide:/^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ي/i,/^ف/i,/^م/i,/^أ/i,/^م/i,/^ي/i,/^ي/i,/^أ/i,/^س/i,/^أ/i,/^ن/i,/^د/i],any:[/^يناير/i,/^فبراير/i,/^مارس/i,/^أبريل/i,/^مايو/i,/^يونيو/i,/^يوليو/i,/^أغسطس/i,/^سبتمبر/i,/^أكتوبر/i,/^نوفمبر/i,/^ديسمبر/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[حنثرخجس]/i,short:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,abbreviated:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,wide:/^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ح/i,/^ن/i,/^ث/i,/^ر/i,/^خ/i,/^ج/i,/^س/i],wide:[/^الأحد/i,/^الاثنين/i,/^الثلاثاء/i,/^الأربعاء/i,/^الخميس/i,/^الجمعة/i,/^السبت/i],any:[/^أح/i,/^اث/i,/^ث/i,/^أر/i,/^خ/i,/^ج/i,/^س/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(ص|م|منتصف الليل|الظهر|بعد الظهر|في الصباح|في المساء|في الليل)/,any:/^(ص|م|منتصف الليل|الظهر|بعد الظهر|في الصباح|في المساء|في الليل)/},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ص/,pm:/^م/,midnight:/منتصف الليل/,noon:/الظهر/,afternoon:/بعد الظهر/,morning:/في الصباح/,evening:/في المساء/,night:/في الليل/}},defaultParseWidth:"any"})},options:{weekStartsOn:6,firstWeekContainsDate:1}},ff={lessThanXSeconds:{one:"أقل من ثانية واحدة",two:"أقل من ثانتين",threeToTen:"أقل من {{count}} ثواني",other:"أقل من {{count}} ثانية"},xSeconds:{one:"ثانية واحدة",two:"ثانتين",threeToTen:"{{count}} ثواني",other:"{{count}} ثانية"},halfAMinute:"نصف دقيقة",lessThanXMinutes:{one:"أقل من دقيقة",two:"أقل من دقيقتين",threeToTen:"أقل من {{count}} دقائق",other:"أقل من {{count}} دقيقة"},xMinutes:{one:"دقيقة واحدة",two:"دقيقتين",threeToTen:"{{count}} دقائق",other:"{{count}} دقيقة"},aboutXHours:{one:"ساعة واحدة تقريباً",two:"ساعتين تقريباً",threeToTen:"{{count}} ساعات تقريباً",other:"{{count}} ساعة تقريباً"},xHours:{one:"ساعة واحدة",two:"ساعتين",threeToTen:"{{count}} ساعات",other:"{{count}} ساعة"},xDays:{one:"يوم واحد",two:"يومين",threeToTen:"{{count}} أيام",other:"{{count}} يوم"},aboutXWeeks:{one:"أسبوع واحد تقريباً",two:"أسبوعين تقريباً",threeToTen:"{{count}} أسابيع تقريباً",other:"{{count}} أسبوع تقريباً"},xWeeks:{one:"أسبوع واحد",two:"أسبوعين",threeToTen:"{{count}} أسابيع",other:"{{count}} أسبوع"},aboutXMonths:{one:"شهر واحد تقريباً",two:"شهرين تقريباً",threeToTen:"{{count}} أشهر تقريباً",other:"{{count}} شهر تقريباً"},xMonths:{one:"شهر واحد",two:"شهرين",threeToTen:"{{count}} أشهر",other:"{{count}} شهر"},aboutXYears:{one:"عام واحد تقريباً",two:"عامين تقريباً",threeToTen:"{{count}} أعوام تقريباً",other:"{{count}} عام تقريباً"},xYears:{one:"عام واحد",two:"عامين",threeToTen:"{{count}} أعوام",other:"{{count}} عام"},overXYears:{one:"أكثر من عام",two:"أكثر من عامين",threeToTen:"أكثر من {{count}} أعوام",other:"أكثر من {{count}} عام"},almostXYears:{one:"عام واحد تقريباً",two:"عامين تقريباً",threeToTen:"{{count}} أعوام تقريباً",other:"{{count}} عام تقريباً"}},pf={date:ef({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'عند' {{time}}",long:"{{date}} 'عند' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},gf={lastWeek:"'أخر' eeee 'عند' p",yesterday:"'أمس عند' p",today:"'اليوم عند' p",tomorrow:"'غداً عند' p",nextWeek:"eeee 'عند' p",other:"P"},vf={code:"ar-DZ",formatDistance:(e,t,n)=>{n=n||{};const i=ff[e];let a;return a="string"==typeof i?i:1===t?i.one:2===t?i.two:t<=10?i.threeToTen.replace("{{count}}",String(t)):i.other.replace("{{count}}",String(t)),n.addSuffix?n.comparison&&n.comparison>0?"في خلال "+a:"منذ "+a:a},formatLong:pf,formatRelative:(e,t,n,i)=>gf[e],localize:{ordinalNumber:e=>String(e),era:af({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:af({values:{narrow:["ج","ف","م","أ","م","ج","ج","أ","س","أ","ن","د"],abbreviated:["جانـ","فيفـ","مارس","أفريل","مايـ","جوانـ","جويـ","أوت","سبتـ","أكتـ","نوفـ","ديسـ"],wide:["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},defaultWidth:"wide"}),day:af({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنـ","ثلا","أربـ","خميـ","جمعة","سبت"],wide:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ص",pm:"م",midnight:"ن",noon:"ظ",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"},abbreviated:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"},wide:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ص",pm:"م",midnight:"ن",noon:"ظ",morning:"في الصباح",afternoon:"بعد الظـهر",evening:"في المساء",night:"في الليل"},abbreviated:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"في الصباح",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل"},wide:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظـهر",evening:"في المساء",night:"في الليل"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(ق|ب)/i,abbreviated:/^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,wide:/^(قبل الميلاد|قبل الميلاد|بعد الميلاد|بعد الميلاد)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^قبل/i,/^بعد/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^ر[1234]/i,wide:/^الربع [1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>Number(e)+1}),month:of({matchPatterns:{narrow:/^[جفمأسند]/i,abbreviated:/^(جان|فيف|مار|أفر|ماي|جوا|جوي|أوت|سبت|أكت|نوف|ديس)/i,wide:/^(جانفي|فيفري|مارس|أفريل|ماي|جوان|جويلية|أوت|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ج/i,/^ف/i,/^م/i,/^أ/i,/^م/i,/^ج/i,/^ج/i,/^أ/i,/^س/i,/^أ/i,/^ن/i,/^د/i],any:[/^جان/i,/^فيف/i,/^مار/i,/^أفر/i,/^ماي/i,/^جوا/i,/^جوي/i,/^أوت/i,/^سبت/i,/^أكت/i,/^نوف/i,/^ديس/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[حنثرخجس]/i,short:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,abbreviated:/^(أحد|اثن|ثلا|أرب|خمي|جمعة|سبت)/i,wide:/^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ح/i,/^ن/i,/^ث/i,/^ر/i,/^خ/i,/^ج/i,/^س/i],wide:[/^الأحد/i,/^الاثنين/i,/^الثلاثاء/i,/^الأربعاء/i,/^الخميس/i,/^الجمعة/i,/^السبت/i],any:[/^أح/i,/^اث/i,/^ث/i,/^أر/i,/^خ/i,/^ج/i,/^س/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},yf={lessThanXSeconds:{one:"أقل من ثانية",two:"أقل من ثانيتين",threeToTen:"أقل من {{count}} ثواني",other:"أقل من {{count}} ثانية"},xSeconds:{one:"ثانية",two:"ثانيتين",threeToTen:"{{count}} ثواني",other:"{{count}} ثانية"},halfAMinute:"نص دقيقة",lessThanXMinutes:{one:"أقل من دقيقة",two:"أقل من دقيقتين",threeToTen:"أقل من {{count}} دقايق",other:"أقل من {{count}} دقيقة"},xMinutes:{one:"دقيقة",two:"دقيقتين",threeToTen:"{{count}} دقايق",other:"{{count}} دقيقة"},aboutXHours:{one:"حوالي ساعة",two:"حوالي ساعتين",threeToTen:"حوالي {{count}} ساعات",other:"حوالي {{count}} ساعة"},xHours:{one:"ساعة",two:"ساعتين",threeToTen:"{{count}} ساعات",other:"{{count}} ساعة"},xDays:{one:"يوم",two:"يومين",threeToTen:"{{count}} أيام",other:"{{count}} يوم"},aboutXWeeks:{one:"حوالي أسبوع",two:"حوالي أسبوعين",threeToTen:"حوالي {{count}} أسابيع",other:"حوالي {{count}} أسبوع"},xWeeks:{one:"أسبوع",two:"أسبوعين",threeToTen:"{{count}} أسابيع",other:"{{count}} أسبوع"},aboutXMonths:{one:"حوالي شهر",two:"حوالي شهرين",threeToTen:"حوالي {{count}} أشهر",other:"حوالي {{count}} شهر"},xMonths:{one:"شهر",two:"شهرين",threeToTen:"{{count}} أشهر",other:"{{count}} شهر"},aboutXYears:{one:"حوالي سنة",two:"حوالي سنتين",threeToTen:"حوالي {{count}} سنين",other:"حوالي {{count}} سنة"},xYears:{one:"عام",two:"عامين",threeToTen:"{{count}} أعوام",other:"{{count}} عام"},overXYears:{one:"أكثر من سنة",two:"أكثر من سنتين",threeToTen:"أكثر من {{count}} سنين",other:"أكثر من {{count}} سنة"},almostXYears:{one:"عام تقريبًا",two:"عامين تقريبًا",threeToTen:"{{count}} أعوام تقريبًا",other:"{{count}} عام تقريبًا"}},wf={date:ef({formats:{full:"EEEE، do MMMM y",long:"do MMMM y",medium:"dd/MMM/y",short:"d/MM/y"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'الساعة' {{time}}",long:"{{date}} 'الساعة' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},bf={lastWeek:"eeee 'اللي جاي الساعة' p",yesterday:"'إمبارح الساعة' p",today:"'النهاردة الساعة' p",tomorrow:"'بكرة الساعة' p",nextWeek:"eeee 'الساعة' p",other:"P"},kf={code:"ar-EG",formatDistance:(e,t,n)=>{let i;const a=yf[e];return i="string"==typeof a?a:1===t?a.one:2===t?a.two:t<=10?a.threeToTen.replace("{{count}}",String(t)):a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?`في خلال ${i}`:`منذ ${i}`:i},formatLong:wf,formatRelative:(e,t,n,i)=>bf[e],localize:{ordinalNumber:(e,t)=>String(e),era:af({values:{narrow:["ق","ب"],abbreviated:["ق.م","ب.م"],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["ي","ف","م","أ","م","ي","ي","أ","س","أ","ن","د"],abbreviated:["ينا","فبر","مارس","أبريل","مايو","يونـ","يولـ","أغسـ","سبتـ","أكتـ","نوفـ","ديسـ"],wide:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},defaultWidth:"wide"}),day:af({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],wide:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ص",pm:"م",midnight:"ن",noon:"ظ",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءً",night:"ليلاً"},abbreviated:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهراً",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءً",night:"ليلاً"},wide:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهراً",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءً",night:"ليلاً"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ص",pm:"م",midnight:"ن",noon:"ظ",morning:"في الصباح",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل"},abbreviated:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهراً",morning:"في الصباح",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل"},wide:{am:"ص",pm:"م",midnight:"نصف الليل",morning:"في الصباح",noon:"ظهراً",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)/,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:of({matchPatterns:{narrow:/^(ق|ب)/g,abbreviated:/^(ق.م|ب.م)/g,wide:/^(قبل الميلاد|بعد الميلاد)/g},defaultMatchWidth:"wide",parsePatterns:{any:[/^ق/g,/^ب/g]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/,abbreviated:/^ر[1234]/,wide:/^الربع (الأول|الثاني|الثالث|الرابع)/},defaultMatchWidth:"wide",parsePatterns:{wide:[/الربع الأول/,/الربع الثاني/,/الربع الثالث/,/الربع الرابع/],any:[/1/,/2/,/3/,/4/]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(ي|ف|م|أ|س|ن|د)/,abbreviated:/^(ينا|فبر|مارس|أبريل|مايو|يونـ|يولـ|أغسـ|سبتـ|أكتـ|نوفـ|ديسـ)/,wide:/^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ي/,/^ف/,/^م/,/^أ/,/^م/,/^ي/,/^ي/,/^أ/,/^س/,/^أ/,/^ن/,/^د/],any:[/^ينا/,/^فبر/,/^مارس/,/^أبريل/,/^مايو/,/^يون/,/^يول/,/^أغس/,/^سبت/,/^أكت/,/^نوف/,/^ديس/]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^(ح|ن|ث|ر|خ|ج|س)/,short:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/,abbreviated:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/,wide:/^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ح/,/^ن/,/^ث/,/^ر/,/^خ/,/^ج/,/^س/],any:[/أحد/,/اثنين/,/ثلاثاء/,/أربعاء/,/خميس/,/جمعة/,/سبت/]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(ص|م|ن|ظ|في الصباح|بعد الظهر|في المساء|في الليل)/,abbreviated:/^(ص|م|نصف الليل|ظهراً|في الصباح|بعد الظهر|في المساء|في الليل)/,wide:/^(ص|م|نصف الليل|في الصباح|ظهراً|بعد الظهر|في المساء|في الليل)/,any:/^(ص|م|صباح|ظهر|مساء|ليل)/},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ص/,pm:/^م/,midnight:/^ن/,noon:/^ظ/,morning:/^ص/,afternoon:/^بعد/,evening:/^م/,night:/^ل/}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},Sf={lessThanXSeconds:{one:"أقل من ثانية واحدة",two:"أقل من ثانتين",threeToTen:"أقل من {{count}} ثواني",other:"أقل من {{count}} ثانية"},xSeconds:{one:"ثانية واحدة",two:"ثانتين",threeToTen:"{{count}} ثواني",other:"{{count}} ثانية"},halfAMinute:"نصف دقيقة",lessThanXMinutes:{one:"أقل من دقيقة",two:"أقل من دقيقتين",threeToTen:"أقل من {{count}} دقائق",other:"أقل من {{count}} دقيقة"},xMinutes:{one:"دقيقة واحدة",two:"دقيقتين",threeToTen:"{{count}} دقائق",other:"{{count}} دقيقة"},aboutXHours:{one:"ساعة واحدة تقريباً",two:"ساعتين تقريباً",threeToTen:"{{count}} ساعات تقريباً",other:"{{count}} ساعة تقريباً"},xHours:{one:"ساعة واحدة",two:"ساعتين",threeToTen:"{{count}} ساعات",other:"{{count}} ساعة"},xDays:{one:"يوم واحد",two:"يومين",threeToTen:"{{count}} أيام",other:"{{count}} يوم"},aboutXWeeks:{one:"أسبوع واحد تقريباً",two:"أسبوعين تقريباً",threeToTen:"{{count}} أسابيع تقريباً",other:"{{count}} أسبوع تقريباً"},xWeeks:{one:"أسبوع واحد",two:"أسبوعين",threeToTen:"{{count}} أسابيع",other:"{{count}} أسبوع"},aboutXMonths:{one:"شهر واحد تقريباً",two:"شهرين تقريباً",threeToTen:"{{count}} أشهر تقريباً",other:"{{count}} شهر تقريباً"},xMonths:{one:"شهر واحد",two:"شهرين",threeToTen:"{{count}} أشهر",other:"{{count}} شهر"},aboutXYears:{one:"عام واحد تقريباً",two:"عامين تقريباً",threeToTen:"{{count}} أعوام تقريباً",other:"{{count}} عام تقريباً"},xYears:{one:"عام واحد",two:"عامين",threeToTen:"{{count}} أعوام",other:"{{count}} عام"},overXYears:{one:"أكثر من عام",two:"أكثر من عامين",threeToTen:"أكثر من {{count}} أعوام",other:"أكثر من {{count}} عام"},almostXYears:{one:"عام واحد تقريباً",two:"عامين تقريباً",threeToTen:"{{count}} أعوام تقريباً",other:"{{count}} عام تقريباً"}},Mf={date:ef({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'عند' {{time}}",long:"{{date}} 'عند' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ef={lastWeek:"'أخر' eeee 'عند' p",yesterday:"'أمس عند' p",today:"'اليوم عند' p",tomorrow:"'غداً عند' p",nextWeek:"eeee 'عند' p",other:"P"},Tf={code:"ar-MA",formatDistance:(e,t,n)=>{n=n||{};const i=Sf[e];let a;return a="string"==typeof i?i:1===t?i.one:2===t?i.two:t<=10?i.threeToTen.replace("{{count}}",String(t)):i.other.replace("{{count}}",String(t)),n.addSuffix?n.comparison&&n.comparison>0?"في خلال "+a:"منذ "+a:a},formatLong:Mf,formatRelative:(e,t,n,i)=>Ef[e],localize:{ordinalNumber:e=>String(e),era:af({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:af({values:{narrow:["ي","ف","م","أ","م","ي","ي","غ","ش","أ","ن","د"],abbreviated:["ينا","فبر","مارس","أبريل","ماي","يونـ","يولـ","غشت","شتنـ","أكتـ","نونـ","دجنـ"],wide:["يناير","فبراير","مارس","أبريل","ماي","يونيو","يوليوز","غشت","شتنبر","أكتوبر","نونبر","دجنبر"]},defaultWidth:"wide"}),day:af({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنـ","ثلا","أربـ","خميـ","جمعة","سبت"],wide:["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ص",pm:"م",midnight:"ن",noon:"ظ",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"},abbreviated:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"},wide:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ص",pm:"م",midnight:"ن",noon:"ظ",morning:"في الصباح",afternoon:"بعد الظـهر",evening:"في المساء",night:"في الليل"},abbreviated:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"في الصباح",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل"},wide:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظـهر",evening:"في المساء",night:"في الليل"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(ق|ب)/i,abbreviated:/^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,wide:/^(قبل الميلاد|قبل الميلاد|بعد الميلاد|بعد الميلاد)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^قبل/i,/^بعد/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^ر[1234]/i,wide:/^الربع [1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>Number(e)+1}),month:of({matchPatterns:{narrow:/^[يفمأمسند]/i,abbreviated:/^(ين|ف|مار|أب|ماي|يون|يول|غش|شت|أك|ن|د)/i,wide:/^(ين|ف|مار|أب|ماي|يون|يول|غش|شت|أك|ن|د)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ي/i,/^ف/i,/^م/i,/^أ/i,/^م/i,/^ي/i,/^ي/i,/^غ/i,/^ش/i,/^أ/i,/^ن/i,/^د/i],any:[/^ين/i,/^فب/i,/^مار/i,/^أب/i,/^ماي/i,/^يون/i,/^يول/i,/^غشت/i,/^ش/i,/^أك/i,/^ن/i,/^د/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[حنثرخجس]/i,short:/^(أحد|إثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,abbreviated:/^(أحد|إثن|ثلا|أرب|خمي|جمعة|سبت)/i,wide:/^(الأحد|الإثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ح/i,/^ن/i,/^ث/i,/^ر/i,/^خ/i,/^ج/i,/^س/i],wide:[/^الأحد/i,/^الإثنين/i,/^الثلاثاء/i,/^الأربعاء/i,/^الخميس/i,/^الجمعة/i,/^السبت/i],any:[/^أح/i,/^إث/i,/^ث/i,/^أر/i,/^خ/i,/^ج/i,/^س/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Pf={lessThanXSeconds:{one:"أقل من ثانية واحدة",two:"أقل من ثانتين",threeToTen:"أقل من {{count}} ثواني",other:"أقل من {{count}} ثانية"},xSeconds:{one:"ثانية واحدة",two:"ثانتين",threeToTen:"{{count}} ثواني",other:"{{count}} ثانية"},halfAMinute:"نصف دقيقة",lessThanXMinutes:{one:"أقل من دقيقة",two:"أقل من دقيقتين",threeToTen:"أقل من {{count}} دقائق",other:"أقل من {{count}} دقيقة"},xMinutes:{one:"دقيقة واحدة",two:"دقيقتين",threeToTen:"{{count}} دقائق",other:"{{count}} دقيقة"},aboutXHours:{one:"ساعة واحدة تقريباً",two:"ساعتين تقريباً",threeToTen:"{{count}} ساعات تقريباً",other:"{{count}} ساعة تقريباً"},xHours:{one:"ساعة واحدة",two:"ساعتين",threeToTen:"{{count}} ساعات",other:"{{count}} ساعة"},xDays:{one:"يوم واحد",two:"يومين",threeToTen:"{{count}} أيام",other:"{{count}} يوم"},aboutXWeeks:{one:"أسبوع واحد تقريباً",two:"أسبوعين تقريباً",threeToTen:"{{count}} أسابيع تقريباً",other:"{{count}} أسبوع تقريباً"},xWeeks:{one:"أسبوع واحد",two:"أسبوعين",threeToTen:"{{count}} أسابيع",other:"{{count}} أسبوع"},aboutXMonths:{one:"شهر واحد تقريباً",two:"شهرين تقريباً",threeToTen:"{{count}} أشهر تقريباً",other:"{{count}} شهر تقريباً"},xMonths:{one:"شهر واحد",two:"شهرين",threeToTen:"{{count}} أشهر",other:"{{count}} شهر"},aboutXYears:{one:"عام واحد تقريباً",two:"عامين تقريباً",threeToTen:"{{count}} أعوام تقريباً",other:"{{count}} عام تقريباً"},xYears:{one:"عام واحد",two:"عامين",threeToTen:"{{count}} أعوام",other:"{{count}} عام"},overXYears:{one:"أكثر من عام",two:"أكثر من عامين",threeToTen:"أكثر من {{count}} أعوام",other:"أكثر من {{count}} عام"},almostXYears:{one:"عام واحد تقريباً",two:"عامين تقريباً",threeToTen:"{{count}} أعوام تقريباً",other:"{{count}} عام تقريباً"}},Af={date:ef({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'عند' {{time}}",long:"{{date}} 'عند' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},xf={lastWeek:"'أخر' eeee 'عند' p",yesterday:"'أمس عند' p",today:"'اليوم عند' p",tomorrow:"'غداً عند' p",nextWeek:"eeee 'عند' p",other:"P"},_f={code:"ar-SA",formatDistance:(e,t,n)=>{let i;const a=Pf[e];return i="string"==typeof a?a:1===t?a.one:2===t?a.two:t<=10?a.threeToTen.replace("{{count}}",String(t)):a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"في خلال "+i:"منذ "+i:i},formatLong:Af,formatRelative:(e,t,n,i)=>xf[e],localize:{ordinalNumber:e=>String(e),era:af({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["ي","ف","م","أ","م","ي","ي","أ","س","أ","ن","د"],abbreviated:["ينا","فبر","مارس","أبريل","مايو","يونـ","يولـ","أغسـ","سبتـ","أكتـ","نوفـ","ديسـ"],wide:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},defaultWidth:"wide"}),day:af({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنـ","ثلا","أربـ","خميـ","جمعة","سبت"],wide:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ص",pm:"م",midnight:"ن",noon:"ظ",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"},abbreviated:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"},wide:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظهر",evening:"مساءاً",night:"ليلاً"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ص",pm:"م",midnight:"ن",noon:"ظ",morning:"في الصباح",afternoon:"بعد الظـهر",evening:"في المساء",night:"في الليل"},abbreviated:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"في الصباح",afternoon:"بعد الظهر",evening:"في المساء",night:"في الليل"},wide:{am:"ص",pm:"م",midnight:"نصف الليل",noon:"ظهر",morning:"صباحاً",afternoon:"بعد الظـهر",evening:"في المساء",night:"في الليل"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(ق|ب)/i,abbreviated:/^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,wide:/^(قبل الميلاد|قبل الميلاد|بعد الميلاد|بعد الميلاد)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^قبل/i,/^بعد/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^ر[1234]/i,wide:/^الربع [1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[يفمأمسند]/i,abbreviated:/^(ين|ف|مار|أب|ماي|يون|يول|أغ|س|أك|ن|د)/i,wide:/^(ين|ف|مار|أب|ماي|يون|يول|أغ|س|أك|ن|د)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ي/i,/^ف/i,/^م/i,/^أ/i,/^م/i,/^ي/i,/^ي/i,/^أ/i,/^س/i,/^أ/i,/^ن/i,/^د/i],any:[/^ين/i,/^ف/i,/^مار/i,/^أب/i,/^ماي/i,/^يون/i,/^يول/i,/^أغ/i,/^س/i,/^أك/i,/^ن/i,/^د/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[حنثرخجس]/i,short:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,abbreviated:/^(أحد|اثن|ثلا|أرب|خمي|جمعة|سبت)/i,wide:/^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ح/i,/^ن/i,/^ث/i,/^ر/i,/^خ/i,/^ج/i,/^س/i],wide:[/^الأحد/i,/^الاثنين/i,/^الثلاثاء/i,/^الأربعاء/i,/^الخميس/i,/^الجمعة/i,/^السبت/i],any:[/^أح/i,/^اث/i,/^ث/i,/^أر/i,/^خ/i,/^ج/i,/^س/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},Cf={lessThanXSeconds:{one:"أقل من ثانية",two:"أقل من زوز ثواني",threeToTen:"أقل من {{count}} ثواني",other:"أقل من {{count}} ثانية"},xSeconds:{one:"ثانية",two:"زوز ثواني",threeToTen:"{{count}} ثواني",other:"{{count}} ثانية"},halfAMinute:"نص دقيقة",lessThanXMinutes:{one:"أقل من دقيقة",two:"أقل من دقيقتين",threeToTen:"أقل من {{count}} دقايق",other:"أقل من {{count}} دقيقة"},xMinutes:{one:"دقيقة",two:"دقيقتين",threeToTen:"{{count}} دقايق",other:"{{count}} دقيقة"},aboutXHours:{one:"ساعة تقريب",two:"ساعتين تقريب",threeToTen:"{{count}} سوايع تقريب",other:"{{count}} ساعة تقريب"},xHours:{one:"ساعة",two:"ساعتين",threeToTen:"{{count}} سوايع",other:"{{count}} ساعة"},xDays:{one:"نهار",two:"نهارين",threeToTen:"{{count}} أيام",other:"{{count}} يوم"},aboutXWeeks:{one:"جمعة تقريب",two:"جمعتين تقريب",threeToTen:"{{count}} جماع تقريب",other:"{{count}} جمعة تقريب"},xWeeks:{one:"جمعة",two:"جمعتين",threeToTen:"{{count}} جماع",other:"{{count}} جمعة"},aboutXMonths:{one:"شهر تقريب",two:"شهرين تقريب",threeToTen:"{{count}} أشهرة تقريب",other:"{{count}} شهر تقريب"},xMonths:{one:"شهر",two:"شهرين",threeToTen:"{{count}} أشهرة",other:"{{count}} شهر"},aboutXYears:{one:"عام تقريب",two:"عامين تقريب",threeToTen:"{{count}} أعوام تقريب",other:"{{count}} عام تقريب"},xYears:{one:"عام",two:"عامين",threeToTen:"{{count}} أعوام",other:"{{count}} عام"},overXYears:{one:"أكثر من عام",two:"أكثر من عامين",threeToTen:"أكثر من {{count}} أعوام",other:"أكثر من {{count}} عام"},almostXYears:{one:"عام تقريب",two:"عامين تقريب",threeToTen:"{{count}} أعوام تقريب",other:"{{count}} عام تقريب"}},Lf={date:ef({formats:{full:"EEEE، do MMMM y",long:"do MMMM y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss",long:"HH:mm:ss",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'مع' {{time}}",long:"{{date}} 'مع' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},If={lastWeek:"eeee 'إلي فات مع' p",yesterday:"'البارح مع' p",today:"'اليوم مع' p",tomorrow:"'غدوة مع' p",nextWeek:"eeee 'الجمعة الجاية مع' p 'نهار'",other:"P"},Df={code:"ar-TN",formatDistance:(e,t,n)=>{const i=Cf[e];let a;return a="string"==typeof i?i:1===t?i.one:2===t?i.two:t<=10?i.threeToTen.replace("{{count}}",String(t)):i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"في "+a:"عندو "+a:a},formatLong:Lf,formatRelative:e=>If[e],localize:{ordinalNumber:e=>String(e),era:af({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["د","ن","أ","س","أ","ج","ج","م","أ","م","ف","ج"],abbreviated:["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],wide:["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},defaultWidth:"wide"}),day:af({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],wide:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ص",pm:"ع",morning:"الصباح",noon:"القايلة",afternoon:"بعد القايلة",evening:"العشية",night:"الليل",midnight:"نص الليل"},abbreviated:{am:"ص",pm:"ع",morning:"الصباح",noon:"القايلة",afternoon:"بعد القايلة",evening:"العشية",night:"الليل",midnight:"نص الليل"},wide:{am:"ص",pm:"ع",morning:"الصباح",noon:"القايلة",afternoon:"بعد القايلة",evening:"العشية",night:"الليل",midnight:"نص الليل"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ص",pm:"ع",morning:"في الصباح",noon:"في القايلة",afternoon:"بعد القايلة",evening:"في العشية",night:"في الليل",midnight:"نص الليل"},abbreviated:{am:"ص",pm:"ع",morning:"في الصباح",noon:"في القايلة",afternoon:"بعد القايلة",evening:"في العشية",night:"في الليل",midnight:"نص الليل"},wide:{am:"ص",pm:"ع",morning:"في الصباح",noon:"في القايلة",afternoon:"بعد القايلة",evening:"في العشية",night:"في الليل",midnight:"نص الليل"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/[قب]/,abbreviated:/[قب]\.م\./,wide:/(قبل|بعد) الميلاد/},defaultMatchWidth:"wide",parsePatterns:{any:[/قبل/,/بعد/]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/ر[1234]/,wide:/الربع (الأول|الثاني|الثالث|الرابع)/},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[جفمأسند]/,abbreviated:/^(جانفي|فيفري|مارس|أفريل|ماي|جوان|جويلية|أوت|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/,wide:/^(جانفي|فيفري|مارس|أفريل|ماي|جوان|جويلية|أوت|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ج/i,/^ف/i,/^م/i,/^أ/i,/^م/i,/^ج/i,/^ج/i,/^أ/i,/^س/i,/^أ/i,/^ن/i,/^د/i],any:[/^جانفي/i,/^فيفري/i,/^مارس/i,/^أفريل/i,/^ماي/i,/^جوان/i,/^جويلية/i,/^أوت/i,/^سبتمبر/i,/^أكتوبر/i,/^نوفمبر/i,/^ديسمبر/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[حنثرخجس]/i,short:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,abbreviated:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,wide:/^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ح/i,/^ن/i,/^ث/i,/^ر/i,/^خ/i,/^ج/i,/^س/i],wide:[/^الأحد/i,/^الاثنين/i,/^الثلاثاء/i,/^الأربعاء/i,/^الخميس/i,/^الجمعة/i,/^السبت/i],any:[/^أح/i,/^اث/i,/^ث/i,/^أر/i,/^خ/i,/^ج/i,/^س/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(ص|ع|ن ل|ل|(في|مع) (صباح|قايلة|عشية|ليل))/,any:/^([صع]|نص الليل|قايلة|(في|مع) (صباح|قايلة|عشية|ليل))/},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ص/,pm:/^ع/,midnight:/نص الليل/,noon:/قايلة/,afternoon:/بعد القايلة/,morning:/صباح/,evening:/عشية/,night:/ليل/}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Rf={lessThanXSeconds:{one:"bir saniyədən az",other:"{{count}} bir saniyədən az"},xSeconds:{one:"1 saniyə",other:"{{count}} saniyə"},halfAMinute:"yarım dəqiqə",lessThanXMinutes:{one:"bir dəqiqədən az",other:"{{count}} bir dəqiqədən az"},xMinutes:{one:"bir dəqiqə",other:"{{count}} dəqiqə"},aboutXHours:{one:"təxminən 1 saat",other:"təxminən {{count}} saat"},xHours:{one:"1 saat",other:"{{count}} saat"},xDays:{one:"1 gün",other:"{{count}} gün"},aboutXWeeks:{one:"təxminən 1 həftə",other:"təxminən {{count}} həftə"},xWeeks:{one:"1 həftə",other:"{{count}} həftə"},aboutXMonths:{one:"təxminən 1 ay",other:"təxminən {{count}} ay"},xMonths:{one:"1 ay",other:"{{count}} ay"},aboutXYears:{one:"təxminən 1 il",other:"təxminən {{count}} il"},xYears:{one:"1 il",other:"{{count}} il"},overXYears:{one:"1 ildən çox",other:"{{count}} ildən çox"},almostXYears:{one:"demək olar ki 1 il",other:"demək olar ki {{count}} il"}},Wf={date:ef({formats:{full:"EEEE, do MMMM y 'il'",long:"do MMMM y 'il'",medium:"d MMM y 'il'",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}} - 'də'",long:"{{date}} {{time}} - 'də'",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Nf={lastWeek:"'sonuncu' eeee p -'də'",yesterday:"'dünən' p -'də'",today:"'bugün' p -'də'",tomorrow:"'sabah' p -'də'",nextWeek:"eeee p -'də'",other:"P"},Of={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"},Ff={ordinalNumber:(e,t)=>{const n=Number(e),i=(e=>{if(0===e)return e+"-ıncı";const t=e%10,n=e%100-t,i=e>=100?100:null;return Of[t]?Of[t]:Of[n]?Of[n]:null!==i?Of[i]:""})(n);return n+i},era:af({values:{narrow:["e.ə","b.e"],abbreviated:["e.ə","b.e"],wide:["eramızdan əvvəl","bizim era"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1ci kvartal","2ci kvartal","3cü kvartal","4cü kvartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["Y","F","M","A","M","İ","İ","A","S","O","N","D"],abbreviated:["Yan","Fev","Mar","Apr","May","İyun","İyul","Avq","Sen","Okt","Noy","Dek"],wide:["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"]},defaultWidth:"wide"}),day:af({values:{narrow:["B.","B.e","Ç.a","Ç.","C.a","C.","Ş."],short:["B.","B.e","Ç.a","Ç.","C.a","C.","Ş."],abbreviated:["Baz","Baz.e","Çər.a","Çər","Cüm.a","Cüm","Şə"],wide:["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"am",pm:"pm",midnight:"gecəyarı",noon:"gün",morning:"səhər",afternoon:"gündüz",evening:"axşam",night:"gecə"},abbreviated:{am:"AM",pm:"PM",midnight:"gecəyarı",noon:"gün",morning:"səhər",afternoon:"gündüz",evening:"axşam",night:"gecə"},wide:{am:"a.m.",pm:"p.m.",midnight:"gecəyarı",noon:"gün",morning:"səhər",afternoon:"gündüz",evening:"axşam",night:"gecə"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"gecəyarı",noon:"gün",morning:"səhər",afternoon:"gündüz",evening:"axşam",night:"gecə"},abbreviated:{am:"AM",pm:"PM",midnight:"gecəyarı",noon:"gün",morning:"səhər",afternoon:"gündüz",evening:"axşam",night:"gecə"},wide:{am:"a.m.",pm:"p.m.",midnight:"gecəyarı",noon:"gün",morning:"səhər",afternoon:"gündüz",evening:"axşam",night:"gecə"}},defaultFormattingWidth:"wide"})},jf={code:"az",formatDistance:(e,t,n)=>{let i;const a=Rf[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?i+" sonra":i+" əvvəl":i},formatLong:Wf,formatRelative:(e,t,n,i)=>Nf[e],localize:Ff,match:{ordinalNumber:sf({matchPattern:/^(\d+)(-?(ci|inci|nci|uncu|üncü|ncı))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(b|a)$/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)$/i,wide:/^(bizim eradan əvvəl|bizim era)$/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b$/i,/^(a|c)$/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]$/i,abbreviated:/^K[1234]$/i,wide:/^[1234](ci)? kvartal$/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[(?-i)yfmaisond]$/i,abbreviated:/^(Yan|Fev|Mar|Apr|May|İyun|İyul|Avq|Sen|Okt|Noy|Dek)$/i,wide:/^(Yanvar|Fevral|Mart|Aprel|May|İyun|İyul|Avgust|Sentyabr|Oktyabr|Noyabr|Dekabr)$/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^[(?-i)y]$/i,/^[(?-i)f]$/i,/^[(?-i)m]$/i,/^[(?-i)a]$/i,/^[(?-i)m]$/i,/^[(?-i)i]$/i,/^[(?-i)i]$/i,/^[(?-i)a]$/i,/^[(?-i)s]$/i,/^[(?-i)o]$/i,/^[(?-i)n]$/i,/^[(?-i)d]$/i],abbreviated:[/^Yan$/i,/^Fev$/i,/^Mar$/i,/^Apr$/i,/^May$/i,/^İyun$/i,/^İyul$/i,/^Avg$/i,/^Sen$/i,/^Okt$/i,/^Noy$/i,/^Dek$/i],wide:[/^Yanvar$/i,/^Fevral$/i,/^Mart$/i,/^Aprel$/i,/^May$/i,/^İyun$/i,/^İyul$/i,/^Avgust$/i,/^Sentyabr$/i,/^Oktyabr$/i,/^Noyabr$/i,/^Dekabr$/i]},defaultParseWidth:"narrow"}),day:of({matchPatterns:{narrow:/^(B\.|B\.e|Ç\.a|Ç\.|C\.a|C\.|Ş\.)$/i,short:/^(B\.|B\.e|Ç\.a|Ç\.|C\.a|C\.|Ş\.)$/i,abbreviated:/^(Baz\.e|Çər|Çər\.a|Cüm|Cüm\.a|Şə)$/i,wide:/^(Bazar|Bazar ertəsi|Çərşənbə axşamı|Çərşənbə|Cümə axşamı|Cümə|Şənbə)$/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^B\.$/i,/^B\.e$/i,/^Ç\.a$/i,/^Ç\.$/i,/^C\.a$/i,/^C\.$/i,/^Ş\.$/i],abbreviated:[/^Baz$/i,/^Baz\.e$/i,/^Çər\.a$/i,/^Çər$/i,/^Cüm\.a$/i,/^Cüm$/i,/^Şə$/i],wide:[/^Bazar$/i,/^Bazar ertəsi$/i,/^Çərşənbə axşamı$/i,/^Çərşənbə$/i,/^Cümə axşamı$/i,/^Cümə$/i,/^Şənbə$/i],any:[/^B\.$/i,/^B\.e$/i,/^Ç\.a$/i,/^Ç\.$/i,/^C\.a$/i,/^C\.$/i,/^Ş\.$/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|gecəyarı|gün|səhər|gündüz|axşam|gecə)$/i,any:/^(am|pm|a\.m\.|p\.m\.|AM|PM|gecəyarı|gün|səhər|gündüz|axşam|gecə)$/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a$/i,pm:/^p$/i,midnight:/^gecəyarı$/i,noon:/^gün$/i,morning:/səhər$/i,afternoon:/gündüz$/i,evening:/axşam$/i,night:/gecə$/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}};function zf(e,t){if(void 0!==e.one&&1===t)return e.one;const n=t%10,i=t%100;return 1===n&&11!==i?e.singularNominative.replace("{{count}}",String(t)):n>=2&&n<=4&&(i<10||i>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function $f(e){return(t,n)=>n&&n.addSuffix?n.comparison&&n.comparison>0?e.future?zf(e.future,t):"праз "+zf(e.regular,t):e.past?zf(e.past,t):zf(e.regular,t)+" таму":zf(e.regular,t)}const Uf={lessThanXSeconds:$f({regular:{one:"менш за секунду",singularNominative:"менш за {{count}} секунду",singularGenitive:"менш за {{count}} секунды",pluralGenitive:"менш за {{count}} секунд"},future:{one:"менш, чым праз секунду",singularNominative:"менш, чым праз {{count}} секунду",singularGenitive:"менш, чым праз {{count}} секунды",pluralGenitive:"менш, чым праз {{count}} секунд"}}),xSeconds:$f({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду таму",singularGenitive:"{{count}} секунды таму",pluralGenitive:"{{count}} секунд таму"},future:{singularNominative:"праз {{count}} секунду",singularGenitive:"праз {{count}} секунды",pluralGenitive:"праз {{count}} секунд"}}),halfAMinute:(e,t)=>t&&t.addSuffix?t.comparison&&t.comparison>0?"праз паўхвіліны":"паўхвіліны таму":"паўхвіліны",lessThanXMinutes:$f({regular:{one:"менш за хвіліну",singularNominative:"менш за {{count}} хвіліну",singularGenitive:"менш за {{count}} хвіліны",pluralGenitive:"менш за {{count}} хвілін"},future:{one:"менш, чым праз хвіліну",singularNominative:"менш, чым праз {{count}} хвіліну",singularGenitive:"менш, чым праз {{count}} хвіліны",pluralGenitive:"менш, чым праз {{count}} хвілін"}}),xMinutes:$f({regular:{singularNominative:"{{count}} хвіліна",singularGenitive:"{{count}} хвіліны",pluralGenitive:"{{count}} хвілін"},past:{singularNominative:"{{count}} хвіліну таму",singularGenitive:"{{count}} хвіліны таму",pluralGenitive:"{{count}} хвілін таму"},future:{singularNominative:"праз {{count}} хвіліну",singularGenitive:"праз {{count}} хвіліны",pluralGenitive:"праз {{count}} хвілін"}}),aboutXHours:$f({regular:{singularNominative:"каля {{count}} гадзіны",singularGenitive:"каля {{count}} гадзін",pluralGenitive:"каля {{count}} гадзін"},future:{singularNominative:"прыблізна праз {{count}} гадзіну",singularGenitive:"прыблізна праз {{count}} гадзіны",pluralGenitive:"прыблізна праз {{count}} гадзін"}}),xHours:$f({regular:{singularNominative:"{{count}} гадзіна",singularGenitive:"{{count}} гадзіны",pluralGenitive:"{{count}} гадзін"},past:{singularNominative:"{{count}} гадзіну таму",singularGenitive:"{{count}} гадзіны таму",pluralGenitive:"{{count}} гадзін таму"},future:{singularNominative:"праз {{count}} гадзіну",singularGenitive:"праз {{count}} гадзіны",pluralGenitive:"праз {{count}} гадзін"}}),xDays:$f({regular:{singularNominative:"{{count}} дзень",singularGenitive:"{{count}} дні",pluralGenitive:"{{count}} дзён"}}),aboutXWeeks:$f({regular:{singularNominative:"каля {{count}} тыдні",singularGenitive:"каля {{count}} тыдняў",pluralGenitive:"каля {{count}} тыдняў"},future:{singularNominative:"прыблізна праз {{count}} тыдзень",singularGenitive:"прыблізна праз {{count}} тыдні",pluralGenitive:"прыблізна праз {{count}} тыдняў"}}),xWeeks:$f({regular:{singularNominative:"{{count}} тыдзень",singularGenitive:"{{count}} тыдні",pluralGenitive:"{{count}} тыдняў"}}),aboutXMonths:$f({regular:{singularNominative:"каля {{count}} месяца",singularGenitive:"каля {{count}} месяцаў",pluralGenitive:"каля {{count}} месяцаў"},future:{singularNominative:"прыблізна праз {{count}} месяц",singularGenitive:"прыблізна праз {{count}} месяцы",pluralGenitive:"прыблізна праз {{count}} месяцаў"}}),xMonths:$f({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяцы",pluralGenitive:"{{count}} месяцаў"}}),aboutXYears:$f({regular:{singularNominative:"каля {{count}} года",singularGenitive:"каля {{count}} гадоў",pluralGenitive:"каля {{count}} гадоў"},future:{singularNominative:"прыблізна праз {{count}} год",singularGenitive:"прыблізна праз {{count}} гады",pluralGenitive:"прыблізна праз {{count}} гадоў"}}),xYears:$f({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} гады",pluralGenitive:"{{count}} гадоў"}}),overXYears:$f({regular:{singularNominative:"больш за {{count}} год",singularGenitive:"больш за {{count}} гады",pluralGenitive:"больш за {{count}} гадоў"},future:{singularNominative:"больш, чым праз {{count}} год",singularGenitive:"больш, чым праз {{count}} гады",pluralGenitive:"больш, чым праз {{count}} гадоў"}}),almostXYears:$f({regular:{singularNominative:"амаль {{count}} год",singularGenitive:"амаль {{count}} гады",pluralGenitive:"амаль {{count}} гадоў"},future:{singularNominative:"амаль праз {{count}} год",singularGenitive:"амаль праз {{count}} гады",pluralGenitive:"амаль праз {{count}} гадоў"}})},Hf={date:ef({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:ef({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:ef({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})};function Bf(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}let Gf={};function Xf(){return Gf}function Yf(e,t){const n=Xf(),i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=Bf(e),r=a.getDay(),o=(r<i?7:0)+r-i;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function Vf(e,t,n){return+Yf(e,n)==+Yf(t,n)}const Kf=["нядзелю","панядзелак","аўторак","сераду","чацвер","пятніцу","суботу"];function qf(e){return"'у "+Kf[e]+" а' p"}const Jf={lastWeek:(e,t,n)=>{const i=Bf(e),a=i.getDay();return Vf(i,t,n)?qf(a):function(e){const t=Kf[e];switch(e){case 0:case 3:case 5:case 6:return"'у мінулую "+t+" а' p";case 1:case 2:case 4:return"'у мінулы "+t+" а' p"}}(a)},yesterday:"'учора а' p",today:"'сёння а' p",tomorrow:"'заўтра а' p",nextWeek:(e,t,n)=>{const i=Bf(e),a=i.getDay();return Vf(i,t,n)?qf(a):function(e){const t=Kf[e];switch(e){case 0:case 3:case 5:case 6:return"'у наступную "+t+" а' p";case 1:case 2:case 4:return"'у наступны "+t+" а' p"}}(a)},other:"P"},Qf={code:"be",formatDistance:(e,t,n)=>(n=n||{},Uf[e](t,n)),formatLong:Hf,formatRelative:(e,t,n,i)=>{const a=Jf[e];return"function"==typeof a?a(t,n,i):a},localize:{ordinalNumber:(e,t)=>{const n=String(t?.unit),i=Number(e);let a;return a="date"===n?"-га":"hour"===n||"minute"===n||"second"===n?"-я":i%10!=2&&i%10!=3||i%100==12||i%100==13?"-ы":"-і",i+a},era:af({values:{narrow:["да н.э.","н.э."],abbreviated:["да н. э.","н. э."],wide:["да нашай эры","нашай эры"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1-ы кв.","2-і кв.","3-і кв.","4-ы кв."],wide:["1-ы квартал","2-і квартал","3-і квартал","4-ы квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["С","Л","С","К","М","Ч","Л","Ж","В","К","Л","С"],abbreviated:["студз.","лют.","сак.","крас.","май","чэрв.","ліп.","жн.","вер.","кастр.","ліст.","снеж."],wide:["студзень","люты","сакавік","красавік","май","чэрвень","ліпень","жнівень","верасень","кастрычнік","лістапад","снежань"]},defaultWidth:"wide",formattingValues:{narrow:["С","Л","С","К","М","Ч","Л","Ж","В","К","Л","С"],abbreviated:["студз.","лют.","сак.","крас.","мая","чэрв.","ліп.","жн.","вер.","кастр.","ліст.","снеж."],wide:["студзеня","лютага","сакавіка","красавіка","мая","чэрвеня","ліпеня","жніўня","верасня","кастрычніка","лістапада","снежня"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["Н","П","А","С","Ч","П","С"],short:["нд","пн","аў","ср","чц","пт","сб"],abbreviated:["нядз","пан","аўт","сер","чац","пят","суб"],wide:["нядзеля","панядзелак","аўторак","серада","чацвер","пятніца","субота"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ДП",pm:"ПП",midnight:"поўн.",noon:"поўд.",morning:"ран.",afternoon:"дзень",evening:"веч.",night:"ноч"},abbreviated:{am:"ДП",pm:"ПП",midnight:"поўн.",noon:"поўд.",morning:"ран.",afternoon:"дзень",evening:"веч.",night:"ноч"},wide:{am:"ДП",pm:"ПП",midnight:"поўнач",noon:"поўдзень",morning:"раніца",afternoon:"дзень",evening:"вечар",night:"ноч"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"поўн.",noon:"поўд.",morning:"ран.",afternoon:"дня",evening:"веч.",night:"ночы"},abbreviated:{am:"ДП",pm:"ПП",midnight:"поўн.",noon:"поўд.",morning:"ран.",afternoon:"дня",evening:"веч.",night:"ночы"},wide:{am:"ДП",pm:"ПП",midnight:"поўнач",noon:"поўдзень",morning:"раніцы",afternoon:"дня",evening:"вечара",night:"ночы"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(-?(е|я|га|і|ы|ае|ая|яя|шы|гі|ці|ты|мы))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^((да )?н\.?\s?э\.?)/i,abbreviated:/^((да )?н\.?\s?э\.?)/i,wide:/^(да нашай эры|нашай эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыі]?)? кв.?/i,wide:/^[1234](-?[ыі]?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[слкмчжв]/i,abbreviated:/^(студз|лют|сак|крас|ма[йя]|чэрв|ліп|жн|вер|кастр|ліст|снеж)\.?/i,wide:/^(студзен[ья]|лют(ы|ага)|сакавіка?|красавіка?|ма[йя]|чэрвен[ья]|ліпен[ья]|жні(вень|ўня)|верас(ень|ня)|кастрычніка?|лістапада?|снеж(ань|ня))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^с/i,/^л/i,/^с/i,/^к/i,/^м/i,/^ч/i,/^л/i,/^ж/i,/^в/i,/^к/i,/^л/i,/^с/i],any:[/^ст/i,/^лю/i,/^са/i,/^кр/i,/^ма/i,/^ч/i,/^ліп/i,/^ж/i,/^в/i,/^ка/i,/^ліс/i,/^сн/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[нпасч]/i,short:/^(нд|ня|пн|па|аў|ат|ср|се|чц|ча|пт|пя|сб|су)\.?/i,abbreviated:/^(нядз?|ндз|пнд|пан|аўт|срд|сер|чцв|чац|птн|пят|суб).?/i,wide:/^(нядзел[яі]|панядзел(ак|ка)|аўтор(ак|ка)|серад[аы]|чацв(ер|ярга)|пятніц[аы]|субот[аы])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^н/i,/^п/i,/^а/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н/i,/^п[ан]/i,/^а/i,/^с[ер]/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^([дп]п|поўн\.?|поўд\.?|ран\.?|дзень|дня|веч\.?|ночы?)/i,abbreviated:/^([дп]п|поўн\.?|поўд\.?|ран\.?|дзень|дня|веч\.?|ночы?)/i,wide:/^([дп]п|поўнач|поўдзень|раніц[аы]|дзень|дня|вечара?|ночы?)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^поўн/i,noon:/^поўд/i,morning:/^р/i,afternoon:/^д[зн]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}};function Zf(e,t){if(void 0!==e.one&&1===t)return e.one;const n=t%10,i=t%100;return 1===n&&11!==i?e.singularNominative.replace("{{count}}",String(t)):n>=2&&n<=4&&(i<10||i>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function ep(e){return(t,n)=>n&&n.addSuffix?n.comparison&&n.comparison>0?e.future?Zf(e.future,t):"праз "+Zf(e.regular,t):e.past?Zf(e.past,t):Zf(e.regular,t)+" таму":Zf(e.regular,t)}const tp={lessThanXSeconds:ep({regular:{one:"менш за секунду",singularNominative:"менш за {{count}} секунду",singularGenitive:"менш за {{count}} секунды",pluralGenitive:"менш за {{count}} секунд"},future:{one:"менш, чым праз секунду",singularNominative:"менш, чым праз {{count}} секунду",singularGenitive:"менш, чым праз {{count}} секунды",pluralGenitive:"менш, чым праз {{count}} секунд"}}),xSeconds:ep({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду таму",singularGenitive:"{{count}} секунды таму",pluralGenitive:"{{count}} секунд таму"},future:{singularNominative:"праз {{count}} секунду",singularGenitive:"праз {{count}} секунды",pluralGenitive:"праз {{count}} секунд"}}),halfAMinute:(e,t)=>t&&t.addSuffix?t.comparison&&t.comparison>0?"праз паўхвіліны":"паўхвіліны таму":"паўхвіліны",lessThanXMinutes:ep({regular:{one:"менш за хвіліну",singularNominative:"менш за {{count}} хвіліну",singularGenitive:"менш за {{count}} хвіліны",pluralGenitive:"менш за {{count}} хвілін"},future:{one:"менш, чым праз хвіліну",singularNominative:"менш, чым праз {{count}} хвіліну",singularGenitive:"менш, чым праз {{count}} хвіліны",pluralGenitive:"менш, чым праз {{count}} хвілін"}}),xMinutes:ep({regular:{singularNominative:"{{count}} хвіліна",singularGenitive:"{{count}} хвіліны",pluralGenitive:"{{count}} хвілін"},past:{singularNominative:"{{count}} хвіліну таму",singularGenitive:"{{count}} хвіліны таму",pluralGenitive:"{{count}} хвілін таму"},future:{singularNominative:"праз {{count}} хвіліну",singularGenitive:"праз {{count}} хвіліны",pluralGenitive:"праз {{count}} хвілін"}}),aboutXHours:ep({regular:{singularNominative:"каля {{count}} гадзіны",singularGenitive:"каля {{count}} гадзін",pluralGenitive:"каля {{count}} гадзін"},future:{singularNominative:"прыблізна праз {{count}} гадзіну",singularGenitive:"прыблізна праз {{count}} гадзіны",pluralGenitive:"прыблізна праз {{count}} гадзін"}}),xHours:ep({regular:{singularNominative:"{{count}} гадзіна",singularGenitive:"{{count}} гадзіны",pluralGenitive:"{{count}} гадзін"},past:{singularNominative:"{{count}} гадзіну таму",singularGenitive:"{{count}} гадзіны таму",pluralGenitive:"{{count}} гадзін таму"},future:{singularNominative:"праз {{count}} гадзіну",singularGenitive:"праз {{count}} гадзіны",pluralGenitive:"праз {{count}} гадзін"}}),xDays:ep({regular:{singularNominative:"{{count}} дзень",singularGenitive:"{{count}} дні",pluralGenitive:"{{count}} дзён"}}),aboutXWeeks:ep({regular:{singularNominative:"каля {{count}} тыдні",singularGenitive:"каля {{count}} тыдняў",pluralGenitive:"каля {{count}} тыдняў"},future:{singularNominative:"прыблізна праз {{count}} тыдзень",singularGenitive:"прыблізна праз {{count}} тыдні",pluralGenitive:"прыблізна праз {{count}} тыдняў"}}),xWeeks:ep({regular:{singularNominative:"{{count}} тыдзень",singularGenitive:"{{count}} тыдні",pluralGenitive:"{{count}} тыдняў"}}),aboutXMonths:ep({regular:{singularNominative:"каля {{count}} месяца",singularGenitive:"каля {{count}} месяцаў",pluralGenitive:"каля {{count}} месяцаў"},future:{singularNominative:"прыблізна праз {{count}} месяц",singularGenitive:"прыблізна праз {{count}} месяцы",pluralGenitive:"прыблізна праз {{count}} месяцаў"}}),xMonths:ep({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяцы",pluralGenitive:"{{count}} месяцаў"}}),aboutXYears:ep({regular:{singularNominative:"каля {{count}} года",singularGenitive:"каля {{count}} гадоў",pluralGenitive:"каля {{count}} гадоў"},future:{singularNominative:"прыблізна праз {{count}} год",singularGenitive:"прыблізна праз {{count}} гады",pluralGenitive:"прыблізна праз {{count}} гадоў"}}),xYears:ep({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} гады",pluralGenitive:"{{count}} гадоў"}}),overXYears:ep({regular:{singularNominative:"больш за {{count}} год",singularGenitive:"больш за {{count}} гады",pluralGenitive:"больш за {{count}} гадоў"},future:{singularNominative:"больш, чым праз {{count}} год",singularGenitive:"больш, чым праз {{count}} гады",pluralGenitive:"больш, чым праз {{count}} гадоў"}}),almostXYears:ep({regular:{singularNominative:"амаль {{count}} год",singularGenitive:"амаль {{count}} гады",pluralGenitive:"амаль {{count}} гадоў"},future:{singularNominative:"амаль праз {{count}} год",singularGenitive:"амаль праз {{count}} гады",pluralGenitive:"амаль праз {{count}} гадоў"}})},np={date:ef({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:ef({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:ef({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},ip=["нядзелю","панядзелак","аўторак","сераду","чацьвер","пятніцу","суботу"];function ap(e){return"'у "+ip[e]+" а' p"}const rp={lastWeek:(e,t,n)=>{const i=Bf(e),a=i.getDay();return Vf(i,t,n)?ap(a):function(e){const t=ip[e];switch(e){case 0:case 3:case 5:case 6:return"'у мінулую "+t+" а' p";case 1:case 2:case 4:return"'у мінулы "+t+" а' p"}}(a)},yesterday:"'учора а' p",today:"'сёньня а' p",tomorrow:"'заўтра а' p",nextWeek:(e,t,n)=>{const i=Bf(e),a=i.getDay();return Vf(i,t,n)?ap(a):function(e){const t=ip[e];switch(e){case 0:case 3:case 5:case 6:return"'у наступную "+t+" а' p";case 1:case 2:case 4:return"'у наступны "+t+" а' p"}}(a)},other:"P"},op={code:"be-tarask",formatDistance:(e,t,n)=>(n=n||{},tp[e](t,n)),formatLong:np,formatRelative:(e,t,n,i)=>{const a=rp[e];return"function"==typeof a?a(t,n,i):a},localize:{ordinalNumber:(e,t)=>{const n=String(t?.unit),i=Number(e);let a;return a="date"===n?"-га":"hour"===n||"minute"===n||"second"===n?"-я":i%10!=2&&i%10!=3||i%100==12||i%100==13?"-ы":"-і",i+a},era:af({values:{narrow:["да н.э.","н.э."],abbreviated:["да н. э.","н. э."],wide:["да нашай эры","нашай эры"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1-ы кв.","2-і кв.","3-і кв.","4-ы кв."],wide:["1-ы квартал","2-і квартал","3-і квартал","4-ы квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["С","Л","С","К","Т","Ч","Л","Ж","В","К","Л","С"],abbreviated:["студз.","лют.","сак.","крас.","трав.","чэрв.","ліп.","жн.","вер.","кастр.","ліст.","сьнеж."],wide:["студзень","люты","сакавік","красавік","травень","чэрвень","ліпень","жнівень","верасень","кастрычнік","лістапад","сьнежань"]},defaultWidth:"wide",formattingValues:{narrow:["С","Л","С","К","Т","Ч","Л","Ж","В","К","Л","С"],abbreviated:["студз.","лют.","сак.","крас.","трав.","чэрв.","ліп.","жн.","вер.","кастр.","ліст.","сьнеж."],wide:["студзеня","лютага","сакавіка","красавіка","траўня","чэрвеня","ліпеня","жніўня","верасня","кастрычніка","лістапада","сьнежня"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["Н","П","А","С","Ч","П","С"],short:["нд","пн","аў","ср","чц","пт","сб"],abbreviated:["нядз","пан","аўт","сер","чаць","пят","суб"],wide:["нядзеля","панядзелак","аўторак","серада","чацьвер","пятніца","субота"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ДП",pm:"ПП",midnight:"поўн.",noon:"поўд.",morning:"ран.",afternoon:"дзень",evening:"веч.",night:"ноч"},abbreviated:{am:"ДП",pm:"ПП",midnight:"поўн.",noon:"поўд.",morning:"ран.",afternoon:"дзень",evening:"веч.",night:"ноч"},wide:{am:"ДП",pm:"ПП",midnight:"поўнач",noon:"поўдзень",morning:"раніца",afternoon:"дзень",evening:"вечар",night:"ноч"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"поўн.",noon:"поўд.",morning:"ран.",afternoon:"дня",evening:"веч.",night:"ночы"},abbreviated:{am:"ДП",pm:"ПП",midnight:"поўн.",noon:"поўд.",morning:"ран.",afternoon:"дня",evening:"веч.",night:"ночы"},wide:{am:"ДП",pm:"ПП",midnight:"поўнач",noon:"поўдзень",morning:"раніцы",afternoon:"дня",evening:"вечара",night:"ночы"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(-?(е|я|га|і|ы|ае|ая|яя|шы|гі|ці|ты|мы))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^((да )?н\.?\s?э\.?)/i,abbreviated:/^((да )?н\.?\s?э\.?)/i,wide:/^(да нашай эры|нашай эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыі]?)? кв.?/i,wide:/^[1234](-?[ыі]?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[слкмчжв]/i,abbreviated:/^(студз|лют|сак|крас|тр(ав)?|чэрв|ліп|жн|вер|кастр|ліст|сьнеж)\.?/i,wide:/^(студзен[ья]|лют(ы|ага)|сакавіка?|красавіка?|тра(вень|ўня)|чэрвен[ья]|ліпен[ья]|жні(вень|ўня)|верас(ень|ня)|кастрычніка?|лістапада?|сьнеж(ань|ня))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^с/i,/^л/i,/^с/i,/^к/i,/^т/i,/^ч/i,/^л/i,/^ж/i,/^в/i,/^к/i,/^л/i,/^с/i],any:[/^ст/i,/^лю/i,/^са/i,/^кр/i,/^тр/i,/^ч/i,/^ліп/i,/^ж/i,/^в/i,/^ка/i,/^ліс/i,/^сн/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[нпасч]/i,short:/^(нд|ня|пн|па|аў|ат|ср|се|чц|ча|пт|пя|сб|су)\.?/i,abbreviated:/^(нядз?|ндз|пнд|пан|аўт|срд|сер|чцьв|чаць|птн|пят|суб).?/i,wide:/^(нядзел[яі]|панядзел(ак|ка)|аўтор(ак|ка)|серад[аы]|чацьв(ер|ярга)|пятніц[аы]|субот[аы])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^н/i,/^п/i,/^а/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н/i,/^п[ан]/i,/^а/i,/^с[ер]/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^([дп]п|поўн\.?|поўд\.?|ран\.?|дзень|дня|веч\.?|ночы?)/i,abbreviated:/^([дп]п|поўн\.?|поўд\.?|ран\.?|дзень|дня|веч\.?|ночы?)/i,wide:/^([дп]п|поўнач|поўдзень|раніц[аы]|дзень|дня|вечара?|ночы?)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^поўн/i,noon:/^поўд/i,morning:/^р/i,afternoon:/^д[зн]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},sp={lessThanXSeconds:{one:"по-малко от секунда",other:"по-малко от {{count}} секунди"},xSeconds:{one:"1 секунда",other:"{{count}} секунди"},halfAMinute:"половин минута",lessThanXMinutes:{one:"по-малко от минута",other:"по-малко от {{count}} минути"},xMinutes:{one:"1 минута",other:"{{count}} минути"},aboutXHours:{one:"около час",other:"около {{count}} часа"},xHours:{one:"1 час",other:"{{count}} часа"},xDays:{one:"1 ден",other:"{{count}} дни"},aboutXWeeks:{one:"около седмица",other:"около {{count}} седмици"},xWeeks:{one:"1 седмица",other:"{{count}} седмици"},aboutXMonths:{one:"около месец",other:"около {{count}} месеца"},xMonths:{one:"1 месец",other:"{{count}} месеца"},aboutXYears:{one:"около година",other:"около {{count}} години"},xYears:{one:"1 година",other:"{{count}} години"},overXYears:{one:"над година",other:"над {{count}} години"},almostXYears:{one:"почти година",other:"почти {{count}} години"}},lp={date:ef({formats:{full:"EEEE, dd MMMM yyyy",long:"dd MMMM yyyy",medium:"dd MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:ef({formats:{any:"{{date}} {{time}}"},defaultWidth:"any"})},dp=["неделя","понеделник","вторник","сряда","четвъртък","петък","събота"];function up(e){const t=dp[e];return 2===e?"'във "+t+" в' p":"'в "+t+" в' p"}const cp={lastWeek:(e,t,n)=>{const i=Bf(e),a=i.getDay();return Vf(i,t,n)?up(a):function(e){const t=dp[e];switch(e){case 0:case 3:case 6:return"'миналата "+t+" в' p";case 1:case 2:case 4:case 5:return"'миналия "+t+" в' p"}}(a)},yesterday:"'вчера в' p",today:"'днес в' p",tomorrow:"'утре в' p",nextWeek:(e,t,n)=>{const i=Bf(e),a=i.getDay();return Vf(i,t,n)?up(a):function(e){const t=dp[e];switch(e){case 0:case 3:case 6:return"'следващата "+t+" в' p";case 1:case 2:case 4:case 5:return"'следващия "+t+" в' p"}}(a)},other:"P"};function hp(e,t,n,i,a){const r=function(e){return"quarter"===e}(t)?a:function(e){return"year"===e||"week"===e||"minute"===e||"second"===e}(t)?i:n;return e+"-"+r}const mp={code:"bg",formatDistance:(e,t,n)=>{let i;const a=sp[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"след "+i:"преди "+i:i},formatLong:lp,formatRelative:(e,t,n,i)=>{const a=cp[e];return"function"==typeof a?a(t,n,i):a},localize:{ordinalNumber:(e,t)=>{const n=Number(e),i=t?.unit;if(0===n)return hp(0,i,"ев","ева","ево");if(n%1e3==0)return hp(n,i,"ен","на","но");if(n%100==0)return hp(n,i,"тен","тна","тно");const a=n%100;if(a>20||a<10)switch(a%10){case 1:return hp(n,i,"ви","ва","во");case 2:return hp(n,i,"ри","ра","ро");case 7:case 8:return hp(n,i,"ми","ма","мо")}return hp(n,i,"ти","та","то")},era:af({values:{narrow:["пр.н.е.","н.е."],abbreviated:["преди н. е.","н. е."],wide:["преди новата ера","новата ера"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1-во тримес.","2-ро тримес.","3-то тримес.","4-то тримес."],wide:["1-во тримесечие","2-ро тримесечие","3-то тримесечие","4-то тримесечие"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{abbreviated:["яну","фев","мар","апр","май","юни","юли","авг","сеп","окт","ное","дек"],wide:["януари","февруари","март","април","май","юни","юли","август","септември","октомври","ноември","декември"]},defaultWidth:"wide"}),day:af({values:{narrow:["Н","П","В","С","Ч","П","С"],short:["нд","пн","вт","ср","чт","пт","сб"],abbreviated:["нед","пон","вто","сря","чет","пет","съб"],wide:["неделя","понеделник","вторник","сряда","четвъртък","петък","събота"]},defaultWidth:"wide"}),dayPeriod:af({values:{wide:{am:"преди обяд",pm:"след обяд",midnight:"в полунощ",noon:"на обяд",morning:"сутринта",afternoon:"следобед",evening:"вечерта",night:"през нощта"}},defaultWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(-?[врмт][аи]|-?т?(ен|на)|-?(ев|ева))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^((пр)?н\.?\s?е\.?)/i,abbreviated:/^((пр)?н\.?\s?е\.?)/i,wide:/^(преди новата ера|новата ера|нова ера)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^п/i,/^н/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[врт]?o?)? тримес.?/i,wide:/^[1234](-?[врт]?о?)? тримесечие/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{abbreviated:/^(яну|фев|мар|апр|май|юни|юли|авг|сеп|окт|ное|дек)/i,wide:/^(януари|февруари|март|април|май|юни|юли|август|септември|октомври|ноември|декември)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^май/i,/^юн/i,/^юл/i,/^ав/i,/^се/i,/^окт/i,/^но/i,/^де/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[нпвсч]/i,short:/^(нд|пн|вт|ср|чт|пт|сб)/i,abbreviated:/^(нед|пон|вто|сря|чет|пет|съб)/i,wide:/^(неделя|понеделник|вторник|сряда|четвъртък|петък|събота)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^н/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н[ед]/i,/^п[он]/i,/^вт/i,/^ср/i,/^ч[ет]/i,/^п[ет]/i,/^с[ъб]/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(преди о|след о|в по|на о|през|веч|сут|следо)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^преди о/i,pm:/^след о/i,midnight:/^в пол/i,noon:/^на об/i,morning:/^сут/i,afternoon:/^следо/i,evening:/^веч/i,night:/^през н/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},fp={locale:{1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},number:{"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"}};function pp(e){return e.toString().replace(/\d/g,(function(e){return fp.locale[e]}))}const gp={ordinalNumber:(e,t)=>{const n=Number(e),i=pp(n),a=t?.unit;if("date"===a)return function(e,t){if(e>18&&e<=31)return t+"শে";switch(e){case 1:return t+"লা";case 2:case 3:return t+"রা";case 4:return t+"ঠা";default:return t+"ই"}}(n,i);if(n>10||0===n)return i+"তম";switch(n%10){case 2:case 3:return i+"য়";case 4:return i+"র্থ";case 6:return i+"ষ্ঠ";default:return i+"ম"}},era:af({values:{narrow:["খ্রিঃপূঃ","খ্রিঃ"],abbreviated:["খ্রিঃপূর্ব","খ্রিঃ"],wide:["খ্রিস্টপূর্ব","খ্রিস্টাব্দ"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["১","২","৩","৪"],abbreviated:["১ত্রৈ","২ত্রৈ","৩ত্রৈ","৪ত্রৈ"],wide:["১ম ত্রৈমাসিক","২য় ত্রৈমাসিক","৩য় ত্রৈমাসিক","৪র্থ ত্রৈমাসিক"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["জানু","ফেব্রু","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্ট","অক্টো","নভে","ডিসে"],abbreviated:["জানু","ফেব্রু","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্ট","অক্টো","নভে","ডিসে"],wide:["জানুয়ারি","ফেব্রুয়ারি","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"]},defaultWidth:"wide"}),day:af({values:{narrow:["র","সো","ম","বু","বৃ","শু","শ"],short:["রবি","সোম","মঙ্গল","বুধ","বৃহ","শুক্র","শনি"],abbreviated:["রবি","সোম","মঙ্গল","বুধ","বৃহ","শুক্র","শনি"],wide:["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার ","শুক্রবার","শনিবার"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"পূ",pm:"অপ",midnight:"মধ্যরাত",noon:"মধ্যাহ্ন",morning:"সকাল",afternoon:"বিকাল",evening:"সন্ধ্যা",night:"রাত"},abbreviated:{am:"পূর্বাহ্ন",pm:"অপরাহ্ন",midnight:"মধ্যরাত",noon:"মধ্যাহ্ন",morning:"সকাল",afternoon:"বিকাল",evening:"সন্ধ্যা",night:"রাত"},wide:{am:"পূর্বাহ্ন",pm:"অপরাহ্ন",midnight:"মধ্যরাত",noon:"মধ্যাহ্ন",morning:"সকাল",afternoon:"বিকাল",evening:"সন্ধ্যা",night:"রাত"}},defaultWidth:"wide",formattingValues:{narrow:{am:"পূ",pm:"অপ",midnight:"মধ্যরাত",noon:"মধ্যাহ্ন",morning:"সকাল",afternoon:"বিকাল",evening:"সন্ধ্যা",night:"রাত"},abbreviated:{am:"পূর্বাহ্ন",pm:"অপরাহ্ন",midnight:"মধ্যরাত",noon:"মধ্যাহ্ন",morning:"সকাল",afternoon:"বিকাল",evening:"সন্ধ্যা",night:"রাত"},wide:{am:"পূর্বাহ্ন",pm:"অপরাহ্ন",midnight:"মধ্যরাত",noon:"মধ্যাহ্ন",morning:"সকাল",afternoon:"বিকাল",evening:"সন্ধ্যা",night:"রাত"}},defaultFormattingWidth:"wide"})},vp={lessThanXSeconds:{one:"প্রায় ১ সেকেন্ড",other:"প্রায় {{count}} সেকেন্ড"},xSeconds:{one:"১ সেকেন্ড",other:"{{count}} সেকেন্ড"},halfAMinute:"আধ মিনিট",lessThanXMinutes:{one:"প্রায় ১ মিনিট",other:"প্রায় {{count}} মিনিট"},xMinutes:{one:"১ মিনিট",other:"{{count}} মিনিট"},aboutXHours:{one:"প্রায় ১ ঘন্টা",other:"প্রায় {{count}} ঘন্টা"},xHours:{one:"১ ঘন্টা",other:"{{count}} ঘন্টা"},xDays:{one:"১ দিন",other:"{{count}} দিন"},aboutXWeeks:{one:"প্রায় ১ সপ্তাহ",other:"প্রায় {{count}} সপ্তাহ"},xWeeks:{one:"১ সপ্তাহ",other:"{{count}} সপ্তাহ"},aboutXMonths:{one:"প্রায় ১ মাস",other:"প্রায় {{count}} মাস"},xMonths:{one:"১ মাস",other:"{{count}} মাস"},aboutXYears:{one:"প্রায় ১ বছর",other:"প্রায় {{count}} বছর"},xYears:{one:"১ বছর",other:"{{count}} বছর"},overXYears:{one:"১ বছরের বেশি",other:"{{count}} বছরের বেশি"},almostXYears:{one:"প্রায় ১ বছর",other:"প্রায় {{count}} বছর"}},yp={date:ef({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}} 'সময়'",long:"{{date}} {{time}} 'সময়'",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},wp={lastWeek:"'গত' eeee 'সময়' p",yesterday:"'গতকাল' 'সময়' p",today:"'আজ' 'সময়' p",tomorrow:"'আগামীকাল' 'সময়' p",nextWeek:"eeee 'সময়' p",other:"P"},bp={ordinalNumber:sf({matchPattern:/^(\d+)(ম|য়|র্থ|ষ্ঠ|শে|ই|তম)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(খ্রিঃপূঃ|খ্রিঃ)/i,abbreviated:/^(খ্রিঃপূর্ব|খ্রিঃ)/i,wide:/^(খ্রিস্টপূর্ব|খ্রিস্টাব্দ)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^খ্রিঃপূঃ/i,/^খ্রিঃ/i],abbreviated:[/^খ্রিঃপূর্ব/i,/^খ্রিঃ/i],wide:[/^খ্রিস্টপূর্ব/i,/^খ্রিস্টাব্দ/i]},defaultParseWidth:"wide"}),quarter:of({matchPatterns:{narrow:/^[১২৩৪]/i,abbreviated:/^[১২৩৪]ত্রৈ/i,wide:/^[১২৩৪](ম|য়|র্থ)? ত্রৈমাসিক/i},defaultMatchWidth:"wide",parsePatterns:{any:[/১/i,/২/i,/৩/i,/৪/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(জানু|ফেব্রু|মার্চ|এপ্রিল|মে|জুন|জুলাই|আগস্ট|সেপ্ট|অক্টো|নভে|ডিসে)/i,abbreviated:/^(জানু|ফেব্রু|মার্চ|এপ্রিল|মে|জুন|জুলাই|আগস্ট|সেপ্ট|অক্টো|নভে|ডিসে)/i,wide:/^(জানুয়ারি|ফেব্রুয়ারি|মার্চ|এপ্রিল|মে|জুন|জুলাই|আগস্ট|সেপ্টেম্বর|অক্টোবর|নভেম্বর|ডিসেম্বর)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^জানু/i,/^ফেব্রু/i,/^মার্চ/i,/^এপ্রিল/i,/^মে/i,/^জুন/i,/^জুলাই/i,/^আগস্ট/i,/^সেপ্ট/i,/^অক্টো/i,/^নভে/i,/^ডিসে/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^(র|সো|ম|বু|বৃ|শু|শ)+/i,short:/^(রবি|সোম|মঙ্গল|বুধ|বৃহ|শুক্র|শনি)+/i,abbreviated:/^(রবি|সোম|মঙ্গল|বুধ|বৃহ|শুক্র|শনি)+/i,wide:/^(রবিবার|সোমবার|মঙ্গলবার|বুধবার|বৃহস্পতিবার |শুক্রবার|শনিবার)+/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^র/i,/^সো/i,/^ম/i,/^বু/i,/^বৃ/i,/^শু/i,/^শ/i],short:[/^রবি/i,/^সোম/i,/^মঙ্গল/i,/^বুধ/i,/^বৃহ/i,/^শুক্র/i,/^শনি/i],abbreviated:[/^রবি/i,/^সোম/i,/^মঙ্গল/i,/^বুধ/i,/^বৃহ/i,/^শুক্র/i,/^শনি/i],wide:[/^রবিবার/i,/^সোমবার/i,/^মঙ্গলবার/i,/^বুধবার/i,/^বৃহস্পতিবার /i,/^শুক্রবার/i,/^শনিবার/i]},defaultParseWidth:"wide"}),dayPeriod:of({matchPatterns:{narrow:/^(পূ|অপ|মধ্যরাত|মধ্যাহ্ন|সকাল|বিকাল|সন্ধ্যা|রাত)/i,abbreviated:/^(পূর্বাহ্ন|অপরাহ্ন|মধ্যরাত|মধ্যাহ্ন|সকাল|বিকাল|সন্ধ্যা|রাত)/i,wide:/^(পূর্বাহ্ন|অপরাহ্ন|মধ্যরাত|মধ্যাহ্ন|সকাল|বিকাল|সন্ধ্যা|রাত)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^পূ/i,pm:/^অপ/i,midnight:/^মধ্যরাত/i,noon:/^মধ্যাহ্ন/i,morning:/সকাল/i,afternoon:/বিকাল/i,evening:/সন্ধ্যা/i,night:/রাত/i}},defaultParseWidth:"any"})},kp={code:"bn",formatDistance:(e,t,n)=>{let i;const a=vp[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",pp(t)),n?.addSuffix?n.comparison&&n.comparison>0?i+" এর মধ্যে":i+" আগে":i},formatLong:yp,formatRelative:(e,t,n,i)=>wp[e],localize:gp,match:bp,options:{weekStartsOn:0,firstWeekContainsDate:1}},Sp={lessThanXSeconds:{one:{standalone:"manje od 1 sekunde",withPrepositionAgo:"manje od 1 sekunde",withPrepositionIn:"manje od 1 sekundu"},dual:"manje od {{count}} sekunde",other:"manje od {{count}} sekundi"},xSeconds:{one:{standalone:"1 sekunda",withPrepositionAgo:"1 sekunde",withPrepositionIn:"1 sekundu"},dual:"{{count}} sekunde",other:"{{count}} sekundi"},halfAMinute:"pola minute",lessThanXMinutes:{one:{standalone:"manje od 1 minute",withPrepositionAgo:"manje od 1 minute",withPrepositionIn:"manje od 1 minutu"},dual:"manje od {{count}} minute",other:"manje od {{count}} minuta"},xMinutes:{one:{standalone:"1 minuta",withPrepositionAgo:"1 minute",withPrepositionIn:"1 minutu"},dual:"{{count}} minute",other:"{{count}} minuta"},aboutXHours:{one:{standalone:"oko 1 sat",withPrepositionAgo:"oko 1 sat",withPrepositionIn:"oko 1 sat"},dual:"oko {{count}} sata",other:"oko {{count}} sati"},xHours:{one:{standalone:"1 sat",withPrepositionAgo:"1 sat",withPrepositionIn:"1 sat"},dual:"{{count}} sata",other:"{{count}} sati"},xDays:{one:{standalone:"1 dan",withPrepositionAgo:"1 dan",withPrepositionIn:"1 dan"},dual:"{{count}} dana",other:"{{count}} dana"},aboutXWeeks:{one:{standalone:"oko 1 sedmicu",withPrepositionAgo:"oko 1 sedmicu",withPrepositionIn:"oko 1 sedmicu"},dual:"oko {{count}} sedmice",other:"oko {{count}} sedmice"},xWeeks:{one:{standalone:"1 sedmicu",withPrepositionAgo:"1 sedmicu",withPrepositionIn:"1 sedmicu"},dual:"{{count}} sedmice",other:"{{count}} sedmice"},aboutXMonths:{one:{standalone:"oko 1 mjesec",withPrepositionAgo:"oko 1 mjesec",withPrepositionIn:"oko 1 mjesec"},dual:"oko {{count}} mjeseca",other:"oko {{count}} mjeseci"},xMonths:{one:{standalone:"1 mjesec",withPrepositionAgo:"1 mjesec",withPrepositionIn:"1 mjesec"},dual:"{{count}} mjeseca",other:"{{count}} mjeseci"},aboutXYears:{one:{standalone:"oko 1 godinu",withPrepositionAgo:"oko 1 godinu",withPrepositionIn:"oko 1 godinu"},dual:"oko {{count}} godine",other:"oko {{count}} godina"},xYears:{one:{standalone:"1 godina",withPrepositionAgo:"1 godine",withPrepositionIn:"1 godinu"},dual:"{{count}} godine",other:"{{count}} godina"},overXYears:{one:{standalone:"preko 1 godinu",withPrepositionAgo:"preko 1 godinu",withPrepositionIn:"preko 1 godinu"},dual:"preko {{count}} godine",other:"preko {{count}} godina"},almostXYears:{one:{standalone:"gotovo 1 godinu",withPrepositionAgo:"gotovo 1 godinu",withPrepositionIn:"gotovo 1 godinu"},dual:"gotovo {{count}} godine",other:"gotovo {{count}} godina"}},Mp={date:ef({formats:{full:"EEEE, d. MMMM yyyy.",long:"d. MMMM yyyy.",medium:"d. MMM yy.",short:"dd. MM. yy."},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss (zzzz)",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'u' {{time}}",long:"{{date}} 'u' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Ep={lastWeek:e=>{switch(e.getDay()){case 0:return"'prošle nedjelje u' p";case 3:return"'prošle srijede u' p";case 6:return"'prošle subote u' p";default:return"'prošli' EEEE 'u' p"}},yesterday:"'juče u' p",today:"'danas u' p",tomorrow:"'sutra u' p",nextWeek:e=>{switch(e.getDay()){case 0:return"'sljedeće nedjelje u' p";case 3:return"'sljedeću srijedu u' p";case 6:return"'sljedeću subotu u' p";default:return"'sljedeći' EEEE 'u' p"}},other:"P"},Tp={ordinalNumber:(e,t)=>{const n=Number(e);return String(n)+"."},era:af({values:{narrow:["pr.n.e.","AD"],abbreviated:["pr. Hr.","po. Hr."],wide:["Prije Hrista","Poslije Hrista"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1.","2.","3.","4."],abbreviated:["1. kv.","2. kv.","3. kv.","4. kv."],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec"],wide:["januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar"]},defaultWidth:"wide",formattingValues:{narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec"],wide:["januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["N","P","U","S","Č","P","S"],short:["ned","pon","uto","sre","čet","pet","sub"],abbreviated:["ned","pon","uto","sre","čet","pet","sub"],wide:["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"popodne",evening:"uveče",night:"noću"},abbreviated:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"popodne",evening:"uveče",night:"noću"},wide:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"poslije podne",evening:"uveče",night:"noću"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"popodne",evening:"uveče",night:"noću"},abbreviated:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"popodne",evening:"uveče",night:"noću"},wide:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"poslije podne",evening:"uveče",night:"noću"}},defaultFormattingWidth:"wide"})},Pp={ordinalNumber:sf({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(pr\.n\.e\.|AD)/i,abbreviated:/^(pr\.\s?Hr\.|po\.\s?Hr\.)/i,wide:/^(Prije Hrista|prije nove ere|Poslije Hrista|nova era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^pr/i,/^(po|nova)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]\.\s?kv\.?/i,wide:/^[1234]\. kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(10|11|12|[123456789])\./i,abbreviated:/^(jan|feb|mar|apr|maj|jun|jul|avg|sep|okt|nov|dec)/i,wide:/^((januar|januara)|(februar|februara)|(mart|marta)|(april|aprila)|(maj|maja)|(juni|juna)|(juli|jula)|(avgust|avgusta)|(septembar|septembra)|(oktobar|oktobra)|(novembar|novembra)|(decembar|decembra))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^1/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^7/i,/^8/i,/^9/i,/^10/i,/^11/i,/^12/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^avg/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[npusčc]/i,short:/^(ned|pon|uto|sre|(čet|cet)|pet|sub)/i,abbreviated:/^(ned|pon|uto|sre|(čet|cet)|pet|sub)/i,wide:/^(nedjelja|ponedjeljak|utorak|srijeda|(četvrtak|cetvrtak)|petak|subota)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(am|pm|ponoc|ponoć|(po)?podne|uvece|uveče|noću|poslije podne|ujutru)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^pono/i,noon:/^pod/i,morning:/jutro/i,afternoon:/(poslije\s|po)+podne/i,evening:/(uvece|uveče)/i,night:/(nocu|noću)/i}},defaultParseWidth:"any"})},Ap={code:"bs",formatDistance:(e,t,n)=>{let i;const a=Sp[e];return i="string"==typeof a?a:1===t?n?.addSuffix?n.comparison&&n.comparison>0?a.one.withPrepositionIn:a.one.withPrepositionAgo:a.one.standalone:t%10>1&&t%10<5&&"1"!==String(t).substr(-2,1)?a.dual.replace("{{count}}",String(t)):a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"za "+i:"prije "+i:i},formatLong:Mp,formatRelative:(e,t,n,i)=>{const a=Ep[e];return"function"==typeof a?a(t):a},localize:Tp,match:Pp,options:{weekStartsOn:1,firstWeekContainsDate:4}},xp={lessThanXSeconds:{one:"menys d'un segon",eleven:"menys d'onze segons",other:"menys de {{count}} segons"},xSeconds:{one:"1 segon",other:"{{count}} segons"},halfAMinute:"mig minut",lessThanXMinutes:{one:"menys d'un minut",eleven:"menys d'onze minuts",other:"menys de {{count}} minuts"},xMinutes:{one:"1 minut",other:"{{count}} minuts"},aboutXHours:{one:"aproximadament una hora",other:"aproximadament {{count}} hores"},xHours:{one:"1 hora",other:"{{count}} hores"},xDays:{one:"1 dia",other:"{{count}} dies"},aboutXWeeks:{one:"aproximadament una setmana",other:"aproximadament {{count}} setmanes"},xWeeks:{one:"1 setmana",other:"{{count}} setmanes"},aboutXMonths:{one:"aproximadament un mes",other:"aproximadament {{count}} mesos"},xMonths:{one:"1 mes",other:"{{count}} mesos"},aboutXYears:{one:"aproximadament un any",other:"aproximadament {{count}} anys"},xYears:{one:"1 any",other:"{{count}} anys"},overXYears:{one:"més d'un any",eleven:"més d'onze anys",other:"més de {{count}} anys"},almostXYears:{one:"gairebé un any",other:"gairebé {{count}} anys"}},_p={date:ef({formats:{full:"EEEE, d 'de' MMMM y",long:"d 'de' MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'a les' {{time}}",long:"{{date}} 'a les' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Cp={lastWeek:"'el' eeee 'passat a la' LT",yesterday:"'ahir a la' p",today:"'avui a la' p",tomorrow:"'demà a la' p",nextWeek:"eeee 'a la' p",other:"P"},Lp={lastWeek:"'el' eeee 'passat a les' p",yesterday:"'ahir a les' p",today:"'avui a les' p",tomorrow:"'demà a les' p",nextWeek:"eeee 'a les' p",other:"P"},Ip={ordinalNumber:(e,t)=>{const n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:case 3:return n+"r";case 2:return n+"n";case 4:return n+"t"}return n+"è"},era:af({values:{narrow:["aC","dC"],abbreviated:["a. de C.","d. de C."],wide:["abans de Crist","després de Crist"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1r trimestre","2n trimestre","3r trimestre","4t trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["GN","FB","MÇ","AB","MG","JN","JL","AG","ST","OC","NV","DS"],abbreviated:["gen.","febr.","març","abr.","maig","juny","jul.","ag.","set.","oct.","nov.","des."],wide:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"]},defaultWidth:"wide"}),day:af({values:{narrow:["dg.","dl.","dt.","dm.","dj.","dv.","ds."],short:["dg.","dl.","dt.","dm.","dj.","dv.","ds."],abbreviated:["dg.","dl.","dt.","dm.","dj.","dv.","ds."],wide:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"am",pm:"pm",midnight:"mitjanit",noon:"migdia",morning:"matí",afternoon:"tarda",evening:"vespre",night:"nit"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"mitjanit",noon:"migdia",morning:"matí",afternoon:"tarda",evening:"vespre",night:"nit"},wide:{am:"ante meridiem",pm:"post meridiem",midnight:"mitjanit",noon:"migdia",morning:"matí",afternoon:"tarda",evening:"vespre",night:"nit"}},defaultWidth:"wide",formattingValues:{narrow:{am:"am",pm:"pm",midnight:"de la mitjanit",noon:"del migdia",morning:"del matí",afternoon:"de la tarda",evening:"del vespre",night:"de la nit"},abbreviated:{am:"AM",pm:"PM",midnight:"de la mitjanit",noon:"del migdia",morning:"del matí",afternoon:"de la tarda",evening:"del vespre",night:"de la nit"},wide:{am:"ante meridiem",pm:"post meridiem",midnight:"de la mitjanit",noon:"del migdia",morning:"del matí",afternoon:"de la tarda",evening:"del vespre",night:"de la nit"}},defaultFormattingWidth:"wide"})},Dp={ordinalNumber:sf({matchPattern:/^(\d+)(è|r|n|r|t)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(aC|dC)/i,abbreviated:/^(a. de C.|d. de C.)/i,wide:/^(abans de Crist|despr[eé]s de Crist)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^aC/i,/^dC/i],abbreviated:[/^(a. de C.)/i,/^(d. de C.)/i],wide:[/^(abans de Crist)/i,/^(despr[eé]s de Crist)/i]},defaultParseWidth:"wide"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](è|r|n|r|t)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(GN|FB|MÇ|AB|MG|JN|JL|AG|ST|OC|NV|DS)/i,abbreviated:/^(gen.|febr.|març|abr.|maig|juny|jul.|ag.|set.|oct.|nov.|des.)/i,wide:/^(gener|febrer|març|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^GN/i,/^FB/i,/^MÇ/i,/^AB/i,/^MG/i,/^JN/i,/^JL/i,/^AG/i,/^ST/i,/^OC/i,/^NV/i,/^DS/i],abbreviated:[/^gen./i,/^febr./i,/^març/i,/^abr./i,/^maig/i,/^juny/i,/^jul./i,/^ag./i,/^set./i,/^oct./i,/^nov./i,/^des./i],wide:[/^gener/i,/^febrer/i,/^març/i,/^abril/i,/^maig/i,/^juny/i,/^juliol/i,/^agost/i,/^setembre/i,/^octubre/i,/^novembre/i,/^desembre/i]},defaultParseWidth:"wide"}),day:of({matchPatterns:{narrow:/^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,short:/^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,abbreviated:/^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,wide:/^(diumenge|dilluns|dimarts|dimecres|dijous|divendres|dissabte)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^dg./i,/^dl./i,/^dt./i,/^dm./i,/^dj./i,/^dv./i,/^ds./i],abbreviated:[/^dg./i,/^dl./i,/^dt./i,/^dm./i,/^dj./i,/^dv./i,/^ds./i],wide:[/^diumenge/i,/^dilluns/i,/^dimarts/i,/^dimecres/i,/^dijous/i,/^divendres/i,/^disssabte/i]},defaultParseWidth:"wide"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|mn|md|(del|de la) (matí|tarda|vespre|nit))/i,abbreviated:/^([ap]\.?\s?m\.?|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i,wide:/^(ante meridiem|post meridiem|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mitjanit/i,noon:/^migdia/i,morning:/matí/i,afternoon:/tarda/i,evening:/vespre/i,night:/nit/i}},defaultParseWidth:"any"})},Rp={code:"ca",formatDistance:(e,t,n)=>{let i;const a=xp[e];return i="string"==typeof a?a:1===t?a.one:11===t&&a.eleven?a.eleven:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"en "+i:"fa "+i:i},formatLong:_p,formatRelative:(e,t,n,i)=>1!==t.getHours()?Lp[e]:Cp[e],localize:Ip,match:Dp,options:{weekStartsOn:1,firstWeekContainsDate:4}},Wp={lessThanXSeconds:{one:"کەمتر لە یەک چرکە",other:"کەمتر لە {{count}} چرکە"},xSeconds:{one:"1 چرکە",other:"{{count}} چرکە"},halfAMinute:"نیو کاتژمێر",lessThanXMinutes:{one:"کەمتر لە یەک خولەک",other:"کەمتر لە {{count}} خولەک"},xMinutes:{one:"1 خولەک",other:"{{count}} خولەک"},aboutXHours:{one:"دەوروبەری 1 کاتژمێر",other:"دەوروبەری {{count}} کاتژمێر"},xHours:{one:"1 کاتژمێر",other:"{{count}} کاتژمێر"},xDays:{one:"1 ڕۆژ",other:"{{count}} ژۆژ"},aboutXWeeks:{one:"دەوروبەری 1 هەفتە",other:"دوروبەری {{count}} هەفتە"},xWeeks:{one:"1 هەفتە",other:"{{count}} هەفتە"},aboutXMonths:{one:"داوروبەری 1 مانگ",other:"دەوروبەری {{count}} مانگ"},xMonths:{one:"1 مانگ",other:"{{count}} مانگ"},aboutXYears:{one:"دەوروبەری 1 ساڵ",other:"دەوروبەری {{count}} ساڵ"},xYears:{one:"1 ساڵ",other:"{{count}} ساڵ"},overXYears:{one:"زیاتر لە ساڵێک",other:"زیاتر لە {{count}} ساڵ"},almostXYears:{one:"بەنزیکەیی ساڵێک ",other:"بەنزیکەیی {{count}} ساڵ"}},Np={date:ef({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'کاتژمێر' {{time}}",long:"{{date}} 'کاتژمێر' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Op={lastWeek:"'هەفتەی ڕابردوو' eeee 'کاتژمێر' p",yesterday:"'دوێنێ کاتژمێر' p",today:"'ئەمڕۆ کاتژمێر' p",tomorrow:"'بەیانی کاتژمێر' p",nextWeek:"eeee 'کاتژمێر' p",other:"P"},Fp={ordinalNumber:(e,t)=>String(e),era:af({values:{narrow:["پ","د"],abbreviated:["پ-ز","د-ز"],wide:["پێش زاین","دوای زاین"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["چ1م","چ2م","چ3م","چ4م"],wide:["چارەگی یەکەم","چارەگی دووەم","چارەگی سێیەم","چارەگی چوارەم"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["ک-د","ش","ئا","ن","م","ح","ت","ئا","ئە","تش-ی","تش-د","ک-ی"],abbreviated:["کان-دوو","شوب","ئاد","نیس","مایس","حوز","تەم","ئاب","ئەل","تش-یەک","تش-دوو","کان-یەک"],wide:["کانوونی دووەم","شوبات","ئادار","نیسان","مایس","حوزەیران","تەمموز","ئاب","ئەیلول","تشرینی یەکەم","تشرینی دووەم","کانوونی یەکەم"]},defaultWidth:"wide"}),day:af({values:{narrow:["ی-ش","د-ش","س-ش","چ-ش","پ-ش","هە","ش"],short:["یە-شە","دوو-شە","سێ-شە","چو-شە","پێ-شە","هەی","شە"],abbreviated:["یەک-شەم","دوو-شەم","سێ-شەم","چوار-شەم","پێنج-شەم","هەینی","شەمە"],wide:["یەک شەمە","دوو شەمە","سێ شەمە","چوار شەمە","پێنج شەمە","هەینی","شەمە"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"پ",pm:"د",midnight:"ن-ش",noon:"ن",morning:"بەیانی",afternoon:"دوای نیوەڕۆ",evening:"ئێوارە",night:"شەو"},abbreviated:{am:"پ-ن",pm:"د-ن",midnight:"نیوە شەو",noon:"نیوەڕۆ",morning:"بەیانی",afternoon:"دوای نیوەڕۆ",evening:"ئێوارە",night:"شەو"},wide:{am:"پێش نیوەڕۆ",pm:"دوای نیوەڕۆ",midnight:"نیوە شەو",noon:"نیوەڕۆ",morning:"بەیانی",afternoon:"دوای نیوەڕۆ",evening:"ئێوارە",night:"شەو"}},defaultWidth:"wide",formattingValues:{narrow:{am:"پ",pm:"د",midnight:"ن-ش",noon:"ن",morning:"لە بەیانیدا",afternoon:"لە دوای نیوەڕۆدا",evening:"لە ئێوارەدا",night:"لە شەودا"},abbreviated:{am:"پ-ن",pm:"د-ن",midnight:"نیوە شەو",noon:"نیوەڕۆ",morning:"لە بەیانیدا",afternoon:"لە دوای نیوەڕۆدا",evening:"لە ئێوارەدا",night:"لە شەودا"},wide:{am:"پێش نیوەڕۆ",pm:"دوای نیوەڕۆ",midnight:"نیوە شەو",noon:"نیوەڕۆ",morning:"لە بەیانیدا",afternoon:"لە دوای نیوەڕۆدا",evening:"لە ئێوارەدا",night:"لە شەودا"}},defaultFormattingWidth:"wide"})},jp={ordinalNumber:sf({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(پ|د)/i,abbreviated:/^(پ-ز|د.ز)/i,wide:/^(پێش زاین| دوای زاین)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^د/g,/^پ/g]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^م[1234]چ/i,wide:/^(یەکەم|دووەم|سێیەم| چوارەم) (چارەگی)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{wide:[/چارەگی یەکەم/,/چارەگی دووەم/,/چارەگی سيیەم/,/چارەگی چوارەم/],any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(ک-د|ش|ئا|ن|م|ح|ت|ئە|تش-ی|تش-د|ک-ی)/i,abbreviated:/^(کان-دوو|شوب|ئاد|نیس|مایس|حوز|تەم|ئاب|ئەل|تش-یەک|تش-دوو|کان-یەک)/i,wide:/^(کانوونی دووەم|شوبات|ئادار|نیسان|مایس|حوزەیران|تەمموز|ئاب|ئەیلول|تشرینی یەکەم|تشرینی دووەم|کانوونی یەکەم)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ک-د/i,/^ش/i,/^ئا/i,/^ن/i,/^م/i,/^ح/i,/^ت/i,/^ئا/i,/^ئە/i,/^تش-ی/i,/^تش-د/i,/^ک-ی/i],any:[/^کان-دوو/i,/^شوب/i,/^ئاد/i,/^نیس/i,/^مایس/i,/^حوز/i,/^تەم/i,/^ئاب/i,/^ئەل/i,/^تش-یەک/i,/^تش-دوو/i,/^|کان-یەک/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^(ش|ی|د|س|چ|پ|هە)/i,short:/^(یە-شە|دوو-شە|سێ-شە|چو-شە|پێ-شە|هە|شە)/i,abbreviated:/^(یەک-شەم|دوو-شەم|سێ-شەم|چوار-شەم|پێنخ-شەم|هەینی|شەمە)/i,wide:/^(یەک شەمە|دوو شەمە|سێ شەمە|چوار شەمە|پێنج شەمە|هەینی|شەمە)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(پ|د|ن-ش|ن| (بەیانی|دوای نیوەڕۆ|ئێوارە|شەو))/i,abbreviated:/^(پ-ن|د-ن|نیوە شەو|نیوەڕۆ|بەیانی|دوای نیوەڕۆ|ئێوارە|شەو)/,wide:/^(پێش نیوەڕۆ|دوای نیوەڕۆ|نیوەڕۆ|نیوە شەو|لەبەیانیدا|لەدواینیوەڕۆدا|لە ئێوارەدا|لە شەودا)/,any:/^(پ|د|بەیانی|نیوەڕۆ|ئێوارە|شەو)/},defaultMatchWidth:"any",parsePatterns:{any:{am:/^د/i,pm:/^پ/i,midnight:/^ن-ش/i,noon:/^ن/i,morning:/بەیانی/i,afternoon:/دواینیوەڕۆ/i,evening:/ئێوارە/i,night:/شەو/i}},defaultParseWidth:"any"})},zp={code:"ckb",formatDistance:(e,t,n)=>{let i;const a=Wp[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"لە ماوەی "+i+"دا":i+"پێش ئێستا":i},formatLong:Np,formatRelative:(e,t,n,i)=>Op[e],localize:Fp,match:jp,options:{weekStartsOn:0,firstWeekContainsDate:1}},$p={lessThanXSeconds:{one:{regular:"méně než 1 sekunda",past:"před méně než 1 sekundou",future:"za méně než 1 sekundu"},few:{regular:"méně než {{count}} sekundy",past:"před méně než {{count}} sekundami",future:"za méně než {{count}} sekundy"},many:{regular:"méně než {{count}} sekund",past:"před méně než {{count}} sekundami",future:"za méně než {{count}} sekund"}},xSeconds:{one:{regular:"1 sekunda",past:"před 1 sekundou",future:"za 1 sekundu"},few:{regular:"{{count}} sekundy",past:"před {{count}} sekundami",future:"za {{count}} sekundy"},many:{regular:"{{count}} sekund",past:"před {{count}} sekundami",future:"za {{count}} sekund"}},halfAMinute:{type:"other",other:{regular:"půl minuty",past:"před půl minutou",future:"za půl minuty"}},lessThanXMinutes:{one:{regular:"méně než 1 minuta",past:"před méně než 1 minutou",future:"za méně než 1 minutu"},few:{regular:"méně než {{count}} minuty",past:"před méně než {{count}} minutami",future:"za méně než {{count}} minuty"},many:{regular:"méně než {{count}} minut",past:"před méně než {{count}} minutami",future:"za méně než {{count}} minut"}},xMinutes:{one:{regular:"1 minuta",past:"před 1 minutou",future:"za 1 minutu"},few:{regular:"{{count}} minuty",past:"před {{count}} minutami",future:"za {{count}} minuty"},many:{regular:"{{count}} minut",past:"před {{count}} minutami",future:"za {{count}} minut"}},aboutXHours:{one:{regular:"přibližně 1 hodina",past:"přibližně před 1 hodinou",future:"přibližně za 1 hodinu"},few:{regular:"přibližně {{count}} hodiny",past:"přibližně před {{count}} hodinami",future:"přibližně za {{count}} hodiny"},many:{regular:"přibližně {{count}} hodin",past:"přibližně před {{count}} hodinami",future:"přibližně za {{count}} hodin"}},xHours:{one:{regular:"1 hodina",past:"před 1 hodinou",future:"za 1 hodinu"},few:{regular:"{{count}} hodiny",past:"před {{count}} hodinami",future:"za {{count}} hodiny"},many:{regular:"{{count}} hodin",past:"před {{count}} hodinami",future:"za {{count}} hodin"}},xDays:{one:{regular:"1 den",past:"před 1 dnem",future:"za 1 den"},few:{regular:"{{count}} dny",past:"před {{count}} dny",future:"za {{count}} dny"},many:{regular:"{{count}} dní",past:"před {{count}} dny",future:"za {{count}} dní"}},aboutXWeeks:{one:{regular:"přibližně 1 týden",past:"přibližně před 1 týdnem",future:"přibližně za 1 týden"},few:{regular:"přibližně {{count}} týdny",past:"přibližně před {{count}} týdny",future:"přibližně za {{count}} týdny"},many:{regular:"přibližně {{count}} týdnů",past:"přibližně před {{count}} týdny",future:"přibližně za {{count}} týdnů"}},xWeeks:{one:{regular:"1 týden",past:"před 1 týdnem",future:"za 1 týden"},few:{regular:"{{count}} týdny",past:"před {{count}} týdny",future:"za {{count}} týdny"},many:{regular:"{{count}} týdnů",past:"před {{count}} týdny",future:"za {{count}} týdnů"}},aboutXMonths:{one:{regular:"přibližně 1 měsíc",past:"přibližně před 1 měsícem",future:"přibližně za 1 měsíc"},few:{regular:"přibližně {{count}} měsíce",past:"přibližně před {{count}} měsíci",future:"přibližně za {{count}} měsíce"},many:{regular:"přibližně {{count}} měsíců",past:"přibližně před {{count}} měsíci",future:"přibližně za {{count}} měsíců"}},xMonths:{one:{regular:"1 měsíc",past:"před 1 měsícem",future:"za 1 měsíc"},few:{regular:"{{count}} měsíce",past:"před {{count}} měsíci",future:"za {{count}} měsíce"},many:{regular:"{{count}} měsíců",past:"před {{count}} měsíci",future:"za {{count}} měsíců"}},aboutXYears:{one:{regular:"přibližně 1 rok",past:"přibližně před 1 rokem",future:"přibližně za 1 rok"},few:{regular:"přibližně {{count}} roky",past:"přibližně před {{count}} roky",future:"přibližně za {{count}} roky"},many:{regular:"přibližně {{count}} roků",past:"přibližně před {{count}} roky",future:"přibližně za {{count}} roků"}},xYears:{one:{regular:"1 rok",past:"před 1 rokem",future:"za 1 rok"},few:{regular:"{{count}} roky",past:"před {{count}} roky",future:"za {{count}} roky"},many:{regular:"{{count}} roků",past:"před {{count}} roky",future:"za {{count}} roků"}},overXYears:{one:{regular:"více než 1 rok",past:"před více než 1 rokem",future:"za více než 1 rok"},few:{regular:"více než {{count}} roky",past:"před více než {{count}} roky",future:"za více než {{count}} roky"},many:{regular:"více než {{count}} roků",past:"před více než {{count}} roky",future:"za více než {{count}} roků"}},almostXYears:{one:{regular:"skoro 1 rok",past:"skoro před 1 rokem",future:"skoro za 1 rok"},few:{regular:"skoro {{count}} roky",past:"skoro před {{count}} roky",future:"skoro za {{count}} roky"},many:{regular:"skoro {{count}} roků",past:"skoro před {{count}} roky",future:"skoro za {{count}} roků"}}},Up={date:ef({formats:{full:"EEEE, d. MMMM yyyy",long:"d. MMMM yyyy",medium:"d. M. yyyy",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'v' {{time}}",long:"{{date}} 'v' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Hp=["neděli","pondělí","úterý","středu","čtvrtek","pátek","sobotu"],Bp={lastWeek:"'poslední' eeee 've' p",yesterday:"'včera v' p",today:"'dnes v' p",tomorrow:"'zítra v' p",nextWeek:e=>{const t=e.getDay();return"'v "+Hp[t]+" o' p"},other:"P"},Gp={ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["př. n. l.","n. l."],abbreviated:["př. n. l.","n. l."],wide:["před naším letopočtem","našeho letopočtu"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1. čtvrtletí","2. čtvrtletí","3. čtvrtletí","4. čtvrtletí"],wide:["1. čtvrtletí","2. čtvrtletí","3. čtvrtletí","4. čtvrtletí"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["L","Ú","B","D","K","Č","Č","S","Z","Ř","L","P"],abbreviated:["led","úno","bře","dub","kvě","čvn","čvc","srp","zář","říj","lis","pro"],wide:["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"]},defaultWidth:"wide",formattingValues:{narrow:["L","Ú","B","D","K","Č","Č","S","Z","Ř","L","P"],abbreviated:["led","úno","bře","dub","kvě","čvn","čvc","srp","zář","říj","lis","pro"],wide:["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["ne","po","út","st","čt","pá","so"],short:["ne","po","út","st","čt","pá","so"],abbreviated:["ned","pon","úte","stř","čtv","pát","sob"],wide:["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"},abbreviated:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"},wide:{am:"dopoledne",pm:"odpoledne",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"}},defaultWidth:"wide",formattingValues:{narrow:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"},abbreviated:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"},wide:{am:"dopoledne",pm:"odpoledne",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"}},defaultFormattingWidth:"wide"})},Xp={ordinalNumber:sf({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(p[řr](\.|ed) Kr\.|p[řr](\.|ed) n\. l\.|po Kr\.|n\. l\.)/i,abbreviated:/^(p[řr](\.|ed) Kr\.|p[řr](\.|ed) n\. l\.|po Kr\.|n\. l\.)/i,wide:/^(p[řr](\.|ed) Kristem|p[řr](\.|ed) na[šs][íi]m letopo[čc]tem|po Kristu|na[šs]eho letopo[čc]tu)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^p[řr]/i,/^(po|n)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]\. [čc]tvrtlet[íi]/i,wide:/^[1234]\. [čc]tvrtlet[íi]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[lúubdkčcszřrlp]/i,abbreviated:/^(led|[úu]no|b[řr]e|dub|kv[ěe]|[čc]vn|[čc]vc|srp|z[áa][řr]|[řr][íi]j|lis|pro)/i,wide:/^(leden|ledna|[úu]nora?|b[řr]ezen|b[řr]ezna|duben|dubna|kv[ěe]ten|kv[ěe]tna|[čc]erven(ec|ce)?|[čc]ervna|srpen|srpna|z[áa][řr][íi]|[řr][íi]jen|[řr][íi]jna|listopad(a|u)?|prosinec|prosince)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^l/i,/^[úu]/i,/^b/i,/^d/i,/^k/i,/^[čc]/i,/^[čc]/i,/^s/i,/^z/i,/^[řr]/i,/^l/i,/^p/i],any:[/^led/i,/^[úu]n/i,/^b[řr]e/i,/^dub/i,/^kv[ěe]/i,/^[čc]vn|[čc]erven(?!\w)|[čc]ervna/i,/^[čc]vc|[čc]erven(ec|ce)/i,/^srp/i,/^z[áa][řr]/i,/^[řr][íi]j/i,/^lis/i,/^pro/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[npuúsčps]/i,short:/^(ne|po|[úu]t|st|[čc]t|p[áa]|so)/i,abbreviated:/^(ned|pon|[úu]te|st[rř]|[čc]tv|p[áa]t|sob)/i,wide:/^(ned[ěe]le|pond[ěe]l[íi]|[úu]ter[ýy]|st[řr]eda|[čc]tvrtek|p[áa]tek|sobota)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^n/i,/^p/i,/^[úu]/i,/^s/i,/^[čc]/i,/^p/i,/^s/i],any:[/^ne/i,/^po/i,/^[úu]t/i,/^st/i,/^[čc]t/i,/^p[áa]/i,/^so/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^dopoledne|dop\.?|odpoledne|odp\.?|p[ůu]lnoc|poledne|r[áa]no|odpoledne|ve[čc]er|(v )?noci?/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^dop/i,pm:/^odp/i,midnight:/^p[ůu]lnoc/i,noon:/^poledne/i,morning:/r[áa]no/i,afternoon:/odpoledne/i,evening:/ve[čc]er/i,night:/noc/i}},defaultParseWidth:"any"})},Yp={code:"cs",formatDistance:(e,t,n)=>{let i;const a=$p[e];i="other"===a.type?a.other:1===t?a.one:t>1&&t<5?a.few:a.many;const r=!0===n?.addSuffix,o=n?.comparison;let s;return s=r&&-1===o?i.past:r&&1===o?i.future:i.regular,s.replace("{{count}}",String(t))},formatLong:Up,formatRelative:(e,t)=>{const n=Bp[e];return"function"==typeof n?n(t):n},localize:Gp,match:Xp,options:{weekStartsOn:1,firstWeekContainsDate:4}},Vp={lessThanXSeconds:{one:"llai na eiliad",other:"llai na {{count}} eiliad"},xSeconds:{one:"1 eiliad",other:"{{count}} eiliad"},halfAMinute:"hanner munud",lessThanXMinutes:{one:"llai na munud",two:"llai na 2 funud",other:"llai na {{count}} munud"},xMinutes:{one:"1 munud",two:"2 funud",other:"{{count}} munud"},aboutXHours:{one:"tua 1 awr",other:"tua {{count}} awr"},xHours:{one:"1 awr",other:"{{count}} awr"},xDays:{one:"1 diwrnod",two:"2 ddiwrnod",other:"{{count}} diwrnod"},aboutXWeeks:{one:"tua 1 wythnos",two:"tua pythefnos",other:"tua {{count}} wythnos"},xWeeks:{one:"1 wythnos",two:"pythefnos",other:"{{count}} wythnos"},aboutXMonths:{one:"tua 1 mis",two:"tua 2 fis",other:"tua {{count}} mis"},xMonths:{one:"1 mis",two:"2 fis",other:"{{count}} mis"},aboutXYears:{one:"tua 1 flwyddyn",two:"tua 2 flynedd",other:"tua {{count}} mlynedd"},xYears:{one:"1 flwyddyn",two:"2 flynedd",other:"{{count}} mlynedd"},overXYears:{one:"dros 1 flwyddyn",two:"dros 2 flynedd",other:"dros {{count}} mlynedd"},almostXYears:{one:"bron 1 flwyddyn",two:"bron 2 flynedd",other:"bron {{count}} mlynedd"}},Kp={date:ef({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'am' {{time}}",long:"{{date}} 'am' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},qp={lastWeek:"eeee 'diwethaf am' p",yesterday:"'ddoe am' p",today:"'heddiw am' p",tomorrow:"'yfory am' p",nextWeek:"eeee 'am' p",other:"P"},Jp={ordinalNumber:(e,t)=>{const n=Number(e);if(n<20)switch(n){case 0:case 7:case 8:case 9:case 10:case 12:case 15:case 18:return n+"fed";case 1:return n+"af";case 2:return n+"ail";case 3:case 4:return n+"ydd";case 5:case 6:return n+"ed";case 11:case 13:case 14:case 16:case 17:case 19:return n+"eg"}else if(n>=50&&n<=60||80===n||n>=100)return n+"fed";return n+"ain"},era:af({values:{narrow:["C","O"],abbreviated:["CC","OC"],wide:["Cyn Crist","Ar ôl Crist"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Ch1","Ch2","Ch3","Ch4"],wide:["Chwarter 1af","2ail chwarter","3ydd chwarter","4ydd chwarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["I","Ch","Ma","E","Mi","Me","G","A","Md","H","T","Rh"],abbreviated:["Ion","Chwe","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tach","Rhag"],wide:["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr"]},defaultWidth:"wide"}),day:af({values:{narrow:["S","Ll","M","M","I","G","S"],short:["Su","Ll","Ma","Me","Ia","Gw","Sa"],abbreviated:["Sul","Llun","Maw","Mer","Iau","Gwe","Sad"],wide:["dydd Sul","dydd Llun","dydd Mawrth","dydd Mercher","dydd Iau","dydd Gwener","dydd Sadwrn"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"b",pm:"h",midnight:"hn",noon:"hd",morning:"bore",afternoon:"prynhawn",evening:"gyda'r nos",night:"nos"},abbreviated:{am:"yb",pm:"yh",midnight:"hanner nos",noon:"hanner dydd",morning:"bore",afternoon:"prynhawn",evening:"gyda'r nos",night:"nos"},wide:{am:"y.b.",pm:"y.h.",midnight:"hanner nos",noon:"hanner dydd",morning:"bore",afternoon:"prynhawn",evening:"gyda'r nos",night:"nos"}},defaultWidth:"wide",formattingValues:{narrow:{am:"b",pm:"h",midnight:"hn",noon:"hd",morning:"yn y bore",afternoon:"yn y prynhawn",evening:"gyda'r nos",night:"yn y nos"},abbreviated:{am:"yb",pm:"yh",midnight:"hanner nos",noon:"hanner dydd",morning:"yn y bore",afternoon:"yn y prynhawn",evening:"gyda'r nos",night:"yn y nos"},wide:{am:"y.b.",pm:"y.h.",midnight:"hanner nos",noon:"hanner dydd",morning:"yn y bore",afternoon:"yn y prynhawn",evening:"gyda'r nos",night:"yn y nos"}},defaultFormattingWidth:"wide"})},Qp={ordinalNumber:sf({matchPattern:/^(\d+)(af|ail|ydd|ed|fed|eg|ain)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(c|o)/i,abbreviated:/^(c\.?\s?c\.?|o\.?\s?c\.?)/i,wide:/^(cyn christ|ar ôl crist|ar ol crist)/i},defaultMatchWidth:"wide",parsePatterns:{wide:[/^c/i,/^(ar ôl crist|ar ol crist)/i],any:[/^c/i,/^o/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^ch[1234]/i,wide:/^(chwarter 1af)|([234](ail|ydd)? chwarter)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(i|ch|m|e|g|a|h|t|rh)/i,abbreviated:/^(ion|chwe|maw|ebr|mai|meh|gor|aws|med|hyd|tach|rhag)/i,wide:/^(ionawr|chwefror|mawrth|ebrill|mai|mehefin|gorffennaf|awst|medi|hydref|tachwedd|rhagfyr)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^i/i,/^ch/i,/^m/i,/^e/i,/^m/i,/^m/i,/^g/i,/^a/i,/^m/i,/^h/i,/^t/i,/^rh/i],any:[/^io/i,/^ch/i,/^maw/i,/^e/i,/^mai/i,/^meh/i,/^g/i,/^a/i,/^med/i,/^h/i,/^t/i,/^rh/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^(s|ll|m|i|g)/i,short:/^(su|ll|ma|me|ia|gw|sa)/i,abbreviated:/^(sul|llun|maw|mer|iau|gwe|sad)/i,wide:/^dydd (sul|llun|mawrth|mercher|iau|gwener|sadwrn)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^ll/i,/^m/i,/^m/i,/^i/i,/^g/i,/^s/i],wide:[/^dydd su/i,/^dydd ll/i,/^dydd ma/i,/^dydd me/i,/^dydd i/i,/^dydd g/i,/^dydd sa/i],any:[/^su/i,/^ll/i,/^ma/i,/^me/i,/^i/i,/^g/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(b|h|hn|hd|(yn y|y|yr|gyda'r) (bore|prynhawn|nos|hwyr))/i,any:/^(y\.?\s?[bh]\.?|hanner nos|hanner dydd|(yn y|y|yr|gyda'r) (bore|prynhawn|nos|hwyr))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^b|(y\.?\s?b\.?)/i,pm:/^h|(y\.?\s?h\.?)|(yr hwyr)/i,midnight:/^hn|hanner nos/i,noon:/^hd|hanner dydd/i,morning:/bore/i,afternoon:/prynhawn/i,evening:/^gyda'r nos$/i,night:/blah/i}},defaultParseWidth:"any"})},Zp={code:"cy",formatDistance:(e,t,n)=>{let i;const a=Vp[e];return i="string"==typeof a?a:1===t?a.one:2===t&&a.two?a.two:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"mewn "+i:i+" yn ôl":i},formatLong:Kp,formatRelative:(e,t,n,i)=>qp[e],localize:Jp,match:Qp,options:{weekStartsOn:0,firstWeekContainsDate:1}},eg={lessThanXSeconds:{one:"mindre end ét sekund",other:"mindre end {{count}} sekunder"},xSeconds:{one:"1 sekund",other:"{{count}} sekunder"},halfAMinute:"ét halvt minut",lessThanXMinutes:{one:"mindre end ét minut",other:"mindre end {{count}} minutter"},xMinutes:{one:"1 minut",other:"{{count}} minutter"},aboutXHours:{one:"cirka 1 time",other:"cirka {{count}} timer"},xHours:{one:"1 time",other:"{{count}} timer"},xDays:{one:"1 dag",other:"{{count}} dage"},aboutXWeeks:{one:"cirka 1 uge",other:"cirka {{count}} uger"},xWeeks:{one:"1 uge",other:"{{count}} uger"},aboutXMonths:{one:"cirka 1 måned",other:"cirka {{count}} måneder"},xMonths:{one:"1 måned",other:"{{count}} måneder"},aboutXYears:{one:"cirka 1 år",other:"cirka {{count}} år"},xYears:{one:"1 år",other:"{{count}} år"},overXYears:{one:"over 1 år",other:"over {{count}} år"},almostXYears:{one:"næsten 1 år",other:"næsten {{count}} år"}},tg={date:ef({formats:{full:"EEEE 'den' d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'kl'. {{time}}",long:"{{date}} 'kl'. {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},ng={lastWeek:"'sidste' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgen kl.' p",nextWeek:"'på' eeee 'kl.' p",other:"P"},ig={ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["fvt","vt"],abbreviated:["f.v.t.","v.t."],wide:["før vesterlandsk tidsregning","vesterlandsk tidsregning"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1. kvt.","2. kvt.","3. kvt.","4. kvt."],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mar.","apr.","maj","jun.","jul.","aug.","sep.","okt.","nov.","dec."],wide:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"]},defaultWidth:"wide"}),day:af({values:{narrow:["S","M","T","O","T","F","L"],short:["sø","ma","ti","on","to","fr","lø"],abbreviated:["søn.","man.","tir.","ons.","tor.","fre.","lør."],wide:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"a",pm:"p",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"},abbreviated:{am:"AM",pm:"PM",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"},abbreviated:{am:"AM",pm:"PM",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"}},defaultFormattingWidth:"wide"})},ag={ordinalNumber:sf({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(fKr|fvt|eKr|vt)/i,abbreviated:/^(f\.Kr\.?|f\.v\.t\.?|e\.Kr\.?|v\.t\.)/i,wide:/^(f.Kr.|før vesterlandsk tidsregning|e.Kr.|vesterlandsk tidsregning)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/i,/^(v|e)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]. kvt\./i,wide:/^[1234]\.? kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mar.|apr.|maj|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januar|februar|marts|april|maj|juni|juli|august|september|oktober|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[smtofl]/i,short:/^(søn.|man.|tir.|ons.|tor.|fre.|lør.)/i,abbreviated:/^(søn|man|tir|ons|tor|fre|lør)/i,wide:/^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^o/i,/^t/i,/^f/i,/^l/i],any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i,any:/^([ap]\.?\s?m\.?|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/midnat/i,noon:/middag/i,morning:/morgen/i,afternoon:/eftermiddag/i,evening:/aften/i,night:/nat/i}},defaultParseWidth:"any"})},rg={code:"da",formatDistance:(e,t,n)=>{let i;const a=eg[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"om "+i:i+" siden":i},formatLong:tg,formatRelative:(e,t,n,i)=>ng[e],localize:ig,match:ag,options:{weekStartsOn:1,firstWeekContainsDate:4}},og={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},sg=(e,t,n)=>{let i;const a=n?.addSuffix?og[e].withPreposition:og[e].standalone;return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"in "+i:"vor "+i:i},lg={date:ef({formats:{full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},dg={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},ug=(e,t,n,i)=>dg[e],cg={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},hg={narrow:cg.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:cg.wide},mg={ordinalNumber:e=>Number(e)+".",era:af({values:{narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:cg,formattingValues:hg,defaultWidth:"wide"}),day:af({values:{narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},defaultWidth:"wide",formattingValues:{narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},defaultFormattingWidth:"wide"})},fg={ordinalNumber:sf({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e)}),era:of({matchPatterns:{narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^v/i,/^n/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},defaultParseWidth:"any"})},pg={code:"de",formatDistance:sg,formatLong:lg,formatRelative:ug,localize:mg,match:fg,options:{weekStartsOn:1,firstWeekContainsDate:4}},gg={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},vg={narrow:gg.narrow,abbreviated:["Jän.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:gg.wide},yg={ordinalNumber:e=>Number(e)+".",era:af({values:{narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:gg,formattingValues:vg,defaultWidth:"wide"}),day:af({values:{narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},defaultWidth:"wide",formattingValues:{narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},defaultFormattingWidth:"wide"})},wg={code:"de-AT",formatDistance:sg,formatLong:lg,formatRelative:ug,localize:yg,match:fg,options:{weekStartsOn:1,firstWeekContainsDate:4}},bg={lessThanXSeconds:{one:"λιγότερο από ένα δευτερόλεπτο",other:"λιγότερο από {{count}} δευτερόλεπτα"},xSeconds:{one:"1 δευτερόλεπτο",other:"{{count}} δευτερόλεπτα"},halfAMinute:"μισό λεπτό",lessThanXMinutes:{one:"λιγότερο από ένα λεπτό",other:"λιγότερο από {{count}} λεπτά"},xMinutes:{one:"1 λεπτό",other:"{{count}} λεπτά"},aboutXHours:{one:"περίπου 1 ώρα",other:"περίπου {{count}} ώρες"},xHours:{one:"1 ώρα",other:"{{count}} ώρες"},xDays:{one:"1 ημέρα",other:"{{count}} ημέρες"},aboutXWeeks:{one:"περίπου 1 εβδομάδα",other:"περίπου {{count}} εβδομάδες"},xWeeks:{one:"1 εβδομάδα",other:"{{count}} εβδομάδες"},aboutXMonths:{one:"περίπου 1 μήνας",other:"περίπου {{count}} μήνες"},xMonths:{one:"1 μήνας",other:"{{count}} μήνες"},aboutXYears:{one:"περίπου 1 χρόνο",other:"περίπου {{count}} χρόνια"},xYears:{one:"1 χρόνο",other:"{{count}} χρόνια"},overXYears:{one:"πάνω από 1 χρόνο",other:"πάνω από {{count}} χρόνια"},almostXYears:{one:"περίπου 1 χρόνο",other:"περίπου {{count}} χρόνια"}},kg={date:ef({formats:{full:"EEEE, d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"d/M/yy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} - {{time}}",long:"{{date}} - {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Sg={lastWeek:e=>6===e.getDay()?"'το προηγούμενο' eeee 'στις' p":"'την προηγούμενη' eeee 'στις' p",yesterday:"'χθες στις' p",today:"'σήμερα στις' p",tomorrow:"'αύριο στις' p",nextWeek:"eeee 'στις' p",other:"P"},Mg={ordinalNumber:(e,t)=>{const n=Number(e),i=t?.unit;let a;return a="year"===i||"month"===i?"ος":"week"===i||"dayOfYear"===i||"day"===i||"hour"===i||"date"===i?"η":"ο",n+a},era:af({values:{narrow:["πΧ","μΧ"],abbreviated:["π.Χ.","μ.Χ."],wide:["προ Χριστού","μετά Χριστόν"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Τ1","Τ2","Τ3","Τ4"],wide:["1ο τρίμηνο","2ο τρίμηνο","3ο τρίμηνο","4ο τρίμηνο"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μάρ","Απρ","Μάι","Ιούν","Ιούλ","Αύγ","Σεπ","Οκτ","Νοέ","Δεκ"],wide:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"]},defaultWidth:"wide",formattingValues:{narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μαρ","Απρ","Μαΐ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],wide:["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["Κ","Δ","T","Τ","Π","Π","Σ"],short:["Κυ","Δε","Τρ","Τε","Πέ","Πα","Σά"],abbreviated:["Κυρ","Δευ","Τρί","Τετ","Πέμ","Παρ","Σάβ"],wide:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"πμ",pm:"μμ",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"},abbreviated:{am:"π.μ.",pm:"μ.μ.",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"},wide:{am:"π.μ.",pm:"μ.μ.",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"}},defaultWidth:"wide"})},Eg={ordinalNumber:sf({matchPattern:/^(\d+)(ος|η|ο)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(πΧ|μΧ)/i,abbreviated:/^(π\.?\s?χ\.?|π\.?\s?κ\.?\s?χ\.?|μ\.?\s?χ\.?|κ\.?\s?χ\.?)/i,wide:/^(προ Χριστο(ύ|υ)|πριν απ(ό|ο) την Κοιν(ή|η) Χρονολογ(ί|ι)α|μετ(ά|α) Χριστ(ό|ο)ν|Κοιν(ή|η) Χρονολογ(ί|ι)α)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^π/i,/^(μ|κ)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^τ[1234]/i,wide:/^[1234]ο? τρ(ί|ι)μηνο/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[ιφμαμιιασονδ]/i,abbreviated:/^(ιαν|φεβ|μ[άα]ρ|απρ|μ[άα][ιΐ]|ιο[ύυ]ν|ιο[ύυ]λ|α[ύυ]γ|σεπ|οκτ|νο[έε]|δεκ)/i,wide:/^(μ[άα][ιΐ]|α[ύυ]γο[υύ]στ)(ος|ου)|(ιανου[άα]ρ|φεβρου[άα]ρ|μ[άα]ρτ|απρ[ίι]λ|ιο[ύυ]ν|ιο[ύυ]λ|σεπτ[έε]μβρ|οκτ[ώω]βρ|νο[έε]μβρ|δεκ[έε]μβρ)(ιος|ίου)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ι/i,/^φ/i,/^μ/i,/^α/i,/^μ/i,/^ι/i,/^ι/i,/^α/i,/^σ/i,/^ο/i,/^ν/i,/^δ/i],any:[/^ια/i,/^φ/i,/^μ[άα]ρ/i,/^απ/i,/^μ[άα][ιΐ]/i,/^ιο[ύυ]ν/i,/^ιο[ύυ]λ/i,/^α[ύυ]/i,/^σ/i,/^ο/i,/^ν/i,/^δ/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[κδτπσ]/i,short:/^(κυ|δε|τρ|τε|π[εέ]|π[αά]|σ[αά])/i,abbreviated:/^(κυρ|δευ|τρι|τετ|πεμ|παρ|σαβ)/i,wide:/^(κυριακ(ή|η)|δευτ(έ|ε)ρα|τρ(ί|ι)τη|τετ(ά|α)ρτη|π(έ|ε)μπτη|παρασκευ(ή|η)|σ(ά|α)ββατο)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^κ/i,/^δ/i,/^τ/i,/^τ/i,/^π/i,/^π/i,/^σ/i],any:[/^κ/i,/^δ/i,/^τρ/i,/^τε/i,/^π[εέ]/i,/^π[αά]/i,/^σ/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(πμ|μμ|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i,any:/^([πμ]\.?\s?μ\.?|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^πμ|π\.\s?μ\./i,pm:/^μμ|μ\.\s?μ\./i,midnight:/^μεσάν/i,noon:/^μεσημ(έ|ε)/i,morning:/πρω(ί|ι)/i,afternoon:/απ(ό|ο)γευμα/i,evening:/βρ(ά|α)δυ/i,night:/ν(ύ|υ)χτα/i}},defaultParseWidth:"any"})},Tg={code:"el",formatDistance:(e,t,n)=>{let i;const a=bg[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"σε "+i:i+" πριν":i},formatLong:kg,formatRelative:(e,t)=>{const n=Sg[e];return"function"==typeof n?n(t):n},localize:Mg,match:Eg,options:{weekStartsOn:1,firstWeekContainsDate:4}},Pg={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ag=(e,t,n)=>{let i;const a=Pg[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},xg={date:ef({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},_g={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Cg=(e,t,n,i)=>_g[e],Lg={ordinalNumber:(e,t)=>{const n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:af({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:af({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},Ig={ordinalNumber:sf({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},Dg={code:"en-AU",formatDistance:Ag,formatLong:xg,formatRelative:Cg,localize:Lg,match:Ig,options:{weekStartsOn:1,firstWeekContainsDate:4}},Rg={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"a second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"a minute",other:"{{count}} minutes"},aboutXHours:{one:"about an hour",other:"about {{count}} hours"},xHours:{one:"an hour",other:"{{count}} hours"},xDays:{one:"a day",other:"{{count}} days"},aboutXWeeks:{one:"about a week",other:"about {{count}} weeks"},xWeeks:{one:"a week",other:"{{count}} weeks"},aboutXMonths:{one:"about a month",other:"about {{count}} months"},xMonths:{one:"a month",other:"{{count}} months"},aboutXYears:{one:"about a year",other:"about {{count}} years"},xYears:{one:"a year",other:"{{count}} years"},overXYears:{one:"over a year",other:"over {{count}} years"},almostXYears:{one:"almost a year",other:"almost {{count}} years"}},Wg={code:"en-CA",formatDistance:(e,t,n)=>{let i;const a=Rg[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},formatLong:{date:ef({formats:{full:"EEEE, MMMM do, yyyy",long:"MMMM do, yyyy",medium:"MMM d, yyyy",short:"yyyy-MM-dd"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:Cg,localize:Lg,match:Ig,options:{weekStartsOn:0,firstWeekContainsDate:1}},Ng={date:ef({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Og={code:"en-GB",formatDistance:Ag,formatLong:Ng,formatRelative:Cg,localize:Lg,match:Ig,options:{weekStartsOn:1,firstWeekContainsDate:4}},Fg={code:"en-IE",formatDistance:Ag,formatLong:Ng,formatRelative:Cg,localize:Lg,match:Ig,options:{weekStartsOn:1,firstWeekContainsDate:4}},jg={code:"en-IN",formatDistance:Ag,formatLong:{date:ef({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM, yyyy",medium:"d MMM, yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:Cg,localize:Lg,match:Ig,options:{weekStartsOn:1,firstWeekContainsDate:4}},zg={code:"en-NZ",formatDistance:Ag,formatLong:{date:ef({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:Cg,localize:Lg,match:Ig,options:{weekStartsOn:1,firstWeekContainsDate:4}},$g={code:"en-US",formatDistance:Ag,formatLong:{date:ef({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:Cg,localize:Lg,match:Ig,options:{weekStartsOn:0,firstWeekContainsDate:1}},Ug={code:"en-ZA",formatDistance:Ag,formatLong:{date:ef({formats:{full:"EEEE, dd MMMM yyyy",long:"dd MMMM yyyy",medium:"dd MMM yyyy",short:"yyyy/MM/dd"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:Cg,localize:Lg,match:Ig,options:{weekStartsOn:0,firstWeekContainsDate:1}},Hg={lessThanXSeconds:{one:"malpli ol sekundo",other:"malpli ol {{count}} sekundoj"},xSeconds:{one:"1 sekundo",other:"{{count}} sekundoj"},halfAMinute:"duonminuto",lessThanXMinutes:{one:"malpli ol minuto",other:"malpli ol {{count}} minutoj"},xMinutes:{one:"1 minuto",other:"{{count}} minutoj"},aboutXHours:{one:"proksimume 1 horo",other:"proksimume {{count}} horoj"},xHours:{one:"1 horo",other:"{{count}} horoj"},xDays:{one:"1 tago",other:"{{count}} tagoj"},aboutXMonths:{one:"proksimume 1 monato",other:"proksimume {{count}} monatoj"},xWeeks:{one:"1 semajno",other:"{{count}} semajnoj"},aboutXWeeks:{one:"proksimume 1 semajno",other:"proksimume {{count}} semajnoj"},xMonths:{one:"1 monato",other:"{{count}} monatoj"},aboutXYears:{one:"proksimume 1 jaro",other:"proksimume {{count}} jaroj"},xYears:{one:"1 jaro",other:"{{count}} jaroj"},overXYears:{one:"pli ol 1 jaro",other:"pli ol {{count}} jaroj"},almostXYears:{one:"preskaŭ 1 jaro",other:"preskaŭ {{count}} jaroj"}},Bg={date:ef({formats:{full:"EEEE, do 'de' MMMM y",long:"y-MMMM-dd",medium:"y-MMM-dd",short:"yyyy-MM-dd"},defaultWidth:"full"}),time:ef({formats:{full:"Ho 'horo kaj' m:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{any:"{{date}} {{time}}"},defaultWidth:"any"})},Gg={lastWeek:"'pasinta' eeee 'je' p",yesterday:"'hieraŭ je' p",today:"'hodiaŭ je' p",tomorrow:"'morgaŭ je' p",nextWeek:"eeee 'je' p",other:"P"},Xg={code:"eo",formatDistance:(e,t,n)=>{let i;const a=Hg[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n?.comparison&&n.comparison>0?"post "+i:"antaŭ "+i:i},formatLong:Bg,formatRelative:(e,t,n,i)=>Gg[e],localize:{ordinalNumber:e=>Number(e)+"-a",era:af({values:{narrow:["aK","pK"],abbreviated:["a.K.E.","p.K.E."],wide:["antaŭ Komuna Erao","Komuna Erao"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1-a kvaronjaro","2-a kvaronjaro","3-a kvaronjaro","4-a kvaronjaro"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:af({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan","feb","mar","apr","maj","jun","jul","aŭg","sep","okt","nov","dec"],wide:["januaro","februaro","marto","aprilo","majo","junio","julio","aŭgusto","septembro","oktobro","novembro","decembro"]},defaultWidth:"wide"}),day:af({values:{narrow:["D","L","M","M","Ĵ","V","S"],short:["di","lu","ma","me","ĵa","ve","sa"],abbreviated:["dim","lun","mar","mer","ĵaŭ","ven","sab"],wide:["dimanĉo","lundo","mardo","merkredo","ĵaŭdo","vendredo","sabato"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"a",pm:"p",midnight:"noktomezo",noon:"tagmezo",morning:"matene",afternoon:"posttagmeze",evening:"vespere",night:"nokte"},abbreviated:{am:"a.t.m.",pm:"p.t.m.",midnight:"noktomezo",noon:"tagmezo",morning:"matene",afternoon:"posttagmeze",evening:"vespere",night:"nokte"},wide:{am:"antaŭtagmeze",pm:"posttagmeze",midnight:"noktomezo",noon:"tagmezo",morning:"matene",afternoon:"posttagmeze",evening:"vespere",night:"nokte"}},defaultWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(-?a)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:of({matchPatterns:{narrow:/^([ap]k)/i,abbreviated:/^([ap]\.?\s?k\.?\s?e\.?)/i,wide:/^((antaǔ |post )?komuna erao)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^a/i,/^[kp]/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^k[1234]/i,wide:/^[1234](-?a)? kvaronjaro/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|maj|jun|jul|a(ŭ|ux|uh|u)g|sep|okt|nov|dec)/i,wide:/^(januaro|februaro|marto|aprilo|majo|junio|julio|a(ŭ|ux|uh|u)gusto|septembro|oktobro|novembro|decembro)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^a(u|ŭ)/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[dlmĵjvs]/i,short:/^(di|lu|ma|me|(ĵ|jx|jh|j)a|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|(ĵ|jx|jh|j)a(ŭ|ux|uh|u)|ven|sab)/i,wide:/^(diman(ĉ|cx|ch|c)o|lundo|mardo|merkredo|(ĵ|jx|jh|j)a(ŭ|ux|uh|u)do|vendredo|sabato)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^(j|ĵ)/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^(j|ĵ)/i,/^v/i,/^s/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^([ap]|(posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo])/i,abbreviated:/^([ap][.\s]?t[.\s]?m[.\s]?|(posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo])/i,wide:/^(anta(ŭ|ux)tagmez|posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo]/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^noktom/i,noon:/^t/i,morning:/^m/i,afternoon:/^posttagmeze/i,evening:/^v/i,night:/^n/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Yg={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},Vg={date:ef({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Kg={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},qg={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},Jg={code:"es",formatDistance:(e,t,n)=>{let i;const a=Yg[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"en "+i:"hace "+i:i},formatLong:Vg,formatRelative:(e,t,n,i)=>1!==t.getHours()?qg[e]:Kg[e],localize:{ordinalNumber:(e,t)=>Number(e)+"º",era:af({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:af({values:{narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},defaultWidth:"wide"}),day:af({values:{narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:of({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Qg={lessThanXSeconds:{standalone:{one:"vähem kui üks sekund",other:"vähem kui {{count}} sekundit"},withPreposition:{one:"vähem kui ühe sekundi",other:"vähem kui {{count}} sekundi"}},xSeconds:{standalone:{one:"üks sekund",other:"{{count}} sekundit"},withPreposition:{one:"ühe sekundi",other:"{{count}} sekundi"}},halfAMinute:{standalone:"pool minutit",withPreposition:"poole minuti"},lessThanXMinutes:{standalone:{one:"vähem kui üks minut",other:"vähem kui {{count}} minutit"},withPreposition:{one:"vähem kui ühe minuti",other:"vähem kui {{count}} minuti"}},xMinutes:{standalone:{one:"üks minut",other:"{{count}} minutit"},withPreposition:{one:"ühe minuti",other:"{{count}} minuti"}},aboutXHours:{standalone:{one:"umbes üks tund",other:"umbes {{count}} tundi"},withPreposition:{one:"umbes ühe tunni",other:"umbes {{count}} tunni"}},xHours:{standalone:{one:"üks tund",other:"{{count}} tundi"},withPreposition:{one:"ühe tunni",other:"{{count}} tunni"}},xDays:{standalone:{one:"üks päev",other:"{{count}} päeva"},withPreposition:{one:"ühe päeva",other:"{{count}} päeva"}},aboutXWeeks:{standalone:{one:"umbes üks nädal",other:"umbes {{count}} nädalat"},withPreposition:{one:"umbes ühe nädala",other:"umbes {{count}} nädala"}},xWeeks:{standalone:{one:"üks nädal",other:"{{count}} nädalat"},withPreposition:{one:"ühe nädala",other:"{{count}} nädala"}},aboutXMonths:{standalone:{one:"umbes üks kuu",other:"umbes {{count}} kuud"},withPreposition:{one:"umbes ühe kuu",other:"umbes {{count}} kuu"}},xMonths:{standalone:{one:"üks kuu",other:"{{count}} kuud"},withPreposition:{one:"ühe kuu",other:"{{count}} kuu"}},aboutXYears:{standalone:{one:"umbes üks aasta",other:"umbes {{count}} aastat"},withPreposition:{one:"umbes ühe aasta",other:"umbes {{count}} aasta"}},xYears:{standalone:{one:"üks aasta",other:"{{count}} aastat"},withPreposition:{one:"ühe aasta",other:"{{count}} aasta"}},overXYears:{standalone:{one:"rohkem kui üks aasta",other:"rohkem kui {{count}} aastat"},withPreposition:{one:"rohkem kui ühe aasta",other:"rohkem kui {{count}} aasta"}},almostXYears:{standalone:{one:"peaaegu üks aasta",other:"peaaegu {{count}} aastat"},withPreposition:{one:"peaaegu ühe aasta",other:"peaaegu {{count}} aasta"}}},Zg={date:ef({formats:{full:"EEEE, d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'kell' {{time}}",long:"{{date}} 'kell' {{time}}",medium:"{{date}}. {{time}}",short:"{{date}}. {{time}}"},defaultWidth:"full"})},ev={lastWeek:"'eelmine' eeee 'kell' p",yesterday:"'eile kell' p",today:"'täna kell' p",tomorrow:"'homme kell' p",nextWeek:"'järgmine' eeee 'kell' p",other:"P"},tv={narrow:["J","V","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jaan","veebr","märts","apr","mai","juuni","juuli","aug","sept","okt","nov","dets"],wide:["jaanuar","veebruar","märts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember"]},nv={narrow:["P","E","T","K","N","R","L"],short:["P","E","T","K","N","R","L"],abbreviated:["pühap.","esmasp.","teisip.","kolmap.","neljap.","reede.","laup."],wide:["pühapäev","esmaspäev","teisipäev","kolmapäev","neljapäev","reede","laupäev"]},iv={code:"et",formatDistance:(e,t,n)=>{const i=n?.addSuffix?Qg[e].withPreposition:Qg[e].standalone;let a;return a="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?a+" pärast":a+" eest":a},formatLong:Zg,formatRelative:(e,t,n,i)=>ev[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["e.m.a","m.a.j"],abbreviated:["e.m.a","m.a.j"],wide:["enne meie ajaarvamist","meie ajaarvamise järgi"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:tv,defaultWidth:"wide",formattingValues:tv,defaultFormattingWidth:"wide"}),day:af({values:nv,defaultWidth:"wide",formattingValues:nv,defaultFormattingWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"AM",pm:"PM",midnight:"kesköö",noon:"keskpäev",morning:"hommik",afternoon:"pärastlõuna",evening:"õhtu",night:"öö"},abbreviated:{am:"AM",pm:"PM",midnight:"kesköö",noon:"keskpäev",morning:"hommik",afternoon:"pärastlõuna",evening:"õhtu",night:"öö"},wide:{am:"AM",pm:"PM",midnight:"kesköö",noon:"keskpäev",morning:"hommik",afternoon:"pärastlõuna",evening:"õhtu",night:"öö"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"keskööl",noon:"keskpäeval",morning:"hommikul",afternoon:"pärastlõunal",evening:"õhtul",night:"öösel"},abbreviated:{am:"AM",pm:"PM",midnight:"keskööl",noon:"keskpäeval",morning:"hommikul",afternoon:"pärastlõunal",evening:"õhtul",night:"öösel"},wide:{am:"AM",pm:"PM",midnight:"keskööl",noon:"keskpäeval",morning:"hommikul",afternoon:"pärastlõunal",evening:"õhtul",night:"öösel"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^\d+\./i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(e\.m\.a|m\.a\.j|eKr|pKr)/i,abbreviated:/^(e\.m\.a|m\.a\.j|eKr|pKr)/i,wide:/^(enne meie ajaarvamist|meie ajaarvamise järgi|enne Kristust|pärast Kristust)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^e/i,/^(m|p)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^K[1234]/i,wide:/^[1234](\.)? kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jvmasond]/i,abbreviated:/^(jaan|veebr|märts|apr|mai|juuni|juuli|aug|sept|okt|nov|dets)/i,wide:/^(jaanuar|veebruar|märts|aprill|mai|juuni|juuli|august|september|oktoober|november|detsember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^v/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^v/i,/^mär/i,/^ap/i,/^mai/i,/^juun/i,/^juul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[petknrl]/i,short:/^[petknrl]/i,abbreviated:/^(püh?|esm?|tei?|kolm?|nel?|ree?|laup?)\.?/i,wide:/^(pühapäev|esmaspäev|teisipäev|kolmapäev|neljapäev|reede|laupäev)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^p/i,/^e/i,/^t/i,/^k/i,/^n/i,/^r/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(am|pm|keskööl?|keskpäev(al)?|hommik(ul)?|pärastlõunal?|õhtul?|öö(sel)?)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^keskö/i,noon:/^keskp/i,morning:/hommik/i,afternoon:/pärastlõuna/i,evening:/õhtu/i,night:/öö/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},av={lessThanXSeconds:{one:"segundo bat baino gutxiago",other:"{{count}} segundo baino gutxiago"},xSeconds:{one:"1 segundo",other:"{{count}} segundo"},halfAMinute:"minutu erdi",lessThanXMinutes:{one:"minutu bat baino gutxiago",other:"{{count}} minutu baino gutxiago"},xMinutes:{one:"1 minutu",other:"{{count}} minutu"},aboutXHours:{one:"1 ordu gutxi gorabehera",other:"{{count}} ordu gutxi gorabehera"},xHours:{one:"1 ordu",other:"{{count}} ordu"},xDays:{one:"1 egun",other:"{{count}} egun"},aboutXWeeks:{one:"aste 1 inguru",other:"{{count}} aste inguru"},xWeeks:{one:"1 aste",other:"{{count}} astean"},aboutXMonths:{one:"1 hilabete gutxi gorabehera",other:"{{count}} hilabete gutxi gorabehera"},xMonths:{one:"1 hilabete",other:"{{count}} hilabete"},aboutXYears:{one:"1 urte gutxi gorabehera",other:"{{count}} urte gutxi gorabehera"},xYears:{one:"1 urte",other:"{{count}} urte"},overXYears:{one:"1 urte baino gehiago",other:"{{count}} urte baino gehiago"},almostXYears:{one:"ia 1 urte",other:"ia {{count}} urte"}},rv={date:ef({formats:{full:"EEEE, y'ko' MMMM'ren' d'a' y'ren'",long:"y'ko' MMMM'ren' d'a'",medium:"y MMM d",short:"yy/MM/dd"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'tan' {{time}}",long:"{{date}} 'tan' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ov={lastWeek:"'joan den' eeee, LT",yesterday:"'atzo,' p",today:"'gaur,' p",tomorrow:"'bihar,' p",nextWeek:"eeee, p",other:"P"},sv={lastWeek:"'joan den' eeee, p",yesterday:"'atzo,' p",today:"'gaur,' p",tomorrow:"'bihar,' p",nextWeek:"eeee, p",other:"P"},lv={code:"eu",formatDistance:(e,t,n)=>{let i;const a=av[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"en "+i:"duela "+i:i},formatLong:rv,formatRelative:(e,t)=>1!==t.getHours()?sv[e]:ov[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["k.a.","k.o."],abbreviated:["k.a.","k.o."],wide:["kristo aurretik","kristo ondoren"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1H","2H","3H","4H"],wide:["1. hiruhilekoa","2. hiruhilekoa","3. hiruhilekoa","4. hiruhilekoa"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["u","o","m","a","m","e","u","a","i","u","a","a"],abbreviated:["urt","ots","mar","api","mai","eka","uzt","abu","ira","urr","aza","abe"],wide:["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua"]},defaultWidth:"wide"}),day:af({values:{narrow:["i","a","a","a","o","o","l"],short:["ig","al","as","az","og","or","lr"],abbreviated:["iga","ast","ast","ast","ost","ost","lar"],wide:["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"a",pm:"p",midnight:"ge",noon:"eg",morning:"goiza",afternoon:"arratsaldea",evening:"arratsaldea",night:"gaua"},abbreviated:{am:"AM",pm:"PM",midnight:"gauerdia",noon:"eguerdia",morning:"goiza",afternoon:"arratsaldea",evening:"arratsaldea",night:"gaua"},wide:{am:"a.m.",pm:"p.m.",midnight:"gauerdia",noon:"eguerdia",morning:"goiza",afternoon:"arratsaldea",evening:"arratsaldea",night:"gaua"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"ge",noon:"eg",morning:"goizean",afternoon:"arratsaldean",evening:"arratsaldean",night:"gauean"},abbreviated:{am:"AM",pm:"PM",midnight:"gauerdia",noon:"eguerdia",morning:"goizean",afternoon:"arratsaldean",evening:"arratsaldean",night:"gauean"},wide:{am:"a.m.",pm:"p.m.",midnight:"gauerdia",noon:"eguerdia",morning:"goizean",afternoon:"arratsaldean",evening:"arratsaldean",night:"gauean"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(k.a.|k.o.)/i,abbreviated:/^(k.a.|k.o.)/i,wide:/^(kristo aurretik|kristo ondoren)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^k.a./i,/^k.o./i],abbreviated:[/^(k.a.)/i,/^(k.o.)/i],wide:[/^(kristo aurretik)/i,/^(kristo ondoren)/i]},defaultParseWidth:"wide"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]H/i,wide:/^[1234](.)? hiruhilekoa/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[uomaei]/i,abbreviated:/^(urt|ots|mar|api|mai|eka|uzt|abu|ira|urr|aza|abe)/i,wide:/^(urtarrila|otsaila|martxoa|apirila|maiatza|ekaina|uztaila|abuztua|iraila|urria|azaroa|abendua)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^u/i,/^o/i,/^m/i,/^a/i,/^m/i,/^e/i,/^u/i,/^a/i,/^i/i,/^u/i,/^a/i,/^a/i],any:[/^urt/i,/^ots/i,/^mar/i,/^api/i,/^mai/i,/^eka/i,/^uzt/i,/^abu/i,/^ira/i,/^urr/i,/^aza/i,/^abe/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[iaol]/i,short:/^(ig|al|as|az|og|or|lr)/i,abbreviated:/^(iga|ast|ast|ast|ost|ost|lar)/i,wide:/^(igandea|astelehena|asteartea|asteazkena|osteguna|ostirala|larunbata)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^i/i,/^a/i,/^a/i,/^a/i,/^o/i,/^o/i,/^l/i],short:[/^ig/i,/^al/i,/^as/i,/^az/i,/^og/i,/^or/i,/^lr/i],abbreviated:[/^iga/i,/^ast/i,/^ast/i,/^ast/i,/^ost/i,/^ost/i,/^lar/i],wide:[/^igandea/i,/^astelehena/i,/^asteartea/i,/^asteazkena/i,/^osteguna/i,/^ostirala/i,/^larunbata/i]},defaultParseWidth:"wide"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|ge|eg|((goiza|goizean)|arratsaldea|(gaua|gauean)))/i,any:/^([ap]\.?\s?m\.?|gauerdia|eguerdia|((goiza|goizean)|arratsaldea|(gaua|gauean)))/i},defaultMatchWidth:"any",parsePatterns:{narrow:{am:/^a/i,pm:/^p/i,midnight:/^ge/i,noon:/^eg/i,morning:/goiz/i,afternoon:/arratsaldea/i,evening:/arratsaldea/i,night:/gau/i},any:{am:/^a/i,pm:/^p/i,midnight:/^gauerdia/i,noon:/^eguerdia/i,morning:/goiz/i,afternoon:/arratsaldea/i,evening:/arratsaldea/i,night:/gau/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},dv={lessThanXSeconds:{one:"کمتر از یک ثانیه",other:"کمتر از {{count}} ثانیه"},xSeconds:{one:"1 ثانیه",other:"{{count}} ثانیه"},halfAMinute:"نیم دقیقه",lessThanXMinutes:{one:"کمتر از یک دقیقه",other:"کمتر از {{count}} دقیقه"},xMinutes:{one:"1 دقیقه",other:"{{count}} دقیقه"},aboutXHours:{one:"حدود 1 ساعت",other:"حدود {{count}} ساعت"},xHours:{one:"1 ساعت",other:"{{count}} ساعت"},xDays:{one:"1 روز",other:"{{count}} روز"},aboutXWeeks:{one:"حدود 1 هفته",other:"حدود {{count}} هفته"},xWeeks:{one:"1 هفته",other:"{{count}} هفته"},aboutXMonths:{one:"حدود 1 ماه",other:"حدود {{count}} ماه"},xMonths:{one:"1 ماه",other:"{{count}} ماه"},aboutXYears:{one:"حدود 1 سال",other:"حدود {{count}} سال"},xYears:{one:"1 سال",other:"{{count}} سال"},overXYears:{one:"بیشتر از 1 سال",other:"بیشتر از {{count}} سال"},almostXYears:{one:"نزدیک 1 سال",other:"نزدیک {{count}} سال"}},uv={date:ef({formats:{full:"EEEE do MMMM y",long:"do MMMM y",medium:"d MMM y",short:"yyyy/MM/dd"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'در' {{time}}",long:"{{date}} 'در' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},cv={lastWeek:"eeee 'گذشته در' p",yesterday:"'دیروز در' p",today:"'امروز در' p",tomorrow:"'فردا در' p",nextWeek:"eeee 'در' p",other:"P"},hv={code:"fa-IR",formatDistance:(e,t,n)=>{let i;const a=dv[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"در "+i:i+" قبل":i},formatLong:uv,formatRelative:(e,t,n,i)=>cv[e],localize:{ordinalNumber:(e,t)=>String(e),era:af({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل از میلاد","بعد از میلاد"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["سم1","سم2","سم3","سم4"],wide:["سهماهه 1","سهماهه 2","سهماهه 3","سهماهه 4"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["ژ","ف","م","آ","م","ج","ج","آ","س","ا","ن","د"],abbreviated:["ژانـ","فور","مارس","آپر","می","جون","جولـ","آگو","سپتـ","اکتـ","نوامـ","دسامـ"],wide:["ژانویه","فوریه","مارس","آپریل","می","جون","جولای","آگوست","سپتامبر","اکتبر","نوامبر","دسامبر"]},defaultWidth:"wide"}),day:af({values:{narrow:["ی","د","س","چ","پ","ج","ش"],short:["1ش","2ش","3ش","4ش","5ش","ج","ش"],abbreviated:["یکشنبه","دوشنبه","سهشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],wide:["یکشنبه","دوشنبه","سهشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ق",pm:"ب",midnight:"ن",noon:"ظ",morning:"ص",afternoon:"ب.ظ.",evening:"ع",night:"ش"},abbreviated:{am:"ق.ظ.",pm:"ب.ظ.",midnight:"نیمهشب",noon:"ظهر",morning:"صبح",afternoon:"بعدازظهر",evening:"عصر",night:"شب"},wide:{am:"قبلازظهر",pm:"بعدازظهر",midnight:"نیمهشب",noon:"ظهر",morning:"صبح",afternoon:"بعدازظهر",evening:"عصر",night:"شب"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ق",pm:"ب",midnight:"ن",noon:"ظ",morning:"ص",afternoon:"ب.ظ.",evening:"ع",night:"ش"},abbreviated:{am:"ق.ظ.",pm:"ب.ظ.",midnight:"نیمهشب",noon:"ظهر",morning:"صبح",afternoon:"بعدازظهر",evening:"عصر",night:"شب"},wide:{am:"قبلازظهر",pm:"بعدازظهر",midnight:"نیمهشب",noon:"ظهر",morning:"صبح",afternoon:"بعدازظهر",evening:"عصر",night:"شب"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(ق|ب)/i,abbreviated:/^(ق\.?\s?م\.?|ق\.?\s?د\.?\s?م\.?|م\.?\s?|د\.?\s?م\.?)/i,wide:/^(قبل از میلاد|قبل از دوران مشترک|میلادی|دوران مشترک|بعد از میلاد)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^قبل/i,/^بعد/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^سم[1234]/i,wide:/^سهماهه [1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[جژفمآاماسند]/i,abbreviated:/^(جنو|ژانـ|ژانویه|فوریه|فور|مارس|آوریل|آپر|مه|می|ژوئن|جون|جول|جولـ|ژوئیه|اوت|آگو|سپتمبر|سپتامبر|اکتبر|اکتوبر|نوامبر|نوامـ|دسامبر|دسامـ|دسم)/i,wide:/^(ژانویه|جنوری|فبروری|فوریه|مارچ|مارس|آپریل|اپریل|ایپریل|آوریل|مه|می|ژوئن|جون|جولای|ژوئیه|آگست|اگست|آگوست|اوت|سپتمبر|سپتامبر|اکتبر|اکتوبر|نوامبر|نومبر|دسامبر|دسمبر)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^(ژ|ج)/i,/^ف/i,/^م/i,/^(آ|ا)/i,/^م/i,/^(ژ|ج)/i,/^(ج|ژ)/i,/^(آ|ا)/i,/^س/i,/^ا/i,/^ن/i,/^د/i],any:[/^ژا/i,/^ف/i,/^ما/i,/^آپ/i,/^(می|مه)/i,/^(ژوئن|جون)/i,/^(ژوئی|جول)/i,/^(اوت|آگ)/i,/^س/i,/^(اوک|اک)/i,/^ن/i,/^د/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[شیدسچپج]/i,short:/^(ش|ج|1ش|2ش|3ش|4ش|5ش)/i,abbreviated:/^(یکشنبه|دوشنبه|سهشنبه|چهارشنبه|پنجشنبه|جمعه|شنبه)/i,wide:/^(یکشنبه|دوشنبه|سهشنبه|چهارشنبه|پنجشنبه|جمعه|شنبه)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ی/i,/^دو/i,/^س/i,/^چ/i,/^پ/i,/^ج/i,/^ش/i],any:[/^(ی|1ش|یکشنبه)/i,/^(د|2ش|دوشنبه)/i,/^(س|3ش|سهشنبه)/i,/^(چ|4ش|چهارشنبه)/i,/^(پ|5ش|پنجشنبه)/i,/^(ج|جمعه)/i,/^(ش|شنبه)/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(ب|ق|ن|ظ|ص|ب.ظ.|ع|ش)/i,abbreviated:/^(ق.ظ.|ب.ظ.|نیمهشب|ظهر|صبح|بعدازظهر|عصر|شب)/i,wide:/^(قبلازظهر|نیمهشب|ظهر|صبح|بعدازظهر|عصر|شب)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^(ق|ق.ظ.|قبلازظهر)/i,pm:/^(ب|ب.ظ.|بعدازظهر)/i,midnight:/^(نیمهشب|ن)/i,noon:/^(ظ|ظهر)/i,morning:/(ص|صبح)/i,afternoon:/(ب|ب.ظ.|بعدازظهر)/i,evening:/(ع|عصر)/i,night:/(ش|شب)/i}},defaultParseWidth:"any"})},options:{weekStartsOn:6,firstWeekContainsDate:1}};function mv(e){return e.replace(/sekuntia?/,"sekunnin")}function fv(e){return e.replace(/minuuttia?/,"minuutin")}function pv(e){return e.replace(/tuntia?/,"tunnin")}function gv(e){return e.replace(/(viikko|viikkoa)/,"viikon")}function vv(e){return e.replace(/(kuukausi|kuukautta)/,"kuukauden")}function yv(e){return e.replace(/(vuosi|vuotta)/,"vuoden")}const wv={lessThanXSeconds:{one:"alle sekunti",other:"alle {{count}} sekuntia",futureTense:mv},xSeconds:{one:"sekunti",other:"{{count}} sekuntia",futureTense:mv},halfAMinute:{one:"puoli minuuttia",other:"puoli minuuttia",futureTense:e=>"puolen minuutin"},lessThanXMinutes:{one:"alle minuutti",other:"alle {{count}} minuuttia",futureTense:fv},xMinutes:{one:"minuutti",other:"{{count}} minuuttia",futureTense:fv},aboutXHours:{one:"noin tunti",other:"noin {{count}} tuntia",futureTense:pv},xHours:{one:"tunti",other:"{{count}} tuntia",futureTense:pv},xDays:{one:"päivä",other:"{{count}} päivää",futureTense:function(e){return e.replace(/päivää?/,"päivän")}},aboutXWeeks:{one:"noin viikko",other:"noin {{count}} viikkoa",futureTense:gv},xWeeks:{one:"viikko",other:"{{count}} viikkoa",futureTense:gv},aboutXMonths:{one:"noin kuukausi",other:"noin {{count}} kuukautta",futureTense:vv},xMonths:{one:"kuukausi",other:"{{count}} kuukautta",futureTense:vv},aboutXYears:{one:"noin vuosi",other:"noin {{count}} vuotta",futureTense:yv},xYears:{one:"vuosi",other:"{{count}} vuotta",futureTense:yv},overXYears:{one:"yli vuosi",other:"yli {{count}} vuotta",futureTense:yv},almostXYears:{one:"lähes vuosi",other:"lähes {{count}} vuotta",futureTense:yv}},bv={date:ef({formats:{full:"eeee d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"d.M.y"},defaultWidth:"full"}),time:ef({formats:{full:"HH.mm.ss zzzz",long:"HH.mm.ss z",medium:"HH.mm.ss",short:"HH.mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'klo' {{time}}",long:"{{date}} 'klo' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},kv={lastWeek:"'viime' eeee 'klo' p",yesterday:"'eilen klo' p",today:"'tänään klo' p",tomorrow:"'huomenna klo' p",nextWeek:"'ensi' eeee 'klo' p",other:"P"},Sv={narrow:["T","H","M","H","T","K","H","E","S","L","M","J"],abbreviated:["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu"],wide:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"]},Mv={narrow:Sv.narrow,abbreviated:Sv.abbreviated,wide:["tammikuuta","helmikuuta","maaliskuuta","huhtikuuta","toukokuuta","kesäkuuta","heinäkuuta","elokuuta","syyskuuta","lokakuuta","marraskuuta","joulukuuta"]},Ev={narrow:["S","M","T","K","T","P","L"],short:["su","ma","ti","ke","to","pe","la"],abbreviated:["sunn.","maan.","tiis.","kesk.","torst.","perj.","la"],wide:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"]},Tv={narrow:Ev.narrow,short:Ev.short,abbreviated:Ev.abbreviated,wide:["sunnuntaina","maanantaina","tiistaina","keskiviikkona","torstaina","perjantaina","lauantaina"]},Pv={ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["eaa.","jaa."],abbreviated:["eaa.","jaa."],wide:["ennen ajanlaskun alkua","jälkeen ajanlaskun alun"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. kvartaali","2. kvartaali","3. kvartaali","4. kvartaali"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:Sv,defaultWidth:"wide",formattingValues:Mv,defaultFormattingWidth:"wide"}),day:af({values:Ev,defaultWidth:"wide",formattingValues:Tv,defaultFormattingWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ap",pm:"ip",midnight:"keskiyö",noon:"keskipäivä",morning:"ap",afternoon:"ip",evening:"illalla",night:"yöllä"},abbreviated:{am:"ap",pm:"ip",midnight:"keskiyö",noon:"keskipäivä",morning:"ap",afternoon:"ip",evening:"illalla",night:"yöllä"},wide:{am:"ap",pm:"ip",midnight:"keskiyöllä",noon:"keskipäivällä",morning:"aamupäivällä",afternoon:"iltapäivällä",evening:"illalla",night:"yöllä"}},defaultWidth:"wide"})},Av={ordinalNumber:sf({matchPattern:/^(\d+)(\.)/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(e|j)/i,abbreviated:/^(eaa.|jaa.)/i,wide:/^(ennen ajanlaskun alkua|jälkeen ajanlaskun alun)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^e/i,/^j/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]\.? kvartaali/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[thmkeslj]/i,abbreviated:/^(tammi|helmi|maalis|huhti|touko|kesä|heinä|elo|syys|loka|marras|joulu)/i,wide:/^(tammikuu|helmikuu|maaliskuu|huhtikuu|toukokuu|kesäkuu|heinäkuu|elokuu|syyskuu|lokakuu|marraskuu|joulukuu)(ta)?/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^t/i,/^h/i,/^m/i,/^h/i,/^t/i,/^k/i,/^h/i,/^e/i,/^s/i,/^l/i,/^m/i,/^j/i],any:[/^ta/i,/^hel/i,/^maa/i,/^hu/i,/^to/i,/^k/i,/^hei/i,/^e/i,/^s/i,/^l/i,/^mar/i,/^j/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[smtkpl]/i,short:/^(su|ma|ti|ke|to|pe|la)/i,abbreviated:/^(sunn.|maan.|tiis.|kesk.|torst.|perj.|la)/i,wide:/^(sunnuntai|maanantai|tiistai|keskiviikko|torstai|perjantai|lauantai)(na)?/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^k/i,/^t/i,/^p/i,/^l/i],any:[/^s/i,/^m/i,/^ti/i,/^k/i,/^to/i,/^p/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(ap|ip|keskiyö|keskipäivä|aamupäivällä|iltapäivällä|illalla|yöllä)/i,any:/^(ap|ip|keskiyöllä|keskipäivällä|aamupäivällä|iltapäivällä|illalla|yöllä)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ap/i,pm:/^ip/i,midnight:/^keskiyö/i,noon:/^keskipäivä/i,morning:/aamupäivällä/i,afternoon:/iltapäivällä/i,evening:/illalla/i,night:/yöllä/i}},defaultParseWidth:"any"})},xv={code:"fi",formatDistance:(e,t,n)=>{const i=wv[e],a=1===t?i.one:i.other.replace("{{count}}",String(t));return n?.addSuffix?n.comparison&&n.comparison>0?i.futureTense(a)+" kuluttua":a+" sitten":a},formatLong:bv,formatRelative:(e,t,n,i)=>kv[e],localize:Pv,match:Av,options:{weekStartsOn:1,firstWeekContainsDate:4}},_v={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},Cv=(e,t,n)=>{let i;const a=_v[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"dans "+i:"il y a "+i:i},Lv={date:ef({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Iv={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},Dv=(e,t,n,i)=>Iv[e],Rv=["MMM","MMMM"],Wv={preprocessor:(e,t)=>{if(1===e.getDate())return t;return t.some((e=>e.isToken&&Rv.includes(e.value)))?t.map((e=>e.isToken&&"do"===e.value?{isToken:!0,value:"d"}:e)):t},ordinalNumber:(e,t)=>{const n=Number(e),i=t?.unit;if(0===n)return"0";let a;return a=1===n?i&&["year","week","hour","minute","second"].includes(i)?"ère":"er":"ème",n+a},era:af({values:{narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},defaultWidth:"wide"}),day:af({values:{narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},defaultWidth:"wide"})},Nv={ordinalNumber:sf({matchPattern:/^(\d+)(ième|ère|ème|er|e)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e)}),era:of({matchPatterns:{narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^av/i,/^ap/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},defaultParseWidth:"any"})},Ov={code:"fr",formatDistance:Cv,formatLong:Lv,formatRelative:Dv,localize:Wv,match:Nv,options:{weekStartsOn:1,firstWeekContainsDate:4}},Fv={code:"fr-CA",formatDistance:Cv,formatLong:{date:ef({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"yy-MM-dd"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:Dv,localize:Wv,match:Nv,options:{weekStartsOn:0,firstWeekContainsDate:1}},jv={date:ef({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},zv={lastWeek:"eeee 'la semaine dernière à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'la semaine prochaine à' p",other:"P"},$v={code:"fr-CH",formatDistance:Cv,formatLong:jv,formatRelative:(e,t,n,i)=>zv[e],localize:Wv,match:Nv,options:{weekStartsOn:1,firstWeekContainsDate:4}},Uv={lessThanXSeconds:{one:"minder as 1 sekonde",other:"minder as {{count}} sekonden"},xSeconds:{one:"1 sekonde",other:"{{count}} sekonden"},halfAMinute:"oardel minút",lessThanXMinutes:{one:"minder as 1 minút",other:"minder as {{count}} minuten"},xMinutes:{one:"1 minút",other:"{{count}} minuten"},aboutXHours:{one:"sawat 1 oere",other:"sawat {{count}} oere"},xHours:{one:"1 oere",other:"{{count}} oere"},xDays:{one:"1 dei",other:"{{count}} dagen"},aboutXWeeks:{one:"sawat 1 wike",other:"sawat {{count}} wiken"},xWeeks:{one:"1 wike",other:"{{count}} wiken"},aboutXMonths:{one:"sawat 1 moanne",other:"sawat {{count}} moannen"},xMonths:{one:"1 moanne",other:"{{count}} moannen"},aboutXYears:{one:"sawat 1 jier",other:"sawat {{count}} jier"},xYears:{one:"1 jier",other:"{{count}} jier"},overXYears:{one:"mear as 1 jier",other:"mear as {{count}}s jier"},almostXYears:{one:"hast 1 jier",other:"hast {{count}} jier"}},Hv={date:ef({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd-MM-y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Bv={lastWeek:"'ôfrûne' eeee 'om' p",yesterday:"'juster om' p",today:"'hjoed om' p",tomorrow:"'moarn om' p",nextWeek:"eeee 'om' p",other:"P"},Gv={code:"fy",formatDistance:(e,t,n)=>{let i;const a=Uv[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"oer "+i:i+" lyn":i},formatLong:Hv,formatRelative:(e,t,n,i)=>Bv[e],localize:{ordinalNumber:(e,t)=>Number(e)+"e",era:af({values:{narrow:["f.K.","n.K."],abbreviated:["f.Kr.","n.Kr."],wide:["foar Kristus","nei Kristus"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1e fearnsjier","2e fearnsjier","3e fearnsjier","4e fearnsjier"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan.","feb.","mrt.","apr.","mai.","jun.","jul.","aug.","sep.","okt.","nov.","des."],wide:["jannewaris","febrewaris","maart","april","maaie","juny","july","augustus","septimber","oktober","novimber","desimber"]},defaultWidth:"wide"}),day:af({values:{narrow:["s","m","t","w","t","f","s"],short:["si","mo","ti","wo","to","fr","so"],abbreviated:["snein","moa","tii","woa","ton","fre","sneon"],wide:["snein","moandei","tiisdei","woansdei","tongersdei","freed","sneon"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"AM",pm:"PM",midnight:"middernacht",noon:"middei",morning:"moarns",afternoon:"middeis",evening:"jûns",night:"nachts"},abbreviated:{am:"AM",pm:"PM",midnight:"middernacht",noon:"middei",morning:"moarns",afternoon:"middeis",evening:"jûns",night:"nachts"},wide:{am:"AM",pm:"PM",midnight:"middernacht",noon:"middei",morning:"moarns",afternoon:"middeis",evening:"jûns",night:"nachts"}},defaultWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)e?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^([fn]\.? ?K\.?)/,abbreviated:/^([fn]\. ?Kr\.?)/,wide:/^((foar|nei) Kristus)/},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/,/^n/]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^K[1234]/i,wide:/^[1234]e fearnsjier/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mrt.|apr.|mai.|jun.|jul.|aug.|sep.|okt.|nov.|des.)/i,wide:/^(jannewaris|febrewaris|maart|april|maaie|juny|july|augustus|septimber|oktober|novimber|desimber)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^jan/i,/^feb/i,/^m(r|a)/i,/^apr/i,/^mai/i,/^jun/i,/^jul/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^des/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[smtwf]/i,short:/^(si|mo|ti|wo|to|fr|so)/i,abbreviated:/^(snein|moa|tii|woa|ton|fre|sneon)/i,wide:/^(snein|moandei|tiisdei|woansdei|tongersdei|freed|sneon)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^sn/i,/^mo/i,/^ti/i,/^wo/i,/^to/i,/^fr/i,/^sn/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(am|pm|middernacht|middeis|moarns|middei|jûns|nachts)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^am/i,pm:/^pm/i,midnight:/^middernacht/i,noon:/^middei/i,morning:/moarns/i,afternoon:/^middeis/i,evening:/jûns/i,night:/nachts/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Xv={lessThanXSeconds:{one:"nas lugha na diog",other:"nas lugha na {{count}} diogan"},xSeconds:{one:"1 diog",two:"2 dhiog",twenty:"20 diog",other:"{{count}} diogan"},halfAMinute:"leth mhionaid",lessThanXMinutes:{one:"nas lugha na mionaid",other:"nas lugha na {{count}} mionaidean"},xMinutes:{one:"1 mionaid",two:"2 mhionaid",twenty:"20 mionaid",other:"{{count}} mionaidean"},aboutXHours:{one:"mu uair de thìde",other:"mu {{count}} uairean de thìde"},xHours:{one:"1 uair de thìde",two:"2 uair de thìde",twenty:"20 uair de thìde",other:"{{count}} uairean de thìde"},xDays:{one:"1 là",other:"{{count}} là"},aboutXWeeks:{one:"mu 1 seachdain",other:"mu {{count}} seachdainean"},xWeeks:{one:"1 seachdain",other:"{{count}} seachdainean"},aboutXMonths:{one:"mu mhìos",other:"mu {{count}} mìosan"},xMonths:{one:"1 mìos",other:"{{count}} mìosan"},aboutXYears:{one:"mu bhliadhna",other:"mu {{count}} bliadhnaichean"},xYears:{one:"1 bhliadhna",other:"{{count}} bliadhna"},overXYears:{one:"còrr is bliadhna",other:"còrr is {{count}} bliadhnaichean"},almostXYears:{one:"cha mhòr bliadhna",other:"cha mhòr {{count}} bliadhnaichean"}},Yv={date:ef({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'aig' {{time}}",long:"{{date}} 'aig' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Vv={lastWeek:"'mu dheireadh' eeee 'aig' p",yesterday:"'an-dè aig' p",today:"'an-diugh aig' p",tomorrow:"'a-màireach aig' p",nextWeek:"eeee 'aig' p",other:"P"},Kv={code:"gd",formatDistance:(e,t,n)=>{let i;const a=Xv[e];return i="string"==typeof a?a:1===t?a.one:2===t&&a.two?a.two:20===t&&a.twenty?a.twenty:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"ann an "+i:"o chionn "+i:i},formatLong:Yv,formatRelative:(e,t,n,i)=>Vv[e],localize:{ordinalNumber:e=>{const t=Number(e),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"d";case 2:return t+"na"}return 12===n?t+"na":t+"mh"},era:af({values:{narrow:["R","A"],abbreviated:["RC","AD"],wide:["ro Chrìosta","anno domini"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["C1","C2","C3","C4"],wide:["a' chiad chairteal","an dàrna cairteal","an treas cairteal","an ceathramh cairteal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["F","G","M","G","C","Ò","I","L","S","D","S","D"],abbreviated:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],wide:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"]},defaultWidth:"wide"}),day:af({values:{narrow:["D","L","M","C","A","H","S"],short:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],abbreviated:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],wide:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"m",pm:"f",midnight:"m.o.",noon:"m.l.",morning:"madainn",afternoon:"feasgar",evening:"feasgar",night:"oidhche"},abbreviated:{am:"M.",pm:"F.",midnight:"meadhan oidhche",noon:"meadhan là",morning:"madainn",afternoon:"feasgar",evening:"feasgar",night:"oidhche"},wide:{am:"m.",pm:"f.",midnight:"meadhan oidhche",noon:"meadhan là",morning:"madainn",afternoon:"feasgar",evening:"feasgar",night:"oidhche"}},defaultWidth:"wide",formattingValues:{narrow:{am:"m",pm:"f",midnight:"m.o.",noon:"m.l.",morning:"sa mhadainn",afternoon:"feasgar",evening:"feasgar",night:"air an oidhche"},abbreviated:{am:"M.",pm:"F.",midnight:"meadhan oidhche",noon:"meadhan là",morning:"sa mhadainn",afternoon:"feasgar",evening:"feasgar",night:"air an oidhche"},wide:{am:"m.",pm:"f.",midnight:"meadhan oidhche",noon:"meadhan là",morning:"sa mhadainn",afternoon:"feasgar",evening:"feasgar",night:"air an oidhche"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(d|na|tr|mh)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(r|a)/i,abbreviated:/^(r\.?\s?c\.?|r\.?\s?a\.?\s?c\.?|a\.?\s?d\.?|a\.?\s?c\.?)/i,wide:/^(ro Chrìosta|ron aois choitchinn|anno domini|aois choitcheann)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^c[1234]/i,wide:/^[1234](cd|na|tr|mh)? cairteal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[fgmcòilsd]/i,abbreviated:/^(faoi|gear|màrt|gibl|cèit|ògmh|iuch|lùn|sult|dàmh|samh|dùbh)/i,wide:/^(am faoilleach|an gearran|am màrt|an giblean|an cèitean|an t-Ògmhios|an t-Iuchar|an lùnastal|an t-Sultain|an dàmhair|an t-Samhain|an dùbhlachd)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^f/i,/^g/i,/^m/i,/^g/i,/^c/i,/^ò/i,/^i/i,/^l/i,/^s/i,/^d/i,/^s/i,/^d/i],any:[/^fa/i,/^ge/i,/^mà/i,/^gi/i,/^c/i,/^ò/i,/^i/i,/^l/i,/^su/i,/^d/i,/^sa/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[dlmcahs]/i,short:/^(dò|lu|mà|ci|ar|ha|sa)/i,abbreviated:/^(did|dil|dim|dic|dia|dih|dis)/i,wide:/^(didòmhnaich|diluain|dimàirt|diciadain|diardaoin|dihaoine|disathairne)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^c/i,/^a/i,/^h/i,/^s/i],any:[/^d/i,/^l/i,/^m/i,/^c/i,/^a/i,/^h/i,/^s/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|mi|n|(san|aig) (madainn|feasgar|feasgar|oidhche))/i,any:/^([ap]\.?\s?m\.?|meadhan oidhche|meadhan là|(san|aig) (madainn|feasgar|feasgar|oidhche))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^m/i,pm:/^f/i,midnight:/^meadhan oidhche/i,noon:/^meadhan là/i,morning:/sa mhadainn/i,afternoon:/feasgar/i,evening:/feasgar/i,night:/air an oidhche/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},qv={lessThanXSeconds:{one:"menos dun segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos dun minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"arredor dunha hora",other:"arredor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"arredor dunha semana",other:"arredor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"arredor de 1 mes",other:"arredor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"arredor dun ano",other:"arredor de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"máis dun ano",other:"máis de {{count}} anos"},almostXYears:{one:"case un ano",other:"case {{count}} anos"}},Jv={date:ef({formats:{full:"EEEE, d 'de' MMMM y",long:"d 'de' MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'ás' {{time}}",long:"{{date}} 'ás' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Qv={lastWeek:"'o' eeee 'pasado á' LT",yesterday:"'onte á' p",today:"'hoxe á' p",tomorrow:"'mañá á' p",nextWeek:"eeee 'á' p",other:"P"},Zv={lastWeek:"'o' eeee 'pasado ás' p",yesterday:"'onte ás' p",today:"'hoxe ás' p",tomorrow:"'mañá ás' p",nextWeek:"eeee 'ás' p",other:"P"},ey={code:"gl",formatDistance:(e,t,n)=>{let i;const a=qv[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"en "+i:"hai "+i:i},formatLong:Jv,formatRelative:(e,t,n,i)=>1!==t.getHours()?Zv[e]:Qv[e],localize:{ordinalNumber:(e,t)=>Number(e)+"º",era:af({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","despois de cristo"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["xan","feb","mar","abr","mai","xun","xul","ago","set","out","nov","dec"],wide:["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro"]},defaultWidth:"wide"}),day:af({values:{narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","me","xo","ve","sa"],abbreviated:["dom","lun","mar","mer","xov","ven","sab"],wide:["domingo","luns","martes","mércores","xoves","venres","sábado"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañá",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoite",noon:"mediodía",morning:"mañá",afternoon:"tarde",evening:"tardiña",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoite",noon:"mediodía",morning:"mañá",afternoon:"tarde",evening:"tardiña",night:"noite"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da mañá",afternoon:"da tarde",evening:"da tardiña",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoite",noon:"mediodía",morning:"da mañá",afternoon:"da tarde",evening:"da tardiña",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoite",noon:"mediodía",morning:"da mañá",afternoon:"da tarde",evening:"da tardiña",night:"da noite"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes da era com[uú]n|despois de cristo|era com[uú]n)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes da era com[uú]n)/i,/^(despois de cristo|era com[uú]n)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[xfmasond]/i,abbreviated:/^(xan|feb|mar|abr|mai|xun|xul|ago|set|out|nov|dec)/i,wide:/^(xaneiro|febreiro|marzo|abril|maio|xuño|xullo|agosto|setembro|outubro|novembro|decembro)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^x/i,/^f/i,/^m/i,/^a/i,/^m/i,/^x/i,/^x/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^xan/i,/^feb/i,/^mar/i,/^abr/i,/^mai/i,/^xun/i,/^xul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dec/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[dlmxvs]/i,short:/^(do|lu|ma|me|xo|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|xov|ven|sab)/i,wide:/^(domingo|luns|martes|m[eé]rcores|xoves|venres|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^x/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^me/i,/^xo/i,/^ve/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|mn|md|(da|[aá]s) (mañ[aá]|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|medianoite|mediod[ií]a|(da|[aá]s) (mañ[aá]|tarde|noite))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañ[aá]/i,afternoon:/tarde/i,evening:/tardiña/i,night:/noite/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},ty={lessThanXSeconds:{one:"હમણાં",other:"આશરે {{count}} સેકંડ"},xSeconds:{one:"1 સેકંડ",other:"{{count}} સેકંડ"},halfAMinute:"અડધી મિનિટ",lessThanXMinutes:{one:"આ મિનિટ",other:"આશરે {{count}} મિનિટ"},xMinutes:{one:"1 મિનિટ",other:"{{count}} મિનિટ"},aboutXHours:{one:"આશરે 1 કલાક",other:"આશરે {{count}} કલાક"},xHours:{one:"1 કલાક",other:"{{count}} કલાક"},xDays:{one:"1 દિવસ",other:"{{count}} દિવસ"},aboutXWeeks:{one:"આશરે 1 અઠવાડિયું",other:"આશરે {{count}} અઠવાડિયા"},xWeeks:{one:"1 અઠવાડિયું",other:"{{count}} અઠવાડિયા"},aboutXMonths:{one:"આશરે 1 મહિનો",other:"આશરે {{count}} મહિના"},xMonths:{one:"1 મહિનો",other:"{{count}} મહિના"},aboutXYears:{one:"આશરે 1 વર્ષ",other:"આશરે {{count}} વર્ષ"},xYears:{one:"1 વર્ષ",other:"{{count}} વર્ષ"},overXYears:{one:"1 વર્ષથી વધુ",other:"{{count}} વર્ષથી વધુ"},almostXYears:{one:"લગભગ 1 વર્ષ",other:"લગભગ {{count}} વર્ષ"}},ny={date:ef({formats:{full:"EEEE, d MMMM, y",long:"d MMMM, y",medium:"d MMM, y",short:"d/M/yy"},defaultWidth:"full"}),time:ef({formats:{full:"hh:mm:ss a zzzz",long:"hh:mm:ss a z",medium:"hh:mm:ss a",short:"hh:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},iy={lastWeek:"'પાછલા' eeee p",yesterday:"'ગઈકાલે' p",today:"'આજે' p",tomorrow:"'આવતીકાલે' p",nextWeek:"eeee p",other:"P"},ay={code:"gu",formatDistance:(e,t,n)=>{let i;const a=ty[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?i+"માં":i+" પહેલાં":i},formatLong:ny,formatRelative:(e,t,n,i)=>iy[e],localize:{ordinalNumber:(e,t)=>String(e),era:af({values:{narrow:["ઈસપૂ","ઈસ"],abbreviated:["ઈ.સ.પૂર્વે","ઈ.સ."],wide:["ઈસવીસન પૂર્વે","ઈસવીસન"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1લો ત્રિમાસ","2જો ત્રિમાસ","3જો ત્રિમાસ","4થો ત્રિમાસ"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["જા","ફે","મા","એ","મે","જૂ","જુ","ઓ","સ","ઓ","ન","ડિ"],abbreviated:["જાન્યુ","ફેબ્રુ","માર્ચ","એપ્રિલ","મે","જૂન","જુલાઈ","ઑગસ્ટ","સપ્ટે","ઓક્ટો","નવે","ડિસે"],wide:["જાન્યુઆરી","ફેબ્રુઆરી","માર્ચ","એપ્રિલ","મે","જૂન","જુલાઇ","ઓગસ્ટ","સપ્ટેમ્બર","ઓક્ટોબર","નવેમ્બર","ડિસેમ્બર"]},defaultWidth:"wide"}),day:af({values:{narrow:["ર","સો","મં","બુ","ગુ","શુ","શ"],short:["ર","સો","મં","બુ","ગુ","શુ","શ"],abbreviated:["રવિ","સોમ","મંગળ","બુધ","ગુરુ","શુક્ર","શનિ"],wide:["રવિવાર","સોમવાર","મંગળવાર","બુધવાર","ગુરુવાર","શુક્રવાર","શનિવાર"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"AM",pm:"PM",midnight:"મ.રાત્રિ",noon:"બ.",morning:"સવારે",afternoon:"બપોરે",evening:"સાંજે",night:"રાત્રે"},abbreviated:{am:"AM",pm:"PM",midnight:"મધ્યરાત્રિ",noon:"બપોરે",morning:"સવારે",afternoon:"બપોરે",evening:"સાંજે",night:"રાત્રે"},wide:{am:"AM",pm:"PM",midnight:"મધ્યરાત્રિ",noon:"બપોરે",morning:"સવારે",afternoon:"બપોરે",evening:"સાંજે",night:"રાત્રે"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"મ.રાત્રિ",noon:"બપોરે",morning:"સવારે",afternoon:"બપોરે",evening:"સાંજે",night:"રાત્રે"},abbreviated:{am:"AM",pm:"PM",midnight:"મધ્યરાત્રિ",noon:"બપોરે",morning:"સવારે",afternoon:"બપોરે",evening:"સાંજે",night:"રાત્રે"},wide:{am:"AM",pm:"PM",midnight:"મધ્યરાત્રિ",noon:"બપોરે",morning:"સવારે",afternoon:"બપોરે",evening:"સાંજે",night:"રાત્રે"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(લ|જ|થ|ઠ્ઠ|મ)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(ઈસપૂ|ઈસ)/i,abbreviated:/^(ઈ\.સ\.પૂર્વે|ઈ\.સ\.)/i,wide:/^(ઈસવીસન\sપૂર્વે|ઈસવીસન)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ઈસપૂ/i,/^ઈસ/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](લો|જો|થો)? ત્રિમાસ/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[જાફેમાએમેજૂજુઓસઓનડિ]/i,abbreviated:/^(જાન્યુ|ફેબ્રુ|માર્ચ|એપ્રિલ|મે|જૂન|જુલાઈ|ઑગસ્ટ|સપ્ટે|ઓક્ટો|નવે|ડિસે)/i,wide:/^(જાન્યુઆરી|ફેબ્રુઆરી|માર્ચ|એપ્રિલ|મે|જૂન|જુલાઇ|ઓગસ્ટ|સપ્ટેમ્બર|ઓક્ટોબર|નવેમ્બર|ડિસેમ્બર)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^જા/i,/^ફે/i,/^મા/i,/^એ/i,/^મે/i,/^જૂ/i,/^જુ/i,/^ઑગ/i,/^સ/i,/^ઓક્ટો/i,/^ન/i,/^ડિ/i],any:[/^જા/i,/^ફે/i,/^મા/i,/^એ/i,/^મે/i,/^જૂ/i,/^જુ/i,/^ઑગ/i,/^સ/i,/^ઓક્ટો/i,/^ન/i,/^ડિ/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^(ર|સો|મં|બુ|ગુ|શુ|શ)/i,short:/^(ર|સો|મં|બુ|ગુ|શુ|શ)/i,abbreviated:/^(રવિ|સોમ|મંગળ|બુધ|ગુરુ|શુક્ર|શનિ)/i,wide:/^(રવિવાર|સોમવાર|મંગળવાર|બુધવાર|ગુરુવાર|શુક્રવાર|શનિવાર)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ર/i,/^સો/i,/^મં/i,/^બુ/i,/^ગુ/i,/^શુ/i,/^શ/i],any:[/^ર/i,/^સો/i,/^મં/i,/^બુ/i,/^ગુ/i,/^શુ/i,/^શ/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|મ\.?|સ|બ|સાં|રા)/i,any:/^(a|p|મ\.?|સ|બ|સાં|રા)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^મ\.?/i,noon:/^બ/i,morning:/સ/i,afternoon:/બ/i,evening:/સાં/i,night:/રા/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},ry={lessThanXSeconds:{one:"פחות משנייה",two:"פחות משתי שניות",other:"פחות מ־{{count}} שניות"},xSeconds:{one:"שנייה",two:"שתי שניות",other:"{{count}} שניות"},halfAMinute:"חצי דקה",lessThanXMinutes:{one:"פחות מדקה",two:"פחות משתי דקות",other:"פחות מ־{{count}} דקות"},xMinutes:{one:"דקה",two:"שתי דקות",other:"{{count}} דקות"},aboutXHours:{one:"כשעה",two:"כשעתיים",other:"כ־{{count}} שעות"},xHours:{one:"שעה",two:"שעתיים",other:"{{count}} שעות"},xDays:{one:"יום",two:"יומיים",other:"{{count}} ימים"},aboutXWeeks:{one:"כשבוע",two:"כשבועיים",other:"כ־{{count}} שבועות"},xWeeks:{one:"שבוע",two:"שבועיים",other:"{{count}} שבועות"},aboutXMonths:{one:"כחודש",two:"כחודשיים",other:"כ־{{count}} חודשים"},xMonths:{one:"חודש",two:"חודשיים",other:"{{count}} חודשים"},aboutXYears:{one:"כשנה",two:"כשנתיים",other:"כ־{{count}} שנים"},xYears:{one:"שנה",two:"שנתיים",other:"{{count}} שנים"},overXYears:{one:"יותר משנה",two:"יותר משנתיים",other:"יותר מ־{{count}} שנים"},almostXYears:{one:"כמעט שנה",two:"כמעט שנתיים",other:"כמעט {{count}} שנים"}},oy={date:ef({formats:{full:"EEEE, d בMMMM y",long:"d בMMMM y",medium:"d בMMM y",short:"d.M.y"},defaultWidth:"full"}),time:ef({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'בשעה' {{time}}",long:"{{date}} 'בשעה' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},sy={lastWeek:"eeee 'שעבר בשעה' p",yesterday:"'אתמול בשעה' p",today:"'היום בשעה' p",tomorrow:"'מחר בשעה' p",nextWeek:"eeee 'בשעה' p",other:"P"},ly={ordinalNumber:(e,t)=>{const n=Number(e);if(n<=0||n>10)return String(n);const i=String(t?.unit),a=n-1;return["year","hour","minute","second"].indexOf(i)>=0?["ראשונה","שנייה","שלישית","רביעית","חמישית","שישית","שביעית","שמינית","תשיעית","עשירית"][a]:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שביעי","שמיני","תשיעי","עשירי"][a]},era:af({values:{narrow:["לפנה״ס","לספירה"],abbreviated:["לפנה״ס","לספירה"],wide:["לפני הספירה","לספירה"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["רבעון 1","רבעון 2","רבעון 3","רבעון 4"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["ינו׳","פבר׳","מרץ","אפר׳","מאי","יוני","יולי","אוג׳","ספט׳","אוק׳","נוב׳","דצמ׳"],wide:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"]},defaultWidth:"wide"}),day:af({values:{narrow:["א׳","ב׳","ג׳","ד׳","ה׳","ו׳","ש׳"],short:["א׳","ב׳","ג׳","ד׳","ה׳","ו׳","ש׳"],abbreviated:["יום א׳","יום ב׳","יום ג׳","יום ד׳","יום ה׳","יום ו׳","שבת"],wide:["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","יום שבת"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בוקר",afternoon:"אחר הצהריים",evening:"ערב",night:"לילה"},abbreviated:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בוקר",afternoon:"אחר הצהריים",evening:"ערב",night:"לילה"},wide:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בוקר",afternoon:"אחר הצהריים",evening:"ערב",night:"לילה"}},defaultWidth:"wide",formattingValues:{narrow:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בבוקר",afternoon:"בצהריים",evening:"בערב",night:"בלילה"},abbreviated:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בבוקר",afternoon:"אחר הצהריים",evening:"בערב",night:"בלילה"},wide:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בבוקר",afternoon:"אחר הצהריים",evening:"בערב",night:"בלילה"}},defaultFormattingWidth:"wide"})},dy=["רא","שנ","של","רב","ח","שי","שב","שמ","ת","ע"],uy={code:"he",formatDistance:(e,t,n)=>{if("xDays"===e&&n?.addSuffix&&t<=2)return n.comparison&&n.comparison>0?1===t?"מחר":"מחרתיים":1===t?"אתמול":"שלשום";let i;const a=ry[e];return i="string"==typeof a?a:1===t?a.one:2===t?a.two:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"בעוד "+i:"לפני "+i:i},formatLong:oy,formatRelative:(e,t,n,i)=>sy[e],localize:ly,match:{ordinalNumber:sf({matchPattern:/^(\d+|(ראשון|שני|שלישי|רביעי|חמישי|שישי|שביעי|שמיני|תשיעי|עשירי|ראשונה|שנייה|שלישית|רביעית|חמישית|שישית|שביעית|שמינית|תשיעית|עשירית))/i,parsePattern:/^(\d+|רא|שנ|של|רב|ח|שי|שב|שמ|ת|ע)/i,valueCallback:e=>{const t=parseInt(e,10);return isNaN(t)?dy.indexOf(e)+1:t}}),era:of({matchPatterns:{narrow:/^ל(ספירה|פנה״ס)/i,abbreviated:/^ל(ספירה|פנה״ס)/i,wide:/^ל(פני ה)?ספירה/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^לפ/i,/^לס/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^רבעון [1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^\d+/i,abbreviated:/^(ינו|פבר|מרץ|אפר|מאי|יוני|יולי|אוג|ספט|אוק|נוב|דצמ)׳?/i,wide:/^(ינואר|פברואר|מרץ|אפריל|מאי|יוני|יולי|אוגוסט|ספטמבר|אוקטובר|נובמבר|דצמבר)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^1$/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^7/i,/^8/i,/^9/i,/^10/i,/^11/i,/^12/i],any:[/^ינ/i,/^פ/i,/^מר/i,/^אפ/i,/^מא/i,/^יונ/i,/^יול/i,/^אוג/i,/^ס/i,/^אוק/i,/^נ/i,/^ד/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[אבגדהוש]׳/i,short:/^[אבגדהוש]׳/i,abbreviated:/^(שבת|יום (א|ב|ג|ד|ה|ו)׳)/i,wide:/^יום (ראשון|שני|שלישי|רביעי|חמישי|שישי|שבת)/i},defaultMatchWidth:"wide",parsePatterns:{abbreviated:[/א׳$/i,/ב׳$/i,/ג׳$/i,/ד׳$/i,/ה׳$/i,/ו׳$/i,/^ש/i],wide:[/ן$/i,/ני$/i,/לישי$/i,/עי$/i,/מישי$/i,/שישי$/i,/ת$/i],any:[/^א/i,/^ב/i,/^ג/i,/^ד/i,/^ה/i,/^ו/i,/^ש/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(אחר ה|ב)?(חצות|צהריים|בוקר|ערב|לילה|אחה״צ|לפנה״צ)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^לפ/i,pm:/^אחה/i,midnight:/^ח/i,noon:/^צ/i,morning:/בוקר/i,afternoon:/בצ|אחר/i,evening:/ערב/i,night:/לילה/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},cy={locale:{1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},number:{"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"}};function hy(e){return e.toString().replace(/\d/g,(function(e){return cy.locale[e]}))}const my={ordinalNumber:(e,t)=>hy(Number(e)),era:af({values:{narrow:["ईसा-पूर्व","ईस्वी"],abbreviated:["ईसा-पूर्व","ईस्वी"],wide:["ईसा-पूर्व","ईसवी सन"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["ति1","ति2","ति3","ति4"],wide:["पहली तिमाही","दूसरी तिमाही","तीसरी तिमाही","चौथी तिमाही"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["ज","फ़","मा","अ","मई","जू","जु","अग","सि","अक्टू","न","दि"],abbreviated:["जन","फ़र","मार्च","अप्रैल","मई","जून","जुल","अग","सित","अक्टू","नव","दिस"],wide:["जनवरी","फ़रवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितंबर","अक्टूबर","नवंबर","दिसंबर"]},defaultWidth:"wide"}),day:af({values:{narrow:["र","सो","मं","बु","गु","शु","श"],short:["र","सो","मं","बु","गु","शु","श"],abbreviated:["रवि","सोम","मंगल","बुध","गुरु","शुक्र","शनि"],wide:["रविवार","सोमवार","मंगलवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"पूर्वाह्न",pm:"अपराह्न",midnight:"मध्यरात्रि",noon:"दोपहर",morning:"सुबह",afternoon:"दोपहर",evening:"शाम",night:"रात"},abbreviated:{am:"पूर्वाह्न",pm:"अपराह्न",midnight:"मध्यरात्रि",noon:"दोपहर",morning:"सुबह",afternoon:"दोपहर",evening:"शाम",night:"रात"},wide:{am:"पूर्वाह्न",pm:"अपराह्न",midnight:"मध्यरात्रि",noon:"दोपहर",morning:"सुबह",afternoon:"दोपहर",evening:"शाम",night:"रात"}},defaultWidth:"wide",formattingValues:{narrow:{am:"पूर्वाह्न",pm:"अपराह्न",midnight:"मध्यरात्रि",noon:"दोपहर",morning:"सुबह",afternoon:"दोपहर",evening:"शाम",night:"रात"},abbreviated:{am:"पूर्वाह्न",pm:"अपराह्न",midnight:"मध्यरात्रि",noon:"दोपहर",morning:"सुबह",afternoon:"दोपहर",evening:"शाम",night:"रात"},wide:{am:"पूर्वाह्न",pm:"अपराह्न",midnight:"मध्यरात्रि",noon:"दोपहर",morning:"सुबह",afternoon:"दोपहर",evening:"शाम",night:"रात"}},defaultFormattingWidth:"wide"})},fy={lessThanXSeconds:{one:"१ सेकंड से कम",other:"{{count}} सेकंड से कम"},xSeconds:{one:"१ सेकंड",other:"{{count}} सेकंड"},halfAMinute:"आधा मिनट",lessThanXMinutes:{one:"१ मिनट से कम",other:"{{count}} मिनट से कम"},xMinutes:{one:"१ मिनट",other:"{{count}} मिनट"},aboutXHours:{one:"लगभग १ घंटा",other:"लगभग {{count}} घंटे"},xHours:{one:"१ घंटा",other:"{{count}} घंटे"},xDays:{one:"१ दिन",other:"{{count}} दिन"},aboutXWeeks:{one:"लगभग १ सप्ताह",other:"लगभग {{count}} सप्ताह"},xWeeks:{one:"१ सप्ताह",other:"{{count}} सप्ताह"},aboutXMonths:{one:"लगभग १ महीना",other:"लगभग {{count}} महीने"},xMonths:{one:"१ महीना",other:"{{count}} महीने"},aboutXYears:{one:"लगभग १ वर्ष",other:"लगभग {{count}} वर्ष"},xYears:{one:"१ वर्ष",other:"{{count}} वर्ष"},overXYears:{one:"१ वर्ष से अधिक",other:"{{count}} वर्ष से अधिक"},almostXYears:{one:"लगभग १ वर्ष",other:"लगभग {{count}} वर्ष"}},py={date:ef({formats:{full:"EEEE, do MMMM, y",long:"do MMMM, y",medium:"d MMM, y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'को' {{time}}",long:"{{date}} 'को' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},gy={lastWeek:"'पिछले' eeee p",yesterday:"'कल' p",today:"'आज' p",tomorrow:"'कल' p",nextWeek:"eeee 'को' p",other:"P"},vy={ordinalNumber:sf({matchPattern:/^[०१२३४५६७८९]+/i,parsePattern:/^[०१२३४५६७८९]+/i,valueCallback:function(e){const t=e.toString().replace(/[१२३४५६७८९०]/g,(function(e){return cy.number[e]}));return Number(t)}}),era:of({matchPatterns:{narrow:/^(ईसा-पूर्व|ईस्वी)/i,abbreviated:/^(ईसा\.?\s?पूर्व\.?|ईसा\.?)/i,wide:/^(ईसा-पूर्व|ईसवी पूर्व|ईसवी सन|ईसवी)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^ति[1234]/i,wide:/^[1234](पहली|दूसरी|तीसरी|चौथी)? तिमाही/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[जफ़माअप्मईजूनजुअगसिअक्तनदि]/i,abbreviated:/^(जन|फ़र|मार्च|अप्|मई|जून|जुल|अग|सित|अक्तू|नव|दिस)/i,wide:/^(जनवरी|फ़रवरी|मार्च|अप्रैल|मई|जून|जुलाई|अगस्त|सितंबर|अक्तूबर|नवंबर|दिसंबर)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ज/i,/^फ़/i,/^मा/i,/^अप्/i,/^मई/i,/^जू/i,/^जु/i,/^अग/i,/^सि/i,/^अक्तू/i,/^न/i,/^दि/i],any:[/^जन/i,/^फ़/i,/^मा/i,/^अप्/i,/^मई/i,/^जू/i,/^जु/i,/^अग/i,/^सि/i,/^अक्तू/i,/^नव/i,/^दिस/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[रविसोममंगलबुधगुरुशुक्रशनि]/i,short:/^(रवि|सोम|मंगल|बुध|गुरु|शुक्र|शनि)/i,abbreviated:/^(रवि|सोम|मंगल|बुध|गुरु|शुक्र|शनि)/i,wide:/^(रविवार|सोमवार|मंगलवार|बुधवार|गुरुवार|शुक्रवार|शनिवार)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^रवि/i,/^सोम/i,/^मंगल/i,/^बुध/i,/^गुरु/i,/^शुक्र/i,/^शनि/i],any:[/^रवि/i,/^सोम/i,/^मंगल/i,/^बुध/i,/^गुरु/i,/^शुक्र/i,/^शनि/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(पू|अ|म|द.\?|सु|दो|शा|रा)/i,any:/^(पूर्वाह्न|अपराह्न|म|द.\?|सु|दो|शा|रा)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^पूर्वाह्न/i,pm:/^अपराह्न/i,midnight:/^मध्य/i,noon:/^दो/i,morning:/सु/i,afternoon:/दो/i,evening:/शा/i,night:/रा/i}},defaultParseWidth:"any"})},yy={code:"hi",formatDistance:(e,t,n)=>{let i;const a=fy[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",hy(t)),n?.addSuffix?n.comparison&&n.comparison>0?i+"मे ":i+" पहले":i},formatLong:py,formatRelative:(e,t,n,i)=>gy[e],localize:my,match:vy,options:{weekStartsOn:0,firstWeekContainsDate:4}},wy={lessThanXSeconds:{one:{standalone:"manje od 1 sekunde",withPrepositionAgo:"manje od 1 sekunde",withPrepositionIn:"manje od 1 sekundu"},dual:"manje od {{count}} sekunde",other:"manje od {{count}} sekundi"},xSeconds:{one:{standalone:"1 sekunda",withPrepositionAgo:"1 sekunde",withPrepositionIn:"1 sekundu"},dual:"{{count}} sekunde",other:"{{count}} sekundi"},halfAMinute:"pola minute",lessThanXMinutes:{one:{standalone:"manje od 1 minute",withPrepositionAgo:"manje od 1 minute",withPrepositionIn:"manje od 1 minutu"},dual:"manje od {{count}} minute",other:"manje od {{count}} minuta"},xMinutes:{one:{standalone:"1 minuta",withPrepositionAgo:"1 minute",withPrepositionIn:"1 minutu"},dual:"{{count}} minute",other:"{{count}} minuta"},aboutXHours:{one:{standalone:"oko 1 sat",withPrepositionAgo:"oko 1 sat",withPrepositionIn:"oko 1 sat"},dual:"oko {{count}} sata",other:"oko {{count}} sati"},xHours:{one:{standalone:"1 sat",withPrepositionAgo:"1 sat",withPrepositionIn:"1 sat"},dual:"{{count}} sata",other:"{{count}} sati"},xDays:{one:{standalone:"1 dan",withPrepositionAgo:"1 dan",withPrepositionIn:"1 dan"},dual:"{{count}} dana",other:"{{count}} dana"},aboutXWeeks:{one:{standalone:"oko 1 tjedan",withPrepositionAgo:"oko 1 tjedan",withPrepositionIn:"oko 1 tjedan"},dual:"oko {{count}} tjedna",other:"oko {{count}} tjedana"},xWeeks:{one:{standalone:"1 tjedan",withPrepositionAgo:"1 tjedan",withPrepositionIn:"1 tjedan"},dual:"{{count}} tjedna",other:"{{count}} tjedana"},aboutXMonths:{one:{standalone:"oko 1 mjesec",withPrepositionAgo:"oko 1 mjesec",withPrepositionIn:"oko 1 mjesec"},dual:"oko {{count}} mjeseca",other:"oko {{count}} mjeseci"},xMonths:{one:{standalone:"1 mjesec",withPrepositionAgo:"1 mjesec",withPrepositionIn:"1 mjesec"},dual:"{{count}} mjeseca",other:"{{count}} mjeseci"},aboutXYears:{one:{standalone:"oko 1 godinu",withPrepositionAgo:"oko 1 godinu",withPrepositionIn:"oko 1 godinu"},dual:"oko {{count}} godine",other:"oko {{count}} godina"},xYears:{one:{standalone:"1 godina",withPrepositionAgo:"1 godine",withPrepositionIn:"1 godinu"},dual:"{{count}} godine",other:"{{count}} godina"},overXYears:{one:{standalone:"preko 1 godinu",withPrepositionAgo:"preko 1 godinu",withPrepositionIn:"preko 1 godinu"},dual:"preko {{count}} godine",other:"preko {{count}} godina"},almostXYears:{one:{standalone:"gotovo 1 godinu",withPrepositionAgo:"gotovo 1 godinu",withPrepositionIn:"gotovo 1 godinu"},dual:"gotovo {{count}} godine",other:"gotovo {{count}} godina"}},by={date:ef({formats:{full:"EEEE, d. MMMM y.",long:"d. MMMM y.",medium:"d. MMM y.",short:"dd. MM. y."},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss (zzzz)",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'u' {{time}}",long:"{{date}} 'u' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},ky={lastWeek:e=>{switch(e.getDay()){case 0:return"'prošlu nedjelju u' p";case 3:return"'prošlu srijedu u' p";case 6:return"'prošlu subotu u' p";default:return"'prošli' EEEE 'u' p"}},yesterday:"'jučer u' p",today:"'danas u' p",tomorrow:"'sutra u' p",nextWeek:e=>{switch(e.getDay()){case 0:return"'iduću nedjelju u' p";case 3:return"'iduću srijedu u' p";case 6:return"'iduću subotu u' p";default:return"'prošli' EEEE 'u' p"}},other:"P"},Sy={code:"hr",formatDistance:(e,t,n)=>{let i;const a=wy[e];return i="string"==typeof a?a:1===t?n?.addSuffix?n.comparison&&n.comparison>0?a.one.withPrepositionIn:a.one.withPrepositionAgo:a.one.standalone:t%10>1&&t%10<5&&"1"!==String(t).substr(-2,1)?a.dual.replace("{{count}}",String(t)):a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"za "+i:"prije "+i:i},formatLong:by,formatRelative:(e,t,n,i)=>{const a=ky[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["pr.n.e.","AD"],abbreviated:["pr. Kr.","po. Kr."],wide:["Prije Krista","Poslije Krista"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1.","2.","3.","4."],abbreviated:["1. kv.","2. kv.","3. kv.","4. kv."],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["sij","velj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro"],wide:["siječanj","veljača","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac"]},defaultWidth:"wide",formattingValues:{narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["sij","velj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro"],wide:["siječnja","veljače","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["N","P","U","S","Č","P","S"],short:["ned","pon","uto","sri","čet","pet","sub"],abbreviated:["ned","pon","uto","sri","čet","pet","sub"],wide:["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutro",afternoon:"popodne",evening:"navečer",night:"noću"},abbreviated:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutro",afternoon:"popodne",evening:"navečer",night:"noću"},wide:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutro",afternoon:"poslije podne",evening:"navečer",night:"noću"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutro",afternoon:"popodne",evening:"navečer",night:"noću"},abbreviated:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutro",afternoon:"popodne",evening:"navečer",night:"noću"},wide:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutro",afternoon:"poslije podne",evening:"navečer",night:"noću"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(pr\.n\.e\.|AD)/i,abbreviated:/^(pr\.\s?Kr\.|po\.\s?Kr\.)/i,wide:/^(Prije Krista|prije nove ere|Poslije Krista|nova era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^pr/i,/^(po|nova)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]\.\s?kv\.?/i,wide:/^[1234]\. kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(10|11|12|[123456789])\./i,abbreviated:/^(sij|velj|(ožu|ozu)|tra|svi|lip|srp|kol|ruj|lis|stu|pro)/i,wide:/^((siječanj|siječnja|sijecanj|sijecnja)|(veljača|veljače|veljaca|veljace)|(ožujak|ožujka|ozujak|ozujka)|(travanj|travnja)|(svibanj|svibnja)|(lipanj|lipnja)|(srpanj|srpnja)|(kolovoz|kolovoza)|(rujan|rujna)|(listopad|listopada)|(studeni|studenog)|(prosinac|prosinca))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/1/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i,/8/i,/9/i,/10/i,/11/i,/12/i],abbreviated:[/^sij/i,/^velj/i,/^(ožu|ozu)/i,/^tra/i,/^svi/i,/^lip/i,/^srp/i,/^kol/i,/^ruj/i,/^lis/i,/^stu/i,/^pro/i],wide:[/^sij/i,/^velj/i,/^(ožu|ozu)/i,/^tra/i,/^svi/i,/^lip/i,/^srp/i,/^kol/i,/^ruj/i,/^lis/i,/^stu/i,/^pro/i]},defaultParseWidth:"wide"}),day:of({matchPatterns:{narrow:/^[npusčc]/i,short:/^(ned|pon|uto|sri|(čet|cet)|pet|sub)/i,abbreviated:/^(ned|pon|uto|sri|(čet|cet)|pet|sub)/i,wide:/^(nedjelja|ponedjeljak|utorak|srijeda|(četvrtak|cetvrtak)|petak|subota)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(am|pm|ponoc|ponoć|(po)?podne|navecer|navečer|noću|poslije podne|ujutro)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^pono/i,noon:/^pod/i,morning:/jutro/i,afternoon:/(poslije\s|po)+podne/i,evening:/(navece|naveče)/i,night:/(nocu|noću)/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},My={lessThanXSeconds:{one:"mwens pase yon segond",other:"mwens pase {{count}} segond"},xSeconds:{one:"1 segond",other:"{{count}} segond"},halfAMinute:"30 segond",lessThanXMinutes:{one:"mwens pase yon minit",other:"mwens pase {{count}} minit"},xMinutes:{one:"1 minit",other:"{{count}} minit"},aboutXHours:{one:"anviwon inè",other:"anviwon {{count}} è"},xHours:{one:"1 lè",other:"{{count}} lè"},xDays:{one:"1 jou",other:"{{count}} jou"},aboutXWeeks:{one:"anviwon 1 semèn",other:"anviwon {{count}} semèn"},xWeeks:{one:"1 semèn",other:"{{count}} semèn"},aboutXMonths:{one:"anviwon 1 mwa",other:"anviwon {{count}} mwa"},xMonths:{one:"1 mwa",other:"{{count}} mwa"},aboutXYears:{one:"anviwon 1 an",other:"anviwon {{count}} an"},xYears:{one:"1 an",other:"{{count}} an"},overXYears:{one:"plis pase 1 an",other:"plis pase {{count}} an"},almostXYears:{one:"prèske 1 an",other:"prèske {{count}} an"}},Ey={date:ef({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'nan lè' {{time}}",long:"{{date}} 'nan lè' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ty={lastWeek:"eeee 'pase nan lè' p",yesterday:"'yè nan lè' p",today:"'jodi a' p",tomorrow:"'demen nan lè' p'",nextWeek:"eeee 'pwochen nan lè' p",other:"P"},Py={code:"ht",formatDistance:(e,t,n)=>{let i;const a=My[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"nan "+i:"sa fè "+i:i},formatLong:Ey,formatRelative:(e,t,n,i)=>Ty[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e);if(0===n)return String(n);return n+(1===n?"ye":"yèm")},era:af({values:{narrow:["av. J.-K","ap. J.-K"],abbreviated:["av. J.-K","ap. J.-K"],wide:["anvan Jezi Kris","apre Jezi Kris"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["T1","T2","T3","T4"],abbreviated:["1ye trim.","2yèm trim.","3yèm trim.","4yèm trim."],wide:["1ye trimès","2yèm trimès","3yèm trimès","4yèm trimès"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","F","M","A","M","J","J","O","S","O","N","D"],abbreviated:["janv.","fevr.","mas","avr.","me","jen","jiyè","out","sept.","okt.","nov.","des."],wide:["janvye","fevrye","mas","avril","me","jen","jiyè","out","septanm","oktòb","novanm","desanm"]},defaultWidth:"wide"}),day:af({values:{narrow:["D","L","M","M","J","V","S"],short:["di","le","ma","mè","je","va","sa"],abbreviated:["dim.","len.","mad.","mèk.","jed.","van.","sam."],wide:["dimanch","lendi","madi","mèkredi","jedi","vandredi","samdi"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"AM",pm:"PM",midnight:"minwit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"swa",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minwit",noon:"midi",morning:"maten",afternoon:"aprèmidi",evening:"swa",night:"maten"},wide:{am:"AM",pm:"PM",midnight:"minwit",noon:"midi",morning:"nan maten",afternoon:"nan aprèmidi",evening:"nan aswè",night:"nan maten"}},defaultWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(ye|yèm)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(av\.J\.K|ap\.J\.K|ap\.J\.-K)/i,abbreviated:/^(av\.J\.-K|av\.J-K|apr\.J\.-K|apr\.J-K|ap\.J-K)/i,wide:/^(avan Jezi Kris|apre Jezi Kris)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^av/i,/^ap/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](ye|yèm)? trimès/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(janv|fevr|mas|avr|me|jen|jiyè|out|sept|okt|nov|des)\.?/i,wide:/^(janvye|fevrye|mas|avril|me|jen|jiyè|out|septanm|oktòb|novanm|desanm)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^o/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^av/i,/^me/i,/^je/i,/^ji/i,/^ou/i,/^s/i,/^ok/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[lmjvsd]/i,short:/^(di|le|ma|me|je|va|sa)/i,abbreviated:/^(dim|len|mad|mèk|jed|van|sam)\.?/i,wide:/^(dimanch|lendi|madi|mèkredi|jedi|vandredi|samdi)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^le/i,/^ma/i,/^mè/i,/^je/i,/^va/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|minwit|midi|mat\.?|ap\.?m\.?|swa)/i,any:/^([ap]\.?\s?m\.?|nan maten|nan aprèmidi|nan aswè)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/sw/i,night:/nwit/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Ay={about:"körülbelül",over:"több mint",almost:"majdnem",lessthan:"kevesebb mint"},xy={xseconds:" másodperc",halfaminute:"fél perc",xminutes:" perc",xhours:" óra",xdays:" nap",xweeks:" hét",xmonths:" hónap",xyears:" év"},_y={xseconds:{"-1":" másodperccel ezelőtt",1:" másodperc múlva",0:" másodperce"},halfaminute:{"-1":"fél perccel ezelőtt",1:"fél perc múlva",0:"fél perce"},xminutes:{"-1":" perccel ezelőtt",1:" perc múlva",0:" perce"},xhours:{"-1":" órával ezelőtt",1:" óra múlva",0:" órája"},xdays:{"-1":" nappal ezelőtt",1:" nap múlva",0:" napja"},xweeks:{"-1":" héttel ezelőtt",1:" hét múlva",0:" hete"},xmonths:{"-1":" hónappal ezelőtt",1:" hónap múlva",0:" hónapja"},xyears:{"-1":" évvel ezelőtt",1:" év múlva",0:" éve"}},Cy={date:ef({formats:{full:"y. MMMM d., EEEE",long:"y. MMMM d.",medium:"y. MMM d.",short:"y. MM. dd."},defaultWidth:"full"}),time:ef({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Ly=["vasárnap","hétfőn","kedden","szerdán","csütörtökön","pénteken","szombaton"];function Iy(e){return t=>{const n=Ly[t.getDay()];return`${e?"":"'múlt' "}'${n}' p'-kor'`}}const Dy={lastWeek:Iy(!1),yesterday:"'tegnap' p'-kor'",today:"'ma' p'-kor'",tomorrow:"'holnap' p'-kor'",nextWeek:Iy(!0),other:"P"},Ry={code:"hu",formatDistance:(e,t,n)=>{const i=e.match(/about|over|almost|lessthan/i),a=i?e.replace(i[0],""):e,r=!0===n?.addSuffix,o=a.toLowerCase(),s=r?_y[o][n?.comparison||0]:xy[o];let l="halfaminute"===o?s:t+s;if(i){const e=i[0].toLowerCase();l=Ay[e]+" "+l}return l},formatLong:Cy,formatRelative:(e,t)=>{const n=Dy[e];return"function"==typeof n?n(t):n},localize:{ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["ie.","isz."],abbreviated:["i. e.","i. sz."],wide:["Krisztus előtt","időszámításunk szerint"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1.","2.","3.","4."],abbreviated:["1. n.év","2. n.év","3. n.év","4. n.év"],wide:["1. negyedév","2. negyedév","3. negyedév","4. negyedév"]},defaultWidth:"wide",argumentCallback:e=>e-1,formattingValues:{narrow:["I.","II.","III.","IV."],abbreviated:["I. n.év","II. n.év","III. n.év","IV. n.év"],wide:["I. negyedév","II. negyedév","III. negyedév","IV. negyedév"]},defaultFormattingWidth:"wide"}),month:af({values:{narrow:["J","F","M","Á","M","J","J","A","Sz","O","N","D"],abbreviated:["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec."],wide:["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"]},defaultWidth:"wide"}),day:af({values:{narrow:["V","H","K","Sz","Cs","P","Sz"],short:["V","H","K","Sze","Cs","P","Szo"],abbreviated:["V","H","K","Sze","Cs","P","Szo"],wide:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"de.",pm:"du.",midnight:"éjfél",noon:"dél",morning:"reggel",afternoon:"du.",evening:"este",night:"éjjel"},abbreviated:{am:"de.",pm:"du.",midnight:"éjfél",noon:"dél",morning:"reggel",afternoon:"du.",evening:"este",night:"éjjel"},wide:{am:"de.",pm:"du.",midnight:"éjfél",noon:"dél",morning:"reggel",afternoon:"délután",evening:"este",night:"éjjel"}},defaultWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(ie\.|isz\.)/i,abbreviated:/^(i\.\s?e\.?|b?\s?c\s?e|i\.\s?sz\.?)/i,wide:/^(Krisztus előtt|időszámításunk előtt|időszámításunk szerint|i\. sz\.)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/ie/i,/isz/i],abbreviated:[/^(i\.?\s?e\.?|b\s?ce)/i,/^(i\.?\s?sz\.?|c\s?e)/i],any:[/előtt/i,/(szerint|i. sz.)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]\.?/i,abbreviated:/^[1234]?\.?\s?n\.év/i,wide:/^([1234]|I|II|III|IV)?\.?\s?negyedév/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1|I$/i,/2|II$/i,/3|III/i,/4|IV/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmaásond]|sz/i,abbreviated:/^(jan\.?|febr\.?|márc\.?|ápr\.?|máj\.?|jún\.?|júl\.?|aug\.?|szept\.?|okt\.?|nov\.?|dec\.?)/i,wide:/^(január|február|március|április|május|június|július|augusztus|szeptember|október|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a|á/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s|sz/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^már/i,/^áp/i,/^máj/i,/^jún/i,/^júl/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^([vhkpc]|sz|cs|sz)/i,short:/^([vhkp]|sze|cs|szo)/i,abbreviated:/^([vhkp]|sze|cs|szo)/i,wide:/^(vasárnap|hétfő|kedd|szerda|csütörtök|péntek|szombat)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^v/i,/^h/i,/^k/i,/^sz/i,/^c/i,/^p/i,/^sz/i],any:[/^v/i,/^h/i,/^k/i,/^sze/i,/^c/i,/^p/i,/^szo/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^((de|du)\.?|éjfél|délután|dél|reggel|este|éjjel)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^de\.?/i,pm:/^du\.?/i,midnight:/^éjf/i,noon:/^dé/i,morning:/reg/i,afternoon:/^délu\.?/i,evening:/es/i,night:/éjj/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Wy={lessThanXSeconds:{one:"ավելի քիչ քան 1 վայրկյան",other:"ավելի քիչ քան {{count}} վայրկյան"},xSeconds:{one:"1 վայրկյան",other:"{{count}} վայրկյան"},halfAMinute:"կես րոպե",lessThanXMinutes:{one:"ավելի քիչ քան 1 րոպե",other:"ավելի քիչ քան {{count}} րոպե"},xMinutes:{one:"1 րոպե",other:"{{count}} րոպե"},aboutXHours:{one:"մոտ 1 ժամ",other:"մոտ {{count}} ժամ"},xHours:{one:"1 ժամ",other:"{{count}} ժամ"},xDays:{one:"1 օր",other:"{{count}} օր"},aboutXWeeks:{one:"մոտ 1 շաբաթ",other:"մոտ {{count}} շաբաթ"},xWeeks:{one:"1 շաբաթ",other:"{{count}} շաբաթ"},aboutXMonths:{one:"մոտ 1 ամիս",other:"մոտ {{count}} ամիս"},xMonths:{one:"1 ամիս",other:"{{count}} ամիս"},aboutXYears:{one:"մոտ 1 տարի",other:"մոտ {{count}} տարի"},xYears:{one:"1 տարի",other:"{{count}} տարի"},overXYears:{one:"ավելի քան 1 տարի",other:"ավելի քան {{count}} տարի"},almostXYears:{one:"համարյա 1 տարի",other:"համարյա {{count}} տարի"}},Ny={date:ef({formats:{full:"d MMMM, y, EEEE",long:"d MMMM, y",medium:"d MMM, y",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'ժ․'{{time}}",long:"{{date}} 'ժ․'{{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Oy={lastWeek:"'նախորդ' eeee p'֊ին'",yesterday:"'երեկ' p'֊ին'",today:"'այսօր' p'֊ին'",tomorrow:"'վաղը' p'֊ին'",nextWeek:"'հաջորդ' eeee p'֊ին'",other:"P"},Fy={code:"hy",formatDistance:(e,t,n)=>{let i;const a=Wy[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?i+" հետո":i+" առաջ":i},formatLong:Ny,formatRelative:(e,t,n,i)=>Oy[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),i=n%100;return i<10&&i%10==1?n+"֊ին":n+"֊րդ"},era:af({values:{narrow:["Ք","Մ"],abbreviated:["ՔԱ","ՄԹ"],wide:["Քրիստոսից առաջ","Մեր թվարկության"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Ք1","Ք2","Ք3","Ք4"],wide:["1֊ին քառորդ","2֊րդ քառորդ","3֊րդ քառորդ","4֊րդ քառորդ"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["Հ","Փ","Մ","Ա","Մ","Հ","Հ","Օ","Ս","Հ","Ն","Դ"],abbreviated:["հուն","փետ","մար","ապր","մայ","հուն","հուլ","օգս","սեպ","հոկ","նոյ","դեկ"],wide:["հունվար","փետրվար","մարտ","ապրիլ","մայիս","հունիս","հուլիս","օգոստոս","սեպտեմբեր","հոկտեմբեր","նոյեմբեր","դեկտեմբեր"]},defaultWidth:"wide"}),day:af({values:{narrow:["Կ","Ե","Ե","Չ","Հ","Ո","Շ"],short:["կր","եր","եք","չք","հգ","ուր","շբ"],abbreviated:["կիր","երկ","երք","չոր","հնգ","ուրբ","շաբ"],wide:["կիրակի","երկուշաբթի","երեքշաբթի","չորեքշաբթի","հինգշաբթի","ուրբաթ","շաբաթ"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"a",pm:"p",midnight:"կեսգշ",noon:"կեսօր",morning:"առավոտ",afternoon:"ցերեկ",evening:"երեկո",night:"գիշեր"},abbreviated:{am:"AM",pm:"PM",midnight:"կեսգիշեր",noon:"կեսօր",morning:"առավոտ",afternoon:"ցերեկ",evening:"երեկո",night:"գիշեր"},wide:{am:"a.m.",pm:"p.m.",midnight:"կեսգիշեր",noon:"կեսօր",morning:"առավոտ",afternoon:"ցերեկ",evening:"երեկո",night:"գիշեր"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"կեսգշ",noon:"կեսօր",morning:"առավոտը",afternoon:"ցերեկը",evening:"երեկոյան",night:"գիշերը"},abbreviated:{am:"AM",pm:"PM",midnight:"կեսգիշերին",noon:"կեսօրին",morning:"առավոտը",afternoon:"ցերեկը",evening:"երեկոյան",night:"գիշերը"},wide:{am:"a.m.",pm:"p.m.",midnight:"կեսգիշերին",noon:"կեսօրին",morning:"առավոտը",afternoon:"ցերեկը",evening:"երեկոյան",night:"գիշերը"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)((-|֊)?(ին|րդ))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(Ք|Մ)/i,abbreviated:/^(Ք\.?\s?Ա\.?|Մ\.?\s?Թ\.?\s?Ա\.?|Մ\.?\s?Թ\.?|Ք\.?\s?Հ\.?)/i,wide:/^(քրիստոսից առաջ|մեր թվարկությունից առաջ|մեր թվարկության|քրիստոսից հետո)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ք/i,/^մ/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^ք[1234]/i,wide:/^[1234]((-|֊)?(ին|րդ)) քառորդ/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[հփմաօսնդ]/i,abbreviated:/^(հուն|փետ|մար|ապր|մայ|հուն|հուլ|օգս|սեպ|հոկ|նոյ|դեկ)/i,wide:/^(հունվար|փետրվար|մարտ|ապրիլ|մայիս|հունիս|հուլիս|օգոստոս|սեպտեմբեր|հոկտեմբեր|նոյեմբեր|դեկտեմբեր)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^հ/i,/^փ/i,/^մ/i,/^ա/i,/^մ/i,/^հ/i,/^հ/i,/^օ/i,/^ս/i,/^հ/i,/^ն/i,/^դ/i],any:[/^հու/i,/^փ/i,/^մար/i,/^ա/i,/^մայ/i,/^հուն/i,/^հուլ/i,/^օ/i,/^ս/i,/^հոկ/i,/^ն/i,/^դ/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[եչհոշկ]/i,short:/^(կր|եր|եք|չք|հգ|ուր|շբ)/i,abbreviated:/^(կիր|երկ|երք|չոր|հնգ|ուրբ|շաբ)/i,wide:/^(կիրակի|երկուշաբթի|երեքշաբթի|չորեքշաբթի|հինգշաբթի|ուրբաթ|շաբաթ)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^կ/i,/^ե/i,/^ե/i,/^չ/i,/^հ/i,/^(ո|Ո)/,/^շ/i],short:[/^կ/i,/^եր/i,/^եք/i,/^չ/i,/^հ/i,/^(ո|Ո)/,/^շ/i],abbreviated:[/^կ/i,/^երկ/i,/^երք/i,/^չ/i,/^հ/i,/^(ո|Ո)/,/^շ/i],wide:[/^կ/i,/^երկ/i,/^երե/i,/^չ/i,/^հ/i,/^(ո|Ո)/,/^շ/i]},defaultParseWidth:"wide"}),dayPeriod:of({matchPatterns:{narrow:/^([ap]|կեսգշ|կեսօր|(առավոտը?|ցերեկը?|երեկո(յան)?|գիշերը?))/i,any:/^([ap]\.?\s?m\.?|կեսգիշեր(ին)?|կեսօր(ին)?|(առավոտը?|ցերեկը?|երեկո(յան)?|գիշերը?))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/կեսգիշեր/i,noon:/կեսօր/i,morning:/առավոտ/i,afternoon:/ցերեկ/i,evening:/երեկո/i,night:/գիշեր/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},jy={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},zy={date:ef({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},$y={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},Uy={code:"id",formatDistance:(e,t,n)=>{let i;const a=jy[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"dalam waktu "+i:i+" yang lalu":i},formatLong:zy,formatRelative:(e,t,n,i)=>$y[e],localize:{ordinalNumber:(e,t)=>"ke-"+Number(e),era:af({values:{narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},defaultWidth:"wide"}),day:af({values:{narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^ke-(\d+)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^s/i,/^(m|e)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Hy={lessThanXSeconds:{one:"minna en 1 sekúnda",other:"minna en {{count}} sekúndur"},xSeconds:{one:"1 sekúnda",other:"{{count}} sekúndur"},halfAMinute:"hálf mínúta",lessThanXMinutes:{one:"minna en 1 mínúta",other:"minna en {{count}} mínútur"},xMinutes:{one:"1 mínúta",other:"{{count}} mínútur"},aboutXHours:{one:"u.þ.b. 1 klukkustund",other:"u.þ.b. {{count}} klukkustundir"},xHours:{one:"1 klukkustund",other:"{{count}} klukkustundir"},xDays:{one:"1 dagur",other:"{{count}} dagar"},aboutXWeeks:{one:"um viku",other:"um {{count}} vikur"},xWeeks:{one:"1 viku",other:"{{count}} vikur"},aboutXMonths:{one:"u.þ.b. 1 mánuður",other:"u.þ.b. {{count}} mánuðir"},xMonths:{one:"1 mánuður",other:"{{count}} mánuðir"},aboutXYears:{one:"u.þ.b. 1 ár",other:"u.þ.b. {{count}} ár"},xYears:{one:"1 ár",other:"{{count}} ár"},overXYears:{one:"meira en 1 ár",other:"meira en {{count}} ár"},almostXYears:{one:"næstum 1 ár",other:"næstum {{count}} ár"}},By={date:ef({formats:{full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"d.MM.y"},defaultWidth:"full"}),time:ef({formats:{full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Gy={lastWeek:"'síðasta' dddd 'kl.' p",yesterday:"'í gær kl.' p",today:"'í dag kl.' p",tomorrow:"'á morgun kl.' p",nextWeek:"dddd 'kl.' p",other:"P"},Xy={code:"is",formatDistance:(e,t,n)=>{let i;const a=Hy[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"í "+i:i+" síðan":i},formatLong:By,formatRelative:(e,t,n,i)=>Gy[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["fyrir Krist","eftir Krist"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1F","2F","3F","4F"],wide:["1. fjórðungur","2. fjórðungur","3. fjórðungur","4. fjórðungur"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","F","M","A","M","J","J","Á","S","Ó","N","D"],abbreviated:["jan.","feb.","mars","apríl","maí","júní","júlí","ágúst","sept.","okt.","nóv.","des."],wide:["janúar","febrúar","mars","apríl","maí","júní","júlí","ágúst","september","október","nóvember","desember"]},defaultWidth:"wide"}),day:af({values:{narrow:["S","M","Þ","M","F","F","L"],short:["Su","Má","Þr","Mi","Fi","Fö","La"],abbreviated:["sun.","mán.","þri.","mið.","fim.","fös.","lau."],wide:["sunnudagur","mánudagur","þriðjudagur","miðvikudagur","fimmtudagur","föstudagur","laugardagur"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"f",pm:"e",midnight:"miðnætti",noon:"hádegi",morning:"morgunn",afternoon:"síðdegi",evening:"kvöld",night:"nótt"},abbreviated:{am:"f.h.",pm:"e.h.",midnight:"miðnætti",noon:"hádegi",morning:"morgunn",afternoon:"síðdegi",evening:"kvöld",night:"nótt"},wide:{am:"fyrir hádegi",pm:"eftir hádegi",midnight:"miðnætti",noon:"hádegi",morning:"morgunn",afternoon:"síðdegi",evening:"kvöld",night:"nótt"}},defaultWidth:"wide",formattingValues:{narrow:{am:"f",pm:"e",midnight:"á miðnætti",noon:"á hádegi",morning:"að morgni",afternoon:"síðdegis",evening:"um kvöld",night:"um nótt"},abbreviated:{am:"f.h.",pm:"e.h.",midnight:"á miðnætti",noon:"á hádegi",morning:"að morgni",afternoon:"síðdegis",evening:"um kvöld",night:"um nótt"},wide:{am:"fyrir hádegi",pm:"eftir hádegi",midnight:"á miðnætti",noon:"á hádegi",morning:"að morgni",afternoon:"síðdegis",evening:"um kvöld",night:"um nótt"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+(\.)?/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(f\.Kr\.|e\.Kr\.)/i,abbreviated:/^(f\.Kr\.|e\.Kr\.)/i,wide:/^(fyrir Krist|eftir Krist)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(f\.Kr\.)/i,/^(e\.Kr\.)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]\.?/i,abbreviated:/^q[1234]\.?/i,wide:/^[1234]\.? fjórðungur/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1\.?/i,/2\.?/i,/3\.?/i,/4\.?/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmásónd]/i,abbreviated:/^(jan\.|feb\.|mars\.|apríl\.|maí|júní|júlí|águst|sep\.|oct\.|nov\.|dec\.)/i,wide:/^(januar|febrúar|mars|apríl|maí|júní|júlí|águst|september|október|nóvember|desember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^á/i,/^s/i,/^ó/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maí/i,/^jún/i,/^júl/i,/^áu/i,/^s/i,/^ó/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|má|þr|mi|fi|fö|la)/i,abbreviated:/^(sun|mán|þri|mið|fim|fös|lau)\.?/i,wide:/^(sunnudagur|mánudagur|þriðjudagur|miðvikudagur|fimmtudagur|föstudagur|laugardagur)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^þ/i,/^m/i,/^f/i,/^f/i,/^l/i],any:[/^su/i,/^má/i,/^þr/i,/^mi/i,/^fi/i,/^fö/i,/^la/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(f|e|síðdegis|(á|að|um) (morgni|kvöld|nótt|miðnætti))/i,any:/^(fyrir hádegi|eftir hádegi|[ef]\.?h\.?|síðdegis|morgunn|(á|að|um) (morgni|kvöld|nótt|miðnætti))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^f/i,pm:/^e/i,midnight:/^mi/i,noon:/^há/i,morning:/morgunn/i,afternoon:/síðdegi/i,evening:/kvöld/i,night:/nótt/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Yy={lessThanXSeconds:{one:"meno di un secondo",other:"meno di {{count}} secondi"},xSeconds:{one:"un secondo",other:"{{count}} secondi"},halfAMinute:"alcuni secondi",lessThanXMinutes:{one:"meno di un minuto",other:"meno di {{count}} minuti"},xMinutes:{one:"un minuto",other:"{{count}} minuti"},aboutXHours:{one:"circa un'ora",other:"circa {{count}} ore"},xHours:{one:"un'ora",other:"{{count}} ore"},xDays:{one:"un giorno",other:"{{count}} giorni"},aboutXWeeks:{one:"circa una settimana",other:"circa {{count}} settimane"},xWeeks:{one:"una settimana",other:"{{count}} settimane"},aboutXMonths:{one:"circa un mese",other:"circa {{count}} mesi"},xMonths:{one:"un mese",other:"{{count}} mesi"},aboutXYears:{one:"circa un anno",other:"circa {{count}} anni"},xYears:{one:"un anno",other:"{{count}} anni"},overXYears:{one:"più di un anno",other:"più di {{count}} anni"},almostXYears:{one:"quasi un anno",other:"quasi {{count}} anni"}},Vy=(e,t,n)=>{let i;const a=Yy[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"tra "+i:i+" fa":i},Ky={date:ef({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},qy=["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"];function Jy(e){return"'"+qy[e]+" alle' p"}const Qy={lastWeek:(e,t,n)=>{const i=e.getDay();return Vf(e,t,n)?Jy(i):function(e){return 0===e?"'domenica scorsa alle' p":"'"+qy[e]+" scorso alle' p"}(i)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:(e,t,n)=>{const i=e.getDay();return Vf(e,t,n)?Jy(i):function(e){return 0===e?"'domenica prossima alle' p":"'"+qy[e]+" prossimo alle' p"}(i)},other:"P"},Zy=(e,t,n,i)=>{const a=Qy[e];return"function"==typeof a?a(t,n,i):a},ew={ordinalNumber:(e,t)=>{const n=Number(e);return String(n)},era:af({values:{narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["G","F","M","A","M","G","L","A","S","O","N","D"],abbreviated:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],wide:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]},defaultWidth:"wide"}),day:af({values:{narrow:["D","L","M","M","G","V","S"],short:["dom","lun","mar","mer","gio","ven","sab"],abbreviated:["dom","lun","mar","mer","gio","ven","sab"],wide:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"}},defaultWidth:"wide",formattingValues:{narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"}},defaultFormattingWidth:"wide"})},tw={ordinalNumber:sf({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(aC|dC)/i,abbreviated:/^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,wide:/^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^a/i,/^(d|e)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[gfmalsond]/i,abbreviated:/^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,wide:/^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^g/i,/^f/i,/^m/i,/^a/i,/^m/i,/^g/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ge/i,/^f/i,/^mar/i,/^ap/i,/^mag/i,/^gi/i,/^l/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[dlmgvs]/i,short:/^(do|lu|ma|me|gi|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|gio|ven|sab)/i,wide:/^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^g/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^g/i,/^v/i,/^s/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,any:/^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},defaultParseWidth:"any"})},nw={code:"it",formatDistance:Vy,formatLong:Ky,formatRelative:Zy,localize:ew,match:tw,options:{weekStartsOn:1,firstWeekContainsDate:4}},iw={code:"it-CH",formatDistance:Vy,formatLong:{date:ef({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},formatRelative:Zy,localize:ew,match:tw,options:{weekStartsOn:1,firstWeekContainsDate:4}},aw={lessThanXSeconds:{one:"1秒未満",other:"{{count}}秒未満",oneWithSuffix:"約1秒",otherWithSuffix:"約{{count}}秒"},xSeconds:{one:"1秒",other:"{{count}}秒"},halfAMinute:"30秒",lessThanXMinutes:{one:"1分未満",other:"{{count}}分未満",oneWithSuffix:"約1分",otherWithSuffix:"約{{count}}分"},xMinutes:{one:"1分",other:"{{count}}分"},aboutXHours:{one:"約1時間",other:"約{{count}}時間"},xHours:{one:"1時間",other:"{{count}}時間"},xDays:{one:"1日",other:"{{count}}日"},aboutXWeeks:{one:"約1週間",other:"約{{count}}週間"},xWeeks:{one:"1週間",other:"{{count}}週間"},aboutXMonths:{one:"約1か月",other:"約{{count}}か月"},xMonths:{one:"1か月",other:"{{count}}か月"},aboutXYears:{one:"約1年",other:"約{{count}}年"},xYears:{one:"1年",other:"{{count}}年"},overXYears:{one:"1年以上",other:"{{count}}年以上"},almostXYears:{one:"1年近く",other:"{{count}}年近く"}},rw={date:ef({formats:{full:"y年M月d日EEEE",long:"y年M月d日",medium:"y/MM/dd",short:"y/MM/dd"},defaultWidth:"full"}),time:ef({formats:{full:"H時mm分ss秒 zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},ow={lastWeek:"先週のeeeeのp",yesterday:"昨日のp",today:"今日のp",tomorrow:"明日のp",nextWeek:"翌週のeeeeのp",other:"P"},sw={code:"ja",formatDistance:(e,t,n)=>{let i;n=n||{};const a=aw[e];return i="string"==typeof a?a:1===t?n.addSuffix&&a.oneWithSuffix?a.oneWithSuffix:a.one:n.addSuffix&&a.otherWithSuffix?a.otherWithSuffix.replace("{{count}}",String(t)):a.other.replace("{{count}}",String(t)),n.addSuffix?n.comparison&&n.comparison>0?i+"後":i+"前":i},formatLong:rw,formatRelative:(e,t,n,i)=>ow[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e);switch(String(t?.unit)){case"year":return`${n}年`;case"quarter":return`第${n}四半期`;case"month":return`${n}月`;case"week":return`第${n}週`;case"date":return`${n}日`;case"hour":return`${n}時`;case"minute":return`${n}分`;case"second":return`${n}秒`;default:return`${n}`}},era:af({values:{narrow:["BC","AC"],abbreviated:["紀元前","西暦"],wide:["紀元前","西暦"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["第1四半期","第2四半期","第3四半期","第4四半期"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:af({values:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]},defaultWidth:"wide"}),day:af({values:{narrow:["日","月","火","水","木","金","土"],short:["日","月","火","水","木","金","土"],abbreviated:["日","月","火","水","木","金","土"],wide:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},abbreviated:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},wide:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"}},defaultWidth:"wide",formattingValues:{narrow:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},abbreviated:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},wide:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^第?\d+(年|四半期|月|週|日|時|分|秒)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:of({matchPatterns:{narrow:/^(B\.?C\.?|A\.?D\.?)/i,abbreviated:/^(紀元[前後]|西暦)/i,wide:/^(紀元[前後]|西暦)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^B/i,/^A/i],any:[/^(紀元前)/i,/^(西暦|紀元後)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^Q[1234]/i,wide:/^第[1234一二三四1234]四半期/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(1|一|1)/i,/(2|二|2)/i,/(3|三|3)/i,/(4|四|4)/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^([123456789]|1[012])/,abbreviated:/^([123456789]|1[012])月/i,wide:/^([123456789]|1[012])月/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^1\D/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[日月火水木金土]/,short:/^[日月火水木金土]/,abbreviated:/^[日月火水木金土]/,wide:/^[日月火水木金土]曜日/},defaultMatchWidth:"wide",parsePatterns:{any:[/^日/,/^月/,/^火/,/^水/,/^木/,/^金/,/^土/]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(AM|PM|午前|午後|正午|深夜|真夜中|夜|朝)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^(A|午前)/i,pm:/^(P|午後)/i,midnight:/^深夜|真夜中/i,noon:/^正午/i,morning:/^朝/i,afternoon:/^午後/i,evening:/^夜/i,night:/^深夜/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},lw={lessThanXSeconds:{one:"1びょうみまん",other:"{{count}}びょうみまん",oneWithSuffix:"やく1びょう",otherWithSuffix:"やく{{count}}びょう"},xSeconds:{one:"1びょう",other:"{{count}}びょう"},halfAMinute:"30びょう",lessThanXMinutes:{one:"1ぷんみまん",other:"{{count}}ふんみまん",oneWithSuffix:"やく1ぷん",otherWithSuffix:"やく{{count}}ふん"},xMinutes:{one:"1ぷん",other:"{{count}}ふん"},aboutXHours:{one:"やく1じかん",other:"やく{{count}}じかん"},xHours:{one:"1じかん",other:"{{count}}じかん"},xDays:{one:"1にち",other:"{{count}}にち"},aboutXWeeks:{one:"やく1しゅうかん",other:"やく{{count}}しゅうかん"},xWeeks:{one:"1しゅうかん",other:"{{count}}しゅうかん"},aboutXMonths:{one:"やく1かげつ",other:"やく{{count}}かげつ"},xMonths:{one:"1かげつ",other:"{{count}}かげつ"},aboutXYears:{one:"やく1ねん",other:"やく{{count}}ねん"},xYears:{one:"1ねん",other:"{{count}}ねん"},overXYears:{one:"1ねんいじょう",other:"{{count}}ねんいじょう"},almostXYears:{one:"1ねんちかく",other:"{{count}}ねんちかく"}},dw={date:ef({formats:{full:"yねんMがつdにちEEEE",long:"yねんMがつdにち",medium:"y/MM/dd",short:"y/MM/dd"},defaultWidth:"full"}),time:ef({formats:{full:"Hじmmふんssびょう zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},uw={lastWeek:"せんしゅうのeeeeのp",yesterday:"きのうのp",today:"きょうのp",tomorrow:"あしたのp",nextWeek:"よくしゅうのeeeeのp",other:"P"},cw={code:"ja-Hira",formatDistance:(e,t,n)=>{let i;n=n||{};const a=lw[e];return i="string"==typeof a?a:1===t?n.addSuffix&&a.oneWithSuffix?a.oneWithSuffix:a.one:n.addSuffix&&a.otherWithSuffix?a.otherWithSuffix.replace("{{count}}",String(t)):a.other.replace("{{count}}",String(t)),n.addSuffix?n.comparison&&n.comparison>0?i+"あと":i+"まえ":i},formatLong:dw,formatRelative:(e,t,n,i)=>uw[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e);switch(String(t?.unit)){case"year":return`${n}ねん`;case"quarter":return`だい${n}しはんき`;case"month":return`${n}がつ`;case"week":return`だい${n}しゅう`;case"date":return`${n}にち`;case"hour":return`${n}じ`;case"minute":return`${n}ふん`;case"second":return`${n}びょう`;default:return`${n}`}},era:af({values:{narrow:["BC","AC"],abbreviated:["きげんぜん","せいれき"],wide:["きげんぜん","せいれき"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["だい1しはんき","だい2しはんき","だい3しはんき","だい4しはんき"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:af({values:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1がつ","2がつ","3がつ","4がつ","5がつ","6がつ","7がつ","8がつ","9がつ","10がつ","11がつ","12がつ"],wide:["1がつ","2がつ","3がつ","4がつ","5がつ","6がつ","7がつ","8がつ","9がつ","10がつ","11がつ","12がつ"]},defaultWidth:"wide"}),day:af({values:{narrow:["にち","げつ","か","すい","もく","きん","ど"],short:["にち","げつ","か","すい","もく","きん","ど"],abbreviated:["にち","げつ","か","すい","もく","きん","ど"],wide:["にちようび","げつようび","かようび","すいようび","もくようび","きんようび","どようび"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ごぜん",pm:"ごご",midnight:"しんや",noon:"しょうご",morning:"あさ",afternoon:"ごご",evening:"よる",night:"しんや"},abbreviated:{am:"ごぜん",pm:"ごご",midnight:"しんや",noon:"しょうご",morning:"あさ",afternoon:"ごご",evening:"よる",night:"しんや"},wide:{am:"ごぜん",pm:"ごご",midnight:"しんや",noon:"しょうご",morning:"あさ",afternoon:"ごご",evening:"よる",night:"しんや"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ごぜん",pm:"ごご",midnight:"しんや",noon:"しょうご",morning:"あさ",afternoon:"ごご",evening:"よる",night:"しんや"},abbreviated:{am:"ごぜん",pm:"ごご",midnight:"しんや",noon:"しょうご",morning:"あさ",afternoon:"ごご",evening:"よる",night:"しんや"},wide:{am:"ごぜん",pm:"ごご",midnight:"しんや",noon:"しょうご",morning:"あさ",afternoon:"ごご",evening:"よる",night:"しんや"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^だ?い?\d+(ねん|しはんき|がつ|しゅう|にち|じ|ふん|びょう)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:of({matchPatterns:{narrow:/^(B\.?C\.?|A\.?D\.?)/i,abbreviated:/^(きげん[前後]|せいれき)/i,wide:/^(きげん[前後]|せいれき)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^B/i,/^A/i],any:[/^(きげんぜん)/i,/^(せいれき|きげんご)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^Q[1234]/i,wide:/^だい[1234一二三四1234]しはんき/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(1|一|1)/i,/(2|二|2)/i,/(3|三|3)/i,/(4|四|4)/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^([123456789]|1[012])/,abbreviated:/^([123456789]|1[012])がつ/i,wide:/^([123456789]|1[012])がつ/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^1\D/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^(にち|げつ|か|すい|もく|きん|ど)/,short:/^(にち|げつ|か|すい|もく|きん|ど)/,abbreviated:/^(にち|げつ|か|すい|もく|きん|ど)/,wide:/^(にち|げつ|か|すい|もく|きん|ど)ようび/},defaultMatchWidth:"wide",parsePatterns:{any:[/^にち/,/^げつ/,/^か/,/^すい/,/^もく/,/^きん/,/^ど/]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(AM|PM|ごぜん|ごご|しょうご|しんや|まよなか|よる|あさ)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^(A|ごぜん)/i,pm:/^(P|ごご)/i,midnight:/^しんや|まよなか/i,noon:/^しょうご/i,morning:/^あさ/i,afternoon:/^ごご/i,evening:/^よる/i,night:/^しんや/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},hw={lessThanXSeconds:{past:"{{count}} წამზე ნაკლები ხნის წინ",present:"{{count}} წამზე ნაკლები",future:"{{count}} წამზე ნაკლებში"},xSeconds:{past:"{{count}} წამის წინ",present:"{{count}} წამი",future:"{{count}} წამში"},halfAMinute:{past:"ნახევარი წუთის წინ",present:"ნახევარი წუთი",future:"ნახევარი წუთში"},lessThanXMinutes:{past:"{{count}} წუთზე ნაკლები ხნის წინ",present:"{{count}} წუთზე ნაკლები",future:"{{count}} წუთზე ნაკლებში"},xMinutes:{past:"{{count}} წუთის წინ",present:"{{count}} წუთი",future:"{{count}} წუთში"},aboutXHours:{past:"დაახლოებით {{count}} საათის წინ",present:"დაახლოებით {{count}} საათი",future:"დაახლოებით {{count}} საათში"},xHours:{past:"{{count}} საათის წინ",present:"{{count}} საათი",future:"{{count}} საათში"},xDays:{past:"{{count}} დღის წინ",present:"{{count}} დღე",future:"{{count}} დღეში"},aboutXWeeks:{past:"დაახლოებით {{count}} კვირას წინ",present:"დაახლოებით {{count}} კვირა",future:"დაახლოებით {{count}} კვირაში"},xWeeks:{past:"{{count}} კვირას კვირა",present:"{{count}} კვირა",future:"{{count}} კვირაში"},aboutXMonths:{past:"დაახლოებით {{count}} თვის წინ",present:"დაახლოებით {{count}} თვე",future:"დაახლოებით {{count}} თვეში"},xMonths:{past:"{{count}} თვის წინ",present:"{{count}} თვე",future:"{{count}} თვეში"},aboutXYears:{past:"დაახლოებით {{count}} წლის წინ",present:"დაახლოებით {{count}} წელი",future:"დაახლოებით {{count}} წელში"},xYears:{past:"{{count}} წლის წინ",present:"{{count}} წელი",future:"{{count}} წელში"},overXYears:{past:"{{count}} წელზე მეტი ხნის წინ",present:"{{count}} წელზე მეტი",future:"{{count}} წელზე მეტი ხნის შემდეგ"},almostXYears:{past:"თითქმის {{count}} წლის წინ",present:"თითქმის {{count}} წელი",future:"თითქმის {{count}} წელში"}},mw={date:ef({formats:{full:"EEEE, do MMMM, y",long:"do, MMMM, y",medium:"d, MMM, y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}'-ზე'",long:"{{date}} {{time}}'-ზე'",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},fw={lastWeek:"'წინა' eeee p'-ზე'",yesterday:"'გუშინ' p'-ზე'",today:"'დღეს' p'-ზე'",tomorrow:"'ხვალ' p'-ზე'",nextWeek:"'შემდეგი' eeee p'-ზე'",other:"P"},pw={code:"ka",formatDistance:(e,t,n)=>{let i;const a=hw[e];return i="string"==typeof a?a:n?.addSuffix&&n.comparison&&n.comparison>0?a.future.replace("{{count}}",String(t)):n?.addSuffix?a.past.replace("{{count}}",String(t)):a.present.replace("{{count}}",String(t)),i},formatLong:mw,formatRelative:(e,t,n,i)=>fw[e],localize:{ordinalNumber:e=>{const t=Number(e);return 1===t?t+"-ლი":t+"-ე"},era:af({values:{narrow:["ჩ.წ-მდე","ჩ.წ"],abbreviated:["ჩვ.წ-მდე","ჩვ.წ"],wide:["ჩვენს წელთაღრიცხვამდე","ჩვენი წელთაღრიცხვით"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1-ლი კვ","2-ე კვ","3-ე კვ","4-ე კვ"],wide:["1-ლი კვარტალი","2-ე კვარტალი","3-ე კვარტალი","4-ე კვარტალი"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["ია","თე","მა","აპ","მს","ვნ","ვლ","აგ","სე","ოქ","ნო","დე"],abbreviated:["იან","თებ","მარ","აპრ","მაი","ივნ","ივლ","აგვ","სექ","ოქტ","ნოე","დეკ"],wide:["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი"]},defaultWidth:"wide"}),day:af({values:{narrow:["კვ","ორ","სა","ოთ","ხუ","პა","შა"],short:["კვი","ორშ","სამ","ოთხ","ხუთ","პარ","შაბ"],abbreviated:["კვი","ორშ","სამ","ოთხ","ხუთ","პარ","შაბ"],wide:["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"a",pm:"p",midnight:"შუაღამე",noon:"შუადღე",morning:"დილა",afternoon:"საღამო",evening:"საღამო",night:"ღამე"},abbreviated:{am:"AM",pm:"PM",midnight:"შუაღამე",noon:"შუადღე",morning:"დილა",afternoon:"საღამო",evening:"საღამო",night:"ღამე"},wide:{am:"a.m.",pm:"p.m.",midnight:"შუაღამე",noon:"შუადღე",morning:"დილა",afternoon:"საღამო",evening:"საღამო",night:"ღამე"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"შუაღამით",noon:"შუადღისას",morning:"დილით",afternoon:"ნაშუადღევს",evening:"საღამოს",night:"ღამით"},abbreviated:{am:"AM",pm:"PM",midnight:"შუაღამით",noon:"შუადღისას",morning:"დილით",afternoon:"ნაშუადღევს",evening:"საღამოს",night:"ღამით"},wide:{am:"a.m.",pm:"p.m.",midnight:"შუაღამით",noon:"შუადღისას",morning:"დილით",afternoon:"ნაშუადღევს",evening:"საღამოს",night:"ღამით"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(-ლი|-ე)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(ჩვ?\.წ)/i,abbreviated:/^(ჩვ?\.წ)/i,wide:/^(ჩვენს წელთაღრიცხვამდე|ქრისტეშობამდე|ჩვენი წელთაღრიცხვით|ქრისტეშობიდან)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(ჩვენს წელთაღრიცხვამდე|ქრისტეშობამდე)/i,/^(ჩვენი წელთაღრიცხვით|ქრისტეშობიდან)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]-(ლი|ე)? კვ/i,wide:/^[1234]-(ლი|ე)? კვარტალი/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{any:/^(ია|თე|მა|აპ|მს|ვნ|ვლ|აგ|სე|ოქ|ნო|დე)/i},defaultMatchWidth:"any",parsePatterns:{any:[/^ია/i,/^თ/i,/^მარ/i,/^აპ/i,/^მაი/i,/^ი?ვნ/i,/^ი?ვლ/i,/^აგ/i,/^ს/i,/^ო/i,/^ნ/i,/^დ/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^(კვ|ორ|სა|ოთ|ხუ|პა|შა)/i,short:/^(კვი|ორშ|სამ|ოთხ|ხუთ|პარ|შაბ)/i,wide:/^(კვირა|ორშაბათი|სამშაბათი|ოთხშაბათი|ხუთშაბათი|პარასკევი|შაბათი)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^კვ/i,/^ორ/i,/^სა/i,/^ოთ/i,/^ხუ/i,/^პა/i,/^შა/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^([ap]\.?\s?m\.?|შუაღ|დილ)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^შუაღ/i,noon:/^შუადღ/i,morning:/^დილ/i,afternoon:/ნაშუადღევს/i,evening:/საღამო/i,night:/ღამ/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},gw={lessThanXSeconds:{regular:{one:"1 секундтан аз",singularNominative:"{{count}} секундтан аз",singularGenitive:"{{count}} секундтан аз",pluralGenitive:"{{count}} секундтан аз"},future:{one:"бір секундтан кейін",singularNominative:"{{count}} секундтан кейін",singularGenitive:"{{count}} секундтан кейін",pluralGenitive:"{{count}} секундтан кейін"}},xSeconds:{regular:{singularNominative:"{{count}} секунд",singularGenitive:"{{count}} секунд",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунд бұрын",singularGenitive:"{{count}} секунд бұрын",pluralGenitive:"{{count}} секунд бұрын"},future:{singularNominative:"{{count}} секундтан кейін",singularGenitive:"{{count}} секундтан кейін",pluralGenitive:"{{count}} секундтан кейін"}},halfAMinute:e=>e?.addSuffix?e.comparison&&e.comparison>0?"жарты минут ішінде":"жарты минут бұрын":"жарты минут",lessThanXMinutes:{regular:{one:"1 минуттан аз",singularNominative:"{{count}} минуттан аз",singularGenitive:"{{count}} минуттан аз",pluralGenitive:"{{count}} минуттан аз"},future:{one:"минуттан кем ",singularNominative:"{{count}} минуттан кем",singularGenitive:"{{count}} минуттан кем",pluralGenitive:"{{count}} минуттан кем"}},xMinutes:{regular:{singularNominative:"{{count}} минут",singularGenitive:"{{count}} минут",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минут бұрын",singularGenitive:"{{count}} минут бұрын",pluralGenitive:"{{count}} минут бұрын"},future:{singularNominative:"{{count}} минуттан кейін",singularGenitive:"{{count}} минуттан кейін",pluralGenitive:"{{count}} минуттан кейін"}},aboutXHours:{regular:{singularNominative:"шамамен {{count}} сағат",singularGenitive:"шамамен {{count}} сағат",pluralGenitive:"шамамен {{count}} сағат"},future:{singularNominative:"шамамен {{count}} сағаттан кейін",singularGenitive:"шамамен {{count}} сағаттан кейін",pluralGenitive:"шамамен {{count}} сағаттан кейін"}},xHours:{regular:{singularNominative:"{{count}} сағат",singularGenitive:"{{count}} сағат",pluralGenitive:"{{count}} сағат"}},xDays:{regular:{singularNominative:"{{count}} күн",singularGenitive:"{{count}} күн",pluralGenitive:"{{count}} күн"},future:{singularNominative:"{{count}} күннен кейін",singularGenitive:"{{count}} күннен кейін",pluralGenitive:"{{count}} күннен кейін"}},aboutXWeeks:{type:"weeks",one:"шамамен 1 апта",other:"шамамен {{count}} апта"},xWeeks:{type:"weeks",one:"1 апта",other:"{{count}} апта"},aboutXMonths:{regular:{singularNominative:"шамамен {{count}} ай",singularGenitive:"шамамен {{count}} ай",pluralGenitive:"шамамен {{count}} ай"},future:{singularNominative:"шамамен {{count}} айдан кейін",singularGenitive:"шамамен {{count}} айдан кейін",pluralGenitive:"шамамен {{count}} айдан кейін"}},xMonths:{regular:{singularNominative:"{{count}} ай",singularGenitive:"{{count}} ай",pluralGenitive:"{{count}} ай"}},aboutXYears:{regular:{singularNominative:"шамамен {{count}} жыл",singularGenitive:"шамамен {{count}} жыл",pluralGenitive:"шамамен {{count}} жыл"},future:{singularNominative:"шамамен {{count}} жылдан кейін",singularGenitive:"шамамен {{count}} жылдан кейін",pluralGenitive:"шамамен {{count}} жылдан кейін"}},xYears:{regular:{singularNominative:"{{count}} жыл",singularGenitive:"{{count}} жыл",pluralGenitive:"{{count}} жыл"},future:{singularNominative:"{{count}} жылдан кейін",singularGenitive:"{{count}} жылдан кейін",pluralGenitive:"{{count}} жылдан кейін"}},overXYears:{regular:{singularNominative:"{{count}} жылдан астам",singularGenitive:"{{count}} жылдан астам",pluralGenitive:"{{count}} жылдан астам"},future:{singularNominative:"{{count}} жылдан астам",singularGenitive:"{{count}} жылдан астам",pluralGenitive:"{{count}} жылдан астам"}},almostXYears:{regular:{singularNominative:"{{count}} жылға жақын",singularGenitive:"{{count}} жылға жақын",pluralGenitive:"{{count}} жылға жақын"},future:{singularNominative:"{{count}} жылдан кейін",singularGenitive:"{{count}} жылдан кейін",pluralGenitive:"{{count}} жылдан кейін"}}};function vw(e,t){if(e.one&&1===t)return e.one;const n=t%10,i=t%100;return 1===n&&11!==i?e.singularNominative.replace("{{count}}",String(t)):n>=2&&n<=4&&(i<10||i>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}const yw={date:ef({formats:{full:"EEEE, do MMMM y 'ж.'",long:"do MMMM y 'ж.'",medium:"d MMM y 'ж.'",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:ef({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},ww=["жексенбіде","дүйсенбіде","сейсенбіде","сәрсенбіде","бейсенбіде","жұмада","сенбіде"];function bw(e){return"'"+ww[e]+" сағат' p'-де'"}const kw={lastWeek:(e,t,n)=>{const i=e.getDay();return Vf(e,t,n)?bw(i):function(e){return"'өткен "+ww[e]+" сағат' p'-де'"}(i)},yesterday:"'кеше сағат' p'-де'",today:"'бүгін сағат' p'-де'",tomorrow:"'ертең сағат' p'-де'",nextWeek:(e,t,n)=>{const i=e.getDay();return Vf(e,t,n)?bw(i):function(e){return"'келесі "+ww[e]+" сағат' p'-де'"}(i)},other:"P"},Sw={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"},Mw={ordinalNumber:(e,t)=>{const n=Number(e),i=n>=100?100:null;return n+(Sw[n]||Sw[n%10]||i&&Sw[i]||"")},era:af({values:{narrow:["б.з.д.","б.з."],abbreviated:["б.з.д.","б.з."],wide:["біздің заманымызға дейін","біздің заманымыз"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1-ші тоқ.","2-ші тоқ.","3-ші тоқ.","4-ші тоқ."],wide:["1-ші тоқсан","2-ші тоқсан","3-ші тоқсан","4-ші тоқсан"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["Қ","А","Н","С","М","М","Ш","Т","Қ","Қ","Қ","Ж"],abbreviated:["қаң","ақп","нау","сәу","мам","мау","шіл","там","қыр","қаз","қар","жел"],wide:["қаңтар","ақпан","наурыз","сәуір","мамыр","маусым","шілде","тамыз","қыркүйек","қазан","қараша","желтоқсан"]},defaultWidth:"wide",formattingValues:{narrow:["Қ","А","Н","С","М","М","Ш","Т","Қ","Қ","Қ","Ж"],abbreviated:["қаң","ақп","нау","сәу","мам","мау","шіл","там","қыр","қаз","қар","жел"],wide:["қаңтар","ақпан","наурыз","сәуір","мамыр","маусым","шілде","тамыз","қыркүйек","қазан","қараша","желтоқсан"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["Ж","Д","С","С","Б","Ж","С"],short:["жс","дс","сс","ср","бс","жм","сб"],abbreviated:["жс","дс","сс","ср","бс","жм","сб"],wide:["жексенбі","дүйсенбі","сейсенбі","сәрсенбі","бейсенбі","жұма","сенбі"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ТД",pm:"ТК",midnight:"түн ортасы",noon:"түс",morning:"таң",afternoon:"күндіз",evening:"кеш",night:"түн"},wide:{am:"ТД",pm:"ТК",midnight:"түн ортасы",noon:"түс",morning:"таң",afternoon:"күндіз",evening:"кеш",night:"түн"}},defaultWidth:"any",formattingValues:{narrow:{am:"ТД",pm:"ТК",midnight:"түн ортасында",noon:"түс",morning:"таң",afternoon:"күн",evening:"кеш",night:"түн"},wide:{am:"ТД",pm:"ТК",midnight:"түн ортасында",noon:"түсте",morning:"таңертең",afternoon:"күндіз",evening:"кеште",night:"түнде"}},defaultFormattingWidth:"wide"})},Ew={code:"kk",formatDistance:(e,t,n)=>{const i=gw[e];return"function"==typeof i?i(n):"weeks"===i.type?1===t?i.one:i.other.replace("{{count}}",String(t)):n?.addSuffix?n.comparison&&n.comparison>0?i.future?vw(i.future,t):vw(i.regular,t)+" кейін":i.past?vw(i.past,t):vw(i.regular,t)+" бұрын":vw(i.regular,t)},formatLong:yw,formatRelative:(e,t,n,i)=>{const a=kw[e];return"function"==typeof a?a(t,n,i):a},localize:Mw,match:{ordinalNumber:sf({matchPattern:/^(\d+)(-?(ші|шы))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^((б )?з\.?\s?д\.?)/i,abbreviated:/^((б )?з\.?\s?д\.?)/i,wide:/^(біздің заманымызға дейін|біздің заманымыз|біздің заманымыздан)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^б/i,/^з/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?ші)? тоқ.?/i,wide:/^[1234](-?ші)? тоқсан/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(қ|а|н|с|м|мау|ш|т|қыр|қаз|қар|ж)/i,abbreviated:/^(қаң|ақп|нау|сәу|мам|мау|шіл|там|қыр|қаз|қар|жел)/i,wide:/^(қаңтар|ақпан|наурыз|сәуір|мамыр|маусым|шілде|тамыз|қыркүйек|қазан|қараша|желтоқсан)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^қ/i,/^а/i,/^н/i,/^с/i,/^м/i,/^м/i,/^ш/i,/^т/i,/^қ/i,/^қ/i,/^қ/i,/^ж/i],abbreviated:[/^қаң/i,/^ақп/i,/^нау/i,/^сәу/i,/^мам/i,/^мау/i,/^шіл/i,/^там/i,/^қыр/i,/^қаз/i,/^қар/i,/^жел/i],any:[/^қ/i,/^а/i,/^н/i,/^с/i,/^м/i,/^м/i,/^ш/i,/^т/i,/^қ/i,/^қ/i,/^қ/i,/^ж/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^(ж|д|с|с|б|ж|с)/i,short:/^(жс|дс|сс|ср|бс|жм|сб)/i,wide:/^(жексенбі|дүйсенбі|сейсенбі|сәрсенбі|бейсенбі|жұма|сенбі)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ж/i,/^д/i,/^с/i,/^с/i,/^б/i,/^ж/i,/^с/i],short:[/^жс/i,/^дс/i,/^сс/i,/^ср/i,/^бс/i,/^жм/i,/^сб/i],any:[/^ж[ек]/i,/^д[үй]/i,/^сe[й]/i,/^сә[р]/i,/^б[ей]/i,/^ж[ұм]/i,/^се[н]/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^Т\.?\s?[ДК]\.?|түн ортасында|((түсте|таңертең|таңда|таңертең|таңмен|таң|күндіз|күн|кеште|кеш|түнде|түн)\.?)/i,wide:/^Т\.?\s?[ДК]\.?|түн ортасында|((түсте|таңертең|таңда|таңертең|таңмен|таң|күндіз|күн|кеште|кеш|түнде|түн)\.?)/i,any:/^Т\.?\s?[ДК]\.?|түн ортасында|((түсте|таңертең|таңда|таңертең|таңмен|таң|күндіз|күн|кеште|кеш|түнде|түн)\.?)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^ТД/i,pm:/^ТК/i,midnight:/^түн орта/i,noon:/^күндіз/i,morning:/таң/i,afternoon:/түс/i,evening:/кеш/i,night:/түн/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Tw={lessThanXSeconds:"តិចជាង {{count}} វិនាទី",xSeconds:"{{count}} វិនាទី",halfAMinute:"កន្លះនាទី",lessThanXMinutes:"តិចជាង {{count}} នាទី",xMinutes:"{{count}} នាទី",aboutXHours:"ប្រហែល {{count}} ម៉ោង",xHours:"{{count}} ម៉ោង",xDays:"{{count}} ថ្ងៃ",aboutXWeeks:"ប្រហែល {{count}} សប្តាហ៍",xWeeks:"{{count}} សប្តាហ៍",aboutXMonths:"ប្រហែល {{count}} ខែ",xMonths:"{{count}} ខែ",aboutXYears:"ប្រហែល {{count}} ឆ្នាំ",xYears:"{{count}} ឆ្នាំ",overXYears:"ជាង {{count}} ឆ្នាំ",almostXYears:"ជិត {{count}} ឆ្នាំ"},Pw={date:ef({formats:{full:"EEEE do MMMM y",long:"do MMMM y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a",long:"h:mm:ss a",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'ម៉ោង' {{time}}",long:"{{date}} 'ម៉ោង' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Aw={lastWeek:"'ថ្ងៃ'eeee'សប្តាហ៍មុនម៉ោង' p",yesterday:"'ម្សិលមិញនៅម៉ោង' p",today:"'ថ្ងៃនេះម៉ោង' p",tomorrow:"'ថ្ងៃស្អែកម៉ោង' p",nextWeek:"'ថ្ងៃ'eeee'សប្តាហ៍ក្រោយម៉ោង' p",other:"P"},xw={code:"km",formatDistance:(e,t,n)=>{let i=Tw[e];return"number"==typeof t&&(i=i.replace("{{count}}",t.toString())),n?.addSuffix?n.comparison&&n.comparison>0?"ក្នុងរយៈពេល "+i:i+"មុន":i},formatLong:Pw,formatRelative:(e,t,n,i)=>Aw[e],localize:{ordinalNumber:(e,t)=>Number(e).toString(),era:af({values:{narrow:["ម.គស","គស"],abbreviated:["មុនគ.ស","គ.ស"],wide:["មុនគ្រិស្តសករាជ","នៃគ្រិស្តសករាជ"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["ត្រីមាសទី 1","ត្រីមាសទី 2","ត្រីមាសទី 3","ត្រីមាសទី 4"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["ម.ក","ក.ម","មិ","ម.ស","ឧ.ស","ម.ថ","ក.ដ","សី","កញ","តុ","វិ","ធ"],abbreviated:["មករា","កុម្ភៈ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"],wide:["មករា","កុម្ភៈ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"]},defaultWidth:"wide"}),day:af({values:{narrow:["អា","ច","អ","ព","ព្រ","សុ","ស"],short:["អា","ច","អ","ព","ព្រ","សុ","ស"],abbreviated:["អា","ច","អ","ព","ព្រ","សុ","ស"],wide:["អាទិត្យ","ចន្ទ","អង្គារ","ពុធ","ព្រហស្បតិ៍","សុក្រ","សៅរ៍"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ព្រឹក",pm:"ល្ងាច",midnight:"ពេលកណ្ដាលអធ្រាត្រ",noon:"ពេលថ្ងៃត្រង់",morning:"ពេលព្រឹក",afternoon:"ពេលរសៀល",evening:"ពេលល្ងាច",night:"ពេលយប់"},abbreviated:{am:"ព្រឹក",pm:"ល្ងាច",midnight:"ពេលកណ្ដាលអធ្រាត្រ",noon:"ពេលថ្ងៃត្រង់",morning:"ពេលព្រឹក",afternoon:"ពេលរសៀល",evening:"ពេលល្ងាច",night:"ពេលយប់"},wide:{am:"ព្រឹក",pm:"ល្ងាច",midnight:"ពេលកណ្ដាលអធ្រាត្រ",noon:"ពេលថ្ងៃត្រង់",morning:"ពេលព្រឹក",afternoon:"ពេលរសៀល",evening:"ពេលល្ងាច",night:"ពេលយប់"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ព្រឹក",pm:"ល្ងាច",midnight:"ពេលកណ្ដាលអធ្រាត្រ",noon:"ពេលថ្ងៃត្រង់",morning:"ពេលព្រឹក",afternoon:"ពេលរសៀល",evening:"ពេលល្ងាច",night:"ពេលយប់"},abbreviated:{am:"ព្រឹក",pm:"ល្ងាច",midnight:"ពេលកណ្ដាលអធ្រាត្រ",noon:"ពេលថ្ងៃត្រង់",morning:"ពេលព្រឹក",afternoon:"ពេលរសៀល",evening:"ពេលល្ងាច",night:"ពេលយប់"},wide:{am:"ព្រឹក",pm:"ល្ងាច",midnight:"ពេលកណ្ដាលអធ្រាត្រ",noon:"ពេលថ្ងៃត្រង់",morning:"ពេលព្រឹក",afternoon:"ពេលរសៀល",evening:"ពេលល្ងាច",night:"ពេលយប់"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:of({matchPatterns:{narrow:/^(ម\.)?គស/i,abbreviated:/^(មុន)?គ\.ស/i,wide:/^(មុន|នៃ)គ្រិស្តសករាជ/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(ម|មុន)គ\.?ស/i,/^(នៃ)?គ\.?ស/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^(ត្រីមាស)(ទី)?\s?[1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(ម\.ក|ក\.ម|មិ|ម\.ស|ឧ\.ស|ម\.ថ|ក\.ដ|សី|កញ|តុ|វិ|ធ)/i,abbreviated:/^(មករា|កុម្ភៈ|មីនា|មេសា|ឧសភា|មិថុនា|កក្កដា|សីហា|កញ្ញា|តុលា|វិច្ឆិកា|ធ្នូ)/i,wide:/^(មករា|កុម្ភៈ|មីនា|មេសា|ឧសភា|មិថុនា|កក្កដា|សីហា|កញ្ញា|តុលា|វិច្ឆិកា|ធ្នូ)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ម\.ក/i,/^ក\.ម/i,/^មិ/i,/^ម\.ស/i,/^ឧ\.ស/i,/^ម\.ថ/i,/^ក\.ដ/i,/^សី/i,/^កញ/i,/^តុ/i,/^វិ/i,/^ធ/i],any:[/^មក/i,/^កុ/i,/^មីន/i,/^មេ/i,/^ឧស/i,/^មិថ/i,/^កក/i,/^សី/i,/^កញ/i,/^តុ/i,/^វិច/i,/^ធ/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^(អា|ច|អ|ព|ព្រ|សុ|ស)/i,short:/^(អា|ច|អ|ព|ព្រ|សុ|ស)/i,abbreviated:/^(អា|ច|អ|ព|ព្រ|សុ|ស)/i,wide:/^(អាទិត្យ|ចន្ទ|អង្គារ|ពុធ|ព្រហស្បតិ៍|សុក្រ|សៅរ៍)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^អា/i,/^ច/i,/^អ/i,/^ព/i,/^ព្រ/i,/^សុ/i,/^ស/i],any:[/^អា/i,/^ច/i,/^អ/i,/^ព/i,/^ព្រ/i,/^សុ/i,/^សៅ/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(ព្រឹក|ល្ងាច|ពេលព្រឹក|ពេលថ្ងៃត្រង់|ពេលល្ងាច|ពេលរសៀល|ពេលយប់|ពេលកណ្ដាលអធ្រាត្រ)/i,any:/^(ព្រឹក|ល្ងាច|ពេលព្រឹក|ពេលថ្ងៃត្រង់|ពេលល្ងាច|ពេលរសៀល|ពេលយប់|ពេលកណ្ដាលអធ្រាត្រ)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ព្រឹក/i,pm:/^ល្ងាច/i,midnight:/^ពេលកណ្ដាលអធ្រាត្រ/i,noon:/^ពេលថ្ងៃត្រង់/i,morning:/ពេលព្រឹក/i,afternoon:/ពេលរសៀល/i,evening:/ពេលល្ងាច/i,night:/ពេលយប់/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},_w={lessThanXSeconds:{one:{default:"1 ಸೆಕೆಂಡ್ಗಿಂತ ಕಡಿಮೆ",future:"1 ಸೆಕೆಂಡ್ಗಿಂತ ಕಡಿಮೆ",past:"1 ಸೆಕೆಂಡ್ಗಿಂತ ಕಡಿಮೆ"},other:{default:"{{count}} ಸೆಕೆಂಡ್ಗಿಂತ ಕಡಿಮೆ",future:"{{count}} ಸೆಕೆಂಡ್ಗಿಂತ ಕಡಿಮೆ",past:"{{count}} ಸೆಕೆಂಡ್ಗಿಂತ ಕಡಿಮೆ"}},xSeconds:{one:{default:"1 ಸೆಕೆಂಡ್",future:"1 ಸೆಕೆಂಡ್ನಲ್ಲಿ",past:"1 ಸೆಕೆಂಡ್ ಹಿಂದೆ"},other:{default:"{{count}} ಸೆಕೆಂಡುಗಳು",future:"{{count}} ಸೆಕೆಂಡ್ಗಳಲ್ಲಿ",past:"{{count}} ಸೆಕೆಂಡ್ ಹಿಂದೆ"}},halfAMinute:{other:{default:"ಅರ್ಧ ನಿಮಿಷ",future:"ಅರ್ಧ ನಿಮಿಷದಲ್ಲಿ",past:"ಅರ್ಧ ನಿಮಿಷದ ಹಿಂದೆ"}},lessThanXMinutes:{one:{default:"1 ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",future:"1 ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",past:"1 ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ"},other:{default:"{{count}} ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",future:"{{count}} ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",past:"{{count}} ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ"}},xMinutes:{one:{default:"1 ನಿಮಿಷ",future:"1 ನಿಮಿಷದಲ್ಲಿ",past:"1 ನಿಮಿಷದ ಹಿಂದೆ"},other:{default:"{{count}} ನಿಮಿಷಗಳು",future:"{{count}} ನಿಮಿಷಗಳಲ್ಲಿ",past:"{{count}} ನಿಮಿಷಗಳ ಹಿಂದೆ"}},aboutXHours:{one:{default:"ಸುಮಾರು 1 ಗಂಟೆ",future:"ಸುಮಾರು 1 ಗಂಟೆಯಲ್ಲಿ",past:"ಸುಮಾರು 1 ಗಂಟೆ ಹಿಂದೆ"},other:{default:"ಸುಮಾರು {{count}} ಗಂಟೆಗಳು",future:"ಸುಮಾರು {{count}} ಗಂಟೆಗಳಲ್ಲಿ",past:"ಸುಮಾರು {{count}} ಗಂಟೆಗಳ ಹಿಂದೆ"}},xHours:{one:{default:"1 ಗಂಟೆ",future:"1 ಗಂಟೆಯಲ್ಲಿ",past:"1 ಗಂಟೆ ಹಿಂದೆ"},other:{default:"{{count}} ಗಂಟೆಗಳು",future:"{{count}} ಗಂಟೆಗಳಲ್ಲಿ",past:"{{count}} ಗಂಟೆಗಳ ಹಿಂದೆ"}},xDays:{one:{default:"1 ದಿನ",future:"1 ದಿನದಲ್ಲಿ",past:"1 ದಿನದ ಹಿಂದೆ"},other:{default:"{{count}} ದಿನಗಳು",future:"{{count}} ದಿನಗಳಲ್ಲಿ",past:"{{count}} ದಿನಗಳ ಹಿಂದೆ"}},aboutXMonths:{one:{default:"ಸುಮಾರು 1 ತಿಂಗಳು",future:"ಸುಮಾರು 1 ತಿಂಗಳಲ್ಲಿ",past:"ಸುಮಾರು 1 ತಿಂಗಳ ಹಿಂದೆ"},other:{default:"ಸುಮಾರು {{count}} ತಿಂಗಳು",future:"ಸುಮಾರು {{count}} ತಿಂಗಳುಗಳಲ್ಲಿ",past:"ಸುಮಾರು {{count}} ತಿಂಗಳುಗಳ ಹಿಂದೆ"}},xMonths:{one:{default:"1 ತಿಂಗಳು",future:"1 ತಿಂಗಳಲ್ಲಿ",past:"1 ತಿಂಗಳ ಹಿಂದೆ"},other:{default:"{{count}} ತಿಂಗಳು",future:"{{count}} ತಿಂಗಳುಗಳಲ್ಲಿ",past:"{{count}} ತಿಂಗಳುಗಳ ಹಿಂದೆ"}},aboutXYears:{one:{default:"ಸುಮಾರು 1 ವರ್ಷ",future:"ಸುಮಾರು 1 ವರ್ಷದಲ್ಲಿ",past:"ಸುಮಾರು 1 ವರ್ಷದ ಹಿಂದೆ"},other:{default:"ಸುಮಾರು {{count}} ವರ್ಷಗಳು",future:"ಸುಮಾರು {{count}} ವರ್ಷಗಳಲ್ಲಿ",past:"ಸುಮಾರು {{count}} ವರ್ಷಗಳ ಹಿಂದೆ"}},xYears:{one:{default:"1 ವರ್ಷ",future:"1 ವರ್ಷದಲ್ಲಿ",past:"1 ವರ್ಷದ ಹಿಂದೆ"},other:{default:"{{count}} ವರ್ಷಗಳು",future:"{{count}} ವರ್ಷಗಳಲ್ಲಿ",past:"{{count}} ವರ್ಷಗಳ ಹಿಂದೆ"}},overXYears:{one:{default:"1 ವರ್ಷದ ಮೇಲೆ",future:"1 ವರ್ಷದ ಮೇಲೆ",past:"1 ವರ್ಷದ ಮೇಲೆ"},other:{default:"{{count}} ವರ್ಷಗಳ ಮೇಲೆ",future:"{{count}} ವರ್ಷಗಳ ಮೇಲೆ",past:"{{count}} ವರ್ಷಗಳ ಮೇಲೆ"}},almostXYears:{one:{default:"ಬಹುತೇಕ 1 ವರ್ಷದಲ್ಲಿ",future:"ಬಹುತೇಕ 1 ವರ್ಷದಲ್ಲಿ",past:"ಬಹುತೇಕ 1 ವರ್ಷದಲ್ಲಿ"},other:{default:"ಬಹುತೇಕ {{count}} ವರ್ಷಗಳಲ್ಲಿ",future:"ಬಹುತೇಕ {{count}} ವರ್ಷಗಳಲ್ಲಿ",past:"ಬಹುತೇಕ {{count}} ವರ್ಷಗಳಲ್ಲಿ"}}};function Cw(e,t){return t?.addSuffix?t.comparison&&t.comparison>0?e.future:e.past:e.default}const Lw={date:ef({formats:{full:"EEEE, MMMM d, y",long:"MMMM d, y",medium:"MMM d, y",short:"d/M/yy"},defaultWidth:"full"}),time:ef({formats:{full:"hh:mm:ss a zzzz",long:"hh:mm:ss a z",medium:"hh:mm:ss a",short:"hh:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Iw={lastWeek:"'ಕಳೆದ' eeee p 'ಕ್ಕೆ'",yesterday:"'ನಿನ್ನೆ' p 'ಕ್ಕೆ'",today:"'ಇಂದು' p 'ಕ್ಕೆ'",tomorrow:"'ನಾಳೆ' p 'ಕ್ಕೆ'",nextWeek:"eeee p 'ಕ್ಕೆ'",other:"P"},Dw={code:"kn",formatDistance:(e,t,n)=>{let i;const a=_w[e];return i=a.one&&1===t?Cw(a.one,n):Cw(a.other,n),i.replace("{{count}}",String(t))},formatLong:Lw,formatRelative:(e,t,n,i)=>Iw[e],localize:{ordinalNumber:(e,t)=>Number(e)+"ನೇ",era:af({values:{narrow:["ಕ್ರಿ.ಪೂ","ಕ್ರಿ.ಶ"],abbreviated:["ಕ್ರಿ.ಪೂ","ಕ್ರಿ.ಶ"],wide:["ಕ್ರಿಸ್ತ ಪೂರ್ವ","ಕ್ರಿಸ್ತ ಶಕ"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["ತ್ರೈ 1","ತ್ರೈ 2","ತ್ರೈ 3","ತ್ರೈ 4"],wide:["1ನೇ ತ್ರೈಮಾಸಿಕ","2ನೇ ತ್ರೈಮಾಸಿಕ","3ನೇ ತ್ರೈಮಾಸಿಕ","4ನೇ ತ್ರೈಮಾಸಿಕ"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["ಜ","ಫೆ","ಮಾ","ಏ","ಮೇ","ಜೂ","ಜು","ಆ","ಸೆ","ಅ","ನ","ಡಿ"],abbreviated:["ಜನ","ಫೆಬ್ರ","ಮಾರ್ಚ್","ಏಪ್ರಿ","ಮೇ","ಜೂನ್","ಜುಲೈ","ಆಗ","ಸೆಪ್ಟೆಂ","ಅಕ್ಟೋ","ನವೆಂ","ಡಿಸೆಂ"],wide:["ಜನವರಿ","ಫೆಬ್ರವರಿ","ಮಾರ್ಚ್","ಏಪ್ರಿಲ್","ಮೇ","ಜೂನ್","ಜುಲೈ","ಆಗಸ್ಟ್","ಸೆಪ್ಟೆಂಬರ್","ಅಕ್ಟೋಬರ್","ನವೆಂಬರ್","ಡಿಸೆಂಬರ್"]},defaultWidth:"wide"}),day:af({values:{narrow:["ಭಾ","ಸೋ","ಮಂ","ಬು","ಗು","ಶು","ಶ"],short:["ಭಾನು","ಸೋಮ","ಮಂಗಳ","ಬುಧ","ಗುರು","ಶುಕ್ರ","ಶನಿ"],abbreviated:["ಭಾನು","ಸೋಮ","ಮಂಗಳ","ಬುಧ","ಗುರು","ಶುಕ್ರ","ಶನಿ"],wide:["ಭಾನುವಾರ","ಸೋಮವಾರ","ಮಂಗಳವಾರ","ಬುಧವಾರ","ಗುರುವಾರ","ಶುಕ್ರವಾರ","ಶನಿವಾರ"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ಪೂರ್ವಾಹ್ನ",pm:"ಅಪರಾಹ್ನ",midnight:"ಮಧ್ಯರಾತ್ರಿ",noon:"ಮಧ್ಯಾಹ್ನ",morning:"ಬೆಳಗ್ಗೆ",afternoon:"ಮಧ್ಯಾಹ್ನ",evening:"ಸಂಜೆ",night:"ರಾತ್ರಿ"},abbreviated:{am:"ಪೂರ್ವಾಹ್ನ",pm:"ಅಪರಾಹ್ನ",midnight:"ಮಧ್ಯರಾತ್ರಿ",noon:"ಮಧ್ಯಾನ್ಹ",morning:"ಬೆಳಗ್ಗೆ",afternoon:"ಮಧ್ಯಾನ್ಹ",evening:"ಸಂಜೆ",night:"ರಾತ್ರಿ"},wide:{am:"ಪೂರ್ವಾಹ್ನ",pm:"ಅಪರಾಹ್ನ",midnight:"ಮಧ್ಯರಾತ್ರಿ",noon:"ಮಧ್ಯಾನ್ಹ",morning:"ಬೆಳಗ್ಗೆ",afternoon:"ಮಧ್ಯಾನ್ಹ",evening:"ಸಂಜೆ",night:"ರಾತ್ರಿ"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ಪೂ",pm:"ಅ",midnight:"ಮಧ್ಯರಾತ್ರಿ",noon:"ಮಧ್ಯಾನ್ಹ",morning:"ಬೆಳಗ್ಗೆ",afternoon:"ಮಧ್ಯಾನ್ಹ",evening:"ಸಂಜೆ",night:"ರಾತ್ರಿ"},abbreviated:{am:"ಪೂರ್ವಾಹ್ನ",pm:"ಅಪರಾಹ್ನ",midnight:"ಮಧ್ಯ ರಾತ್ರಿ",noon:"ಮಧ್ಯಾನ್ಹ",morning:"ಬೆಳಗ್ಗೆ",afternoon:"ಮಧ್ಯಾನ್ಹ",evening:"ಸಂಜೆ",night:"ರಾತ್ರಿ"},wide:{am:"ಪೂರ್ವಾಹ್ನ",pm:"ಅಪರಾಹ್ನ",midnight:"ಮಧ್ಯ ರಾತ್ರಿ",noon:"ಮಧ್ಯಾನ್ಹ",morning:"ಬೆಳಗ್ಗೆ",afternoon:"ಮಧ್ಯಾನ್ಹ",evening:"ಸಂಜೆ",night:"ರಾತ್ರಿ"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(ನೇ|ನೆ)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(ಕ್ರಿ.ಪೂ|ಕ್ರಿ.ಶ)/i,abbreviated:/^(ಕ್ರಿ\.?\s?ಪೂ\.?|ಕ್ರಿ\.?\s?ಶ\.?|ಪ್ರ\.?\s?ಶ\.?)/i,wide:/^(ಕ್ರಿಸ್ತ ಪೂರ್ವ|ಕ್ರಿಸ್ತ ಶಕ|ಪ್ರಸಕ್ತ ಶಕ)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ಪೂ/i,/^(ಶ|ಪ್ರ)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^ತ್ರೈ[1234]|ತ್ರೈ [1234]| [1234]ತ್ರೈ/i,wide:/^[1234](ನೇ)? ತ್ರೈಮಾಸಿಕ/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(ಜೂ|ಜು|ಜ|ಫೆ|ಮಾ|ಏ|ಮೇ|ಆ|ಸೆ|ಅ|ನ|ಡಿ)/i,abbreviated:/^(ಜನ|ಫೆಬ್ರ|ಮಾರ್ಚ್|ಏಪ್ರಿ|ಮೇ|ಜೂನ್|ಜುಲೈ|ಆಗ|ಸೆಪ್ಟೆಂ|ಅಕ್ಟೋ|ನವೆಂ|ಡಿಸೆಂ)/i,wide:/^(ಜನವರಿ|ಫೆಬ್ರವರಿ|ಮಾರ್ಚ್|ಏಪ್ರಿಲ್|ಮೇ|ಜೂನ್|ಜುಲೈ|ಆಗಸ್ಟ್|ಸೆಪ್ಟೆಂಬರ್|ಅಕ್ಟೋಬರ್|ನವೆಂಬರ್|ಡಿಸೆಂಬರ್)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ಜ$/i,/^ಫೆ/i,/^ಮಾ/i,/^ಏ/i,/^ಮೇ/i,/^ಜೂ/i,/^ಜು$/i,/^ಆ/i,/^ಸೆ/i,/^ಅ/i,/^ನ/i,/^ಡಿ/i],any:[/^ಜನ/i,/^ಫೆ/i,/^ಮಾ/i,/^ಏ/i,/^ಮೇ/i,/^ಜೂನ್/i,/^ಜುಲೈ/i,/^ಆ/i,/^ಸೆ/i,/^ಅ/i,/^ನ/i,/^ಡಿ/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^(ಭಾ|ಸೋ|ಮ|ಬು|ಗು|ಶು|ಶ)/i,short:/^(ಭಾನು|ಸೋಮ|ಮಂಗಳ|ಬುಧ|ಗುರು|ಶುಕ್ರ|ಶನಿ)/i,abbreviated:/^(ಭಾನು|ಸೋಮ|ಮಂಗಳ|ಬುಧ|ಗುರು|ಶುಕ್ರ|ಶನಿ)/i,wide:/^(ಭಾನುವಾರ|ಸೋಮವಾರ|ಮಂಗಳವಾರ|ಬುಧವಾರ|ಗುರುವಾರ|ಶುಕ್ರವಾರ|ಶನಿವಾರ)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ಭಾ/i,/^ಸೋ/i,/^ಮ/i,/^ಬು/i,/^ಗು/i,/^ಶು/i,/^ಶ/i],any:[/^ಭಾ/i,/^ಸೋ/i,/^ಮ/i,/^ಬು/i,/^ಗು/i,/^ಶು/i,/^ಶ/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(ಪೂ|ಅ|ಮಧ್ಯರಾತ್ರಿ|ಮಧ್ಯಾನ್ಹ|ಬೆಳಗ್ಗೆ|ಸಂಜೆ|ರಾತ್ರಿ)/i,any:/^(ಪೂರ್ವಾಹ್ನ|ಅಪರಾಹ್ನ|ಮಧ್ಯರಾತ್ರಿ|ಮಧ್ಯಾನ್ಹ|ಬೆಳಗ್ಗೆ|ಸಂಜೆ|ರಾತ್ರಿ)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ಪೂ/i,pm:/^ಅ/i,midnight:/ಮಧ್ಯರಾತ್ರಿ/i,noon:/ಮಧ್ಯಾನ್ಹ/i,morning:/ಬೆಳಗ್ಗೆ/i,afternoon:/ಮಧ್ಯಾನ್ಹ/i,evening:/ಸಂಜೆ/i,night:/ರಾತ್ರಿ/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Rw={lessThanXSeconds:{one:"1초 미만",other:"{{count}}초 미만"},xSeconds:{one:"1초",other:"{{count}}초"},halfAMinute:"30초",lessThanXMinutes:{one:"1분 미만",other:"{{count}}분 미만"},xMinutes:{one:"1분",other:"{{count}}분"},aboutXHours:{one:"약 1시간",other:"약 {{count}}시간"},xHours:{one:"1시간",other:"{{count}}시간"},xDays:{one:"1일",other:"{{count}}일"},aboutXWeeks:{one:"약 1주",other:"약 {{count}}주"},xWeeks:{one:"1주",other:"{{count}}주"},aboutXMonths:{one:"약 1개월",other:"약 {{count}}개월"},xMonths:{one:"1개월",other:"{{count}}개월"},aboutXYears:{one:"약 1년",other:"약 {{count}}년"},xYears:{one:"1년",other:"{{count}}년"},overXYears:{one:"1년 이상",other:"{{count}}년 이상"},almostXYears:{one:"거의 1년",other:"거의 {{count}}년"}},Ww={date:ef({formats:{full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},defaultWidth:"full"}),time:ef({formats:{full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Nw={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},Ow={code:"ko",formatDistance:(e,t,n)=>{let i;const a=Rw[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?i+" 후":i+" 전":i},formatLong:Ww,formatRelative:(e,t,n,i)=>Nw[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e);switch(String(t?.unit)){case"minute":case"second":return String(n);case"date":return n+"일";default:return n+"번째"}},era:af({values:{narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],wide:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},defaultWidth:"wide"}),day:af({values:{narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},defaultWidth:"wide",formattingValues:{narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(일|번째)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(기원전|서기)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(bc|기원전)/i,/^(ad|서기)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},defaultMatchWidth:"wide",parsePatterns:{any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},Fw={lessThanXSeconds:{standalone:{one:"manner wéi eng Sekonn",other:"manner wéi {{count}} Sekonnen"},withPreposition:{one:"manner wéi enger Sekonn",other:"manner wéi {{count}} Sekonnen"}},xSeconds:{standalone:{one:"eng Sekonn",other:"{{count}} Sekonnen"},withPreposition:{one:"enger Sekonn",other:"{{count}} Sekonnen"}},halfAMinute:{standalone:"eng hallef Minutt",withPreposition:"enger hallwer Minutt"},lessThanXMinutes:{standalone:{one:"manner wéi eng Minutt",other:"manner wéi {{count}} Minutten"},withPreposition:{one:"manner wéi enger Minutt",other:"manner wéi {{count}} Minutten"}},xMinutes:{standalone:{one:"eng Minutt",other:"{{count}} Minutten"},withPreposition:{one:"enger Minutt",other:"{{count}} Minutten"}},aboutXHours:{standalone:{one:"ongeféier eng Stonn",other:"ongeféier {{count}} Stonnen"},withPreposition:{one:"ongeféier enger Stonn",other:"ongeféier {{count}} Stonnen"}},xHours:{standalone:{one:"eng Stonn",other:"{{count}} Stonnen"},withPreposition:{one:"enger Stonn",other:"{{count}} Stonnen"}},xDays:{standalone:{one:"een Dag",other:"{{count}} Deeg"},withPreposition:{one:"engem Dag",other:"{{count}} Deeg"}},aboutXWeeks:{standalone:{one:"ongeféier eng Woch",other:"ongeféier {{count}} Wochen"},withPreposition:{one:"ongeféier enger Woche",other:"ongeféier {{count}} Wochen"}},xWeeks:{standalone:{one:"eng Woch",other:"{{count}} Wochen"},withPreposition:{one:"enger Woch",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"ongeféier ee Mount",other:"ongeféier {{count}} Méint"},withPreposition:{one:"ongeféier engem Mount",other:"ongeféier {{count}} Méint"}},xMonths:{standalone:{one:"ee Mount",other:"{{count}} Méint"},withPreposition:{one:"engem Mount",other:"{{count}} Méint"}},aboutXYears:{standalone:{one:"ongeféier ee Joer",other:"ongeféier {{count}} Joer"},withPreposition:{one:"ongeféier engem Joer",other:"ongeféier {{count}} Joer"}},xYears:{standalone:{one:"ee Joer",other:"{{count}} Joer"},withPreposition:{one:"engem Joer",other:"{{count}} Joer"}},overXYears:{standalone:{one:"méi wéi ee Joer",other:"méi wéi {{count}} Joer"},withPreposition:{one:"méi wéi engem Joer",other:"méi wéi {{count}} Joer"}},almostXYears:{standalone:{one:"bal ee Joer",other:"bal {{count}} Joer"},withPreposition:{one:"bal engem Joer",other:"bal {{count}} Joer"}}},jw=["d","h","n","t","z"],zw=["a,","e","i","o","u"],$w=[0,1,2,3,8,9],Uw=[40,50,60,70];function Hw(e){const t=e.charAt(0).toLowerCase();if(-1!=zw.indexOf(t)||-1!=jw.indexOf(t))return!0;const n=e.split(" ")[0],i=parseInt(n);return!isNaN(i)&&-1!=$w.indexOf(i%10)&&-1==Uw.indexOf(parseInt(n.substring(0,2)))}const Bw={date:ef({formats:{full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.yy"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Gw={lastWeek:e=>{const t=e.getDay();let n="'läschte";return 2!==t&&4!==t||(n+="n"),n+="' eeee 'um' p",n},yesterday:"'gëschter um' p",today:"'haut um' p",tomorrow:"'moien um' p",nextWeek:"eeee 'um' p",other:"P"},Xw={code:"lb",formatDistance:(e,t,n)=>{let i;const a=Fw[e],r=n?.addSuffix?a.withPreposition:a.standalone;return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"a"+(Hw(i)?"n":"")+" "+i:"viru"+(Hw(i)?"n":"")+" "+i:i},formatLong:Bw,formatRelative:(e,t,n,i)=>{const a=Gw[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["viru Christus","no Christus"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mäe","Abr","Mee","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","Mäerz","Abrëll","Mee","Juni","Juli","August","September","Oktober","November","Dezember"]},defaultWidth:"wide"}),day:af({values:{narrow:["S","M","D","M","D","F","S"],short:["So","Mé","Dë","Më","Do","Fr","Sa"],abbreviated:["So.","Mé.","Dë.","Më.","Do.","Fr.","Sa."],wide:["Sonndeg","Méindeg","Dënschdeg","Mëttwoch","Donneschdeg","Freideg","Samschdeg"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"mo.",pm:"nomë.",midnight:"Mëtternuecht",noon:"Mëtteg",morning:"Moien",afternoon:"Nomëtteg",evening:"Owend",night:"Nuecht"},abbreviated:{am:"moies",pm:"nomëttes",midnight:"Mëtternuecht",noon:"Mëtteg",morning:"Moien",afternoon:"Nomëtteg",evening:"Owend",night:"Nuecht"},wide:{am:"moies",pm:"nomëttes",midnight:"Mëtternuecht",noon:"Mëtteg",morning:"Moien",afternoon:"Nomëtteg",evening:"Owend",night:"Nuecht"}},defaultWidth:"wide",formattingValues:{narrow:{am:"mo.",pm:"nom.",midnight:"Mëtternuecht",noon:"mëttes",morning:"moies",afternoon:"nomëttes",evening:"owes",night:"nuets"},abbreviated:{am:"moies",pm:"nomëttes",midnight:"Mëtternuecht",noon:"mëttes",morning:"moies",afternoon:"nomëttes",evening:"owes",night:"nuets"},wide:{am:"moies",pm:"nomëttes",midnight:"Mëtternuecht",noon:"mëttes",morning:"moies",afternoon:"nomëttes",evening:"owes",night:"nuets"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(viru Christus|virun eiser Zäitrechnung|no Christus|eiser Zäitrechnung)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^v/i,/^n/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mäe|abr|mee|jun|jul|aug|sep|okt|nov|dez)/i,wide:/^(januar|februar|mäerz|abrëll|mee|juni|juli|august|september|oktober|november|dezember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mä/i,/^ab/i,/^me/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[smdf]/i,short:/^(so|mé|dë|më|do|fr|sa)/i,abbreviated:/^(son?|méi?|dën?|mët?|don?|fre?|sam?)\.?/i,wide:/^(sonndeg|méindeg|dënschdeg|mëttwoch|donneschdeg|freideg|samschdeg)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^so/i,/^mé/i,/^dë/i,/^më/i,/^do/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(mo\.?|nomë\.?|Mëtternuecht|mëttes|moies|nomëttes|owes|nuets)/i,abbreviated:/^(moi\.?|nomët\.?|Mëtternuecht|mëttes|moies|nomëttes|owes|nuets)/i,wide:/^(moies|nomëttes|Mëtternuecht|mëttes|moies|nomëttes|owes|nuets)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^m/i,pm:/^n/i,midnight:/^Mëtter/i,noon:/^mëttes/i,morning:/moies/i,afternoon:/nomëttes/i,evening:/owes/i,night:/nuets/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Yw={xseconds_other:"sekundė_sekundžių_sekundes",xminutes_one:"minutė_minutės_minutę",xminutes_other:"minutės_minučių_minutes",xhours_one:"valanda_valandos_valandą",xhours_other:"valandos_valandų_valandas",xdays_one:"diena_dienos_dieną",xdays_other:"dienos_dienų_dienas",xweeks_one:"savaitė_savaitės_savaitę",xweeks_other:"savaitės_savaičių_savaites",xmonths_one:"mėnuo_mėnesio_mėnesį",xmonths_other:"mėnesiai_mėnesių_mėnesius",xyears_one:"metai_metų_metus",xyears_other:"metai_metų_metus",about:"apie",over:"daugiau nei",almost:"beveik",lessthan:"mažiau nei"},Vw=(e,t,n,i)=>t?i?"kelių sekundžių":"kelias sekundes":"kelios sekundės",Kw=(e,t,n,i)=>t?i?Qw(n)[1]:Qw(n)[2]:Qw(n)[0],qw=(e,t,n,i)=>{const a=e+" ";return 1===e?a+Kw(0,t,n,i):t?i?a+Qw(n)[1]:a+(Jw(e)?Qw(n)[1]:Qw(n)[2]):a+(Jw(e)?Qw(n)[1]:Qw(n)[0])};function Jw(e){return e%10==0||e>10&&e<20}function Qw(e){return Yw[e].split("_")}const Zw={lessThanXSeconds:{one:Vw,other:qw},xSeconds:{one:Vw,other:qw},halfAMinute:"pusė minutės",lessThanXMinutes:{one:Kw,other:qw},xMinutes:{one:Kw,other:qw},aboutXHours:{one:Kw,other:qw},xHours:{one:Kw,other:qw},xDays:{one:Kw,other:qw},aboutXWeeks:{one:Kw,other:qw},xWeeks:{one:Kw,other:qw},aboutXMonths:{one:Kw,other:qw},xMonths:{one:Kw,other:qw},aboutXYears:{one:Kw,other:qw},xYears:{one:Kw,other:qw},overXYears:{one:Kw,other:qw},almostXYears:{one:Kw,other:qw}},eb={date:ef({formats:{full:"y 'm'. MMMM d 'd'., EEEE",long:"y 'm'. MMMM d 'd'.",medium:"y-MM-dd",short:"y-MM-dd"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},tb={lastWeek:"'Praėjusį' eeee p",yesterday:"'Vakar' p",today:"'Šiandien' p",tomorrow:"'Rytoj' p",nextWeek:"eeee p",other:"P"},nb={code:"lt",formatDistance:(e,t,n)=>{const i=e.match(/about|over|almost|lessthan/i),a=i?e.replace(i[0],""):e,r=void 0!==n?.comparison&&n.comparison>0;let o;const s=Zw[e];if(o="string"==typeof s?s:1===t?s.one(t,!0===n?.addSuffix,a.toLowerCase()+"_one",r):s.other(t,!0===n?.addSuffix,a.toLowerCase()+"_other",r),i){const e=i[0].toLowerCase();o=Yw[e]+" "+o}return n?.addSuffix?n.comparison&&n.comparison>0?"po "+o:"prieš "+o:o},formatLong:eb,formatRelative:(e,t,n,i)=>tb[e],localize:{ordinalNumber:(e,t)=>Number(e)+"-oji",era:af({values:{narrow:["pr. Kr.","po Kr."],abbreviated:["pr. Kr.","po Kr."],wide:["prieš Kristų","po Kristaus"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["I ketv.","II ketv.","III ketv.","IV ketv."],wide:["I ketvirtis","II ketvirtis","III ketvirtis","IV ketvirtis"]},defaultWidth:"wide",formattingValues:{narrow:["1","2","3","4"],abbreviated:["I k.","II k.","III k.","IV k."],wide:["I ketvirtis","II ketvirtis","III ketvirtis","IV ketvirtis"]},defaultFormattingWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["S","V","K","B","G","B","L","R","R","S","L","G"],abbreviated:["saus.","vas.","kov.","bal.","geg.","birž.","liep.","rugp.","rugs.","spal.","lapkr.","gruod."],wide:["sausis","vasaris","kovas","balandis","gegužė","birželis","liepa","rugpjūtis","rugsėjis","spalis","lapkritis","gruodis"]},defaultWidth:"wide",formattingValues:{narrow:["S","V","K","B","G","B","L","R","R","S","L","G"],abbreviated:["saus.","vas.","kov.","bal.","geg.","birž.","liep.","rugp.","rugs.","spal.","lapkr.","gruod."],wide:["sausio","vasario","kovo","balandžio","gegužės","birželio","liepos","rugpjūčio","rugsėjo","spalio","lapkričio","gruodžio"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["S","P","A","T","K","P","Š"],short:["Sk","Pr","An","Tr","Kt","Pn","Št"],abbreviated:["sk","pr","an","tr","kt","pn","št"],wide:["sekmadienis","pirmadienis","antradienis","trečiadienis","ketvirtadienis","penktadienis","šeštadienis"]},defaultWidth:"wide",formattingValues:{narrow:["S","P","A","T","K","P","Š"],short:["Sk","Pr","An","Tr","Kt","Pn","Št"],abbreviated:["sk","pr","an","tr","kt","pn","št"],wide:["sekmadienį","pirmadienį","antradienį","trečiadienį","ketvirtadienį","penktadienį","šeštadienį"]},defaultFormattingWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"pr. p.",pm:"pop.",midnight:"vidurnaktis",noon:"vidurdienis",morning:"rytas",afternoon:"diena",evening:"vakaras",night:"naktis"},abbreviated:{am:"priešpiet",pm:"popiet",midnight:"vidurnaktis",noon:"vidurdienis",morning:"rytas",afternoon:"diena",evening:"vakaras",night:"naktis"},wide:{am:"priešpiet",pm:"popiet",midnight:"vidurnaktis",noon:"vidurdienis",morning:"rytas",afternoon:"diena",evening:"vakaras",night:"naktis"}},defaultWidth:"wide",formattingValues:{narrow:{am:"pr. p.",pm:"pop.",midnight:"vidurnaktis",noon:"perpiet",morning:"rytas",afternoon:"popietė",evening:"vakaras",night:"naktis"},abbreviated:{am:"priešpiet",pm:"popiet",midnight:"vidurnaktis",noon:"perpiet",morning:"rytas",afternoon:"popietė",evening:"vakaras",night:"naktis"},wide:{am:"priešpiet",pm:"popiet",midnight:"vidurnaktis",noon:"perpiet",morning:"rytas",afternoon:"popietė",evening:"vakaras",night:"naktis"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(-oji)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^p(r|o)\.?\s?(kr\.?|me)/i,abbreviated:/^(pr\.\s?(kr\.|m\.\s?e\.)|po\s?kr\.|mūsų eroje)/i,wide:/^(prieš Kristų|prieš mūsų erą|po Kristaus|mūsų eroje)/i},defaultMatchWidth:"wide",parsePatterns:{wide:[/prieš/i,/(po|mūsų)/i],any:[/^pr/i,/^(po|m)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^([1234])/i,abbreviated:/^(I|II|III|IV)\s?ketv?\.?/i,wide:/^(I|II|III|IV)\s?ketvirtis/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/1/i,/2/i,/3/i,/4/i],any:[/I$/i,/II$/i,/III/i,/IV/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[svkbglr]/i,abbreviated:/^(saus\.|vas\.|kov\.|bal\.|geg\.|birž\.|liep\.|rugp\.|rugs\.|spal\.|lapkr\.|gruod\.)/i,wide:/^(sausi(s|o)|vasari(s|o)|kov(a|o)s|balandž?i(s|o)|gegužės?|birželi(s|o)|liep(a|os)|rugpjū(t|č)i(s|o)|rugsėj(is|o)|spali(s|o)|lapkri(t|č)i(s|o)|gruodž?i(s|o))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^v/i,/^k/i,/^b/i,/^g/i,/^b/i,/^l/i,/^r/i,/^r/i,/^s/i,/^l/i,/^g/i],any:[/^saus/i,/^vas/i,/^kov/i,/^bal/i,/^geg/i,/^birž/i,/^liep/i,/^rugp/i,/^rugs/i,/^spal/i,/^lapkr/i,/^gruod/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[spatkš]/i,short:/^(sk|pr|an|tr|kt|pn|št)/i,abbreviated:/^(sk|pr|an|tr|kt|pn|št)/i,wide:/^(sekmadien(is|į)|pirmadien(is|į)|antradien(is|į)|trečiadien(is|į)|ketvirtadien(is|į)|penktadien(is|į)|šeštadien(is|į))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^p/i,/^a/i,/^t/i,/^k/i,/^p/i,/^š/i],wide:[/^se/i,/^pi/i,/^an/i,/^tr/i,/^ke/i,/^pe/i,/^še/i],any:[/^sk/i,/^pr/i,/^an/i,/^tr/i,/^kt/i,/^pn/i,/^št/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(pr.\s?p.|pop.|vidurnaktis|(vidurdienis|perpiet)|rytas|(diena|popietė)|vakaras|naktis)/i,any:/^(priešpiet|popiet$|vidurnaktis|(vidurdienis|perpiet)|rytas|(diena|popietė)|vakaras|naktis)/i},defaultMatchWidth:"any",parsePatterns:{narrow:{am:/^pr/i,pm:/^pop./i,midnight:/^vidurnaktis/i,noon:/^(vidurdienis|perp)/i,morning:/rytas/i,afternoon:/(die|popietė)/i,evening:/vakaras/i,night:/naktis/i},any:{am:/^pr/i,pm:/^popiet$/i,midnight:/^vidurnaktis/i,noon:/^(vidurdienis|perp)/i,morning:/rytas/i,afternoon:/(die|popietė)/i,evening:/vakaras/i,night:/naktis/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}};function ib(e){return(t,n)=>{if(1===t)return n?.addSuffix?e.one[0].replace("{{time}}",e.one[2]):e.one[0].replace("{{time}}",e.one[1]);{const i=t%10==1&&t%100!=11;return n?.addSuffix?e.other[0].replace("{{time}}",i?e.other[3]:e.other[4]).replace("{{count}}",String(t)):e.other[0].replace("{{time}}",i?e.other[1]:e.other[2]).replace("{{count}}",String(t))}}}const ab={lessThanXSeconds:ib({one:["mazāk par {{time}}","sekundi","sekundi"],other:["mazāk nekā {{count}} {{time}}","sekunde","sekundes","sekundes","sekundēm"]}),xSeconds:ib({one:["1 {{time}}","sekunde","sekundes"],other:["{{count}} {{time}}","sekunde","sekundes","sekundes","sekundēm"]}),halfAMinute:(e,t)=>t?.addSuffix?"pusminūtes":"pusminūte",lessThanXMinutes:ib({one:["mazāk par {{time}}","minūti","minūti"],other:["mazāk nekā {{count}} {{time}}","minūte","minūtes","minūtes","minūtēm"]}),xMinutes:ib({one:["1 {{time}}","minūte","minūtes"],other:["{{count}} {{time}}","minūte","minūtes","minūtes","minūtēm"]}),aboutXHours:ib({one:["apmēram 1 {{time}}","stunda","stundas"],other:["apmēram {{count}} {{time}}","stunda","stundas","stundas","stundām"]}),xHours:ib({one:["1 {{time}}","stunda","stundas"],other:["{{count}} {{time}}","stunda","stundas","stundas","stundām"]}),xDays:ib({one:["1 {{time}}","diena","dienas"],other:["{{count}} {{time}}","diena","dienas","dienas","dienām"]}),aboutXWeeks:ib({one:["apmēram 1 {{time}}","nedēļa","nedēļas"],other:["apmēram {{count}} {{time}}","nedēļa","nedēļu","nedēļas","nedēļām"]}),xWeeks:ib({one:["1 {{time}}","nedēļa","nedēļas"],other:["{{count}} {{time}}","nedēļa","nedēļu","nedēļas","nedēļām"]}),aboutXMonths:ib({one:["apmēram 1 {{time}}","mēnesis","mēneša"],other:["apmēram {{count}} {{time}}","mēnesis","mēneši","mēneša","mēnešiem"]}),xMonths:ib({one:["1 {{time}}","mēnesis","mēneša"],other:["{{count}} {{time}}","mēnesis","mēneši","mēneša","mēnešiem"]}),aboutXYears:ib({one:["apmēram 1 {{time}}","gads","gada"],other:["apmēram {{count}} {{time}}","gads","gadi","gada","gadiem"]}),xYears:ib({one:["1 {{time}}","gads","gada"],other:["{{count}} {{time}}","gads","gadi","gada","gadiem"]}),overXYears:ib({one:["ilgāk par 1 {{time}}","gadu","gadu"],other:["vairāk nekā {{count}} {{time}}","gads","gadi","gada","gadiem"]}),almostXYears:ib({one:["gandrīz 1 {{time}}","gads","gada"],other:["vairāk nekā {{count}} {{time}}","gads","gadi","gada","gadiem"]})},rb={date:ef({formats:{full:"EEEE, y. 'gada' d. MMMM",long:"y. 'gada' d. MMMM",medium:"dd.MM.y.",short:"dd.MM.y."},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'plkst.' {{time}}",long:"{{date}} 'plkst.' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ob=["svētdienā","pirmdienā","otrdienā","trešdienā","ceturtdienā","piektdienā","sestdienā"],sb={lastWeek:(e,t,n)=>{if(Vf(e,t,n))return"eeee 'plkst.' p";return"'Pagājušā "+ob[e.getDay()]+" plkst.' p"},yesterday:"'Vakar plkst.' p",today:"'Šodien plkst.' p",tomorrow:"'Rīt plkst.' p",nextWeek:(e,t,n)=>{if(Vf(e,t,n))return"eeee 'plkst.' p";return"'Nākamajā "+ob[e.getDay()]+" plkst.' p"},other:"P"},lb={code:"lv",formatDistance:(e,t,n)=>{const i=ab[e](t,n);return n?.addSuffix?n.comparison&&n.comparison>0?"pēc "+i:"pirms "+i:i},formatLong:rb,formatRelative:(e,t,n,i)=>{const a=sb[e];return"function"==typeof a?a(t,n,i):a},localize:{ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["p.m.ē","m.ē"],abbreviated:["p. m. ē.","m. ē."],wide:["pirms mūsu ēras","mūsu ērā"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1. cet.","2. cet.","3. cet.","4. cet."],wide:["pirmais ceturksnis","otrais ceturksnis","trešais ceturksnis","ceturtais ceturksnis"]},defaultWidth:"wide",formattingValues:{narrow:["1","2","3","4"],abbreviated:["1. cet.","2. cet.","3. cet.","4. cet."],wide:["pirmajā ceturksnī","otrajā ceturksnī","trešajā ceturksnī","ceturtajā ceturksnī"]},defaultFormattingWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","febr.","marts","apr.","maijs","jūn.","jūl.","aug.","sept.","okt.","nov.","dec."],wide:["janvāris","februāris","marts","aprīlis","maijs","jūnijs","jūlijs","augusts","septembris","oktobris","novembris","decembris"]},defaultWidth:"wide",formattingValues:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","febr.","martā","apr.","maijs","jūn.","jūl.","aug.","sept.","okt.","nov.","dec."],wide:["janvārī","februārī","martā","aprīlī","maijā","jūnijā","jūlijā","augustā","septembrī","oktobrī","novembrī","decembrī"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["S","P","O","T","C","P","S"],short:["Sv","P","O","T","C","Pk","S"],abbreviated:["svētd.","pirmd.","otrd.","trešd.","ceturtd.","piektd.","sestd."],wide:["svētdiena","pirmdiena","otrdiena","trešdiena","ceturtdiena","piektdiena","sestdiena"]},defaultWidth:"wide",formattingValues:{narrow:["S","P","O","T","C","P","S"],short:["Sv","P","O","T","C","Pk","S"],abbreviated:["svētd.","pirmd.","otrd.","trešd.","ceturtd.","piektd.","sestd."],wide:["svētdienā","pirmdienā","otrdienā","trešdienā","ceturtdienā","piektdienā","sestdienā"]},defaultFormattingWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"am",pm:"pm",midnight:"pusn.",noon:"pusd.",morning:"rīts",afternoon:"diena",evening:"vakars",night:"nakts"},abbreviated:{am:"am",pm:"pm",midnight:"pusn.",noon:"pusd.",morning:"rīts",afternoon:"pēcpusd.",evening:"vakars",night:"nakts"},wide:{am:"am",pm:"pm",midnight:"pusnakts",noon:"pusdienlaiks",morning:"rīts",afternoon:"pēcpusdiena",evening:"vakars",night:"nakts"}},defaultWidth:"wide",formattingValues:{narrow:{am:"am",pm:"pm",midnight:"pusn.",noon:"pusd.",morning:"rītā",afternoon:"dienā",evening:"vakarā",night:"naktī"},abbreviated:{am:"am",pm:"pm",midnight:"pusn.",noon:"pusd.",morning:"rītā",afternoon:"pēcpusd.",evening:"vakarā",night:"naktī"},wide:{am:"am",pm:"pm",midnight:"pusnaktī",noon:"pusdienlaikā",morning:"rītā",afternoon:"pēcpusdienā",evening:"vakarā",night:"naktī"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(p\.m\.ē|m\.ē)/i,abbreviated:/^(p\. m\. ē\.|m\. ē\.)/i,wide:/^(pirms mūsu ēras|mūsu ērā)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^p/i,/^m/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](\. cet\.)/i,wide:/^(pirma(is|jā)|otra(is|jā)|treša(is|jā)|ceturta(is|jā)) ceturksn(is|ī)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^1/i,/^2/i,/^3/i,/^4/i],abbreviated:[/^1/i,/^2/i,/^3/i,/^4/i],wide:[/^p/i,/^o/i,/^t/i,/^c/i]},defaultParseWidth:"wide",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(janv\.|febr\.|marts|apr\.|maijs|jūn\.|jūl\.|aug\.|sept\.|okt\.|nov\.|dec\.)/i,wide:/^(janvār(is|ī)|februār(is|ī)|mart[sā]|aprīl(is|ī)|maij[sā]|jūnij[sā]|jūlij[sā]|august[sā]|septembr(is|ī)|oktobr(is|ī)|novembr(is|ī)|decembr(is|ī))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^mai/i,/^jūn/i,/^jūl/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[spotc]/i,short:/^(sv|pi|o|t|c|pk|s)/i,abbreviated:/^(svētd\.|pirmd\.|otrd.\|trešd\.|ceturtd\.|piektd\.|sestd\.)/i,wide:/^(svētdien(a|ā)|pirmdien(a|ā)|otrdien(a|ā)|trešdien(a|ā)|ceturtdien(a|ā)|piektdien(a|ā)|sestdien(a|ā))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^p/i,/^o/i,/^t/i,/^c/i,/^p/i,/^s/i],any:[/^sv/i,/^pi/i,/^o/i,/^t/i,/^c/i,/^p/i,/^se/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(am|pm|pusn\.|pusd\.|rīt(s|ā)|dien(a|ā)|vakar(s|ā)|nakt(s|ī))/,abbreviated:/^(am|pm|pusn\.|pusd\.|rīt(s|ā)|pēcpusd\.|vakar(s|ā)|nakt(s|ī))/,wide:/^(am|pm|pusnakt(s|ī)|pusdienlaik(s|ā)|rīt(s|ā)|pēcpusdien(a|ā)|vakar(s|ā)|nakt(s|ī))/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^am/i,pm:/^pm/i,midnight:/^pusn/i,noon:/^pusd/i,morning:/^r/i,afternoon:/^(d|pēc)/i,evening:/^v/i,night:/^n/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},db={lessThanXSeconds:{one:"помалку од секунда",other:"помалку од {{count}} секунди"},xSeconds:{one:"1 секунда",other:"{{count}} секунди"},halfAMinute:"половина минута",lessThanXMinutes:{one:"помалку од минута",other:"помалку од {{count}} минути"},xMinutes:{one:"1 минута",other:"{{count}} минути"},aboutXHours:{one:"околу 1 час",other:"околу {{count}} часа"},xHours:{one:"1 час",other:"{{count}} часа"},xDays:{one:"1 ден",other:"{{count}} дена"},aboutXWeeks:{one:"околу 1 недела",other:"околу {{count}} месеци"},xWeeks:{one:"1 недела",other:"{{count}} недели"},aboutXMonths:{one:"околу 1 месец",other:"околу {{count}} недели"},xMonths:{one:"1 месец",other:"{{count}} месеци"},aboutXYears:{one:"околу 1 година",other:"околу {{count}} години"},xYears:{one:"1 година",other:"{{count}} години"},overXYears:{one:"повеќе од 1 година",other:"повеќе од {{count}} години"},almostXYears:{one:"безмалку 1 година",other:"безмалку {{count}} години"}},ub={date:ef({formats:{full:"EEEE, dd MMMM yyyy",long:"dd MMMM yyyy",medium:"dd MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:ef({formats:{any:"{{date}} {{time}}"},defaultWidth:"any"})},cb=["недела","понеделник","вторник","среда","четврток","петок","сабота"];function hb(e){const t=cb[e];switch(e){case 0:case 3:case 6:return"'ова "+t+" вo' p";case 1:case 2:case 4:case 5:return"'овој "+t+" вo' p"}}const mb={lastWeek:(e,t,n)=>{const i=e.getDay();return Vf(e,t,n)?hb(i):function(e){const t=cb[e];switch(e){case 0:case 3:case 6:return"'минатата "+t+" во' p";case 1:case 2:case 4:case 5:return"'минатиот "+t+" во' p"}}(i)},yesterday:"'вчера во' p",today:"'денес во' p",tomorrow:"'утре во' p",nextWeek:(e,t,n)=>{const i=e.getDay();return Vf(e,t,n)?hb(i):function(e){const t=cb[e];switch(e){case 0:case 3:case 6:return"'следната "+t+" вo' p";case 1:case 2:case 4:case 5:return"'следниот "+t+" вo' p"}}(i)},other:"P"},fb={ordinalNumber:(e,t)=>{const n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"-ви";case 2:return n+"-ри";case 7:case 8:return n+"-ми"}return n+"-ти"},era:af({values:{narrow:["пр.н.е.","н.е."],abbreviated:["пред н. е.","н. е."],wide:["пред нашата ера","нашата ера"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1-ви кв.","2-ри кв.","3-ти кв.","4-ти кв."],wide:["1-ви квартал","2-ри квартал","3-ти квартал","4-ти квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{abbreviated:["јан","фев","мар","апр","мај","јун","јул","авг","септ","окт","ноем","дек"],wide:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"]},defaultWidth:"wide"}),day:af({values:{narrow:["Н","П","В","С","Ч","П","С"],short:["не","по","вт","ср","че","пе","са"],abbreviated:["нед","пон","вто","сре","чет","пет","саб"],wide:["недела","понеделник","вторник","среда","четврток","петок","сабота"]},defaultWidth:"wide"}),dayPeriod:af({values:{wide:{am:"претпладне",pm:"попладне",midnight:"полноќ",noon:"напладне",morning:"наутро",afternoon:"попладне",evening:"навечер",night:"ноќе"}},defaultWidth:"wide"})},pb={ordinalNumber:sf({matchPattern:/^(\d+)(-?[врмт][и])?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^((пр)?н\.?\s?е\.?)/i,abbreviated:/^((пр)?н\.?\s?е\.?)/i,wide:/^(пред нашата ера|нашата ера)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^п/i,/^н/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[врт]?и?)? кв.?/i,wide:/^[1234](-?[врт]?и?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{abbreviated:/^(јан|фев|мар|апр|мај|јун|јул|авг|сеп|окт|ноем|дек)/i,wide:/^(јануари|февруари|март|април|мај|јуни|јули|август|септември|октомври|ноември|декември)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ја/i,/^Ф/i,/^мар/i,/^ап/i,/^мај/i,/^јун/i,/^јул/i,/^ав/i,/^се/i,/^окт/i,/^но/i,/^де/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[нпвсч]/i,short:/^(не|по|вт|ср|че|пе|са)/i,abbreviated:/^(нед|пон|вто|сре|чет|пет|саб)/i,wide:/^(недела|понеделник|вторник|среда|четврток|петок|сабота)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^н/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н[ед]/i,/^п[он]/i,/^вт/i,/^ср/i,/^ч[ет]/i,/^п[ет]/i,/^с[аб]/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(претп|попл|полноќ|утро|пладне|вечер|ноќ)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/претпладне/i,pm:/попладне/i,midnight:/полноќ/i,noon:/напладне/i,morning:/наутро/i,afternoon:/попладне/i,evening:/навечер/i,night:/ноќе/i}},defaultParseWidth:"any"})},gb={code:"mk",formatDistance:(e,t,n)=>{let i;const a=db[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"за "+i:"пред "+i:i},formatLong:ub,formatRelative:(e,t,n,i)=>{const a=mb[e];return"function"==typeof a?a(t,n,i):a},localize:fb,match:pb,options:{weekStartsOn:1,firstWeekContainsDate:4}},vb={lessThanXSeconds:{one:"секунд хүрэхгүй",other:"{{count}} секунд хүрэхгүй"},xSeconds:{one:"1 секунд",other:"{{count}} секунд"},halfAMinute:"хагас минут",lessThanXMinutes:{one:"минут хүрэхгүй",other:"{{count}} минут хүрэхгүй"},xMinutes:{one:"1 минут",other:"{{count}} минут"},aboutXHours:{one:"ойролцоогоор 1 цаг",other:"ойролцоогоор {{count}} цаг"},xHours:{one:"1 цаг",other:"{{count}} цаг"},xDays:{one:"1 өдөр",other:"{{count}} өдөр"},aboutXWeeks:{one:"ойролцоогоор 1 долоо хоног",other:"ойролцоогоор {{count}} долоо хоног"},xWeeks:{one:"1 долоо хоног",other:"{{count}} долоо хоног"},aboutXMonths:{one:"ойролцоогоор 1 сар",other:"ойролцоогоор {{count}} сар"},xMonths:{one:"1 сар",other:"{{count}} сар"},aboutXYears:{one:"ойролцоогоор 1 жил",other:"ойролцоогоор {{count}} жил"},xYears:{one:"1 жил",other:"{{count}} жил"},overXYears:{one:"1 жил гаран",other:"{{count}} жил гаран"},almostXYears:{one:"бараг 1 жил",other:"бараг {{count}} жил"}},yb={date:ef({formats:{full:"y 'оны' MMMM'ын' d, EEEE 'гараг'",long:"y 'оны' MMMM'ын' d",medium:"y 'оны' MMM'ын' d",short:"y.MM.dd"},defaultWidth:"full"}),time:ef({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},wb={lastWeek:"'өнгөрсөн' eeee 'гарагийн' p 'цагт'",yesterday:"'өчигдөр' p 'цагт'",today:"'өнөөдөр' p 'цагт'",tomorrow:"'маргааш' p 'цагт'",nextWeek:"'ирэх' eeee 'гарагийн' p 'цагт'",other:"P"},bb={ordinalNumber:(e,t)=>String(e),era:af({values:{narrow:["НТӨ","НТ"],abbreviated:["НТӨ","НТ"],wide:["нийтийн тооллын өмнөх","нийтийн тооллын"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["I","II","III","IV"],abbreviated:["I улирал","II улирал","III улирал","IV улирал"],wide:["1-р улирал","2-р улирал","3-р улирал","4-р улирал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"],abbreviated:["1-р сар","2-р сар","3-р сар","4-р сар","5-р сар","6-р сар","7-р сар","8-р сар","9-р сар","10-р сар","11-р сар","12-р сар"],wide:["Нэгдүгээр сар","Хоёрдугаар сар","Гуравдугаар сар","Дөрөвдүгээр сар","Тавдугаар сар","Зургаадугаар сар","Долоодугаар сар","Наймдугаар сар","Есдүгээр сар","Аравдугаар сар","Арваннэгдүгээр сар","Арван хоёрдугаар сар"]},defaultWidth:"wide",formattingValues:{narrow:["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"],abbreviated:["1-р сар","2-р сар","3-р сар","4-р сар","5-р сар","6-р сар","7-р сар","8-р сар","9-р сар","10-р сар","11-р сар","12-р сар"],wide:["нэгдүгээр сар","хоёрдугаар сар","гуравдугаар сар","дөрөвдүгээр сар","тавдугаар сар","зургаадугаар сар","долоодугаар сар","наймдугаар сар","есдүгээр сар","аравдугаар сар","арваннэгдүгээр сар","арван хоёрдугаар сар"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["Н","Д","М","Л","П","Б","Б"],short:["Ня","Да","Мя","Лх","Пү","Ба","Бя"],abbreviated:["Ням","Дав","Мяг","Лха","Пүр","Баа","Бям"],wide:["Ням","Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба"]},defaultWidth:"wide",formattingValues:{narrow:["Н","Д","М","Л","П","Б","Б"],short:["Ня","Да","Мя","Лх","Пү","Ба","Бя"],abbreviated:["Ням","Дав","Мяг","Лха","Пүр","Баа","Бям"],wide:["ням","даваа","мягмар","лхагва","пүрэв","баасан","бямба"]},defaultFormattingWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ү.ө.",pm:"ү.х.",midnight:"шөнө дунд",noon:"үд дунд",morning:"өглөө",afternoon:"өдөр",evening:"орой",night:"шөнө"},abbreviated:{am:"ү.ө.",pm:"ү.х.",midnight:"шөнө дунд",noon:"үд дунд",morning:"өглөө",afternoon:"өдөр",evening:"орой",night:"шөнө"},wide:{am:"ү.ө.",pm:"ү.х.",midnight:"шөнө дунд",noon:"үд дунд",morning:"өглөө",afternoon:"өдөр",evening:"орой",night:"шөнө"}},defaultWidth:"wide"})},kb={ordinalNumber:sf({matchPattern:/\d+/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(нтө|нт)/i,abbreviated:/^(нтө|нт)/i,wide:/^(нийтийн тооллын өмнө|нийтийн тооллын)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(нтө|нийтийн тооллын өмнө)/i,/^(нт|нийтийн тооллын)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^(iv|iii|ii|i)/i,abbreviated:/^(iv|iii|ii|i) улирал/i,wide:/^[1-4]-р улирал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(i(\s|$)|1)/i,/^(ii(\s|$)|2)/i,/^(iii(\s|$)|3)/i,/^(iv(\s|$)|4)/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(xii|xi|x|ix|viii|vii|vi|v|iv|iii|ii|i)/i,abbreviated:/^(1-р сар|2-р сар|3-р сар|4-р сар|5-р сар|6-р сар|7-р сар|8-р сар|9-р сар|10-р сар|11-р сар|12-р сар)/i,wide:/^(нэгдүгээр сар|хоёрдугаар сар|гуравдугаар сар|дөрөвдүгээр сар|тавдугаар сар|зургаадугаар сар|долоодугаар сар|наймдугаар сар|есдүгээр сар|аравдугаар сар|арван нэгдүгээр сар|арван хоёрдугаар сар)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^i$/i,/^ii$/i,/^iii$/i,/^iv$/i,/^v$/i,/^vi$/i,/^vii$/i,/^viii$/i,/^ix$/i,/^x$/i,/^xi$/i,/^xii$/i],any:[/^(1|нэгдүгээр)/i,/^(2|хоёрдугаар)/i,/^(3|гуравдугаар)/i,/^(4|дөрөвдүгээр)/i,/^(5|тавдугаар)/i,/^(6|зургаадугаар)/i,/^(7|долоодугаар)/i,/^(8|наймдугаар)/i,/^(9|есдүгээр)/i,/^(10|аравдугаар)/i,/^(11|арван нэгдүгээр)/i,/^(12|арван хоёрдугаар)/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[ндмлпбб]/i,short:/^(ня|да|мя|лх|пү|ба|бя)/i,abbreviated:/^(ням|дав|мяг|лха|пүр|баа|бям)/i,wide:/^(ням|даваа|мягмар|лхагва|пүрэв|баасан|бямба)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^н/i,/^д/i,/^м/i,/^л/i,/^п/i,/^б/i,/^б/i],any:[/^ня/i,/^да/i,/^мя/i,/^лх/i,/^пү/i,/^ба/i,/^бя/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(ү\.ө\.|ү\.х\.|шөнө дунд|үд дунд|өглөө|өдөр|орой|шөнө)/i,any:/^(ү\.ө\.|ү\.х\.|шөнө дунд|үд дунд|өглөө|өдөр|орой|шөнө)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ү\.ө\./i,pm:/^ү\.х\./i,midnight:/^шөнө дунд/i,noon:/^үд дунд/i,morning:/өглөө/i,afternoon:/өдөр/i,evening:/орой/i,night:/шөнө/i}},defaultParseWidth:"any"})},Sb={code:"mn",formatDistance:(e,t,n)=>{let i;const a=vb[e];if(i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix){const e=i.split(" "),t=e.pop();switch(i=e.join(" "),t){case"секунд":i+=" секундийн";break;case"минут":i+=" минутын";break;case"цаг":i+=" цагийн";break;case"өдөр":i+=" өдрийн";break;case"сар":i+=" сарын";break;case"жил":i+=" жилийн";break;case"хоног":i+=" хоногийн";break;case"гаран":i+=" гараны";break;case"хүрэхгүй":i+=" хүрэхгүй хугацааны";break;default:i+=t+"-н"}return n.comparison&&n.comparison>0?i+" дараа":i+" өмнө"}return i},formatLong:yb,formatRelative:(e,t,n,i)=>wb[e],localize:bb,match:kb,options:{weekStartsOn:1,firstWeekContainsDate:1}},Mb={lessThanXSeconds:{one:"kurang dari 1 saat",other:"kurang dari {{count}} saat"},xSeconds:{one:"1 saat",other:"{{count}} saat"},halfAMinute:"setengah minit",lessThanXMinutes:{one:"kurang dari 1 minit",other:"kurang dari {{count}} minit"},xMinutes:{one:"1 minit",other:"{{count}} minit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},Eb={date:ef({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Tb={lastWeek:"eeee 'lepas pada jam' p",yesterday:"'Semalam pada jam' p",today:"'Hari ini pada jam' p",tomorrow:"'Esok pada jam' p",nextWeek:"eeee 'pada jam' p",other:"P"},Pb={code:"ms",formatDistance:(e,t,n)=>{let i;const a=Mb[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"dalam masa "+i:i+" yang lalu":i},formatLong:Eb,formatRelative:(e,t,n,i)=>Tb[e],localize:{ordinalNumber:(e,t)=>"ke-"+Number(e),era:af({values:{narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masihi","Masihi"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["S1","S2","S3","S4"],wide:["Suku pertama","Suku kedua","Suku ketiga","Suku keempat"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","F","M","A","M","J","J","O","S","O","N","D"],abbreviated:["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],wide:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"]},defaultWidth:"wide"}),day:af({values:{narrow:["A","I","S","R","K","J","S"],short:["Ahd","Isn","Sel","Rab","Kha","Jum","Sab"],abbreviated:["Ahd","Isn","Sel","Rab","Kha","Jum","Sab"],wide:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"am",pm:"pm",midnight:"tgh malam",noon:"tgh hari",morning:"pagi",afternoon:"tengah hari",evening:"petang",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"tengah hari",evening:"petang",night:"malam"},wide:{am:"a.m.",pm:"p.m.",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"tengah hari",evening:"petang",night:"malam"}},defaultWidth:"wide",formattingValues:{narrow:{am:"am",pm:"pm",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"tengah hari",evening:"petang",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"tengah hari",evening:"petang",night:"malam"},wide:{am:"a.m.",pm:"p.m.",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"tengah hari",evening:"petang",night:"malam"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^ke-(\d+)?/i,parsePattern:/petama|\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|m\.?)/i,wide:/^(sebelum masihi|masihi)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^s/i,/^(m)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^S[1234]/i,wide:/Suku (pertama|kedua|ketiga|keempat)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/pertama|1/i,/kedua|2/i,/ketiga|3/i,/keempat|4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mac|apr|mei|jun|jul|ogo|sep|okt|nov|dis)/i,wide:/^(januari|februari|mac|april|mei|jun|julai|ogos|september|oktober|november|disember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^o/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^og/i,/^s/i,/^ok/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[aisrkj]/i,short:/^(ahd|isn|sel|rab|kha|jum|sab)/i,abbreviated:/^(ahd|isn|sel|rab|kha|jum|sab)/i,wide:/^(ahad|isnin|selasa|rabu|khamis|jumaat|sabtu)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^a/i,/^i/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^a/i,/^i/i,/^se/i,/^r/i,/^k/i,/^j/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(am|pm|tengah malam|tengah hari|pagi|petang|malam)/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|pagi|petang|malam)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pa/i,afternoon:/tengah h/i,evening:/pe/i,night:/m/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Ab={lessThanXSeconds:{one:"inqas minn sekonda",other:"inqas minn {{count}} sekondi"},xSeconds:{one:"sekonda",other:"{{count}} sekondi"},halfAMinute:"nofs minuta",lessThanXMinutes:{one:"inqas minn minuta",other:"inqas minn {{count}} minuti"},xMinutes:{one:"minuta",other:"{{count}} minuti"},aboutXHours:{one:"madwar siegħa",other:"madwar {{count}} siegħat"},xHours:{one:"siegħa",other:"{{count}} siegħat"},xDays:{one:"ġurnata",other:"{{count}} ġranet"},aboutXWeeks:{one:"madwar ġimgħa",other:"madwar {{count}} ġimgħat"},xWeeks:{one:"ġimgħa",other:"{{count}} ġimgħat"},aboutXMonths:{one:"madwar xahar",other:"madwar {{count}} xhur"},xMonths:{one:"xahar",other:"{{count}} xhur"},aboutXYears:{one:"madwar sena",two:"madwar sentejn",other:"madwar {{count}} snin"},xYears:{one:"sena",two:"sentejn",other:"{{count}} snin"},overXYears:{one:"aktar minn sena",two:"aktar minn sentejn",other:"aktar minn {{count}} snin"},almostXYears:{one:"kważi sena",two:"kważi sentejn",other:"kważi {{count}} snin"}},xb={date:ef({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},_b={lastWeek:"eeee 'li għadda' 'fil-'p",yesterday:"'Il-bieraħ fil-'p",today:"'Illum fil-'p",tomorrow:"'Għada fil-'p",nextWeek:"eeee 'fil-'p",other:"P"},Cb={code:"mt",formatDistance:(e,t,n)=>{let i;const a=Ab[e];return i="string"==typeof a?a:1===t?a.one:2===t&&a.two?a.two:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"f'"+i:i+" ilu":i},formatLong:xb,formatRelative:(e,t,n,i)=>_b[e],localize:{ordinalNumber:(e,t)=>Number(e)+"º",era:af({values:{narrow:["Q","W"],abbreviated:["QK","WK"],wide:["qabel Kristu","wara Kristu"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1. kwart","2. kwart","3. kwart","4. kwart"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","F","M","A","M","Ġ","L","A","S","O","N","D"],abbreviated:["Jan","Fra","Mar","Apr","Mej","Ġun","Lul","Aww","Set","Ott","Nov","Diċ"],wide:["Jannar","Frar","Marzu","April","Mejju","Ġunju","Lulju","Awwissu","Settembru","Ottubru","Novembru","Diċembru"]},defaultWidth:"wide"}),day:af({values:{narrow:["Ħ","T","T","E","Ħ","Ġ","S"],short:["Ħa","Tn","Tl","Er","Ħa","Ġi","Si"],abbreviated:["Ħad","Tne","Tli","Erb","Ħam","Ġim","Sib"],wide:["Il-Ħadd","It-Tnejn","It-Tlieta","L-Erbgħa","Il-Ħamis","Il-Ġimgħa","Is-Sibt"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"a",pm:"p",midnight:"nofsillejl",noon:"nofsinhar",morning:"għodwa",afternoon:"wara nofsinhar",evening:"filgħaxija",night:"lejl"},abbreviated:{am:"AM",pm:"PM",midnight:"nofsillejl",noon:"nofsinhar",morning:"għodwa",afternoon:"wara nofsinhar",evening:"filgħaxija",night:"lejl"},wide:{am:"a.m.",pm:"p.m.",midnight:"nofsillejl",noon:"nofsinhar",morning:"għodwa",afternoon:"wara nofsinhar",evening:"filgħaxija",night:"lejl"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"f'nofsillejl",noon:"f'nofsinhar",morning:"filgħodu",afternoon:"wara nofsinhar",evening:"filgħaxija",night:"billejl"},abbreviated:{am:"AM",pm:"PM",midnight:"f'nofsillejl",noon:"f'nofsinhar",morning:"filgħodu",afternoon:"wara nofsinhar",evening:"filgħaxija",night:"billejl"},wide:{am:"a.m.",pm:"p.m.",midnight:"f'nofsillejl",noon:"f'nofsinhar",morning:"filgħodu",afternoon:"wara nofsinhar",evening:"filgħaxija",night:"billejl"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(q|w)/i,abbreviated:/^(q\.?\s?k\.?|b\.?\s?c\.?\s?e\.?|w\.?\s?k\.?)/i,wide:/^(qabel kristu|before common era|wara kristu|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(q|b)/i,/^(w|c)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^k[1234]/i,wide:/^[1234](\.)? kwart/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmaglsond]/i,abbreviated:/^(jan|fra|mar|apr|mej|ġun|lul|aww|set|ott|nov|diċ)/i,wide:/^(jannar|frar|marzu|april|mejju|ġunju|lulju|awwissu|settembru|ottubru|novembru|diċembru)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^ġ/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^mej/i,/^ġ/i,/^l/i,/^aw/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[ħteġs]/i,short:/^(ħa|tn|tl|er|ħa|ġi|si)/i,abbreviated:/^(ħad|tne|tli|erb|ħam|ġim|sib)/i,wide:/^(il-ħadd|it-tnejn|it-tlieta|l-erbgħa|il-ħamis|il-ġimgħa|is-sibt)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ħ/i,/^t/i,/^t/i,/^e/i,/^ħ/i,/^ġ/i,/^s/i],any:[/^(il-)?ħad/i,/^(it-)?tn/i,/^(it-)?tl/i,/^(l-)?er/i,/^(il-)?ham/i,/^(il-)?ġi/i,/^(is-)?si/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|f'nofsillejl|f'nofsinhar|(ta') (għodwa|wara nofsinhar|filgħaxija|lejl))/i,any:/^([ap]\.?\s?m\.?|f'nofsillejl|f'nofsinhar|(ta') (għodwa|wara nofsinhar|filgħaxija|lejl))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^f'nofsillejl/i,noon:/^f'nofsinhar/i,morning:/għodwa/i,afternoon:/wara(\s.*)nofsinhar/i,evening:/filgħaxija/i,night:/lejl/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Lb={lessThanXSeconds:{one:"mindre enn ett sekund",other:"mindre enn {{count}} sekunder"},xSeconds:{one:"ett sekund",other:"{{count}} sekunder"},halfAMinute:"et halvt minutt",lessThanXMinutes:{one:"mindre enn ett minutt",other:"mindre enn {{count}} minutter"},xMinutes:{one:"ett minutt",other:"{{count}} minutter"},aboutXHours:{one:"omtrent en time",other:"omtrent {{count}} timer"},xHours:{one:"en time",other:"{{count}} timer"},xDays:{one:"en dag",other:"{{count}} dager"},aboutXWeeks:{one:"omtrent en uke",other:"omtrent {{count}} uker"},xWeeks:{one:"en uke",other:"{{count}} uker"},aboutXMonths:{one:"omtrent en måned",other:"omtrent {{count}} måneder"},xMonths:{one:"en måned",other:"{{count}} måneder"},aboutXYears:{one:"omtrent ett år",other:"omtrent {{count}} år"},xYears:{one:"ett år",other:"{{count}} år"},overXYears:{one:"over ett år",other:"over {{count}} år"},almostXYears:{one:"nesten ett år",other:"nesten {{count}} år"}},Ib={date:ef({formats:{full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:ef({formats:{full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Db={lastWeek:"'forrige' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgen kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},Rb={code:"nb",formatDistance:(e,t,n)=>{let i;const a=Lb[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"om "+i:i+" siden":i},formatLong:Ib,formatRelative:(e,t,n,i)=>Db[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["før Kristus","etter Kristus"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","mai","juni","juli","aug.","sep.","okt.","nov.","des."],wide:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"]},defaultWidth:"wide"}),day:af({values:{narrow:["S","M","T","O","T","F","L"],short:["sø","ma","ti","on","to","fr","lø"],abbreviated:["søn","man","tir","ons","tor","fre","lør"],wide:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"a",pm:"p",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natten"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natten"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morgenen",afternoon:"på ettermiddagen",evening:"på kvelden",night:"på natten"}},defaultWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,abbreviated:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,wide:/^(før Kristus|før vår tid|etter Kristus|vår tid)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/i,/^e/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,wide:/^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^aug/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[smtofl]/i,short:/^(sø|ma|ti|on|to|fr|lø)/i,abbreviated:/^(søn|man|tir|ons|tor|fre|lør)/i,wide:/^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,any:/^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a(\.?\s?m\.?)?$/i,pm:/^p(\.?\s?m\.?)?$/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgen/i,afternoon:/ettermiddag/i,evening:/kveld/i,night:/natt/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Wb={lessThanXSeconds:{one:"minder dan een seconde",other:"minder dan {{count}} seconden"},xSeconds:{one:"1 seconde",other:"{{count}} seconden"},halfAMinute:"een halve minuut",lessThanXMinutes:{one:"minder dan een minuut",other:"minder dan {{count}} minuten"},xMinutes:{one:"een minuut",other:"{{count}} minuten"},aboutXHours:{one:"ongeveer 1 uur",other:"ongeveer {{count}} uur"},xHours:{one:"1 uur",other:"{{count}} uur"},xDays:{one:"1 dag",other:"{{count}} dagen"},aboutXWeeks:{one:"ongeveer 1 week",other:"ongeveer {{count}} weken"},xWeeks:{one:"1 week",other:"{{count}} weken"},aboutXMonths:{one:"ongeveer 1 maand",other:"ongeveer {{count}} maanden"},xMonths:{one:"1 maand",other:"{{count}} maanden"},aboutXYears:{one:"ongeveer 1 jaar",other:"ongeveer {{count}} jaar"},xYears:{one:"1 jaar",other:"{{count}} jaar"},overXYears:{one:"meer dan 1 jaar",other:"meer dan {{count}} jaar"},almostXYears:{one:"bijna 1 jaar",other:"bijna {{count}} jaar"}},Nb={date:ef({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd-MM-y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ob={lastWeek:"'afgelopen' eeee 'om' p",yesterday:"'gisteren om' p",today:"'vandaag om' p",tomorrow:"'morgen om' p",nextWeek:"eeee 'om' p",other:"P"},Fb={code:"nl",formatDistance:(e,t,n)=>{let i;const a=Wb[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"over "+i:i+" geleden":i},formatLong:Nb,formatRelative:(e,t,n,i)=>Ob[e],localize:{ordinalNumber:(e,t)=>Number(e)+"e",era:af({values:{narrow:["v.C.","n.C."],abbreviated:["v.Chr.","n.Chr."],wide:["voor Christus","na Christus"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1e kwartaal","2e kwartaal","3e kwartaal","4e kwartaal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mrt.","apr.","mei","jun.","jul.","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"]},defaultWidth:"wide"}),day:af({values:{narrow:["Z","M","D","W","D","V","Z"],short:["zo","ma","di","wo","do","vr","za"],abbreviated:["zon","maa","din","woe","don","vri","zat"],wide:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"},abbreviated:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"},wide:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"}},defaultWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)e?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^([vn]\.? ?C\.?)/,abbreviated:/^([vn]\. ?Chr\.?)/,wide:/^((voor|na) Christus)/},defaultMatchWidth:"wide",parsePatterns:{any:[/^v/,/^n/]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^K[1234]/i,wide:/^[1234]e kwartaal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mrt.|apr.|mei|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^jan/i,/^feb/i,/^m(r|a)/i,/^apr/i,/^mei/i,/^jun/i,/^jul/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[zmdwv]/i,short:/^(zo|ma|di|wo|do|vr|za)/i,abbreviated:/^(zon|maa|din|woe|don|vri|zat)/i,wide:/^(zondag|maandag|dinsdag|woensdag|donderdag|vrijdag|zaterdag)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^z/i,/^m/i,/^d/i,/^w/i,/^d/i,/^v/i,/^z/i],any:[/^zo/i,/^ma/i,/^di/i,/^wo/i,/^do/i,/^vr/i,/^za/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(am|pm|middernacht|het middaguur|'s (ochtends|middags|avonds|nachts))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^am/i,pm:/^pm/i,midnight:/^middernacht/i,noon:/^het middaguur/i,morning:/ochtend/i,afternoon:/middag/i,evening:/avond/i,night:/nacht/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},jb={lessThanXSeconds:{one:"minder dan een seconde",other:"minder dan {{count}} seconden"},xSeconds:{one:"1 seconde",other:"{{count}} seconden"},halfAMinute:"een halve minuut",lessThanXMinutes:{one:"minder dan een minuut",other:"minder dan {{count}} minuten"},xMinutes:{one:"een minuut",other:"{{count}} minuten"},aboutXHours:{one:"ongeveer 1 uur",other:"ongeveer {{count}} uur"},xHours:{one:"1 uur",other:"{{count}} uur"},xDays:{one:"1 dag",other:"{{count}} dagen"},aboutXWeeks:{one:"ongeveer 1 week",other:"ongeveer {{count}} weken"},xWeeks:{one:"1 week",other:"{{count}} weken"},aboutXMonths:{one:"ongeveer 1 maand",other:"ongeveer {{count}} maanden"},xMonths:{one:"1 maand",other:"{{count}} maanden"},aboutXYears:{one:"ongeveer 1 jaar",other:"ongeveer {{count}} jaar"},xYears:{one:"1 jaar",other:"{{count}} jaar"},overXYears:{one:"meer dan 1 jaar",other:"meer dan {{count}} jaar"},almostXYears:{one:"bijna 1 jaar",other:"bijna {{count}} jaar"}},zb={date:ef({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},$b={lastWeek:"'vorige' eeee 'om' p",yesterday:"'gisteren om' p",today:"'vandaag om' p",tomorrow:"'morgen om' p",nextWeek:"eeee 'om' p",other:"P"},Ub={code:"nl-BE",formatDistance:(e,t,n)=>{let i;const a=jb[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"over "+i:i+" geleden":i},formatLong:zb,formatRelative:(e,t,n,i)=>$b[e],localize:{ordinalNumber:(e,t)=>Number(e)+"e",era:af({values:{narrow:["v.C.","n.C."],abbreviated:["v.Chr.","n.Chr."],wide:["voor Christus","na Christus"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1e kwartaal","2e kwartaal","3e kwartaal","4e kwartaal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mrt.","apr.","mei","jun.","jul.","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"]},defaultWidth:"wide"}),day:af({values:{narrow:["Z","M","D","W","D","V","Z"],short:["zo","ma","di","wo","do","vr","za"],abbreviated:["zon","maa","din","woe","don","vri","zat"],wide:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middag",morning:"'s ochtends",afternoon:"'s namiddags",evening:"'s avonds",night:"'s nachts"},abbreviated:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middag",morning:"'s ochtends",afternoon:"'s namiddags",evening:"'s avonds",night:"'s nachts"},wide:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middag",morning:"'s ochtends",afternoon:"'s namiddags",evening:"'s avonds",night:"'s nachts"}},defaultWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)e?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^([vn]\.? ?C\.?)/,abbreviated:/^([vn]\. ?Chr\.?)/,wide:/^((voor|na) Christus)/},defaultMatchWidth:"wide",parsePatterns:{any:[/^v/,/^n/]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^K[1234]/i,wide:/^[1234]e kwartaal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mrt.|apr.|mei|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^jan/i,/^feb/i,/^m(r|a)/i,/^apr/i,/^mei/i,/^jun/i,/^jul/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[zmdwv]/i,short:/^(zo|ma|di|wo|do|vr|za)/i,abbreviated:/^(zon|maa|din|woe|don|vri|zat)/i,wide:/^(zondag|maandag|dinsdag|woensdag|donderdag|vrijdag|zaterdag)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^z/i,/^m/i,/^d/i,/^w/i,/^d/i,/^v/i,/^z/i],any:[/^zo/i,/^ma/i,/^di/i,/^wo/i,/^do/i,/^vr/i,/^za/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(am|pm|middernacht|het middaguur|'s (ochtends|middags|avonds|nachts))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^am/i,pm:/^pm/i,midnight:/^middernacht/i,noon:/^het middaguur/i,morning:/ochtend/i,afternoon:/middag/i,evening:/avond/i,night:/nacht/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Hb={lessThanXSeconds:{one:"mindre enn eitt sekund",other:"mindre enn {{count}} sekund"},xSeconds:{one:"eitt sekund",other:"{{count}} sekund"},halfAMinute:"eit halvt minutt",lessThanXMinutes:{one:"mindre enn eitt minutt",other:"mindre enn {{count}} minutt"},xMinutes:{one:"eitt minutt",other:"{{count}} minutt"},aboutXHours:{one:"omtrent ein time",other:"omtrent {{count}} timar"},xHours:{one:"ein time",other:"{{count}} timar"},xDays:{one:"ein dag",other:"{{count}} dagar"},aboutXWeeks:{one:"omtrent ei veke",other:"omtrent {{count}} veker"},xWeeks:{one:"ei veke",other:"{{count}} veker"},aboutXMonths:{one:"omtrent ein månad",other:"omtrent {{count}} månader"},xMonths:{one:"ein månad",other:"{{count}} månader"},aboutXYears:{one:"omtrent eitt år",other:"omtrent {{count}} år"},xYears:{one:"eitt år",other:"{{count}} år"},overXYears:{one:"over eitt år",other:"over {{count}} år"},almostXYears:{one:"nesten eitt år",other:"nesten {{count}} år"}},Bb=["null","ein","to","tre","fire","fem","seks","sju","åtte","ni","ti","elleve","tolv"],Gb={date:ef({formats:{full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:ef({formats:{full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Xb={lastWeek:"'førre' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgon kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},Yb={code:"nn",formatDistance:(e,t,n)=>{let i;const a=Hb[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t<13?Bb[t]:String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"om "+i:i+" sidan":i},formatLong:Gb,formatRelative:(e,t,n,i)=>Xb[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["før Kristus","etter Kristus"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","mai","juni","juli","aug.","sep.","okt.","nov.","des."],wide:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"]},defaultWidth:"wide"}),day:af({values:{narrow:["S","M","T","O","T","F","L"],short:["su","må","ty","on","to","fr","lau"],abbreviated:["sun","mån","tys","ons","tor","fre","laur"],wide:["sundag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"a",pm:"p",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natta"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natta"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morgonen",afternoon:"på ettermiddagen",evening:"på kvelden",night:"på natta"}},defaultWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,abbreviated:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,wide:/^(før Kristus|før vår tid|etter Kristus|vår tid)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/i,/^e/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,wide:/^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^aug/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[smtofl]/i,short:/^(su|må|ty|on|to|fr|la)/i,abbreviated:/^(sun|mån|tys|ons|tor|fre|laur)/i,wide:/^(sundag|måndag|tysdag|onsdag|torsdag|fredag|laurdag)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^s/i,/^m/i,/^ty/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(midnatt|middag|(på) (morgonen|ettermiddagen|kvelden|natta)|[ap])/i,any:/^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgonen|ettermiddagen|kvelden|natta))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a(\.?\s?m\.?)?$/i,pm:/^p(\.?\s?m\.?)?$/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgon/i,afternoon:/ettermiddag/i,evening:/kveld/i,night:/natt/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Vb={lessThanXSeconds:{one:"mens d’una segonda",other:"mens de {{count}} segondas"},xSeconds:{one:"1 segonda",other:"{{count}} segondas"},halfAMinute:"30 segondas",lessThanXMinutes:{one:"mens d’una minuta",other:"mens de {{count}} minutas"},xMinutes:{one:"1 minuta",other:"{{count}} minutas"},aboutXHours:{one:"environ 1 ora",other:"environ {{count}} oras"},xHours:{one:"1 ora",other:"{{count}} oras"},xDays:{one:"1 jorn",other:"{{count}} jorns"},aboutXWeeks:{one:"environ 1 setmana",other:"environ {{count}} setmanas"},xWeeks:{one:"1 setmana",other:"{{count}} setmanas"},aboutXMonths:{one:"environ 1 mes",other:"environ {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"mai d’un an",other:"mai de {{count}} ans"},almostXYears:{one:"gaireben un an",other:"gaireben {{count}} ans"}},Kb={date:ef({formats:{full:"EEEE d 'de' MMMM y",long:"d 'de' MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'a' {{time}}",long:"{{date}} 'a' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},qb={lastWeek:"eeee 'passat a' p",yesterday:"'ièr a' p",today:"'uèi a' p",tomorrow:"'deman a' p",nextWeek:"eeee 'a' p",other:"P"},Jb={code:"oc",formatDistance:(e,t,n)=>{let i;const a=Vb[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"d’aquí "+i:"fa "+i:i},formatLong:Kb,formatRelative:(e,t,n,i)=>qb[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),i=t?.unit;let a;switch(n){case 1:a="èr";break;case 2:a="nd";break;default:a="en"}return"year"!==i&&"week"!==i&&"hour"!==i&&"minute"!==i&&"second"!==i||(a+="a"),n+a},era:af({values:{narrow:["ab. J.C.","apr. J.C."],abbreviated:["ab. J.C.","apr. J.C."],wide:["abans Jèsus-Crist","après Jèsus-Crist"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["T1","T2","T3","T4"],abbreviated:["1èr trim.","2nd trim.","3en trim.","4en trim."],wide:["1èr trimèstre","2nd trimèstre","3en trimèstre","4en trimèstre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["GN","FB","MÇ","AB","MA","JN","JL","AG","ST","OC","NV","DC"],abbreviated:["gen.","febr.","març","abr.","mai","junh","jul.","ag.","set.","oct.","nov.","dec."],wide:["genièr","febrièr","març","abril","mai","junh","julhet","agost","setembre","octòbre","novembre","decembre"]},defaultWidth:"wide"}),day:af({values:{narrow:["dg.","dl.","dm.","dc.","dj.","dv.","ds."],short:["dg.","dl.","dm.","dc.","dj.","dv.","ds."],abbreviated:["dg.","dl.","dm.","dc.","dj.","dv.","ds."],wide:["dimenge","diluns","dimars","dimècres","dijòus","divendres","dissabte"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"am",pm:"pm",midnight:"mièjanuèch",noon:"miègjorn",morning:"matin",afternoon:"aprèp-miègjorn",evening:"vèspre",night:"nuèch"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"mièjanuèch",noon:"miègjorn",morning:"matin",afternoon:"aprèp-miègjorn",evening:"vèspre",night:"nuèch"},wide:{am:"a.m.",pm:"p.m.",midnight:"mièjanuèch",noon:"miègjorn",morning:"matin",afternoon:"aprèp-miègjorn",evening:"vèspre",night:"nuèch"}},defaultWidth:"wide",formattingValues:{narrow:{am:"am",pm:"pm",midnight:"mièjanuèch",noon:"miègjorn",morning:"del matin",afternoon:"de l’aprèp-miègjorn",evening:"del ser",night:"de la nuèch"},abbreviated:{am:"AM",pm:"PM",midnight:"mièjanuèch",noon:"miègjorn",morning:"del matin",afternoon:"de l’aprèp-miègjorn",evening:"del ser",night:"de la nuèch"},wide:{am:"ante meridiem",pm:"post meridiem",midnight:"mièjanuèch",noon:"miègjorn",morning:"del matin",afternoon:"de l’aprèp-miègjorn",evening:"del ser",night:"de la nuèch"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(èr|nd|en)?[a]?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(ab\.J\.C|apr\.J\.C|apr\.J\.-C)/i,abbreviated:/^(ab\.J\.-C|ab\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(abans Jèsus-Crist|après Jèsus-Crist)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ab/i,/^ap/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^T[1234]/i,abbreviated:/^[1234](èr|nd|en)? trim\.?/i,wide:/^[1234](èr|nd|en)? trimèstre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(GN|FB|MÇ|AB|MA|JN|JL|AG|ST|OC|NV|DC)/i,abbreviated:/^(gen|febr|març|abr|mai|junh|jul|ag|set|oct|nov|dec)\.?/i,wide:/^(genièr|febrièr|març|abril|mai|junh|julhet|agost|setembre|octòbre|novembre|decembre)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^g/i,/^f/i,/^ma[r?]|MÇ/i,/^ab/i,/^ma[i?]/i,/^ju[n?]|JN/i,/^ju[l?]|JL/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^d[glmcjvs]\.?/i,short:/^d[glmcjvs]\.?/i,abbreviated:/^d[glmcjvs]\.?/i,wide:/^(dimenge|diluns|dimars|dimècres|dijòus|divendres|dissabte)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^dg/i,/^dl/i,/^dm/i,/^dc/i,/^dj/i,/^dv/i,/^ds/i],short:[/^dg/i,/^dl/i,/^dm/i,/^dc/i,/^dj/i,/^dv/i,/^ds/i],abbreviated:[/^dg/i,/^dl/i,/^dm/i,/^dc/i,/^dj/i,/^dv/i,/^ds/i],any:[/^dg|dime/i,/^dl|dil/i,/^dm|dima/i,/^dc|dimè/i,/^dj|dij/i,/^dv|div/i,/^ds|dis/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/(^(a\.?m|p\.?m))|(ante meridiem|post meridiem)|((del |de la |de l’)(matin|aprèp-miègjorn|vèspre|ser|nuèch))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/(^a)|ante meridiem/i,pm:/(^p)|post meridiem/i,midnight:/^mièj/i,noon:/^mièg/i,morning:/matin/i,afternoon:/aprèp-miègjorn/i,evening:/vèspre|ser/i,night:/nuèch/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Qb={lessThanXSeconds:{one:{regular:"mniej niż sekunda",past:"mniej niż sekundę",future:"mniej niż sekundę"},twoFour:"mniej niż {{count}} sekundy",other:"mniej niż {{count}} sekund"},xSeconds:{one:{regular:"sekunda",past:"sekundę",future:"sekundę"},twoFour:"{{count}} sekundy",other:"{{count}} sekund"},halfAMinute:{one:"pół minuty",twoFour:"pół minuty",other:"pół minuty"},lessThanXMinutes:{one:{regular:"mniej niż minuta",past:"mniej niż minutę",future:"mniej niż minutę"},twoFour:"mniej niż {{count}} minuty",other:"mniej niż {{count}} minut"},xMinutes:{one:{regular:"minuta",past:"minutę",future:"minutę"},twoFour:"{{count}} minuty",other:"{{count}} minut"},aboutXHours:{one:{regular:"około godziny",past:"około godziny",future:"około godzinę"},twoFour:"około {{count}} godziny",other:"około {{count}} godzin"},xHours:{one:{regular:"godzina",past:"godzinę",future:"godzinę"},twoFour:"{{count}} godziny",other:"{{count}} godzin"},xDays:{one:{regular:"dzień",past:"dzień",future:"1 dzień"},twoFour:"{{count}} dni",other:"{{count}} dni"},aboutXWeeks:{one:"około tygodnia",twoFour:"około {{count}} tygodni",other:"około {{count}} tygodni"},xWeeks:{one:"tydzień",twoFour:"{{count}} tygodnie",other:"{{count}} tygodni"},aboutXMonths:{one:"około miesiąc",twoFour:"około {{count}} miesiące",other:"około {{count}} miesięcy"},xMonths:{one:"miesiąc",twoFour:"{{count}} miesiące",other:"{{count}} miesięcy"},aboutXYears:{one:"około rok",twoFour:"około {{count}} lata",other:"około {{count}} lat"},xYears:{one:"rok",twoFour:"{{count}} lata",other:"{{count}} lat"},overXYears:{one:"ponad rok",twoFour:"ponad {{count}} lata",other:"ponad {{count}} lat"},almostXYears:{one:"prawie rok",twoFour:"prawie {{count}} lata",other:"prawie {{count}} lat"}};function Zb(e,t,n){const i=function(e,t){if(1===t)return e.one;const n=t%100;if(n<=20&&n>10)return e.other;const i=n%10;return i>=2&&i<=4?e.twoFour:e.other}(e,t);return("string"==typeof i?i:i[n]).replace("{{count}}",String(t))}const ek={date:ef({formats:{full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},tk={masculine:"ostatni",feminine:"ostatnia"},nk={masculine:"ten",feminine:"ta"},ik={masculine:"następny",feminine:"następna"},ak={0:"feminine",1:"masculine",2:"masculine",3:"feminine",4:"masculine",5:"masculine",6:"feminine"};function rk(e,t,n,i){let a;if(Vf(t,n,i))a=nk;else if("lastWeek"===e)a=tk;else{if("nextWeek"!==e)throw new Error(`Cannot determine adjectives for token ${e}`);a=ik}const r=t.getDay();return`'${a[ak[r]]}' eeee 'o' p`}const ok={lastWeek:rk,yesterday:"'wczoraj o' p",today:"'dzisiaj o' p",tomorrow:"'jutro o' p",nextWeek:rk,other:"P"},sk={code:"pl",formatDistance:(e,t,n)=>{const i=Qb[e];return n?.addSuffix?n.comparison&&n.comparison>0?"za "+Zb(i,t,"future"):Zb(i,t,"past")+" temu":Zb(i,t,"regular")},formatLong:ek,formatRelative:(e,t,n,i)=>{const a=ok[e];return"function"==typeof a?a(e,t,n,i):a},localize:{ordinalNumber:(e,t)=>String(e),era:af({values:{narrow:["p.n.e.","n.e."],abbreviated:["p.n.e.","n.e."],wide:["przed naszą erą","naszej ery"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["I kw.","II kw.","III kw.","IV kw."],wide:["I kwartał","II kwartał","III kwartał","IV kwartał"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["S","L","M","K","M","C","L","S","W","P","L","G"],abbreviated:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],wide:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"]},defaultWidth:"wide",formattingValues:{narrow:["s","l","m","k","m","c","l","s","w","p","l","g"],abbreviated:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],wide:["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["N","P","W","Ś","C","P","S"],short:["nie","pon","wto","śro","czw","pią","sob"],abbreviated:["niedz.","pon.","wt.","śr.","czw.","pt.","sob."],wide:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"]},defaultWidth:"wide",formattingValues:{narrow:["n","p","w","ś","c","p","s"],short:["nie","pon","wto","śro","czw","pią","sob"],abbreviated:["niedz.","pon.","wt.","śr.","czw.","pt.","sob."],wide:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"]},defaultFormattingWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"a",pm:"p",midnight:"półn.",noon:"poł",morning:"rano",afternoon:"popoł.",evening:"wiecz.",night:"noc"},abbreviated:{am:"AM",pm:"PM",midnight:"północ",noon:"południe",morning:"rano",afternoon:"popołudnie",evening:"wieczór",night:"noc"},wide:{am:"AM",pm:"PM",midnight:"północ",noon:"południe",morning:"rano",afternoon:"popołudnie",evening:"wieczór",night:"noc"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"o półn.",noon:"w poł.",morning:"rano",afternoon:"po poł.",evening:"wiecz.",night:"w nocy"},abbreviated:{am:"AM",pm:"PM",midnight:"o północy",noon:"w południe",morning:"rano",afternoon:"po południu",evening:"wieczorem",night:"w nocy"},wide:{am:"AM",pm:"PM",midnight:"o północy",noon:"w południe",morning:"rano",afternoon:"po południu",evening:"wieczorem",night:"w nocy"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,abbreviated:/^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,wide:/^(przed\s*nasz(ą|a)\s*er(ą|a)|naszej\s*ery)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^p/i,/^n/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^(I|II|III|IV)\s*kw\.?/i,wide:/^(I|II|III|IV)\s*kwarta(ł|l)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/1/i,/2/i,/3/i,/4/i],any:[/^I kw/i,/^II kw/i,/^III kw/i,/^IV kw/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[slmkcwpg]/i,abbreviated:/^(sty|lut|mar|kwi|maj|cze|lip|sie|wrz|pa(ź|z)|lis|gru)/i,wide:/^(stycznia|stycze(ń|n)|lutego|luty|marca|marzec|kwietnia|kwiecie(ń|n)|maja|maj|czerwca|czerwiec|lipca|lipiec|sierpnia|sierpie(ń|n)|wrze(ś|s)nia|wrzesie(ń|n)|pa(ź|z)dziernika|pa(ź|z)dziernik|listopada|listopad|grudnia|grudzie(ń|n))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^l/i,/^m/i,/^k/i,/^m/i,/^c/i,/^l/i,/^s/i,/^w/i,/^p/i,/^l/i,/^g/i],any:[/^st/i,/^lu/i,/^mar/i,/^k/i,/^maj/i,/^c/i,/^lip/i,/^si/i,/^w/i,/^p/i,/^lis/i,/^g/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[npwścs]/i,short:/^(nie|pon|wto|(ś|s)ro|czw|pi(ą|a)|sob)/i,abbreviated:/^(niedz|pon|wt|(ś|s)r|czw|pt|sob)\.?/i,wide:/^(niedziela|poniedzia(ł|l)ek|wtorek|(ś|s)roda|czwartek|pi(ą|a)tek|sobota)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^n/i,/^p/i,/^w/i,/^ś/i,/^c/i,/^p/i,/^s/i],abbreviated:[/^n/i,/^po/i,/^w/i,/^(ś|s)r/i,/^c/i,/^pt/i,/^so/i],any:[/^n/i,/^po/i,/^w/i,/^(ś|s)r/i,/^c/i,/^pi/i,/^so/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(^a$|^p$|pó(ł|l)n\.?|o\s*pó(ł|l)n\.?|po(ł|l)\.?|w\s*po(ł|l)\.?|po\s*po(ł|l)\.?|rano|wiecz\.?|noc|w\s*nocy)/i,any:/^(am|pm|pó(ł|l)noc|o\s*pó(ł|l)nocy|po(ł|l)udnie|w\s*po(ł|l)udnie|popo(ł|l)udnie|po\s*po(ł|l)udniu|rano|wieczór|wieczorem|noc|w\s*nocy)/i},defaultMatchWidth:"any",parsePatterns:{narrow:{am:/^a$/i,pm:/^p$/i,midnight:/pó(ł|l)n/i,noon:/po(ł|l)/i,morning:/rano/i,afternoon:/po\s*po(ł|l)/i,evening:/wiecz/i,night:/noc/i},any:{am:/^am/i,pm:/^pm/i,midnight:/pó(ł|l)n/i,noon:/po(ł|l)/i,morning:/rano/i,afternoon:/po\s*po(ł|l)/i,evening:/wiecz/i,night:/noc/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},lk={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"aproximadamente 1 hora",other:"aproximadamente {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"aproximadamente 1 semana",other:"aproximadamente {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"aproximadamente 1 mês",other:"aproximadamente {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"aproximadamente 1 ano",other:"aproximadamente {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},dk={date:ef({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d 'de' MMM 'de' y",short:"dd/MM/y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},uk={lastWeek:e=>{const t=e.getDay();return"'"+(0===t||6===t?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},ck={code:"pt",formatDistance:(e,t,n)=>{let i;const a=lk[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"daqui a "+i:"há "+i:i},formatLong:dk,formatRelative:(e,t,n,i)=>{const a=uk[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>Number(e)+"º",era:af({values:{narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},defaultWidth:"wide"}),day:af({values:{narrow:["d","s","t","q","q","s","s"],short:["dom","seg","ter","qua","qui","sex","sáb"],abbreviated:["dom","seg","ter","qua","qui","sex","sáb"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(º|ª)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes da era comum|depois de cristo|era comum)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes da era comum)/i,/^(depois de cristo|era comum)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º|ª)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ab/i,/^mai/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[dstq]/i,short:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,wide:/^(domingo|segunda-?\s?feira|terça-?\s?feira|quarta-?\s?feira|quinta-?\s?feira|sexta-?\s?feira|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^s/i,/^t/i,/^q/i,/^q/i,/^s/i,/^s/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[áa]/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i,any:/^([ap]\.?\s?m\.?|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^meia/i,noon:/^meio/i,morning:/manh[ãa]/i,afternoon:/tarde/i,evening:/noite/i,night:/madrugada/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},hk={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},mk={date:ef({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},fk={lastWeek:e=>{const t=e.getDay();return"'"+(0===t||6===t?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},pk={code:"pt-BR",formatDistance:(e,t,n)=>{let i;const a=hk[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"em "+i:"há "+i:i},formatLong:mk,formatRelative:(e,t,n,i)=>{const a=fk[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>{const n=Number(e);return"week"===t?.unit?n+"ª":n+"º"},era:af({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},defaultWidth:"wide"}),day:af({values:{narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)[ºªo]?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},defaultMatchWidth:"wide",parsePatterns:{short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},gk={lessThanXSeconds:{one:"mai puțin de o secundă",other:"mai puțin de {{count}} secunde"},xSeconds:{one:"1 secundă",other:"{{count}} secunde"},halfAMinute:"jumătate de minut",lessThanXMinutes:{one:"mai puțin de un minut",other:"mai puțin de {{count}} minute"},xMinutes:{one:"1 minut",other:"{{count}} minute"},aboutXHours:{one:"circa 1 oră",other:"circa {{count}} ore"},xHours:{one:"1 oră",other:"{{count}} ore"},xDays:{one:"1 zi",other:"{{count}} zile"},aboutXWeeks:{one:"circa o săptămână",other:"circa {{count}} săptămâni"},xWeeks:{one:"1 săptămână",other:"{{count}} săptămâni"},aboutXMonths:{one:"circa 1 lună",other:"circa {{count}} luni"},xMonths:{one:"1 lună",other:"{{count}} luni"},aboutXYears:{one:"circa 1 an",other:"circa {{count}} ani"},xYears:{one:"1 an",other:"{{count}} ani"},overXYears:{one:"peste 1 an",other:"peste {{count}} ani"},almostXYears:{one:"aproape 1 an",other:"aproape {{count}} ani"}},vk={date:ef({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'la' {{time}}",long:"{{date}} 'la' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},yk={lastWeek:"eeee 'trecută la' p",yesterday:"'ieri la' p",today:"'astăzi la' p",tomorrow:"'mâine la' p",nextWeek:"eeee 'viitoare la' p",other:"P"},wk={code:"ro",formatDistance:(e,t,n)=>{let i;const a=gk[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"în "+i:i+" în urmă":i},formatLong:vk,formatRelative:(e,t,n,i)=>yk[e],localize:{ordinalNumber:(e,t)=>String(e),era:af({values:{narrow:["Î","D"],abbreviated:["Î.d.C.","D.C."],wide:["Înainte de Cristos","După Cristos"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["primul trimestru","al doilea trimestru","al treilea trimestru","al patrulea trimestru"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["I","F","M","A","M","I","I","A","S","O","N","D"],abbreviated:["ian","feb","mar","apr","mai","iun","iul","aug","sep","oct","noi","dec"],wide:["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie"]},defaultWidth:"wide"}),day:af({values:{narrow:["d","l","m","m","j","v","s"],short:["du","lu","ma","mi","jo","vi","sâ"],abbreviated:["dum","lun","mar","mie","joi","vin","sâm"],wide:["duminică","luni","marți","miercuri","joi","vineri","sâmbătă"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"ami",morning:"dim",afternoon:"da",evening:"s",night:"n"},abbreviated:{am:"AM",pm:"PM",midnight:"miezul nopții",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"},wide:{am:"a.m.",pm:"p.m.",midnight:"miezul nopții",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"},abbreviated:{am:"AM",pm:"PM",midnight:"miezul nopții",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"},wide:{am:"a.m.",pm:"p.m.",midnight:"miezul nopții",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(Î|D)/i,abbreviated:/^(Î\.?\s?d\.?\s?C\.?|Î\.?\s?e\.?\s?n\.?|D\.?\s?C\.?|e\.?\s?n\.?)/i,wide:/^(Înainte de Cristos|Înaintea erei noastre|După Cristos|Era noastră)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ÎC/i,/^DC/i],wide:[/^(Înainte de Cristos|Înaintea erei noastre)/i,/^(După Cristos|Era noastră)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^trimestrul [1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[ifmaasond]/i,abbreviated:/^(ian|feb|mar|apr|mai|iun|iul|aug|sep|oct|noi|dec)/i,wide:/^(ianuarie|februarie|martie|aprilie|mai|iunie|iulie|august|septembrie|octombrie|noiembrie|decembrie)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^i/i,/^f/i,/^m/i,/^a/i,/^m/i,/^i/i,/^i/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ia/i,/^f/i,/^mar/i,/^ap/i,/^mai/i,/^iun/i,/^iul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(d|l|ma|mi|j|v|s)/i,abbreviated:/^(dum|lun|mar|mie|jo|vi|sâ)/i,wide:/^(duminica|luni|marţi|miercuri|joi|vineri|sâmbătă)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^mi/i,/^j/i,/^v/i,/^s/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|mn|a|(dimineaţa|după-amiaza|seara|noaptea))/i,any:/^([ap]\.?\s?m\.?|miezul nopții|amiaza|(dimineaţa|după-amiaza|seara|noaptea))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/amiaza/i,morning:/dimineaţa/i,afternoon:/după-amiaza/i,evening:/seara/i,night:/noaptea/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}};function bk(e,t){if(void 0!==e.one&&1===t)return e.one;const n=t%10,i=t%100;return 1===n&&11!==i?e.singularNominative.replace("{{count}}",String(t)):n>=2&&n<=4&&(i<10||i>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function kk(e){return(t,n)=>n?.addSuffix?n.comparison&&n.comparison>0?e.future?bk(e.future,t):"через "+bk(e.regular,t):e.past?bk(e.past,t):bk(e.regular,t)+" назад":bk(e.regular,t)}const Sk={lessThanXSeconds:kk({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:kk({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду назад",singularGenitive:"{{count}} секунды назад",pluralGenitive:"{{count}} секунд назад"},future:{singularNominative:"через {{count}} секунду",singularGenitive:"через {{count}} секунды",pluralGenitive:"через {{count}} секунд"}}),halfAMinute:(e,t)=>t?.addSuffix?t.comparison&&t.comparison>0?"через полминуты":"полминуты назад":"полминуты",lessThanXMinutes:kk({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:kk({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:kk({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:kk({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:kk({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:kk({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:kk({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:kk({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:kk({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:kk({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:kk({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:kk({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:kk({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})},Mk={date:ef({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:ef({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:ef({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},Ek=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function Tk(e){const t=Ek[e];return 2===e?"'во "+t+" в' p":"'в "+t+" в' p"}const Pk={lastWeek:(e,t,n)=>{const i=e.getDay();return Vf(e,t,n)?Tk(i):function(e){const t=Ek[e];switch(e){case 0:return"'в прошлое "+t+" в' p";case 1:case 2:case 4:return"'в прошлый "+t+" в' p";case 3:case 5:case 6:return"'в прошлую "+t+" в' p"}}(i)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:(e,t,n)=>{const i=e.getDay();return Vf(e,t,n)?Tk(i):function(e){const t=Ek[e];switch(e){case 0:return"'в следующее "+t+" в' p";case 1:case 2:case 4:return"'в следующий "+t+" в' p";case 3:case 5:case 6:return"'в следующую "+t+" в' p"}}(i)},other:"P"},Ak={code:"ru",formatDistance:(e,t,n)=>Sk[e](t,n),formatLong:Mk,formatRelative:(e,t,n,i)=>{const a=Pk[e];return"function"==typeof a?a(t,n,i):a},localize:{ordinalNumber:(e,t)=>{const n=Number(e),i=t?.unit;let a;return a="date"===i?"-е":"week"===i||"minute"===i||"second"===i?"-я":"-й",n+a},era:af({values:{narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},defaultWidth:"wide",formattingValues:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утро",afternoon:"день",evening:"вечер",night:"ночь"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утра",afternoon:"дня",evening:"вечера",night:"ночи"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},xk={lessThanXSeconds:{one:"unnit go ovtta sekundda",other:"unnit go {{count}} sekundda"},xSeconds:{one:"sekundda",other:"{{count}} sekundda"},halfAMinute:"bealle minuhta",lessThanXMinutes:{one:"unnit go bealle minuhta",other:"unnit go {{count}} minuhta"},xMinutes:{one:"minuhta",other:"{{count}} minuhta"},aboutXHours:{one:"sullii ovtta diimmu",other:"sullii {{count}} diimmu"},xHours:{one:"diimmu",other:"{{count}} diimmu"},xDays:{one:"beaivvi",other:"{{count}} beaivvi"},aboutXWeeks:{one:"sullii ovtta vahku",other:"sullii {{count}} vahku"},xWeeks:{one:"vahku",other:"{{count}} vahku"},aboutXMonths:{one:"sullii ovtta mánu",other:"sullii {{count}} mánu"},xMonths:{one:"mánu",other:"{{count}} mánu"},aboutXYears:{one:"sullii ovtta jagi",other:"sullii {{count}} jagi"},xYears:{one:"jagi",other:"{{count}} jagi"},overXYears:{one:"guhkit go jagi",other:"guhkit go {{count}} jagi"},almostXYears:{one:"measta jagi",other:"measta {{count}} jagi"}},_k={date:ef({formats:{full:"EEEE MMMM d. 'b.' y",long:"MMMM d. 'b.' y",medium:"MMM d. 'b.' y",short:"dd.MM.y"},defaultWidth:"full"}),time:ef({formats:{full:"'dii.' HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'dii.' {{time}}",long:"{{date}} 'dii.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Ck={lastWeek:"'ovddit' eeee 'dii.' p",yesterday:"'ikte dii.' p",today:"'odne dii.' p",tomorrow:"'ihtin dii.' p",nextWeek:"EEEE 'dii.' p",other:"P"},Lk={code:"se",formatDistance:(e,t,n)=>{let i;const a=xk[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"geahčen "+i:i+" áigi":i},formatLong:_k,formatRelative:(e,t,n,i)=>Ck[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["o.Kr.","m.Kr."],abbreviated:["o.Kr.","m.Kr."],wide:["ovdal Kristusa","maŋŋel Kristusa"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. kvartála","2. kvartála","3. kvartála","4. kvartála"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["O","G","N","C","M","G","S","B","Č","G","S","J"],abbreviated:["ođđa","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov"],wide:["ođđajagemánnu","guovvamánnu","njukčamánnu","cuoŋománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","čakčamánnu","golggotmánnu","skábmamánnu","juovlamánnu"]},defaultWidth:"wide"}),day:af({values:{narrow:["S","V","M","G","D","B","L"],short:["sotn","vuos","maŋ","gask","duor","bear","láv"],abbreviated:["sotn","vuos","maŋ","gask","duor","bear","láv"],wide:["sotnabeaivi","vuossárga","maŋŋebárga","gaskavahkku","duorastat","bearjadat","lávvardat"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"a",pm:"p",midnight:"gaskaidja",noon:"gaskabeaivi",morning:"iđđes",afternoon:"maŋŋel gaska.",evening:"eahkes",night:"ihkku"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"gaskaidja",noon:"gaskabeaivvi",morning:"iđđes",afternoon:"maŋŋel gaskabea.",evening:"eahkes",night:"ihkku"},wide:{am:"a.m.",pm:"p.m.",midnight:"gaskaidja",noon:"gaskabeavvi",morning:"iđđes",afternoon:"maŋŋel gaskabeaivvi",evening:"eahkes",night:"ihkku"}},defaultWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(o\.? ?Kr\.?|m\.? ?Kr\.?)/i,abbreviated:/^(o\.? ?Kr\.?|m\.? ?Kr\.?)/i,wide:/^(ovdal Kristusa|ovdal min áiggi|maŋŋel Kristusa|min áigi)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^o/i,/^m/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? kvartála/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[ogncmsbčj]/i,abbreviated:/^(ođđa|guov|njuk|cuo|mies|geas|suoi|borg|čakč|golg|skáb|juov)\.?/i,wide:/^(ođđajagemánnu|guovvamánnu|njukčamánnu|cuoŋománnu|miessemánnu|geassemánnu|suoidnemánnu|borgemánnu|čakčamánnu|golggotmánnu|skábmamánnu|juovlamánnu)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^o/i,/^g/i,/^n/i,/^c/i,/^m/i,/^g/i,/^s/i,/^b/i,/^č/i,/^g/i,/^s/i,/^j/i],any:[/^o/i,/^gu/i,/^n/i,/^c/i,/^m/i,/^ge/i,/^su/i,/^b/i,/^č/i,/^go/i,/^sk/i,/^j/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[svmgdbl]/i,short:/^(sotn|vuos|maŋ|gask|duor|bear|láv)/i,abbreviated:/^(sotn|vuos|maŋ|gask|duor|bear|láv)/i,wide:/^(sotnabeaivi|vuossárga|maŋŋebárga|gaskavahkku|duorastat|bearjadat|lávvardat)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^s/i,/^v/i,/^m/i,/^g/i,/^d/i,/^b/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(gaskaidja|gaskabeaivvi|(på) (iđđes|maŋŋel gaskabeaivvi|eahkes|ihkku)|[ap])/i,any:/^([ap]\.?\s?m\.?|gaskaidja|gaskabeaivvi|(på) (iđđes|maŋŋel gaskabeaivvi|eahkes|ihkku))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a(\.?\s?m\.?)?$/i,pm:/^p(\.?\s?m\.?)?$/i,midnight:/^gaskai/i,noon:/^gaskab/i,morning:/iđđes/i,afternoon:/maŋŋel gaskabeaivvi/i,evening:/eahkes/i,night:/ihkku/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}};function Ik(e,t,n){const i=function(e,t){return 1===t&&e.one?e.one:t>=2&&t<=4&&e.twoFour?e.twoFour:e.other}(e,t);return i[n].replace("{{count}}",String(t))}function Dk(e){let t="";return"almost"===e&&(t="takmer"),"about"===e&&(t="približne"),t.length>0?t+" ":""}function Rk(e){let t="";return"lessThan"===e&&(t="menej než"),"over"===e&&(t="viac než"),t.length>0?t+" ":""}const Wk={xSeconds:{one:{present:"sekunda",past:"sekundou",future:"sekundu"},twoFour:{present:"{{count}} sekundy",past:"{{count}} sekundami",future:"{{count}} sekundy"},other:{present:"{{count}} sekúnd",past:"{{count}} sekundami",future:"{{count}} sekúnd"}},halfAMinute:{other:{present:"pol minúty",past:"pol minútou",future:"pol minúty"}},xMinutes:{one:{present:"minúta",past:"minútou",future:"minútu"},twoFour:{present:"{{count}} minúty",past:"{{count}} minútami",future:"{{count}} minúty"},other:{present:"{{count}} minút",past:"{{count}} minútami",future:"{{count}} minút"}},xHours:{one:{present:"hodina",past:"hodinou",future:"hodinu"},twoFour:{present:"{{count}} hodiny",past:"{{count}} hodinami",future:"{{count}} hodiny"},other:{present:"{{count}} hodín",past:"{{count}} hodinami",future:"{{count}} hodín"}},xDays:{one:{present:"deň",past:"dňom",future:"deň"},twoFour:{present:"{{count}} dni",past:"{{count}} dňami",future:"{{count}} dni"},other:{present:"{{count}} dní",past:"{{count}} dňami",future:"{{count}} dní"}},xWeeks:{one:{present:"týždeň",past:"týždňom",future:"týždeň"},twoFour:{present:"{{count}} týždne",past:"{{count}} týždňami",future:"{{count}} týždne"},other:{present:"{{count}} týždňov",past:"{{count}} týždňami",future:"{{count}} týždňov"}},xMonths:{one:{present:"mesiac",past:"mesiacom",future:"mesiac"},twoFour:{present:"{{count}} mesiace",past:"{{count}} mesiacmi",future:"{{count}} mesiace"},other:{present:"{{count}} mesiacov",past:"{{count}} mesiacmi",future:"{{count}} mesiacov"}},xYears:{one:{present:"rok",past:"rokom",future:"rok"},twoFour:{present:"{{count}} roky",past:"{{count}} rokmi",future:"{{count}} roky"},other:{present:"{{count}} rokov",past:"{{count}} rokmi",future:"{{count}} rokov"}}},Nk={date:ef({formats:{full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. M. y",short:"d. M. y"},defaultWidth:"full"}),time:ef({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}}, {{time}}",long:"{{date}}, {{time}}",medium:"{{date}}, {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Ok=["nedeľu","pondelok","utorok","stredu","štvrtok","piatok","sobotu"];function Fk(e){return 4===e?"'vo' eeee 'o' p":"'v "+Ok[e]+" o' p"}const jk={lastWeek:(e,t,n)=>{const i=e.getDay();return Vf(e,t,n)?Fk(i):function(e){const t=Ok[e];switch(e){case 0:case 3:case 6:return"'minulú "+t+" o' p";default:return"'minulý' eeee 'o' p"}}(i)},yesterday:"'včera o' p",today:"'dnes o' p",tomorrow:"'zajtra o' p",nextWeek:(e,t,n)=>{const i=e.getDay();return Vf(e,t,n)?Fk(i):function(e){const t=Ok[e];switch(e){case 0:case 4:case 6:return"'budúcu "+t+" o' p";default:return"'budúci' eeee 'o' p"}}(i)},other:"P"},zk={code:"sk",formatDistance:(e,t,n)=>{const i=function(e){return["lessThan","about","over","almost"].filter((function(t){return!!e.match(new RegExp("^"+t))}))[0]}(e)||"",a=(r=e.substring(i.length)).charAt(0).toLowerCase()+r.slice(1);var r;const o=Wk[a];return n?.addSuffix?n.comparison&&n.comparison>0?Dk(i)+"o "+Rk(i)+Ik(o,t,"future"):Dk(i)+"pred "+Rk(i)+Ik(o,t,"past"):Dk(i)+Rk(i)+Ik(o,t,"present")},formatLong:Nk,formatRelative:(e,t,n,i)=>{const a=jk[e];return"function"==typeof a?a(t,n,i):a},localize:{ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["pred Kr.","po Kr."],abbreviated:["pred Kr.","po Kr."],wide:["pred Kristom","po Kristovi"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. štvrťrok","2. štvrťrok","3. štvrťrok","4. štvrťrok"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","feb","mar","apr","máj","jún","júl","aug","sep","okt","nov","dec"],wide:["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december"]},defaultWidth:"wide",formattingValues:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","feb","mar","apr","máj","jún","júl","aug","sep","okt","nov","dec"],wide:["januára","februára","marca","apríla","mája","júna","júla","augusta","septembra","októbra","novembra","decembra"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["n","p","u","s","š","p","s"],short:["ne","po","ut","st","št","pi","so"],abbreviated:["ne","po","ut","st","št","pi","so"],wide:["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"AM",pm:"PM",midnight:"poln.",noon:"pol.",morning:"ráno",afternoon:"pop.",evening:"več.",night:"noc"},abbreviated:{am:"AM",pm:"PM",midnight:"poln.",noon:"pol.",morning:"ráno",afternoon:"popol.",evening:"večer",night:"noc"},wide:{am:"AM",pm:"PM",midnight:"polnoc",noon:"poludnie",morning:"ráno",afternoon:"popoludnie",evening:"večer",night:"noc"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"o poln.",noon:"nap.",morning:"ráno",afternoon:"pop.",evening:"več.",night:"v n."},abbreviated:{am:"AM",pm:"PM",midnight:"o poln.",noon:"napol.",morning:"ráno",afternoon:"popol.",evening:"večer",night:"v noci"},wide:{am:"AM",pm:"PM",midnight:"o polnoci",noon:"napoludnie",morning:"ráno",afternoon:"popoludní",evening:"večer",night:"v noci"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(pred Kr\.|pred n\. l\.|po Kr\.|n\. l\.)/i,abbreviated:/^(pred Kr\.|pred n\. l\.|po Kr\.|n\. l\.)/i,wide:/^(pred Kristom|pred na[šs][íi]m letopo[čc]tom|po Kristovi|n[áa][šs]ho letopo[čc]tu)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^pr/i,/^(po|n)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]\. [šs]tvr[ťt]rok/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|m[áa]j|j[úu]n|j[úu]l|aug|sep|okt|nov|dec)/i,wide:/^(janu[áa]ra?|febru[áa]ra?|(marec|marca)|apr[íi]la?|m[áa]ja?|j[úu]na?|j[úu]la?|augusta?|(september|septembra)|(okt[óo]ber|okt[óo]bra)|(november|novembra)|(december|decembra))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^m[áa]j/i,/^j[úu]n/i,/^j[úu]l/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[npusšp]/i,short:/^(ne|po|ut|st|št|pi|so)/i,abbreviated:/^(ne|po|ut|st|št|pi|so)/i,wide:/^(nede[ľl]a|pondelok|utorok|streda|[šs]tvrtok|piatok|sobota])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^n/i,/^p/i,/^u/i,/^s/i,/^š/i,/^p/i,/^s/i],any:[/^n/i,/^po/i,/^u/i,/^st/i,/^(št|stv)/i,/^pi/i,/^so/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(am|pm|(o )?poln\.?|(nap\.?|pol\.?)|r[áa]no|pop\.?|ve[čc]\.?|(v n\.?|noc))/i,abbreviated:/^(am|pm|(o )?poln\.?|(napol\.?|pol\.?)|r[áa]no|pop\.?|ve[čc]er|(v )?noci?)/i,any:/^(am|pm|(o )?polnoci?|(na)?poludnie|r[áa]no|popoludn(ie|í|i)|ve[čc]er|(v )?noci?)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^am/i,pm:/^pm/i,midnight:/poln/i,noon:/^(nap|(na)?pol(\.|u))/i,morning:/^r[áa]no/i,afternoon:/^pop/i,evening:/^ve[čc]/i,night:/^(noc|v n\.)/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}};const $k={lessThanXSeconds:{present:{one:"manj kot {{count}} sekunda",two:"manj kot {{count}} sekundi",few:"manj kot {{count}} sekunde",other:"manj kot {{count}} sekund"},past:{one:"manj kot {{count}} sekundo",two:"manj kot {{count}} sekundama",few:"manj kot {{count}} sekundami",other:"manj kot {{count}} sekundami"},future:{one:"manj kot {{count}} sekundo",two:"manj kot {{count}} sekundi",few:"manj kot {{count}} sekunde",other:"manj kot {{count}} sekund"}},xSeconds:{present:{one:"{{count}} sekunda",two:"{{count}} sekundi",few:"{{count}} sekunde",other:"{{count}} sekund"},past:{one:"{{count}} sekundo",two:"{{count}} sekundama",few:"{{count}} sekundami",other:"{{count}} sekundami"},future:{one:"{{count}} sekundo",two:"{{count}} sekundi",few:"{{count}} sekunde",other:"{{count}} sekund"}},halfAMinute:"pol minute",lessThanXMinutes:{present:{one:"manj kot {{count}} minuta",two:"manj kot {{count}} minuti",few:"manj kot {{count}} minute",other:"manj kot {{count}} minut"},past:{one:"manj kot {{count}} minuto",two:"manj kot {{count}} minutama",few:"manj kot {{count}} minutami",other:"manj kot {{count}} minutami"},future:{one:"manj kot {{count}} minuto",two:"manj kot {{count}} minuti",few:"manj kot {{count}} minute",other:"manj kot {{count}} minut"}},xMinutes:{present:{one:"{{count}} minuta",two:"{{count}} minuti",few:"{{count}} minute",other:"{{count}} minut"},past:{one:"{{count}} minuto",two:"{{count}} minutama",few:"{{count}} minutami",other:"{{count}} minutami"},future:{one:"{{count}} minuto",two:"{{count}} minuti",few:"{{count}} minute",other:"{{count}} minut"}},aboutXHours:{present:{one:"približno {{count}} ura",two:"približno {{count}} uri",few:"približno {{count}} ure",other:"približno {{count}} ur"},past:{one:"približno {{count}} uro",two:"približno {{count}} urama",few:"približno {{count}} urami",other:"približno {{count}} urami"},future:{one:"približno {{count}} uro",two:"približno {{count}} uri",few:"približno {{count}} ure",other:"približno {{count}} ur"}},xHours:{present:{one:"{{count}} ura",two:"{{count}} uri",few:"{{count}} ure",other:"{{count}} ur"},past:{one:"{{count}} uro",two:"{{count}} urama",few:"{{count}} urami",other:"{{count}} urami"},future:{one:"{{count}} uro",two:"{{count}} uri",few:"{{count}} ure",other:"{{count}} ur"}},xDays:{present:{one:"{{count}} dan",two:"{{count}} dni",few:"{{count}} dni",other:"{{count}} dni"},past:{one:"{{count}} dnem",two:"{{count}} dnevoma",few:"{{count}} dnevi",other:"{{count}} dnevi"},future:{one:"{{count}} dan",two:"{{count}} dni",few:"{{count}} dni",other:"{{count}} dni"}},aboutXWeeks:{one:"približno {{count}} teden",two:"približno {{count}} tedna",few:"približno {{count}} tedne",other:"približno {{count}} tednov"},xWeeks:{one:"{{count}} teden",two:"{{count}} tedna",few:"{{count}} tedne",other:"{{count}} tednov"},aboutXMonths:{present:{one:"približno {{count}} mesec",two:"približno {{count}} meseca",few:"približno {{count}} mesece",other:"približno {{count}} mesecev"},past:{one:"približno {{count}} mesecem",two:"približno {{count}} mesecema",few:"približno {{count}} meseci",other:"približno {{count}} meseci"},future:{one:"približno {{count}} mesec",two:"približno {{count}} meseca",few:"približno {{count}} mesece",other:"približno {{count}} mesecev"}},xMonths:{present:{one:"{{count}} mesec",two:"{{count}} meseca",few:"{{count}} meseci",other:"{{count}} mesecev"},past:{one:"{{count}} mesecem",two:"{{count}} mesecema",few:"{{count}} meseci",other:"{{count}} meseci"},future:{one:"{{count}} mesec",two:"{{count}} meseca",few:"{{count}} mesece",other:"{{count}} mesecev"}},aboutXYears:{present:{one:"približno {{count}} leto",two:"približno {{count}} leti",few:"približno {{count}} leta",other:"približno {{count}} let"},past:{one:"približno {{count}} letom",two:"približno {{count}} letoma",few:"približno {{count}} leti",other:"približno {{count}} leti"},future:{one:"približno {{count}} leto",two:"približno {{count}} leti",few:"približno {{count}} leta",other:"približno {{count}} let"}},xYears:{present:{one:"{{count}} leto",two:"{{count}} leti",few:"{{count}} leta",other:"{{count}} let"},past:{one:"{{count}} letom",two:"{{count}} letoma",few:"{{count}} leti",other:"{{count}} leti"},future:{one:"{{count}} leto",two:"{{count}} leti",few:"{{count}} leta",other:"{{count}} let"}},overXYears:{present:{one:"več kot {{count}} leto",two:"več kot {{count}} leti",few:"več kot {{count}} leta",other:"več kot {{count}} let"},past:{one:"več kot {{count}} letom",two:"več kot {{count}} letoma",few:"več kot {{count}} leti",other:"več kot {{count}} leti"},future:{one:"več kot {{count}} leto",two:"več kot {{count}} leti",few:"več kot {{count}} leta",other:"več kot {{count}} let"}},almostXYears:{present:{one:"skoraj {{count}} leto",two:"skoraj {{count}} leti",few:"skoraj {{count}} leta",other:"skoraj {{count}} let"},past:{one:"skoraj {{count}} letom",two:"skoraj {{count}} letoma",few:"skoraj {{count}} leti",other:"skoraj {{count}} leti"},future:{one:"skoraj {{count}} leto",two:"skoraj {{count}} leti",few:"skoraj {{count}} leta",other:"skoraj {{count}} let"}}};const Uk={date:ef({formats:{full:"EEEE, dd. MMMM y",long:"dd. MMMM y",medium:"d. MMM y",short:"d. MM. yy"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Hk={lastWeek:e=>{switch(e.getDay()){case 0:return"'prejšnjo nedeljo ob' p";case 3:return"'prejšnjo sredo ob' p";case 6:return"'prejšnjo soboto ob' p";default:return"'prejšnji' EEEE 'ob' p"}},yesterday:"'včeraj ob' p",today:"'danes ob' p",tomorrow:"'jutri ob' p",nextWeek:e=>{switch(e.getDay()){case 0:return"'naslednjo nedeljo ob' p";case 3:return"'naslednjo sredo ob' p";case 6:return"'naslednjo soboto ob' p";default:return"'naslednji' EEEE 'ob' p"}},other:"P"},Bk={code:"sl",formatDistance:(e,t,n)=>{let i="",a="present";n?.addSuffix&&(n.comparison&&n.comparison>0?(a="future",i="čez "):(a="past",i="pred "));const r=$k[e];if("string"==typeof r)i+=r;else{const e=function(e){switch(e%100){case 1:return"one";case 2:return"two";case 3:case 4:return"few";default:return"other"}}(t);void 0!==r.one?i+=r[e].replace("{{count}}",String(t)):i+=r[a][e].replace("{{count}}",String(t))}return i},formatLong:Uk,formatRelative:(e,t,n,i)=>{const a=Hk[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["pr. n. št.","po n. št."],abbreviated:["pr. n. št.","po n. št."],wide:["pred našim štetjem","po našem štetju"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1. čet.","2. čet.","3. čet.","4. čet."],wide:["1. četrtletje","2. četrtletje","3. četrtletje","4. četrtletje"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan.","feb.","mar.","apr.","maj","jun.","jul.","avg.","sep.","okt.","nov.","dec."],wide:["januar","februar","marec","april","maj","junij","julij","avgust","september","oktober","november","december"]},defaultWidth:"wide"}),day:af({values:{narrow:["n","p","t","s","č","p","s"],short:["ned.","pon.","tor.","sre.","čet.","pet.","sob."],abbreviated:["ned.","pon.","tor.","sre.","čet.","pet.","sob."],wide:["nedelja","ponedeljek","torek","sreda","četrtek","petek","sobota"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"d",pm:"p",midnight:"24.00",noon:"12.00",morning:"j",afternoon:"p",evening:"v",night:"n"},abbreviated:{am:"dop.",pm:"pop.",midnight:"poln.",noon:"pold.",morning:"jut.",afternoon:"pop.",evening:"več.",night:"noč"},wide:{am:"dop.",pm:"pop.",midnight:"polnoč",noon:"poldne",morning:"jutro",afternoon:"popoldne",evening:"večer",night:"noč"}},defaultWidth:"wide",formattingValues:{narrow:{am:"d",pm:"p",midnight:"24.00",noon:"12.00",morning:"zj",afternoon:"p",evening:"zv",night:"po"},abbreviated:{am:"dop.",pm:"pop.",midnight:"opoln.",noon:"opold.",morning:"zjut.",afternoon:"pop.",evening:"zveč.",night:"ponoči"},wide:{am:"dop.",pm:"pop.",midnight:"opolnoči",noon:"opoldne",morning:"zjutraj",afternoon:"popoldan",evening:"zvečer",night:"ponoči"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{abbreviated:/^(pr\. n\. št\.|po n\. št\.)/i,wide:/^(pred Kristusom|pred na[sš]im [sš]tetjem|po Kristusu|po na[sš]em [sš]tetju|na[sš]ega [sš]tetja)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^pr/i,/^(po|na[sš]em)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]\.\s?[čc]et\.?/i,wide:/^[1234]\. [čc]etrtletje/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan\.|feb\.|mar\.|apr\.|maj|jun\.|jul\.|avg\.|sep\.|okt\.|nov\.|dec\.)/i,wide:/^(januar|februar|marec|april|maj|junij|julij|avgust|september|oktober|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],abbreviated:[/^ja/i,/^fe/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^av/i,/^s/i,/^o/i,/^n/i,/^d/i],wide:[/^ja/i,/^fe/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^av/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"wide"}),day:of({matchPatterns:{narrow:/^[nptsčc]/i,short:/^(ned\.|pon\.|tor\.|sre\.|[cč]et\.|pet\.|sob\.)/i,abbreviated:/^(ned\.|pon\.|tor\.|sre\.|[cč]et\.|pet\.|sob\.)/i,wide:/^(nedelja|ponedeljek|torek|sreda|[cč]etrtek|petek|sobota)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^n/i,/^p/i,/^t/i,/^s/i,/^[cč]/i,/^p/i,/^s/i],any:[/^n/i,/^po/i,/^t/i,/^sr/i,/^[cč]/i,/^pe/i,/^so/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(d|po?|z?v|n|z?j|24\.00|12\.00)/i,any:/^(dop\.|pop\.|o?poln(\.|o[cč]i?)|o?pold(\.|ne)|z?ve[cč](\.|er)|(po)?no[cč]i?|popold(ne|an)|jut(\.|ro)|zjut(\.|raj))/i},defaultMatchWidth:"any",parsePatterns:{narrow:{am:/^d/i,pm:/^p/i,midnight:/^24/i,noon:/^12/i,morning:/^(z?j)/i,afternoon:/^p/i,evening:/^(z?v)/i,night:/^(n|po)/i},any:{am:/^dop\./i,pm:/^pop\./i,midnight:/^o?poln/i,noon:/^o?pold/i,morning:/j/i,afternoon:/^pop\./i,evening:/^z?ve/i,night:/(po)?no/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Gk={lessThanXSeconds:{one:"më pak se një sekondë",other:"më pak se {{count}} sekonda"},xSeconds:{one:"1 sekondë",other:"{{count}} sekonda"},halfAMinute:"gjysëm minuti",lessThanXMinutes:{one:"më pak se një minute",other:"më pak se {{count}} minuta"},xMinutes:{one:"1 minutë",other:"{{count}} minuta"},aboutXHours:{one:"rreth 1 orë",other:"rreth {{count}} orë"},xHours:{one:"1 orë",other:"{{count}} orë"},xDays:{one:"1 ditë",other:"{{count}} ditë"},aboutXWeeks:{one:"rreth 1 javë",other:"rreth {{count}} javë"},xWeeks:{one:"1 javë",other:"{{count}} javë"},aboutXMonths:{one:"rreth 1 muaj",other:"rreth {{count}} muaj"},xMonths:{one:"1 muaj",other:"{{count}} muaj"},aboutXYears:{one:"rreth 1 vit",other:"rreth {{count}} vite"},xYears:{one:"1 vit",other:"{{count}} vite"},overXYears:{one:"mbi 1 vit",other:"mbi {{count}} vite"},almostXYears:{one:"pothuajse 1 vit",other:"pothuajse {{count}} vite"}},Xk={date:ef({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'në' {{time}}",long:"{{date}} 'në' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Yk={lastWeek:"'të' eeee 'e shkuar në' p",yesterday:"'dje në' p",today:"'sot në' p",tomorrow:"'nesër në' p",nextWeek:"eeee 'at' p",other:"P"},Vk={code:"sq",formatDistance:(e,t,n)=>{let i;const a=Gk[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"në "+i:i+" më parë":i},formatLong:Xk,formatRelative:(e,t,n,i)=>Yk[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e);return"hour"===t?.unit?String(n):1===n?n+"-rë":4===n?n+"t":n+"-të"},era:af({values:{narrow:["P","M"],abbreviated:["PK","MK"],wide:["Para Krishtit","Mbas Krishtit"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["4-mujori I","4-mujori II","4-mujori III","4-mujori IV"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","S","M","P","M","Q","K","G","S","T","N","D"],abbreviated:["Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gus","Sht","Tet","Nën","Dhj"],wide:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nëntor","Dhjetor"]},defaultWidth:"wide"}),day:af({values:{narrow:["D","H","M","M","E","P","S"],short:["Di","Hë","Ma","Më","En","Pr","Sh"],abbreviated:["Die","Hën","Mar","Mër","Enj","Pre","Sht"],wide:["Dielë","Hënë","Martë","Mërkurë","Enjte","Premte","Shtunë"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"p",pm:"m",midnight:"m",noon:"d",morning:"mëngjes",afternoon:"dite",evening:"mbrëmje",night:"natë"},abbreviated:{am:"PD",pm:"MD",midnight:"mesnëtë",noon:"drek",morning:"mëngjes",afternoon:"mbasdite",evening:"mbrëmje",night:"natë"},wide:{am:"p.d.",pm:"m.d.",midnight:"mesnëtë",noon:"drek",morning:"mëngjes",afternoon:"mbasdite",evening:"mbrëmje",night:"natë"}},defaultWidth:"wide",formattingValues:{narrow:{am:"p",pm:"m",midnight:"m",noon:"d",morning:"në mëngjes",afternoon:"në mbasdite",evening:"në mbrëmje",night:"në mesnatë"},abbreviated:{am:"PD",pm:"MD",midnight:"mesnatë",noon:"drek",morning:"në mëngjes",afternoon:"në mbasdite",evening:"në mbrëmje",night:"në mesnatë"},wide:{am:"p.d.",pm:"m.d.",midnight:"mesnatë",noon:"drek",morning:"në mëngjes",afternoon:"në mbasdite",evening:"në mbrëmje",night:"në mesnatë"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(-rë|-të|t|)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(p|m)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(para krishtit|mbas krishtit)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(p|m)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]-mujori (i{1,3}|iv)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jsmpqkftnd]/i,abbreviated:/^(jan|shk|mar|pri|maj|qer|kor|gus|sht|tet|nën|dhj)/i,wide:/^(janar|shkurt|mars|prill|maj|qershor|korrik|gusht|shtator|tetor|nëntor|dhjetor)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^s/i,/^m/i,/^p/i,/^m/i,/^q/i,/^k/i,/^g/i,/^s/i,/^t/i,/^n/i,/^d/i],any:[/^ja/i,/^shk/i,/^mar/i,/^pri/i,/^maj/i,/^qer/i,/^kor/i,/^gu/i,/^sht/i,/^tet/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[dhmeps]/i,short:/^(di|hë|ma|më|en|pr|sh)/i,abbreviated:/^(die|hën|mar|mër|enj|pre|sht)/i,wide:/^(dielë|hënë|martë|mërkurë|enjte|premte|shtunë)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^h/i,/^m/i,/^m/i,/^e/i,/^p/i,/^s/i],any:[/^d/i,/^h/i,/^ma/i,/^më/i,/^e/i,/^p/i,/^s/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(p|m|me|në (mëngjes|mbasdite|mbrëmje|mesnatë))/i,any:/^([pm]\.?\s?d\.?|drek|në (mëngjes|mbasdite|mbrëmje|mesnatë))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^p/i,pm:/^m/i,midnight:/^me/i,noon:/^dr/i,morning:/mëngjes/i,afternoon:/mbasdite/i,evening:/mbrëmje/i,night:/natë/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Kk={lessThanXSeconds:{one:{standalone:"мање од 1 секунде",withPrepositionAgo:"мање од 1 секунде",withPrepositionIn:"мање од 1 секунду"},dual:"мање од {{count}} секунде",other:"мање од {{count}} секунди"},xSeconds:{one:{standalone:"1 секунда",withPrepositionAgo:"1 секунде",withPrepositionIn:"1 секунду"},dual:"{{count}} секунде",other:"{{count}} секунди"},halfAMinute:"пола минуте",lessThanXMinutes:{one:{standalone:"мање од 1 минуте",withPrepositionAgo:"мање од 1 минуте",withPrepositionIn:"мање од 1 минуту"},dual:"мање од {{count}} минуте",other:"мање од {{count}} минута"},xMinutes:{one:{standalone:"1 минута",withPrepositionAgo:"1 минуте",withPrepositionIn:"1 минуту"},dual:"{{count}} минуте",other:"{{count}} минута"},aboutXHours:{one:{standalone:"око 1 сат",withPrepositionAgo:"око 1 сат",withPrepositionIn:"око 1 сат"},dual:"око {{count}} сата",other:"око {{count}} сати"},xHours:{one:{standalone:"1 сат",withPrepositionAgo:"1 сат",withPrepositionIn:"1 сат"},dual:"{{count}} сата",other:"{{count}} сати"},xDays:{one:{standalone:"1 дан",withPrepositionAgo:"1 дан",withPrepositionIn:"1 дан"},dual:"{{count}} дана",other:"{{count}} дана"},aboutXWeeks:{one:{standalone:"око 1 недељу",withPrepositionAgo:"око 1 недељу",withPrepositionIn:"око 1 недељу"},dual:"око {{count}} недеље",other:"око {{count}} недеље"},xWeeks:{one:{standalone:"1 недељу",withPrepositionAgo:"1 недељу",withPrepositionIn:"1 недељу"},dual:"{{count}} недеље",other:"{{count}} недеље"},aboutXMonths:{one:{standalone:"око 1 месец",withPrepositionAgo:"око 1 месец",withPrepositionIn:"око 1 месец"},dual:"око {{count}} месеца",other:"око {{count}} месеци"},xMonths:{one:{standalone:"1 месец",withPrepositionAgo:"1 месец",withPrepositionIn:"1 месец"},dual:"{{count}} месеца",other:"{{count}} месеци"},aboutXYears:{one:{standalone:"око 1 годину",withPrepositionAgo:"око 1 годину",withPrepositionIn:"око 1 годину"},dual:"око {{count}} године",other:"око {{count}} година"},xYears:{one:{standalone:"1 година",withPrepositionAgo:"1 године",withPrepositionIn:"1 годину"},dual:"{{count}} године",other:"{{count}} година"},overXYears:{one:{standalone:"преко 1 годину",withPrepositionAgo:"преко 1 годину",withPrepositionIn:"преко 1 годину"},dual:"преко {{count}} године",other:"преко {{count}} година"},almostXYears:{one:{standalone:"готово 1 годину",withPrepositionAgo:"готово 1 годину",withPrepositionIn:"готово 1 годину"},dual:"готово {{count}} године",other:"готово {{count}} година"}},qk={date:ef({formats:{full:"EEEE, d. MMMM yyyy.",long:"d. MMMM yyyy.",medium:"d. MMM yy.",short:"dd. MM. yy."},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss (zzzz)",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'у' {{time}}",long:"{{date}} 'у' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Jk={lastWeek:e=>{switch(e.getDay()){case 0:return"'прошле недеље у' p";case 3:return"'прошле среде у' p";case 6:return"'прошле суботе у' p";default:return"'прошли' EEEE 'у' p"}},yesterday:"'јуче у' p",today:"'данас у' p",tomorrow:"'сутра у' p",nextWeek:e=>{switch(e.getDay()){case 0:return"'следеће недеље у' p";case 3:return"'следећу среду у' p";case 6:return"'следећу суботу у' p";default:return"'следећи' EEEE 'у' p"}},other:"P"},Qk={code:"sr",formatDistance:(e,t,n)=>{let i;const a=Kk[e];return i="string"==typeof a?a:1===t?n?.addSuffix?n.comparison&&n.comparison>0?a.one.withPrepositionIn:a.one.withPrepositionAgo:a.one.standalone:t%10>1&&t%10<5&&"1"!==String(t).substr(-2,1)?a.dual.replace("{{count}}",String(t)):a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"за "+i:"пре "+i:i},formatLong:qk,formatRelative:(e,t,n,i)=>{const a=Jk[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["пр.н.е.","АД"],abbreviated:["пр. Хр.","по. Хр."],wide:["Пре Христа","После Христа"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1.","2.","3.","4."],abbreviated:["1. кв.","2. кв.","3. кв.","4. кв."],wide:["1. квартал","2. квартал","3. квартал","4. квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец"],wide:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"]},defaultWidth:"wide",formattingValues:{narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец"],wide:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["Н","П","У","С","Ч","П","С"],short:["нед","пон","уто","сре","чет","пет","суб"],abbreviated:["нед","пон","уто","сре","чет","пет","суб"],wide:["недеља","понедељак","уторак","среда","четвртак","петак","субота"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"AM",pm:"PM",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"поподне",evening:"увече",night:"ноћу"},abbreviated:{am:"AM",pm:"PM",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"поподне",evening:"увече",night:"ноћу"},wide:{am:"AM",pm:"PM",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"после подне",evening:"увече",night:"ноћу"}},defaultWidth:"wide",formattingValues:{narrow:{am:"АМ",pm:"ПМ",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"поподне",evening:"увече",night:"ноћу"},abbreviated:{am:"АМ",pm:"ПМ",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"поподне",evening:"увече",night:"ноћу"},wide:{am:"AM",pm:"PM",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"после подне",evening:"увече",night:"ноћу"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(пр\.н\.е\.|АД)/i,abbreviated:/^(пр\.\s?Хр\.|по\.\s?Хр\.)/i,wide:/^(Пре Христа|пре нове ере|После Христа|нова ера)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^пр/i,/^(по|нова)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]\.\s?кв\.?/i,wide:/^[1234]\. квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(10|11|12|[123456789])\./i,abbreviated:/^(јан|феб|мар|апр|мај|јун|јул|авг|сеп|окт|нов|дец)/i,wide:/^((јануар|јануара)|(фебруар|фебруара)|(март|марта)|(април|априла)|(мја|маја)|(јун|јуна)|(јул|јула)|(август|августа)|(септембар|септембра)|(октобар|октобра)|(новембар|новембра)|(децембар|децембра))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^1/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^7/i,/^8/i,/^9/i,/^10/i,/^11/i,/^12/i],any:[/^ја/i,/^ф/i,/^мар/i,/^ап/i,/^мај/i,/^јун/i,/^јул/i,/^авг/i,/^с/i,/^о/i,/^н/i,/^д/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[пусчн]/i,short:/^(нед|пон|уто|сре|чет|пет|суб)/i,abbreviated:/^(нед|пон|уто|сре|чет|пет|суб)/i,wide:/^(недеља|понедељак|уторак|среда|четвртак|петак|субота)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^п/i,/^у/i,/^с/i,/^ч/i,/^п/i,/^с/i,/^н/i],any:[/^нед/i,/^пон/i,/^уто/i,/^сре/i,/^чет/i,/^пет/i,/^суб/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(ам|пм|поноћ|(по)?подне|увече|ноћу|после подне|ујутру)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^поно/i,noon:/^под/i,morning:/ујутру/i,afternoon:/(после\s|по)+подне/i,evening:/(увече)/i,night:/(ноћу)/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Zk={lessThanXSeconds:{one:{standalone:"manje od 1 sekunde",withPrepositionAgo:"manje od 1 sekunde",withPrepositionIn:"manje od 1 sekundu"},dual:"manje od {{count}} sekunde",other:"manje od {{count}} sekundi"},xSeconds:{one:{standalone:"1 sekunda",withPrepositionAgo:"1 sekunde",withPrepositionIn:"1 sekundu"},dual:"{{count}} sekunde",other:"{{count}} sekundi"},halfAMinute:"pola minute",lessThanXMinutes:{one:{standalone:"manje od 1 minute",withPrepositionAgo:"manje od 1 minute",withPrepositionIn:"manje od 1 minutu"},dual:"manje od {{count}} minute",other:"manje od {{count}} minuta"},xMinutes:{one:{standalone:"1 minuta",withPrepositionAgo:"1 minute",withPrepositionIn:"1 minutu"},dual:"{{count}} minute",other:"{{count}} minuta"},aboutXHours:{one:{standalone:"oko 1 sat",withPrepositionAgo:"oko 1 sat",withPrepositionIn:"oko 1 sat"},dual:"oko {{count}} sata",other:"oko {{count}} sati"},xHours:{one:{standalone:"1 sat",withPrepositionAgo:"1 sat",withPrepositionIn:"1 sat"},dual:"{{count}} sata",other:"{{count}} sati"},xDays:{one:{standalone:"1 dan",withPrepositionAgo:"1 dan",withPrepositionIn:"1 dan"},dual:"{{count}} dana",other:"{{count}} dana"},aboutXWeeks:{one:{standalone:"oko 1 nedelju",withPrepositionAgo:"oko 1 nedelju",withPrepositionIn:"oko 1 nedelju"},dual:"oko {{count}} nedelje",other:"oko {{count}} nedelje"},xWeeks:{one:{standalone:"1 nedelju",withPrepositionAgo:"1 nedelju",withPrepositionIn:"1 nedelju"},dual:"{{count}} nedelje",other:"{{count}} nedelje"},aboutXMonths:{one:{standalone:"oko 1 mesec",withPrepositionAgo:"oko 1 mesec",withPrepositionIn:"oko 1 mesec"},dual:"oko {{count}} meseca",other:"oko {{count}} meseci"},xMonths:{one:{standalone:"1 mesec",withPrepositionAgo:"1 mesec",withPrepositionIn:"1 mesec"},dual:"{{count}} meseca",other:"{{count}} meseci"},aboutXYears:{one:{standalone:"oko 1 godinu",withPrepositionAgo:"oko 1 godinu",withPrepositionIn:"oko 1 godinu"},dual:"oko {{count}} godine",other:"oko {{count}} godina"},xYears:{one:{standalone:"1 godina",withPrepositionAgo:"1 godine",withPrepositionIn:"1 godinu"},dual:"{{count}} godine",other:"{{count}} godina"},overXYears:{one:{standalone:"preko 1 godinu",withPrepositionAgo:"preko 1 godinu",withPrepositionIn:"preko 1 godinu"},dual:"preko {{count}} godine",other:"preko {{count}} godina"},almostXYears:{one:{standalone:"gotovo 1 godinu",withPrepositionAgo:"gotovo 1 godinu",withPrepositionIn:"gotovo 1 godinu"},dual:"gotovo {{count}} godine",other:"gotovo {{count}} godina"}},eS={date:ef({formats:{full:"EEEE, d. MMMM yyyy.",long:"d. MMMM yyyy.",medium:"d. MMM yy.",short:"dd. MM. yy."},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss (zzzz)",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'u' {{time}}",long:"{{date}} 'u' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},tS={lastWeek:e=>{switch(e.getDay()){case 0:return"'prošle nedelje u' p";case 3:return"'prošle srede u' p";case 6:return"'prošle subote u' p";default:return"'prošli' EEEE 'u' p"}},yesterday:"'juče u' p",today:"'danas u' p",tomorrow:"'sutra u' p",nextWeek:e=>{switch(e.getDay()){case 0:return"'sledeće nedelje u' p";case 3:return"'sledeću sredu u' p";case 6:return"'sledeću subotu u' p";default:return"'sledeći' EEEE 'u' p"}},other:"P"},nS={code:"sr-Latn",formatDistance:(e,t,n)=>{let i;const a=Zk[e];return i="string"==typeof a?a:1===t?n?.addSuffix?n.comparison&&n.comparison>0?a.one.withPrepositionIn:a.one.withPrepositionAgo:a.one.standalone:t%10>1&&t%10<5&&"1"!==String(t).substr(-2,1)?a.dual.replace("{{count}}",String(t)):a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"za "+i:"pre "+i:i},formatLong:eS,formatRelative:(e,t,n,i)=>{const a=tS[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["pr.n.e.","AD"],abbreviated:["pr. Hr.","po. Hr."],wide:["Pre Hrista","Posle Hrista"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1.","2.","3.","4."],abbreviated:["1. kv.","2. kv.","3. kv.","4. kv."],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec"],wide:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"]},defaultWidth:"wide",formattingValues:{narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec"],wide:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["N","P","U","S","Č","P","S"],short:["ned","pon","uto","sre","čet","pet","sub"],abbreviated:["ned","pon","uto","sre","čet","pet","sub"],wide:["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"popodne",evening:"uveče",night:"noću"},abbreviated:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"popodne",evening:"uveče",night:"noću"},wide:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"posle podne",evening:"uveče",night:"noću"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"popodne",evening:"uveče",night:"noću"},abbreviated:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"popodne",evening:"uveče",night:"noću"},wide:{am:"AM",pm:"PM",midnight:"ponoć",noon:"podne",morning:"ujutru",afternoon:"posle podne",evening:"uveče",night:"noću"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(pr\.n\.e\.|AD)/i,abbreviated:/^(pr\.\s?Hr\.|po\.\s?Hr\.)/i,wide:/^(Pre Hrista|pre nove ere|Posle Hrista|nova era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^pr/i,/^(po|nova)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]\.\s?kv\.?/i,wide:/^[1234]\. kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(10|11|12|[123456789])\./i,abbreviated:/^(jan|feb|mar|apr|maj|jun|jul|avg|sep|okt|nov|dec)/i,wide:/^((januar|januara)|(februar|februara)|(mart|marta)|(april|aprila)|(maj|maja)|(jun|juna)|(jul|jula)|(avgust|avgusta)|(septembar|septembra)|(oktobar|oktobra)|(novembar|novembra)|(decembar|decembra))/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^1/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^7/i,/^8/i,/^9/i,/^10/i,/^11/i,/^12/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^avg/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[npusčc]/i,short:/^(ned|pon|uto|sre|(čet|cet)|pet|sub)/i,abbreviated:/^(ned|pon|uto|sre|(čet|cet)|pet|sub)/i,wide:/^(nedelja|ponedeljak|utorak|sreda|(četvrtak|cetvrtak)|petak|subota)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(am|pm|ponoc|ponoć|(po)?podne|uvece|uveče|noću|posle podne|ujutru)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^pono/i,noon:/^pod/i,morning:/jutro/i,afternoon:/(posle\s|po)+podne/i,evening:/(uvece|uveče)/i,night:/(nocu|noću)/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},iS={lessThanXSeconds:{one:"mindre än en sekund",other:"mindre än {{count}} sekunder"},xSeconds:{one:"en sekund",other:"{{count}} sekunder"},halfAMinute:"en halv minut",lessThanXMinutes:{one:"mindre än en minut",other:"mindre än {{count}} minuter"},xMinutes:{one:"en minut",other:"{{count}} minuter"},aboutXHours:{one:"ungefär en timme",other:"ungefär {{count}} timmar"},xHours:{one:"en timme",other:"{{count}} timmar"},xDays:{one:"en dag",other:"{{count}} dagar"},aboutXWeeks:{one:"ungefär en vecka",other:"ungefär {{count}} veckor"},xWeeks:{one:"en vecka",other:"{{count}} veckor"},aboutXMonths:{one:"ungefär en månad",other:"ungefär {{count}} månader"},xMonths:{one:"en månad",other:"{{count}} månader"},aboutXYears:{one:"ungefär ett år",other:"ungefär {{count}} år"},xYears:{one:"ett år",other:"{{count}} år"},overXYears:{one:"över ett år",other:"över {{count}} år"},almostXYears:{one:"nästan ett år",other:"nästan {{count}} år"}},aS=["noll","en","två","tre","fyra","fem","sex","sju","åtta","nio","tio","elva","tolv"],rS={date:ef({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"y-MM-dd"},defaultWidth:"full"}),time:ef({formats:{full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},oS={lastWeek:"'i' EEEE's kl.' p",yesterday:"'igår kl.' p",today:"'idag kl.' p",tomorrow:"'imorgon kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},sS={code:"sv",formatDistance:(e,t,n)=>{let i;const a=iS[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t<13?aS[t]:String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"om "+i:i+" sedan":i},formatLong:rS,formatRelative:(e,t,n,i)=>oS[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:case 2:return n+":a"}return n+":e"},era:af({values:{narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["före Kristus","efter Kristus"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1:a kvartalet","2:a kvartalet","3:e kvartalet","4:e kvartalet"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","maj","juni","juli","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]},defaultWidth:"wide"}),day:af({values:{narrow:["S","M","T","O","T","F","L"],short:["sö","må","ti","on","to","fr","lö"],abbreviated:["sön","mån","tis","ons","tors","fre","lör"],wide:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"morg.",afternoon:"efterm.",evening:"kväll",night:"natt"},abbreviated:{am:"f.m.",pm:"e.m.",midnight:"midnatt",noon:"middag",morning:"morgon",afternoon:"efterm.",evening:"kväll",night:"natt"},wide:{am:"förmiddag",pm:"eftermiddag",midnight:"midnatt",noon:"middag",morning:"morgon",afternoon:"eftermiddag",evening:"kväll",night:"natt"}},defaultWidth:"wide",formattingValues:{narrow:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på efterm.",evening:"på kvällen",night:"på natten"},abbreviated:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på efterm.",evening:"på kvällen",night:"på natten"},wide:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morgonen",afternoon:"på eftermiddagen",evening:"på kvällen",night:"på natten"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(:a|:e)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,abbreviated:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,wide:/^(före Kristus|före vår tid|efter Kristus|vår tid)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/i,/^[ev]/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](:a|:e)? kvartalet/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar[s]?|apr|maj|jun[i]?|jul[i]?|aug|sep|okt|nov|dec)\.?/i,wide:/^(januari|februari|mars|april|maj|juni|juli|augusti|september|oktober|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[smtofl]/i,short:/^(sö|må|ti|on|to|fr|lö)/i,abbreviated:/^(sön|mån|tis|ons|tors|fre|lör)/i,wide:/^(söndag|måndag|tisdag|onsdag|torsdag|fredag|lördag)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^([fe]\.?\s?m\.?|midn(att)?|midd(ag)?|(på) (morgonen|eftermiddagen|kvällen|natten))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^f/i,pm:/^e/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgon/i,afternoon:/eftermiddag/i,evening:/kväll/i,night:/natt/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}};const lS={lessThanXSeconds:{one:{default:"ஒரு வினாடிக்கு குறைவாக",in:"ஒரு வினாடிக்குள்",ago:"ஒரு வினாடிக்கு முன்பு"},other:{default:"{{count}} வினாடிகளுக்கு குறைவாக",in:"{{count}} வினாடிகளுக்குள்",ago:"{{count}} வினாடிகளுக்கு முன்பு"}},xSeconds:{one:{default:"1 வினாடி",in:"1 வினாடியில்",ago:"1 வினாடி முன்பு"},other:{default:"{{count}} விநாடிகள்",in:"{{count}} வினாடிகளில்",ago:"{{count}} விநாடிகளுக்கு முன்பு"}},halfAMinute:{default:"அரை நிமிடம்",in:"அரை நிமிடத்தில்",ago:"அரை நிமிடம் முன்பு"},lessThanXMinutes:{one:{default:"ஒரு நிமிடத்திற்கும் குறைவாக",in:"ஒரு நிமிடத்திற்குள்",ago:"ஒரு நிமிடத்திற்கு முன்பு"},other:{default:"{{count}} நிமிடங்களுக்கும் குறைவாக",in:"{{count}} நிமிடங்களுக்குள்",ago:"{{count}} நிமிடங்களுக்கு முன்பு"}},xMinutes:{one:{default:"1 நிமிடம்",in:"1 நிமிடத்தில்",ago:"1 நிமிடம் முன்பு"},other:{default:"{{count}} நிமிடங்கள்",in:"{{count}} நிமிடங்களில்",ago:"{{count}} நிமிடங்களுக்கு முன்பு"}},aboutXHours:{one:{default:"சுமார் 1 மணி நேரம்",in:"சுமார் 1 மணி நேரத்தில்",ago:"சுமார் 1 மணி நேரத்திற்கு முன்பு"},other:{default:"சுமார் {{count}} மணி நேரம்",in:"சுமார் {{count}} மணி நேரத்திற்கு முன்பு",ago:"சுமார் {{count}} மணி நேரத்தில்"}},xHours:{one:{default:"1 மணி நேரம்",in:"1 மணி நேரத்தில்",ago:"1 மணி நேரத்திற்கு முன்பு"},other:{default:"{{count}} மணி நேரம்",in:"{{count}} மணி நேரத்தில்",ago:"{{count}} மணி நேரத்திற்கு முன்பு"}},xDays:{one:{default:"1 நாள்",in:"1 நாளில்",ago:"1 நாள் முன்பு"},other:{default:"{{count}} நாட்கள்",in:"{{count}} நாட்களில்",ago:"{{count}} நாட்களுக்கு முன்பு"}},aboutXWeeks:{one:{default:"சுமார் 1 வாரம்",in:"சுமார் 1 வாரத்தில்",ago:"சுமார் 1 வாரம் முன்பு"},other:{default:"சுமார் {{count}} வாரங்கள்",in:"சுமார் {{count}} வாரங்களில்",ago:"சுமார் {{count}} வாரங்களுக்கு முன்பு"}},xWeeks:{one:{default:"1 வாரம்",in:"1 வாரத்தில்",ago:"1 வாரம் முன்பு"},other:{default:"{{count}} வாரங்கள்",in:"{{count}} வாரங்களில்",ago:"{{count}} வாரங்களுக்கு முன்பு"}},aboutXMonths:{one:{default:"சுமார் 1 மாதம்",in:"சுமார் 1 மாதத்தில்",ago:"சுமார் 1 மாதத்திற்கு முன்பு"},other:{default:"சுமார் {{count}} மாதங்கள்",in:"சுமார் {{count}} மாதங்களில்",ago:"சுமார் {{count}} மாதங்களுக்கு முன்பு"}},xMonths:{one:{default:"1 மாதம்",in:"1 மாதத்தில்",ago:"1 மாதம் முன்பு"},other:{default:"{{count}} மாதங்கள்",in:"{{count}} மாதங்களில்",ago:"{{count}} மாதங்களுக்கு முன்பு"}},aboutXYears:{one:{default:"சுமார் 1 வருடம்",in:"சுமார் 1 ஆண்டில்",ago:"சுமார் 1 வருடம் முன்பு"},other:{default:"சுமார் {{count}} ஆண்டுகள்",in:"சுமார் {{count}} ஆண்டுகளில்",ago:"சுமார் {{count}} ஆண்டுகளுக்கு முன்பு"}},xYears:{one:{default:"1 வருடம்",in:"1 ஆண்டில்",ago:"1 வருடம் முன்பு"},other:{default:"{{count}} ஆண்டுகள்",in:"{{count}} ஆண்டுகளில்",ago:"{{count}} ஆண்டுகளுக்கு முன்பு"}},overXYears:{one:{default:"1 வருடத்திற்கு மேல்",in:"1 வருடத்திற்கும் மேலாக",ago:"1 வருடம் முன்பு"},other:{default:"{{count}} ஆண்டுகளுக்கும் மேலாக",in:"{{count}} ஆண்டுகளில்",ago:"{{count}} ஆண்டுகளுக்கு முன்பு"}},almostXYears:{one:{default:"கிட்டத்தட்ட 1 வருடம்",in:"கிட்டத்தட்ட 1 ஆண்டில்",ago:"கிட்டத்தட்ட 1 வருடம் முன்பு"},other:{default:"கிட்டத்தட்ட {{count}} ஆண்டுகள்",in:"கிட்டத்தட்ட {{count}} ஆண்டுகளில்",ago:"கிட்டத்தட்ட {{count}} ஆண்டுகளுக்கு முன்பு"}}},dS={date:ef({formats:{full:"EEEE, d MMMM, y",long:"d MMMM, y",medium:"d MMM, y",short:"d/M/yy"},defaultWidth:"full"}),time:ef({formats:{full:"a h:mm:ss zzzz",long:"a h:mm:ss z",medium:"a h:mm:ss",short:"a h:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},uS={lastWeek:"'கடந்த' eeee p 'மணிக்கு'",yesterday:"'நேற்று ' p 'மணிக்கு'",today:"'இன்று ' p 'மணிக்கு'",tomorrow:"'நாளை ' p 'மணிக்கு'",nextWeek:"eeee p 'மணிக்கு'",other:"P"},cS={code:"ta",formatDistance:(e,t,n)=>{const i=n?.addSuffix?n.comparison&&n.comparison>0?"in":"ago":"default",a=lS[e];return void 0===a.one?a[i]:1===t?a.one[i]:a.other[i].replace("{{count}}",String(t))},formatLong:dS,formatRelative:(e,t,n,i)=>uS[e],localize:{ordinalNumber:(e,t)=>String(e),era:af({values:{narrow:["கி.மு.","கி.பி."],abbreviated:["கி.மு.","கி.பி."],wide:["கிறிஸ்துவுக்கு முன்","அன்னோ டோமினி"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["காலா.1","காலா.2","காலா.3","காலா.4"],wide:["ஒன்றாம் காலாண்டு","இரண்டாம் காலாண்டு","மூன்றாம் காலாண்டு","நான்காம் காலாண்டு"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["ஜ","பி","மா","ஏ","மே","ஜூ","ஜூ","ஆ","செ","அ","ந","டி"],abbreviated:["ஜன.","பிப்.","மார்.","ஏப்.","மே","ஜூன்","ஜூலை","ஆக.","செப்.","அக்.","நவ.","டிச."],wide:["ஜனவரி","பிப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்"]},defaultWidth:"wide"}),day:af({values:{narrow:["ஞா","தி","செ","பு","வி","வெ","ச"],short:["ஞா","தி","செ","பு","வி","வெ","ச"],abbreviated:["ஞாயி.","திங்.","செவ்.","புத.","வியா.","வெள்.","சனி"],wide:["ஞாயிறு","திங்கள்","செவ்வாய்","புதன்","வியாழன்","வெள்ளி","சனி"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"மு.ப",pm:"பி.ப",midnight:"நள்.",noon:"நண்.",morning:"கா.",afternoon:"மதி.",evening:"மா.",night:"இர."},abbreviated:{am:"முற்பகல்",pm:"பிற்பகல்",midnight:"நள்ளிரவு",noon:"நண்பகல்",morning:"காலை",afternoon:"மதியம்",evening:"மாலை",night:"இரவு"},wide:{am:"முற்பகல்",pm:"பிற்பகல்",midnight:"நள்ளிரவு",noon:"நண்பகல்",morning:"காலை",afternoon:"மதியம்",evening:"மாலை",night:"இரவு"}},defaultWidth:"wide",formattingValues:{narrow:{am:"மு.ப",pm:"பி.ப",midnight:"நள்.",noon:"நண்.",morning:"கா.",afternoon:"மதி.",evening:"மா.",night:"இர."},abbreviated:{am:"முற்பகல்",pm:"பிற்பகல்",midnight:"நள்ளிரவு",noon:"நண்பகல்",morning:"காலை",afternoon:"மதியம்",evening:"மாலை",night:"இரவு"},wide:{am:"முற்பகல்",pm:"பிற்பகல்",midnight:"நள்ளிரவு",noon:"நண்பகல்",morning:"காலை",afternoon:"மதியம்",evening:"மாலை",night:"இரவு"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(வது)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(கி.மு.|கி.பி.)/i,abbreviated:/^(கி\.?\s?மு\.?|கி\.?\s?பி\.?)/,wide:/^(கிறிஸ்துவுக்கு\sமுன்|அன்னோ\sடோமினி)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/கி\.?\s?மு\.?/,/கி\.?\s?பி\.?/]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^காலா.[1234]/i,wide:/^(ஒன்றாம்|இரண்டாம்|மூன்றாம்|நான்காம்) காலாண்டு/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/1/i,/2/i,/3/i,/4/i],any:[/(1|காலா.1|ஒன்றாம்)/i,/(2|காலா.2|இரண்டாம்)/i,/(3|காலா.3|மூன்றாம்)/i,/(4|காலா.4|நான்காம்)/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(ஜ|பி|மா|ஏ|மே|ஜூ|ஆ|செ|அ|ந|டி)$/i,abbreviated:/^(ஜன.|பிப்.|மார்.|ஏப்.|மே|ஜூன்|ஜூலை|ஆக.|செப்.|அக்.|நவ.|டிச.)/i,wide:/^(ஜனவரி|பிப்ரவரி|மார்ச்|ஏப்ரல்|மே|ஜூன்|ஜூலை|ஆகஸ்ட்|செப்டம்பர்|அக்டோபர்|நவம்பர்|டிசம்பர்)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ஜ$/i,/^பி/i,/^மா/i,/^ஏ/i,/^மே/i,/^ஜூ/i,/^ஜூ/i,/^ஆ/i,/^செ/i,/^அ/i,/^ந/i,/^டி/i],any:[/^ஜன/i,/^பி/i,/^மா/i,/^ஏ/i,/^மே/i,/^ஜூன்/i,/^ஜூலை/i,/^ஆ/i,/^செ/i,/^அ/i,/^ந/i,/^டி/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^(ஞா|தி|செ|பு|வி|வெ|ச)/i,short:/^(ஞா|தி|செ|பு|வி|வெ|ச)/i,abbreviated:/^(ஞாயி.|திங்.|செவ்.|புத.|வியா.|வெள்.|சனி)/i,wide:/^(ஞாயிறு|திங்கள்|செவ்வாய்|புதன்|வியாழன்|வெள்ளி|சனி)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ஞா/i,/^தி/i,/^செ/i,/^பு/i,/^வி/i,/^வெ/i,/^ச/i],any:[/^ஞா/i,/^தி/i,/^செ/i,/^பு/i,/^வி/i,/^வெ/i,/^ச/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(மு.ப|பி.ப|நள்|நண்|காலை|மதியம்|மாலை|இரவு)/i,any:/^(மு.ப|பி.ப|முற்பகல்|பிற்பகல்|நள்ளிரவு|நண்பகல்|காலை|மதியம்|மாலை|இரவு)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^மு/i,pm:/^பி/i,midnight:/^நள்/i,noon:/^நண்/i,morning:/காலை/i,afternoon:/மதியம்/i,evening:/மாலை/i,night:/இரவு/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},hS={lessThanXSeconds:{standalone:{one:"సెకను కన్నా తక్కువ",other:"{{count}} సెకన్ల కన్నా తక్కువ"},withPreposition:{one:"సెకను",other:"{{count}} సెకన్ల"}},xSeconds:{standalone:{one:"ఒక సెకను",other:"{{count}} సెకన్ల"},withPreposition:{one:"ఒక సెకను",other:"{{count}} సెకన్ల"}},halfAMinute:{standalone:"అర నిమిషం",withPreposition:"అర నిమిషం"},lessThanXMinutes:{standalone:{one:"ఒక నిమిషం కన్నా తక్కువ",other:"{{count}} నిమిషాల కన్నా తక్కువ"},withPreposition:{one:"ఒక నిమిషం",other:"{{count}} నిమిషాల"}},xMinutes:{standalone:{one:"ఒక నిమిషం",other:"{{count}} నిమిషాలు"},withPreposition:{one:"ఒక నిమిషం",other:"{{count}} నిమిషాల"}},aboutXHours:{standalone:{one:"సుమారు ఒక గంట",other:"సుమారు {{count}} గంటలు"},withPreposition:{one:"సుమారు ఒక గంట",other:"సుమారు {{count}} గంటల"}},xHours:{standalone:{one:"ఒక గంట",other:"{{count}} గంటలు"},withPreposition:{one:"ఒక గంట",other:"{{count}} గంటల"}},xDays:{standalone:{one:"ఒక రోజు",other:"{{count}} రోజులు"},withPreposition:{one:"ఒక రోజు",other:"{{count}} రోజుల"}},aboutXWeeks:{standalone:{one:"సుమారు ఒక వారం",other:"సుమారు {{count}} వారాలు"},withPreposition:{one:"సుమారు ఒక వారం",other:"సుమారు {{count}} వారాలల"}},xWeeks:{standalone:{one:"ఒక వారం",other:"{{count}} వారాలు"},withPreposition:{one:"ఒక వారం",other:"{{count}} వారాలల"}},aboutXMonths:{standalone:{one:"సుమారు ఒక నెల",other:"సుమారు {{count}} నెలలు"},withPreposition:{one:"సుమారు ఒక నెల",other:"సుమారు {{count}} నెలల"}},xMonths:{standalone:{one:"ఒక నెల",other:"{{count}} నెలలు"},withPreposition:{one:"ఒక నెల",other:"{{count}} నెలల"}},aboutXYears:{standalone:{one:"సుమారు ఒక సంవత్సరం",other:"సుమారు {{count}} సంవత్సరాలు"},withPreposition:{one:"సుమారు ఒక సంవత్సరం",other:"సుమారు {{count}} సంవత్సరాల"}},xYears:{standalone:{one:"ఒక సంవత్సరం",other:"{{count}} సంవత్సరాలు"},withPreposition:{one:"ఒక సంవత్సరం",other:"{{count}} సంవత్సరాల"}},overXYears:{standalone:{one:"ఒక సంవత్సరం పైగా",other:"{{count}} సంవత్సరాలకు పైగా"},withPreposition:{one:"ఒక సంవత్సరం",other:"{{count}} సంవత్సరాల"}},almostXYears:{standalone:{one:"దాదాపు ఒక సంవత్సరం",other:"దాదాపు {{count}} సంవత్సరాలు"},withPreposition:{one:"దాదాపు ఒక సంవత్సరం",other:"దాదాపు {{count}} సంవత్సరాల"}}},mS={date:ef({formats:{full:"d, MMMM y, EEEE",long:"d MMMM, y",medium:"d MMM, y",short:"dd-MM-yy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}'కి'",long:"{{date}} {{time}}'కి'",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},fS={lastWeek:"'గత' eeee p",yesterday:"'నిన్న' p",today:"'ఈ రోజు' p",tomorrow:"'రేపు' p",nextWeek:"'తదుపరి' eeee p",other:"P"},pS={code:"te",formatDistance:(e,t,n)=>{let i;const a=n?.addSuffix?hS[e].withPreposition:hS[e].standalone;return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?i+"లో":i+" క్రితం":i},formatLong:mS,formatRelative:(e,t,n,i)=>fS[e],localize:{ordinalNumber:(e,t)=>Number(e)+"వ",era:af({values:{narrow:["క్రీ.పూ.","క్రీ.శ."],abbreviated:["క్రీ.పూ.","క్రీ.శ."],wide:["క్రీస్తు పూర్వం","క్రీస్తుశకం"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["త్రై1","త్రై2","త్రై3","త్రై4"],wide:["1వ త్రైమాసికం","2వ త్రైమాసికం","3వ త్రైమాసికం","4వ త్రైమాసికం"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["జ","ఫి","మా","ఏ","మే","జూ","జు","ఆ","సె","అ","న","డి"],abbreviated:["జన","ఫిబ్ర","మార్చి","ఏప్రి","మే","జూన్","జులై","ఆగ","సెప్టెం","అక్టో","నవం","డిసెం"],wide:["జనవరి","ఫిబ్రవరి","మార్చి","ఏప్రిల్","మే","జూన్","జులై","ఆగస్టు","సెప్టెంబర్","అక్టోబర్","నవంబర్","డిసెంబర్"]},defaultWidth:"wide"}),day:af({values:{narrow:["ఆ","సో","మ","బు","గు","శు","శ"],short:["ఆది","సోమ","మంగళ","బుధ","గురు","శుక్ర","శని"],abbreviated:["ఆది","సోమ","మంగళ","బుధ","గురు","శుక్ర","శని"],wide:["ఆదివారం","సోమవారం","మంగళవారం","బుధవారం","గురువారం","శుక్రవారం","శనివారం"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"పూర్వాహ్నం",pm:"అపరాహ్నం",midnight:"అర్ధరాత్రి",noon:"మిట్టమధ్యాహ్నం",morning:"ఉదయం",afternoon:"మధ్యాహ్నం",evening:"సాయంత్రం",night:"రాత్రి"},abbreviated:{am:"పూర్వాహ్నం",pm:"అపరాహ్నం",midnight:"అర్ధరాత్రి",noon:"మిట్టమధ్యాహ్నం",morning:"ఉదయం",afternoon:"మధ్యాహ్నం",evening:"సాయంత్రం",night:"రాత్రి"},wide:{am:"పూర్వాహ్నం",pm:"అపరాహ్నం",midnight:"అర్ధరాత్రి",noon:"మిట్టమధ్యాహ్నం",morning:"ఉదయం",afternoon:"మధ్యాహ్నం",evening:"సాయంత్రం",night:"రాత్రి"}},defaultWidth:"wide",formattingValues:{narrow:{am:"పూర్వాహ్నం",pm:"అపరాహ్నం",midnight:"అర్ధరాత్రి",noon:"మిట్టమధ్యాహ్నం",morning:"ఉదయం",afternoon:"మధ్యాహ్నం",evening:"సాయంత్రం",night:"రాత్రి"},abbreviated:{am:"పూర్వాహ్నం",pm:"అపరాహ్నం",midnight:"అర్ధరాత్రి",noon:"మిట్టమధ్యాహ్నం",morning:"ఉదయం",afternoon:"మధ్యాహ్నం",evening:"సాయంత్రం",night:"రాత్రి"},wide:{am:"పూర్వాహ్నం",pm:"అపరాహ్నం",midnight:"అర్ధరాత్రి",noon:"మిట్టమధ్యాహ్నం",morning:"ఉదయం",afternoon:"మధ్యాహ్నం",evening:"సాయంత్రం",night:"రాత్రి"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(వ)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(క్రీ\.పూ\.|క్రీ\.శ\.)/i,abbreviated:/^(క్రీ\.?\s?పూ\.?|ప్ర\.?\s?శ\.?\s?పూ\.?|క్రీ\.?\s?శ\.?|సా\.?\s?శ\.?)/i,wide:/^(క్రీస్తు పూర్వం|ప్రస్తుత శకానికి పూర్వం|క్రీస్తు శకం|ప్రస్తుత శకం)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(పూ|శ)/i,/^సా/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^త్రై[1234]/i,wide:/^[1234](వ)? త్రైమాసికం/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(జూ|జు|జ|ఫి|మా|ఏ|మే|ఆ|సె|అ|న|డి)/i,abbreviated:/^(జన|ఫిబ్ర|మార్చి|ఏప్రి|మే|జూన్|జులై|ఆగ|సెప్|అక్టో|నవ|డిసె)/i,wide:/^(జనవరి|ఫిబ్రవరి|మార్చి|ఏప్రిల్|మే|జూన్|జులై|ఆగస్టు|సెప్టెంబర్|అక్టోబర్|నవంబర్|డిసెంబర్)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^జ/i,/^ఫి/i,/^మా/i,/^ఏ/i,/^మే/i,/^జూ/i,/^జు/i,/^ఆ/i,/^సె/i,/^అ/i,/^న/i,/^డి/i],any:[/^జన/i,/^ఫి/i,/^మా/i,/^ఏ/i,/^మే/i,/^జూన్/i,/^జులై/i,/^ఆగ/i,/^సె/i,/^అ/i,/^న/i,/^డి/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^(ఆ|సో|మ|బు|గు|శు|శ)/i,short:/^(ఆది|సోమ|మం|బుధ|గురు|శుక్ర|శని)/i,abbreviated:/^(ఆది|సోమ|మం|బుధ|గురు|శుక్ర|శని)/i,wide:/^(ఆదివారం|సోమవారం|మంగళవారం|బుధవారం|గురువారం|శుక్రవారం|శనివారం)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ఆ/i,/^సో/i,/^మ/i,/^బు/i,/^గు/i,/^శు/i,/^శ/i],any:[/^ఆది/i,/^సోమ/i,/^మం/i,/^బుధ/i,/^గురు/i,/^శుక్ర/i,/^శని/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(పూర్వాహ్నం|అపరాహ్నం|అర్ధరాత్రి|మిట్టమధ్యాహ్నం|ఉదయం|మధ్యాహ్నం|సాయంత్రం|రాత్రి)/i,any:/^(పూర్వాహ్నం|అపరాహ్నం|అర్ధరాత్రి|మిట్టమధ్యాహ్నం|ఉదయం|మధ్యాహ్నం|సాయంత్రం|రాత్రి)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^పూర్వాహ్నం/i,pm:/^అపరాహ్నం/i,midnight:/^అర్ధ/i,noon:/^మిట్ట/i,morning:/ఉదయం/i,afternoon:/మధ్యాహ్నం/i,evening:/సాయంత్రం/i,night:/రాత్రి/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},gS={lessThanXSeconds:{one:"น้อยกว่า 1 วินาที",other:"น้อยกว่า {{count}} วินาที"},xSeconds:{one:"1 วินาที",other:"{{count}} วินาที"},halfAMinute:"ครึ่งนาที",lessThanXMinutes:{one:"น้อยกว่า 1 นาที",other:"น้อยกว่า {{count}} นาที"},xMinutes:{one:"1 นาที",other:"{{count}} นาที"},aboutXHours:{one:"ประมาณ 1 ชั่วโมง",other:"ประมาณ {{count}} ชั่วโมง"},xHours:{one:"1 ชั่วโมง",other:"{{count}} ชั่วโมง"},xDays:{one:"1 วัน",other:"{{count}} วัน"},aboutXWeeks:{one:"ประมาณ 1 สัปดาห์",other:"ประมาณ {{count}} สัปดาห์"},xWeeks:{one:"1 สัปดาห์",other:"{{count}} สัปดาห์"},aboutXMonths:{one:"ประมาณ 1 เดือน",other:"ประมาณ {{count}} เดือน"},xMonths:{one:"1 เดือน",other:"{{count}} เดือน"},aboutXYears:{one:"ประมาณ 1 ปี",other:"ประมาณ {{count}} ปี"},xYears:{one:"1 ปี",other:"{{count}} ปี"},overXYears:{one:"มากกว่า 1 ปี",other:"มากกว่า {{count}} ปี"},almostXYears:{one:"เกือบ 1 ปี",other:"เกือบ {{count}} ปี"}},vS={date:ef({formats:{full:"วันEEEEที่ do MMMM y",long:"do MMMM y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"H:mm:ss น. zzzz",long:"H:mm:ss น. z",medium:"H:mm:ss น.",short:"H:mm น."},defaultWidth:"medium"}),dateTime:ef({formats:{full:"{{date}} 'เวลา' {{time}}",long:"{{date}} 'เวลา' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},yS={lastWeek:"eeee'ที่แล้วเวลา' p",yesterday:"'เมื่อวานนี้เวลา' p",today:"'วันนี้เวลา' p",tomorrow:"'พรุ่งนี้เวลา' p",nextWeek:"eeee 'เวลา' p",other:"P"},wS={code:"th",formatDistance:(e,t,n)=>{let i;const a=gS[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"halfAMinute"===e?"ใน"+i:"ใน "+i:i+"ที่ผ่านมา":i},formatLong:vS,formatRelative:(e,t,n,i)=>yS[e],localize:{ordinalNumber:(e,t)=>String(e),era:af({values:{narrow:["B","คศ"],abbreviated:["BC","ค.ศ."],wide:["ปีก่อนคริสตกาล","คริสต์ศักราช"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["ไตรมาสแรก","ไตรมาสที่สอง","ไตรมาสที่สาม","ไตรมาสที่สี่"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],abbreviated:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],wide:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"]},defaultWidth:"wide"}),day:af({values:{narrow:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],short:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],abbreviated:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],wide:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ก่อนเที่ยง",pm:"หลังเที่ยง",midnight:"เที่ยงคืน",noon:"เที่ยง",morning:"เช้า",afternoon:"บ่าย",evening:"เย็น",night:"กลางคืน"},abbreviated:{am:"ก่อนเที่ยง",pm:"หลังเที่ยง",midnight:"เที่ยงคืน",noon:"เที่ยง",morning:"เช้า",afternoon:"บ่าย",evening:"เย็น",night:"กลางคืน"},wide:{am:"ก่อนเที่ยง",pm:"หลังเที่ยง",midnight:"เที่ยงคืน",noon:"เที่ยง",morning:"เช้า",afternoon:"บ่าย",evening:"เย็น",night:"กลางคืน"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ก่อนเที่ยง",pm:"หลังเที่ยง",midnight:"เที่ยงคืน",noon:"เที่ยง",morning:"ตอนเช้า",afternoon:"ตอนกลางวัน",evening:"ตอนเย็น",night:"ตอนกลางคืน"},abbreviated:{am:"ก่อนเที่ยง",pm:"หลังเที่ยง",midnight:"เที่ยงคืน",noon:"เที่ยง",morning:"ตอนเช้า",afternoon:"ตอนกลางวัน",evening:"ตอนเย็น",night:"ตอนกลางคืน"},wide:{am:"ก่อนเที่ยง",pm:"หลังเที่ยง",midnight:"เที่ยงคืน",noon:"เที่ยง",morning:"ตอนเช้า",afternoon:"ตอนกลางวัน",evening:"ตอนเย็น",night:"ตอนกลางคืน"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^\d+/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^([bB]|[aA]|คศ)/i,abbreviated:/^([bB]\.?\s?[cC]\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?|ค\.?ศ\.?)/i,wide:/^(ก่อนคริสตกาล|คริสต์ศักราช|คริสตกาล)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^[bB]/i,/^(^[aA]|ค\.?ศ\.?|คริสตกาล|คริสต์ศักราช|)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^ไตรมาส(ที่)? ?[1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(1|แรก|หนึ่ง)/i,/(2|สอง)/i,/(3|สาม)/i,/(4|สี่)/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(ม\.?ค\.?|ก\.?พ\.?|มี\.?ค\.?|เม\.?ย\.?|พ\.?ค\.?|มิ\.?ย\.?|ก\.?ค\.?|ส\.?ค\.?|ก\.?ย\.?|ต\.?ค\.?|พ\.?ย\.?|ธ\.?ค\.?)/i,abbreviated:/^(ม\.?ค\.?|ก\.?พ\.?|มี\.?ค\.?|เม\.?ย\.?|พ\.?ค\.?|มิ\.?ย\.?|ก\.?ค\.?|ส\.?ค\.?|ก\.?ย\.?|ต\.?ค\.?|พ\.?ย\.?|ธ\.?ค\.?')/i,wide:/^(มกราคม|กุมภาพันธ์|มีนาคม|เมษายน|พฤษภาคม|มิถุนายน|กรกฎาคม|สิงหาคม|กันยายน|ตุลาคม|พฤศจิกายน|ธันวาคม)/i},defaultMatchWidth:"wide",parsePatterns:{wide:[/^มก/i,/^กุม/i,/^มี/i,/^เม/i,/^พฤษ/i,/^มิ/i,/^กรก/i,/^ส/i,/^กัน/i,/^ต/i,/^พฤศ/i,/^ธ/i],any:[/^ม\.?ค\.?/i,/^ก\.?พ\.?/i,/^มี\.?ค\.?/i,/^เม\.?ย\.?/i,/^พ\.?ค\.?/i,/^มิ\.?ย\.?/i,/^ก\.?ค\.?/i,/^ส\.?ค\.?/i,/^ก\.?ย\.?/i,/^ต\.?ค\.?/i,/^พ\.?ย\.?/i,/^ธ\.?ค\.?/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^(อา\.?|จ\.?|อ\.?|พฤ\.?|พ\.?|ศ\.?|ส\.?)/i,short:/^(อา\.?|จ\.?|อ\.?|พฤ\.?|พ\.?|ศ\.?|ส\.?)/i,abbreviated:/^(อา\.?|จ\.?|อ\.?|พฤ\.?|พ\.?|ศ\.?|ส\.?)/i,wide:/^(อาทิตย์|จันทร์|อังคาร|พุธ|พฤหัสบดี|ศุกร์|เสาร์)/i},defaultMatchWidth:"wide",parsePatterns:{wide:[/^อา/i,/^จั/i,/^อั/i,/^พุธ/i,/^พฤ/i,/^ศ/i,/^เส/i],any:[/^อา/i,/^จ/i,/^อ/i,/^พ(?!ฤ)/i,/^พฤ/i,/^ศ/i,/^ส/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(ก่อนเที่ยง|หลังเที่ยง|เที่ยงคืน|เที่ยง|(ตอน.*?)?.*(เที่ยง|เช้า|บ่าย|เย็น|กลางคืน))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ก่อนเที่ยง/i,pm:/^หลังเที่ยง/i,midnight:/^เที่ยงคืน/i,noon:/^เที่ยง/i,morning:/เช้า/i,afternoon:/บ่าย/i,evening:/เย็น/i,night:/กลางคืน/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},bS={lessThanXSeconds:{one:"bir saniyeden az",other:"{{count}} saniyeden az"},xSeconds:{one:"1 saniye",other:"{{count}} saniye"},halfAMinute:"yarım dakika",lessThanXMinutes:{one:"bir dakikadan az",other:"{{count}} dakikadan az"},xMinutes:{one:"1 dakika",other:"{{count}} dakika"},aboutXHours:{one:"yaklaşık 1 saat",other:"yaklaşık {{count}} saat"},xHours:{one:"1 saat",other:"{{count}} saat"},xDays:{one:"1 gün",other:"{{count}} gün"},aboutXWeeks:{one:"yaklaşık 1 hafta",other:"yaklaşık {{count}} hafta"},xWeeks:{one:"1 hafta",other:"{{count}} hafta"},aboutXMonths:{one:"yaklaşık 1 ay",other:"yaklaşık {{count}} ay"},xMonths:{one:"1 ay",other:"{{count}} ay"},aboutXYears:{one:"yaklaşık 1 yıl",other:"yaklaşık {{count}} yıl"},xYears:{one:"1 yıl",other:"{{count}} yıl"},overXYears:{one:"1 yıldan fazla",other:"{{count}} yıldan fazla"},almostXYears:{one:"neredeyse 1 yıl",other:"neredeyse {{count}} yıl"}},kS={date:ef({formats:{full:"d MMMM y EEEE",long:"d MMMM y",medium:"d MMM y",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'saat' {{time}}",long:"{{date}} 'saat' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},SS={lastWeek:"'geçen hafta' eeee 'saat' p",yesterday:"'dün saat' p",today:"'bugün saat' p",tomorrow:"'yarın saat' p",nextWeek:"eeee 'saat' p",other:"P"},MS={code:"tr",formatDistance:(e,t,n)=>{let i;const a=bS[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?i+" sonra":i+" önce":i},formatLong:kS,formatRelative:(e,t,n,i)=>SS[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:af({values:{narrow:["MÖ","MS"],abbreviated:["MÖ","MS"],wide:["Milattan Önce","Milattan Sonra"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1Ç","2Ç","3Ç","4Ç"],wide:["İlk çeyrek","İkinci Çeyrek","Üçüncü çeyrek","Son çeyrek"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:af({values:{narrow:["O","Ş","M","N","M","H","T","A","E","E","K","A"],abbreviated:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],wide:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"]},defaultWidth:"wide"}),day:af({values:{narrow:["P","P","S","Ç","P","C","C"],short:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],abbreviated:["Paz","Pzt","Sal","Çar","Per","Cum","Cts"],wide:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"öö",pm:"ös",midnight:"gy",noon:"ö",morning:"sa",afternoon:"ös",evening:"ak",night:"ge"},abbreviated:{am:"ÖÖ",pm:"ÖS",midnight:"gece yarısı",noon:"öğle",morning:"sabah",afternoon:"öğleden sonra",evening:"akşam",night:"gece"},wide:{am:"Ö.Ö.",pm:"Ö.S.",midnight:"gece yarısı",noon:"öğle",morning:"sabah",afternoon:"öğleden sonra",evening:"akşam",night:"gece"}},defaultWidth:"wide",formattingValues:{narrow:{am:"öö",pm:"ös",midnight:"gy",noon:"ö",morning:"sa",afternoon:"ös",evening:"ak",night:"ge"},abbreviated:{am:"ÖÖ",pm:"ÖS",midnight:"gece yarısı",noon:"öğlen",morning:"sabahleyin",afternoon:"öğleden sonra",evening:"akşamleyin",night:"geceleyin"},wide:{am:"ö.ö.",pm:"ö.s.",midnight:"gece yarısı",noon:"öğlen",morning:"sabahleyin",afternoon:"öğleden sonra",evening:"akşamleyin",night:"geceleyin"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:of({matchPatterns:{narrow:/^(mö|ms)/i,abbreviated:/^(mö|ms)/i,wide:/^(milattan önce|milattan sonra)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(^mö|^milattan önce)/i,/(^ms|^milattan sonra)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]ç/i,wide:/^((i|İ)lk|(i|İ)kinci|üçüncü|son) çeyrek/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i],abbreviated:[/1ç/i,/2ç/i,/3ç/i,/4ç/i],wide:[/^(i|İ)lk çeyrek/i,/(i|İ)kinci çeyrek/i,/üçüncü çeyrek/i,/son çeyrek/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[oşmnhtaek]/i,abbreviated:/^(oca|şub|mar|nis|may|haz|tem|ağu|eyl|eki|kas|ara)/i,wide:/^(ocak|şubat|mart|nisan|mayıs|haziran|temmuz|ağustos|eylül|ekim|kasım|aralık)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^o/i,/^ş/i,/^m/i,/^n/i,/^m/i,/^h/i,/^t/i,/^a/i,/^e/i,/^e/i,/^k/i,/^a/i],any:[/^o/i,/^ş/i,/^mar/i,/^n/i,/^may/i,/^h/i,/^t/i,/^ağ/i,/^ey/i,/^ek/i,/^k/i,/^ar/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[psçc]/i,short:/^(pz|pt|sa|ça|pe|cu|ct)/i,abbreviated:/^(paz|pzt|sal|çar|per|cum|cts)/i,wide:/^(pazar(?!tesi)|pazartesi|salı|çarşamba|perşembe|cuma(?!rtesi)|cumartesi)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^p/i,/^p/i,/^s/i,/^ç/i,/^p/i,/^c/i,/^c/i],any:[/^pz/i,/^pt/i,/^sa/i,/^ça/i,/^pe/i,/^cu/i,/^ct/i],wide:[/^pazar(?!tesi)/i,/^pazartesi/i,/^salı/i,/^çarşamba/i,/^perşembe/i,/^cuma(?!rtesi)/i,/^cumartesi/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(öö|ös|gy|ö|sa|ös|ak|ge)/i,any:/^(ö\.?\s?[ös]\.?|öğleden sonra|gece yarısı|öğle|(sabah|öğ|akşam|gece)(leyin))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ö\.?ö\.?/i,pm:/^ö\.?s\.?/i,midnight:/^(gy|gece yarısı)/i,noon:/^öğ/i,morning:/^sa/i,afternoon:/^öğleden sonra/i,evening:/^ak/i,night:/^ge/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},ES={lessThanXSeconds:{one:"بىر سىكۇنت ئىچىدە",other:"سىكۇنت ئىچىدە {{count}}"},xSeconds:{one:"بىر سىكۇنت",other:"سىكۇنت {{count}}"},halfAMinute:"يىرىم مىنۇت",lessThanXMinutes:{one:"بىر مىنۇت ئىچىدە",other:"مىنۇت ئىچىدە {{count}}"},xMinutes:{one:"بىر مىنۇت",other:"مىنۇت {{count}}"},aboutXHours:{one:"تەخمىنەن بىر سائەت",other:"سائەت {{count}} تەخمىنەن"},xHours:{one:"بىر سائەت",other:"سائەت {{count}}"},xDays:{one:"بىر كۈن",other:"كۈن {{count}}"},aboutXWeeks:{one:"تەخمىنەن بىرھەپتە",other:"ھەپتە {{count}} تەخمىنەن"},xWeeks:{one:"بىرھەپتە",other:"ھەپتە {{count}}"},aboutXMonths:{one:"تەخمىنەن بىر ئاي",other:"ئاي {{count}} تەخمىنەن"},xMonths:{one:"بىر ئاي",other:"ئاي {{count}}"},aboutXYears:{one:"تەخمىنەن بىر يىل",other:"يىل {{count}} تەخمىنەن"},xYears:{one:"بىر يىل",other:"يىل {{count}}"},overXYears:{one:"بىر يىلدىن ئارتۇق",other:"يىلدىن ئارتۇق {{count}}"},almostXYears:{one:"ئاساسەن بىر يىل",other:"يىل {{count}} ئاساسەن"}},TS={date:ef({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'دە' {{time}}",long:"{{date}} 'دە' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},PS={lastWeek:"'ئۆتكەن' eeee 'دە' p",yesterday:"'تۈنۈگۈن دە' p",today:"'بۈگۈن دە' p",tomorrow:"'ئەتە دە' p",nextWeek:"eeee 'دە' p",other:"P"},AS={code:"ug",formatDistance:(e,t,n)=>{let i;const a=ES[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?i:i+" بولدى":i},formatLong:TS,formatRelative:(e,t,n,i)=>PS[e],localize:{ordinalNumber:(e,t)=>String(e),era:af({values:{narrow:["ب","ك"],abbreviated:["ب","ك"],wide:["مىيلادىدىن بۇرۇن","مىيلادىدىن كىيىن"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1","2","3","4"],wide:["بىرىنجى چارەك","ئىككىنجى چارەك","ئۈچىنجى چارەك","تۆتىنجى چارەك"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["ي","ف","م","ا","م","ى","ى","ا","س","ۆ","ن","د"],abbreviated:["يانۋار","فېۋىرال","مارت","ئاپرىل","ماي","ئىيۇن","ئىيول","ئاۋغۇست","سىنتەبىر","ئۆكتەبىر","نويابىر","دىكابىر"],wide:["يانۋار","فېۋىرال","مارت","ئاپرىل","ماي","ئىيۇن","ئىيول","ئاۋغۇست","سىنتەبىر","ئۆكتەبىر","نويابىر","دىكابىر"]},defaultWidth:"wide"}),day:af({values:{narrow:["ي","د","س","چ","پ","ج","ش"],short:["ي","د","س","چ","پ","ج","ش"],abbreviated:["يەكشەنبە","دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"],wide:["يەكشەنبە","دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ئە",pm:"چ",midnight:"ك",noon:"چ",morning:"ئەتىگەن",afternoon:"چۈشتىن كىيىن",evening:"ئاخشىم",night:"كىچە"},abbreviated:{am:"ئە",pm:"چ",midnight:"ك",noon:"چ",morning:"ئەتىگەن",afternoon:"چۈشتىن كىيىن",evening:"ئاخشىم",night:"كىچە"},wide:{am:"ئە",pm:"چ",midnight:"ك",noon:"چ",morning:"ئەتىگەن",afternoon:"چۈشتىن كىيىن",evening:"ئاخشىم",night:"كىچە"}},defaultWidth:"wide",formattingValues:{narrow:{am:"ئە",pm:"چ",midnight:"ك",noon:"چ",morning:"ئەتىگەندە",afternoon:"چۈشتىن كىيىن",evening:"ئاخشامدا",night:"كىچىدە"},abbreviated:{am:"ئە",pm:"چ",midnight:"ك",noon:"چ",morning:"ئەتىگەندە",afternoon:"چۈشتىن كىيىن",evening:"ئاخشامدا",night:"كىچىدە"},wide:{am:"ئە",pm:"چ",midnight:"ك",noon:"چ",morning:"ئەتىگەندە",afternoon:"چۈشتىن كىيىن",evening:"ئاخشامدا",night:"كىچىدە"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(ب|ك)/i,wide:/^(مىيلادىدىن بۇرۇن|مىيلادىدىن كىيىن)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^بۇرۇن/i,/^كىيىن/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^چ[1234]/i,wide:/^چارەك [1234]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[يفمئامئئاسۆند]/i,abbreviated:/^(يانۋار|فېۋىرال|مارت|ئاپرىل|ماي|ئىيۇن|ئىيول|ئاۋغۇست|سىنتەبىر|ئۆكتەبىر|نويابىر|دىكابىر)/i,wide:/^(يانۋار|فېۋىرال|مارت|ئاپرىل|ماي|ئىيۇن|ئىيول|ئاۋغۇست|سىنتەبىر|ئۆكتەبىر|نويابىر|دىكابىر)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ي/i,/^ف/i,/^م/i,/^ا/i,/^م/i,/^ى/i,/^ى/i,/^ا/i,/^س/i,/^ۆ/i,/^ن/i,/^د/i],any:[/^يان/i,/^فېۋ/i,/^مار/i,/^ئاپ/i,/^ماي/i,/^ئىيۇن/i,/^ئىيول/i,/^ئاۋ/i,/^سىن/i,/^ئۆك/i,/^نوي/i,/^دىك/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[دسچپجشي]/i,short:/^(يە|دۈ|سە|چا|پە|جۈ|شە)/i,abbreviated:/^(يە|دۈ|سە|چا|پە|جۈ|شە)/i,wide:/^(يەكشەنبە|دۈشەنبە|سەيشەنبە|چارشەنبە|پەيشەنبە|جۈمە|شەنبە)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ي/i,/^د/i,/^س/i,/^چ/i,/^پ/i,/^ج/i,/^ش/i],any:[/^ي/i,/^د/i,/^س/i,/^چ/i,/^پ/i,/^ج/i,/^ش/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(ئە|چ|ك|چ|(دە|ئەتىگەن) ( ئە|چۈشتىن كىيىن|ئاخشىم|كىچە))/i,any:/^(ئە|چ|ك|چ|(دە|ئەتىگەن) ( ئە|چۈشتىن كىيىن|ئاخشىم|كىچە))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ئە/i,pm:/^چ/i,midnight:/^ك/i,noon:/^چ/i,morning:/ئەتىگەن/i,afternoon:/چۈشتىن كىيىن/i,evening:/ئاخشىم/i,night:/كىچە/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function xS(e,t){if(void 0!==e.one&&1===t)return e.one;const n=t%10,i=t%100;return 1===n&&11!==i?e.singularNominative.replace("{{count}}",String(t)):n>=2&&n<=4&&(i<10||i>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function _S(e){return(t,n)=>n&&n.addSuffix?n.comparison&&n.comparison>0?e.future?xS(e.future,t):"за "+xS(e.regular,t):e.past?xS(e.past,t):xS(e.regular,t)+" тому":xS(e.regular,t)}const CS={lessThanXSeconds:_S({regular:{one:"менше секунди",singularNominative:"менше {{count}} секунди",singularGenitive:"менше {{count}} секунд",pluralGenitive:"менше {{count}} секунд"},future:{one:"менше, ніж за секунду",singularNominative:"менше, ніж за {{count}} секунду",singularGenitive:"менше, ніж за {{count}} секунди",pluralGenitive:"менше, ніж за {{count}} секунд"}}),xSeconds:_S({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунди",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду тому",singularGenitive:"{{count}} секунди тому",pluralGenitive:"{{count}} секунд тому"},future:{singularNominative:"за {{count}} секунду",singularGenitive:"за {{count}} секунди",pluralGenitive:"за {{count}} секунд"}}),halfAMinute:(e,t)=>t&&t.addSuffix?t.comparison&&t.comparison>0?"за півхвилини":"півхвилини тому":"півхвилини",lessThanXMinutes:_S({regular:{one:"менше хвилини",singularNominative:"менше {{count}} хвилини",singularGenitive:"менше {{count}} хвилин",pluralGenitive:"менше {{count}} хвилин"},future:{one:"менше, ніж за хвилину",singularNominative:"менше, ніж за {{count}} хвилину",singularGenitive:"менше, ніж за {{count}} хвилини",pluralGenitive:"менше, ніж за {{count}} хвилин"}}),xMinutes:_S({regular:{singularNominative:"{{count}} хвилина",singularGenitive:"{{count}} хвилини",pluralGenitive:"{{count}} хвилин"},past:{singularNominative:"{{count}} хвилину тому",singularGenitive:"{{count}} хвилини тому",pluralGenitive:"{{count}} хвилин тому"},future:{singularNominative:"за {{count}} хвилину",singularGenitive:"за {{count}} хвилини",pluralGenitive:"за {{count}} хвилин"}}),aboutXHours:_S({regular:{singularNominative:"близько {{count}} години",singularGenitive:"близько {{count}} годин",pluralGenitive:"близько {{count}} годин"},future:{singularNominative:"приблизно за {{count}} годину",singularGenitive:"приблизно за {{count}} години",pluralGenitive:"приблизно за {{count}} годин"}}),xHours:_S({regular:{singularNominative:"{{count}} годину",singularGenitive:"{{count}} години",pluralGenitive:"{{count}} годин"}}),xDays:_S({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} днi",pluralGenitive:"{{count}} днів"}}),aboutXWeeks:_S({regular:{singularNominative:"близько {{count}} тижня",singularGenitive:"близько {{count}} тижнів",pluralGenitive:"близько {{count}} тижнів"},future:{singularNominative:"приблизно за {{count}} тиждень",singularGenitive:"приблизно за {{count}} тижні",pluralGenitive:"приблизно за {{count}} тижнів"}}),xWeeks:_S({regular:{singularNominative:"{{count}} тиждень",singularGenitive:"{{count}} тижні",pluralGenitive:"{{count}} тижнів"}}),aboutXMonths:_S({regular:{singularNominative:"близько {{count}} місяця",singularGenitive:"близько {{count}} місяців",pluralGenitive:"близько {{count}} місяців"},future:{singularNominative:"приблизно за {{count}} місяць",singularGenitive:"приблизно за {{count}} місяці",pluralGenitive:"приблизно за {{count}} місяців"}}),xMonths:_S({regular:{singularNominative:"{{count}} місяць",singularGenitive:"{{count}} місяці",pluralGenitive:"{{count}} місяців"}}),aboutXYears:_S({regular:{singularNominative:"близько {{count}} року",singularGenitive:"близько {{count}} років",pluralGenitive:"близько {{count}} років"},future:{singularNominative:"приблизно за {{count}} рік",singularGenitive:"приблизно за {{count}} роки",pluralGenitive:"приблизно за {{count}} років"}}),xYears:_S({regular:{singularNominative:"{{count}} рік",singularGenitive:"{{count}} роки",pluralGenitive:"{{count}} років"}}),overXYears:_S({regular:{singularNominative:"більше {{count}} року",singularGenitive:"більше {{count}} років",pluralGenitive:"більше {{count}} років"},future:{singularNominative:"більше, ніж за {{count}} рік",singularGenitive:"більше, ніж за {{count}} роки",pluralGenitive:"більше, ніж за {{count}} років"}}),almostXYears:_S({regular:{singularNominative:"майже {{count}} рік",singularGenitive:"майже {{count}} роки",pluralGenitive:"майже {{count}} років"},future:{singularNominative:"майже за {{count}} рік",singularGenitive:"майже за {{count}} роки",pluralGenitive:"майже за {{count}} років"}})},LS={date:ef({formats:{full:"EEEE, do MMMM y 'р.'",long:"do MMMM y 'р.'",medium:"d MMM y 'р.'",short:"dd.MM.y"},defaultWidth:"full"}),time:ef({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} 'о' {{time}}",long:"{{date}} 'о' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},IS=["неділю","понеділок","вівторок","середу","четвер","п’ятницю","суботу"];function DS(e){return"'у "+IS[e]+" о' p"}const RS={lastWeek:(e,t,n)=>{const i=Bf(e),a=i.getDay();return Vf(i,t,n)?DS(a):function(e){const t=IS[e];switch(e){case 0:case 3:case 5:case 6:return"'у минулу "+t+" о' p";case 1:case 2:case 4:return"'у минулий "+t+" о' p"}}(a)},yesterday:"'вчора о' p",today:"'сьогодні о' p",tomorrow:"'завтра о' p",nextWeek:(e,t,n)=>{const i=Bf(e),a=i.getDay();return Vf(i,t,n)?DS(a):function(e){const t=IS[e];switch(e){case 0:case 3:case 5:case 6:return"'у наступну "+t+" о' p";case 1:case 2:case 4:return"'у наступний "+t+" о' p"}}(a)},other:"P"},WS={code:"uk",formatDistance:(e,t,n)=>(n=n||{},CS[e](t,n)),formatLong:LS,formatRelative:(e,t,n,i)=>{const a=RS[e];return"function"==typeof a?a(t,n,i):a},localize:{ordinalNumber:(e,t)=>{const n=String(t?.unit),i=Number(e);let a;return a="date"===n?3===i||23===i?"-є":"-е":"minute"===n||"second"===n||"hour"===n?"-а":"-й",i+a},era:af({values:{narrow:["до н.е.","н.е."],abbreviated:["до н. е.","н. е."],wide:["до нашої ери","нашої ери"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"]},defaultWidth:"wide",formattingValues:{narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["Н","П","В","С","Ч","П","С"],short:["нд","пн","вт","ср","чт","пт","сб"],abbreviated:["нед","пон","вів","сер","чтв","птн","суб"],wide:["неділя","понеділок","вівторок","середа","четвер","п’ятниця","субота"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранок",afternoon:"день",evening:"вечір",night:"ніч"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(-?(е|й|є|а|я))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^((до )?н\.?\s?е\.?)/i,abbreviated:/^((до )?н\.?\s?е\.?)/i,wide:/^(до нашої ери|нашої ери|наша ера)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[иі]?й?)? кв.?/i,wide:/^[1234](-?[иі]?й?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[слбктчвжг]/i,abbreviated:/^(січ|лют|бер(ез)?|квіт|трав|черв|лип|серп|вер(ес)?|жовт|лис(топ)?|груд)\.?/i,wide:/^(січень|січня|лютий|лютого|березень|березня|квітень|квітня|травень|травня|червня|червень|липень|липня|серпень|серпня|вересень|вересня|жовтень|жовтня|листопад[а]?|грудень|грудня)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^с/i,/^л/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^л/i,/^с/i,/^в/i,/^ж/i,/^л/i,/^г/i],any:[/^сі/i,/^лю/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^лип/i,/^се/i,/^в/i,/^ж/i,/^лис/i,/^г/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[нпвсч]/i,short:/^(нд|пн|вт|ср|чт|пт|сб)\.?/i,abbreviated:/^(нед|пон|вів|сер|че?тв|птн?|суб)\.?/i,wide:/^(неділ[яі]|понеділ[ок][ка]|вівтор[ок][ка]|серед[аи]|четвер(га)?|п\W*?ятниц[яі]|субот[аи])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^н/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н/i,/^п[он]/i,/^в/i,/^с[ер]/i,/^ч/i,/^п\W*?[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,abbreviated:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,wide:/^([дп]п|північ|полудень|ранок|ранку|день|дня|вечір|вечора|ніч|ночі)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^півн/i,noon:/^пол/i,morning:/^р/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},NS={lessThanXSeconds:{one:"sekunddan kam",other:"{{count}} sekunddan kam"},xSeconds:{one:"1 sekund",other:"{{count}} sekund"},halfAMinute:"yarim minut",lessThanXMinutes:{one:"bir minutdan kam",other:"{{count}} minutdan kam"},xMinutes:{one:"1 minut",other:"{{count}} minut"},aboutXHours:{one:"tahminan 1 soat",other:"tahminan {{count}} soat"},xHours:{one:"1 soat",other:"{{count}} soat"},xDays:{one:"1 kun",other:"{{count}} kun"},aboutXWeeks:{one:"tahminan 1 hafta",other:"tahminan {{count}} hafta"},xWeeks:{one:"1 hafta",other:"{{count}} hafta"},aboutXMonths:{one:"tahminan 1 oy",other:"tahminan {{count}} oy"},xMonths:{one:"1 oy",other:"{{count}} oy"},aboutXYears:{one:"tahminan 1 yil",other:"tahminan {{count}} yil"},xYears:{one:"1 yil",other:"{{count}} yil"},overXYears:{one:"1 yildan ko'p",other:"{{count}} yildan ko'p"},almostXYears:{one:"deyarli 1 yil",other:"deyarli {{count}} yil"}},OS={date:ef({formats:{full:"EEEE, do MMMM, y",long:"do MMMM, y",medium:"d MMM, y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"h:mm:ss zzzz",long:"h:mm:ss z",medium:"h:mm:ss",short:"h:mm"},defaultWidth:"full"}),dateTime:ef({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},FS={lastWeek:"'oldingi' eeee p 'da'",yesterday:"'kecha' p 'da'",today:"'bugun' p 'da'",tomorrow:"'ertaga' p 'da'",nextWeek:"eeee p 'da'",other:"P"},jS={code:"uz",formatDistance:(e,t,n)=>{let i;const a=NS[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?i+" dan keyin":i+" oldin":i},formatLong:OS,formatRelative:(e,t,n,i)=>FS[e],localize:{ordinalNumber:(e,t)=>String(e),era:af({values:{narrow:["M.A","M."],abbreviated:["M.A","M."],wide:["Miloddan Avvalgi","Milodiy"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["CH.1","CH.2","CH.3","CH.4"],wide:["1-chi chorak","2-chi chorak","3-chi chorak","4-chi chorak"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["Y","F","M","A","M","I","I","A","S","O","N","D"],abbreviated:["Yan","Fev","Mar","Apr","May","Iyun","Iyul","Avg","Sen","Okt","Noy","Dek"],wide:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avgust","Sentabr","Oktabr","Noyabr","Dekabr"]},defaultWidth:"wide"}),day:af({values:{narrow:["Y","D","S","CH","P","J","SH"],short:["Ya","Du","Se","Cho","Pa","Ju","Sha"],abbreviated:["Yak","Dush","Sesh","Chor","Pay","Jum","Shan"],wide:["Yakshanba","Dushanba","Seshanba","Chorshanba","Payshanba","Juma","Shanba"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"a",pm:"p",midnight:"y.t",noon:"p.",morning:"ertalab",afternoon:"tushdan keyin",evening:"kechqurun",night:"tun"},abbreviated:{am:"AM",pm:"PM",midnight:"yarim tun",noon:"peshin",morning:"ertalab",afternoon:"tushdan keyin",evening:"kechqurun",night:"tun"},wide:{am:"a.m.",pm:"p.m.",midnight:"yarim tun",noon:"peshin",morning:"ertalab",afternoon:"tushdan keyin",evening:"kechqurun",night:"tun"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"y.t",noon:"p.",morning:"ertalab",afternoon:"tushdan keyin",evening:"kechqurun",night:"tun"},abbreviated:{am:"AM",pm:"PM",midnight:"yarim tun",noon:"peshin",morning:"ertalab",afternoon:"tushdan keyin",evening:"kechqurun",night:"tun"},wide:{am:"a.m.",pm:"p.m.",midnight:"yarim tun",noon:"peshin",morning:"ertalab",afternoon:"tushdan keyin",evening:"kechqurun",night:"tun"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(chi)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(m\.a|m\.)/i,abbreviated:/^(m\.a\.?\s?m\.?)/i,wide:/^(miloddan avval|miloddan keyin)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](chi)? chorak/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[yfmasond]/i,abbreviated:/^(yan|fev|mar|apr|may|iyun|iyul|avg|sen|okt|noy|dek)/i,wide:/^(yanvar|fevral|mart|aprel|may|iyun|iyul|avgust|sentabr|oktabr|noyabr|dekabr)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^y/i,/^f/i,/^m/i,/^a/i,/^m/i,/^i/i,/^i/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ya/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^iyun/i,/^iyul/i,/^av/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[ydschj]/i,short:/^(ya|du|se|cho|pa|ju|sha)/i,abbreviated:/^(yak|dush|sesh|chor|pay|jum|shan)/i,wide:/^(yakshanba|dushanba|seshanba|chorshanba|payshanba|juma|shanba)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^y/i,/^d/i,/^s/i,/^ch/i,/^p/i,/^j/i,/^sh/i],any:[/^ya/i,/^d/i,/^se/i,/^ch/i,/^p/i,/^j/i,/^sh/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|y\.t|p| (ertalab|tushdan keyin|kechqurun|tun))/i,any:/^([ap]\.?\s?m\.?|yarim tun|peshin| (ertalab|tushdan keyin|kechqurun|tun))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^y\.t/i,noon:/^pe/i,morning:/ertalab/i,afternoon:/tushdan keyin/i,evening:/kechqurun/i,night:/tun/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},zS={lessThanXSeconds:{one:"1 сониядан кам",other:"{{count}} сониядан кам"},xSeconds:{one:"1 сония",other:"{{count}} сония"},halfAMinute:"ярим дақиқа",lessThanXMinutes:{one:"1 дақиқадан кам",other:"{{count}} дақиқадан кам"},xMinutes:{one:"1 дақиқа",other:"{{count}} дақиқа"},aboutXHours:{one:"тахминан 1 соат",other:"тахминан {{count}} соат"},xHours:{one:"1 соат",other:"{{count}} соат"},xDays:{one:"1 кун",other:"{{count}} кун"},aboutXWeeks:{one:"тахминан 1 хафта",other:"тахминан {{count}} хафта"},xWeeks:{one:"1 хафта",other:"{{count}} хафта"},aboutXMonths:{one:"тахминан 1 ой",other:"тахминан {{count}} ой"},xMonths:{one:"1 ой",other:"{{count}} ой"},aboutXYears:{one:"тахминан 1 йил",other:"тахминан {{count}} йил"},xYears:{one:"1 йил",other:"{{count}} йил"},overXYears:{one:"1 йилдан кўп",other:"{{count}} йилдан кўп"},almostXYears:{one:"деярли 1 йил",other:"деярли {{count}} йил"}},$S={date:ef({formats:{full:"EEEE, do MMMM, y",long:"do MMMM, y",medium:"d MMM, y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ef({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:ef({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},US={lastWeek:"'ўтган' eeee p 'да'",yesterday:"'кеча' p 'да'",today:"'бугун' p 'да'",tomorrow:"'эртага' p 'да'",nextWeek:"eeee p 'да'",other:"P"},HS={code:"uz-Cyrl",formatDistance:(e,t,n)=>{let i;const a=zS[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?i+"дан кейин":i+" олдин":i},formatLong:$S,formatRelative:(e,t,n,i)=>US[e],localize:{ordinalNumber:(e,t)=>String(e),era:af({values:{narrow:["М.А","М"],abbreviated:["М.А","М"],wide:["Милоддан Аввалги","Милодий"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["1-чор.","2-чор.","3-чор.","4-чор."],wide:["1-чорак","2-чорак","3-чорак","4-чорак"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"],wide:["январ","феврал","март","апрел","май","июн","июл","август","сентабр","октабр","ноябр","декабр"]},defaultWidth:"wide"}),day:af({values:{narrow:["Я","Д","С","Ч","П","Ж","Ш"],short:["як","ду","се","чо","па","жу","ша"],abbreviated:["якш","душ","сеш","чор","пай","жум","шан"],wide:["якшанба","душанба","сешанба","чоршанба","пайшанба","жума","шанба"]},defaultWidth:"wide"}),dayPeriod:af({values:{any:{am:"П.О.",pm:"П.К.",midnight:"ярим тун",noon:"пешин",morning:"эрталаб",afternoon:"пешиндан кейин",evening:"кечаси",night:"тун"}},defaultWidth:"any",formattingValues:{any:{am:"П.О.",pm:"П.К.",midnight:"ярим тун",noon:"пешин",morning:"эрталаб",afternoon:"пешиндан кейин",evening:"кечаси",night:"тун"}},defaultFormattingWidth:"any"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)(чи)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(м\.а|м\.)/i,abbreviated:/^(м\.а|м\.)/i,wide:/^(милоддан аввал|милоддан кейин)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^м/i,/^а/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]-чор./i,wide:/^[1234]-чорак/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^[яфмамииасонд]/i,abbreviated:/^(янв|фев|мар|апр|май|июн|июл|авг|сен|окт|ноя|дек)/i,wide:/^(январ|феврал|март|апрел|май|июн|июл|август|сентабр|октабр|ноябр|декабр)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^д/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^май/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[ядсчпжш]/i,short:/^(як|ду|се|чо|па|жу|ша)/i,abbreviated:/^(якш|душ|сеш|чор|пай|жум|шан)/i,wide:/^(якшанба|душанба|сешанба|чоршанба|пайшанба|жума|шанба)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^я/i,/^д/i,/^с/i,/^ч/i,/^п/i,/^ж/i,/^ш/i],any:[/^як/i,/^ду/i,/^се/i,/^чор/i,/^пай/i,/^жу/i,/^шан/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(п\.о\.|п\.к\.|ярим тун|пешиндан кейин|(эрталаб|пешиндан кейин|кечаси|тун))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^п\.о\./i,pm:/^п\.к\./i,midnight:/^ярим тун/i,noon:/^пешиндан кейин/i,morning:/эрталаб/i,afternoon:/пешиндан кейин/i,evening:/кечаси/i,night:/тун/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},BS={lessThanXSeconds:{one:"dưới 1 giây",other:"dưới {{count}} giây"},xSeconds:{one:"1 giây",other:"{{count}} giây"},halfAMinute:"nửa phút",lessThanXMinutes:{one:"dưới 1 phút",other:"dưới {{count}} phút"},xMinutes:{one:"1 phút",other:"{{count}} phút"},aboutXHours:{one:"khoảng 1 giờ",other:"khoảng {{count}} giờ"},xHours:{one:"1 giờ",other:"{{count}} giờ"},xDays:{one:"1 ngày",other:"{{count}} ngày"},aboutXWeeks:{one:"khoảng 1 tuần",other:"khoảng {{count}} tuần"},xWeeks:{one:"1 tuần",other:"{{count}} tuần"},aboutXMonths:{one:"khoảng 1 tháng",other:"khoảng {{count}} tháng"},xMonths:{one:"1 tháng",other:"{{count}} tháng"},aboutXYears:{one:"khoảng 1 năm",other:"khoảng {{count}} năm"},xYears:{one:"1 năm",other:"{{count}} năm"},overXYears:{one:"hơn 1 năm",other:"hơn {{count}} năm"},almostXYears:{one:"gần 1 năm",other:"gần {{count}} năm"}},GS={date:ef({formats:{full:"EEEE, 'ngày' d MMMM 'năm' y",long:"'ngày' d MMMM 'năm' y",medium:"d MMM 'năm' y",short:"dd/MM/y"},defaultWidth:"full"}),time:ef({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},XS={lastWeek:"eeee 'tuần trước vào lúc' p",yesterday:"'hôm qua vào lúc' p",today:"'hôm nay vào lúc' p",tomorrow:"'ngày mai vào lúc' p",nextWeek:"eeee 'tới vào lúc' p",other:"P"},YS={code:"vi",formatDistance:(e,t,n)=>{let i;const a=BS[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?i+" nữa":i+" trước":i},formatLong:GS,formatRelative:(e,t,n,i)=>XS[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),i=t?.unit;if("quarter"===i)switch(n){case 1:return"I";case 2:return"II";case 3:return"III";case 4:return"IV"}else if("day"===i)switch(n){case 1:return"thứ 2";case 2:return"thứ 3";case 3:return"thứ 4";case 4:return"thứ 5";case 5:return"thứ 6";case 6:return"thứ 7";case 7:return"chủ nhật"}else{if("week"===i)return 1===n?"thứ nhất":"thứ "+n;if("dayOfYear"===i)return 1===n?"đầu tiên":"thứ "+n}return String(n)},era:af({values:{narrow:["TCN","SCN"],abbreviated:["trước CN","sau CN"],wide:["trước Công Nguyên","sau Công Nguyên"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["Quý 1","Quý 2","Quý 3","Quý 4"]},defaultWidth:"wide",formattingValues:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["quý I","quý II","quý III","quý IV"]},defaultFormattingWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["Thg 1","Thg 2","Thg 3","Thg 4","Thg 5","Thg 6","Thg 7","Thg 8","Thg 9","Thg 10","Thg 11","Thg 12"],wide:["Tháng Một","Tháng Hai","Tháng Ba","Tháng Tư","Tháng Năm","Tháng Sáu","Tháng Bảy","Tháng Tám","Tháng Chín","Tháng Mười","Tháng Mười Một","Tháng Mười Hai"]},defaultWidth:"wide",formattingValues:{narrow:["01","02","03","04","05","06","07","08","09","10","11","12"],abbreviated:["thg 1","thg 2","thg 3","thg 4","thg 5","thg 6","thg 7","thg 8","thg 9","thg 10","thg 11","thg 12"],wide:["tháng 01","tháng 02","tháng 03","tháng 04","tháng 05","tháng 06","tháng 07","tháng 08","tháng 09","tháng 10","tháng 11","tháng 12"]},defaultFormattingWidth:"wide"}),day:af({values:{narrow:["CN","T2","T3","T4","T5","T6","T7"],short:["CN","Th 2","Th 3","Th 4","Th 5","Th 6","Th 7"],abbreviated:["CN","Thứ 2","Thứ 3","Thứ 4","Thứ 5","Thứ 6","Thứ 7"],wide:["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ Sáu","Thứ Bảy"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"am",pm:"pm",midnight:"nửa đêm",noon:"tr",morning:"sg",afternoon:"ch",evening:"tối",night:"đêm"},abbreviated:{am:"AM",pm:"PM",midnight:"nửa đêm",noon:"trưa",morning:"sáng",afternoon:"chiều",evening:"tối",night:"đêm"},wide:{am:"SA",pm:"CH",midnight:"nửa đêm",noon:"trưa",morning:"sáng",afternoon:"chiều",evening:"tối",night:"đêm"}},defaultWidth:"wide",formattingValues:{narrow:{am:"am",pm:"pm",midnight:"nửa đêm",noon:"tr",morning:"sg",afternoon:"ch",evening:"tối",night:"đêm"},abbreviated:{am:"AM",pm:"PM",midnight:"nửa đêm",noon:"trưa",morning:"sáng",afternoon:"chiều",evening:"tối",night:"đêm"},wide:{am:"SA",pm:"CH",midnight:"nửa đêm",noon:"giữa trưa",morning:"vào buổi sáng",afternoon:"vào buổi chiều",evening:"vào buổi tối",night:"vào ban đêm"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(\d+)/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(tcn|scn)/i,abbreviated:/^(trước CN|sau CN)/i,wide:/^(trước Công Nguyên|sau Công Nguyên)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^t/i,/^s/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^([1234]|i{1,3}v?)/i,abbreviated:/^q([1234]|i{1,3}v?)/i,wide:/^quý ([1234]|i{1,3}v?)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(1|i)$/i,/(2|ii)$/i,/(3|iii)$/i,/(4|iv)$/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(0?[2-9]|10|11|12|0?1)/i,abbreviated:/^thg[ _]?(0?[1-9](?!\d)|10|11|12)/i,wide:/^tháng ?(Một|Hai|Ba|Tư|Năm|Sáu|Bảy|Tám|Chín|Mười|Mười ?Một|Mười ?Hai|0?[1-9](?!\d)|10|11|12)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/0?1$/i,/0?2/i,/3/,/4/,/5/,/6/,/7/,/8/,/9/,/10/,/11/,/12/],abbreviated:[/^thg[ _]?0?1(?!\d)/i,/^thg[ _]?0?2/i,/^thg[ _]?0?3/i,/^thg[ _]?0?4/i,/^thg[ _]?0?5/i,/^thg[ _]?0?6/i,/^thg[ _]?0?7/i,/^thg[ _]?0?8/i,/^thg[ _]?0?9/i,/^thg[ _]?10/i,/^thg[ _]?11/i,/^thg[ _]?12/i],wide:[/^tháng ?(Một|0?1(?!\d))/i,/^tháng ?(Hai|0?2)/i,/^tháng ?(Ba|0?3)/i,/^tháng ?(Tư|0?4)/i,/^tháng ?(Năm|0?5)/i,/^tháng ?(Sáu|0?6)/i,/^tháng ?(Bảy|0?7)/i,/^tháng ?(Tám|0?8)/i,/^tháng ?(Chín|0?9)/i,/^tháng ?(Mười|10)/i,/^tháng ?(Mười ?Một|11)/i,/^tháng ?(Mười ?Hai|12)/i]},defaultParseWidth:"wide"}),day:of({matchPatterns:{narrow:/^(CN|T2|T3|T4|T5|T6|T7)/i,short:/^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,abbreviated:/^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,wide:/^(Chủ ?Nhật|Chúa ?Nhật|thứ ?Hai|thứ ?Ba|thứ ?Tư|thứ ?Năm|thứ ?Sáu|thứ ?Bảy)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/CN/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i],short:[/CN/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i],abbreviated:[/CN/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i],wide:[/(Chủ|Chúa) ?Nhật/i,/Hai/i,/Ba/i,/Tư/i,/Năm/i,/Sáu/i,/Bảy/i]},defaultParseWidth:"wide"}),dayPeriod:of({matchPatterns:{narrow:/^(a|p|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,abbreviated:/^(am|pm|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,wide:/^(ch[^i]*|sa|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^(a|sa)/i,pm:/^(p|ch[^i]*)/i,midnight:/nửa đêm/i,noon:/trưa/i,morning:/sáng/i,afternoon:/chiều/i,evening:/tối/i,night:/^đêm/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},VS={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},KS={date:ef({formats:{full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},defaultWidth:"full"}),time:ef({formats:{full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})};function qS(e,t,n){const i="eeee p";return Vf(e,t,n)?i:e.getTime()>t.getTime()?"'下个'"+i:"'上个'"+i}const JS={lastWeek:qS,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:qS,other:"PP p"},QS={code:"zh-CN",formatDistance:(e,t,n)=>{let i;const a=VS[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?i+"内":i+"前":i},formatLong:KS,formatRelative:(e,t,n,i)=>{const a=JS[e];return"function"==typeof a?a(t,n,i):a},localize:{ordinalNumber:(e,t)=>{const n=Number(e);switch(t?.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},era:af({values:{narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},defaultWidth:"wide"}),day:af({values:{narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},defaultWidth:"wide",formattingValues:{narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(第\s*)?\d+(日|时|分|秒)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(前)/i,/^(公元)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},ZS={lessThanXSeconds:{one:"少於 1 秒",other:"少於 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分鐘",lessThanXMinutes:{one:"少於 1 分鐘",other:"少於 {{count}} 分鐘"},xMinutes:{one:"1 分鐘",other:"{{count}} 分鐘"},xHours:{one:"1 小時",other:"{{count}} 小時"},aboutXHours:{one:"大約 1 小時",other:"大約 {{count}} 小時"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大約 1 個星期",other:"大約 {{count}} 個星期"},xWeeks:{one:"1 個星期",other:"{{count}} 個星期"},aboutXMonths:{one:"大約 1 個月",other:"大約 {{count}} 個月"},xMonths:{one:"1 個月",other:"{{count}} 個月"},aboutXYears:{one:"大約 1 年",other:"大約 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超過 1 年",other:"超過 {{count}} 年"},almostXYears:{one:"將近 1 年",other:"將近 {{count}} 年"}},eM={date:ef({formats:{full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},defaultWidth:"full"}),time:ef({formats:{full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},tM={lastWeek:"'上個'eeee p",yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:"'下個'eeee p",other:"P"},nM={code:"zh-HK",formatDistance:(e,t,n)=>{let i;const a=ZS[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?i+"內":i+"前":i},formatLong:eM,formatRelative:(e,t,n,i)=>tM[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e);switch(t?.unit){case"date":return n+"日";case"hour":return n+"時";case"minute":return n+"分";case"second":return n+"秒";default:return"第 "+n}},era:af({values:{narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},defaultWidth:"wide"}),day:af({values:{narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["週日","週一","週二","週三","週四","週五","週六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"上",pm:"下",midnight:"午夜",noon:"晌",morning:"早",afternoon:"午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"午夜",noon:"中午",morning:"上午",afternoon:"下午",evening:"晚上",night:"夜晚"},wide:{am:"上午",pm:"下午",midnight:"午夜",noon:"中午",morning:"上午",afternoon:"下午",evening:"晚上",night:"夜晚"}},defaultWidth:"wide",formattingValues:{narrow:{am:"上",pm:"下",midnight:"午夜",noon:"晌",morning:"早",afternoon:"午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"午夜",noon:"中午",morning:"上午",afternoon:"下午",evening:"晚上",night:"夜晚"},wide:{am:"上午",pm:"下午",midnight:"午夜",noon:"中午",morning:"上午",afternoon:"下午",evening:"晚上",night:"夜晚"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(第\s*)?\d+(日|時|分|秒)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(前)/i,/^(公元)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^第[一二三四]季/i,wide:/^第[一二三四]季度/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^週[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},iM={lessThanXSeconds:{one:"少於 1 秒",other:"少於 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分鐘",lessThanXMinutes:{one:"少於 1 分鐘",other:"少於 {{count}} 分鐘"},xMinutes:{one:"1 分鐘",other:"{{count}} 分鐘"},xHours:{one:"1 小時",other:"{{count}} 小時"},aboutXHours:{one:"大約 1 小時",other:"大約 {{count}} 小時"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大約 1 個星期",other:"大約 {{count}} 個星期"},xWeeks:{one:"1 個星期",other:"{{count}} 個星期"},aboutXMonths:{one:"大約 1 個月",other:"大約 {{count}} 個月"},xMonths:{one:"1 個月",other:"{{count}} 個月"},aboutXYears:{one:"大約 1 年",other:"大約 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超過 1 年",other:"超過 {{count}} 年"},almostXYears:{one:"將近 1 年",other:"將近 {{count}} 年"}},aM={date:ef({formats:{full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},defaultWidth:"full"}),time:ef({formats:{full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},defaultWidth:"full"}),dateTime:ef({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},rM={lastWeek:"'上個'eeee p",yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:"'下個'eeee p",other:"P"},oM={code:"zh-TW",formatDistance:(e,t,n)=>{let i;const a=iM[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?i+"內":i+"前":i},formatLong:aM,formatRelative:(e,t,n,i)=>rM[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e);switch(t?.unit){case"date":return n+"日";case"hour":return n+"時";case"minute":return n+"分";case"second":return n+"秒";default:return"第 "+n}},era:af({values:{narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},defaultWidth:"wide"}),quarter:af({values:{narrow:["1","2","3","4"],abbreviated:["第一刻","第二刻","第三刻","第四刻"],wide:["第一刻鐘","第二刻鐘","第三刻鐘","第四刻鐘"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:af({values:{narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},defaultWidth:"wide"}),day:af({values:{narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["週日","週一","週二","週三","週四","週五","週六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},defaultWidth:"wide"}),dayPeriod:af({values:{narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜間"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜間"}},defaultWidth:"wide",formattingValues:{narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜間"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜間"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:sf({matchPattern:/^(第\s*)?\d+(日|時|分|秒)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:{narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(前)/i,/^(公元)/i]},defaultParseWidth:"any"}),quarter:of({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻鐘/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:{narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},defaultParseWidth:"any"}),day:of({matchPatterns:{narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^週[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:{any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}};var sM=Object.freeze({__proto__:null,af:df,ar:mf,arDZ:vf,arEG:kf,arMA:Tf,arSA:_f,arTN:Df,az:jf,be:Qf,beTarask:op,bg:mp,bn:kp,bs:Ap,ca:Rp,ckb:zp,cs:Yp,cy:Zp,da:rg,de:pg,deAT:wg,el:Tg,enAU:Dg,enCA:Wg,enGB:Og,enIE:Fg,enIN:jg,enNZ:zg,enUS:$g,enZA:Ug,eo:Xg,es:Jg,et:iv,eu:lv,faIR:hv,fi:xv,fr:Ov,frCA:Fv,frCH:$v,fy:Gv,gd:Kv,gl:ey,gu:ay,he:uy,hi:yy,hr:Sy,ht:Py,hu:Ry,hy:Fy,id:Uy,is:Xy,it:nw,itCH:iw,ja:sw,jaHira:cw,ka:pw,kk:Ew,km:xw,kn:Dw,ko:Ow,lb:Xw,lt:nb,lv:lb,mk:gb,mn:Sb,ms:Pb,mt:Cb,nb:Rb,nl:Fb,nlBE:Ub,nn:Yb,oc:Jb,pl:sk,pt:ck,ptBR:pk,ro:wk,ru:Ak,se:Lk,sk:zk,sl:Bk,sq:Vk,sr:Qk,srLatn:nS,sv:sS,ta:cS,te:pS,th:wS,tr:MS,ug:AS,uk:WS,uz:jS,uzCyrl:HS,vi:YS,zhCN:QS,zhHK:nM,zhTW:oM});const lM=6048e5,dM=864e5;function uM(e){const t=Bf(e);return t.setHours(0,0,0,0),t}function cM(e){const t=Bf(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function hM(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function mM(e){const t=Bf(e),n=function(e,t){const n=uM(e),i=uM(t),a=+n-cM(n),r=+i-cM(i);return Math.round((a-r)/dM)}(t,function(e){const t=Bf(e),n=hM(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}(t));return n+1}function fM(e){return Yf(e,{weekStartsOn:1})}function pM(e){const t=Bf(e),n=t.getFullYear(),i=hM(e,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const a=fM(i),r=hM(e,0);r.setFullYear(n,0,4),r.setHours(0,0,0,0);const o=fM(r);return t.getTime()>=a.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function gM(e){const t=Bf(e),n=+fM(t)-+function(e){const t=pM(e),n=hM(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),fM(n)}(t);return Math.round(n/lM)+1}function vM(e,t){const n=Bf(e),i=n.getFullYear(),a=Xf(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,o=hM(e,0);o.setFullYear(i+1,0,r),o.setHours(0,0,0,0);const s=Yf(o,t),l=hM(e,0);l.setFullYear(i,0,r),l.setHours(0,0,0,0);const d=Yf(l,t);return n.getTime()>=s.getTime()?i+1:n.getTime()>=d.getTime()?i:i-1}function yM(e,t){const n=Bf(e),i=+Yf(n,t)-+function(e,t){const n=Xf(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=vM(e,t),r=hM(e,0);return r.setFullYear(a,0,i),r.setHours(0,0,0,0),Yf(r,t)}(n,t);return Math.round(i/lM)+1}function wM(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const bM={y(e,t){const n=e.getFullYear(),i=n>0?n:1-n;return wM("yy"===t?i%100:i,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):wM(n+1,2)},d:(e,t)=>wM(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>wM(e.getHours()%12||12,t.length),H:(e,t)=>wM(e.getHours(),t.length),m:(e,t)=>wM(e.getMinutes(),t.length),s:(e,t)=>wM(e.getSeconds(),t.length),S(e,t){const n=t.length,i=e.getMilliseconds();return wM(Math.trunc(i*Math.pow(10,n-3)),t.length)}},kM="midnight",SM="noon",MM="morning",EM="afternoon",TM="evening",PM="night",AM={G:function(e,t,n){const i=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),i=t>0?t:1-t;return n.ordinalNumber(i,{unit:"year"})}return bM.y(e,t)},Y:function(e,t,n,i){const a=vM(e,i),r=a>0?a:1-a;if("YY"===t){return wM(r%100,2)}return"Yo"===t?n.ordinalNumber(r,{unit:"year"}):wM(r,t.length)},R:function(e,t){return wM(pM(e),t.length)},u:function(e,t){return wM(e.getFullYear(),t.length)},Q:function(e,t,n){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return wM(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return wM(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){const i=e.getMonth();switch(t){case"M":case"MM":return bM.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){const i=e.getMonth();switch(t){case"L":return String(i+1);case"LL":return wM(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){const a=yM(e,i);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):wM(a,t.length)},I:function(e,t,n){const i=gM(e);return"Io"===t?n.ordinalNumber(i,{unit:"week"}):wM(i,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):bM.d(e,t)},D:function(e,t,n){const i=mM(e);return"Do"===t?n.ordinalNumber(i,{unit:"dayOfYear"}):wM(i,t.length)},E:function(e,t,n){const i=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){const a=e.getDay(),r=(a-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(r);case"ee":return wM(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){const a=e.getDay(),r=(a-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(r);case"cc":return wM(r,t.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const i=e.getDay(),a=0===i?7:i;switch(t){case"i":return String(a);case"ii":return wM(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const i=e.getHours();let a;switch(a=12===i?SM:0===i?kM:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const i=e.getHours();let a;switch(a=i>=17?TM:i>=12?EM:i>=4?MM:PM,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return bM.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):bM.H(e,t)},K:function(e,t,n){const i=e.getHours()%12;return"Ko"===t?n.ordinalNumber(i,{unit:"hour"}):wM(i,t.length)},k:function(e,t,n){let i=e.getHours();return 0===i&&(i=24),"ko"===t?n.ordinalNumber(i,{unit:"hour"}):wM(i,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):bM.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):bM.s(e,t)},S:function(e,t){return bM.S(e,t)},X:function(e,t,n){const i=e.getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return _M(i);case"XXXX":case"XX":return CM(i);default:return CM(i,":")}},x:function(e,t,n){const i=e.getTimezoneOffset();switch(t){case"x":return _M(i);case"xxxx":case"xx":return CM(i);default:return CM(i,":")}},O:function(e,t,n){const i=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+xM(i,":");default:return"GMT"+CM(i,":")}},z:function(e,t,n){const i=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+xM(i,":");default:return"GMT"+CM(i,":")}},t:function(e,t,n){return wM(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return wM(e.getTime(),t.length)}};function xM(e,t=""){const n=e>0?"-":"+",i=Math.abs(e),a=Math.trunc(i/60),r=i%60;return 0===r?n+String(a):n+String(a)+t+wM(r,2)}function _M(e,t){if(e%60==0){return(e>0?"-":"+")+wM(Math.abs(e)/60,2)}return CM(e,t)}function CM(e,t=""){const n=e>0?"-":"+",i=Math.abs(e);return n+wM(Math.trunc(i/60),2)+t+wM(i%60,2)}const LM=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},IM=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},DM={p:IM,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return LM(e,t);let r;switch(i){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",LM(i,t)).replace("{{time}}",IM(a,t))}},RM=/^D+$/,WM=/^Y+$/,NM=["D","DD","YY","YYYY"];function OM(e){if(!(t=e,t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)||"number"==typeof e))return!1;var t;const n=Bf(e);return!isNaN(Number(n))}const FM=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,jM=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zM=/^'([^]*?)'?$/,$M=/''/g,UM=/[a-zA-Z]/;function HM(e,t,n){const i=Xf(),a=n?.locale??i.locale??$g,r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,s=Bf(e);if(!OM(s))throw new RangeError("Invalid time value");let l=t.match(jM).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,DM[t])(e,a.formatLong)}return e})).join("").match(FM).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:BM(e)};if(AM[t])return{isToken:!0,value:e};if(t.match(UM))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(l=a.localize.preprocessor(s,l));const d={firstWeekContainsDate:r,weekStartsOn:o,locale:a};return l.map((i=>{if(!i.isToken)return i.value;const r=i.value;(!n?.useAdditionalWeekYearTokens&&function(e){return WM.test(e)}(r)||!n?.useAdditionalDayOfYearTokens&&function(e){return RM.test(e)}(r))&&function(e,t,n){const i=function(e,t,n){const i="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${i} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(i),NM.includes(e))throw new RangeError(i)}(r,t,String(e));return(0,AM[r[0]])(s,r,a.localize,d)})).join("")}function BM(e){const t=e.match(zM);return t?t[1].replace($M,"'"):e}function GM(e,t,n){const i=function(e,t,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}(e,n.timeZone,n.locale);return"formatToParts"in i?function(e,t){const n=e.formatToParts(t);for(let e=n.length-1;e>=0;--e)if("timeZoneName"===n[e].type)return n[e].value;return}(i,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),i=/ [\w-+ ]+$/.exec(n);return i?i[0].substr(1):""}(i,t)}function XM(e,t){const n=function(e){if(!VM[e]){const t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n="06/25/2014, 00:00:00"===t||"06/25/2014 00:00:00"===t;VM[e]=n?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return VM[e]}(t);return"formatToParts"in n?function(e,t){try{const n=e.formatToParts(t),i=[];for(let e=0;e<n.length;e++){const t=YM[n[e].type];void 0!==t&&(i[t]=parseInt(n[e].value,10))}return i}catch(e){if(e instanceof RangeError)return[NaN];throw e}}(n,e):function(e,t){const n=e.format(t),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(i[3],10),parseInt(i[1],10),parseInt(i[2],10),parseInt(i[4],10),parseInt(i[5],10),parseInt(i[6],10)]}(n,e)}const YM={year:0,month:1,day:2,hour:3,minute:4,second:5};const VM={};function KM(e,t,n,i,a,r,o){const s=new Date(0);return s.setUTCFullYear(e,t,n),s.setUTCHours(i,a,r,o),s}const qM=36e5,JM=6e4,QM={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ZM(e,t,n){if(!e)return 0;let i,a,r=QM.timezoneZ.exec(e);if(r)return 0;if(r=QM.timezoneHH.exec(e),r)return i=parseInt(r[1],10),tE(i)?-i*qM:NaN;if(r=QM.timezoneHHMM.exec(e),r){i=parseInt(r[2],10);const e=parseInt(r[3],10);return tE(i,e)?(a=Math.abs(i)*qM+e*JM,"+"===r[1]?-a:a):NaN}if(function(e){if(nE[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),nE[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());const i=n?t:function(e){return KM(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),a=eE(i,e),r=n?a:function(e,t,n){const i=e.getTime();let a=i-t;const r=eE(new Date(a),n);if(t===r)return t;a-=r-t;const o=eE(new Date(a),n);if(r===o)return r;return Math.max(r,o)}(t,a,e);return-r}return NaN}function eE(e,t){const n=XM(e,t),i=KM(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let a=e.getTime();const r=a%1e3;return a-=r>=0?r:1e3+r,i-a}function tE(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}const nE={};const iE={X:function(e,t,n){const i=aE(n.timeZone,e);if(0===i)return"Z";switch(t){case"X":return sE(i);case"XXXX":case"XX":return oE(i);default:return oE(i,":")}},x:function(e,t,n){const i=aE(n.timeZone,e);switch(t){case"x":return sE(i);case"xxxx":case"xx":return oE(i);default:return oE(i,":")}},O:function(e,t,n){const i=aE(n.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t=""){const n=e>0?"-":"+",i=Math.abs(e),a=Math.floor(i/60),r=i%60;if(0===r)return n+String(a);return n+String(a)+t+rE(r,2)}(i,":");default:return"GMT"+oE(i,":")}},z:function(e,t,n){switch(t){case"z":case"zz":case"zzz":return GM("short",e,n);default:return GM("long",e,n)}}};function aE(e,t){const n=e?ZM(e,t,!0)/6e4:t?.getTimezoneOffset()??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function rE(e,t){const n=e<0?"-":"";let i=Math.abs(e).toString();for(;i.length<t;)i="0"+i;return n+i}function oE(e,t=""){const n=e>0?"-":"+",i=Math.abs(e);return n+rE(Math.floor(i/60),2)+t+rE(Math.floor(i%60),2)}function sE(e,t){if(e%60==0){return(e>0?"-":"+")+rE(Math.abs(e)/60,2)}return oE(e,t)}function lE(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const dE=36e5,uE=6e4,cE=2,hE={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/};function mE(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);const n=null==t.additionalDigits?cE:Number(t.additionalDigits);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);const i=function(e){const t={};let n,i=hE.dateTimePattern.exec(e);i?(t.date=i[1],n=i[3]):(i=hE.datePattern.exec(e),i?(t.date=i[1],n=i[2]):(t.date=null,n=e));if(n){const e=hE.timeZone.exec(n);e?(t.time=n.replace(e[1],""),t.timeZone=e[1].trim()):t.time=n}return t}(e),{year:a,restDateString:r}=function(e,t){if(e){const n=hE.YYY[t],i=hE.YYYYY[t];let a=hE.YYYY.exec(e)||i.exec(e);if(a){const t=a[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(a=hE.YY.exec(e)||n.exec(e),a){const t=a[1];return{year:100*parseInt(t,10),restDateString:e.slice(t.length)}}}return{year:null}}(i.date,n),o=function(e,t){if(null===t)return null;let n,i,a;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let r=hE.MM.exec(e);if(r)return n=new Date(0),i=parseInt(r[1],10)-1,yE(t,i)?(n.setUTCFullYear(t,i),n):new Date(NaN);if(r=hE.DDD.exec(e),r){n=new Date(0);const e=parseInt(r[1],10);return function(e,t){if(t<1)return!1;const n=vE(e);if(n&&t>366)return!1;if(!n&&t>365)return!1;return!0}(t,e)?(n.setUTCFullYear(t,0,e),n):new Date(NaN)}if(r=hE.MMDD.exec(e),r){n=new Date(0),i=parseInt(r[1],10)-1;const e=parseInt(r[2],10);return yE(t,i,e)?(n.setUTCFullYear(t,i,e),n):new Date(NaN)}if(r=hE.Www.exec(e),r)return a=parseInt(r[1],10)-1,wE(a)?fE(t,a):new Date(NaN);if(r=hE.WwwD.exec(e),r){a=parseInt(r[1],10)-1;const e=parseInt(r[2],10)-1;return wE(a,e)?fE(t,a,e):new Date(NaN)}return null}(r,a);if(null===o||isNaN(o.getTime()))return new Date(NaN);if(o){const e=o.getTime();let n,a=0;if(i.time&&(a=function(e){let t,n,i=hE.HH.exec(e);if(i)return t=parseFloat(i[1].replace(",",".")),bE(t)?t%24*dE:NaN;if(i=hE.HHMM.exec(e),i)return t=parseInt(i[1],10),n=parseFloat(i[2].replace(",",".")),bE(t,n)?t%24*dE+n*uE:NaN;if(i=hE.HHMMSS.exec(e),i){t=parseInt(i[1],10),n=parseInt(i[2],10);const e=parseFloat(i[3].replace(",","."));return bE(t,n,e)?t%24*dE+n*uE+1e3*e:NaN}return null}(i.time),null===a||isNaN(a)))return new Date(NaN);if(i.timeZone||t.timeZone){if(n=ZM(i.timeZone||t.timeZone,new Date(e+a)),isNaN(n))return new Date(NaN)}else n=lE(new Date(e+a)),n=lE(new Date(e+a+n));return new Date(e+a+n)}return new Date(NaN)}function fE(e,t,n){t=t||0,n=n||0;const i=new Date(0);i.setUTCFullYear(e,0,4);const a=7*t+n+1-(i.getUTCDay()||7);return i.setUTCDate(i.getUTCDate()+a),i}const pE=[31,28,31,30,31,30,31,31,30,31,30,31],gE=[31,29,31,30,31,30,31,31,30,31,30,31];function vE(e){return e%400==0||e%4==0&&e%100!=0}function yE(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;const i=vE(e);if(i&&n>gE[t])return!1;if(!i&&n>pE[t])return!1}return!0}function wE(e,t){return!(e<0||e>52)&&(null==t||!(t<0||t>6))}function bE(e,t,n){return!(e<0||e>=25)&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}const kE=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function SE(e,t,n,i){return function(e,t,n={}){const i=(t=String(t)).match(kE);if(i){const a=mE(n.originalDate||e,n);t=i.reduce((function(e,t){if("'"===t[0])return e;const i=e.indexOf(t),r="'"===e[i-1],o=e.replace(t,"'"+iE[t[0]](a,t,n)+"'");return r?o.substring(0,i-1)+o.substring(i+1):o}),t)}return HM(e,t,n)}(function(e,t,n){const i=ZM(t,e=mE(e,n),!0),a=new Date(e.getTime()-i),r=new Date(0);return r.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),r.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),r}(e,t,{timeZone:(i={...i,timeZone:t,originalDate:e}).timeZone}),n,i)}const ME=e=>{const t=new Intl.Locale(e);return t.language+(t.region??t.script??"")};function EE(e,t=""){const n=e.linkColor||"blue";return a(`\n ${t} a:link {\n color: ${n};\n text-decoration-line: underline;\n }\n ${t} a:visited {\n color: ${n};\n text-decoration-line: underline;\n }\n ${t} a:hover {\n color: ${n};\n }\n ${t} a:active {\n color: ${n};\n text-decoration-line: underline;\n }\n `)}let TE=class extends Yu{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1}styles(){const{component:e,scaleFactor:t,inFocusedState:n}=this,{hidden:i,focusedFontColor:r,fontColor:o,fontSize:s,alignment:l,strikethrough:d,spacing:u,focusedFillColor:c,blur:h}=e;return"legal"===e.textType?a(`\n :host {\n display: ${i?"none":"block"};\n overflow-wrap: break-word;\n width: fit-content;\n ${Tc(e,n)}\n color: ${o};\n font-size: ${(s??12)*t}px;\n text-align: ${l||"center"};\n ${h?`filter: blur(${h}px);`:""}\n ${Nc(e)}\n ${Oc(e,t,n)}\n }\n :host p {\n white-space: pre-line; \n margin-top: 0;\n }\n :host p:last-of-type {\n margin-bottom: 0;\n }\n ${EE(e,":host")}\n `):a(`\n :host {\n display: ${i?"none":"flex"};\n gap: ${u??0}px;\n width: fit-content;\n ${function(e){return"fitContent"===e.width?"white-space: nowrap;":"overflow-wrap: anywhere;"}(e)}\n ${Tc(e,n)}\n color: ${n&&r?r:o??""};\n outline: ${n&&c?c:"none"};\n text-transform: ${e.capitalize?"uppercase":"none"};\n font-size: ${(s??12)*t}px;\n text-align: ${l||"center"};\n ${h?`filter: blur(${h}px);`:""}\n ${Wc("string"!=typeof d&&d)}\n ${Nc(e)}\n ${Oc(e,t,n)}\n }\n :host p {\n margin: 0;\n }\n ${EE(e,":host")} \n `)}render(){let{text:e}=this.component;const{dateTimeFormat:t}=this.component;return e?(t&&(e=>{try{return!isNaN(new Date(e).getTime())}catch{return!1}})(e)&&(e=((e,t)=>{try{const n=ME(ji.getLanguageCode());return SE(e,Intl.DateTimeFormat().resolvedOptions().timeZone,t,{locale:sM[n]})}catch{return e}})(e,t)),i`<div class="content" .innerHTML="${Jm.parse(e)}"></div>`):(this.style.display="none",i``)}};c([Xu({type:Object})],TE.prototype,"component",void 0),c([Xu({type:Boolean})],TE.prototype,"inFocusedState",void 0),c([Xu({type:Number})],TE.prototype,"scaleFactor",void 0),TE=c([ku("nami-text")],TE);let PE=class extends Yu{constructor(){super(...arguments),this.inFocusedState=!1}styles(){return a(`\n :host { \n display: ${this.component.hidden?"none":"flex"};\n gap: ${this.component.spacing??0}px;\n transition: all 0.3s;\n &:not(:first-child) {\n margin-top: ${this.component.spacing||0}px;\n }\n }\n `)}render(){return i`<slot></slot>`}};c([Xu({type:Object})],PE.prototype,"component",void 0),c([Xu({type:Boolean})],PE.prototype,"inFocusedState",void 0),PE=c([ku("nami-text-list-item-wrapper")],PE);let AE=class extends Yu{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1}styles(){const{component:e,scaleFactor:t,inFocusedState:n}=this,{hidden:i,fontColor:r,fontSize:o,rightMargin:s,spacing:l,focusedFontColor:d}=e;return a(`\n :host { \n display: ${i?"none":"flex"};\n gap: ${l??0}px;\n overflow-wrap: anywhere;\n transition: all 0.3s;\n margin-right: ${s||l||0}px;\n ${Tc(e,n)}\n color: ${n&&d?d:r??""};\n font-size: ${(o??12)*t}px;\n }\n `)}updated(){const e=lu.getCurrentCollapsibleSku(),t=this.component.sku?.skuId;(!e||e&&e.skuId===t)&&(this.previousSymbolName=this.component.name)}shouldRenderCurrentIcon(){if(!this.previousSymbolName||this.previousSymbolName===this.component.name)return!0;const e=lu.getCurrentCollapsibleSku();return!e||e?.skuId===this.component.sku?.skuId}renderSvgIcon(e){return i`
|
|
46
|
-
<span role="img" aria-label="${e}" class="anticon anticon-${e}">
|
|
47
|
-
<svg
|
|
48
|
-
viewBox="64 64 896 896"
|
|
49
|
-
focusable="false"
|
|
50
|
-
data-icon="${e}"
|
|
51
|
-
width="1em"
|
|
52
|
-
height="1em"
|
|
53
|
-
fill="currentColor"
|
|
54
|
-
aria-hidden="true"
|
|
55
|
-
>
|
|
56
|
-
${function(e){return Qm[e]||Qm.CheckCircleOutlined}(e)}
|
|
57
|
-
</svg>
|
|
58
|
-
</span>
|
|
59
|
-
`}render(){return this.renderSvgIcon(this.shouldRenderCurrentIcon()?this.component.name:this.previousSymbolName)}};c([Xu({type:Object})],AE.prototype,"component",void 0),c([Xu({type:Boolean})],AE.prototype,"inFocusedState",void 0),c([Xu({type:Number})],AE.prototype,"scaleFactor",void 0),AE=c([ku("nami-symbol")],AE);let xE=class extends Yu{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1}styles(){const{component:e,scaleFactor:t,inFocusedState:n}=this,{hidden:i,focusedFontColor:r,fontColor:o,fontSize:s,alignment:l,strikethrough:d,spacing:u}=e;return a(`\n :host {\n line-height: 1.5715;\n display: ${i?"none":"grid"};\n overflow-wrap: anywhere;\n width: fit-content;\n ${Tc(e,n)}\n color: ${n&&r?r:o??""};\n font-size: ${(s??12)*t}px;\n text-align: ${l||"center"};\n ${Wc("string"!=typeof d&&d)}\n ${Nc(e)}\n ${Oc(e,t,n)}\n ${EE(e)}\n ${Pc(e)}\n ${function({alignment:e,horizontalAlignment:t}){let n;return n=t&&Sc[t]?Sc[t]:e&&Sc[e]?Sc[e]:"center",`justify-content:${n};`}(e)}\n }\n :host > :not(:first-child) {\n margin-top: ${u||0}px;\n }\n .anticon {\n text-rendering: optimizelegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: inherit;\n display: inline-block;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -.125em;\n }\n .anticon svg {\n display: inline-block;\n line-height: 1;\n }\n\n :host .bullet-text-wrapper {\n line-height: 1.5715;\n display: inline;\n overflow-wrap: anywhere;\n width: fit-content;\n ${Tc(e,n)}\n color: ${n&&r?r:o??""};\n font-size: ${(s??12)*t}px;\n text-align: ${l||"center"};\n ${Wc("string"!=typeof d&&d)}\n ${Nc(e)}\n }\n ${EE(e,":host .bullet-text-wrapper")}\n :host .bullet-text-wrapper p {\n margin: 0;\n line-height: 1.2em;\n }\n `)}render(){const{fontColor:e,fontSize:t,bulletComponent:n,texts:a,spacing:r}=this.component,o=n?{fontColor:e,fontSize:t,spacing:r,...n}:null;if(!Array.isArray(a))return i``;const s=a.map((e=>e?i`<nami-text-list-item-wrapper .component=${this.component}>
|
|
60
|
-
${o&&i`<nami-symbol .component=${o}></nami-symbol>`}
|
|
61
|
-
<div class="bullet-text-wrapper" .innerHTML="${Jm(e)}"></div>
|
|
62
|
-
</nami-text-list-item-wrapper>`:null));return i`${s}`}};c([Xu({type:Object})],xE.prototype,"component",void 0),c([Xu({type:Boolean})],xE.prototype,"inFocusedState",void 0),c([Xu({type:Number})],xE.prototype,"scaleFactor",void 0),xE=c([ku("nami-text-list")],xE);let _E=class extends Yu{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this.addEventListener("focus",(()=>{this.inFocusedState=!0}),!1),this.addEventListener("blur",(()=>{this.inFocusedState=!1}),!1),this.addEventListener("focus-changed",(e=>{this.inFocusedState=1==e.detail.inFocusedState}),!1)}styles(){const{component:e,scaleFactor:t}=this,{backgroundBlur:n}=e,i=e.fillImage?a(`\n line-height: 1.5715;\n background-image: url(${e.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):a(Tc(e,!1));return a(`\n :host {\n display: ${e.hidden?"none":"flex"};\n gap: ${e.spacing}px;\n ${n?`backdrop-filter: blur(${n}px);`:""}\n ${i};\n ${jc(e.position)}\n ${Pc(e)}\n ${Oc(e,t,!1)}\n }\n :host(:focus){\n ${Tc(e,!0)}\n ${Oc(e,t,!0)}\n }\n `)}render(){return(this.component.components??[]).map((e=>eh(e,this.scaleFactor)))}};c([Xu({type:Object})],_E.prototype,"component",void 0),c([Xu({type:Boolean})],_E.prototype,"inFocusedState",void 0),c([Xu({type:Number})],_E.prototype,"scaleFactor",void 0),_E=c([ku("nami-container")],_E);let CE=class extends Yu{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1}styles(){const{backgroundBlur:e}=this.component,t="vertical"===this.component.direction?"width":"height",n=this.component.fillImage?a(`\n line-height: 1.5715;\n background-image: url(${this.component.fillImage});\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n `):a(Tc(this.component,!1));return a(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n gap: ${this.component.spacing||0}px;\n ${n};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${jc(this.component.position)}\n ${Pc(this.component)}\n ${Oc(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host(:focus){\n ${Tc(this.component,!0)}\n ${Oc(this.component,this.scaleFactor,!0)}\n }\n :host > * {\n ${t}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}updated(){const{currentGroupId:e}=lu.state;gl(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout((()=>this.classList.add("fade-in")),100),this.currentGroupId=e)}render(){const{mediaList:e,selectedPaywall:t,currentGroupId:n,formFactor:i}=lu.state;return Gc(Qd(lu.productDetails,t?.sku_menus||[],this.component?.subsetGroup||n),this.component,e).map((([e,t])=>(this.inFocusedState="television"==i?e:this.inFocusedState,t.map((e=>eh(e,this.scaleFactor,this.inFocusedState))))))}};c([Xu({type:Object})],CE.prototype,"component",void 0),c([Xu({type:Boolean})],CE.prototype,"inFocusedState",void 0),c([Xu({type:Number})],CE.prototype,"scaleFactor",void 0),CE=c([ku("nami-product-container")],CE);let LE=class extends Yu{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1}styles(){const{url:e,imageCropping:t,alignment:n,height:i,width:r,rightMargin:o,spacing:s,hidden:l,blur:d}=this.component;return a(`\n :host {\n box-sizing: border-box;\n position: relative;\n transition: all 0.3s;\n background-image: url(${e});\n background-size: ${"fit"===t?"contain":"cover"};\n background-position: ${n||""} center;\n background-repeat: no-repeat;\n height: ${Mc(i??"100%",this.scaleFactor)};\n width: ${Mc(("fitContent"==r?i:r)??"100%",this.scaleFactor)};\n margin-right: ${o||s||0}px;\n ${_c(this.component,this.scaleFactor)}\n ${l?"display:none":""}\n ${d?`filter: blur(${d}px);`:""}\n }\n `)}render(){const{alt:e,title:t,focusedBorderColor:n,focusedFillColor:a,fillColor:r}=this.component;return!n&&Zc(r,a)||(this.tabIndex=0),this.ariaLabel=e??t??"",this.setAttribute("alt",e??t??""),i``}};c([Xu({type:Object})],LE.prototype,"component",void 0),c([Xu({type:Boolean})],LE.prototype,"inFocusedState",void 0),c([Xu({type:Number})],LE.prototype,"scaleFactor",void 0),LE=c([ku("nami-image")],LE);let IE=class extends Yu{constructor(){super(...arguments),this.fullscreen=!1,this.inFocusedState=!1,this.scaleFactor=1}connectedCallback(){super.connectedCallback(),document.body.style.background=this.component.fillColor||"transparent"}disconnectedCallback(){super.disconnectedCallback(),document.body.removeAttribute("style")}styles(){const{component:e,scaleFactor:t}=this,{formFactor:n}=this.contextConsumer.state,{backgroundBlur:i}=e;return a(`\n :host {\n max-height: ${"television"===n?"100vh":""};\n display: ${e.hidden?"none":"flex"};\n gap: ${e.spacing??0}px;\n flex-direction: column;\n overflow: hidden;\n ${Ac(e)}\n position: absolute;\n width: 100%;\n bottom: -1px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${e.zIndex??1};\n top: 0px;\n ${i?`backdrop-filter: blur(${i}px);`:""}\n ${Tc(e,!1)}\n transition: all 0.3s;\n ${_c(e,t)}\n }\n :host(:focus){\n ${Tc(e,!0)}\n }\n `)}updated(){const e=Array.from(document.getElementsByTagName("nami-paywall")),t=this.component.fillColor?.includes("gradient"),n=this.shadowRoot?.innerHTML.includes("nami-image");e[0].style.position=!n||t?"relative":"",e[0].style.minHeight=!n||t?"100vh":"100%"}render(){return(this.component.components??[]).map((e=>eh(e,this.scaleFactor)))}};c([Xu({type:Object})],IE.prototype,"component",void 0),c([Xu({type:Boolean})],IE.prototype,"fullscreen",void 0),c([Xu({type:Boolean})],IE.prototype,"inFocusedState",void 0),c([Xu({type:Number})],IE.prototype,"scaleFactor",void 0),IE=c([ku("nami-background-container")],IE);let DE=class extends Yu{constructor(){super(...arguments),this.zIndex=2,this.inFocusedState=!1,this.scaleFactor=1}styles(){const{contextConsumer:e,component:t,zIndex:n,scaleFactor:i}=this,{formFactor:r}=e.state,{backgroundBlur:o}=t,s="phone"!==r?"width: 100%;":"",l="100%"==t.height?"height:100vh !important;":"";return a(`\n :host {\n display: ${t.hidden?"none":"flex"};\n gap: ${t.spacing??0}px;\n position: relative;\n ${Pc(t)}\n ${Ic(t,i)}\n ${s}\n ${l}\n align-items: center;\n justify-content: start;\n ${o?`backdrop-filter: blur(${o}px);`:""}\n z-index: ${n};\n transition: all 0.3s;\n overflow-y: ${"television"===r?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${_c(t,i)}\n ${Tc(t,!1)}\n }\n :host(:focus){\n ${Tc(t,!0)}\n }\n :host > * {\n width: 100%;\n }\n `)}firstUpdated(){const e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}render(){return this.component.components?.map((e=>eh(e,this.scaleFactor,this.inFocusedState)))||[]}};c([Xu({type:Object})],DE.prototype,"component",void 0),c([Xu({type:Number})],DE.prototype,"zIndex",void 0),c([Xu({type:Boolean})],DE.prototype,"inFocusedState",void 0),c([Xu({type:Number})],DE.prototype,"scaleFactor",void 0),DE=c([ku("nami-content-container")],DE);let RE=class extends Yu{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this._handleClick=e=>{e.preventDefault(),xh(this.component.onTap)},this.addEventListener("click",this._handleClick)}styles(){const e=zc("active",this.component.components[0]);return a(`\n :host {\n cursor: pointer;\n ${Tc(this.component,!1)}\n ${Oc(this.component,this.scaleFactor,!1)}\n ${this.component.hidden?"display:none":""}\n }\n :host(:focus){\n ${Tc(this.component,!0)}\n ${Oc(this.component,this.scaleFactor,!0)}\n }\n .toggle{\n position: absolute !important;\n top: 0;\n bottom: 0;\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${$c(e,this.scaleFactor,!1)}\n }\n :host(:focus) .toggle{\n ${$c(e,this.scaleFactor,!0)}\n }\n \n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n }\n `)}render(){this.role="tablist";const e=this.component.components.map((e=>eh(e,this.scaleFactor,this.inFocusedState)));return i`${e}<div class="toggle"></div>`}};c([Xu({type:Object})],RE.prototype,"component",void 0),c([Xu({type:Boolean})],RE.prototype,"inFocusedState",void 0),c([Xu({type:Number})],RE.prototype,"scaleFactor",void 0),RE=c([ku("nami-segment-picker")],RE);let WE=class extends Yu{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this._isActive=!1,this._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||this._handleClick()},this._handleClick=()=>{this.component.id&&(lu.setCurrentGroupData(this.component.id,this.component.text||""),this.requestUpdate("component"))},this._handleHover=()=>{this.inFocusedState=!0},this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown)}updated(e){if(!e.has("component"))return;const t=e.get("component")??this.component;if(this._isActive=gl(t.id,lu.state.currentGroupId),this.classList.toggle("active",this._isActive),!this._isActive)return;this.getRootNode().querySelectorAll("nami-segment-picker-item").forEach((e=>{e!==this&&e.requestUpdate("component",e)}))}styles(){const e=zc("active",this.component),t=zc("inactive",this.component);return a(`\n :host {\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n ${$c({...t,...this.component},this.scaleFactor,this.inFocusedState)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${Uc({...e,...this.component},this.scaleFactor)}\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}render(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",i`<input type="radio"
|
|
63
|
-
autocomplete="off"
|
|
64
|
-
id="${this.component.text}"
|
|
65
|
-
name="${this.component.text}"
|
|
66
|
-
value="${this.component.text}"
|
|
67
|
-
checked="${this._isActive}"
|
|
68
|
-
|
|
69
|
-
/>
|
|
70
|
-
<label for="${this.component.text}">${this.component.text}</label>`}};function NE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}c([Xu({type:Object})],WE.prototype,"component",void 0),c([Xu({type:Boolean})],WE.prototype,"inFocusedState",void 0),c([Xu({type:Number})],WE.prototype,"scaleFactor",void 0),c([function(e){return Xu({...e,state:!0,attribute:!1})}()],WE.prototype,"_isActive",void 0),WE=c([ku("nami-segment-picker-item")],WE);var OE,FE,jE,zE,$E,UE={exports:{}};OE=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,FE=/^(?=([^\/?#]*))\1([^]*)$/,jE=/(?:\/|^)\.(?=\/)/g,zE=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g;var HE=UE.exports=$E={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var i=$E.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=$E.normalizePath(i.path),$E.buildURLFromParts(i)}var a=$E.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=$E.normalizePath(a.path),$E.buildURLFromParts(a)):t;var r=$E.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");if(!r.netLoc&&r.path&&"/"!==r.path[0]){var o=FE.exec(r.path);r.netLoc=o[1],r.path=o[2]}r.netLoc&&!r.path&&(r.path="/");var s={scheme:r.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(s.netLoc=r.netLoc,"/"!==a.path[0]))if(a.path){var l=r.path,d=l.substring(0,l.lastIndexOf("/")+1)+a.path;s.path=$E.normalizePath(d)}else s.path=r.path,a.params||(s.params=r.params,a.query||(s.query=r.query));return null===s.path&&(s.path=n.alwaysNormalize?$E.normalizePath(a.path):a.path),$E.buildURLFromParts(s)},parseURL:function(e){var t=OE.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(jE,"");e.length!==(e=e.replace(zE,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};function BE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function GE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BE(Object(n),!0).forEach((function(t){YE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function XE(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function YE(e,t,n){return(t=XE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VE(){return VE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},VE.apply(this,arguments)}const KE=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},qE=Number.isSafeInteger||function(e){return"number"==typeof e&&Math.abs(e)<=JE},JE=Number.MAX_SAFE_INTEGER||9007199254740991;let QE=function(e){return e.MEDIA_ATTACHING="hlsMediaAttaching",e.MEDIA_ATTACHED="hlsMediaAttached",e.MEDIA_DETACHING="hlsMediaDetaching",e.MEDIA_DETACHED="hlsMediaDetached",e.BUFFER_RESET="hlsBufferReset",e.BUFFER_CODECS="hlsBufferCodecs",e.BUFFER_CREATED="hlsBufferCreated",e.BUFFER_APPENDING="hlsBufferAppending",e.BUFFER_APPENDED="hlsBufferAppended",e.BUFFER_EOS="hlsBufferEos",e.BUFFER_FLUSHING="hlsBufferFlushing",e.BUFFER_FLUSHED="hlsBufferFlushed",e.MANIFEST_LOADING="hlsManifestLoading",e.MANIFEST_LOADED="hlsManifestLoaded",e.MANIFEST_PARSED="hlsManifestParsed",e.LEVEL_SWITCHING="hlsLevelSwitching",e.LEVEL_SWITCHED="hlsLevelSwitched",e.LEVEL_LOADING="hlsLevelLoading",e.LEVEL_LOADED="hlsLevelLoaded",e.LEVEL_UPDATED="hlsLevelUpdated",e.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",e.LEVELS_UPDATED="hlsLevelsUpdated",e.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",e.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",e.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",e.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",e.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",e.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",e.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",e.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",e.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",e.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",e.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",e.CUES_PARSED="hlsCuesParsed",e.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",e.INIT_PTS_FOUND="hlsInitPtsFound",e.FRAG_LOADING="hlsFragLoading",e.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",e.FRAG_LOADED="hlsFragLoaded",e.FRAG_DECRYPTED="hlsFragDecrypted",e.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",e.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",e.FRAG_PARSING_METADATA="hlsFragParsingMetadata",e.FRAG_PARSED="hlsFragParsed",e.FRAG_BUFFERED="hlsFragBuffered",e.FRAG_CHANGED="hlsFragChanged",e.FPS_DROP="hlsFpsDrop",e.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",e.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",e.ERROR="hlsError",e.DESTROYING="hlsDestroying",e.KEY_LOADING="hlsKeyLoading",e.KEY_LOADED="hlsKeyLoaded",e.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",e.BACK_BUFFER_REACHED="hlsBackBufferReached",e.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",e}({}),ZE=function(e){return e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError",e}({}),eT=function(e){return e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",e.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",e.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",e.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_PARSING_ERROR="levelParsingError",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",e.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.FRAG_GAP="fragGap",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException",e.INTERNAL_ABORTED="aborted",e.UNKNOWN="unknown",e}({});const tT=function(){},nT={trace:tT,debug:tT,log:tT,warn:tT,info:tT,error:tT};let iT=nT;function aT(e,...t){t.forEach((function(t){iT[t]=e[t]?e[t].bind(e):function(e){const t=self.console[e];return t?t.bind(self.console,`[${e}] >`):tT}(t)}))}const rT=iT,oT=/^(\d+)x(\d+)$/,sT=/(.+?)=(".*?"|.*?)(?:,|$)/g;class lT{constructor(e){"string"==typeof e&&(e=lT.parseAttrList(e)),VE(this,e)}get clientAttrs(){return Object.keys(this).filter((e=>"X-"===e.substring(0,2)))}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;const n=new Uint8Array(t.length/2);for(let e=0;e<t.length/2;e++)n[e]=parseInt(t.slice(2*e,2*e+2),16);return n}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const n=this[e];return n?parseFloat(n):t}enumeratedString(e){return this[e]}bool(e){return"YES"===this[e]}decimalResolution(e){const t=oT.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e){let t;const n={};for(sT.lastIndex=0;null!==(t=sT.exec(e));){let e=t[2];0===e.indexOf('"')&&e.lastIndexOf('"')===e.length-1&&(e=e.slice(1,-1));n[t[1].trim()]=e}return n}}function dT(e){return"SCTE35-OUT"===e||"SCTE35-IN"===e}class uT{constructor(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){const n=t.attr;for(const t in n)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==n[t]){rT.warn(`DATERANGE tag attribute: "${t}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=t;break}e=VE(new lT({}),n,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const e=new Date(this.attr["END-DATE"]);KE(e.getTime())&&(this._endDate=e)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return null!==e?new Date(this._startDate.getTime()+1e3*e):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(KE(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isValid(){return!!this.id&&!this._badValueForSameId&&KE(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class cT{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var hT="audio",mT="video",fT="audiovideo";class pT{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[hT]:null,[mT]:null,[fT]:null},this.baseurl=e}setByteRange(e,t){const n=e.split("@",2);let i;i=1===n.length?(null==t?void 0:t.byteRangeEndOffset)||0:parseInt(n[1]),this._byteRange=[i,parseInt(n[0])+i]}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=HE.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class gT extends pT{constructor(e,t){super(t),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new cT,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const e=this.levelkeys.identity;if(e)this._decryptdata=e.getDecryptData(this.sn);else{const e=Object.keys(this.levelkeys);if(1===e.length)return this._decryptdata=this.levelkeys[e[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(null===this.programDateTime)return null;if(!KE(this.programDateTime))return null;const e=KE(this.duration)?this.duration:0;return this.programDateTime+1e3*e}get encrypted(){var e;if(null!=(e=this._decryptdata)&&e.encrypted)return!0;if(this.levelkeys){const e=Object.keys(this.levelkeys),t=e.length;if(t>1||1===t&&this.levelkeys[e[0]].encrypted)return!0}return!1}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;null==(e=this.loader)||e.abort(),null==(t=this.keyLoader)||t.abort()}setElementaryStreamInfo(e,t,n,i,a,r=!1){const{elementaryStreams:o}=this,s=o[e];s?(s.startPTS=Math.min(s.startPTS,t),s.endPTS=Math.max(s.endPTS,n),s.startDTS=Math.min(s.startDTS,i),s.endDTS=Math.max(s.endDTS,a)):o[e]={startPTS:t,endPTS:n,startDTS:i,endDTS:a,partial:r}}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[hT]=null,e[mT]=null,e[fT]=null}}class vT extends pT{constructor(e,t,n,i,a){super(n),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.stats=new cT,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=i;const r=e.enumeratedString("BYTERANGE");r&&this.setByteRange(r,a),a&&(this.fragOffset=a.fragOffset+a.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}class yT{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e)return this.advanced=!0,void(this.updated=!0);const t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||0===t&&n>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return!!this.fragments.length&&KE(this.fragments[this.fragments.length-1].programDateTime)}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||10}get drift(){const e=this.driftEndTime-this.driftStartTime;if(e>0){return 1e3*(this.driftEnd-this.driftStart)/e}return 1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return null!=(e=this.fragments)&&e.length?this.fragments[this.fragments.length-1].end:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].index:-1}get lastPartSn(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function wT(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}function bT(e){const t=e.split(":");let n=null;if("data"===t[0]&&2===t.length){const e=t[1].split(";"),i=e[e.length-1].split(",");if(2===i.length){const t="base64"===i[0],a=i[1];t?(e.splice(-1,1),n=wT(a)):n=function(e){const t=kT(e).subarray(0,16),n=new Uint8Array(16);return n.set(t,16-t.length),n}(a)}}return n}function kT(e){return Uint8Array.from(unescape(encodeURIComponent(e)),(e=>e.charCodeAt(0)))}const ST="undefined"!=typeof self?self:void 0;var MT={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},ET="org.w3.clearkey",TT="com.apple.streamingkeydelivery",PT="com.microsoft.playready",AT="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";function xT(e){switch(e){case TT:return MT.FAIRPLAY;case PT:return MT.PLAYREADY;case AT:return MT.WIDEVINE;case ET:return MT.CLEARKEY}}var _T="1077efecc0b24d02ace33c1e52e2fb4b",CT="e2719d58a985b3c9781ab030af78d30e",LT="9a04f07998404286ab92e65be0885f95",IT="edef8ba979d64acea3c827dcd51d21ed";function DT(e){return e===IT?MT.WIDEVINE:e===LT?MT.PLAYREADY:e===_T||e===CT?MT.CLEARKEY:void 0}function RT(e){switch(e){case MT.FAIRPLAY:return TT;case MT.PLAYREADY:return PT;case MT.WIDEVINE:return AT;case MT.CLEARKEY:return ET}}function WT(e){const{drmSystems:t,widevineLicenseUrl:n}=e,i=t?[MT.FAIRPLAY,MT.WIDEVINE,MT.PLAYREADY,MT.CLEARKEY].filter((e=>!!t[e])):[];return!i[MT.WIDEVINE]&&n&&i.push(MT.WIDEVINE),i}const NT=null!=ST&&null!=(OT=ST.navigator)&&OT.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;var OT;function FT(e,t,n){return Uint8Array.prototype.slice?e.slice(t,n):new Uint8Array(Array.prototype.slice.call(e,t,n))}const jT=(e,t)=>t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128,zT=(e,t)=>t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128,$T=(e,t)=>{const n=t;let i=0;for(;jT(e,t);){i+=10;i+=UT(e,t+6),zT(e,t+10)&&(i+=10),t+=i}if(i>0)return e.subarray(n,n+i)},UT=(e,t)=>{let n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3],n},HT=(e,t)=>jT(e,t)&&UT(e,t+6)+10<=e.length-t,BT=e=>{const t=YT(e);for(let e=0;e<t.length;e++){const n=t[e];if(GT(n))return QT(n)}},GT=e=>e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info,XT=e=>{const t=String.fromCharCode(e[0],e[1],e[2],e[3]),n=UT(e,4);return{type:t,size:n,data:e.subarray(10,10+n)}},YT=e=>{let t=0;const n=[];for(;jT(e,t);){const i=UT(e,t+6);t+=10;const a=t+i;for(;t+8<a;){const i=XT(e.subarray(t)),a=VT(i);a&&n.push(a),t+=i.size+10}zT(e,t)&&(t+=10)}return n},VT=e=>"PRIV"===e.type?KT(e):"W"===e.type[0]?JT(e):qT(e),KT=e=>{if(e.size<2)return;const t=ZT(e.data,!0),n=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:n.buffer}},qT=e=>{if(e.size<2)return;if("TXXX"===e.type){let t=1;const n=ZT(e.data.subarray(t),!0);t+=n.length+1;const i=ZT(e.data.subarray(t));return{key:e.type,info:n,data:i}}const t=ZT(e.data.subarray(1));return{key:e.type,data:t}},JT=e=>{if("WXXX"===e.type){if(e.size<2)return;let t=1;const n=ZT(e.data.subarray(t),!0);t+=n.length+1;const i=ZT(e.data.subarray(t));return{key:e.type,info:n,data:i}}const t=ZT(e.data);return{key:e.type,data:t}},QT=e=>{if(8===e.data.byteLength){const t=new Uint8Array(e.data),n=1&t[3];let i=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return i/=45,n&&(i+=47721858.84),Math.round(i)}},ZT=(e,t=!1)=>{const n=tP();if(n){const i=n.decode(e);if(t){const e=i.indexOf("\0");return-1!==e?i.substring(0,e):i}return i.replace(/\0/g,"")}const i=e.length;let a,r,o,s="",l=0;for(;l<i;){if(a=e[l++],0===a&&t)return s;if(0!==a&&3!==a)switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:s+=String.fromCharCode(a);break;case 12:case 13:r=e[l++],s+=String.fromCharCode((31&a)<<6|63&r);break;case 14:r=e[l++],o=e[l++],s+=String.fromCharCode((15&a)<<12|(63&r)<<6|63&o)}}return s};let eP;function tP(){if(!navigator.userAgent.includes("PlayStation 4"))return eP||void 0===self.TextDecoder||(eP=new self.TextDecoder("utf-8")),eP}const nP={hexDump:function(e){let t="";for(let n=0;n<e.length;n++){let i=e[n].toString(16);i.length<2&&(i="0"+i),t+=i}return t}},iP=Math.pow(2,32)-1,aP=[].push,rP={video:1,audio:2,id3:3,text:4};function oP(e){return String.fromCharCode.apply(null,e)}function sP(e,t){const n=e[t]<<8|e[t+1];return n<0?65536+n:n}function lP(e,t){const n=uP(e,t);return n<0?4294967296+n:n}function dP(e,t){let n=lP(e,t);return n*=Math.pow(2,32),n+=lP(e,t+4),n}function uP(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function cP(e,t,n){e[t]=n>>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function hP(e,t){const n=[];if(!t.length)return n;const i=e.byteLength;for(let a=0;a<i;){const r=lP(e,a),o=r>1?a+r:i;if(oP(e.subarray(a+4,a+8))===t[0])if(1===t.length)n.push(e.subarray(a+8,o));else{const i=hP(e.subarray(a+8,o),t.slice(1));i.length&&aP.apply(n,i)}a=o}return n}function mP(e){const t=[],n=e[0];let i=8;const a=lP(e,i);i+=4;let r=0,o=0;0===n?(r=lP(e,i),o=lP(e,i+4),i+=8):(r=dP(e,i),o=dP(e,i+8),i+=16),i+=2;let s=e.length+o;const l=sP(e,i);i+=2;for(let n=0;n<l;n++){let n=i;const r=lP(e,n);n+=4;const o=2147483647&r;if(1===(2147483648&r)>>>31)return rT.warn("SIDX has hierarchical references (not supported)"),null;const l=lP(e,n);n+=4,t.push({referenceSize:o,subsegmentDuration:l,info:{duration:l/a,start:s,end:s+o-1}}),s+=o,n+=4,i=n}return{earliestPresentationTime:r,timescale:a,version:n,referencesCount:l,references:t}}function fP(e){const t=[],n=hP(e,["moov","trak"]);for(let e=0;e<n.length;e++){const i=n[e],a=hP(i,["tkhd"])[0];if(a){let e=a[0];const n=lP(a,0===e?12:20),r=hP(i,["mdia","mdhd"])[0];if(r){e=r[0];const a=lP(r,0===e?12:20),o=hP(i,["mdia","hdlr"])[0];if(o){const e=oP(o.subarray(8,12)),r={soun:hT,vide:mT}[e];if(r){const e=pP(hP(i,["mdia","minf","stbl","stsd"])[0]);t[n]={timescale:a,type:r},t[r]=GE({timescale:a,id:n},e)}}}}}return hP(e,["moov","mvex","trex"]).forEach((e=>{const n=lP(e,4),i=t[n];i&&(i.default={duration:lP(e,12),flags:lP(e,20)})})),t}function pP(e){const t=e.subarray(8),n=t.subarray(86),i=oP(t.subarray(4,8));let a=i;const r="enca"===i||"encv"===i;if(r){const e=hP(t,[i])[0];hP(e.subarray("enca"===i?28:78),["sinf"]).forEach((e=>{const t=hP(e,["schm"])[0];if(t){const n=oP(t.subarray(4,8));if("cbcs"===n||"cenc"===n){const t=hP(e,["frma"])[0];t&&(a=oP(t))}}}))}switch(a){case"avc1":case"avc2":case"avc3":case"avc4":{const e=hP(n,["avcC"])[0];a+="."+vP(e[1])+vP(e[2])+vP(e[3]);break}case"mp4a":{const e=hP(t,[i])[0],n=hP(e.subarray(28),["esds"])[0];if(n&&n.length>12){let e=4;if(3!==n[e++])break;e=gP(n,e),e+=2;const t=n[e++];if(128&t&&(e+=2),64&t&&(e+=n[e++]),4!==n[e++])break;e=gP(n,e);const i=n[e++];if(64!==i)break;if(a+="."+vP(i),e+=12,5!==n[e++])break;e=gP(n,e);const r=n[e++];let o=(248&r)>>3;31===o&&(o+=1+((7&r)<<3)+((224&n[e])>>5)),a+="."+o}break}case"hvc1":case"hev1":{const e=hP(n,["hvcC"])[0],t=e[1],i=["","A","B","C"][t>>6],r=31&t,o=lP(e,2),s=(32&t)>>5?"H":"L",l=e[12],d=e.subarray(6,12);a+="."+i+r,a+="."+o.toString(16).toUpperCase(),a+="."+s+l;let u="";for(let e=d.length;e--;){const t=d[e];if(t||u){u="."+t.toString(16).toUpperCase()+u}}a+=u;break}case"dvh1":case"dvhe":{const e=hP(n,["dvcC"])[0],t=e[2]>>1&127,i=e[2]<<5&32|e[3]>>3&31;a+="."+yP(t)+"."+yP(i);break}case"vp09":{const e=hP(n,["vpcC"])[0],t=e[4],i=e[5],r=e[6]>>4&15;a+="."+yP(t)+"."+yP(i)+"."+yP(r);break}case"av01":{const e=hP(n,["av1C"])[0],t=e[1]>>>5,i=31&e[1],r=e[2]>>>7?"H":"M",o=(64&e[2])>>6,s=(32&e[2])>>5,l=2===t&&o?s?12:10:o?10:8,d=(16&e[2])>>4,u=(8&e[2])>>3,c=(4&e[2])>>2,h=3&e[2],m=1,f=1,p=1,g=0;a+="."+t+"."+yP(i)+r+"."+yP(l)+"."+d+"."+u+c+h+"."+yP(m)+"."+yP(f)+"."+yP(p)+"."+g;break}}return{codec:a,encrypted:r}}function gP(e,t){const n=t+5;for(;128&e[t++]&&t<n;);return t}function vP(e){return("0"+e.toString(16).toUpperCase()).slice(-2)}function yP(e){return(e<10?"0":"")+e}function wP(e){const t=hP(e,["schm"])[0];if(t){const n=oP(t.subarray(4,8));if("cbcs"===n||"cenc"===n)return hP(e,["schi","tenc"])[0]}return null}function bP(e){const t=lP(e,0);let n=8;1&t&&(n+=4),4&t&&(n+=4);let i=0;const a=lP(e,4);for(let r=0;r<a;r++){if(256&t){i+=lP(e,n),n+=4}512&t&&(n+=4),1024&t&&(n+=4),2048&t&&(n+=4)}return i}function kP(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function SP(e,t){const n=[],i=t.samples,a=t.timescale,r=t.id;let o=!1;return hP(i,["moof"]).map((s=>{const l=s.byteOffset-8;hP(s,["traf"]).map((s=>{const d=hP(s,["tfdt"]).map((e=>{const t=e[0];let n=lP(e,4);return 1===t&&(n*=Math.pow(2,32),n+=lP(e,8)),n/a}))[0];return void 0!==d&&(e=d),hP(s,["tfhd"]).map((d=>{const u=lP(d,4),c=16777215&lP(d,0);let h=0;const m=!!(16&c);let f=0;const p=!!(32&c);let g=8;u===r&&(!!(1&c)&&(g+=8),!!(2&c)&&(g+=4),!!(8&c)&&(h=lP(d,g),g+=4),m&&(f=lP(d,g),g+=4),p&&(g+=4),"video"===t.type&&(o=function(e){if(!e)return!1;const t=e.indexOf("."),n=t<0?e:e.substring(0,t);return"hvc1"===n||"hev1"===n||"dvh1"===n||"dvhe"===n}(t.codec)),hP(s,["trun"]).map((r=>{const s=r[0],d=16777215&lP(r,0),u=!!(1&d);let c=0;const m=!!(4&d),p=!!(256&d);let g=0;const v=!!(512&d);let y=0;const w=!!(1024&d),b=!!(2048&d);let k=0;const S=lP(r,4);let M=8;u&&(c=lP(r,M),M+=4),m&&(M+=4);let E=c+l;for(let l=0;l<S;l++){if(p?(g=lP(r,M),M+=4):g=h,v?(y=lP(r,M),M+=4):y=f,w&&(M+=4),b&&(k=0===s?lP(r,M):uP(r,M),M+=4),t.type===mT){let t=0;for(;t<y;){const r=lP(i,E);if(E+=4,MP(o,i[E])){EP(i.subarray(E,E+r),o?2:1,e+k/a,n)}E+=r,t+=r+4}}e+=g/a}})))}))}))})),n}function MP(e,t){if(e){const e=t>>1&63;return 39===e||40===e}return 6===(31&t)}function EP(e,t,n,i){const a=TP(e);let r=0;r+=t;let o=0,s=0,l=0;for(;r<a.length;){o=0;do{if(r>=a.length)break;l=a[r++],o+=l}while(255===l);s=0;do{if(r>=a.length)break;l=a[r++],s+=l}while(255===l);const e=a.length-r;let t=r;if(s<e)r+=s;else if(s>e){rT.error(`Malformed SEI payload. ${s} is too small, only ${e} bytes left to parse.`);break}if(4===o){if(181===a[t++]){const e=sP(a,t);if(t+=2,49===e){const e=lP(a,t);if(t+=4,1195456820===e){const e=a[t++];if(3===e){const r=a[t++],s=64&r,l=s?2+3*(31&r):0,d=new Uint8Array(l);if(s){d[0]=r;for(let e=1;e<l;e++)d[e]=a[t++]}i.push({type:e,payloadType:o,pts:n,bytes:d})}}}}}else if(5===o&&s>16){const e=[];for(let n=0;n<16;n++){const i=a[t++].toString(16);e.push(1==i.length?"0"+i:i),3!==n&&5!==n&&7!==n&&9!==n||e.push("-")}const r=s-16,l=new Uint8Array(r);for(let e=0;e<r;e++)l[e]=a[t++];i.push({payloadType:o,pts:n,uuid:e.join(""),userData:ZT(l),userDataBytes:l})}}}function TP(e){const t=e.byteLength,n=[];let i=1;for(;i<t-2;)0===e[i]&&0===e[i+1]&&3===e[i+2]?(n.push(i+2),i+=2):i++;if(0===n.length)return e;const a=t-n.length,r=new Uint8Array(a);let o=0;for(i=0;i<a;o++,i++)o===n[0]&&(o++,n.shift()),r[i]=e[o];return r}function PP(e,t,n){if(16!==e.byteLength)throw new RangeError("Invalid system id");let i,a,r;i=0,a=new Uint8Array,r=new Uint8Array;const o=new Uint8Array(4);return n&&n.byteLength>0&&new DataView(o.buffer).setUint32(0,n.byteLength,!1),function(e,...t){const n=t.length;let i=8,a=n;for(;a--;)i+=t[a].byteLength;const r=new Uint8Array(i);for(r[0]=i>>24&255,r[1]=i>>16&255,r[2]=i>>8&255,r[3]=255&i,r.set(e,4),a=0,i=8;a<n;a++)r.set(t[a],i),i+=t[a].byteLength;return r}([112,115,115,104],new Uint8Array([0,0,0,0]),e,r,a,o,n||new Uint8Array)}function AP(e){const t=e.getUint32(0),n=e.byteOffset,i=e.byteLength;if(i<t)return{offset:n,size:i};if(1886614376!==e.getUint32(4))return{offset:n,size:t};const a=e.getUint32(8)>>>24;if(0!==a&&1!==a)return{offset:n,size:t};const r=e.buffer,o=nP.hexDump(new Uint8Array(r,n+12,16)),s=e.getUint32(28);let l=null,d=null;if(0===a){if(t-32<s||s<22)return{offset:n,size:t};d=new Uint8Array(r,n+32,s)}else if(1===a){if(!s||i<n+32+16*s+16)return{offset:n,size:t};l=[];for(let e=0;e<s;e++)l.push(new Uint8Array(r,n+32+16*e,16))}return{version:a,systemId:o,kids:l,data:d,offset:n,size:t}}let xP={};class _P{static clearKeyUriToKeyIdMap(){xP={}}constructor(e,t,n,i=[1],a=null){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.iv=a,this.encrypted=!!e&&"NONE"!==e,this.isCommonEncryption=this.encrypted&&"AES-128"!==e}isSupported(){if(this.method){if("AES-128"===this.method||"NONE"===this.method)return!0;if("identity"===this.keyFormat)return"SAMPLE-AES"===this.method;switch(this.keyFormat){case TT:case AT:case PT:case ET:return-1!==["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if("AES-128"===this.method&&this.uri&&!this.iv){"number"!=typeof e&&("AES-128"!==this.method||this.iv||rT.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const t=function(e){const t=new Uint8Array(16);for(let n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t}(e);return new _P(this.method,this.uri,"identity",this.keyFormatVersions,t)}const t=bT(this.uri);if(t)switch(this.keyFormat){case AT:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case PT:{const e=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=PP(e,0,t);const n=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),i=String.fromCharCode.apply(null,Array.from(n)),a=i.substring(i.indexOf("<"),i.length),r=(new DOMParser).parseFromString(a,"text/xml").getElementsByTagName("KID")[0];if(r){const e=r.childNodes[0]?r.childNodes[0].nodeValue:r.getAttribute("VALUE");if(e){const t=wT(e).subarray(0,16);!function(e){const t=function(e,t,n){const i=e[t];e[t]=e[n],e[n]=i};t(e,0,3),t(e,1,2),t(e,4,5),t(e,6,7)}(t),this.keyId=t}}break}default:{let e=t.subarray(0,16);if(16!==e.length){const t=new Uint8Array(16);t.set(e,16-e.length),e=t}this.keyId=e;break}}if(!this.keyId||16!==this.keyId.byteLength){let e=xP[this.uri];if(!e){const t=Object.keys(xP).length%Number.MAX_SAFE_INTEGER;e=new Uint8Array(16);new DataView(e.buffer,12,4).setUint32(0,t),xP[this.uri]=e}this.keyId=e}return this}}const CP=/\{\$([a-zA-Z0-9-_]+)\}/g;function LP(e){return CP.test(e)}function IP(e,t,n){if(null!==e.variableList||e.hasVariableRefs)for(let i=n.length;i--;){const a=n[i],r=t[a];r&&(t[a]=DP(e,r))}}function DP(e,t){if(null!==e.variableList||e.hasVariableRefs){const n=e.variableList;return t.replace(CP,(t=>{const i=t.substring(2,t.length-1),a=null==n?void 0:n[i];return void 0===a?(e.playlistParsingError||(e.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${i}"`)),t):a}))}return t}function RP(e,t,n){let i,a,r=e.variableList;if(r||(e.variableList=r={}),"QUERYPARAM"in t){i=t.QUERYPARAM;try{const e=new self.URL(n).searchParams;if(!e.has(i))throw new Error(`"${i}" does not match any query parameter in URI: "${n}"`);a=e.get(i)}catch(t){e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${t.message}`))}}else i=t.NAME,a=t.VALUE;i in r?e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${i}"`)):r[i]=a||""}function WP(e,t,n){const i=t.IMPORT;if(n&&i in n){let t=e.variableList;t||(e.variableList=t={}),t[i]=n[i]}else e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${i}"`))}function NP(e=!0){if("undefined"==typeof self)return;return(e||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}const OP={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function FP(e,t,n=!0){return!e.split(",").some((e=>!jP(e,t,n)))}function jP(e,t,n=!0){var i;const a=NP(n);return null!=(i=null==a?void 0:a.isTypeSupported(zP(e,t)))&&i}function zP(e,t){return`${t}/mp4;codecs="${e}"`}function $P(e){if(e){const t=e.substring(0,4);return OP.video[t]}return 2}function UP(e){return e.split(",").reduce(((e,t)=>{const n=OP.video[t];return n?(2*n+e)/(e?3:2):(OP.audio[t]+e)/(e?2:1)}),0)}const HP={};const BP=/flac|opus/i;function GP(e,t=!0){return e.replace(BP,(e=>function(e,t=!0){if(HP[e])return HP[e];const n={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[e];for(let i=0;i<n.length;i++)if(jP(n[i],"audio",t))return HP[e]=n[i],n[i];return e}(e.toLowerCase(),t)))}function XP(e,t){return e&&"mp4a"!==e?e:t?t.split(",")[0]:t}const YP=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,VP=/#EXT-X-MEDIA:(.*)/g,KP=/^#EXT(?:INF|-X-TARGETDURATION):/m,qP=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),JP=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class QP{static findGroup(e,t){for(let n=0;n<e.length;n++){const i=e[n];if(i.id===t)return i}}static resolve(e,t){return HE.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return KP.test(e)}static parseMasterPlaylist(e,t){const n={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:LP(e)},i=[];let a;for(YP.lastIndex=0;null!=(a=YP.exec(e));)if(a[1]){var r;const e=new lT(a[1]);IP(n,e,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const o=DP(n,a[2]),s={attrs:e,bitrate:e.decimalInteger("BANDWIDTH")||e.decimalInteger("AVERAGE-BANDWIDTH"),name:e.NAME,url:QP.resolve(o,t)},l=e.decimalResolution("RESOLUTION");l&&(s.width=l.width,s.height=l.height),tA(e.CODECS,s),null!=(r=s.unknownCodecs)&&r.length||i.push(s),n.levels.push(s)}else if(a[3]){const e=a[3],i=a[4];switch(e){case"SESSION-DATA":{const e=new lT(i);IP(n,e,["DATA-ID","LANGUAGE","VALUE","URI"]);const t=e["DATA-ID"];t&&(null===n.sessionData&&(n.sessionData={}),n.sessionData[t]=e);break}case"SESSION-KEY":{const e=ZP(i,t,n);e.encrypted&&e.isSupported()?(null===n.sessionKeys&&(n.sessionKeys=[]),n.sessionKeys.push(e)):rT.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${i}"`);break}case"DEFINE":{const e=new lT(i);IP(n,e,["NAME","VALUE","QUERYPARAM"]),RP(n,e,t)}break;case"CONTENT-STEERING":{const e=new lT(i);IP(n,e,["SERVER-URI","PATHWAY-ID"]),n.contentSteering={uri:QP.resolve(e["SERVER-URI"],t),pathwayId:e["PATHWAY-ID"]||"."};break}case"START":n.startTimeOffset=eA(i)}}const o=i.length>0&&i.length<n.levels.length;return n.levels=o?i:n.levels,0===n.levels.length&&(n.playlistParsingError=new Error("no levels found in manifest")),n}static parseMasterPlaylistMedia(e,t,n){let i;const a={},r=n.levels,o={AUDIO:r.map((e=>({id:e.attrs.AUDIO,audioCodec:e.audioCodec}))),SUBTITLES:r.map((e=>({id:e.attrs.SUBTITLES,textCodec:e.textCodec}))),"CLOSED-CAPTIONS":[]};let s=0;for(VP.lastIndex=0;null!==(i=VP.exec(e));){const e=new lT(i[1]),r=e.TYPE;if(r){const i=o[r],l=a[r]||[];a[r]=l,IP(n,e,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const d=e.LANGUAGE,u=e["ASSOC-LANGUAGE"],c=e.CHANNELS,h=e.CHARACTERISTICS,m=e["INSTREAM-ID"],f={attrs:e,bitrate:0,id:s++,groupId:e["GROUP-ID"]||"",name:e.NAME||d||"",type:r,default:e.bool("DEFAULT"),autoselect:e.bool("AUTOSELECT"),forced:e.bool("FORCED"),lang:d,url:e.URI?QP.resolve(e.URI,t):""};if(u&&(f.assocLang=u),c&&(f.channels=c),h&&(f.characteristics=h),m&&(f.instreamId=m),null!=i&&i.length){const e=QP.findGroup(i,f.groupId)||i[0];nA(f,e,"audioCodec"),nA(f,e,"textCodec")}l.push(f)}}return a}static parseLevelPlaylist(e,t,n,i,a,r){const o=new yT(t),s=o.fragments;let l,d,u,c=null,h=0,m=0,f=0,p=0,g=null,v=new gT(i,t),y=-1,w=!1,b=null;for(qP.lastIndex=0,o.m3u8=e,o.hasVariableRefs=LP(e);null!==(l=qP.exec(e));){w&&(w=!1,v=new gT(i,t),v.start=f,v.sn=h,v.cc=p,v.level=n,c&&(v.initSegment=c,v.rawProgramDateTime=c.rawProgramDateTime,c.rawProgramDateTime=null,b&&(v.setByteRange(b),b=null)));const e=l[1];if(e){v.duration=parseFloat(e);const t=(" "+l[2]).slice(1);v.title=t||null,v.tagList.push(t?["INF",e,t]:["INF",e])}else if(l[3]){if(KE(v.duration)){v.start=f,u&&rA(v,u,o),v.sn=h,v.level=n,v.cc=p,s.push(v);const e=(" "+l[3]).slice(1);v.relurl=DP(o,e),iA(v,g),g=v,f+=v.duration,h++,m=0,w=!0}}else if(l[4]){const e=(" "+l[4]).slice(1);g?v.setByteRange(e,g):v.setByteRange(e)}else if(l[5])v.rawProgramDateTime=(" "+l[5]).slice(1),v.tagList.push(["PROGRAM-DATE-TIME",v.rawProgramDateTime]),-1===y&&(y=s.length);else{if(l=l[0].match(JP),!l){rT.warn("No matches on slow regex match for level playlist!");continue}for(d=1;d<l.length&&void 0===l[d];d++);const e=(" "+l[d]).slice(1),a=(" "+l[d+1]).slice(1),f=l[d+2]?(" "+l[d+2]).slice(1):"";switch(e){case"PLAYLIST-TYPE":o.type=a.toUpperCase();break;case"MEDIA-SEQUENCE":h=o.startSN=parseInt(a);break;case"SKIP":{const e=new lT(a);IP(o,e,["RECENTLY-REMOVED-DATERANGES"]);const t=e.decimalInteger("SKIPPED-SEGMENTS");if(KE(t)){o.skippedSegments=t;for(let e=t;e--;)s.unshift(null);h+=t}const n=e.enumeratedString("RECENTLY-REMOVED-DATERANGES");n&&(o.recentlyRemovedDateranges=n.split("\t"));break}case"TARGETDURATION":o.targetduration=Math.max(parseInt(a),1);break;case"VERSION":o.version=parseInt(a);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":o.live=!1;break;case"#":(a||f)&&v.tagList.push(f?[a,f]:[a]);break;case"DISCONTINUITY":p++,v.tagList.push(["DIS"]);break;case"GAP":v.gap=!0,v.tagList.push([e]);break;case"BITRATE":v.tagList.push([e,a]);break;case"DATERANGE":{const e=new lT(a);IP(o,e,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),IP(o,e,e.clientAttrs);const t=new uT(e,o.dateRanges[e.ID]);t.isValid||o.skippedSegments?o.dateRanges[t.id]=t:rT.warn(`Ignoring invalid DATERANGE tag: "${a}"`),v.tagList.push(["EXT-X-DATERANGE",a]);break}case"DEFINE":{const e=new lT(a);IP(o,e,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in e?WP(o,e,r):RP(o,e,t)}break;case"DISCONTINUITY-SEQUENCE":p=parseInt(a);break;case"KEY":{const e=ZP(a,t,o);if(e.isSupported()){if("NONE"===e.method){u=void 0;break}u||(u={}),u[e.keyFormat]&&(u=VE({},u)),u[e.keyFormat]=e}else rT.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${a}"`);break}case"START":o.startTimeOffset=eA(a);break;case"MAP":{const e=new lT(a);if(IP(o,e,["BYTERANGE","URI"]),v.duration){const a=new gT(i,t);aA(a,e,n,u),c=a,v.initSegment=c,c.rawProgramDateTime&&!v.rawProgramDateTime&&(v.rawProgramDateTime=c.rawProgramDateTime)}else{const t=v.byteRangeEndOffset;if(t){const e=v.byteRangeStartOffset;b=`${t-e}@${e}`}else b=null;aA(v,e,n,u),c=v,w=!0}break}case"SERVER-CONTROL":{const e=new lT(a);o.canBlockReload=e.bool("CAN-BLOCK-RELOAD"),o.canSkipUntil=e.optionalFloat("CAN-SKIP-UNTIL",0),o.canSkipDateRanges=o.canSkipUntil>0&&e.bool("CAN-SKIP-DATERANGES"),o.partHoldBack=e.optionalFloat("PART-HOLD-BACK",0),o.holdBack=e.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const e=new lT(a);o.partTarget=e.decimalFloatingPoint("PART-TARGET");break}case"PART":{let e=o.partList;e||(e=o.partList=[]);const n=m>0?e[e.length-1]:void 0,i=m++,r=new lT(a);IP(o,r,["BYTERANGE","URI"]);const s=new vT(r,v,t,i,n);e.push(s),v.duration+=s.duration;break}case"PRELOAD-HINT":{const e=new lT(a);IP(o,e,["URI"]),o.preloadHint=e;break}case"RENDITION-REPORT":{const e=new lT(a);IP(o,e,["URI"]),o.renditionReports=o.renditionReports||[],o.renditionReports.push(e);break}default:rT.warn(`line parsed but not handled: ${l}`)}}}g&&!g.relurl?(s.pop(),f-=g.duration,o.partList&&(o.fragmentHint=g)):o.partList&&(iA(v,g),v.cc=p,o.fragmentHint=v,u&&rA(v,u,o));const k=s.length,S=s[0],M=s[k-1];if(f+=o.skippedSegments*o.targetduration,f>0&&k&&M){o.averagetargetduration=f/k;const e=M.sn;o.endSN="initSegment"!==e?e:0,o.live||(M.endList=!0),S&&(o.startCC=S.cc)}else o.endSN=0,o.startCC=0;return o.fragmentHint&&(f+=o.fragmentHint.duration),o.totalduration=f,o.endCC=p,y>0&&function(e,t){let n=e[t];for(let i=t;i--;){const t=e[i];if(!t)return;t.programDateTime=n.programDateTime-1e3*t.duration,n=t}}(s,y),o}}function ZP(e,t,n){var i,a;const r=new lT(e);IP(n,r,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const o=null!=(i=r.METHOD)?i:"",s=r.URI,l=r.hexadecimalInteger("IV"),d=r.KEYFORMATVERSIONS,u=null!=(a=r.KEYFORMAT)?a:"identity";s&&r.IV&&!l&&rT.error(`Invalid IV: ${r.IV}`);const c=s?QP.resolve(s,t):"",h=(d||"1").split("/").map(Number).filter(Number.isFinite);return new _P(o,c,u,h,l)}function eA(e){const t=new lT(e).decimalFloatingPoint("TIME-OFFSET");return KE(t)?t:null}function tA(e,t){let n=(e||"").split(/[ ,]+/).filter((e=>e));["video","audio","text"].forEach((e=>{const i=n.filter((t=>function(e,t){const n=OP[t];return!!n&&!!n[e.slice(0,4)]}(t,e)));i.length&&(t[`${e}Codec`]=i.join(","),n=n.filter((e=>-1===i.indexOf(e))))})),t.unknownCodecs=n}function nA(e,t,n){const i=t[n];i&&(e[n]=i)}function iA(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),KE(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}function aA(e,t,n,i){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=n,e.sn="initSegment",i&&(e.levelkeys=i),e.initSegment=null}function rA(e,t,n){e.levelkeys=t;const{encryptedFragments:i}=n;i.length&&i[i.length-1].levelkeys===t||!Object.keys(t).some((e=>t[e].isCommonEncryption))||i.push(e)}var oA="manifest",sA="level",lA="audioTrack",dA="subtitleTrack",uA="main",cA="audio",hA="subtitle";function mA(e){const{type:t}=e;switch(t){case lA:return cA;case dA:return hA;default:return uA}}function fA(e,t){let n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}class pA{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.on(QE.LEVEL_LOADING,this.onLevelLoading,this),e.on(QE.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(QE.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.off(QE.LEVEL_LOADING,this.onLevelLoading,this),e.off(QE.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(QE.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const t=this.hls.config,n=t.pLoader,i=t.loader,a=new(n||i)(t);return this.loaders[e.type]=a,a}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:n}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:oA,url:n,deliveryDirectives:null})}onLevelLoading(e,t){const{id:n,level:i,pathwayId:a,url:r,deliveryDirectives:o}=t;this.load({id:n,level:i,pathwayId:a,responseType:"text",type:sA,url:r,deliveryDirectives:o})}onAudioTrackLoading(e,t){const{id:n,groupId:i,url:a,deliveryDirectives:r}=t;this.load({id:n,groupId:i,level:null,responseType:"text",type:lA,url:a,deliveryDirectives:r})}onSubtitleTrackLoading(e,t){const{id:n,groupId:i,url:a,deliveryDirectives:r}=t;this.load({id:n,groupId:i,level:null,responseType:"text",type:dA,url:a,deliveryDirectives:r})}load(e){var t;const n=this.hls.config;let i,a=this.getInternalLoader(e);if(a){const t=a.context;if(t&&t.url===e.url&&t.level===e.level)return void rT.trace("[playlist-loader]: playlist request ongoing");rT.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),a.abort()}if(i=e.type===oA?n.manifestLoadPolicy.default:VE({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),a=this.createInternalLoader(e),KE(null==(t=e.deliveryDirectives)?void 0:t.part)){let t;if(e.type===sA&&null!==e.level?t=this.hls.levels[e.level].details:e.type===lA&&null!==e.id?t=this.hls.audioTracks[e.id].details:e.type===dA&&null!==e.id&&(t=this.hls.subtitleTracks[e.id].details),t){const e=t.partTarget,n=t.targetduration;if(e&&n){const t=1e3*Math.max(3*e,.8*n);i=VE({},i,{maxTimeToFirstByteMs:Math.min(t,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(t,i.maxTimeToFirstByteMs)})}}}const r=i.errorRetry||i.timeoutRetry||{},o={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:r.maxNumRetry||0,retryDelay:r.retryDelayMs||0,maxRetryDelay:r.maxRetryDelayMs||0},s={onSuccess:(e,t,n,i)=>{const a=this.getInternalLoader(n);this.resetInternalLoader(n.type);const r=e.data;0===r.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),QP.isMediaPlaylist(r)?this.handleTrackOrLevelPlaylist(e,t,n,i||null,a):this.handleMasterPlaylist(e,t,n,i)):this.handleManifestParsingError(e,n,new Error("no EXTM3U delimiter"),i||null,t)},onError:(e,t,n,i)=>{this.handleNetworkError(t,n,!1,e,i)},onTimeout:(e,t,n)=>{this.handleNetworkError(t,n,!0,void 0,e)}};a.load(e,o,s)}handleMasterPlaylist(e,t,n,i){const a=this.hls,r=e.data,o=fA(e,n),s=QP.parseMasterPlaylist(r,o);if(s.playlistParsingError)return void this.handleManifestParsingError(e,n,s.playlistParsingError,i,t);const{contentSteering:l,levels:d,sessionData:u,sessionKeys:c,startTimeOffset:h,variableList:m}=s;this.variableList=m;const{AUDIO:f=[],SUBTITLES:p,"CLOSED-CAPTIONS":g}=QP.parseMasterPlaylistMedia(r,o,s);if(f.length){f.some((e=>!e.url))||!d[0].audioCodec||d[0].attrs.AUDIO||(rT.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new lT({}),bitrate:0,url:""}))}a.trigger(QE.MANIFEST_LOADED,{levels:d,audioTracks:f,subtitles:p,captions:g,contentSteering:l,url:o,stats:t,networkDetails:i,sessionData:u,sessionKeys:c,startTimeOffset:h,variableList:m})}handleTrackOrLevelPlaylist(e,t,n,i,a){const r=this.hls,{id:o,level:s,type:l}=n,d=fA(e,n),u=KE(s)?s:KE(o)?o:0,c=mA(n),h=QP.parseLevelPlaylist(e.data,d,u,c,0,this.variableList);if(l===oA){const e={attrs:new lT({}),bitrate:0,details:h,name:"",url:d};r.trigger(QE.MANIFEST_LOADED,{levels:[e],audioTracks:[],url:d,stats:t,networkDetails:i,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=h,this.handlePlaylistLoaded(h,e,t,n,i,a)}handleManifestParsingError(e,t,n,i,a){this.hls.trigger(QE.ERROR,{type:ZE.NETWORK_ERROR,details:eT.MANIFEST_PARSING_ERROR,fatal:t.type===oA,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:i,stats:a})}handleNetworkError(e,t,n=!1,i,a){let r=`A network ${n?"timeout":"error"+(i?" (status "+i.code+")":"")} occurred while loading ${e.type}`;e.type===sA?r+=`: ${e.level} id: ${e.id}`:e.type!==lA&&e.type!==dA||(r+=` id: ${e.id} group-id: "${e.groupId}"`);const o=new Error(r);rT.warn(`[playlist-loader]: ${r}`);let s=eT.UNKNOWN,l=!1;const d=this.getInternalLoader(e);switch(e.type){case oA:s=n?eT.MANIFEST_LOAD_TIMEOUT:eT.MANIFEST_LOAD_ERROR,l=!0;break;case sA:s=n?eT.LEVEL_LOAD_TIMEOUT:eT.LEVEL_LOAD_ERROR,l=!1;break;case lA:s=n?eT.AUDIO_TRACK_LOAD_TIMEOUT:eT.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case dA:s=n?eT.SUBTITLE_TRACK_LOAD_TIMEOUT:eT.SUBTITLE_LOAD_ERROR,l=!1}d&&this.resetInternalLoader(e.type);const u={type:ZE.NETWORK_ERROR,details:s,fatal:l,url:e.url,loader:d,context:e,error:o,networkDetails:t,stats:a};if(i){const n=(null==t?void 0:t.url)||e.url;u.response=GE({url:n,data:void 0},i)}this.hls.trigger(QE.ERROR,u)}handlePlaylistLoaded(e,t,n,i,a,r){const o=this.hls,{type:s,level:l,id:d,groupId:u,deliveryDirectives:c}=i,h=fA(t,i),m=mA(i),f="number"==typeof i.level&&m===uA?l:void 0;if(!e.fragments.length){const e=new Error("No Segments found in Playlist");return void o.trigger(QE.ERROR,{type:ZE.NETWORK_ERROR,details:eT.LEVEL_EMPTY_ERROR,fatal:!1,url:h,error:e,reason:e.message,response:t,context:i,level:f,parent:m,networkDetails:a,stats:n})}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const p=e.playlistParsingError;if(p)o.trigger(QE.ERROR,{type:ZE.NETWORK_ERROR,details:eT.LEVEL_PARSING_ERROR,fatal:!1,url:h,error:p,reason:p.message,response:t,context:i,level:f,parent:m,networkDetails:a,stats:n});else switch(e.live&&r&&(r.getCacheAge&&(e.ageHeader=r.getCacheAge()||0),r.getCacheAge&&!isNaN(e.ageHeader)||(e.ageHeader=0)),s){case oA:case sA:o.trigger(QE.LEVEL_LOADED,{details:e,level:f||0,id:d||0,stats:n,networkDetails:a,deliveryDirectives:c});break;case lA:o.trigger(QE.AUDIO_TRACK_LOADED,{details:e,id:d||0,groupId:u||"",stats:n,networkDetails:a,deliveryDirectives:c});break;case dA:o.trigger(QE.SUBTITLE_TRACK_LOADED,{details:e,id:d||0,groupId:u||"",stats:n,networkDetails:a,deliveryDirectives:c})}}}function gA(e,t){let n;try{n=new Event("addtrack")}catch(e){n=document.createEvent("Event"),n.initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function vA(e,t){const n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error(`addCue is failed for: ${t}`)}catch(n){rT.debug(`[texttrack-utils]: ${n}`);try{const n=new self.TextTrackCue(t.startTime,t.endTime,t.text);n.id=t.id,e.addCue(n)}catch(e){rT.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${e}`)}}"disabled"===n&&(e.mode=n)}function yA(e){const t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(let t=e.cues.length;t--;)e.removeCue(e.cues[t]);"disabled"===t&&(e.mode=t)}function wA(e,t,n,i){const a=e.mode;if("disabled"===a&&(e.mode="hidden"),e.cues&&e.cues.length>0){const a=function(e,t,n){const i=[],a=function(e,t){if(t<e[0].startTime)return 0;const n=e.length-1;if(t>e[n].endTime)return-1;let i=0,a=n;for(;i<=a;){const r=Math.floor((a+i)/2);if(t<e[r].startTime)a=r-1;else{if(!(t>e[r].startTime&&i<n))return r;i=r+1}}return e[i].startTime-t<t-e[a].startTime?i:a}(e,t);if(a>-1)for(let r=a,o=e.length;r<o;r++){const a=e[r];if(a.startTime>=t&&a.endTime<=n)i.push(a);else if(a.startTime>n)return i}return i}(e.cues,t,n);for(let t=0;t<a.length;t++)i&&!i(a[t])||e.removeCue(a[t])}"disabled"===a&&(e.mode=a)}function bA(e){const t=[];for(let n=0;n<e.length;n++){const i=e[n];"subtitles"!==i.kind&&"captions"!==i.kind||!i.label||t.push(e[n])}return t}var kA="org.id3",SA="com.apple.quicktime.HLS",MA="https://aomedia.org/emsg/ID3";function EA(){if("undefined"!=typeof self)return self.VTTCue||self.TextTrackCue}function TA(e,t,n,i,a){let r=new e(t,n,"");try{r.value=i,a&&(r.type=a)}catch(o){r=new e(t,n,JSON.stringify(a?GE({type:a},i):i))}return r}const PA=(()=>{const e=EA();try{e&&new e(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function AA(e,t){return e.getTime()/1e3-t}class xA{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(QE.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(QE.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.on(QE.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(QE.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(QE.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(QE.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(QE.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.off(QE.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(QE.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(QE.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(yA(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const n=e[t];if("metadata"===n.kind&&"id3"===n.label)return gA(n,this.media),n}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:n,enableID3MetadataCues:i}}}=this;if(!n&&!i)return;const{samples:a}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const r=EA();if(r)for(let e=0;e<a.length;e++){const t=a[e].type;if(t===MA&&!n||!i)continue;const o=YT(a[e].data);if(o){const n=a[e].pts;let i=n+a[e].duration;i>PA&&(i=PA);i-n<=0&&(i=n+.25);for(let e=0;e<o.length;e++){const a=o[e];if(!GT(a)){this.updateId3CueEnds(n,t);const e=TA(r,n,i,a,t);e&&this.id3Track.addCue(e)}}}}}updateId3CueEnds(e,t){var n;const i=null==(n=this.id3Track)?void 0:n.cues;if(i)for(let n=i.length;n--;){const a=i[n];a.type===t&&a.startTime<e&&a.endTime===PA&&(a.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:n,type:i}){const{id3Track:a,hls:r}=this;if(!r)return;const{config:{enableEmsgMetadataCues:o,enableID3MetadataCues:s}}=r;if(a&&(o||s)){let e;e="audio"===i?e=>e.type===kA&&s:"video"===i?e=>e.type===MA&&o:e=>e.type===kA&&s||e.type===MA&&o,wA(a,t,n,e)}}onLevelUpdated(e,{details:t}){if(!this.media||!t.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:n,id3Track:i}=this,{dateRanges:a}=t,r=Object.keys(a);if(i){const e=Object.keys(n).filter((e=>!r.includes(e)));for(let t=e.length;t--;){const a=e[t];Object.keys(n[a].cues).forEach((e=>{i.removeCue(n[a].cues[e])})),delete n[a]}}const o=t.fragments[t.fragments.length-1];if(0===r.length||!KE(null==o?void 0:o.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const s=o.programDateTime/1e3-o.start,l=EA();for(let e=0;e<r.length;e++){const t=r[e],i=a[t],o=AA(i.startDate,s),c=n[t],h=(null==c?void 0:c.cues)||{};let m=(null==c?void 0:c.durationKnown)||!1,f=PA;const p=i.endDate;if(p)f=AA(p,s),m=!0;else if(i.endOnNext&&!m){const e=r.reduce(((e,t)=>{if(t!==i.id){const n=a[t];if(n.class===i.class&&n.startDate>i.startDate&&(!e||i.startDate<e.startDate))return n}return e}),null);e&&(f=AA(e.startDate,s),m=!0)}const g=Object.keys(i.attr);for(let e=0;e<g.length;e++){const n=g[e];if("ID"===(u=n)||"CLASS"===u||"START-DATE"===u||"DURATION"===u||"END-DATE"===u||"END-ON-NEXT"===u)continue;const a=h[n];if(a)m&&!c.durationKnown&&(a.endTime=f);else if(l){let e=i.attr[n];dT(n)&&(d=e,e=Uint8Array.from(d.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer);const a=TA(l,o,f,{key:n,data:e},SA);a&&(a.id=t,this.id3Track.addCue(a),h[n]=a)}}n[t]={cues:h,dateRange:i,durationKnown:m}}var d,u}}class _A{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=()=>this.timeupdate(),this.hls=e,this.config=e.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:t}=this;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(null===e)return null;const{holdBack:t,partHoldBack:n,targetduration:i}=e,{liveSyncDuration:a,liveSyncDurationCount:r,lowLatencyMode:o}=this.config,s=this.hls.userConfig;let l=o&&n||t;(s.liveSyncDuration||s.liveSyncDurationCount||0===l)&&(l=void 0!==a?a:r*i);const d=i;return l+Math.min(1*this.stallCount,d)}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,n=this.levelDetails;if(null===e||null===t||null===n)return null;const i=n.edge,a=e-t-this.edgeStalled,r=i-n.totalduration,o=i-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(r,a),o)}get drift(){const{levelDetails:e}=this;return null===e?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;if(null===e)return 0;const t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e,levelDetails:t}=this;if(!e||!t)return 0;const n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(QE.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(QE.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(QE.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(QE.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(QE.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(QE.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(QE.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(QE.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(QE.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(QE.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){this.levelDetails=t,t.advanced&&this.timeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(e,t){var n;t.details===eT.BUFFER_STALLED_ERROR&&(this.stallCount++,null!=(n=this.levelDetails)&&n.live&&rT.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:e,levelDetails:t}=this;if(!e||!t)return;this.currentTime=e.currentTime;const n=this.computeLatency();if(null===n)return;this._latency=n;const{lowLatencyMode:i,maxLiveSyncPlaybackRate:a}=this.config;if(!i||1===a||!t.live)return;const r=this.targetLatency;if(null===r)return;const o=n-r;if(o<Math.min(this.maxLatency,r+t.targetduration)&&o>.05&&this.forwardBufferLength>1){const t=Math.min(2,Math.max(1,a)),n=Math.round(2/(1+Math.exp(-.75*o-this.edgeStalled))*20)/20;e.playbackRate=Math.min(t,Math.max(1,n))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}estimateLiveEdge(){const{levelDetails:e}=this;return null===e?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return null===e?null:e-this.currentTime}}const CA=["NONE","TYPE-0","TYPE-1",null];const LA=["SDR","PQ","HLG"];var IA="",DA="YES",RA="v2";function WA(e){const{canSkipUntil:t,canSkipDateRanges:n,age:i}=e;return t&&i<t/2?n?RA:DA:IA}class NA{constructor(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}addDirectives(e){const t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class OA{constructor(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter((e=>!!e)).map((e=>e.substring(0,4))).join(","),this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return FA(this._audioGroups,e)}hasSubtitleGroup(e){return FA(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t)if("audio"===e){let e=this._audioGroups;e||(e=this._audioGroups=[]),-1===e.indexOf(t)&&e.push(t)}else if("text"===e){let e=this._subtitleGroups;e||(e=this._subtitleGroups=[]),-1===e.indexOf(t)&&e.push(t)}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return null==(e=this.audioGroups)?void 0:e[0]}get textGroupId(){var e;return null==(e=this.subtitleGroups)?void 0:e[0]}addFallback(){}}function FA(e,t){return!(!t||!e)&&-1!==e.indexOf(t)}function jA(e,t){const n=t.startPTS;if(KE(n)){let i,a=0;t.sn>e.sn?(a=n-e.start,i=e):(a=e.start-n,i=t),i.duration!==a&&(i.duration=a)}else if(t.sn>e.sn){e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration}else t.start=Math.max(e.start-t.duration,0)}function zA(e,t,n,i,a,r){i-n<=0&&(rT.warn("Fragment should have a positive duration",t),i=n+t.duration,r=a+t.duration);let o=n,s=i;const l=t.startPTS,d=t.endPTS;if(KE(l)){const e=Math.abs(l-n);KE(t.deltaPTS)?t.deltaPTS=Math.max(e,t.deltaPTS):t.deltaPTS=e,o=Math.max(n,l),n=Math.min(n,l),a=Math.min(a,t.startDTS),s=Math.min(i,d),i=Math.max(i,d),r=Math.max(r,t.endDTS)}const u=n-t.start;0!==t.start&&(t.start=n),t.duration=i-t.start,t.startPTS=n,t.maxStartPTS=o,t.startDTS=a,t.endPTS=i,t.minEndPTS=s,t.endDTS=r;const c=t.sn;if(!e||c<e.startSN||c>e.endSN)return 0;let h;const m=c-e.startSN,f=e.fragments;for(f[m]=t,h=m;h>0;h--)jA(f[h],f[h-1]);for(h=m;h<f.length-1;h++)jA(f[h],f[h+1]);return e.fragmentHint&&jA(f[f.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,u}function $A(e,t){let n=null;const i=e.fragments;for(let e=i.length-1;e>=0;e--){const t=i[e].initSegment;if(t){n=t;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;let a,r=0;if(function(e,t,n){const i=t.skippedSegments,a=Math.max(e.startSN,t.startSN)-t.startSN,r=(e.fragmentHint?1:0)+(i?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,o=t.startSN-e.startSN,s=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments;for(let e=a;e<=r;e++){const a=l[o+e];let r=s[e];i&&!r&&e<i&&(r=t.fragments[e]=a),a&&r&&n(a,r)}}(e,t,((e,i)=>{e.relurl&&(r=e.cc-i.cc),KE(e.startPTS)&&KE(e.endPTS)&&(i.start=i.startPTS=e.startPTS,i.startDTS=e.startDTS,i.maxStartPTS=e.maxStartPTS,i.endPTS=e.endPTS,i.endDTS=e.endDTS,i.minEndPTS=e.minEndPTS,i.duration=e.endPTS-e.startPTS,i.duration&&(a=i),t.PTSKnown=t.alignedSliding=!0),i.elementaryStreams=e.elementaryStreams,i.loader=e.loader,i.stats=e.stats,e.initSegment&&(i.initSegment=e.initSegment,n=e.initSegment)})),n){(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((e=>{var t;!e||e.initSegment&&e.initSegment.relurl!==(null==(t=n)?void 0:t.relurl)||(e.initSegment=n)}))}if(t.skippedSegments)if(t.deltaUpdateFailed=t.fragments.some((e=>!e)),t.deltaUpdateFailed){rT.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let e=t.skippedSegments;e--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}else t.canSkipDateRanges&&(t.dateRanges=function(e,t,n){const i=VE({},e);n&&n.forEach((e=>{delete i[e]}));return Object.keys(t).forEach((e=>{const n=new uT(t[e].attr,i[e]);n.isValid?i[e]=n:rT.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(t[e].attr)}"`)})),i}(e.dateRanges,t.dateRanges,t.recentlyRemovedDateranges));const o=t.fragments;if(r){rT.warn("discontinuity sliding from playlist, take drift into account");for(let e=0;e<o.length;e++)o[e].cc+=r}t.skippedSegments&&(t.startCC=t.fragments[0].cc),function(e,t,n){if(e&&t){let i=0;for(let a=0,r=e.length;a<=r;a++){const r=e[a],o=t[a+i];r&&o&&r.index===o.index&&r.fragment.sn===o.fragment.sn?n(r,o):i--}}}(e.partList,t.partList,((e,t)=>{t.elementaryStreams=e.elementaryStreams,t.stats=e.stats})),a?zA(t,a,a.startPTS,a.endPTS,a.startDTS,a.endDTS):UA(e,t),o.length&&(t.totalduration=t.edge-o[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;const s=t.advancedDateTime;if(t.advanced&&s){const e=t.edge;t.driftStart||(t.driftStartTime=s,t.driftStart=e),t.driftEndTime=s,t.driftEnd=e}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime}function UA(e,t){const n=t.startSN+t.skippedSegments-e.startSN,i=e.fragments;n<0||n>=i.length||HA(t,i[n].start)}function HA(e,t){if(t){const n=e.fragments;for(let i=e.skippedSegments;i<n.length;i++)n[i].start+=t;e.fragmentHint&&(e.fragmentHint.start+=t)}}function BA(e,t,n){var i;return null!=e&&e.details?GA(null==(i=e.details)?void 0:i.partList,t,n):null}function GA(e,t,n){if(e)for(let i=e.length;i--;){const a=e[i];if(a.index===n&&a.fragment.sn===t)return a}return null}function XA(e){e.forEach(((e,t)=>{const{details:n}=e;null!=n&&n.fragments&&n.fragments.forEach((e=>{e.level=t}))}))}function YA(e){switch(e.details){case eT.FRAG_LOAD_TIMEOUT:case eT.KEY_LOAD_TIMEOUT:case eT.LEVEL_LOAD_TIMEOUT:case eT.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function VA(e,t){const n=YA(t);return e.default[(n?"timeout":"error")+"Retry"]}function KA(e,t){const n="linear"===e.backoff?1:Math.pow(2,t);return Math.min(n*e.retryDelayMs,e.maxRetryDelayMs)}function qA(e){return GE(GE({},e),{errorRetry:null,timeoutRetry:null})}function JA(e,t,n,i){if(!e)return!1;const a=null==i?void 0:i.code,r=t<e.maxNumRetry&&(function(e){return 0===e&&!1===navigator.onLine||!!e&&(e<400||e>499)}(a)||!!n);return e.shouldRetry?e.shouldRetry(e,t,n,i,r):r}const QA=function(e,t){let n=0,i=e.length-1,a=null,r=null;for(;n<=i;){a=(n+i)/2|0,r=e[a];const o=t(r);if(o>0)n=a+1;else{if(!(o<0))return r;i=a-1}}return null};function ZA(e,t,n=0,i=0,a=.005){let r=null;if(e){r=t[e.sn-t[0].sn+1]||null;const i=e.endDTS-n;i>0&&i<15e-7&&(n+=15e-7)}else 0===n&&0===t[0].start&&(r=t[0]);if(r&&((!e||e.level===r.level)&&0===ex(n,i,r)||function(e,t,n){if(t&&0===t.start&&t.level<e.level&&(t.endPTS||0)>0){const i=t.tagList.reduce(((e,t)=>("INF"===t[0]&&(e+=parseFloat(t[1])),e)),n);return e.start<=i}return!1}(r,e,Math.min(a,i))))return r;const o=QA(t,ex.bind(null,n,i));return!o||o===e&&r?r:o}function ex(e=0,t=0,n){if(n.start<=e&&n.start+n.duration>e)return 0;const i=Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-i<=e?1:n.start-i>e&&n.start?-1:0}function tx(e,t,n){const i=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-i>e}var nx=0,ix=2,ax=3,rx=5,ox=0,sx=1,lx=2;class dx{constructor(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=rT.log.bind(rT,`${t}:`),this.warn=rT.warn.bind(rT,`${t}:`),this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){-1!==this.timer&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,n){const i=null==t?void 0:t.renditionReports;if(i){let a=-1;for(let n=0;n<i.length;n++){const r=i[n];let o;try{o=new self.URL(r.URI,t.url).href}catch(e){rT.warn(`Could not construct new URL for Rendition Report: ${e}`),o=r.URI||""}if(o===e){a=n;break}o===e.substring(0,o.length)&&(a=n)}if(-1!==a){const e=i[a],r=parseInt(e["LAST-MSN"])||(null==t?void 0:t.lastPartSn);let o=parseInt(e["LAST-PART"])||(null==t?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const e=Math.min(t.age-t.partTarget,t.targetduration);o>=0&&e>t.partTarget&&(o+=1)}const s=n&&WA(n);return new NA(r,o>=0?o:void 0,s)}}}loadPlaylist(e){-1===this.requestScheduled&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return-1===this.timer&&-1===this.requestScheduled&&this.shouldLoadPlaylist(e)}playlistLoaded(e,t,n){const{details:i,stats:a}=t,r=self.performance.now(),o=a.loading.first?Math.max(0,r-a.loading.first):0;if(i.advancedDateTime=Date.now()-o,i.live||null!=n&&n.live){if(i.reloaded(n),n&&this.log(`live playlist ${e} ${i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:i.updated?"UPDATED":"MISSED"}`),n&&i.fragments.length>0&&$A(n,i),!this.canLoad||!i.live)return;let o,s,l;if(i.canBlockReload&&i.endSN&&i.advanced){const e=this.hls.config.lowLatencyMode,a=i.lastPartSn,r=i.endSN,d=i.lastPartIndex,u=a===r;-1!==d?(s=u?r+1:a,l=u?e?0:d:d+1):s=r+1;const c=i.age,h=c+i.ageHeader;let m=Math.min(h-i.partTarget,1.5*i.targetduration);if(m>0){if(n&&m>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${m} with playlist age: ${i.age}`),m=0;else{const e=Math.floor(m/i.targetduration);if(s+=e,void 0!==l){l+=Math.round(m%i.targetduration/i.partTarget)}this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${c.toFixed(2)}s goal: ${m} skip sn ${e} to part ${l}`)}i.tuneInGoal=m}if(o=this.getDeliveryDirectives(i,t.deliveryDirectives,s,l),e||!u)return void this.loadPlaylist(o)}else(i.canBlockReload||i.canSkipUntil)&&(o=this.getDeliveryDirectives(i,t.deliveryDirectives,s,l));const d=this.hls.mainForwardBufferInfo,u=d?d.end-d.len:0,c=function(e,t=1/0){let n=1e3*e.targetduration;if(e.updated){const i=e.fragments,a=4;if(i.length&&n*a>t){const e=1e3*i[i.length-1].duration;e<n&&(n=e)}}else n/=2;return Math.round(n)}(i,1e3*(i.edge-u));i.updated&&r>this.requestScheduled+c&&(this.requestScheduled=a.loading.start),void 0!==s&&i.canBlockReload?this.requestScheduled=a.loading.first+c-(1e3*i.partTarget||1e3):-1===this.requestScheduled||this.requestScheduled+c<r?this.requestScheduled=r:this.requestScheduled-r<=0&&(this.requestScheduled+=c);let h=this.requestScheduled-r;h=Math.max(0,h),this.log(`reload live playlist ${e} in ${Math.round(h)} ms`),this.timer=self.setTimeout((()=>this.loadPlaylist(o)),h)}else this.clearTimer()}getDeliveryDirectives(e,t,n,i){let a=WA(e);return null!=t&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,i=t.part,a=IA),new NA(n,i,a)}checkRetry(e){const t=e.details,n=YA(e),i=e.errorAction,{action:a,retryCount:r=0,retryConfig:o}=i||{},s=!!i&&!!o&&(a===rx||!i.resolved&&a===ix);if(s){var l;if(this.requestScheduled=-1,r>=o.maxNumRetry)return!1;if(n&&null!=(l=e.context)&&l.deliveryDirectives)this.warn(`Retrying playlist loading ${r+1}/${o.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const e=KA(o,r);this.timer=self.setTimeout((()=>this.loadPlaylist()),e),this.warn(`Retrying playlist loading ${r+1}/${o.maxNumRetry} after "${t}" in ${e}ms`)}e.levelRetry=!0,i.resolved=!0}return s}}class ux{constructor(e,t=0,n=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}sample(e,t){const n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class cx{constructor(e,t,n,i=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new ux(e),this.fast_=new ux(t),this.defaultTTFB_=i,this.ttfb_=new ux(e)}update(e,t){const{slow_:n,fast_:i,ttfb_:a}=this;n.halfLife!==e&&(this.slow_=new ux(e,n.getEstimate(),n.getTotalWeight())),i.halfLife!==t&&(this.fast_=new ux(t,i.getEstimate(),i.getTotalWeight())),a.halfLife!==e&&(this.ttfb_=new ux(e,a.getEstimate(),a.getTotalWeight()))}sample(e,t){const n=(e=Math.max(e,this.minDelayMs_))/1e3,i=8*t/n;this.fast_.sample(n,i),this.slow_.sample(n,i)}sampleTTFB(e){const t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}}const hx={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},mx={};function fx(e,t,n,i,a,r){const o=e.audioCodec?e.audioGroups:null,s=null==r?void 0:r.audioCodec,l=null==r?void 0:r.channels,d=l?parseInt(l):s?1/0:2;let u=null;if(null!=o&&o.length)try{u=1===o.length&&o[0]?t.groups[o[0]].channels:o.reduce(((e,n)=>{if(n){const i=t.groups[n];if(!i)throw new Error(`Audio track group ${n} not found`);Object.keys(i.channels).forEach((t=>{e[t]=(e[t]||0)+i.channels[t]}))}return e}),{2:0})}catch(e){return!0}return void 0!==e.videoCodec&&(e.width>1920&&e.height>1088||e.height>1920&&e.width>1088||e.frameRate>Math.max(i,30)||"SDR"!==e.videoRange&&e.videoRange!==n||e.bitrate>Math.max(a,8e6))||!!u&&KE(d)&&Object.keys(u).some((e=>parseInt(e)>d))}function px(e,t,n){const i=e.videoCodec,a=e.audioCodec;if(!i||!a||!n)return Promise.resolve(hx);const r={width:e.width,height:e.height,bitrate:Math.ceil(Math.max(.9*e.bitrate,e.averageBitrate)),framerate:e.frameRate||30},o=e.videoRange;"SDR"!==o&&(r.transferFunction=o.toLowerCase());const s=i.split(",").map((e=>({type:"media-source",video:GE(GE({},r),{},{contentType:zP(e,"video")})})));return a&&e.audioGroups&&e.audioGroups.forEach((e=>{var n;e&&(null==(n=t.groups[e])||n.tracks.forEach((t=>{if(t.groupId===e){const e=t.channels||"",n=parseFloat(e);KE(n)&&n>2&&s.push.apply(s,a.split(",").map((e=>({type:"media-source",audio:{contentType:zP(e,"audio"),channels:""+n}}))))}})))})),Promise.all(s.map((e=>{const t=function(e){const{audio:t,video:n}=e,i=n||t;if(i){const e=i.contentType.split('"')[1];if(n)return`r${n.height}x${n.width}f${Math.ceil(n.framerate)}${n.transferFunction||"sd"}_${e}_${Math.ceil(n.bitrate/1e5)}`;if(t)return`c${t.channels}${t.spatialRendering?"s":"n"}_${e}`}return""}(e);return mx[t]||(mx[t]=n.decodingInfo(e))}))).then((e=>({supported:!e.some((e=>!e.supported)),configurations:s,decodingInfoResults:e}))).catch((e=>({supported:!1,configurations:s,decodingInfoResults:[],error:e})))}function gx(e,t){let n=!1,i=[];return e&&(n="SDR"!==e,i=[e]),t&&(i=t.allowedVideoRanges||LA.slice(0),n=void 0!==t.preferHDR?t.preferHDR:function(){if("function"==typeof matchMedia){const e=matchMedia("(dynamic-range: high)"),t=matchMedia("bad query");if(e.media!==t.media)return!0===e.matches}return!1}(),i=n?i.filter((e=>"SDR"!==e)):["SDR"]),{preferHDR:n,allowedVideoRanges:i}}function vx(e,t){rT.log(`[abr] start candidates with "${e}" ignored because ${t}`)}function yx(e,t,n){if("attrs"in e){const n=t.indexOf(e);if(-1!==n)return n}for(let i=0;i<t.length;i++){if(wx(e,t[i],n))return i}return-1}function wx(e,t,n){const{groupId:i,name:a,lang:r,assocLang:o,characteristics:s,default:l}=e,d=e.forced;return(void 0===i||t.groupId===i)&&(void 0===a||t.name===a)&&(void 0===r||t.lang===r)&&(void 0===r||t.assocLang===o)&&(void 0===l||t.default===l)&&(void 0===d||t.forced===d)&&(void 0===s||function(e,t=""){const n=e.split(","),i=t.split(",");return n.length===i.length&&!n.some((e=>-1===i.indexOf(e)))}(s,t.characteristics))&&(void 0===n||n(e,t))}function bx(e,t){const{audioCodec:n,channels:i}=e;return!(void 0!==n&&(t.audioCodec||"").substring(0,4)!==n.substring(0,4)||void 0!==i&&i!==(t.channels||"2"))}function kx(e,t,n){for(let i=t;i;i--)if(n(e[i]))return i;for(let i=t+1;i<e.length;i++)if(n(e[i]))return i;return-1}class Sx{constructor(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return!this._tickInterval&&(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)}clearNextTick(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)}tick(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}var Mx="NOT_LOADED",Ex="APPENDING",Tx="PARTIAL",Px="OK";class Ax{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(QE.BUFFER_APPENDED,this.onBufferAppended,this),e.on(QE.FRAG_BUFFERED,this.onFragBuffered,this),e.on(QE.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(QE.BUFFER_APPENDED,this.onBufferAppended,this),e.off(QE.FRAG_BUFFERED,this.onFragBuffered,this),e.off(QE.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const n=this.activePartLists[t];if(n)for(let t=n.length;t--;){const i=n[t];if(!i)break;const a=i.end;if(i.start<=e&&null!==a&&e<=a)return i}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){const{fragments:n}=this,i=Object.keys(n);for(let a=i.length;a--;){const r=n[i[a]];if((null==r?void 0:r.body.type)===t&&r.buffered){const t=r.body;if(t.start<=e&&e<=t.end)return t}}return null}detectEvictedFragments(e,t,n,i){this.timeRanges&&(this.timeRanges[e]=t);const a=(null==i?void 0:i.fragment.sn)||-1;Object.keys(this.fragments).forEach((i=>{const r=this.fragments[i];if(!r)return;if(a>=r.body.sn)return;if(!r.buffered&&!r.loaded)return void(r.body.type===n&&this.removeFragment(r.body));const o=r.range[e];o&&o.time.some((e=>{const n=!this.isTimeBuffered(e.startPTS,e.endPTS,t);return n&&this.removeFragment(r.body),n}))}))}detectPartialFragments(e){const t=this.timeRanges,{frag:n,part:i}=e;if(!t||"initSegment"===n.sn)return;const a=_x(n),r=this.fragments[a];if(!r||r.buffered&&n.gap)return;const o=!n.relurl;if(Object.keys(t).forEach((e=>{const a=n.elementaryStreams[e];if(!a)return;const s=t[e],l=o||!0===a.partial;r.range[e]=this.getBufferedTimes(n,i,l,s)})),r.loaded=null,Object.keys(r.range).length){r.buffered=!0;(r.body.endList=n.endList||r.body.endList)&&(this.endListFragments[r.body.type]=r),xx(r)||this.removeParts(n.sn-1,n.type)}else this.removeFragment(r.body)}removeParts(e,t){const n=this.activePartLists[t];n&&(this.activePartLists[t]=n.filter((t=>t.fragment.sn>=e)))}fragBuffered(e,t){const n=_x(e);let i=this.fragments[n];!i&&t&&(i=this.fragments[n]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),i&&(i.loaded=null,i.buffered=!0)}getBufferedTimes(e,t,n,i){const a={time:[],partial:n},r=e.start,o=e.end,s=e.minEndPTS||o,l=e.maxStartPTS||r;for(let e=0;e<i.length;e++){const t=i.start(e)-this.bufferPadding,n=i.end(e)+this.bufferPadding;if(l>=t&&s<=n){a.time.push({startPTS:Math.max(r,i.start(e)),endPTS:Math.min(o,i.end(e))});break}if(r<n&&o>t){const t=Math.max(r,i.start(e)),n=Math.min(o,i.end(e));n>t&&(a.partial=!0,a.time.push({startPTS:t,endPTS:n}))}else if(o<=t)break}return a}getPartialFragment(e){let t,n,i,a=null,r=0;const{bufferPadding:o,fragments:s}=this;return Object.keys(s).forEach((l=>{const d=s[l];d&&xx(d)&&(n=d.body.start-o,i=d.body.end+o,e>=n&&e<=i&&(t=Math.min(e-n,i-e),r<=t&&(a=d.body,r=t)))})),a}isEndListAppended(e){const t=this.endListFragments[e];return void 0!==t&&(t.buffered||xx(t))}getState(e){const t=_x(e),n=this.fragments[t];return n?n.buffered?xx(n)?Tx:Px:Ex:Mx}isTimeBuffered(e,t,n){let i,a;for(let r=0;r<n.length;r++){if(i=n.start(r)-this.bufferPadding,a=n.end(r)+this.bufferPadding,e>=i&&t<=a)return!0;if(t<=i)return!1}return!1}onFragLoaded(e,t){const{frag:n,part:i}=t;if("initSegment"===n.sn||n.bitrateTest)return;const a=i?null:t,r=_x(n);this.fragments[r]={body:n,appendedPTS:null,loaded:a,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:n,part:i,timeRanges:a}=t;if("initSegment"===n.sn)return;const r=n.type;if(i){let e=this.activePartLists[r];e||(this.activePartLists[r]=e=[]),e.push(i)}this.timeRanges=a,Object.keys(a).forEach((e=>{const t=a[e];this.detectEvictedFragments(e,t,r,i)}))}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=_x(e);return!!this.fragments[t]}hasParts(e){var t;return!(null==(t=this.activePartLists[e])||!t.length)}removeFragmentsInRange(e,t,n,i,a){i&&!this.hasGaps||Object.keys(this.fragments).forEach((r=>{const o=this.fragments[r];if(!o)return;const s=o.body;s.type!==n||i&&!s.gap||s.start<t&&s.end>e&&(o.buffered||a)&&this.removeFragment(s)}))}removeFragment(e){const t=_x(e);e.stats.loaded=0,e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const t=e.sn;this.activePartLists[e.type]=n.filter((e=>e.fragment.sn!==t))}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}}function xx(e){var t,n,i;return e.buffered&&(e.body.gap||(null==(t=e.range.video)?void 0:t.partial)||(null==(n=e.range.audio)?void 0:n.partial)||(null==(i=e.range.audiovideo)?void 0:i.partial))}function _x(e){return`${e.type}_${e.level}_${e.sn}`}const Cx={length:0,start:()=>0,end:()=>0};class Lx{static isBuffered(e,t){try{if(e){const n=Lx.getBuffered(e);for(let e=0;e<n.length;e++)if(t>=n.start(e)&&t<=n.end(e))return!0}}catch(e){}return!1}static bufferInfo(e,t,n){try{if(e){const i=Lx.getBuffered(e),a=[];let r;for(r=0;r<i.length;r++)a.push({start:i.start(r),end:i.end(r)});return this.bufferedInfo(a,t,n)}}catch(e){}return{len:0,start:t,end:t,nextStart:void 0}}static bufferedInfo(e,t,n){t=Math.max(0,t),e.sort((function(e,t){const n=e.start-t.start;return n||t.end-e.end}));let i=[];if(n)for(let t=0;t<e.length;t++){const a=i.length;if(a){const r=i[a-1].end;e[t].start-r<n?e[t].end>r&&(i[a-1].end=e[t].end):i.push(e[t])}else i.push(e[t])}else i=e;let a,r=0,o=t,s=t;for(let e=0;e<i.length;e++){const l=i[e].start,d=i[e].end;if(t+n>=l&&t<d)o=l,s=d,r=s-t;else if(t+n<l){a=l;break}}return{len:r,start:o||0,end:s||0,nextStart:a}}static getBuffered(e){try{return e.buffered}catch(e){return rT.log("failed to get media.buffered",e),Cx}}}class Ix{constructor(e,t,n,i=0,a=-1,r=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=e,this.sn=t,this.id=n,this.size=i,this.part=a,this.partial=r}}function Dx(e,t){for(let i=0,a=e.length;i<a;i++){var n;if((null==(n=e[i])?void 0:n.cc)===t)return e[i]}return null}function Rx(e,t){if(e){const n=e.start+t;e.start=e.startPTS=n,e.endPTS=n+e.duration}}function Wx(e,t){const n=t.fragments;for(let t=0,i=n.length;t<i;t++)Rx(n[t],e);t.fragmentHint&&Rx(t.fragmentHint,e),t.alignedSliding=!0}function Nx(e,t,n){t&&(!function(e,t,n){if(function(e,t,n){return!(!t||!(n.endCC>n.startCC||e&&e.cc<n.startCC))}(e,n,t)){const e=function(e,t){const n=e.fragments,i=t.fragments;if(!i.length||!n.length)return void rT.log("No fragments to align");const a=Dx(n,i[0].cc);if(a&&(!a||a.startPTS))return a;rT.log("No frag in previous level to align on")}(n,t);e&&KE(e.start)&&(rT.log(`Adjusting PTS using last level due to CC increase within current level ${t.url}`),Wx(e.start,t))}}(e,n,t),!n.alignedSliding&&t&&Ox(n,t),n.alignedSliding||!t||n.skippedSegments||UA(t,n))}function Ox(e,t){if(!e.hasProgramDateTime||!t.hasProgramDateTime)return;const n=e.fragments,i=t.fragments;if(!n.length||!i.length)return;let a,r;const o=Math.min(t.endCC,e.endCC);t.startCC<o&&e.startCC<o&&(a=Dx(i,o),r=Dx(n,o)),a&&r||(a=i[Math.floor(i.length/2)],r=Dx(n,a.cc)||n[Math.floor(n.length/2)]);const s=a.programDateTime,l=r.programDateTime;if(!s||!l)return;Wx((l-s)/1e3-(r.start-a.start),e)}const Fx=Math.pow(2,17);class jx{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const n=e.url;if(!n)return Promise.reject(new Ux({type:ZE.NETWORK_ERROR,details:eT.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error("Fragment does not have a "+(n?"part list":"url")),networkDetails:null}));this.abort();const i=this.config,a=i.fLoader,r=i.loader;return new Promise(((o,s)=>{if(this.loader&&this.loader.destroy(),e.gap){if(e.tagList.some((e=>"GAP"===e[0])))return void s($x(e));e.gap=!1}const l=this.loader=e.loader=a?new a(i):new r(i),d=zx(e),u=qA(i.fragLoadPolicy.default),c={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===e.sn?1/0:Fx};e.stats=l.stats,l.load(d,c,{onSuccess:(t,n,i,a)=>{this.resetLoader(e,l);let r=t.data;i.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(r.slice(0,16)),r=r.slice(16)),o({frag:e,part:null,payload:r,networkDetails:a})},onError:(t,i,a,r)=>{this.resetLoader(e,l),s(new Ux({type:ZE.NETWORK_ERROR,details:eT.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:GE({url:n,data:void 0},t),error:new Error(`HTTP Error ${t.code} ${t.text}`),networkDetails:a,stats:r}))},onAbort:(t,n,i)=>{this.resetLoader(e,l),s(new Ux({type:ZE.NETWORK_ERROR,details:eT.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:i,stats:t}))},onTimeout:(t,n,i)=>{this.resetLoader(e,l),s(new Ux({type:ZE.NETWORK_ERROR,details:eT.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${c.timeout}ms`),networkDetails:i,stats:t}))},onProgress:(n,i,a,r)=>{t&&t({frag:e,part:null,payload:a,networkDetails:r})}})}))}loadPart(e,t,n){this.abort();const i=this.config,a=i.fLoader,r=i.loader;return new Promise(((o,s)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap)return void s($x(e,t));const l=this.loader=e.loader=a?new a(i):new r(i),d=zx(e,t),u=qA(i.fragLoadPolicy.default),c={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Fx};t.stats=l.stats,l.load(d,c,{onSuccess:(i,a,r,s)=>{this.resetLoader(e,l),this.updateStatsFromPart(e,t);const d={frag:e,part:t,payload:i.data,networkDetails:s};n(d),o(d)},onError:(n,i,a,r)=>{this.resetLoader(e,l),s(new Ux({type:ZE.NETWORK_ERROR,details:eT.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:GE({url:d.url,data:void 0},n),error:new Error(`HTTP Error ${n.code} ${n.text}`),networkDetails:a,stats:r}))},onAbort:(n,i,a)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,l),s(new Ux({type:ZE.NETWORK_ERROR,details:eT.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:a,stats:n}))},onTimeout:(n,i,a)=>{this.resetLoader(e,l),s(new Ux({type:ZE.NETWORK_ERROR,details:eT.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${c.timeout}ms`),networkDetails:a,stats:n}))}})}))}updateStatsFromPart(e,t){const n=e.stats,i=t.stats,a=i.total;if(n.loaded+=i.loaded,a){const i=Math.round(e.duration/t.duration),r=Math.min(Math.round(n.loaded/a),i),o=(i-r)*Math.round(n.loaded/r);n.total=n.loaded+o}else n.total=Math.max(n.loaded,n.total);const r=n.loading,o=i.loading;r.start?r.first+=o.first-o.start:(r.start=o.start,r.first=o.first),r.end=o.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function zx(e,t=null){const n=t||e,i={frag:e,part:t,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},a=n.byteRangeStartOffset,r=n.byteRangeEndOffset;if(KE(a)&&KE(r)){var o;let t=a,n=r;if("initSegment"===e.sn&&"AES-128"===(null==(o=e.decryptdata)?void 0:o.method)){const e=r-a;e%16&&(n=r+(16-e%16)),0!==a&&(i.resetIV=!0,t=a-16)}i.rangeStart=t,i.rangeEnd=n}return i}function $x(e,t){const n=new Error(`GAP ${e.gap?"tag":"attribute"} found`),i={type:ZE.MEDIA_ERROR,details:eT.FRAG_GAP,fatal:!1,frag:e,error:n,networkDetails:null};return t&&(i.part=t),(t||e).stats.aborted=!0,new Ux(i)}class Ux extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Hx{constructor(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}decrypt(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)}}class Bx{constructor(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}expandKey(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}class Gx{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),n=new Uint32Array(4);for(let e=0;e<4;e++)n[e]=t.getUint32(4*e);return n}initTable(){const e=this.sBox,t=this.invSBox,n=this.subMix,i=n[0],a=n[1],r=n[2],o=n[3],s=this.invSubMix,l=s[0],d=s[1],u=s[2],c=s[3],h=new Uint32Array(256);let m=0,f=0,p=0;for(p=0;p<256;p++)h[p]=p<128?p<<1:p<<1^283;for(p=0;p<256;p++){let n=f^f<<1^f<<2^f<<3^f<<4;n=n>>>8^255&n^99,e[m]=n,t[n]=m;const s=h[m],p=h[s],g=h[p];let v=257*h[n]^16843008*n;i[m]=v<<24|v>>>8,a[m]=v<<16|v>>>16,r[m]=v<<8|v>>>24,o[m]=v,v=16843009*g^65537*p^257*s^16843008*m,l[n]=v<<24|v>>>8,d[n]=v<<16|v>>>16,u[n]=v<<8|v>>>24,c[n]=v,m?(m=s^h[h[h[g^s]]],f^=h[h[f]]):m=f=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let n=!0,i=0;for(;i<t.length&&n;)n=t[i]===this.key[i],i++;if(n)return;this.key=t;const a=this.keySize=t.length;if(4!==a&&6!==a&&8!==a)throw new Error("Invalid aes key size="+a);const r=this.ksRows=4*(a+6+1);let o,s;const l=this.keySchedule=new Uint32Array(r),d=this.invKeySchedule=new Uint32Array(r),u=this.sBox,c=this.rcon,h=this.invSubMix,m=h[0],f=h[1],p=h[2],g=h[3];let v,y;for(o=0;o<r;o++)o<a?v=l[o]=t[o]:(y=v,o%a==0?(y=y<<8|y>>>24,y=u[y>>>24]<<24|u[y>>>16&255]<<16|u[y>>>8&255]<<8|u[255&y],y^=c[o/a|0]<<24):a>6&&o%a==4&&(y=u[y>>>24]<<24|u[y>>>16&255]<<16|u[y>>>8&255]<<8|u[255&y]),l[o]=v=(l[o-a]^y)>>>0);for(s=0;s<r;s++)o=r-s,y=3&s?l[o]:l[o-4],d[s]=s<4||o<=4?y:m[u[y>>>24]]^f[u[y>>>16&255]]^p[u[y>>>8&255]]^g[u[255&y]],d[s]=d[s]>>>0}networkToHostOrderSwap(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}decrypt(e,t,n){const i=this.keySize+6,a=this.invKeySchedule,r=this.invSBox,o=this.invSubMix,s=o[0],l=o[1],d=o[2],u=o[3],c=this.uint8ArrayToUint32Array_(n);let h=c[0],m=c[1],f=c[2],p=c[3];const g=new Int32Array(e),v=new Int32Array(g.length);let y,w,b,k,S,M,E,T,P,A,x,_,C,L;const I=this.networkToHostOrderSwap;for(;t<g.length;){for(P=I(g[t]),A=I(g[t+1]),x=I(g[t+2]),_=I(g[t+3]),S=P^a[0],M=_^a[1],E=x^a[2],T=A^a[3],C=4,L=1;L<i;L++)y=s[S>>>24]^l[M>>16&255]^d[E>>8&255]^u[255&T]^a[C],w=s[M>>>24]^l[E>>16&255]^d[T>>8&255]^u[255&S]^a[C+1],b=s[E>>>24]^l[T>>16&255]^d[S>>8&255]^u[255&M]^a[C+2],k=s[T>>>24]^l[S>>16&255]^d[M>>8&255]^u[255&E]^a[C+3],S=y,M=w,E=b,T=k,C+=4;y=r[S>>>24]<<24^r[M>>16&255]<<16^r[E>>8&255]<<8^r[255&T]^a[C],w=r[M>>>24]<<24^r[E>>16&255]<<16^r[T>>8&255]<<8^r[255&S]^a[C+1],b=r[E>>>24]<<24^r[T>>16&255]<<16^r[S>>8&255]<<8^r[255&M]^a[C+2],k=r[T>>>24]<<24^r[S>>16&255]<<16^r[M>>8&255]<<8^r[255&E]^a[C+3],v[t]=I(y^h),v[t+1]=I(k^m),v[t+2]=I(b^f),v[t+3]=I(w^p),h=P,m=A,f=x,p=_,t+=4}return v.buffer}}class Xx{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.useSoftware=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const e=self.crypto;e&&(this.subtle=e.subtle||e.webkitSubtle)}catch(e){}this.useSoftware=!this.subtle}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const n=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?function(e){const t=e.byteLength,n=t&&new DataView(e.buffer).getUint8(t-1);return n?FT(e,0,t-n):e}(n):n}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,n){return this.useSoftware?new Promise(((i,a)=>{this.softwareDecrypt(new Uint8Array(e),t,n);const r=this.flush();r?i(r.buffer):a(new Error("[softwareDecrypt] Failed to decrypt data"))})):this.webCryptoDecrypt(new Uint8Array(e),t,n)}softwareDecrypt(e,t,n){const{currentIV:i,currentResult:a,remainderData:r}=this;this.logOnce("JS AES decrypt"),r&&(e=kP(r,e),this.remainderData=null);const o=this.getValidChunk(e);if(!o.length)return null;i&&(n=i);let s=this.softwareDecrypter;s||(s=this.softwareDecrypter=new Gx),s.expandKey(t);const l=a;return this.currentResult=s.decrypt(o.buffer,0,n),this.currentIV=FT(o,-16).buffer,l||null}webCryptoDecrypt(e,t,n){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,n));this.key=t,this.fastAesKey=new Bx(this.subtle,t)}return this.fastAesKey.expandKey().then((t=>{if(!this.subtle)return Promise.reject(new Error("web crypto not initialized"));this.logOnce("WebCrypto AES decrypt");return new Hx(this.subtle,new Uint8Array(n)).decrypt(e.buffer,t)})).catch((i=>(rT.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${i.name}: ${i.message}`),this.onWebCryptoError(e,t,n))))}onWebCryptoError(e,t,n){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n);const i=this.flush();if(i)return i.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(e){let t=e;const n=e.length-e.length%16;return n!==e.length&&(t=FT(e,0,n),this.remainderData=FT(e,n)),t}logOnce(e){this.logEnabled&&(rT.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Yx=function(e){let t="";const n=e.length;for(let i=0;i<n;i++)t+=`[${e.start(i).toFixed(3)}-${e.end(i).toFixed(3)}]`;return t},Vx="STOPPED",Kx="IDLE",qx="KEY_LOADING",Jx="FRAG_LOADING",Qx="FRAG_LOADING_WAITING_RETRY",Zx="WAITING_TRACK",e_="PARSING",t_="PARSED",n_="ENDED",i_="ERROR",a_="WAITING_INIT_PTS",r_="WAITING_LEVEL";class o_ extends Sx{constructor(e,t,n,i,a){super(),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=Vx,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.loadedmetadata=!1,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.onvseeking=null,this.onvended=null,this.logPrefix="",this.log=void 0,this.warn=void 0,this.playlistType=a,this.logPrefix=i,this.log=rT.log.bind(rT,`${i}:`),this.warn=rT.warn.bind(rT,`${i}:`),this.hls=e,this.fragmentLoader=new jx(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new Xx(e.config),e.on(QE.MANIFEST_LOADED,this.onManifestLoaded,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;null!=e&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=Vx}_streamEnded(e,t){if(t.live||e.nextStart||!e.end||!this.media)return!1;const n=t.partList;if(null!=n&&n.length){const e=n[n.length-1];return Lx.isBuffered(this.media,e.start+e.duration/2)}const i=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(i)}getLevelDetails(){var e;if(this.levels&&null!==this.levelLastLoaded)return null==(e=this.levelLastLoaded)?void 0:e.details}onMediaAttached(e,t){const n=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),n.addEventListener("seeking",this.onvseeking),n.addEventListener("ended",this.onvended);const i=this.config;this.levels&&i.autoStartLoad&&this.state===Vx&&this.startLoad(i.startPosition)}onMediaDetaching(){const e=this.media;null!=e&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}onMediaSeeking(){const{config:e,fragCurrent:t,media:n,mediaBuffer:i,state:a}=this,r=n?n.currentTime:0,o=Lx.bufferInfo(i||n,r,e.maxBufferHole);if(this.log(`media seeking to ${KE(r)?r.toFixed(3):r}, state: ${a}`),this.state===n_)this.resetLoadingState();else if(t){const n=e.maxFragLookUpTolerance,i=t.start-n,a=t.start+t.duration+n;if(!o.len||a<o.start||i>o.end){const e=r>a;(r<i||e)&&(e&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}n&&(this.fragmentTracker.removeFragmentsInRange(r,1/0,this.playlistType,!0),this.lastCurrentTime=r),this.loadedmetadata||o.len||(this.nextLoadPosition=this.startPosition=r),this.tickImmediate()}onMediaEnded(){this.startPosition=this.lastCurrentTime=0}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset,this.initPTS=[]}onHandlerDestroying(){this.hls.off(QE.MANIFEST_LOADED,this.onManifestLoaded,this),this.stopLoad(),super.onHandlerDestroying(),this.hls=null}onHandlerDestroyed(){this.state=Vx,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,n){this._loadFragForPlayback(e,t,n)}_loadFragForPlayback(e,t,n){this._doFragLoad(e,t,n,(t=>{if(this.fragContextChanged(e))return this.warn(`Fragment ${e.sn}${t.part?" p: "+t.part.index:""} of level ${e.level} was dropped during download.`),void this.fragmentTracker.removeFragment(e);e.stats.chunkCount++,this._handleFragmentLoadProgress(t)})).then((t=>{if(!t)return;const n=this.state;this.fragContextChanged(e)?(n===Jx||!this.fragCurrent&&n===e_)&&(this.fragmentTracker.removeFragment(e),this.state=Kx):("payload"in t&&(this.log(`Loaded fragment ${e.sn} of level ${e.level}`),this.hls.trigger(QE.FRAG_LOADED,t)),this._handleFragmentLoadComplete(t))})).catch((t=>{this.state!==Vx&&this.state!==i_&&(this.warn(`Frag error: ${(null==t?void 0:t.message)||t}`),this.resetFragmentLoading(e))}))}clearTrackerIfNeeded(e){var t;const{fragmentTracker:n}=this;if(n.getState(e)===Ex){const t=e.type,i=this.getFwdBufferInfo(this.mediaBuffer,t),a=Math.max(e.duration,i?i.len:this.config.maxBufferLength),r=this.backtrackFragment;(1===(r?e.sn-r.sn:0)||this.reduceMaxBufferLength(a,e.duration))&&n.removeFragment(e)}else 0===(null==(t=this.mediaBuffer)?void 0:t.buffered.length)?n.removeAllFragments():n.hasParts(e.type)&&(n.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),n.getState(e)===Tx&&n.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}flushMainBuffer(e,t,n=null){if(!(e-t))return;const i={startOffset:e,endOffset:t,type:n};this.hls.trigger(QE.BUFFER_FLUSHING,i)}_loadInitSegment(e,t){this._doFragLoad(e,t).then((t=>{if(!t||this.fragContextChanged(e)||!this.levels)throw new Error("init load aborted");return t})).then((t=>{const{hls:n}=this,{payload:i}=t,a=e.decryptdata;if(i&&i.byteLength>0&&null!=a&&a.key&&a.iv&&"AES-128"===a.method){const r=self.performance.now();return this.decrypter.decrypt(new Uint8Array(i),a.key.buffer,a.iv.buffer).catch((t=>{throw n.trigger(QE.ERROR,{type:ZE.MEDIA_ERROR,details:eT.FRAG_DECRYPT_ERROR,fatal:!1,error:t,reason:t.message,frag:e}),t})).then((i=>{const a=self.performance.now();return n.trigger(QE.FRAG_DECRYPTED,{frag:e,payload:i,stats:{tstart:r,tdecrypt:a}}),t.payload=i,this.completeInitSegmentLoad(t)}))}return this.completeInitSegmentLoad(t)})).catch((t=>{this.state!==Vx&&this.state!==i_&&(this.warn(t),this.resetFragmentLoading(e))}))}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const n=e.frag.stats;this.state=Kx,e.frag.data=new Uint8Array(e.payload),n.parsing.start=n.buffering.start=self.performance.now(),n.parsing.end=n.buffering.end=self.performance.now(),this.tick()}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){var n,i,a,r;const o=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.playlistType===uA?"level":"track"} ${e.level} (frag:[${(null!=(n=e.startPTS)?n:NaN).toFixed(3)}-${(null!=(i=e.endPTS)?i:NaN).toFixed(3)}] > buffer:${o?Yx(Lx.getBuffered(o)):"(detached)"})`),"initSegment"!==e.sn){var s;if(e.type!==hA){const t=e.elementaryStreams;if(!Object.keys(t).some((e=>!!t[e])))return void(this.state=Kx)}const t=null==(s=this.levels)?void 0:s[e.level];null!=t&&t.fragmentError&&(this.log(`Resetting level fragment error count of ${t.fragmentError} on frag buffered`),t.fragmentError=0)}this.state=Kx,o&&(!this.loadedmetadata&&e.type==uA&&o.buffered.length&&(null==(a=this.fragCurrent)?void 0:a.sn)===(null==(r=this.fragPrevious)?void 0:r.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:n,part:i,partsLoaded:a}=e,r=!a||0===a.length||a.some((e=>!e)),o=new Ix(n.level,n.sn,n.stats.chunkCount+1,0,i?i.index:-1,!r);t.flush(o)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,n=null,i){var a;const r=null==t?void 0:t.details;if(!this.levels||!r)throw new Error(`frag load aborted, missing level${r?"":" detail"}s`);let o=null;if(!e.encrypted||null!=(a=e.decryptdata)&&a.key?!e.encrypted&&r.encryptedFragments.length&&this.keyLoader.loadClear(e,r.encryptedFragments):(this.log(`Loading key for ${e.sn} of [${r.startSN}-${r.endSN}], ${"[stream-controller]"===this.logPrefix?"level":"track"} ${e.level}`),this.state=qx,this.fragCurrent=e,o=this.keyLoader.load(e).then((e=>{if(!this.fragContextChanged(e.frag))return this.hls.trigger(QE.KEY_LOADED,e),this.state===qx&&(this.state=Kx),e})),this.hls.trigger(QE.KEY_LOADING,{frag:e}),null===this.fragCurrent&&(o=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))),n=Math.max(e.start,n||0),this.config.lowLatencyMode&&"initSegment"!==e.sn){const a=r.partList;if(a&&i){n>e.end&&r.fragmentHint&&(e=r.fragmentHint);const s=this.getNextPart(a,e,n);if(s>-1){const l=a[s];let d;return this.log(`Loading part sn: ${e.sn} p: ${l.index} cc: ${e.cc} of playlist [${r.startSN}-${r.endSN}] parts [0-${s}-${a.length-1}] ${"[stream-controller]"===this.logPrefix?"level":"track"}: ${e.level}, target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=l.start+l.duration,this.state=Jx,d=o?o.then((n=>!n||this.fragContextChanged(n.frag)?null:this.doFragPartsLoad(e,l,t,i))).catch((e=>this.handleFragLoadError(e))):this.doFragPartsLoad(e,l,t,i).catch((e=>this.handleFragLoadError(e))),this.hls.trigger(QE.FRAG_LOADING,{frag:e,part:l,targetBufferTime:n}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):d}if(!e.url||this.loadedEndOfParts(a,n))return Promise.resolve(null)}}this.log(`Loading fragment ${e.sn} cc: ${e.cc} ${r?"of ["+r.startSN+"-"+r.endSN+"] ":""}${"[stream-controller]"===this.logPrefix?"level":"track"}: ${e.level}, target: ${parseFloat(n.toFixed(3))}`),KE(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Jx;const s=this.config.progressive;let l;return l=s&&o?o.then((t=>!t||this.fragContextChanged(null==t?void 0:t.frag)?null:this.fragmentLoader.load(e,i))).catch((e=>this.handleFragLoadError(e))):Promise.all([this.fragmentLoader.load(e,s?i:void 0),o]).then((([e])=>(!s&&e&&i&&i(e),e))).catch((e=>this.handleFragLoadError(e))),this.hls.trigger(QE.FRAG_LOADING,{frag:e,targetBufferTime:n}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):l}doFragPartsLoad(e,t,n,i){return new Promise(((a,r)=>{var o;const s=[],l=null==(o=n.details)?void 0:o.partList,d=t=>{this.fragmentLoader.loadPart(e,t,i).then((i=>{s[t.index]=i;const r=i.part;this.hls.trigger(QE.FRAG_LOADED,i);const o=BA(n,e.sn,t.index+1)||GA(l,e.sn,t.index+1);if(!o)return a({frag:e,part:r,partsLoaded:s});d(o)})).catch(r)};d(t)}))}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===eT.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(QE.ERROR,t)}else this.hls.trigger(QE.ERROR,{type:ZE.OTHER_ERROR,details:eT.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==e_)return void(this.fragCurrent||this.state===Vx||this.state===i_||(this.state=Kx));const{frag:n,part:i,level:a}=t,r=self.performance.now();n.stats.parsing.end=r,i&&(i.stats.parsing.end=r),this.updateLevelTiming(n,i,a,e.partial)}getCurrentContext(e){const{levels:t,fragCurrent:n}=this,{level:i,sn:a,part:r}=e;if(null==t||!t[i])return this.warn(`Levels object was unset while buffering fragment ${a} of level ${i}. The current chunk will not be buffered.`),null;const o=t[i],s=r>-1?BA(o,a,r):null,l=s?s.fragment:function(e,t,n){if(null==e||!e.details)return null;const i=e.details;let a=i.fragments[t-i.startSN];return a||(a=i.fragmentHint,a&&a.sn===t?a:t<i.startSN&&n&&n.sn===t?n:null)}(o,a,n);return l?(n&&n!==l&&(l.stats=n.stats),{frag:l,part:s,level:o}):null}bufferFragmentData(e,t,n,i,a){var r;if(!e||this.state!==e_)return;const{data1:o,data2:s}=e;let l=o;if(o&&s&&(l=kP(o,s)),null==(r=l)||!r.length)return;const d={type:e.type,frag:t,part:n,chunkMeta:i,parent:t.type,data:l};if(this.hls.trigger(QE.BUFFER_APPENDING,d),e.dropped&&e.independent&&!n){if(a)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!Lx.isBuffered(t,t.currentTime))return void this.flushMainBuffer(0,e.start);const n=t.currentTime,i=Lx.bufferInfo(t,n,0),a=e.duration,r=Math.min(2*this.config.maxFragLookUpTolerance,.25*a),o=Math.max(Math.min(e.start-r,i.end-r),n+r);e.start-o>r&&this.flushMainBuffer(o,e.start)}getFwdBufferInfo(e,t){const n=this.getLoadPosition();return KE(n)?this.getFwdBufferInfoAtPos(e,n,t):null}getFwdBufferInfoAtPos(e,t,n){const{config:{maxBufferHole:i}}=this,a=Lx.bufferInfo(e,t,i);if(0===a.len&&void 0!==a.nextStart){const r=this.fragmentTracker.getBufferedFrag(t,n);if(r&&a.nextStart<r.end)return Lx.bufferInfo(e,t,Math.max(a.nextStart,i))}return a}getMaxBufferLength(e){const{config:t}=this;let n;return n=e?Math.max(8*t.maxBufferSize/e,t.maxBufferLength):t.maxBufferLength,Math.min(n,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const n=this.config,i=Math.max(Math.min(e-t,n.maxBufferLength),t),a=Math.max(e-3*t,n.maxMaxBufferLength/2,i);return a>=i&&(n.maxMaxBufferLength=a,this.warn(`Reduce max buffer length to ${a}s`),!0)}getAppendedFrag(e,t=uA){const n=this.fragmentTracker.getAppendedFrag(e,uA);return n&&"fragment"in n?n.fragment:n}getNextFragment(e,t){const n=t.fragments,i=n.length;if(!i)return null;const{config:a}=this,r=n[0].start;let o;if(t.live){const s=a.initialLiveManifestSize;if(i<s)return this.warn(`Not enough fragments to start playback (have: ${i}, need: ${s})`),null;(!t.PTSKnown&&!this.startFragRequested&&-1===this.startPosition||e<r)&&(o=this.getInitialLiveFragment(t,n),this.startPosition=this.nextLoadPosition=o?this.hls.liveSyncPosition||o.start:e)}else e<=r&&(o=n[0]);if(!o){const n=a.lowLatencyMode?t.partEnd:t.fragmentEnd;o=this.getFragmentAtPosition(e,n,t)}return this.mapToInitFragWhenRequired(o)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===Px||n===Tx&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,n,i,a){const r=e.gap,o=this.getNextFragment(this.nextLoadPosition,t);if(null===o)return o;if(e=o,r&&e&&!e.gap&&n.nextStart){const t=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,i);if(null!==t&&n.len+t.len>=a)return this.log(`buffer full after gaps in "${i}" playlist starting at sn: ${e.sn}`),null}return e}mapToInitFragWhenRequired(e){return null==e||!e.initSegment||null!=e&&e.initSegment.data||this.bitrateTest?e:e.initSegment}getNextPart(e,t,n){let i=-1,a=!1,r=!0;for(let o=0,s=e.length;o<s;o++){const s=e[o];if(r=r&&!s.independent,i>-1&&n<s.start)break;const l=s.loaded;l?i=-1:(a||s.independent||r)&&s.fragment===t&&(i=o),a=l}return i}loadedEndOfParts(e,t){const n=e[e.length-1];return n&&t>n.start&&n.loaded}getInitialLiveFragment(e,t){const n=this.fragPrevious;let i=null;if(n){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${n.programDateTime}`),i=function(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!KE(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(let i=0;i<e.length;++i){const a=e[i];if(tx(t,n,a))return a}return null}(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!i){const a=n.sn+1;if(a>=e.startSN&&a<=e.endSN){const r=t[a-e.startSN];n.cc===r.cc&&(i=r,this.log(`Live playlist, switching playlist, load frag with next SN: ${i.sn}`))}i||(i=function(e,t){return QA(e,(e=>e.cc<t?1:e.cc>t?-1:0))}(t,n.cc),i&&this.log(`Live playlist, switching playlist, load frag with same CC: ${i.sn}`))}}else{const t=this.hls.liveSyncPosition;null!==t&&(i=this.getFragmentAtPosition(t,this.bitrateTest?e.fragmentEnd:e.edge,e))}return i}getFragmentAtPosition(e,t,n){const{config:i}=this;let{fragPrevious:a}=this,{fragments:r,endSN:o}=n;const{fragmentHint:s}=n,{maxFragLookUpTolerance:l}=i,d=n.partList,u=!!(i.lowLatencyMode&&null!=d&&d.length&&s);let c;if(u&&s&&!this.bitrateTest&&(r=r.concat(s),o=s.sn),e<t){c=ZA(a,r,e,e>t-l?0:l)}else c=r[r.length-1];if(c){const e=c.sn-n.startSN,t=this.fragmentTracker.getState(c);if((t===Px||t===Tx&&c.gap)&&(a=c),a&&c.sn===a.sn&&(!u||d[0].fragment.sn>c.sn)){if(a&&c.level===a.level){const t=r[e+1];c=c.sn<o&&this.fragmentTracker.getState(t)!==Px?t:null}}}return c}synchronizeToLiveEdge(e){const{config:t,media:n}=this;if(!n)return;const i=this.hls.liveSyncPosition,a=n.currentTime,r=e.fragments[0].start,o=e.edge,s=a>=r-t.maxFragLookUpTolerance&&a<=o;if(null!==i&&n.duration>i&&(a<i||!s)){const r=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!s&&n.readyState<4||a<o-r)&&(this.loadedmetadata||(this.nextLoadPosition=i),n.readyState&&(this.warn(`Playback: ${a.toFixed(3)} is located too far from the end of live sliding playlist: ${o}, reset currentTime to : ${i.toFixed(3)}`),n.currentTime=i))}}alignPlaylists(e,t,n){const i=e.fragments.length;if(!i)return this.warn("No fragments in live playlist"),0;const a=e.fragments[0].start,r=!t,o=e.alignedSliding&&KE(a);if(r||!o&&!a){const{fragPrevious:a}=this;Nx(a,n,e);const r=e.fragments[0].start;return this.log(`Live playlist sliding: ${r.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} prev-sn: ${a?a.sn:"na"} fragments: ${i}`),r}return a}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)}setStartPosition(e,t){let n=this.startPosition;if(n<t&&(n=-1),-1===n||-1===this.lastCurrentTime){const i=null!==this.startTimeOffset,a=i?this.startTimeOffset:e.startTimeOffset;null!==a&&KE(a)?(n=t+a,a<0&&(n+=e.totalduration),n=Math.min(Math.max(t,n),t+e.totalduration),this.log(`Start time offset ${a} found in ${i?"multivariant":"media"} playlist, adjust startPosition to ${n}`),this.startPosition=n):e.live?n=this.hls.liveSyncPosition||t:this.startPosition=n=0,this.lastCurrentTime=n}this.nextLoadPosition=n}getLoadPosition(){const{media:e}=this;let t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t}handleFragLoadAborted(e,t){this.transmuxer&&"initSegment"!==e.sn&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){this.fragCurrent&&(this.fragContextChanged(e)||this.state===Qx)||(this.state=Kx)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const e=this.getCurrentContext(t.chunkMeta);e&&(t.frag=e.frag)}const n=t.frag;if(!n||n.type!==e||!this.levels)return;var i;if(this.fragContextChanged(n))return void this.warn(`Frag load error must match current frag to retry ${n.url} > ${null==(i=this.fragCurrent)?void 0:i.url}`);const a=t.details===eT.FRAG_GAP;a&&this.fragmentTracker.fragBuffered(n,!0);const r=t.errorAction,{action:o,retryCount:s=0,retryConfig:l}=r||{};if(r&&o===rx&&l){this.resetStartWhenNotLoaded(this.levelLastLoaded);const i=KA(l,s);this.warn(`Fragment ${n.sn} of ${e} ${n.level} errored with ${t.details}, retrying loading ${s+1}/${l.maxNumRetry} in ${i}ms`),r.resolved=!0,this.retryDate=self.performance.now()+i,this.state=Qx}else if(l&&r){if(this.resetFragmentErrors(e),!(s<l.maxNumRetry))return void rT.warn(`${t.details} reached or exceeded max retry (${s})`);a||o===ax||(r.resolved=!0)}else(null==r?void 0:r.action)===ix?this.state=r_:this.state=i_;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===e_||this.state===t_){const t=e.frag,n=e.parent,i=this.getFwdBufferInfo(this.mediaBuffer,n),a=i&&i.len>.5;a&&this.reduceMaxBufferLength(i.len,(null==t?void 0:t.duration)||10);const r=!a;return r&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${n} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),r}return!1}resetFragmentErrors(e){e===cA&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==Vx&&(this.state=Kx)}afterBufferFlushed(e,t,n){if(!e)return;const i=Lx.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,i,n),this.state===n_&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=Kx}resetStartWhenNotLoaded(e){if(!this.loadedmetadata){this.startFragRequested=!1;const t=e?e.details:null;null!=t&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of level ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,n,i){var a;const r=n.details;if(!r)return void this.warn("level.details undefined");if(!Object.keys(e.elementaryStreams).reduce(((t,a)=>{const o=e.elementaryStreams[a];if(o){const s=o.endPTS-o.startPTS;if(s<=0)return this.warn(`Could not parse fragment ${e.sn} ${a} duration reliably (${s})`),t||!1;const l=i?0:zA(r,e,o.startPTS,o.endPTS,o.startDTS,o.endDTS);return this.hls.trigger(QE.LEVEL_PTS_UPDATED,{details:r,level:n,drift:l,type:a,frag:e,start:o.startPTS,end:o.endPTS}),!0}return t}),!1)&&null===(null==(a=this.transmuxer)?void 0:a.error)){const t=new Error(`Found no media in fragment ${e.sn} of level ${e.level} resetting transmuxer to fallback to playlist timing`);if(0===n.fragmentError&&(n.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(t.message),this.hls.trigger(QE.ERROR,{type:ZE.MEDIA_ERROR,details:eT.FRAG_PARSING_ERROR,fatal:!1,error:t,frag:e,reason:`Found no media in msn ${e.sn} of level "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=t_,this.hls.trigger(QE.FRAG_PARSED,{frag:e,part:t})}resetTransmuxer(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)}recoverWorkerError(e){"demuxerWorker"===e.event&&(this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}class s_{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let n;return e.length?(n=1===e.length?e[0]:function(e,t){const n=new Uint8Array(t);let i=0;for(let t=0;t<e.length;t++){const a=e[t];n.set(a,i),i+=a.length}return n}(e,t),this.reset(),n):new Uint8Array(0)}reset(){this.chunks.length=0,this.dataLength=0}}function l_(e="",t=9e4){return{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}class d_{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,n,i){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,n){}demux(e,t){this.cachedData&&(e=kP(this.cachedData,e),this.cachedData=null);let n,i=$T(e,0),a=i?i.length:0;const r=this._audioTrack,o=this._id3Track,s=i?BT(i):void 0,l=e.length;for((null===this.basePTS||0===this.frameIndex&&KE(s))&&(this.basePTS=u_(s,t,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),i&&i.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:i,type:kA,duration:Number.POSITIVE_INFINITY});a<l;){if(this.canParse(e,a)){const t=this.appendFrame(r,e,a);t?(this.frameIndex++,this.lastPTS=t.sample.pts,a+=t.length,n=a):a=l}else HT(e,a)?(i=$T(e,a),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:i,type:kA,duration:Number.POSITIVE_INFINITY}),a+=i.length,n=a):a++;if(a===l&&n!==l){const t=FT(e,n);this.cachedData?this.cachedData=kP(this.cachedData,t):this.cachedData=t}}return{audioTrack:r,videoTrack:l_(),id3Track:o,textTrack:l_()}}demuxSampleAes(e,t,n){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:l_(),id3Track:this._id3Track,textTrack:l_()}}destroy(){}}const u_=(e,t,n)=>{if(KE(e))return 90*e;return 9e4*t+(n?9e4*n.baseTime/n.timescale:0)};function c_(e,t){return 255===e[t]&&240==(246&e[t+1])}function h_(e,t){return 1&e[t+1]?7:9}function m_(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function f_(e,t){return t+1<e.length&&c_(e,t)}function p_(e,t){if(f_(e,t)){const n=h_(e,t);if(t+n>=e.length)return!1;const i=m_(e,t);if(i<=n)return!1;const a=t+i;return a===e.length||f_(e,a)}return!1}function g_(e,t,n,i,a){if(!e.samplerate){const r=function(e,t,n,i){let a,r,o,s;const l=navigator.userAgent.toLowerCase(),d=i,u=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];a=1+((192&t[n+2])>>>6);const c=(60&t[n+2])>>>2;if(!(c>u.length-1))return o=(1&t[n+2])<<2,o|=(192&t[n+3])>>>6,rT.log(`manifest codec:${i}, ADTS type:${a}, samplingIndex:${c}`),/firefox/i.test(l)?c>=6?(a=5,s=new Array(4),r=c-3):(a=2,s=new Array(2),r=c):-1!==l.indexOf("android")?(a=2,s=new Array(2),r=c):(a=5,s=new Array(4),i&&(-1!==i.indexOf("mp4a.40.29")||-1!==i.indexOf("mp4a.40.5"))||!i&&c>=6?r=c-3:((i&&-1!==i.indexOf("mp4a.40.2")&&(c>=6&&1===o||/vivaldi/i.test(l))||!i&&1===o)&&(a=2,s=new Array(2)),r=c)),s[0]=a<<3,s[0]|=(14&c)>>1,s[1]|=(1&c)<<7,s[1]|=o<<3,5===a&&(s[1]|=(14&r)>>1,s[2]=(1&r)<<7,s[2]|=8,s[3]=0),{config:s,samplerate:u[c],channelCount:o,codec:"mp4a.40."+a,manifestCodec:d};{const t=new Error(`invalid ADTS sampling index:${c}`);e.emit(QE.ERROR,QE.ERROR,{type:ZE.MEDIA_ERROR,details:eT.FRAG_PARSING_ERROR,fatal:!0,error:t,reason:t.message})}}(t,n,i,a);if(!r)return;e.config=r.config,e.samplerate=r.samplerate,e.channelCount=r.channelCount,e.codec=r.codec,e.manifestCodec=r.manifestCodec,rT.log(`parsed codec:${e.codec}, rate:${r.samplerate}, channels:${r.channelCount}`)}}function v_(e){return 9216e4/e}function y_(e,t,n,i,a){const r=i+a*v_(e.samplerate),o=function(e,t){const n=h_(e,t);if(t+n<=e.length){const i=m_(e,t)-n;if(i>0)return{headerLength:n,frameLength:i}}}(t,n);let s;if(o){const{frameLength:i,headerLength:a}=o,l=a+i,d=Math.max(0,n+l-t.length);d?(s=new Uint8Array(l-a),s.set(t.subarray(n+a,t.length),0)):s=t.subarray(n+a,n+l);const u={unit:s,pts:r};return d||e.samples.push(u),{sample:u,length:l,missing:d}}const l=t.length-n;s=new Uint8Array(l),s.set(t.subarray(n,t.length),0);return{sample:{unit:s,pts:r},length:l,missing:-1}}let w_=null;const b_=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],k_=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],S_=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],M_=[0,1,1,4];function E_(e,t,n,i,a){if(n+24>t.length)return;const r=T_(t,n);if(r&&n+r.frameLength<=t.length){const o=i+a*(9e4*r.samplesPerFrame/r.sampleRate),s={unit:t.subarray(n,n+r.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=r.channelCount,e.samplerate=r.sampleRate,e.samples.push(s),{sample:s,length:r.frameLength,missing:0}}}function T_(e,t){const n=e[t+1]>>3&3,i=e[t+1]>>1&3,a=e[t+2]>>4&15,r=e[t+2]>>2&3;if(1!==n&&0!==a&&15!==a&&3!==r){const o=e[t+2]>>1&1,s=e[t+3]>>6,l=1e3*b_[14*(3===n?3-i:3===i?3:4)+a-1],d=k_[3*(3===n?0:2===n?1:2)+r],u=3===s?1:2,c=S_[n][i],h=M_[i],m=8*c*h,f=Math.floor(c*l/d+o)*h;if(null===w_){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);w_=e?parseInt(e[1]):0}return!!w_&&w_<=87&&2===i&&l>=224e3&&0===s&&(e[t+3]=128|e[t+3]),{sampleRate:d,channelCount:u,frameLength:f,samplesPerFrame:m}}}function P_(e,t){return!(255!==e[t]||224&~e[t+1]||!(6&e[t+1]))}function A_(e,t){return t+1<e.length&&P_(e,t)}function x_(e,t){if(t+1<e.length&&P_(e,t)){const n=4,i=T_(e,t);let a=n;null!=i&&i.frameLength&&(a=i.frameLength);const r=t+a;return r===e.length||A_(e,r)}return!1}const __=/\/emsg[-/]ID3/i;const C_=(e,t)=>{let n=0,i=5;t+=i;const a=new Uint32Array(1),r=new Uint32Array(1),o=new Uint8Array(1);for(;i>0;){o[0]=e[t];const s=Math.min(i,8),l=8-s;r[0]=4278190080>>>24+l<<l,a[0]=(o[0]&r[0])>>l,n=n?n<<s|a[0]:a[0],t+=1,i-=s}return n};class L_ extends d_{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,n,i){super.resetInitSegment(e,t,n,i),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:i,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,n){const i=I_(e,t,n,this.basePTS,this.frameIndex);if(-1!==i){return{sample:e.samples[e.samples.length-1],length:i,missing:0}}}static probe(e){if(!e)return!1;const t=$T(e,0);if(!t)return!1;const n=t.length;return 11===e[n]&&119===e[n+1]&&void 0!==BT(t)&&C_(e,n)<16}}function I_(e,t,n,i,a){if(n+8>t.length)return-1;if(11!==t[n]||119!==t[n+1])return-1;const r=t[n+4]>>6;if(r>=3)return-1;const o=[48e3,44100,32e3][r],s=63&t[n+4],l=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*s+r];if(n+l>t.length)return-1;const d=t[n+6]>>5;let u=0;2===d?u+=2:(1&d&&1!==d&&(u+=2),4&d&&(u+=2));const c=(t[n+6]<<8|t[n+7])>>12-u&1,h=[2,1,2,3,3,4,4,5][d]+c,m=t[n+5]>>3,f=7&t[n+5],p=new Uint8Array([r<<6|m<<1|f>>2,(3&f)<<6|d<<3|c<<2|s>>4,s<<4&224]),g=i+a*(1536/o*9e4),v=t.subarray(n,n+l);return e.config=p,e.channelCount=h,e.samplerate=o,e.samples.push({unit:v,pts:g}),l}class D_{constructor(){this.VideoSample=null}createVideoSample(e,t,n,i){return{key:e,frame:!1,pts:t,dts:n,units:[],debug:i,length:0}}getLastNalUnit(e){var t;let n,i=this.VideoSample;if(i&&0!==i.units.length||(i=e[e.length-1]),null!=(t=i)&&t.units){const e=i.units;n=e[e.length-1]}return n}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){const n=t.samples,i=n.length;if(!i)return void t.dropped++;{const t=n[i-1];e.pts=t.pts,e.dts=t.dts}}t.samples.push(e)}e.debug.length&&rT.log(e.pts+"/"+e.dts+":"+e.debug)}}class R_{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,n=e.byteLength-t,i=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");i.set(e.subarray(n,n+a)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=8*a,this.bytesAvailable-=a}skipBits(e){let t;e=Math.min(e,8*this.bytesAvailable+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(t=(e-=this.bitsAvailable)>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const n=this.word>>>32-t;if(e>32&&rT.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return t=e-t,t>0&&this.bitsAvailable?n<<t|this.readBits(t):n}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return 1===this.readBits(1)}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}skipScalingList(e){let t,n=8,i=8;for(let a=0;a<e;a++)0!==i&&(t=this.readEG(),i=(n+t+256)%256),n=0===i?n:i}readSPS(){let e,t,n,i=0,a=0,r=0,o=0;const s=this.readUByte.bind(this),l=this.readBits.bind(this),d=this.readUEG.bind(this),u=this.readBoolean.bind(this),c=this.skipBits.bind(this),h=this.skipEG.bind(this),m=this.skipUEG.bind(this),f=this.skipScalingList.bind(this);s();const p=s();if(l(5),c(3),s(),m(),100===p||110===p||122===p||244===p||44===p||83===p||86===p||118===p||128===p){const e=d();if(3===e&&c(1),m(),m(),c(1),u())for(t=3!==e?8:12,n=0;n<t;n++)u()&&f(n<6?16:64)}m();const g=d();if(0===g)d();else if(1===g)for(c(1),h(),h(),e=d(),n=0;n<e;n++)h();m(),c(1);const v=d(),y=d(),w=l(1);0===w&&c(1),c(1),u()&&(i=d(),a=d(),r=d(),o=d());let b=[1,1];if(u()&&u()){switch(s()){case 1:b=[1,1];break;case 2:b=[12,11];break;case 3:b=[10,11];break;case 4:b=[16,11];break;case 5:b=[40,33];break;case 6:b=[24,11];break;case 7:b=[20,11];break;case 8:b=[32,11];break;case 9:b=[80,33];break;case 10:b=[18,11];break;case 11:b=[15,11];break;case 12:b=[64,33];break;case 13:b=[160,99];break;case 14:b=[4,3];break;case 15:b=[3,2];break;case 16:b=[2,1];break;case 255:b=[s()<<8|s(),s()<<8|s()]}}return{width:Math.ceil(16*(v+1)-2*i-2*a),height:(2-w)*(y+1)*16-(w?2:4)*(r+o),pixelRatio:b}}readSliceType(){return this.readUByte(),this.readUEG(),this.readUEG()}}class W_ extends D_{parseAVCPES(e,t,n,i,a){const r=this.parseAVCNALu(e,n.data);let o,s=this.VideoSample,l=!1;n.data=null,s&&r.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts,"")),r.forEach((i=>{var r;switch(i.type){case 1:{let t=!1;o=!0;const a=i.data;if(l&&a.length>4){const e=new R_(a).readSliceType();2!==e&&4!==e&&7!==e&&9!==e||(t=!0)}var d;if(t)null!=(d=s)&&d.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null);s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts,"")),s.frame=!0,s.key=t;break}case 5:o=!0,null!=(r=s)&&r.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts,"")),s.key=!0,s.frame=!0;break;case 6:o=!0,EP(i.data,1,n.pts,t.samples);break;case 7:{var u,c;o=!0,l=!0;const t=i.data,n=new R_(t).readSPS();if(!e.sps||e.width!==n.width||e.height!==n.height||(null==(u=e.pixelRatio)?void 0:u[0])!==n.pixelRatio[0]||(null==(c=e.pixelRatio)?void 0:c[1])!==n.pixelRatio[1]){e.width=n.width,e.height=n.height,e.pixelRatio=n.pixelRatio,e.sps=[t],e.duration=a;const i=t.subarray(1,4);let r="avc1.";for(let e=0;e<3;e++){let t=i[e].toString(16);t.length<2&&(t="0"+t),r+=t}e.codec=r}break}case 8:o=!0,e.pps=[i.data];break;case 9:o=!0,e.audFound=!0,s&&this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts,"");break;case 12:o=!0;break;default:o=!1,s&&(s.debug+="unknown NAL "+i.type+" ")}if(s&&o){s.units.push(i)}})),i&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}parseAVCNALu(e,t){const n=t.byteLength;let i=e.naluState||0;const a=i,r=[];let o,s,l,d=0,u=-1,c=0;for(-1===i&&(u=0,c=31&t[0],i=0,d=1);d<n;)if(o=t[d++],i)if(1!==i)if(o)if(1===o){if(s=d-i-1,u>=0){const e={data:t.subarray(u,s),type:c};r.push(e)}else{const n=this.getLastNalUnit(e.samples);n&&(a&&d<=4-a&&n.state&&(n.data=n.data.subarray(0,n.data.byteLength-a)),s>0&&(n.data=kP(n.data,t.subarray(0,s)),n.state=0))}d<n?(l=31&t[d],u=d,c=l,i=0):i=-1}else i=0;else i=3;else i=o?0:2;else i=o?0:1;if(u>=0&&i>=0){const e={data:t.subarray(u,n),type:c,state:i};r.push(e)}if(0===r.length){const n=this.getLastNalUnit(e.samples);n&&(n.data=kP(n.data,t))}return e.naluState=i,r}}class N_{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new Xx(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer)}decryptAacSample(e,t,n){const i=e[t].unit;if(i.length<=16)return;const a=i.subarray(16,i.length-i.length%16),r=a.buffer.slice(a.byteOffset,a.byteOffset+a.length);this.decryptBuffer(r).then((a=>{const r=new Uint8Array(a);i.set(r,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,n)}))}decryptAacSamples(e,t,n){for(;;t++){if(t>=e.length)return void n();if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,n),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t);let i=0;for(let t=32;t<e.length-16;t+=160,i+=16)n.set(e.subarray(t,t+16),i);return n}getAvcDecryptedUnit(e,t){const n=new Uint8Array(t);let i=0;for(let t=32;t<e.length-16;t+=160,i+=16)e.set(n.subarray(i,i+16),t);return e}decryptAvcSample(e,t,n,i,a){const r=TP(a.data),o=this.getAvcEncryptedData(r);this.decryptBuffer(o.buffer).then((o=>{a.data=this.getAvcDecryptedUnit(r,o),this.decrypter.isSync()||this.decryptAvcSamples(e,t,n+1,i)}))}decryptAvcSamples(e,t,n,i){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length)return void i();const a=e[t].units;for(;!(n>=a.length);n++){const r=a[n];if(!(r.data.length<=48||1!==r.type&&5!==r.type||(this.decryptAvcSample(e,t,n,i,r),this.decrypter.isSync())))return}}}}const O_=188;class F_{constructor(e,t,n){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.videoParser=new W_}static probe(e){const t=F_.syncOffset(e);return t>0&&rT.warn(`MPEG2-TS detected but first sync word found @ offset ${t}`),-1!==t}static syncOffset(e){const t=e.length;let n=Math.min(940,t-O_)+1,i=0;for(;i<n;){let a=!1,r=-1,o=0;for(let s=i;s<t;s+=O_){if(71!==e[s]||t-s!==O_&&71!==e[s+O_]){if(o)return-1;break}if(o++,-1===r&&(r=s,0!==r&&(n=Math.min(r+18612,e.length-O_)+1)),a||(a=0===j_(e,s)),a&&o>1&&(0===r&&o>2||s+O_>n))return r}i++}return-1}static createTrack(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:rP[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}}resetInitSegment(e,t,n,i){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=F_.createTrack("video"),this._audioTrack=F_.createTrack("audio",i),this._id3Track=F_.createTrack("id3"),this._txtTrack=F_.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=n,this._duration=i}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:n}=this;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,n=!1,i=!1){let a;n||(this.sampleAes=null);const r=this._videoTrack,o=this._audioTrack,s=this._id3Track,l=this._txtTrack;let d=r.pid,u=r.pesData,c=o.pid,h=s.pid,m=o.pesData,f=s.pesData,p=null,g=this.pmtParsed,v=this._pmtId,y=e.length;if(this.remainderData&&(y=(e=kP(this.remainderData,e)).length,this.remainderData=null),y<O_&&!i)return this.remainderData=e,{audioTrack:o,videoTrack:r,id3Track:s,textTrack:l};const w=Math.max(0,F_.syncOffset(e));y-=(y-w)%O_,y<e.byteLength&&!i&&(this.remainderData=new Uint8Array(e.buffer,y,e.buffer.byteLength-y));let b=0;for(let t=w;t<y;t+=O_)if(71===e[t]){const i=!!(64&e[t+1]),y=j_(e,t);let b;if((48&e[t+3])>>4>1){if(b=t+5+e[t+4],b===t+O_)continue}else b=t+4;switch(y){case d:i&&(u&&(a=B_(u))&&this.videoParser.parseAVCPES(r,l,a,!1,this._duration),u={data:[],size:0}),u&&(u.data.push(e.subarray(b,t+O_)),u.size+=t+O_-b);break;case c:if(i){if(m&&(a=B_(m)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,a);break;case"mp3":this.parseMPEGPES(o,a);break;case"ac3":this.parseAC3PES(o,a)}m={data:[],size:0}}m&&(m.data.push(e.subarray(b,t+O_)),m.size+=t+O_-b);break;case h:i&&(f&&(a=B_(f))&&this.parseID3PES(s,a),f={data:[],size:0}),f&&(f.data.push(e.subarray(b,t+O_)),f.size+=t+O_-b);break;case 0:i&&(b+=e[b]+1),v=this._pmtId=z_(e,b);break;case v:{i&&(b+=e[b]+1);const a=$_(e,b,this.typeSupported,n,this.observer);d=a.videoPid,d>0&&(r.pid=d,r.segmentCodec=a.segmentVideoCodec),c=a.audioPid,c>0&&(o.pid=c,o.segmentCodec=a.segmentAudioCodec),h=a.id3Pid,h>0&&(s.pid=h),null===p||g||(rT.warn(`MPEG-TS PMT found at ${t} after unknown PID '${p}'. Backtracking to sync byte @${w} to parse all TS packets.`),p=null,t=w-188),g=this.pmtParsed=!0;break}case 17:case 8191:break;default:p=y}}else b++;b>0&&U_(this.observer,new Error(`Found ${b} TS packet/s that do not start with 0x47`)),r.pesData=u,o.pesData=m,s.pesData=f;const k={audioTrack:o,videoTrack:r,id3Track:s,textTrack:l};return i&&this.extractRemainingSamples(k),k}flush(){const{remainderData:e}=this;let t;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:n,id3Track:i,textTrack:a}=e,r=n.pesData,o=t.pesData,s=i.pesData;let l;if(r&&(l=B_(r))?(this.videoParser.parseAVCPES(n,a,l,!0,this._duration),n.pesData=null):n.pesData=r,o&&(l=B_(o))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,l);break;case"mp3":this.parseMPEGPES(t,l);break;case"ac3":this.parseAC3PES(t,l)}t.pesData=null}else null!=o&&o.size&&rT.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=o;s&&(l=B_(s))?(this.parseID3PES(i,l),i.pesData=null):i.pesData=s}demuxSampleAes(e,t,n){const i=this.demux(e,n,!0,!this.config.progressive),a=this.sampleAes=new N_(this.observer,this.config,t);return this.decrypt(i,a)}decrypt(e,t){return new Promise((n=>{const{audioTrack:i,videoTrack:a}=e;i.samples&&"aac"===i.segmentCodec?t.decryptAacSamples(i.samples,0,(()=>{a.samples?t.decryptAvcSamples(a.samples,0,0,(()=>{n(e)})):n(e)})):a.samples&&t.decryptAvcSamples(a.samples,0,0,(()=>{n(e)}))}))}destroy(){this._duration=0}parseAACPES(e,t){let n=0;const i=this.aacOverFlow;let a,r,o,s=t.data;if(i){this.aacOverFlow=null;const t=i.missing,a=i.sample.unit.byteLength;if(-1===t)s=kP(i.sample.unit,s);else{const r=a-t;i.sample.unit.set(s.subarray(0,t),r),e.samples.push(i.sample),n=i.missing}}for(a=n,r=s.length;a<r-1&&!f_(s,a);a++);if(a!==n){let e;const t=a<r-1;if(e=t?`AAC PES did not start with ADTS header,offset:${a}`:"No ADTS header found in AAC PES",U_(this.observer,new Error(e),t),!t)return}if(g_(e,this.observer,s,a,this.audioCodec),void 0!==t.pts)o=t.pts;else{if(!i)return void rT.warn("[tsdemuxer]: AAC PES unknown PTS");{const t=v_(e.samplerate);o=i.sample.pts+t}}let l,d=0;for(;a<r;){if(l=y_(e,s,a,o,d),a+=l.length,l.missing){this.aacOverFlow=l;break}for(d++;a<r-1&&!f_(s,a);a++);}}parseMPEGPES(e,t){const n=t.data,i=n.length;let a=0,r=0;const o=t.pts;if(void 0!==o)for(;r<i;)if(A_(n,r)){const t=E_(e,n,r,o,a);if(!t)break;r+=t.length,a++}else r++;else rT.warn("[tsdemuxer]: MPEG PES unknown PTS")}parseAC3PES(e,t){{const n=t.data,i=t.pts;if(void 0===i)return void rT.warn("[tsdemuxer]: AC3 PES unknown PTS");const a=n.length;let r,o=0,s=0;for(;s<a&&(r=I_(e,n,s,i,o++))>0;)s+=r}}parseID3PES(e,t){if(void 0===t.pts)return void rT.warn("[tsdemuxer]: ID3 PES unknown PTS");const n=VE({},t,{type:this._videoTrack?MA:kA,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function j_(e,t){return((31&e[t+1])<<8)+e[t+2]}function z_(e,t){return(31&e[t+10])<<8|e[t+11]}function $_(e,t,n,i,a){const r={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},o=t+3+((15&e[t+1])<<8|e[t+2])-4;for(t+=12+((15&e[t+10])<<8|e[t+11]);t<o;){const o=j_(e,t),s=(15&e[t+3])<<8|e[t+4];switch(e[t]){case 207:if(!i){H_("ADTS AAC");break}case 15:-1===r.audioPid&&(r.audioPid=o);break;case 21:-1===r.id3Pid&&(r.id3Pid=o);break;case 219:if(!i){H_("H.264");break}case 27:-1===r.videoPid&&(r.videoPid=o,r.segmentVideoCodec="avc");break;case 3:case 4:n.mpeg||n.mp3?-1===r.audioPid&&(r.audioPid=o,r.segmentAudioCodec="mp3"):rT.log("MPEG audio found, not supported in this browser");break;case 193:if(!i){H_("AC-3");break}case 129:n.ac3?-1===r.audioPid&&(r.audioPid=o,r.segmentAudioCodec="ac3"):rT.log("AC-3 audio found, not supported in this browser");break;case 6:if(-1===r.audioPid&&s>0){let i=t+5,a=s;for(;a>2;){if(106===e[i])!0!==n.ac3?rT.log("AC-3 audio found, not supported in this browser for now"):(r.audioPid=o,r.segmentAudioCodec="ac3");const t=e[i+1]+2;i+=t,a-=t}}break;case 194:case 135:return U_(a,new Error("Unsupported EC-3 in M2TS found")),r;case 36:return U_(a,new Error("Unsupported HEVC in M2TS found")),r}t+=s+5}return r}function U_(e,t,n){rT.warn(`parsing error: ${t.message}`),e.emit(QE.ERROR,QE.ERROR,{type:ZE.MEDIA_ERROR,details:eT.FRAG_PARSING_ERROR,fatal:!1,levelRetry:n,error:t,reason:t.message})}function H_(e){rT.log(`${e} with AES-128-CBC encryption found in unencrypted stream`)}function B_(e){let t,n,i,a,r,o=0;const s=e.data;if(!e||0===e.size)return null;for(;s[0].length<19&&s.length>1;)s[0]=kP(s[0],s[1]),s.splice(1,1);t=s[0];if(1===(t[0]<<16)+(t[1]<<8)+t[2]){if(n=(t[4]<<8)+t[5],n&&n>e.size-6)return null;const l=t[7];192&l&&(a=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&l?(r=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,a-r>54e5&&(rT.warn(`${Math.round((a-r)/9e4)}s delta between PTS and DTS, align them`),a=r)):r=a),i=t[8];let d=i+9;if(e.size<=d)return null;e.size-=d;const u=new Uint8Array(e.size);for(let e=0,n=s.length;e<n;e++){t=s[e];let n=t.byteLength;if(d){if(d>n){d-=n;continue}t=t.subarray(d),n-=d,d=0}u.set(t,o),o+=n}return n&&(n-=i+3),{data:u,pts:a,dts:r,len:n}}return null}class G_{static getSilentFrame(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}}const X_=Math.pow(2,32)-1;class Y_{static init(){let e;for(e in Y_.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},Y_.types)Y_.types.hasOwnProperty(e)&&(Y_.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);Y_.HDLR_TYPES={video:t,audio:n};const i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);Y_.STTS=Y_.STSC=Y_.STCO=a,Y_.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Y_.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Y_.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Y_.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const r=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),s=new Uint8Array([0,0,0,1]);Y_.FTYP=Y_.box(Y_.types.ftyp,r,s,r,o),Y_.DINF=Y_.box(Y_.types.dinf,Y_.box(Y_.types.dref,i))}static box(e,...t){let n=8,i=t.length;const a=i;for(;i--;)n+=t[i].byteLength;const r=new Uint8Array(n);for(r[0]=n>>24&255,r[1]=n>>16&255,r[2]=n>>8&255,r[3]=255&n,r.set(e,4),i=0,n=8;i<a;i++)r.set(t[i],n),n+=t[i].byteLength;return r}static hdlr(e){return Y_.box(Y_.types.hdlr,Y_.HDLR_TYPES[e])}static mdat(e){return Y_.box(Y_.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(X_+1)),i=Math.floor(t%(X_+1));return Y_.box(Y_.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24,n>>16&255,n>>8&255,255&n,i>>24,i>>16&255,i>>8&255,255&i,85,196,0,0]))}static mdia(e){return Y_.box(Y_.types.mdia,Y_.mdhd(e.timescale,e.duration),Y_.hdlr(e.type),Y_.minf(e))}static mfhd(e){return Y_.box(Y_.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))}static minf(e){return"audio"===e.type?Y_.box(Y_.types.minf,Y_.box(Y_.types.smhd,Y_.SMHD),Y_.DINF,Y_.stbl(e)):Y_.box(Y_.types.minf,Y_.box(Y_.types.vmhd,Y_.VMHD),Y_.DINF,Y_.stbl(e))}static moof(e,t,n){return Y_.box(Y_.types.moof,Y_.mfhd(e),Y_.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=Y_.trak(e[t]);return Y_.box.apply(null,[Y_.types.moov,Y_.mvhd(e[0].timescale,e[0].duration)].concat(n).concat(Y_.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=Y_.trex(e[t]);return Y_.box.apply(null,[Y_.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(X_+1)),i=Math.floor(t%(X_+1)),a=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24,n>>16&255,n>>8&255,255&n,i>>24,i>>16&255,i>>8&255,255&i,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return Y_.box(Y_.types.mvhd,a)}static sdtp(e){const t=e.samples||[],n=new Uint8Array(4+t.length);let i,a;for(i=0;i<t.length;i++)a=t[i].flags,n[i+4]=a.dependsOn<<4|a.isDependedOn<<2|a.hasRedundancy;return Y_.box(Y_.types.sdtp,n)}static stbl(e){return Y_.box(Y_.types.stbl,Y_.stsd(e),Y_.box(Y_.types.stts,Y_.STTS),Y_.box(Y_.types.stsc,Y_.STSC),Y_.box(Y_.types.stsz,Y_.STSZ),Y_.box(Y_.types.stco,Y_.STCO))}static avc1(e){let t,n,i,a=[],r=[];for(t=0;t<e.sps.length;t++)n=e.sps[t],i=n.byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(n));for(t=0;t<e.pps.length;t++)n=e.pps[t],i=n.byteLength,r.push(i>>>8&255),r.push(255&i),r=r.concat(Array.prototype.slice.call(n));const o=Y_.box(Y_.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|e.sps.length].concat(a).concat([e.pps.length]).concat(r))),s=e.width,l=e.height,d=e.pixelRatio[0],u=e.pixelRatio[1];return Y_.box(Y_.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,s>>8&255,255&s,l>>8&255,255&l,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,Y_.box(Y_.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Y_.box(Y_.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,u>>24,u>>16&255,u>>8&255,255&u])))}static esds(e){const t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}static audioStsd(e){const t=e.samplerate;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,255&t,0,0])}static mp4a(e){return Y_.box(Y_.types.mp4a,Y_.audioStsd(e),Y_.box(Y_.types.esds,Y_.esds(e)))}static mp3(e){return Y_.box(Y_.types[".mp3"],Y_.audioStsd(e))}static ac3(e){return Y_.box(Y_.types["ac-3"],Y_.audioStsd(e),Y_.box(Y_.types.dac3,e.config))}static stsd(e){return"audio"===e.type?"mp3"===e.segmentCodec&&"mp3"===e.codec?Y_.box(Y_.types.stsd,Y_.STSD,Y_.mp3(e)):"ac3"===e.segmentCodec?Y_.box(Y_.types.stsd,Y_.STSD,Y_.ac3(e)):Y_.box(Y_.types.stsd,Y_.STSD,Y_.mp4a(e)):Y_.box(Y_.types.stsd,Y_.STSD,Y_.avc1(e))}static tkhd(e){const t=e.id,n=e.duration*e.timescale,i=e.width,a=e.height,r=Math.floor(n/(X_+1)),o=Math.floor(n%(X_+1));return Y_.box(Y_.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,o>>24,o>>16&255,o>>8&255,255&o,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,255&i,0,0,a>>8&255,255&a,0,0]))}static traf(e,t){const n=Y_.sdtp(e),i=e.id,a=Math.floor(t/(X_+1)),r=Math.floor(t%(X_+1));return Y_.box(Y_.types.traf,Y_.box(Y_.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),Y_.box(Y_.types.tfdt,new Uint8Array([1,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,r>>24,r>>16&255,r>>8&255,255&r])),Y_.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,Y_.box(Y_.types.trak,Y_.tkhd(e),Y_.mdia(e))}static trex(e){const t=e.id;return Y_.box(Y_.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const n=e.samples||[],i=n.length,a=12+16*i,r=new Uint8Array(a);let o,s,l,d,u,c;for(t+=8+a,r.set(["video"===e.type?1:0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,255&i,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0),o=0;o<i;o++)s=n[o],l=s.duration,d=s.size,u=s.flags,c=s.cts,r.set([l>>>24&255,l>>>16&255,l>>>8&255,255&l,d>>>24&255,d>>>16&255,d>>>8&255,255&d,u.isLeading<<2|u.dependsOn,u.isDependedOn<<6|u.hasRedundancy<<4|u.paddingValue<<1|u.isNonSync,61440&u.degradPrio,15&u.degradPrio,c>>>24&255,c>>>16&255,c>>>8&255,255&c],12+16*o);return Y_.box(Y_.types.trun,r)}static initSegment(e){Y_.types||Y_.init();const t=Y_.moov(e);return kP(Y_.FTYP,t)}}Y_.types=void 0,Y_.HDLR_TYPES=void 0,Y_.STTS=void 0,Y_.STSC=void 0,Y_.STCO=void 0,Y_.STSZ=void 0,Y_.VMHD=void 0,Y_.SMHD=void 0,Y_.STSD=void 0,Y_.FTYP=void 0,Y_.DINF=void 0;const V_=9e4;function K_(e,t,n=1,i=!1){const a=e*t*n;return i?Math.round(a):a}function q_(e,t=!1){return K_(e,1e3,1/V_,t)}let J_,Q_=null,Z_=null;class eC{constructor(e,t,n,i=""){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.ISGenerated=!1,null===Q_){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Q_=e?parseInt(e[1]):0}if(null===Z_){const e=navigator.userAgent.match(/Safari\/(\d+)/i);Z_=e?parseInt(e[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){rT.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){rT.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){rT.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const n=e.reduce(((e,n)=>{const i=n.pts-e;return i<-4294967296?(t=!0,tC(e,n.pts)):i>0?e:n.pts}),e[0].pts);return t&&rT.debug("PTS rollover detected"),n}remux(e,t,n,i,a,r,o,s){let l,d,u,c,h,m,f=a,p=a;const g=e.pid>-1,v=t.pid>-1,y=t.samples.length,w=e.samples.length>0,b=o&&y>0||y>1;if((!g||w)&&(!v||b)||this.ISGenerated||o){if(this.ISGenerated){var k,S,M,E;const e=this.videoTrackConfig;!e||t.width===e.width&&t.height===e.height&&(null==(k=t.pixelRatio)?void 0:k[0])===(null==(S=e.pixelRatio)?void 0:S[0])&&(null==(M=t.pixelRatio)?void 0:M[1])===(null==(E=e.pixelRatio)?void 0:E[1])||this.resetInitSegment()}else u=this.generateIS(e,t,a,r);const n=this.isVideoContiguous;let i,o=-1;if(b&&(o=function(e){for(let t=0;t<e.length;t++)if(e[t].key)return t;return-1}(t.samples),!n&&this.config.forceKeyFrameOnDiscontinuity))if(m=!0,o>0){rT.warn(`[mp4-remuxer]: Dropped ${o} out of ${y} video samples due to a missing keyframe`);const e=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(o),t.dropped+=o,p+=(t.samples[0].pts-e)/t.inputTimeScale,i=p}else-1===o&&(rT.warn(`[mp4-remuxer]: No keyframe found out of ${y} video samples`),m=!1);if(this.ISGenerated){if(w&&b){const n=this.getVideoStartPts(t.samples),i=(tC(e.samples[0].pts,n)-n)/t.inputTimeScale;f+=Math.max(0,i),p+=Math.max(0,-i)}if(w){if(e.samplerate||(rT.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),u=this.generateIS(e,t,a,r)),d=this.remuxAudio(e,f,this.isAudioContiguous,r,v||b||s===cA?p:void 0),b){const i=d?d.endPTS-d.startPTS:0;t.inputTimeScale||(rT.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),u=this.generateIS(e,t,a,r)),l=this.remuxVideo(t,p,n,i)}}else b&&(l=this.remuxVideo(t,p,n,0));l&&(l.firstKeyFrame=o,l.independent=-1!==o,l.firstKeyFramePTS=i)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(h=nC(n,a,this._initPTS,this._initDTS)),i.samples.length&&(c=iC(i,a,this._initPTS))),{audio:d,video:l,initSegment:u,independent:m,text:c,id3:h}}generateIS(e,t,n,i){const a=e.samples,r=t.samples,o=this.typeSupported,s={},l=this._initPTS;let d,u,c,h=!l||i,m="audio/mp4";if(h&&(d=u=1/0),e.config&&a.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":o.mpeg?(m="audio/mpeg",e.codec=""):o.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3"}s.audio={id:"audio",container:m,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&o.mpeg?new Uint8Array(0):Y_.initSegment([e]),metadata:{channelCount:e.channelCount}},h&&(c=e.inputTimeScale,l&&c===l.timescale?h=!1:d=u=a[0].pts-Math.round(c*n))}if(t.sps&&t.pps&&r.length){if(t.timescale=t.inputTimeScale,s.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Y_.initSegment([t]),metadata:{width:t.width,height:t.height}},h)if(c=t.inputTimeScale,l&&c===l.timescale)h=!1;else{const e=this.getVideoStartPts(r),t=Math.round(c*n);u=Math.min(u,tC(r[0].dts,e)-t),d=Math.min(d,e-t)}this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(s).length)return this.ISGenerated=!0,h?(this._initPTS={baseTime:d,timescale:c},this._initDTS={baseTime:u,timescale:c}):d=c=void 0,{tracks:s,initPTS:d,timescale:c}}remuxVideo(e,t,n,i){const a=e.inputTimeScale,r=e.samples,o=[],s=r.length,l=this._initPTS;let d,u,c=this.nextAvcDts,h=8,m=this.videoSampleDuration,f=Number.POSITIVE_INFINITY,p=Number.NEGATIVE_INFINITY,g=!1;if(!n||null===c){const e=t*a,i=r[0].pts-tC(r[0].dts,r[0].pts);Q_&&null!==c&&Math.abs(e-i-c)<15e3?n=!0:c=e-i}const v=l.baseTime*a/l.timescale;for(let e=0;e<s;e++){const t=r[e];t.pts=tC(t.pts-v,c),t.dts=tC(t.dts-v,c),t.dts<r[e>0?e-1:e].dts&&(g=!0)}g&&r.sort((function(e,t){const n=e.dts-t.dts,i=e.pts-t.pts;return n||i})),d=r[0].dts,u=r[r.length-1].dts;const y=u-d,w=y?Math.round(y/(s-1)):m||e.inputTimeScale/30;if(n){const e=d-c,n=e>w,i=e<-1;if((n||i)&&(n?rT.warn(`AVC: ${q_(e,!0)} ms (${e}dts) hole between fragments detected at ${t.toFixed(3)}`):rT.warn(`AVC: ${q_(-e,!0)} ms (${e}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!i||c>=r[0].pts||Q_)){d=c;const t=r[0].pts-e;if(n)r[0].dts=d,r[0].pts=t;else for(let n=0;n<r.length&&!(r[n].dts>t);n++)r[n].dts-=e,r[n].pts-=e;rT.log(`Video: Initial PTS/DTS adjusted: ${q_(t,!0)}/${q_(d,!0)}, delta: ${q_(e,!0)} ms`)}}d=Math.max(0,d);let b=0,k=0,S=d;for(let e=0;e<s;e++){const t=r[e],n=t.units,i=n.length;let a=0;for(let e=0;e<i;e++)a+=n[e].data.length;k+=a,b+=i,t.length=a,t.dts<S?(t.dts=S,S+=w/4|0||1):S=t.dts,f=Math.min(t.pts,f),p=Math.max(t.pts,p)}u=r[s-1].dts;const M=k+4*b+8;let E;try{E=new Uint8Array(M)}catch(e){return void this.observer.emit(QE.ERROR,QE.ERROR,{type:ZE.MUX_ERROR,details:eT.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:M,reason:`fail allocating video mdat ${M}`})}const T=new DataView(E.buffer);T.setUint32(0,M),E.set(Y_.types.mdat,4);let P=!1,A=Number.POSITIVE_INFINITY,x=Number.POSITIVE_INFINITY,_=Number.NEGATIVE_INFINITY,C=Number.NEGATIVE_INFINITY;for(let e=0;e<s;e++){const t=r[e],n=t.units;let l,d=0;for(let e=0,t=n.length;e<t;e++){const t=n[e],i=t.data,a=t.data.byteLength;T.setUint32(h,a),h+=4,E.set(i,h),h+=a,d+=4+a}if(e<s-1)m=r[e+1].dts-t.dts,l=r[e+1].pts-t.pts;else{const n=this.config,o=e>0?t.dts-r[e-1].dts:w;if(l=e>0?t.pts-r[e-1].pts:w,n.stretchShortVideoTrack&&null!==this.nextAudioPts){const e=Math.floor(n.maxBufferHole*a),r=(i?f+i*a:this.nextAudioPts)-t.pts;r>e?(m=r-o,m<0?m=o:P=!0,rT.log(`[mp4-remuxer]: It is approximately ${r/90} ms to the next segment; using duration ${m/90} ms for the last video frame.`)):m=o}else m=o}const u=Math.round(t.pts-t.dts);A=Math.min(A,m),_=Math.max(_,m),x=Math.min(x,l),C=Math.max(C,l),o.push(new aC(t.key,m,d,u))}if(o.length)if(Q_){if(Q_<70){const e=o[0].flags;e.dependsOn=2,e.isNonSync=0}}else if(Z_&&C-x<_-A&&w/_<.025&&0===o[0].cts){rT.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let e=d;for(let t=0,n=o.length;t<n;t++){const i=e+o[t].duration,a=e+o[t].cts;if(t<n-1){const e=i+o[t+1].cts;o[t].duration=e-a}else o[t].duration=t?o[t-1].duration:w;o[t].cts=0,e=i}}m=P||!m?w:m,this.nextAvcDts=c=u+m,this.videoSampleDuration=m,this.isVideoContiguous=!0;const L={data1:Y_.moof(e.sequenceNumber++,d,VE({},e,{samples:o})),data2:E,startPTS:f/a,endPTS:(p+m)/a,startDTS:d/a,endDTS:c/a,type:"video",hasAudio:!1,hasVideo:!0,nb:o.length,dropped:e.dropped};return e.samples=[],e.dropped=0,L}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return 1152;case"ac3":return 1536;default:return 1024}}remuxAudio(e,t,n,i,a){const r=e.inputTimeScale,o=r/(e.samplerate?e.samplerate:r),s=this.getSamplesPerFrame(e),l=s*o,d=this._initPTS,u="mp3"===e.segmentCodec&&this.typeSupported.mpeg,c=[],h=void 0!==a;let m=e.samples,f=u?0:8,p=this.nextAudioPts||-1;const g=t*r,v=d.baseTime*r/d.timescale;if(this.isAudioContiguous=n=n||m.length&&p>0&&(i&&Math.abs(g-p)<9e3||Math.abs(tC(m[0].pts-v,g)-p)<20*l),m.forEach((function(e){e.pts=tC(e.pts-v,g)})),!n||p<0){if(m=m.filter((e=>e.pts>=0)),!m.length)return;p=0===a?0:i&&!h?Math.max(0,g):m[0].pts}if("aac"===e.segmentCodec){const t=this.config.maxAudioFramesDrift;for(let n=0,i=p;n<m.length;n++){const a=m[n],o=a.pts,s=o-i,d=Math.abs(1e3*s/r);if(s<=-t*l&&h)0===n&&(rT.warn(`Audio frame @ ${(o/r).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*s/r)} ms.`),this.nextAudioPts=p=i=o);else if(s>=t*l&&d<1e4&&h){let t=Math.round(s/l);i=o-t*l,i<0&&(t--,i+=l),0===n&&(this.nextAudioPts=p=i),rT.warn(`[mp4-remuxer]: Injecting ${t} audio frame @ ${(i/r).toFixed(3)}s due to ${Math.round(1e3*s/r)} ms gap.`);for(let r=0;r<t;r++){const t=Math.max(i,0);let r=G_.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);r||(rT.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),r=a.unit.subarray()),m.splice(n,0,{unit:r,pts:t}),i+=l,n++}}a.pts=i,i+=l}}let y,w=null,b=null,k=0,S=m.length;for(;S--;)k+=m[S].unit.byteLength;for(let t=0,i=m.length;t<i;t++){const i=m[t],a=i.unit;let r=i.pts;if(null!==b){c[t-1].duration=Math.round((r-b)/o)}else{if(n&&"aac"===e.segmentCodec&&(r=p),w=r,!(k>0))return;k+=f;try{y=new Uint8Array(k)}catch(e){return void this.observer.emit(QE.ERROR,QE.ERROR,{type:ZE.MUX_ERROR,details:eT.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:k,reason:`fail allocating audio mdat ${k}`})}if(!u){new DataView(y.buffer).setUint32(0,k),y.set(Y_.types.mdat,4)}}y.set(a,f);const l=a.byteLength;f+=l,c.push(new aC(!0,s,l,0)),b=r}const M=c.length;if(!M)return;const E=c[c.length-1];this.nextAudioPts=p=b+o*E.duration;const T=u?new Uint8Array(0):Y_.moof(e.sequenceNumber++,w/o,VE({},e,{samples:c}));e.samples=[];const P=w/r,A=p/r,x={data1:T,data2:y,startPTS:P,endPTS:A,startDTS:P,endDTS:A,type:"audio",hasAudio:!0,hasVideo:!1,nb:M};return this.isAudioContiguous=!0,x}remuxEmptyAudio(e,t,n,i){const a=e.inputTimeScale,r=a/(e.samplerate?e.samplerate:a),o=this.nextAudioPts,s=this._initDTS,l=9e4*s.baseTime/s.timescale,d=(null!==o?o:i.startDTS*a)+l,u=i.endDTS*a+l,c=1024*r,h=Math.ceil((u-d)/c),m=G_.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(rT.warn("[mp4-remuxer]: remux empty Audio"),!m)return void rT.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");const f=[];for(let e=0;e<h;e++){const t=d+e*c;f.push({unit:m,pts:t,dts:t})}return e.samples=f,this.remuxAudio(e,t,n,!1)}}function tC(e,t){let n;if(null===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;return e}function nC(e,t,n,i){const a=e.samples.length;if(!a)return;const r=e.inputTimeScale;for(let o=0;o<a;o++){const a=e.samples[o];a.pts=tC(a.pts-n.baseTime*r/n.timescale,t*r)/r,a.dts=tC(a.dts-i.baseTime*r/i.timescale,t*r)/r}const o=e.samples;return e.samples=[],{samples:o}}function iC(e,t,n){const i=e.samples.length;if(!i)return;const a=e.inputTimeScale;for(let r=0;r<i;r++){const i=e.samples[r];i.pts=tC(i.pts-n.baseTime*a/n.timescale,t*a)/a}e.samples.sort(((e,t)=>e.pts-t.pts));const r=e.samples;return e.samples=[],{samples:r}}class aC{constructor(e,t,n,i){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=n,this.cts=i,this.flags={isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:e?2:1,isNonSync:e?0:1}}}function rC(e,t){const n=null==e?void 0:e.codec;if(n&&n.length>4)return n;if(t===hT){if("ec-3"===n||"ac-3"===n||"alac"===n)return n;if("fLaC"===n||"Opus"===n){return GP(n,!1)}const e="mp4a.40.5";return rT.info(`Parsed audio codec "${n}" or audio object type not handled. Using "${e}"`),e}return rT.warn(`Unhandled video codec "${n}"`),"hvc1"===n||"hev1"===n?"hvc1.1.6.L120.90":"av01"===n?"av01.0.04M.08":"avc1.42e01e"}try{J_=self.performance.now.bind(self.performance)}catch(Tr){rT.debug("Unable to use Performance API on this environment"),J_=null==ST?void 0:ST.Date.now}const oC=[{demux:class{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,n,i){const a=this.videoTrack=l_("video",1),r=this.audioTrack=l_("audio",1),o=this.txtTrack=l_("text",1);if(this.id3Track=l_("id3",1),this.timeOffset=0,null==e||!e.byteLength)return;const s=fP(e);if(s.video){const{id:e,timescale:t,codec:n}=s.video;a.id=e,a.timescale=o.timescale=t,a.codec=n}if(s.audio){const{id:e,timescale:t,codec:n}=s.audio;r.id=e,r.timescale=t,r.codec=n}o.id=rP.text,a.sampleDuration=0,a.duration=r.duration=i}resetContiguity(){this.remainderData=null}static probe(e){return function(e){const t=e.byteLength;for(let n=0;n<t;){const i=lP(e,n);if(i>8&&109===e[n+4]&&111===e[n+5]&&111===e[n+6]&&102===e[n+7])return!0;n=i>1?n+i:t}return!1}(e)}demux(e,t){this.timeOffset=t;let n=e;const i=this.videoTrack,a=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=kP(this.remainderData,e));const t=function(e){const t={valid:null,remainder:null},n=hP(e,["moof"]);if(n.length<2)return t.remainder=e,t;const i=n[n.length-1];return t.valid=FT(e,0,i.byteOffset-8),t.remainder=FT(e,i.byteOffset-8),t}(n);this.remainderData=t.remainder,i.samples=t.valid||new Uint8Array}else i.samples=n;const r=this.extractID3Track(i,t);return a.samples=SP(t,i),{videoTrack:i,audioTrack:this.audioTrack,id3Track:r,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const i=this.extractID3Track(t,this.timeOffset);return n.samples=SP(e,t),{videoTrack:t,audioTrack:l_(),id3Track:i,textTrack:l_()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const i=hP(e.samples,["emsg"]);i&&i.forEach((e=>{const i=function(e){const t=e[0];let n="",i="",a=0,r=0,o=0,s=0,l=0,d=0;if(0===t){for(;"\0"!==oP(e.subarray(d,d+1));)n+=oP(e.subarray(d,d+1)),d+=1;for(n+=oP(e.subarray(d,d+1)),d+=1;"\0"!==oP(e.subarray(d,d+1));)i+=oP(e.subarray(d,d+1)),d+=1;i+=oP(e.subarray(d,d+1)),d+=1,a=lP(e,12),r=lP(e,16),s=lP(e,20),l=lP(e,24),d=28}else if(1===t){d+=4,a=lP(e,d),d+=4;const t=lP(e,d);d+=4;const r=lP(e,d);for(d+=4,o=2**32*t+r,qE(o)||(o=Number.MAX_SAFE_INTEGER,rT.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),s=lP(e,d),d+=4,l=lP(e,d),d+=4;"\0"!==oP(e.subarray(d,d+1));)n+=oP(e.subarray(d,d+1)),d+=1;for(n+=oP(e.subarray(d,d+1)),d+=1;"\0"!==oP(e.subarray(d,d+1));)i+=oP(e.subarray(d,d+1)),d+=1;i+=oP(e.subarray(d,d+1)),d+=1}return{schemeIdUri:n,value:i,timeScale:a,presentationTime:o,presentationTimeDelta:r,eventDuration:s,id:l,payload:e.subarray(d,e.byteLength)}}(e);if(__.test(i.schemeIdUri)){const e=KE(i.presentationTime)?i.presentationTime/i.timeScale:t+i.presentationTimeDelta/i.timeScale;let a=4294967295===i.eventDuration?Number.POSITIVE_INFINITY:i.eventDuration/i.timeScale;a<=.001&&(a=Number.POSITIVE_INFINITY);const r=i.payload;n.samples.push({data:r,len:r.byteLength,dts:e,pts:e,type:MA,duration:a})}}))}return n}demuxSampleAes(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}},remux:class{constructor(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,n,i){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(function(e,t){if(!e||!t)return e;const n=t.keyId;n&&t.isCommonEncryption&&hP(e,["moov","trak"]).forEach((e=>{const t=hP(e,["mdia","minf","stbl","stsd"])[0].subarray(8);let i=hP(t,["enca"]);const a=i.length>0;a||(i=hP(t,["encv"])),i.forEach((e=>{hP(a?e.subarray(28):e.subarray(78),["sinf"]).forEach((e=>{const t=wP(e);if(t){const e=t.subarray(8,24);e.some((e=>0!==e))||(rT.log(`[eme] Patching keyId in 'enc${a?"a":"v"}>sinf>>tenc' box: ${nP.hexDump(e)} -> ${nP.hexDump(n)}`),t.set(n,8))}}))}))}));return e}(e,i)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:n}=this;if(null==e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);const i=this.initData=fP(e);i.audio&&(t=rC(i.audio,hT)),i.video&&(n=rC(i.video,mT));const a={};i.audio&&i.video?a.audiovideo={container:"video/mp4",codec:t+","+n,initSegment:e,id:"main"}:i.audio?a.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:i.video?a.video={container:"video/mp4",codec:n,initSegment:e,id:"main"}:rT.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a}remux(e,t,n,i,a,r){var o,s;let{initPTS:l,lastEndTime:d}=this;const u={audio:void 0,video:void 0,text:i,id3:n,initSegment:void 0};KE(d)||(d=this.lastEndTime=a||0);const c=t.samples;if(null==c||!c.length)return u;const h={initPTS:void 0,timescale:1};let m=this.initData;if(null!=(o=m)&&o.length||(this.generateInitSegment(c),m=this.initData),null==(s=m)||!s.length)return rT.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),u;this.emitInitSegment&&(h.tracks=this.initTracks,this.emitInitSegment=!1);const f=function(e,t){let n=0,i=0,a=0;const r=hP(e,["moof","traf"]);for(let e=0;e<r.length;e++){const o=r[e],s=hP(o,["tfhd"])[0],l=t[lP(s,4)];if(!l)continue;const d=l.default,u=lP(s,0)|(null==d?void 0:d.flags);let c=null==d?void 0:d.duration;8&u&&(c=lP(s,2&u?12:8));const h=l.timescale||9e4,m=hP(o,["trun"]);for(let e=0;e<m.length;e++)n=bP(m[e]),!n&&c&&(n=c*lP(m[e],4)),l.type===mT?i+=n/h:l.type===hT&&(a+=n/h)}if(0===i&&0===a){let t=1/0,n=0,i=0;const a=hP(e,["sidx"]);for(let e=0;e<a.length;e++){const r=mP(a[e]);if(null!=r&&r.references){t=Math.min(t,r.earliestPresentationTime/r.timescale);const e=r.references.reduce(((e,t)=>e+t.info.duration||0),0);n=Math.max(n,e+r.earliestPresentationTime/r.timescale),i=n-t}}if(i&&KE(i))return i}return i||a}(c,m),p=function(e,t){return hP(t,["moof","traf"]).reduce(((t,n)=>{const i=hP(n,["tfdt"])[0],a=i[0],r=hP(n,["tfhd"]).reduce(((t,n)=>{const r=lP(n,4),o=e[r];if(o){let e=lP(i,4);if(1===a){if(e===iP)return rT.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),t;e*=iP+1,e+=lP(i,8)}const n=e/(o.timescale||9e4);if(KE(n)&&(null===t||n<t))return n}return t}),null);return null!==r&&KE(r)&&(null===t||r<t)?r:t}),null)}(m,c),g=null===p?a:p;(function(e,t,n,i){if(null===e)return!0;const a=Math.max(i,1),r=t-e.baseTime/e.timescale;return Math.abs(r-n)>a}(l,g,a,f)||h.timescale!==l.timescale&&r)&&(h.initPTS=g-a,l&&1===l.timescale&&rT.warn("Adjusting initPTS by "+(h.initPTS-l.baseTime)),this.initPTS=l={baseTime:h.initPTS,timescale:1});const v=e?g-l.baseTime/l.timescale:d,y=v+f;!function(e,t,n){hP(t,["moof","traf"]).forEach((t=>{hP(t,["tfhd"]).forEach((i=>{const a=lP(i,4),r=e[a];if(!r)return;const o=r.timescale||9e4;hP(t,["tfdt"]).forEach((e=>{const t=e[0],i=n*o;if(i){let n=lP(e,4);if(0===t)n-=i,n=Math.max(n,0),cP(e,4,n);else{n*=Math.pow(2,32),n+=lP(e,8),n-=i,n=Math.max(n,0);const t=Math.floor(n/(iP+1)),a=Math.floor(n%(iP+1));cP(e,4,t),cP(e,8,a)}}}))}))}))}(m,c,l.baseTime/l.timescale),f>0?this.lastEndTime=y:(rT.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const w=!!m.audio,b=!!m.video;let k="";w&&(k+="audio"),b&&(k+="video");const S={data1:c,startPTS:v,startDTS:v,endPTS:y,endDTS:y,type:k,hasAudio:w,hasVideo:b,nb:1,dropped:0};return u.audio="audio"===S.type?S:void 0,u.video="audio"!==S.type?S:void 0,u.initSegment=h,u.id3=nC(n,a,l,l),i.samples.length&&(u.text=iC(i,a,l)),u}}},{demux:F_,remux:eC},{demux:class extends d_{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,n,i){super.resetInitSegment(e,t,n,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:i,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=$T(e,0);let n=(null==t?void 0:t.length)||0;if(x_(e,n))return!1;for(let t=e.length;n<t;n++)if(p_(e,n))return rT.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return function(e,t){return function(e,t){return t+5<e.length}(e,t)&&c_(e,t)&&m_(e,t)<=e.length-t}(e,t)}appendFrame(e,t,n){g_(e,this.observer,t,n,e.manifestCodec);const i=y_(e,t,n,this.basePTS,this.frameIndex);if(i&&0===i.missing)return i}},remux:eC},{demux:class extends d_{resetInitSegment(e,t,n,i){super.resetInitSegment(e,t,n,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:i,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=$T(e,0);let n=(null==t?void 0:t.length)||0;if(t&&11===e[n]&&119===e[n+1]&&void 0!==BT(t)&&C_(e,n)<=16)return!1;for(let t=e.length;n<t;n++)if(x_(e,n))return rT.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return function(e,t){return P_(e,t)&&4<=e.length-t}(e,t)}appendFrame(e,t,n){if(null!==this.basePTS)return E_(e,t,n,this.basePTS,this.frameIndex)}},remux:eC}];oC.splice(2,0,{demux:L_,remux:eC});class sC{constructor(e,t,n,i,a){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.vendor=i,this.id=a}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,n,i){const a=n.transmuxing;a.executeStart=J_();let r=new Uint8Array(e);const{currentTransmuxState:o,transmuxConfig:s}=this;i&&(this.currentTransmuxState=i);const{contiguous:l,discontinuity:d,trackSwitch:u,accurateTimeOffset:c,timeOffset:h,initSegmentChange:m}=i||o,{audioCodec:f,videoCodec:p,defaultInitPts:g,duration:v,initSegmentData:y}=s,w=function(e,t){let n=null;e.byteLength>0&&null!=(null==t?void 0:t.key)&&null!==t.iv&&null!=t.method&&(n=t);return n}(r,t);if(w&&"AES-128"===w.method){const e=this.getDecrypter();if(!e.isSync())return this.decryptionPromise=e.webCryptoDecrypt(r,w.key.buffer,w.iv.buffer).then((e=>{const t=this.push(e,null,n);return this.decryptionPromise=null,t})),this.decryptionPromise;{let t=e.softwareDecrypt(r,w.key.buffer,w.iv.buffer);if(n.part>-1&&(t=e.flush()),!t)return a.executeEnd=J_(),lC(n);r=new Uint8Array(t)}}const b=this.needsProbing(d,u);if(b){const e=this.configureTransmuxer(r);if(e)return rT.warn(`[transmuxer] ${e.message}`),this.observer.emit(QE.ERROR,QE.ERROR,{type:ZE.MEDIA_ERROR,details:eT.FRAG_PARSING_ERROR,fatal:!1,error:e,reason:e.message}),a.executeEnd=J_(),lC(n)}(d||u||m||b)&&this.resetInitSegment(y,f,p,v,t),(d||m||b)&&this.resetInitialTimestamp(g),l||this.resetContiguity();const k=this.transmux(r,w,h,c,n),S=this.currentTransmuxState;return S.contiguous=!0,S.discontinuity=!1,S.trackSwitch=!1,a.executeEnd=J_(),k}flush(e){const t=e.transmuxing;t.executeStart=J_();const{decrypter:n,currentTransmuxState:i,decryptionPromise:a}=this;if(a)return a.then((()=>this.flush(e)));const r=[],{timeOffset:o}=i;if(n){const t=n.flush();t&&r.push(this.push(t,null,e))}const{demuxer:s,remuxer:l}=this;if(!s||!l)return t.executeEnd=J_(),[lC(e)];const d=s.flush(o);return dC(d)?d.then((t=>(this.flushRemux(r,t,e),r))):(this.flushRemux(r,d,e),r)}flushRemux(e,t,n){const{audioTrack:i,videoTrack:a,id3Track:r,textTrack:o}=t,{accurateTimeOffset:s,timeOffset:l}=this.currentTransmuxState;rT.log(`[transmuxer.ts]: Flushed fragment ${n.sn}${n.part>-1?" p: "+n.part:""} of level ${n.level}`);const d=this.remuxer.remux(i,a,r,o,l,s,!0,this.id);e.push({remuxResult:d,chunkMeta:n}),n.transmuxing.executeEnd=J_()}resetInitialTimestamp(e){const{demuxer:t,remuxer:n}=this;t&&n&&(t.resetTimeStamp(e),n.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,n,i,a){const{demuxer:r,remuxer:o}=this;r&&o&&(r.resetInitSegment(e,t,n,i),o.resetInitSegment(e,t,n,a))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,n,i,a){let r;return r=t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,n,i,a):this.transmuxUnencrypted(e,n,i,a),r}transmuxUnencrypted(e,t,n,i){const{audioTrack:a,videoTrack:r,id3Track:o,textTrack:s}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(a,r,o,s,t,n,!1,this.id),chunkMeta:i}}transmuxSampleAes(e,t,n,i,a){return this.demuxer.demuxSampleAes(e,t,n).then((e=>({remuxResult:this.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,n,i,!1,this.id),chunkMeta:a})))}configureTransmuxer(e){const{config:t,observer:n,typeSupported:i,vendor:a}=this;let r;for(let t=0,n=oC.length;t<n;t++){var o;if(null!=(o=oC[t].demux)&&o.probe(e)){r=oC[t];break}}if(!r)return new Error("Failed to find demuxer by probing fragment data");const s=this.demuxer,l=this.remuxer,d=r.remux,u=r.demux;l&&l instanceof d||(this.remuxer=new d(n,t,i,a)),s&&s instanceof u||(this.demuxer=new u(n,t,i),this.probe=u.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new Xx(this.config)),e}}const lC=e=>({remuxResult:{},chunkMeta:e});function dC(e){return"then"in e&&e.then instanceof Function}class uC{constructor(e,t,n,i,a){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=i,this.defaultInitPts=a||null}}class cC{constructor(e,t,n,i,a,r){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=i,this.timeOffset=a,this.initSegmentChange=r}}var hC={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function i(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function r(e,t,i,r,o){if("function"!=typeof i)throw new TypeError("The listener must be a function");var s=new a(i,r||e,o),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,i,a=[];if(0===this._eventsCount)return a;for(i in e=this._events)t.call(e,i)&&a.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},s.prototype.listeners=function(e){var t=n?n+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var a=0,r=i.length,o=new Array(r);a<r;a++)o[a]=i[a].fn;return o},s.prototype.listenerCount=function(e){var t=n?n+e:e,i=this._events[t];return i?i.fn?1:i.length:0},s.prototype.emit=function(e,t,i,a,r,o){var s=n?n+e:e;if(!this._events[s])return!1;var l,d,u=this._events[s],c=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,i),!0;case 4:return u.fn.call(u.context,t,i,a),!0;case 5:return u.fn.call(u.context,t,i,a,r),!0;case 6:return u.fn.call(u.context,t,i,a,r,o),!0}for(d=1,l=new Array(c-1);d<c;d++)l[d-1]=arguments[d];u.fn.apply(u.context,l)}else{var h,m=u.length;for(d=0;d<m;d++)switch(u[d].once&&this.removeListener(e,u[d].fn,void 0,!0),c){case 1:u[d].fn.call(u[d].context);break;case 2:u[d].fn.call(u[d].context,t);break;case 3:u[d].fn.call(u[d].context,t,i);break;case 4:u[d].fn.call(u[d].context,t,i,a);break;default:if(!l)for(h=1,l=new Array(c-1);h<c;h++)l[h-1]=arguments[h];u[d].fn.apply(u[d].context,l)}}return!0},s.prototype.on=function(e,t,n){return r(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return r(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,i,a){var r=n?n+e:e;if(!this._events[r])return this;if(!t)return o(this,r),this;var s=this._events[r];if(s.fn)s.fn!==t||a&&!s.once||i&&s.context!==i||o(this,r);else{for(var l=0,d=[],u=s.length;l<u;l++)(s[l].fn!==t||a&&!s[l].once||i&&s[l].context!==i)&&d.push(s[l]);d.length?this._events[r]=1===d.length?d[0]:d:o(this,r)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(hC);var mC=NE(hC.exports);class fC{constructor(e,t,n,i){this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;const a=e.config;this.hls=e,this.id=t,this.useWorker=!!a.enableWorker,this.onTransmuxComplete=n,this.onFlush=i;const r=(e,t)=>{(t=t||{}).frag=this.frag,t.id=this.id,e===QE.ERROR&&(this.error=t.error),this.hls.trigger(e,t)};this.observer=new mC,this.observer.on(QE.FRAG_DECRYPTED,r),this.observer.on(QE.ERROR,r);const o=NP(a.preferManagedMediaSource)||{isTypeSupported:()=>!1},s={mpeg:o.isTypeSupported("audio/mpeg"),mp3:o.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:o.isTypeSupported('audio/mp4; codecs="ac-3"')};if(this.useWorker&&"undefined"!=typeof Worker){if(a.workerPath||"function"==typeof __HLS_WORKER_BUNDLE__){try{a.workerPath?(rT.log(`loading Web Worker ${a.workerPath} for "${t}"`),this.workerContext=function(e){const t=new self.URL(e,self.location.href).href;return{worker:new self.Worker(t),scriptURL:t}}(a.workerPath)):(rT.log(`injecting Web Worker for "${t}"`),this.workerContext=function(){const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e);return{worker:new self.Worker(t),objectURL:t}}()),this.onwmsg=e=>this.onWorkerMessage(e);const{worker:e}=this.workerContext;e.addEventListener("message",this.onwmsg),e.onerror=e=>{const n=new Error(`${e.message} (${e.filename}:${e.lineno})`);a.enableWorker=!1,rT.warn(`Error in "${t}" Web Worker, fallback to inline`),this.hls.trigger(QE.ERROR,{type:ZE.OTHER_ERROR,details:eT.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:n})},e.postMessage({cmd:"init",typeSupported:s,vendor:"",id:t,config:JSON.stringify(a)})}catch(e){rT.warn(`Error setting up "${t}" Web Worker, fallback to inline`,e),this.resetWorker(),this.error=null,this.transmuxer=new sC(this.observer,s,a,"",t)}return}}this.transmuxer=new sC(this.observer,s,a,"",t)}resetWorker(){if(this.workerContext){const{worker:e,objectURL:t}=this.workerContext;t&&self.URL.revokeObjectURL(t),e.removeEventListener("message",this.onwmsg),e.onerror=null,e.terminate(),this.workerContext=null}}destroy(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{const e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null}push(e,t,n,i,a,r,o,s,l,d){var u,c;l.transmuxing.start=self.performance.now();const{transmuxer:h}=this,m=r?r.start:a.start,f=a.decryptdata,p=this.frag,g=!(p&&a.cc===p.cc),v=!(p&&l.level===p.level),y=p?l.sn-p.sn:-1,w=this.part?l.part-this.part.index:-1,b=0===y&&l.id>1&&l.id===(null==p?void 0:p.stats.chunkCount),k=!v&&(1===y||0===y&&(1===w||b&&w<=0)),S=self.performance.now();(v||y||0===a.stats.parsing.start)&&(a.stats.parsing.start=S),!r||!w&&k||(r.stats.parsing.start=S);const M=!(p&&(null==(u=a.initSegment)?void 0:u.url)===(null==(c=p.initSegment)?void 0:c.url)),E=new cC(g,k,s,v,m,M);if(!k||g||M){rT.log(`[transmuxer-interface, ${a.type}]: Starting new transmux session for sn: ${l.sn} p: ${l.part} level: ${l.level} id: ${l.id}\n discontinuity: ${g}\n trackSwitch: ${v}\n contiguous: ${k}\n accurateTimeOffset: ${s}\n timeOffset: ${m}\n initSegmentChange: ${M}`);const e=new uC(n,i,t,o,d);this.configureTransmuxer(e)}if(this.frag=a,this.part=r,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:f,chunkMeta:l,state:E},e instanceof ArrayBuffer?[e]:[]);else if(h){const t=h.push(e,f,l,E);dC(t)?(h.async=!0,t.then((e=>{this.handleTransmuxComplete(e)})).catch((e=>{this.transmuxerError(e,l,"transmuxer-interface push error")}))):(h.async=!1,this.handleTransmuxComplete(t))}}flush(e){e.transmuxing.start=self.performance.now();const{transmuxer:t}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(t){let n=t.flush(e);dC(n)||t.async?(dC(n)||(n=Promise.resolve(n)),n.then((t=>{this.handleFlushResult(t,e)})).catch((t=>{this.transmuxerError(t,e,"transmuxer-interface flush error")}))):this.handleFlushResult(n,e)}}transmuxerError(e,t,n){this.hls&&(this.error=e,this.hls.trigger(QE.ERROR,{type:ZE.MEDIA_ERROR,details:eT.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,fatal:!1,error:e,err:e,reason:n}))}handleFlushResult(e,t){e.forEach((e=>{this.handleTransmuxComplete(e)})),this.onFlush(t)}onWorkerMessage(e){const t=e.data;if(null==t||!t.event)return void rT.warn("worker message received with no "+(t?"event name":"data"));const n=this.hls;if(this.hls)switch(t.event){case"init":{var i;const e=null==(i=this.workerContext)?void 0:i.objectURL;e&&self.URL.revokeObjectURL(e);break}case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;case"workerLog":rT[t.data.logType]&&rT[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}}configureTransmuxer(e){const{transmuxer:t}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}function pC(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!gC(e[n].attrs,t[n].attrs))return!1;return!0}function gC(e,t,n){const i=e["STABLE-RENDITION-ID"];return i&&!n?i===t["STABLE-RENDITION-ID"]:!(n||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some((n=>e[n]!==t[n]))}function vC(e,t){return t.label.toLowerCase()===e.name.toLowerCase()&&(!t.language||t.language.toLowerCase()===(e.lang||"").toLowerCase())}class yC{constructor(e){this.buffered=void 0;const t=(t,n,i)=>{if((n>>>=0)>i-1)throw new DOMException(`Failed to execute '${t}' on 'TimeRanges': The index provided (${n}) is greater than the maximum bound (${i})`);return e[n][t]};this.buffered={get length(){return e.length},end:n=>t("end",n,e.length),start:n=>t("start",n,e.length)}}}class wC{constructor(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}append(e,t,n){const i=this.queues[t];i.push(e),1!==i.length||n||this.executeNext(t)}insertAbort(e,t){this.queues[t].unshift(e),this.executeNext(t)}appendBlocker(e){let t;const n=new Promise((e=>{t=e})),i={execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(i,e),n}executeNext(e){const t=this.queues[e];if(t.length){const n=t[0];try{n.execute()}catch(t){rT.warn(`[buffer-operation-queue]: Exception executing "${e}" SourceBuffer operation: ${t}`),n.onError(t);const i=this.buffers[e];null!=i&&i.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues[e].shift(),this.executeNext(e)}current(e){return this.queues[e][0]}}const bC=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/;function kC(e){const t=e.querySelectorAll("source");[].slice.call(t).forEach((t=>{e.removeChild(t)}))}const SC={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},MC=e=>String.fromCharCode(SC[e]||e),EC=15,TC=100,PC={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},AC={17:2,18:4,21:6,22:8,23:10,19:13,20:15},xC={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},_C={25:2,26:4,29:6,30:8,31:10,27:13,28:15},CC=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class LC{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n="function"==typeof t?t():t;rT.log(`${this.time} [${e}] ${n}`)}}}const IC=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].toString(16));return t};class DC{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let n=0;n<t.length;n++){const i=t[n];e.hasOwnProperty(i)&&(this[i]=e[i])}}isDefault(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class RC{constructor(){this.uchar=" ",this.penState=new DC}reset(){this.uchar=" ",this.penState.reset()}setChar(e,t){this.uchar=e,this.penState.copy(t)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return" "===this.uchar&&this.penState.isDefault()}}class WC{constructor(e){this.chars=[],this.pos=0,this.currPenState=new DC,this.cueStartTime=null,this.logger=void 0;for(let e=0;e<TC;e++)this.chars.push(new RC);this.logger=e}equals(e){for(let t=0;t<TC;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<TC;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<TC;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>TC&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=TC)}moveCursor(e){const t=this.pos+e;if(e>1)for(let e=this.pos+1;e<t+1;e++)this.chars[e].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=MC(e);this.pos>=TC?this.logger.log(0,(()=>"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!")):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))}clearFromPos(e){let t;for(t=e;t<TC;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let n=0;n<TC;n++){const i=this.chars[n].uchar;" "!==i&&(t=!1),e.push(i)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e);this.chars[this.pos].setPenState(this.currPenState)}}class NC{constructor(e){this.rows=[],this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<EC;t++)this.rows.push(new WC(e));this.logger=e}reset(){for(let e=0;e<EC;e++)this.rows[e].clear();this.currRow=14}equals(e){let t=!0;for(let n=0;n<EC;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<EC;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<EC;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e);this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,(()=>"pacData = "+JSON.stringify(e)));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let e=0;e<EC;e++)this.rows[e].clear();const e=this.currRow+1-this.nrRollUpRows,n=this.lastOutputScreen;if(n){const i=n.rows[e].cueStartTime,a=this.logger.time;if(null!==i&&null!==a&&i<a)for(let i=0;i<this.nrRollUpRows;i++)this.rows[t-this.nrRollUpRows+i+1].copy(n.rows[e+i])}}this.currRow=t;const n=this.rows[this.currRow];if(null!==e.indent){const t=e.indent,i=Math.max(t-1,0);n.setCursor(e.indent),e.color=n.chars[i].penState.foreground}const i={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(i)}setBkgData(e){this.logger.log(2,(()=>"bkgData = "+JSON.stringify(e))),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(null===this.nrRollUpRows)return void this.logger.log(3,"roll_up but nrRollUpRows not set yet");this.logger.log(1,(()=>this.getDisplayText()));const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let n="",i=-1;for(let n=0;n<EC;n++){const a=this.rows[n].getTextString();a&&(i=n+1,e?t.push("Row "+i+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n}getTextAndFormat(){return this.rows}}class OC{constructor(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new NC(n),this.nonDisplayedMemory=new NC(n),this.lastOutputScreen=new NC(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,(()=>"MODE="+e)),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,(()=>t+": "+this.writeScreen.getDisplayText(!0))),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(1,(()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0))),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,(()=>"DISP: "+this.displayedMemory.getDisplayText()))}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{const n=Math.floor(e/2)-16,i=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=i[n]}this.logger.log(2,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class FC{constructor(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory={a:null,b:null},this.logger=void 0;const i=this.logger=new LC;this.channels=[null,new OC(e,t,i),new OC(e+1,n,i)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let e=0;e<t.length;e+=2){const n=127&t[e],i=127&t[e+1];let a=!1,r=null;if(0===n&&0===i)continue;this.logger.log(3,(()=>"["+IC([t[e],t[e+1]])+"] -> ("+IC([n,i])+")"));const o=this.cmdHistory;if(n>=16&&n<=31){if(zC(n,i,o)){jC(null,null,o),this.logger.log(3,(()=>"Repeated command ("+IC([n,i])+") is dropped"));continue}jC(n,i,this.cmdHistory),a=this.parseCmd(n,i),a||(a=this.parseMidrow(n,i)),a||(a=this.parsePAC(n,i)),a||(a=this.parseBackgroundAttributes(n,i))}else jC(null,null,o);if(!a&&(r=this.parseChars(n,i),r)){const e=this.currentChannel;if(e&&e>0){this.channels[e].insertChars(r)}else this.logger.log(2,"No channel found yet. TEXT-MODE?")}a||r||this.logger.log(2,(()=>"Couldn't parse cleaned data "+IC([n,i])+" orig: "+IC([t[e],t[e+1]])))}}parseCmd(e,t){if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=33&&t<=35))return!1;const n=20===e||21===e||23===e?1:2,i=this.channels[n];return 20===e||21===e||28===e||29===e?32===t?i.ccRCL():33===t?i.ccBS():34===t?i.ccAOF():35===t?i.ccAON():36===t?i.ccDER():37===t?i.ccRU(2):38===t?i.ccRU(3):39===t?i.ccRU(4):40===t?i.ccFON():41===t?i.ccRDC():42===t?i.ccTR():43===t?i.ccRTD():44===t?i.ccEDM():45===t?i.ccCR():46===t?i.ccENM():47===t&&i.ccEOC():i.ccTO(t-32),this.currentChannel=n,!0}parseMidrow(e,t){let n=0;if((17===e||25===e)&&t>=32&&t<=47){if(n=17===e?1:2,n!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const i=this.channels[n];return!!i&&(i.ccMIDROW(t),this.logger.log(3,(()=>"MIDROW ("+IC([e,t])+")")),!0)}return!1}parsePAC(e,t){let n;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127)&&!((16===e||24===e)&&t>=64&&t<=95))return!1;const i=e<=23?1:2;n=t>=64&&t<=95?1===i?PC[e]:xC[e]:1===i?AC[e]:_C[e];const a=this.channels[i];return!!a&&(a.setPAC(this.interpretPAC(n,t)),this.currentChannel=i,!0)}interpretPAC(e,t){let n;const i={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,i.underline=!(1&~n),n<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((n-16)/2),i}parseChars(e,t){let n,i=null,a=null;if(e>=25?(n=2,a=e-8):(n=1,a=e),a>=17&&a<=19){let e;e=17===a?t+80:18===a?t+112:t+144,this.logger.log(2,(()=>"Special char '"+MC(e)+"' in channel "+n)),i=[e]}else e>=32&&e<=127&&(i=0===t?[e]:[e,t]);return i&&this.logger.log(3,(()=>"Char codes = "+IC(i).join(","))),i}parseBackgroundAttributes(e,t){if(!((16===e||24===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=45&&t<=47))return!1;let n;const i={};16===e||24===e?(n=Math.floor((t-32)/2),i.background=CC[n],t%2==1&&(i.background=i.background+"_semi")):45===t?i.background="transparent":(i.foreground="black",47===t&&(i.underline=!0));const a=e<=23?1:2;return this.channels[a].setBkgData(i),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}jC(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const n=this.channels[t];n&&n.cueSplitAtTime(e)}}}function jC(e,t,n){n.a=e,n.b=t}function zC(e,t,n){return n.a===e&&n.b===t}class $C{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,n){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}var UC=function(){if(null!=ST&&ST.VTTCue)return self.VTTCue;const e=["","lr","rl"],t=["start","middle","end","left","right"];function n(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;const n=t.toLowerCase();return!!~e.indexOf(n)&&n}function i(e){return n(t,e)}function a(e,...t){let n=1;for(;n<arguments.length;n++){const t=arguments[n];for(const n in t)e[n]=t[n]}return e}function r(t,r,o){const s=this,l={enumerable:!0};s.hasBeenReset=!1;let d="",u=!1,c=t,h=r,m=o,f=null,p="",g=!0,v="auto",y="start",w=50,b="middle",k=50,S="middle";Object.defineProperty(s,"id",a({},l,{get:function(){return d},set:function(e){d=""+e}})),Object.defineProperty(s,"pauseOnExit",a({},l,{get:function(){return u},set:function(e){u=!!e}})),Object.defineProperty(s,"startTime",a({},l,{get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");c=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",a({},l,{get:function(){return h},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");h=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",a({},l,{get:function(){return m},set:function(e){m=""+e,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",a({},l,{get:function(){return f},set:function(e){f=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",a({},l,{get:function(){return p},set:function(t){const i=function(t){return n(e,t)}(t);if(!1===i)throw new SyntaxError("An invalid or illegal string was specified.");p=i,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",a({},l,{get:function(){return g},set:function(e){g=!!e,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",a({},l,{get:function(){return v},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",a({},l,{get:function(){return y},set:function(e){const t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");y=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",a({},l,{get:function(){return w},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");w=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",a({},l,{get:function(){return b},set:function(e){const t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",a({},l,{get:function(){return k},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");k=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",a({},l,{get:function(){return S},set:function(e){const t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");S=t,this.hasBeenReset=!0}})),s.displayState=void 0}return r.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},r}();class HC{decode(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function BC(e){function t(e,t,n,i){return 3600*(0|e)+60*(0|t)+(0|n)+parseFloat(i||0)}const n=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?t(n[2],n[3],0,n[4]):t(n[1],n[2],n[3],n[4]):null}class GC{constructor(){this.values=Object.create(null)}set(e,t){this.get(e)||""===t||(this.values[e]=t)}get(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,n){for(let i=0;i<n.length;++i)if(t===n[i]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1}}function XC(e,t,n,i){const a=i?e.split(i):[e];for(const e in a){if("string"!=typeof a[e])continue;const i=a[e].split(n);if(2!==i.length)continue;t(i[0],i[1])}}const YC=new UC(0,0,""),VC="middle"===YC.align?"middle":"center";function KC(e,t,n){const i=e;function a(){const t=BC(e);if(null===t)throw new Error("Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function r(){e=e.replace(/^\s+/,"")}if(r(),t.startTime=a(),r(),"--\x3e"!==e.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.slice(3),r(),t.endTime=a(),r(),function(e,t){const i=new GC;XC(e,(function(e,t){let a;switch(e){case"region":for(let a=n.length-1;a>=0;a--)if(n[a].id===t){i.set(e,n[a].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":a=t.split(","),i.integer(e,a[0]),i.percent(e,a[0])&&i.set("snapToLines",!1),i.alt(e,a[0],["auto"]),2===a.length&&i.alt("lineAlign",a[1],["start",VC,"end"]);break;case"position":a=t.split(","),i.percent(e,a[0]),2===a.length&&i.alt("positionAlign",a[1],["start",VC,"end","line-left","line-right","auto"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start",VC,"end","left","right"])}}),/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");let a=i.get("line","auto");"auto"===a&&-1===YC.line&&(a=-1),t.line=a,t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100),t.align=i.get("align",VC);let r=i.get("position","auto");"auto"===r&&50===YC.position&&(r="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=r}(e,t)}function qC(e){return e.replace(/<br(?: \/)?>/gi,"\n")}class JC{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new HC,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;function n(){let e=t.buffer,n=0;for(e=qC(e);n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;const i=e.slice(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.slice(n),i}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{let e="";if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;e=n();const i=e.match(/^()?WEBVTT([ \t].*)?$/);if(null==i||!i[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let i=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(i?i=!1:e=n(),t.state){case"HEADER":/:/.test(e)?XC(e,(function(e,t){}),/:/):e||(t.state="ID");continue;case"NOTE":e||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(e)){t.state="NOTE";break}if(!e)continue;if(t.cue=new UC(0,0,""),t.state="CUE",-1===e.indexOf("--\x3e")){t.cue.id=e;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{KC(e,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const n=-1!==e.indexOf("--\x3e");if(!e||n&&(i=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(null===t.cue)continue;t.cue.text&&(t.cue.text+="\n"),t.cue.text+=e}continue;case"BADCUE":e||(t.state="ID")}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state||"BADWEBVTT"===e.state)throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const QC=/\r\n|\n\r|\n|\r/g,ZC=function(e,t,n=0){return e.slice(n,n+t.length)===t},eL=function(e){let t=5381,n=e.length;for(;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()};function tL(e,t,n){return eL(e.toString())+eL(t.toString())+eL(n)}function nL(e,t,n,i,a,r,o){const s=new JC,l=ZT(new Uint8Array(e)).trim().replace(QC,"\n").split("\n"),d=[],u=t?function(e,t=1){return K_(e,V_,1/t)}(t.baseTime,t.timescale):0;let c,h="00:00.000",m=0,f=0,p=!0;s.oncue=function(e){const r=n[i];let o=n.ccOffset;const s=(m-u)/9e4;if(null!=r&&r.new&&(void 0!==f?o=n.ccOffset=r.start:function(e,t,n){let i=e[t],a=e[i.prevCC];if(!a||!a.new&&i.new)return e.ccOffset=e.presentationOffset=i.start,void(i.new=!1);for(;null!=(r=a)&&r.new;){var r;e.ccOffset+=i.start-a.start,i.new=!1,i=a,a=e[i.prevCC]}e.presentationOffset=n}(n,i,s)),s){if(!t)return void(c=new Error("Missing initPTS for VTT MPEGTS"));o=s-n.presentationOffset}const l=e.endTime-e.startTime,h=tC(9e4*(e.startTime+o-f),9e4*a)/9e4;e.startTime=Math.max(h,0),e.endTime=Math.max(h+l,0);const p=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(p)),e.id||(e.id=tL(e.startTime,e.endTime,p)),e.endTime>0&&d.push(e)},s.onparsingerror=function(e){c=e},s.onflush=function(){c?o(c):r(d)},l.forEach((e=>{if(p){if(ZC(e,"X-TIMESTAMP-MAP=")){p=!1,e.slice(16).split(",").forEach((e=>{ZC(e,"LOCAL:")?h=e.slice(6):ZC(e,"MPEGTS:")&&(m=parseInt(e.slice(7)))}));try{f=function(e){let t=parseInt(e.slice(-3));const n=parseInt(e.slice(-6,-4)),i=parseInt(e.slice(-9,-7)),a=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!(KE(t)&&KE(n)&&KE(i)&&KE(a)))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=6e4*i,t+=36e5*a,t}(h)/1e3}catch(e){c=e}return}""===e&&(p=!1)}s.parse(e+"\n")})),s.flush()}const iL="stpp.ttml.im1t",aL=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,rL=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,oL={left:"start",center:"center",right:"end",start:"start",end:"end"};function sL(e,t,n,i){const a=hP(new Uint8Array(e),["mdat"]);if(0===a.length)return void i(new Error("Could not parse IMSC1 mdat"));const r=a.map((e=>ZT(e))),o=function(e,t,n=1,i=!1){return K_(e,t,1/n,i)}(t.baseTime,1,t.timescale);try{r.forEach((e=>n(function(e,t){const n=(new DOMParser).parseFromString(e,"text/xml"),i=n.getElementsByTagName("tt")[0];if(!i)throw new Error("Invalid ttml");const a={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},r=Object.keys(a).reduce(((e,t)=>(e[t]=i.getAttribute(`ttp:${t}`)||a[t],e)),{}),o="preserve"!==i.getAttribute("xml:space"),s=dL(lL(i,"styling","style")),l=dL(lL(i,"layout","region")),d=lL(i,"body","[begin]");return[].map.call(d,(e=>{const n=uL(e,o);if(!n||!e.hasAttribute("begin"))return null;const i=mL(e.getAttribute("begin"),r),a=mL(e.getAttribute("dur"),r);let d=mL(e.getAttribute("end"),r);if(null===i)throw hL(e);if(null===d){if(null===a)throw hL(e);d=i+a}const u=new UC(i-t,d-t,n);u.id=tL(u.startTime,u.endTime,u.text);const c=function(e,t,n){const i="http://www.w3.org/ns/ttml#styling";let a=null;const r=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],o=null!=e&&e.hasAttribute("style")?e.getAttribute("style"):null;o&&n.hasOwnProperty(o)&&(a=n[o]);return r.reduce(((n,r)=>{const o=cL(t,i,r)||cL(e,i,r)||cL(a,i,r);return o&&(n[r]=o),n}),{})}(l[e.getAttribute("region")],s[e.getAttribute("style")],s),{textAlign:h}=c;if(h){const e=oL[h];e&&(u.lineAlign=e),u.align=h}return VE(u,c),u})).filter((e=>null!==e))}(e,o))))}catch(e){i(e)}}function lL(e,t,n){const i=e.getElementsByTagName(t)[0];return i?[].slice.call(i.querySelectorAll(n)):[]}function dL(e){return e.reduce(((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e}),{})}function uL(e,t){return[].slice.call(e.childNodes).reduce(((e,n,i)=>{var a;return"br"===n.nodeName&&i?e+"\n":null!=(a=n.childNodes)&&a.length?uL(n,t):t?e+n.textContent.trim().replace(/\s+/g," "):e+n.textContent}),"")}function cL(e,t,n){return e&&e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function hL(e){return new Error(`Could not parse ttml timestamp ${e}`)}function mL(e,t){if(!e)return null;let n=BC(e);return null===n&&(aL.test(e)?n=function(e,t){const n=aL.exec(e),i=(0|n[4])+(0|n[5])/t.subFrameRate;return 3600*(0|n[1])+60*(0|n[2])+(0|n[3])+i/t.frameRate}(e,t):rL.test(e)&&(n=function(e,t){const n=rL.exec(e),i=Number(n[1]);switch(n[2]){case"h":return 3600*i;case"m":return 60*i;case"ms":return 1e3*i;case"f":return i/t.frameRate;case"t":return i/t.tickRate}return i}(e,t))),n}function fL(e){return e.characteristics&&/transcribes-spoken-dialog/gi.test(e.characteristics)&&/describes-music-and-sound/gi.test(e.characteristics)?"captions":"subtitles"}function pL(e,t){return!!e&&e.kind===fL(t)&&vC(t,e)}class gL{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(QE.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(QE.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(QE.MANIFEST_PARSED,this.onManifestParsed,this),e.on(QE.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(QE.BUFFER_CODECS,this.onBufferCodecs,this),e.on(QE.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(QE.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(QE.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(QE.MANIFEST_PARSED,this.onManifestParsed,this),e.off(QE.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(QE.BUFFER_CODECS,this.onBufferCodecs,this),e.off(QE.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&KE(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0)return void(this.clientRect=null);const e=this.hls.levels;if(e.length){const t=this.hls,n=this.getMaxLevel(e.length-1);n!==this.autoLevelCapping&&rT.log(`Setting autoLevelCapping to ${n}: ${e[n].height}p@${e[n].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=n,t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const n=t.filter(((t,n)=>this.isLevelAllowed(t)&&n<=e));return this.clientRect=null,gL.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,t.width||t.height||(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(e){}return e}isLevelAllowed(e){return!this.restrictedLevels.some((t=>e.bitrate===t.bitrate&&e.width===t.width&&e.height===t.height))}static getMaxLevelByMediaSize(e,t,n){if(null==e||!e.length)return-1;let i=e.length-1;const a=Math.max(t,n);for(let t=0;t<e.length;t+=1){const n=e[t];if((n.width>=a||n.height>=a)&&(r=n,!(o=e[t+1])||r.width!==o.width||r.height!==o.height)){i=t;break}}var r,o;return i}}const vL="[eme]";class yL{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=yL.CDMCleanupPromise?[yL.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=rT.debug.bind(rT,vL),this.log=rT.log.bind(rT,vL),this.warn=rT.warn.bind(rT,vL),this.error=rT.error.bind(rT,vL),this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.unregisterListeners(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null,this.config=null}registerListeners(){this.hls.on(QE.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(QE.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(QE.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(QE.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(QE.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(QE.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(QE.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(QE.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,i=t[e];if(i)return i.licenseUrl;if(e===MT.WIDEVINE&&n)return n;throw new Error(`no license server URL configured for key-system "${e}"`)}getServerCertificateUrl(e){const{drmSystems:t}=this.config,n=t[e];if(n)return n.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,n=(e,t,n)=>!!e&&n.indexOf(e)===t,i=t.map((e=>e.audioCodec)).filter(n),a=t.map((e=>e.videoCodec)).filter(n);return i.length+a.length===0&&a.push("avc1.42e01e"),new Promise(((t,n)=>{const r=e=>{const o=e.shift();this.getMediaKeysPromise(o,i,a).then((e=>t({keySystem:o,mediaKeys:e}))).catch((t=>{e.length?r(e):n(t instanceof wL?t:new wL({type:ZE.KEY_SYSTEM_ERROR,details:eT.KEY_SYSTEM_NO_ACCESS,error:t,fatal:!0},t.message))}))};r(e)}))}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if("function"!=typeof n){let e=`Configured requestMediaKeySystemAccess is not a function ${n}`;return null===NT&&"http:"===self.location.protocol&&(e=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(e))}return n(e,t)}getMediaKeysPromise(e,t,n){const i=function(e,t,n,i){let a;switch(e){case MT.FAIRPLAY:a=["cenc","sinf"];break;case MT.WIDEVINE:case MT.PLAYREADY:a=["cenc"];break;case MT.CLEARKEY:a=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${e}`)}return function(e,t,n,i){return[{initDataTypes:e,persistentState:i.persistentState||"optional",distinctiveIdentifier:i.distinctiveIdentifier||"optional",sessionTypes:i.sessionTypes||[i.sessionType||"temporary"],audioCapabilities:t.map((e=>({contentType:`audio/mp4; codecs="${e}"`,robustness:i.audioRobustness||"",encryptionScheme:i.audioEncryptionScheme||null}))),videoCapabilities:n.map((e=>({contentType:`video/mp4; codecs="${e}"`,robustness:i.videoRobustness||"",encryptionScheme:i.videoEncryptionScheme||null})))}]}(a,t,n,i)}(e,t,n,this.config.drmSystemOptions),a=this.keySystemAccessPromises[e];let r=null==a?void 0:a.keySystemAccess;if(!r){this.log(`Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(i)}`),r=this.requestMediaKeySystemAccess(e,i);const t=this.keySystemAccessPromises[e]={keySystemAccess:r};return r.catch((t=>{this.log(`Failed to obtain access to key-system "${e}": ${t}`)})),r.then((n=>{this.log(`Access for key-system "${n.keySystem}" obtained`);const i=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),t.mediaKeys=n.createMediaKeys().then((t=>(this.log(`Media-keys created for "${e}"`),i.then((n=>n?this.setMediaKeysServerCertificate(t,e,n):t))))),t.mediaKeys.catch((t=>{this.error(`Failed to create media-keys for "${e}"}: ${t}`)})),t.mediaKeys}))}return r.then((()=>a.mediaKeys))}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${nP.hexDump(e.keyId||[])}`);const i=n.createSession(),a={decryptdata:e,keySystem:t,mediaKeys:n,mediaKeysSession:i,keyStatus:"status-pending"};return this.mediaKeySessions.push(a),a}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const n=this.createMediaKeySessionContext(e),i=this.getKeyIdString(t),a="cenc";this.keyIdToKeySessionPromise[i]=this.generateRequestWithPreferredKeySession(n,a,t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(null===e.keyId)throw new Error("keyId is null");return nP.hexDump(e.keyId)}updateKeySession(e,t){var n;const i=e.mediaKeysSession;return this.log(`Updating key-session "${i.sessionId}" for keyID ${nP.hexDump((null==(n=e.decryptdata)?void 0:n.keyId)||[])}\n } (data length: ${t?t.byteLength:t})`),i.update(t)}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise(((t,n)=>{const i=WT(this.config),a=e.map(xT).filter((e=>!!e&&-1!==i.indexOf(e)));return this.getKeySystemSelectionPromise(a).then((({keySystem:e})=>{const i=RT(e);i?t(i):n(new Error(`Unable to find format for key-system "${e}"`))})).catch(n)}))}loadKey(e){const t=e.keyInfo.decryptdata,n=this.getKeyIdString(t),i=`(keyId: ${n} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${i}`);let a=this.keyIdToKeySessionPromise[n];return a||(a=this.keyIdToKeySessionPromise[n]=this.getKeySystemForKeyPromise(t).then((({keySystem:n,mediaKeys:a})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(n,a).then((()=>{this.throwIfDestroyed();const e=this.createMediaKeySessionContext({keySystem:n,mediaKeys:a,decryptdata:t});return this.generateRequestWithPreferredKeySession(e,"cenc",t.pssh,"playlist-key")}))))),a.catch((e=>this.handleError(e)))),a}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof wL?this.hls.trigger(QE.ERROR,e.data):this.hls.trigger(QE.ERROR,{type:ZE.KEY_SYSTEM_ERROR,details:eT.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){const t=xT(e.keyFormat),n=t?[t]:WT(this.config);return this.attemptKeySystemAccess(n)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=WT(this.config)),0===e.length)throw new wL({type:ZE.KEY_SYSTEM_ERROR,details:eT.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}_onMediaEncrypted(e){const{initDataType:t,initData:n}=e,i=`"${e.type}" event: init data type: "${t}"`;if(this.debug(i),null===n)return;let a,r;if("sinf"===t&&this.config.drmSystems[MT.FAIRPLAY]){const e=oP(new Uint8Array(n));try{const t=wT(JSON.parse(e).sinf),n=wP(new Uint8Array(t));if(!n)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");a=n.subarray(8,24),r=MT.FAIRPLAY}catch(e){return void this.warn(`${i} Failed to parse sinf: ${e}`)}}else{const e=function(e){const t=[];if(e instanceof ArrayBuffer){const n=e.byteLength;let i=0;for(;i+32<n;){const n=AP(new DataView(e,i));t.push(n),i+=n.size}}return t}(n),t=e.filter((e=>e.systemId===IT))[0];if(!t)return void(0===e.length||e.some((e=>!e.systemId))?this.warn(`${i} contains incomplete or invalid pssh data`):this.log(`ignoring ${i} for ${e.map((e=>DT(e.systemId))).join(",")} pssh data in favor of playlist keys`));if(r=DT(t.systemId),0===t.version&&t.data){const e=t.data.length-22;a=t.data.subarray(e,e+16)}}if(!r||!a)return;const o=nP.hexDump(a),{keyIdToKeySessionPromise:s,mediaKeySessions:l}=this;let d=s[o];for(let e=0;e<l.length;e++){const i=l[e],r=i.decryptdata;if(!r.keyId)continue;const u=nP.hexDump(r.keyId);if(o===u||-1!==r.uri.replace(/-/g,"").indexOf(o)){if(d=s[u],r.pssh)break;delete s[u],r.pssh=new Uint8Array(n),r.keyId=a,d=s[o]=d.then((()=>this.generateRequestWithPreferredKeySession(i,t,n,"encrypted-event-key-match")));break}}d||(d=s[o]=this.getKeySystemSelectionPromise([r]).then((({keySystem:e,mediaKeys:i})=>{var r;this.throwIfDestroyed();const s=new _P("ISO-23001-7",o,null!=(r=RT(e))?r:"");return s.pssh=new Uint8Array(n),s.keyId=a,this.attemptSetMediaKeys(e,i).then((()=>{this.throwIfDestroyed();const a=this.createMediaKeySessionContext({decryptdata:s,keySystem:e,mediaKeys:i});return this.generateRequestWithPreferredKeySession(a,t,n,"encrypted-event-no-match")}))}))),d.catch((e=>this.handleError(e)))}_onWaitingForKey(e){this.log(`"${e.type}" event`)}attemptSetMediaKeys(e,t){const n=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const i=Promise.all(n).then((()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)}));return this.setMediaKeysQueue.push(i),i.then((()=>{this.log(`Media-keys set for "${e}"`),n.push(i),this.setMediaKeysQueue=this.setMediaKeysQueue.filter((e=>-1===n.indexOf(e)))}))}generateRequestWithPreferredKeySession(e,t,n,i){var a,r;const o=null==(a=this.config.drmSystems)||null==(r=a[e.keySystem])?void 0:r.generateRequest;if(o)try{const i=o.call(this.hls,t,n,e);if(!i)throw new Error("Invalid response from configured generateRequest filter");t=i.initDataType,n=e.decryptdata.pssh=i.initData?new Uint8Array(i.initData):null}catch(e){var s;if(this.warn(e.message),null!=(s=this.hls)&&s.config.debug)throw e}if(null===n)return this.log(`Skipping key-session request for "${i}" (no initData)`),Promise.resolve(e);const l=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${i}": ${l} (init data type: ${t} length: ${n?n.byteLength:null})`);const d=new mC,u=e._onmessage=t=>{const n=e.mediaKeysSession;if(!n)return void d.emit("error",new Error("invalid state"));const{messageType:i,message:a}=t;this.log(`"${i}" message event for session "${n.sessionId}" message size: ${a.byteLength}`),"license-request"===i||"license-renewal"===i?this.renewLicense(e,a).catch((e=>{this.handleError(e),d.emit("error",e)})):"license-release"===i?e.keySystem===MT.FAIRPLAY&&(this.updateKeySession(e,kT("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${i}"`)},c=e._onkeystatuseschange=t=>{if(!e.mediaKeysSession)return void d.emit("error",new Error("invalid state"));this.onKeyStatusChange(e);const n=e.keyStatus;d.emit("keyStatus",n),"expired"===n&&(this.warn(`${e.keySystem} expired for key ${l}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",u),e.mediaKeysSession.addEventListener("keystatuseschange",c);const h=new Promise(((e,t)=>{d.on("error",t),d.on("keyStatus",(n=>{n.startsWith("usable")?e():"output-restricted"===n?t(new wL({type:ZE.KEY_SYSTEM_ERROR,details:eT.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):"internal-error"===n?t(new wL({type:ZE.KEY_SYSTEM_ERROR,details:eT.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${n}"`)):"expired"===n?t(new Error("key expired while generating request")):this.warn(`unhandled key status change "${n}"`)}))}));return e.mediaKeysSession.generateRequest(t,n).then((()=>{var t;this.log(`Request generated for key-session "${null==(t=e.mediaKeysSession)?void 0:t.sessionId}" keyId: ${l}`)})).catch((e=>{throw new wL({type:ZE.KEY_SYSTEM_ERROR,details:eT.KEY_SYSTEM_NO_SESSION,error:e,fatal:!1},`Error generating key-session request: ${e}`)})).then((()=>h)).catch((t=>{throw d.removeAllListeners(),this.removeSession(e),t})).then((()=>(d.removeAllListeners(),e)))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach(((t,n)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${nP.hexDump("buffer"in n?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n))} session keyId: ${nP.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t}))}fetchServerCertificate(e){const t=this.config,n=new(0,t.loader)(t),i=this.getServerCertificateUrl(e);return i?(this.log(`Fetching server certificate for "${e}"`),new Promise(((a,r)=>{const o={responseType:"arraybuffer",url:i},s=t.certLoadPolicy.default,l={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(e,t,n,i)=>{a(e.data)},onError:(t,n,a,s)=>{r(new wL({type:ZE.KEY_SYSTEM_ERROR,details:eT.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:a,response:GE({url:o.url,data:void 0},t)},`"${e}" certificate request failed (${i}). Status: ${t.code} (${t.text})`))},onTimeout:(t,n,a)=>{r(new wL({type:ZE.KEY_SYSTEM_ERROR,details:eT.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:a,response:{url:o.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(e,t,n)=>{r(new Error("aborted"))}};n.load(o,l,d)}))):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise(((i,a)=>{e.setServerCertificate(n).then((a=>{this.log(`setServerCertificate ${a?"success":"not supported by CDM"} (${null==n?void 0:n.byteLength}) on "${t}"`),i(e)})).catch((e=>{a(new wL({type:ZE.KEY_SYSTEM_ERROR,details:eT.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:e,fatal:!0},e.message))}))}))}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then((t=>this.updateKeySession(e,new Uint8Array(t)).catch((e=>{throw new wL({type:ZE.KEY_SYSTEM_ERROR,details:eT.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:e,fatal:!0},e.message)}))))}unpackPlayReadyKeyMessage(e,t){const n=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!n.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const i=(new DOMParser).parseFromString(n,"application/xml"),a=i.querySelectorAll("HttpHeader");if(a.length>0){let t;for(let n=0,i=a.length;n<i;n++){var r,o;t=a[n];const i=null==(r=t.querySelector("name"))?void 0:r.textContent,s=null==(o=t.querySelector("value"))?void 0:o.textContent;i&&s&&e.setRequestHeader(i,s)}}const s=i.querySelector("Challenge"),l=null==s?void 0:s.textContent;if(!l)throw new Error("Cannot find <Challenge> in key message");return kT(atob(l))}setupLicenseXHR(e,t,n,i){const a=this.config.licenseXhrSetup;return a?Promise.resolve().then((()=>{if(!n.decryptdata)throw new Error("Key removed");return a.call(this.hls,e,t,n,i)})).catch((r=>{if(!n.decryptdata)throw r;return e.open("POST",t,!0),a.call(this.hls,e,t,n,i)})).then((n=>{e.readyState||e.open("POST",t,!0);return{xhr:e,licenseChallenge:n||i}})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:i}))}requestLicense(e,t){const n=this.config.keyLoadPolicy.default;return new Promise(((i,a)=>{const r=this.getLicenseServerUrl(e.keySystem);this.log(`Sending license request to URL: ${r}`);const o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return a(new Error("invalid state"));if(4===o.readyState)if(200===o.status){this._requestLicenseFailureCount=0;let t=o.response;this.log(`License received ${t instanceof ArrayBuffer?t.byteLength:t}`);const n=this.config.licenseResponseCallback;if(n)try{t=n.call(this.hls,o,r,e)}catch(e){this.error(e)}i(t)}else{const s=n.errorRetry,l=s?s.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>l||o.status>=400&&o.status<500)a(new wL({type:ZE.KEY_SYSTEM_ERROR,details:eT.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:o,response:{url:r,data:void 0,code:o.status,text:o.statusText}},`License Request XHR failed (${r}). Status: ${o.status} (${o.statusText})`));else{const n=l-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${n} attempts left`),this.requestLicense(e,t).then(i,a)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,this.setupLicenseXHR(o,r,e,t).then((({xhr:t,licenseChallenge:n})=>{e.keySystem==MT.PLAYREADY&&(n=this.unpackPlayReadyKeyMessage(t,n)),t.send(n)}))}))}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,n.addEventListener("encrypted",this.onMediaEncrypted),n.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,t=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},_P.clearKeyUriToKeyIdMap();const n=t.length;yL.CDMCleanupPromise=Promise.all(t.map((e=>this.removeSession(e))).concat(null==e?void 0:e.setMediaKeys(null).catch((e=>{this.log(`Could not clear media keys: ${e}`)})))).then((()=>{n&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)})).catch((e=>{this.log(`Could not close sessions and clear media keys: ${e}`)}))}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(t&&this.config.emeEnabled&&!this.keyFormatPromise){const e=t.reduce(((e,t)=>(-1===e.indexOf(t.keyFormat)&&e.push(t.keyFormat),e)),[]);this.log(`Selecting key-system from session-keys ${e.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(e)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:n}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(e);return i>-1&&this.mediaKeySessions.splice(i,1),t.remove().catch((e=>{this.log(`Could not remove session: ${e}`)})).then((()=>t.close())).catch((e=>{this.log(`Could not close session: ${e}`)}))}}}yL.CDMCleanupPromise=void 0;class wL extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}var bL,kL,SL;!function(e){e.MANIFEST="m",e.AUDIO="a",e.VIDEO="v",e.MUXED="av",e.INIT="i",e.CAPTION="c",e.TIMED_TEXT="tt",e.KEY="k",e.OTHER="o"}(bL||(bL={})),function(e){e.DASH="d",e.HLS="h",e.SMOOTH="s",e.OTHER="o"}(kL||(kL={})),function(e){e.OBJECT="CMCD-Object",e.REQUEST="CMCD-Request",e.SESSION="CMCD-Session",e.STATUS="CMCD-Status"}(SL||(SL={}));const ML={[SL.OBJECT]:["br","d","ot","tb"],[SL.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[SL.SESSION]:["cid","pr","sf","sid","st","v"],[SL.STATUS]:["bs","rtp"]};class EL{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map((e=>e instanceof EL?e:new EL(e)))),this.value=e,this.params=t}}class TL{constructor(e){this.description=void 0,this.description=e}}const PL="Dict";function AL(e,t,n,i){return new Error(`failed to ${e} "${a=t,Array.isArray(a)?JSON.stringify(a):a instanceof Map?"Map{}":a instanceof Set?"Set{}":"object"==typeof a?JSON.stringify(a):String(a)}" as ${n}`,{cause:i});var a}const xL="Bare Item",_L="Boolean",CL="Byte Sequence",LL="Decimal",IL="Integer";const DL=/[\x00-\x1f\x7f]+/,RL="Token",WL="Key";function NL(e,t,n){return AL("serialize",e,t,n)}function OL(e){if(!1===ArrayBuffer.isView(e))throw NL(e,CL);return`:${t=e,btoa(String.fromCharCode(...t))}:`;var t}function FL(e){if(function(e){return e<-999999999999999||999999999999999<e}(e))throw NL(e,IL);return e.toString()}function jL(e,t){if(e<0)return-jL(-e,t);const n=Math.pow(10,t);if(Math.abs(e*n%1-.5)<Number.EPSILON){const t=Math.floor(e*n);return(t%2==0?t:t+1)/n}return Math.round(e*n)/n}function zL(e){const t=jL(e,3);if(Math.floor(Math.abs(t)).toString().length>12)throw NL(e,LL);const n=t.toString();return n.includes(".")?n:`${n}.0`}const $L="String";function UL(e){const t=(n=e).description||n.toString().slice(7,-1);var n;if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(t))throw NL(t,RL);return t}function HL(e){switch(typeof e){case"number":if(!KE(e))throw NL(e,xL);return Number.isInteger(e)?FL(e):zL(e);case"string":return function(e){if(DL.test(e))throw NL(e,$L);return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}(e);case"symbol":return UL(e);case"boolean":return function(e){if("boolean"!=typeof e)throw NL(e,_L);return e?"?1":"?0"}(e);case"object":if(e instanceof Date)return function(e){return`@${FL(e.getTime()/1e3)}`}(e);if(e instanceof Uint8Array)return OL(e);if(e instanceof TL)return UL(e);default:throw NL(e,xL)}}function BL(e){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(e))throw NL(e,WL);return e}function GL(e){return null==e?"":Object.entries(e).map((([e,t])=>!0===t?`;${BL(e)}`:`;${BL(e)}=${HL(t)}`)).join("")}function XL(e){return e instanceof EL?`${HL(e.value)}${GL(e.params)}`:HL(e)}function YL(e,t={whitespace:!0}){if("object"!=typeof e)throw NL(e,PL);const n=e instanceof Map?e.entries():Object.entries(e),i=null!=t&&t.whitespace?" ":"";return Array.from(n).map((([e,t])=>{t instanceof EL==!1&&(t=new EL(t));let n=BL(e);var i;return!0===t.value?n+=GL(t.params):(n+="=",Array.isArray(t.value)?n+=`(${(i=t).value.map(XL).join(" ")})${GL(i.params)}`:n+=XL(t)),n})).join(`,${i}`)}const VL=e=>"ot"===e||"sf"===e||"st"===e,KL=e=>"number"==typeof e?KE(e):null!=e&&""!==e&&!1!==e;const qL=e=>Math.round(e),JL=e=>100*qL(e/100),QL={br:qL,d:qL,bl:JL,dl:JL,mtp:JL,nor:(e,t)=>(null!=t&&t.baseUrl&&(e=function(e,t){const n=new URL(e),i=new URL(t);if(n.origin!==i.origin)return e;const a=n.pathname.split("/").slice(1),r=i.pathname.split("/").slice(1,-1);for(;a[0]===r[0];)a.shift(),r.shift();for(;r.length;)r.shift(),a.unshift("..");return a.join("/")}(e,t.baseUrl)),encodeURIComponent(e)),rtp:JL,tb:qL};function ZL(e,t={}){return e?function(e,t){return YL(e,t)}(function(e,t){const n={};if(null==e||"object"!=typeof e)return n;const i=Object.keys(e).sort(),a=VE({},QL,null==t?void 0:t.formatters),r=null==t?void 0:t.filter;return i.forEach((i=>{if(null!=r&&r(i))return;let o=e[i];const s=a[i];s&&(o=s(o,t)),"v"===i&&1===o||"pr"==i&&1===o||KL(o)&&(VL(i)&&"string"==typeof o&&(o=new TL(o)),n[i]=o)})),n}(e,t),VE({whitespace:!1},t)):""}function eI(e,t,n){return VE(e,function(e,t={}){if(!e)return{};const n=Object.entries(e),i=Object.entries(ML).concat(Object.entries((null==t?void 0:t.customHeaderMap)||{})),a=n.reduce(((e,t)=>{var n;const[a,r]=t,o=(null==(n=i.find((e=>e[1].includes(a))))?void 0:n[0])||SL.REQUEST;return null!=e[o]||(e[o]={}),e[o][a]=r,e}),{});return Object.entries(a).reduce(((e,[n,i])=>(e[n]=ZL(i,t),e)),{})}(t,n))}const tI="CMCD";const nI=/CMCD=[^&#]+/;function iI(e,t,n){const i=function(e,t={}){if(!e)return"";const n=ZL(e,t);return`${tI}=${encodeURIComponent(n)}`}(t,n);if(!i)return e;if(nI.test(e))return e.replace(nI,i);const a=e.includes("?")?"&":"?";return`${e}${a}${i}`}function aI(e,t,n,i){e&&Object.keys(t).forEach((a=>{const r=e.filter((e=>e.groupId===a)).map((e=>{const r=VE({},e);return r.details=void 0,r.attrs=new lT(r.attrs),r.url=r.attrs.URI=rI(e.url,e.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",n),r.groupId=r.attrs["GROUP-ID"]=t[a],r.attrs["PATHWAY-ID"]=i,r}));e.push(...r)}))}function rI(e,t,n,i){const{HOST:a,PARAMS:r,[n]:o}=i;let s;t&&(s=null==o?void 0:o[t],s&&(e=s));const l=new self.URL(e);return a&&!s&&(l.host=a),r&&Object.keys(r).sort().forEach((e=>{e&&l.searchParams.set(e,r[e])})),l.href}const oI=/^age:\s*[\d.]+\s*$/im;class sI{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new cT,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const n=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0,i.aborted=!1;const a=this.xhrSetup;a?Promise.resolve().then((()=>{if(this.loader===n&&!this.stats.aborted)return a(n,t.url)})).catch((e=>{if(this.loader===n&&!this.stats.aborted)return n.open("GET",t.url,!0),a(n,t.url)})).then((()=>{this.loader!==n||this.stats.aborted||this.openAndSendXhr(n,t,e)})).catch((e=>{this.callbacks.onError({code:n.status,text:e.message},t,n,i)})):this.openAndSendXhr(n,t,e)}openAndSendXhr(e,t,n){e.readyState||e.open("GET",t.url,!0);const i=t.headers,{maxTimeToFirstByteMs:a,maxLoadTimeMs:r}=n.loadPolicy;if(i)for(const t in i)e.setRequestHeader(t,i[t]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=a&&KE(a)?a:r,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:n}=this;if(!e||!t)return;const i=t.readyState,a=this.config;if(!n.aborted&&i>=2&&(0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),a.timeout!==a.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),a.timeout=a.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),4===i)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const i=t.status,r="text"!==t.responseType;if(i>=200&&i<300&&(r&&t.response||null!==t.responseText)){n.loading.end=Math.max(self.performance.now(),n.loading.first);const a=r?t.response:t.responseText,o="arraybuffer"===t.responseType?a.byteLength:a.length;if(n.loaded=n.total=o,n.bwEstimate=8e3*n.total/(n.loading.end-n.loading.first),!this.callbacks)return;const s=this.callbacks.onProgress;if(s&&s(n,e,a,t),!this.callbacks)return;const l={url:t.responseURL,data:a,code:i};this.callbacks.onSuccess(l,n,e,t)}else{const r=a.loadPolicy.errorRetry;JA(r,n.retry,!1,{url:e.url,data:void 0,code:i})?this.retry(r):(rT.error(`${i} while loading ${e.url}`),this.callbacks.onError({code:i,text:t.statusText},e,t,n))}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry;if(JA(e,this.stats.retry,!0))this.retry(e);else{var t;rT.warn(`timeout while loading ${null==(t=this.context)?void 0:t.url}`);const e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:n}=this;this.retryDelay=KA(e,n.retry),n.retry++,rT.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${null==t?void 0:t.url}, retrying ${n.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&oI.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}const lI=/(\d+)-(\d+)\/(\d+)/;class dI{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||uI,this.controller=new self.AbortController,this.stats=new cT}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,n){const i=this.stats;if(i.loading.start)throw new Error("Loader can only be used once.");i.loading.start=self.performance.now();const a=function(e,t){const n={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(VE({},e.headers))};e.rangeEnd&&n.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1));return n}(e,this.controller.signal),r=n.onProgress,o="arraybuffer"===e.responseType,s=o?"byteLength":"length",{maxTimeToFirstByteMs:l,maxLoadTimeMs:d}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,a),self.clearTimeout(this.requestTimeout),t.timeout=l&&KE(l)?l:d,this.requestTimeout=self.setTimeout((()=>{this.abortInternal(),n.onTimeout(i,e,this.response)}),t.timeout),self.fetch(this.request).then((a=>{this.response=this.loader=a;const s=Math.max(self.performance.now(),i.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=d,this.requestTimeout=self.setTimeout((()=>{this.abortInternal(),n.onTimeout(i,e,this.response)}),d-(s-i.loading.start)),!a.ok){const{status:e,statusText:t}=a;throw new cI(t||"fetch, bad network response",e,a)}return i.loading.first=s,i.total=function(e){const t=e.get("Content-Range");if(t){const e=function(e){const t=lI.exec(e);if(t)return parseInt(t[2])-parseInt(t[1])+1}(t);if(KE(e))return e}const n=e.get("Content-Length");if(n)return parseInt(n)}(a.headers)||i.total,r&&KE(t.highWaterMark)?this.loadProgressively(a,i,e,t.highWaterMark,r):o?a.arrayBuffer():"json"===e.responseType?a.json():a.text()})).then((a=>{const o=this.response;if(!o)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),i.loading.end=Math.max(self.performance.now(),i.loading.first);const l=a[s];l&&(i.loaded=i.total=l);const d={url:o.url,data:a,code:o.status};r&&!KE(t.highWaterMark)&&r(i,e,a,o),n.onSuccess(d,i,e,o)})).catch((t=>{if(self.clearTimeout(this.requestTimeout),i.aborted)return;const a=t&&t.code||0,r=t?t.message:null;n.onError({code:a,text:r},e,t?t.details:null,i)}))}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,n,i=0,a){const r=new s_,o=e.body.getReader(),s=()=>o.read().then((o=>{if(o.done)return r.dataLength&&a(t,n,r.flush(),e),Promise.resolve(new ArrayBuffer(0));const l=o.value,d=l.length;return t.loaded+=d,d<i||r.dataLength?(r.push(l),r.dataLength>=i&&a(t,n,r.flush(),e)):a(t,n,l,e),s()})).catch((()=>Promise.reject()));return s()}}function uI(e,t){return new self.Request(e.url,t)}class cI extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const hI=/\s/,mI={newCue(e,t,n,i){const a=[];let r,o,s,l,d;const u=self.VTTCue||self.TextTrackCue;for(let h=0;h<i.rows.length;h++)if(r=i.rows[h],s=!0,l=0,d="",!r.isEmpty()){var c;for(let e=0;e<r.chars.length;e++)hI.test(r.chars[e].uchar)&&s?l++:(d+=r.chars[e].uchar,s=!1);r.cueStartTime=t,t===n&&(n+=1e-4),l>=16?l--:l++;const i=qC(d.trim()),m=tL(t,n,i);null!=e&&null!=(c=e.cues)&&c.getCueById(m)||(o=new u(t,n,i),o.id=m,o.line=h+1,o.align="left",o.position=10+Math.min(80,10*Math.floor(8*l/32)),a.push(o))}return e&&a.length&&(a.sort(((e,t)=>"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line)),a.forEach((t=>vA(e,t)))),a}},fI=GE(GE({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:sI,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:class{constructor(e){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this._abandonRulesCheck=()=>{const{fragCurrent:e,partCurrent:t,hls:n}=this,{autoLevelEnabled:i,media:a}=n;if(!e||!a)return;const r=performance.now(),o=t?t.stats:e.stats,s=t?t.duration:e.duration,l=r-o.loading.start,d=n.minAutoLevel;if(o.aborted||o.loaded&&o.loaded===o.total||e.level<=d)return this.clearTimer(),void(this._nextAutoLevel=-1);if(!i||a.paused||!a.playbackRate||!a.readyState)return;const u=n.mainForwardBufferInfo;if(null===u)return;const c=this.bwEstimator.getEstimateTTFB(),h=Math.abs(a.playbackRate);if(l<=Math.max(c,s/(2*h)*1e3))return;const m=u.len/h,f=o.loading.first?o.loading.first-o.loading.start:-1,p=o.loaded&&f>-1,g=this.getBwEstimate(),v=n.levels,y=v[e.level],w=o.total||Math.max(o.loaded,Math.round(s*y.averageBitrate/8));let b=p?l-f:l;b<1&&p&&(b=Math.min(l,8*o.loaded/g));const k=p?1e3*o.loaded/b:0,S=k?(w-o.loaded)/k:8*w/g+c/1e3;if(S<=m)return;const M=k?8*k:g;let E,T=Number.POSITIVE_INFINITY;for(E=e.level-1;E>d;E--){const e=v[E].maxBitrate;if(T=this.getTimeToLoadFrag(c/1e3,M,s*e,!v[E].details),T<m)break}if(T>=S)return;if(T>10*s)return;n.nextLoadLevel=n.nextAutoLevel=E,p?this.bwEstimator.sample(l-Math.min(c,f),o.loaded):this.bwEstimator.sampleTTFB(l);const P=v[E].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>P&&this.resetEstimator(P),this.clearTimer(),rT.warn(`[abr] Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} is loading too slowly;\n Time to underbuffer: ${m.toFixed(3)} s\n Estimated load time for current fragment: ${S.toFixed(3)} s\n Estimated load time for down switch fragment: ${T.toFixed(3)} s\n TTFB estimate: ${0|f} ms\n Current BW estimate: ${KE(g)?0|g:"Unknown"} bps\n New BW estimate: ${0|this.getBwEstimate()} bps\n Switching to level ${E} @ ${0|P} bps`),n.trigger(QE.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:o})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(rT.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new cx(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.on(QE.FRAG_LOADING,this.onFragLoading,this),e.on(QE.FRAG_LOADED,this.onFragLoaded,this),e.on(QE.FRAG_BUFFERED,this.onFragBuffered,this),e.on(QE.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(QE.LEVEL_LOADED,this.onLevelLoaded,this),e.on(QE.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(QE.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(QE.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.off(QE.FRAG_LOADING,this.onFragLoading,this),e.off(QE.FRAG_LOADED,this.onFragLoaded,this),e.off(QE.FRAG_BUFFERED,this.onFragBuffered,this),e.off(QE.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(QE.LEVEL_LOADED,this.onLevelLoaded,this),e.off(QE.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(QE.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(QE.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const n=t.frag;if(!this.ignoreFragment(n)){var i;if(!n.bitrateTest)this.fragCurrent=n,this.partCurrent=null!=(i=t.part)?i:null;this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case eT.BUFFER_ADD_CODEC_ERROR:case eT.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case eT.FRAG_LOAD_TIMEOUT:{const e=t.frag,{fragCurrent:n,partCurrent:i}=this;if(e&&n&&e.sn===n.sn&&e.level===n.level){const t=performance.now(),n=i?i.stats:e.stats,a=t-n.loading.start,r=n.loading.first?n.loading.first-n.loading.start:-1;if(n.loaded&&r>-1){const e=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(a-Math.min(e,r),n.loaded)}else this.bwEstimator.sampleTTFB(a)}break}}}getTimeToLoadFrag(e,t,n,i){return e+n/t+(i?this.lastLevelLoadSec:0)}onLevelLoaded(e,t){const n=this.hls.config,{loading:i}=t.stats,a=i.end-i.start;KE(a)&&(this.lastLevelLoadSec=a/1e3),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)}onFragLoaded(e,{frag:t,part:n}){const i=n?n.stats:t.stats;if(t.type===uA&&this.bwEstimator.sampleTTFB(i.loading.first-i.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const e=n?n.duration:t.duration,a=this.hls.levels[t.level],r=(a.loaded?a.loaded.bytes:0)+i.loaded,o=(a.loaded?a.loaded.duration:0)+e;a.loaded={bytes:r,duration:o},a.realBitrate=Math.round(8*r/o)}if(t.bitrateTest){const e={stats:i,frag:t,part:n,id:t.type};this.onFragBuffered(QE.FRAG_BUFFERED,e),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:n,part:i}=t,a=null!=i&&i.stats.loaded?i.stats:n.stats;if(a.aborted)return;if(this.ignoreFragment(n))return;const r=a.parsing.end-a.loading.start-Math.min(a.loading.first-a.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(r,a.loaded),a.bwEstimate=this.getBwEstimate(),n.bitrateTest?this.bitrateTestDelay=r/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==uA||"initSegment"===e.sn}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,n=this.getBwEstimate(),i=this.hls.config.maxStarvationDelay,a=this.findBestLevel(n,t,e,0,i,1,1);if(a>-1)return a;const r=this.hls.firstLevel,o=Math.min(Math.max(r,t),e);return rT.warn(`[abr] Could not find best starting auto level. Defaulting to first in playlist ${r} clamped to ${o}`),o}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,t=this.bwEstimator.canEstimate(),n=this.lastLoadedFragLevel>-1;if(!(-1===e||t&&n&&this.nextAutoLevelKey!==this.getAutoLevelKey()))return e;const i=t&&n?this.getNextABRAutoLevel():this.firstAutoLevel;if(-1!==e){const t=this.hls.levels;if(t.length>Math.max(e,i)&&t[e].loadError<=t[i].loadError)return e}return this._nextAutoLevel=i,this.nextAutoLevelKey=this.getAutoLevelKey(),i}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:n}=this,{maxAutoLevel:i,config:a,minAutoLevel:r}=n,o=t?t.duration:e?e.duration:0,s=this.getBwEstimate(),l=this.getStarvationDelay();let d=a.abrBandWidthFactor,u=a.abrBandWidthUpFactor;if(l){const e=this.findBestLevel(s,r,i,l,0,d,u);if(e>=0)return e}let c=o?Math.min(o,a.maxStarvationDelay):a.maxStarvationDelay;if(!l){const e=this.bitrateTestDelay;if(e){c=(o?Math.min(o,a.maxLoadingDelay):a.maxLoadingDelay)-e,rT.info(`[abr] bitrate test took ${Math.round(1e3*e)}ms, set first fragment max fetchDuration to ${Math.round(1e3*c)} ms`),d=u=1}}const h=this.findBestLevel(s,r,i,l,c,d,u);if(rT.info(`[abr] ${l?"rebuffering expected":"buffer is empty"}, optimal quality level ${h}`),h>-1)return h;const m=n.levels[r],f=n.levels[n.loadLevel];return(null==m?void 0:m.bitrate)<(null==f?void 0:f.bitrate)?r:n.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const n=t&&0!==t.playbackRate?Math.abs(t.playbackRate):1,i=e.mainForwardBufferInfo;return(i?i.len:0)/n}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,n,i,a,r,o){var s;const l=i+a,d=this.lastLoadedFragLevel,u=-1===d?this.hls.firstLevel:d,{fragCurrent:c,partCurrent:h}=this,{levels:m,allAudioTracks:f,loadLevel:p,config:g}=this.hls;if(1===m.length)return 0;const v=m[u],y=!(null==v||null==(s=v.details)||!s.live),w=-1===p||-1===d;let b,k="SDR",S=(null==v?void 0:v.frameRate)||0;const{audioPreference:M,videoPreference:E}=g,T=this.audioTracksByGroup||(this.audioTracksByGroup=function(e){return e.reduce(((e,t)=>{let n=e.groups[t.groupId];n||(n=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),n.tracks.push(t);const i=t.channels||"2";return n.channels[i]=(n.channels[i]||0)+1,n.hasDefault=n.hasDefault||t.default,n.hasAutoSelect=n.hasAutoSelect||t.autoselect,n.hasDefault&&(e.hasDefaultAudio=!0),n.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e}),{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}(f));if(w){if(-1!==this.firstSelection)return this.firstSelection;const i=this.codecTiers||(this.codecTiers=function(e,t,n,i){return e.slice(n,i+1).reduce(((e,n)=>{if(!n.codecSet)return e;const i=n.audioGroups;let a=e[n.codecSet];a||(e[n.codecSet]=a={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!i,fragmentError:0}),a.minBitrate=Math.min(a.minBitrate,n.bitrate);const r=Math.min(n.height,n.width);return a.minHeight=Math.min(a.minHeight,r),a.minFramerate=Math.min(a.minFramerate,n.frameRate),a.maxScore=Math.max(a.maxScore,n.score),a.fragmentError+=n.fragmentError,a.videoRanges[n.videoRange]=(a.videoRanges[n.videoRange]||0)+1,i&&i.forEach((e=>{if(!e)return;const n=t.groups[e];n&&(a.hasDefaultAudio=a.hasDefaultAudio||t.hasDefaultAudio?n.hasDefault:n.hasAutoSelect||!t.hasDefaultAudio&&!t.hasAutoSelectAudio,Object.keys(n.channels).forEach((e=>{a.channels[e]=(a.channels[e]||0)+n.channels[e]})))})),e}),{})}(m,T,t,n)),a=function(e,t,n,i,a){const r=Object.keys(e),o=null==i?void 0:i.channels,s=null==i?void 0:i.audioCodec,l=o&&2===parseInt(o);let d=!0,u=!1,c=1/0,h=1/0,m=1/0,f=0,p=[];const{preferHDR:g,allowedVideoRanges:v}=gx(t,a);for(let t=r.length;t--;){const n=e[r[t]];d=n.channels[2]>0,c=Math.min(c,n.minHeight),h=Math.min(h,n.minFramerate),m=Math.min(m,n.minBitrate);const i=v.filter((e=>n.videoRanges[e]>0));i.length>0&&(u=!0,p=i)}c=KE(c)?c:0,h=KE(h)?h:0;const y=Math.max(1080,c),w=Math.max(30,h);return m=KE(m)?m:n,n=Math.max(m,n),u||(t=void 0,p=[]),{codecSet:r.reduce(((t,i)=>{const a=e[i];if(i===t)return t;if(a.minBitrate>n)return vx(i,`min bitrate of ${a.minBitrate} > current estimate of ${n}`),t;if(!a.hasDefaultAudio)return vx(i,"no renditions with default or auto-select sound found"),t;if(s&&i.indexOf(s.substring(0,4))%5!=0)return vx(i,`audio codec preference "${s}" not found`),t;if(o&&!l){if(!a.channels[o])return vx(i,`no renditions with ${o} channel sound found (channels options: ${Object.keys(a.channels)})`),t}else if((!s||l)&&d&&0===a.channels[2])return vx(i,"no renditions with stereo sound found"),t;return a.minHeight>y?(vx(i,`min resolution of ${a.minHeight} > maximum of ${y}`),t):a.minFramerate>w?(vx(i,`min framerate of ${a.minFramerate} > maximum of ${w}`),t):p.some((e=>a.videoRanges[e]>0))?a.maxScore<f?(vx(i,`max score of ${a.maxScore} < selected max of ${f}`),t):t&&(UP(i)>=UP(t)||a.fragmentError>e[t].fragmentError)?t:(f=a.maxScore,i):(vx(i,`no variants with VIDEO-RANGE of ${JSON.stringify(p)} found`),t)}),void 0),videoRanges:p,preferHDR:g,minFramerate:h,minBitrate:m}}(i,k,e,M,E),{codecSet:r,videoRanges:o,minFramerate:s,minBitrate:l,preferHDR:d}=a;b=r,k=d?o[o.length-1]:o[0],S=s,e=Math.max(e,l),rT.log(`[abr] picked start tier ${JSON.stringify(a)}`)}else b=null==v?void 0:v.codecSet,k=null==v?void 0:v.videoRange;const P=h?h.duration:c?c.duration:0,A=this.bwEstimator.getEstimateTTFB()/1e3,x=[];for(let s=n;s>=t;s--){var _;const t=m[s],c=s>u;if(!t)continue;if(g.useMediaCapabilities&&!t.supportedResult&&!t.supportedPromise){const n=navigator.mediaCapabilities;"function"==typeof(null==n?void 0:n.decodingInfo)&&fx(t,T,k,S,e,M)?(t.supportedPromise=px(t,T,n),t.supportedPromise.then((e=>{if(!this.hls)return;t.supportedResult=e;const n=this.hls.levels,i=n.indexOf(t);e.error?rT.warn(`[abr] MediaCapabilities decodingInfo error: "${e.error}" for level ${i} ${JSON.stringify(e)}`):e.supported||(rT.warn(`[abr] Unsupported MediaCapabilities decodingInfo result for level ${i} ${JSON.stringify(e)}`),i>-1&&n.length>1&&(rT.log(`[abr] Removing unsupported level ${i}`),this.hls.removeLevel(i)))}))):t.supportedResult=hx}if(b&&t.codecSet!==b||k&&t.videoRange!==k||c&&S>t.frameRate||!c&&S>0&&S<t.frameRate||t.supportedResult&&(null==(_=t.supportedResult.decodingInfoResults)||!_[0].smooth)){x.push(s);continue}const f=t.details,E=(h?null==f?void 0:f.partTarget:null==f?void 0:f.averagetargetduration)||P;let C;C=c?o*e:r*e;const L=P&&i>=2*P&&0===a?m[s].averageBitrate:m[s].maxBitrate,I=this.getTimeToLoadFrag(A,C,L*E,void 0===f);if(C>=L&&(s===d||0===t.loadError&&0===t.fragmentError)&&(I<=A||!KE(I)||y&&!this.bitrateTestDelay||I<l)){const e=this.forcedAutoLevel;return s===p||-1!==e&&e===p||(x.length&&rT.trace(`[abr] Skipped level(s) ${x.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${m[x[0]].codecs}" ${m[x[0]].videoRange}; not compatible with "${v.codecs}" ${k}`),rT.info(`[abr] switch candidate:${u}->${s} adjustedbw(${Math.round(C)})-bitrate=${Math.round(C-L)} ttfb:${A.toFixed(1)} avgDuration:${E.toFixed(1)} maxFetchDuration:${l.toFixed(1)} fetchDuration:${I.toFixed(1)} firstSelection:${w} codecSet:${b} videoRange:${k} hls.loadLevel:${p}`)),w&&(this.firstSelection=s),s}}return-1}set nextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:n}=this.hls,i=Math.min(Math.max(e,n),t);this._nextAutoLevel!==i&&(this.nextAutoLevelKey="",this._nextAutoLevel=i)}},bufferController:class{constructor(e){this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendSource=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this.log=void 0,this.warn=void 0,this.error=void 0,this._onEndStreaming=e=>{this.hls&&this.hls.pauseBuffering()},this._onStartStreaming=e=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=()=>{const{media:e,mediaSource:t}=this;this.log("Media source opened"),e&&(e.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(QE.MEDIA_ATTACHED,{media:e,mediaSource:t})),t&&t.removeEventListener("sourceopen",this._onMediaSourceOpen),this.checkPendingTracks()},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:e,_objectUrl:t}=this;e!==t&&rT.error(`Media element src was set while attaching MediaSource (${t} > ${e})`)},this.hls=e;const t="[buffer-controller]";var n;this.appendSource=(n=NP(e.config.preferManagedMediaSource),"undefined"!=typeof self&&n===self.ManagedMediaSource),this.log=rT.log.bind(rT,t),this.warn=rT.warn.bind(rT,t),this.error=rT.error.bind(rT,t),this._initSourceBuffer(),this.registerListeners()}hasSourceTypes(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null,this.hls=null}registerListeners(){const{hls:e}=this;e.on(QE.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(QE.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.on(QE.MANIFEST_PARSED,this.onManifestParsed,this),e.on(QE.BUFFER_RESET,this.onBufferReset,this),e.on(QE.BUFFER_APPENDING,this.onBufferAppending,this),e.on(QE.BUFFER_CODECS,this.onBufferCodecs,this),e.on(QE.BUFFER_EOS,this.onBufferEos,this),e.on(QE.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(QE.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(QE.FRAG_PARSED,this.onFragParsed,this),e.on(QE.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:e}=this;e.off(QE.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(QE.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.off(QE.MANIFEST_PARSED,this.onManifestParsed,this),e.off(QE.BUFFER_RESET,this.onBufferReset,this),e.off(QE.BUFFER_APPENDING,this.onBufferAppending,this),e.off(QE.BUFFER_CODECS,this.onBufferCodecs,this),e.off(QE.BUFFER_EOS,this.onBufferEos,this),e.off(QE.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(QE.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(QE.FRAG_PARSED,this.onFragParsed,this),e.off(QE.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new wC(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.appendErrors={audio:0,video:0,audiovideo:0},this.lastMpegAudioChunk=null}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){let n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,this.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`)}onMediaAttaching(e,t){const n=this.media=t.media,i=NP(this.appendSource);if(n&&i){var a;const e=this.mediaSource=new i;this.log(`created media source: ${null==(a=e.constructor)?void 0:a.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming));const t=this._objectUrl=self.URL.createObjectURL(e);if(this.appendSource)try{n.removeAttribute("src");const i=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||i&&e instanceof i,kC(n),function(e,t){const n=self.document.createElement("source");n.type="video/mp4",n.src=t,e.appendChild(n)}(n,t),n.load()}catch(e){n.src=t}else n.src=t;n.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:e,mediaSource:t,_objectUrl:n}=this;if(t){if(this.log("media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){this.warn(`onMediaDetaching: ${e.message} while calling endOfStream`)}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(t.removeEventListener("startstreaming",this._onStartStreaming),t.removeEventListener("endstreaming",this._onEndStreaming)),e&&(e.removeEventListener("emptied",this._onMediaEmptied),n&&self.URL.revokeObjectURL(n),this.mediaSrc===n?(e.removeAttribute("src"),this.appendSource&&kC(e),e.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(QE.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach((e=>{this.resetBuffer(e)})),this._initSourceBuffer()}resetBuffer(e){const t=this.sourceBuffer[e];try{var n;if(t)this.removeBufferListeners(e),this.sourceBuffer[e]=void 0,null!=(n=this.mediaSource)&&n.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(t)}catch(t){this.warn(`onBufferReset ${e}`,t)}}onBufferCodecs(e,t){const n=this.getSourceBufferTypes().length,i=Object.keys(t);if(i.forEach((e=>{if(n){const n=this.tracks[e];if(n&&"function"==typeof n.buffer.changeType){var i;const{id:a,codec:r,levelCodec:o,container:s,metadata:l}=t[e],d=XP(n.codec,n.levelCodec),u=null==d?void 0:d.replace(bC,"$1");let c=XP(r,o);const h=null==(i=c)?void 0:i.replace(bC,"$1");if(c&&u!==h){"audio"===e.slice(0,5)&&(c=GP(c,this.appendSource));const t=`${s};codecs=${c}`;this.appendChangeType(e,t),this.log(`switching codec ${d} to ${c}`),this.tracks[e]={buffer:n.buffer,codec:r,container:s,levelCodec:o,metadata:l,id:a}}}}else this.pendingTracks[e]=t[e]})),n)return;const a=Math.max(this.bufferCodecEventsExpected-1,0);this.bufferCodecEventsExpected!==a&&(this.log(`${a} bufferCodec event(s) expected ${i.join(",")}`),this.bufferCodecEventsExpected=a),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks()}appendChangeType(e,t){const{operationQueue:n}=this,i={execute:()=>{const i=this.sourceBuffer[e];i&&(this.log(`changing ${e} sourceBuffer type to ${t}`),i.changeType(t)),n.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:t=>{this.warn(`Failed to change ${e} SourceBuffer type`,t)}};n.append(i,e,!!this.pendingTracks[e])}onBufferAppending(e,t){const{hls:n,operationQueue:i,tracks:a}=this,{data:r,type:o,frag:s,part:l,chunkMeta:d}=t,u=d.buffering[o],c=self.performance.now();u.start=c;const h=s.stats.buffering,m=l?l.stats.buffering:null;0===h.start&&(h.start=c),m&&0===m.start&&(m.start=c);const f=a.audio;let p=!1;"audio"===o&&"audio/mpeg"===(null==f?void 0:f.container)&&(p=!this.lastMpegAudioChunk||1===d.id||this.lastMpegAudioChunk.sn!==d.sn,this.lastMpegAudioChunk=d);const g=s.start,v={execute:()=>{if(u.executeStart=self.performance.now(),p){const e=this.sourceBuffer[o];if(e){const t=g-e.timestampOffset;Math.abs(t)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${g} (delta: ${t}) sn: ${s.sn})`),e.timestampOffset=g)}}this.appendExecutor(r,o)},onStart:()=>{},onComplete:()=>{const e=self.performance.now();u.executeEnd=u.end=e,0===h.first&&(h.first=e),m&&0===m.first&&(m.first=e);const{sourceBuffer:t}=this,n={};for(const e in t)n[e]=Lx.getBuffered(t[e]);this.appendErrors[o]=0,"audio"===o||"video"===o?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(QE.BUFFER_APPENDED,{type:o,frag:s,part:l,chunkMeta:d,parent:s.type,timeRanges:n})},onError:e=>{const t={type:ZE.MEDIA_ERROR,parent:s.type,details:eT.BUFFER_APPEND_ERROR,sourceBufferName:o,frag:s,part:l,chunkMeta:d,error:e,err:e,fatal:!1};if(e.code===DOMException.QUOTA_EXCEEDED_ERR)t.details=eT.BUFFER_FULL_ERROR;else{const e=++this.appendErrors[o];t.details=eT.BUFFER_APPEND_ERROR,this.warn(`Failed ${e}/${n.config.appendErrorMaxRetry} times to append segment in "${o}" sourceBuffer`),e>=n.config.appendErrorMaxRetry&&(t.fatal=!0)}n.trigger(QE.ERROR,t)}};i.append(v,o,!!this.pendingTracks[o])}onBufferFlushing(e,t){const{operationQueue:n}=this,i=e=>({execute:this.removeExecutor.bind(this,e,t.startOffset,t.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(QE.BUFFER_FLUSHED,{type:e})},onError:t=>{this.warn(`Failed to remove from ${e} SourceBuffer`,t)}});t.type?n.append(i(t.type),t.type):this.getSourceBufferTypes().forEach((e=>{n.append(i(e),e)}))}onFragParsed(e,t){const{frag:n,part:i}=t,a=[],r=i?i.elementaryStreams:n.elementaryStreams;r[fT]?a.push("audiovideo"):(r[hT]&&a.push("audio"),r[mT]&&a.push("video"));0===a.length&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${n.type} level: ${n.level} sn: ${n.sn}`),this.blockBuffers((()=>{const e=self.performance.now();n.stats.buffering.end=e,i&&(i.stats.buffering.end=e);const t=i?i.stats:n.stats;this.hls.trigger(QE.FRAG_BUFFERED,{frag:n,part:i,stats:t,id:n.type})}),a)}onFragChanged(e,t){this.trimBuffers()}onBufferEos(e,t){this.getSourceBufferTypes().reduce(((e,n)=>{const i=this.sourceBuffer[n];return!i||t.type&&t.type!==n||(i.ending=!0,i.ended||(i.ended=!0,this.log(`${n} sourceBuffer now EOS`))),e&&!(i&&!i.ended)}),!0)&&(this.log("Queueing mediaSource.endOfStream()"),this.blockBuffers((()=>{this.getSourceBufferTypes().forEach((e=>{const t=this.sourceBuffer[e];t&&(t.ending=!1)}));const{mediaSource:e}=this;e&&"open"===e.readyState?(this.log("Calling mediaSource.endOfStream()"),e.endOfStream()):e&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${e.readyState}`)})))}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())}trimBuffers(){const{hls:e,details:t,media:n}=this;if(!n||null===t)return;if(!this.getSourceBufferTypes().length)return;const i=e.config,a=n.currentTime,r=t.levelTargetDuration,o=t.live&&null!==i.liveBackBufferLength?i.liveBackBufferLength:i.backBufferLength;if(KE(o)&&o>0){const e=Math.max(o,r),t=Math.floor(a/r)*r-e;this.flushBackBuffer(a,r,t)}if(KE(i.frontBufferFlushThreshold)&&i.frontBufferFlushThreshold>0){const e=Math.max(i.maxBufferLength,i.frontBufferFlushThreshold),t=Math.max(e,r),n=Math.floor(a/r)*r+t;this.flushFrontBuffer(a,r,n)}}flushBackBuffer(e,t,n){const{details:i,sourceBuffer:a}=this;this.getSourceBufferTypes().forEach((r=>{const o=a[r];if(o){const a=Lx.getBuffered(o);if(a.length>0&&n>a.start(0)){if(this.hls.trigger(QE.BACK_BUFFER_REACHED,{bufferEnd:n}),null!=i&&i.live)this.hls.trigger(QE.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(o.ended&&a.end(a.length-1)-e<2*t)return void this.log(`Cannot flush ${r} back buffer while SourceBuffer is in ended state`);this.hls.trigger(QE.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:r})}}}))}flushFrontBuffer(e,t,n){const{sourceBuffer:i}=this;this.getSourceBufferTypes().forEach((a=>{const r=i[a];if(r){const i=Lx.getBuffered(r),o=i.length;if(o<2)return;const s=i.start(o-1),l=i.end(o-1);if(n>s||e>=s&&e<=l)return;if(r.ended&&e-l<2*t)return void this.log(`Cannot flush ${a} front buffer while SourceBuffer is in ended state`);this.hls.trigger(QE.BUFFER_FLUSHING,{startOffset:s,endOffset:1/0,type:a})}}))}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||"open"!==this.mediaSource.readyState)return;const{details:e,hls:t,media:n,mediaSource:i}=this,a=e.fragments[0].start+e.totalduration,r=n.duration,o=KE(i.duration)?i.duration:0;e.live&&t.config.liveDurationInfinity?(i.duration=1/0,this.updateSeekableRange(e)):(a>o&&a>r||!KE(r))&&(this.log(`Updating Media Source duration to ${a.toFixed(3)}`),i.duration=a)}updateSeekableRange(e){const t=this.mediaSource,n=e.fragments;if(n.length&&e.live&&null!=t&&t.setLiveSeekableRange){const i=Math.max(0,n[0].start),a=Math.max(i,i+e.totalduration);this.log(`Media Source duration is set to ${t.duration}. Setting seekable range to ${i}-${a}.`),t.setLiveSeekableRange(i,a)}}checkPendingTracks(){const{bufferCodecEventsExpected:e,operationQueue:t,pendingTracks:n}=this,i=Object.keys(n).length;if(i&&(!e||2===i||"audiovideo"in n)){this.createSourceBuffers(n),this.pendingTracks={};const e=this.getSourceBufferTypes();if(e.length)this.hls.trigger(QE.BUFFER_CREATED,{tracks:this.tracks}),e.forEach((e=>{t.executeNext(e)}));else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(QE.ERROR,{type:ZE.MEDIA_ERROR,details:eT.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}}createSourceBuffers(e){const{sourceBuffer:t,mediaSource:n}=this;if(!n)throw Error("createSourceBuffers called when mediaSource was null");for(const a in e)if(!t[a]){var i;const r=e[a];if(!r)throw Error(`source buffer exists for track ${a}, however track does not`);let o=-1===(null==(i=r.levelCodec)?void 0:i.indexOf(","))?r.levelCodec:r.codec;o&&"audio"===a.slice(0,5)&&(o=GP(o,this.appendSource));const s=`${r.container};codecs=${o}`;this.log(`creating sourceBuffer(${s})`);try{const e=t[a]=n.addSourceBuffer(s),i=a;this.addBufferListener(i,"updatestart",this._onSBUpdateStart),this.addBufferListener(i,"updateend",this._onSBUpdateEnd),this.addBufferListener(i,"error",this._onSBUpdateError),this.appendSource&&this.addBufferListener(i,"bufferedchange",((e,t)=>{const n=t.removedRanges;null!=n&&n.length&&this.hls.trigger(QE.BUFFER_FLUSHED,{type:a})})),this.tracks[a]={buffer:e,codec:o,container:r.container,levelCodec:r.levelCodec,metadata:r.metadata,id:r.id}}catch(e){this.error(`error while trying to add sourceBuffer: ${e.message}`),this.hls.trigger(QE.ERROR,{type:ZE.MEDIA_ERROR,details:eT.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,sourceBufferName:a,mimeType:s})}}}get mediaSrc(){var e,t;const n=(null==(e=this.media)||null==(t=e.querySelector)?void 0:t.call(e,"source"))||this.media;return null==n?void 0:n.src}_onSBUpdateStart(e){const{operationQueue:t}=this;t.current(e).onStart()}_onSBUpdateEnd(e){var t;if("closed"===(null==(t=this.mediaSource)?void 0:t.readyState))return void this.resetBuffer(e);const{operationQueue:n}=this;n.current(e).onComplete(),n.shiftAndExecuteNext(e)}_onSBUpdateError(e,t){var n;const i=new Error(`${e} SourceBuffer error. MediaSource readyState: ${null==(n=this.mediaSource)?void 0:n.readyState}`);this.error(`${i}`,t),this.hls.trigger(QE.ERROR,{type:ZE.MEDIA_ERROR,details:eT.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:i,fatal:!1});const a=this.operationQueue.current(e);a&&a.onError(i)}removeExecutor(e,t,n){const{media:i,mediaSource:a,operationQueue:r,sourceBuffer:o}=this,s=o[e];if(!i||!a||!s)return this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),void r.shiftAndExecuteNext(e);const l=KE(i.duration)?i.duration:1/0,d=KE(a.duration)?a.duration:1/0,u=Math.max(0,t),c=Math.min(n,l,d);c>u&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${u},${c}] from the ${e} SourceBuffer`),s.remove(u,c)):r.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.sourceBuffer[t];if(n)n.ended=!1,n.appendBuffer(e);else if(!this.pendingTracks[t])throw new Error(`Attempting to append to the ${t} SourceBuffer, but it does not exist`)}blockBuffers(e,t=this.getSourceBufferTypes()){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve().then(e);const{operationQueue:n}=this,i=t.map((e=>n.appendBlocker(e)));Promise.all(i).then((()=>{e(),t.forEach((e=>{const t=this.sourceBuffer[e];null!=t&&t.updating||n.shiftAndExecuteNext(e)}))}))}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(e,t,n){const i=this.sourceBuffer[e];if(!i)return;const a=n.bind(this,e);this.listeners[e].push({event:t,listener:a}),i.addEventListener(t,a)}removeBufferListeners(e){const t=this.sourceBuffer[e];t&&this.listeners[e].forEach((e=>{t.removeEventListener(e.event,e.listener)}))}},capLevelController:gL,errorController:class{constructor(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=rT.log.bind(rT,"[info]:"),this.warn=rT.warn.bind(rT,"[warning]:"),this.error=rT.error.bind(rT,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(QE.ERROR,this.onError,this),e.on(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.on(QE.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(QE.ERROR,this.onError,this),e.off(QE.ERROR,this.onErrorOut,this),e.off(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.off(QE.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(null==e?void 0:e.type)===uA?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var n,i;if(t.fatal)return;const a=this.hls,r=t.context;switch(t.details){case eT.FRAG_LOAD_ERROR:case eT.FRAG_LOAD_TIMEOUT:case eT.KEY_LOAD_ERROR:case eT.KEY_LOAD_TIMEOUT:return void(t.errorAction=this.getFragRetryOrSwitchAction(t));case eT.FRAG_PARSING_ERROR:if(null!=(n=t.frag)&&n.gap)return void(t.errorAction={action:nx,flags:ox});case eT.FRAG_GAP:case eT.FRAG_DECRYPT_ERROR:return t.errorAction=this.getFragRetryOrSwitchAction(t),void(t.errorAction.action=ix);case eT.LEVEL_EMPTY_ERROR:case eT.LEVEL_PARSING_ERROR:{var o,s;const e=t.parent===uA?t.level:a.loadLevel;t.details===eT.LEVEL_EMPTY_ERROR&&null!=(o=t.context)&&null!=(s=o.levelDetails)&&s.live?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,e):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,e))}return;case eT.LEVEL_LOAD_ERROR:case eT.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==r?void 0:r.level)&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.level)));case eT.AUDIO_TRACK_LOAD_ERROR:case eT.AUDIO_TRACK_LOAD_TIMEOUT:case eT.SUBTITLE_LOAD_ERROR:case eT.SUBTITLE_TRACK_LOAD_TIMEOUT:if(r){const e=a.levels[a.loadLevel];if(e&&(r.type===lA&&e.hasAudioGroup(r.groupId)||r.type===dA&&e.hasSubtitleGroup(r.groupId)))return t.errorAction=this.getPlaylistRetryOrSwitchAction(t,a.loadLevel),t.errorAction.action=ix,void(t.errorAction.flags=sx)}return;case eT.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const e=a.levels[a.loadLevel],n=null==e?void 0:e.attrs["HDCP-LEVEL"];n?t.errorAction={action:ix,flags:lx,hdcpLevel:n}:this.keySystemError(t)}return;case eT.BUFFER_ADD_CODEC_ERROR:case eT.REMUX_ALLOC_ERROR:case eT.BUFFER_APPEND_ERROR:return void(t.errorAction=this.getLevelSwitchAction(t,null!=(i=t.level)?i:a.loadLevel));case eT.INTERNAL_EXCEPTION:case eT.BUFFER_APPENDING_ERROR:case eT.BUFFER_FULL_ERROR:case eT.LEVEL_SWITCH_ERROR:case eT.BUFFER_STALLED_ERROR:case eT.BUFFER_SEEK_OVER_HOLE:case eT.BUFFER_NUDGE_ON_STALL:return void(t.errorAction={action:nx,flags:ox})}t.type===ZE.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const n=VA(this.hls.config.playlistLoadPolicy,e),i=this.playlistError++;if(JA(n,i,YA(e),e.response))return{action:rx,flags:ox,retryConfig:n,retryCount:i};const a=this.getLevelSwitchAction(e,t);return n&&(a.retryConfig=n,a.retryCount=i),a}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),i=t.levels[n],{fragLoadPolicy:a,keyLoadPolicy:r}=t.config,o=VA(e.details.startsWith("key")?r:a,e),s=t.levels.reduce(((e,t)=>e+t.fragmentError),0);if(i){e.details!==eT.FRAG_GAP&&i.fragmentError++;if(JA(o,s,YA(e),e.response))return{action:rx,flags:ox,retryConfig:o,retryCount:s}}const l=this.getLevelSwitchAction(e,n);return o&&(l.retryConfig=o,l.retryCount=s),l}getLevelSwitchAction(e,t){const n=this.hls;null==t&&(t=n.loadLevel);const i=this.hls.levels[t];if(i){var a,r;const t=e.details;i.loadError++,t===eT.BUFFER_APPEND_ERROR&&i.fragmentError++;let l=-1;const{levels:d,loadLevel:u,minAutoLevel:c,maxAutoLevel:h}=n;n.autoLevelEnabled||(n.loadLevel=-1);const m=null==(a=e.frag)?void 0:a.type,f=(m===cA&&t===eT.FRAG_PARSING_ERROR||"audio"===e.sourceBufferName&&(t===eT.BUFFER_ADD_CODEC_ERROR||t===eT.BUFFER_APPEND_ERROR))&&d.some((({audioCodec:e})=>i.audioCodec!==e)),p="video"===e.sourceBufferName&&(t===eT.BUFFER_ADD_CODEC_ERROR||t===eT.BUFFER_APPEND_ERROR)&&d.some((({codecSet:e,audioCodec:t})=>i.codecSet!==e&&i.audioCodec===t)),{type:g,groupId:v}=null!=(r=e.context)?r:{};for(let n=d.length;n--;){const a=(n+u)%d.length;if(a!==u&&a>=c&&a<=h&&0===d[a].loadError){var o,s;const n=d[a];if(t===eT.FRAG_GAP&&m===uA&&e.frag){const t=d[a].details;if(t){const n=ZA(e.frag,t.fragments,e.frag.start);if(null!=n&&n.gap)continue}}else{if(g===lA&&n.hasAudioGroup(v)||g===dA&&n.hasSubtitleGroup(v))continue;if(m===cA&&null!=(o=i.audioGroups)&&o.some((e=>n.hasAudioGroup(e)))||m===hA&&null!=(s=i.subtitleGroups)&&s.some((e=>n.hasSubtitleGroup(e)))||f&&i.audioCodec===n.audioCodec||!f&&i.audioCodec!==n.audioCodec||p&&i.codecSet===n.codecSet)continue}l=a;break}}if(l>-1&&n.loadLevel!==l)return e.levelRetry=!0,this.playlistError=0,{action:ix,flags:ox,nextAutoLevel:l}}return{action:ix,flags:sx}}onErrorOut(e,t){var n;switch(null==(n=t.errorAction)?void 0:n.action){case nx:break;case ix:this.sendAlternateToPenaltyBox(t),t.errorAction.resolved||t.details===eT.FRAG_GAP?/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError()):t.fatal=!0}t.fatal&&this.hls.stopLoad()}sendAlternateToPenaltyBox(e){const t=this.hls,n=e.errorAction;if(!n)return;const{flags:i,hdcpLevel:a,nextAutoLevel:r}=n;switch(i){case ox:this.switchLevel(e,r);break;case lx:a&&(t.maxHdcpLevel=CA[CA.indexOf(a)-1],n.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`)}n.resolved||this.switchLevel(e,r)}switchLevel(e,t){void 0!==t&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}},fpsController:class{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(QE.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(QE.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const n=this.hls.config;if(n.capLevelOnFPSDrop){const e=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=e,e&&"function"==typeof e.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}}checkFPS(e,t,n){const i=performance.now();if(t){if(this.lastTime){const e=i-this.lastTime,a=n-this.lastDroppedFrames,r=t-this.lastDecodedFrames,o=1e3*a/e,s=this.hls;if(s.trigger(QE.FPS_DROP,{currentDropped:a,currentDecoded:r,totalDroppedFrames:n}),o>0&&a>s.config.fpsDroppedMonitoringThreshold*r){let e=s.currentLevel;rT.warn("drop FPS ratio greater than max allowed value for currentLevel: "+e),e>0&&(-1===s.autoLevelCapping||s.autoLevelCapping>=e)&&(e-=1,s.trigger(QE.FPS_DROP_LEVEL_CAPPING,{level:e,droppedLevel:s.currentLevel}),s.autoLevelCapping=e,this.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=n,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}},stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:NT,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null}},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},{cueHandler:mI,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:class extends o_{constructor(e,t,n){super(e,t,n,"[subtitle-stream-controller]",hA),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}_registerListeners(){const{hls:e}=this;e.on(QE.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(QE.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.on(QE.LEVEL_LOADED,this.onLevelLoaded,this),e.on(QE.ERROR,this.onError,this),e.on(QE.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(QE.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(QE.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(QE.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(QE.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(QE.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(QE.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(QE.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.off(QE.LEVEL_LOADED,this.onLevelLoaded,this),e.off(QE.ERROR,this.onError,this),e.off(QE.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(QE.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(QE.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(QE.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(QE.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(QE.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(e){this.stopLoad(),this.state=Kx,this.setInterval(500),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}onManifestLoading(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()}onMediaDetaching(){this.tracksBuffered=[],super.onMediaDetaching()}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:n,success:i}=t;if(this.fragPrevious=n,this.state=Kx,!i)return;const a=this.tracksBuffered[this.currentTrackId];if(!a)return;let r;const o=n.start;for(let e=0;e<a.length;e++)if(o>=a[e].start&&o<=a[e].end){r=a[e];break}const s=n.start+n.duration;r?r.end=s:(r={start:o,end:s},a.push(r)),this.fragmentTracker.fragBuffered(n),this.fragBufferedComplete(n,null)}onBufferFlushing(e,t){const{startOffset:n,endOffset:i}=t;if(0===n&&i!==Number.POSITIVE_INFINITY){const e=i-1;if(e<=0)return;t.endOffsetSubtitles=Math.max(0,e),this.tracksBuffered.forEach((t=>{for(let n=0;n<t.length;)if(t[n].end<=e)t.shift();else{if(!(t[n].start<e))break;t[n].start=e,n++}})),this.fragmentTracker.removeFragmentsInRange(n,e,hA)}}onFragBuffered(e,t){var n;this.loadedmetadata||t.frag.type!==uA||null!=(n=this.media)&&n.buffered.length&&(this.loadedmetadata=!0)}onError(e,t){const n=t.frag;(null==n?void 0:n.type)===hA&&(t.details===eT.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Vx&&(this.state=Kx))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){this.levels&&pC(this.levels,t)?this.levels=t.map((e=>new OA(e))):(this.tracksBuffered=[],this.levels=t.map((e=>{const t=new OA(e);return this.tracksBuffered[t.id]=[],t})),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,hA),this.fragPrevious=null,this.mediaBuffer=null)}onSubtitleTrackSwitch(e,t){var n;if(this.currentTrackId=t.id,null==(n=this.levels)||!n.length||-1===this.currentTrackId)return void this.clearInterval();const i=this.levels[this.currentTrackId];null!=i&&i.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,i&&this.setInterval(500)}onSubtitleTrackLoaded(e,t){var n;const{currentTrackId:i,levels:a}=this,{details:r,id:o}=t;if(!a)return void this.warn(`Subtitle tracks were reset while loading level ${o}`);const s=a[o];if(o>=a.length||!s)return;this.log(`Subtitle track ${o} loaded [${r.startSN},${r.endSN}]${r.lastPartSn?`[part-${r.lastPartSn}-${r.lastPartIndex}]`:""},duration:${r.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let l=0;if(r.live||null!=(n=s.details)&&n.live){const e=this.mainDetails;if(r.deltaUpdateFailed||!e)return;const t=e.fragments[0];var d;if(s.details)l=this.alignPlaylists(r,s.details,null==(d=this.levelLastLoaded)?void 0:d.details),0===l&&t&&(l=t.start,HA(r,l));else r.hasProgramDateTime&&e.hasProgramDateTime?(Ox(r,e),l=r.fragments[0].start):t&&(l=t.start,HA(r,l))}if(s.details=r,this.levelLastLoaded=s,o===i&&(this.startFragRequested||!this.mainDetails&&r.live||this.setStartPosition(this.mainDetails||r,l),this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===Kx)){ZA(null,r.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),s.details=void 0)}}_handleFragmentLoadComplete(e){const{frag:t,payload:n}=e,i=t.decryptdata,a=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&null!=i&&i.key&&i.iv&&"AES-128"===i.method){const e=performance.now();this.decrypter.decrypt(new Uint8Array(n),i.key.buffer,i.iv.buffer).catch((e=>{throw a.trigger(QE.ERROR,{type:ZE.MEDIA_ERROR,details:eT.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:t}),e})).then((n=>{const i=performance.now();a.trigger(QE.FRAG_DECRYPTED,{frag:t,payload:n,stats:{tstart:e,tdecrypt:i}})})).catch((e=>{this.warn(`${e.name}: ${e.message}`),this.state=Kx}))}}doTick(){if(this.media){if(this.state===Kx){const{currentTrackId:e,levels:t}=this,n=null==t?void 0:t[e];if(!n||!t.length||!n.details)return;const{config:i}=this,a=this.getLoadPosition(),r=Lx.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],a,i.maxBufferHole),{end:o,len:s}=r,l=this.getFwdBufferInfo(this.media,uA),d=n.details;if(s>this.getMaxBufferLength(null==l?void 0:l.len)+d.levelTargetDuration)return;const u=d.fragments,c=u.length,h=d.edge;let m=null;const f=this.fragPrevious;if(o<h){const e=i.maxFragLookUpTolerance,t=o>h-e?0:e;m=ZA(f,u,Math.max(u[0].start,o),t),!m&&f&&f.start<u[0].start&&(m=u[0])}else m=u[c-1];if(!m)return;if(m=this.mapToInitFragWhenRequired(m),"initSegment"!==m.sn){const e=u[m.sn-d.startSN-1];e&&e.cc===m.cc&&this.fragmentTracker.getState(e)===Mx&&(m=e)}this.fragmentTracker.getState(m)===Mx&&this.loadFragment(m,n,o)}}else this.state=Kx}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.max(t,e):t}loadFragment(e,t,n){this.fragCurrent=e,"initSegment"===e.sn?this._loadInitSegment(e,t):(this.startFragRequested=!0,super.loadFragment(e,t,n))}get mediaBufferTimeRanges(){return new yC(this.tracksBuffered[this.currentTrackId]||[])}},subtitleTrackController:class extends dx{constructor(e){super(e,"[subtitle-track-controller]"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let e=null;const t=bA(this.media.textTracks);for(let n=0;n<t.length;n++)if("hidden"===t[n].mode)e=t[n];else if("showing"===t[n].mode){e=t[n];break}const n=this.findTrackForTextTrack(e);this.subtitleTrack!==n&&this.setSubtitleTrack(n)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(QE.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(QE.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.on(QE.MANIFEST_PARSED,this.onManifestParsed,this),e.on(QE.LEVEL_LOADING,this.onLevelLoading,this),e.on(QE.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(QE.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(QE.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(QE.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(QE.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.off(QE.MANIFEST_PARSED,this.onManifestParsed,this),e.off(QE.LEVEL_LOADING,this.onLevelLoading,this),e.off(QE.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(QE.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(QE.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);bA(this.media.textTracks).forEach((e=>{yA(e)})),this.subtitleTrack=-1,this.media=null}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:n,groupId:i,details:a}=t,r=this.tracksInGroup[n];if(!r||r.groupId!==i)return void this.warn(`Subtitle track with id:${n} and group:${i} not found in active group ${null==r?void 0:r.groupId}`);const o=r.details;r.details=t.details,this.log(`Subtitle track ${n} "${r.name}" lang:${r.lang} group:${i} loaded [${a.startSN}-${a.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.subtitleGroups||null,i=this.groupIds;let a=this.currentTrack;if(!n||(null==i?void 0:i.length)!==(null==n?void 0:n.length)||null!=n&&n.some((e=>-1===(null==i?void 0:i.indexOf(e))))){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const e=this.tracks.filter((e=>!n||-1!==n.indexOf(e.groupId)));if(e.length)this.selectDefaultTrack&&!e.some((e=>e.default))&&(this.selectDefaultTrack=!1),e.forEach(((e,t)=>{e.id=t}));else if(!a&&!this.tracksInGroup.length)return;this.tracksInGroup=e;const t=this.hls.config.subtitlePreference;if(!a&&t){this.selectDefaultTrack=!1;const n=yx(t,e);if(n>-1)a=e[n];else{const e=yx(t,this.tracks);a=this.tracks[e]}}let i=this.findTrackId(a);-1===i&&a&&(i=this.findTrackId(null));const r={subtitleTracks:e};this.log(`Updating subtitle tracks, ${e.length} track(s) found in "${null==n?void 0:n.join(",")}" group-id`),this.hls.trigger(QE.SUBTITLE_TRACKS_UPDATED,r),-1!==i&&-1===this.trackId&&this.setSubtitleTrack(i)}else this.shouldReloadPlaylist(a)&&this.setSubtitleTrack(this.trackId)}findTrackId(e){const t=this.tracksInGroup,n=this.selectDefaultTrack;for(let i=0;i<t.length;i++){const a=t[i];if((!n||a.default)&&(n||e)&&(!e||wx(a,e)))return i}if(e){for(let n=0;n<t.length;n++){const i=t[n];if(gC(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return n}for(let n=0;n<t.length;n++){const i=t[n];if(gC(e.attrs,i.attrs,["LANGUAGE"]))return n}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){if(vC(t[n],e))return n}}return-1}onError(e,t){!t.fatal&&t.context&&(t.context.type!==dA||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||this.checkRetry(t))}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const n=this.currentTrack;if(n&&wx(e,n))return n;const i=yx(e,this.tracksInGroup);if(i>-1){const e=this.tracksInGroup[i];return this.setSubtitleTrack(i),e}if(n)return null;{const n=yx(e,t);if(n>-1)return t[n]}}}return null}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){const n=t.id,i=t.groupId;let a=t.url;if(e)try{a=e.addDirectives(a)}catch(e){this.warn(`Could not construct new URL with HLS Delivery Directives: ${e}`)}this.log(`Loading subtitle playlist for id ${n}`),this.hls.trigger(QE.SUBTITLE_TRACK_LOADING,{url:a,id:n,groupId:i,deliveryDirectives:e||null})}}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=bA(e.textTracks),n=this.currentTrack;let i;if(n&&(i=t.filter((e=>vC(n,e)))[0],i||this.warn(`Unable to find subtitle TextTrack with name "${n.name}" and language "${n.lang}"`)),[].slice.call(t).forEach((e=>{"disabled"!==e.mode&&e!==i&&(e.mode="disabled")})),i){const e=this.subtitleDisplay?"showing":"hidden";i.mode!==e&&(i.mode=e)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media)return void(this.queuedDefaultTrack=e);if(e<-1||e>=t.length||!KE(e))return void this.warn(`Invalid subtitle track id: ${e}`);this.clearTimer(),this.selectDefaultTrack=!1;const n=this.currentTrack,i=t[e]||null;if(this.trackId=e,this.currentTrack=i,this.toggleTrackModes(),!i)return void this.hls.trigger(QE.SUBTITLE_TRACK_SWITCH,{id:e});const a=!!i.details&&!i.details.live;if(e===this.trackId&&i===n&&a)return;this.log(`Switching to subtitle-track ${e}`+(i?` "${i.name}" lang:${i.lang} group:${i.groupId}`:""));const{id:r,groupId:o="",name:s,type:l,url:d}=i;this.hls.trigger(QE.SUBTITLE_TRACK_SWITCH,{id:r,groupId:o,name:s,type:l,url:d});const u=this.switchParams(i.url,null==n?void 0:n.details,i.details);this.loadPlaylist(u)}},timelineController:class{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(QE.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(QE.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.on(QE.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(QE.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(QE.FRAG_LOADING,this.onFragLoading,this),e.on(QE.FRAG_LOADED,this.onFragLoaded,this),e.on(QE.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(QE.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(QE.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(QE.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(QE.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(QE.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(QE.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.off(QE.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(QE.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(QE.FRAG_LOADING,this.onFragLoading,this),e.off(QE.FRAG_LOADED,this.onFragLoaded,this),e.off(QE.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(QE.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(QE.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(QE.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(QE.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){if(this.config.enableCEA708Captions&&(!this.cea608Parser1||!this.cea608Parser2)){const e=new $C(this,"textTrack1"),t=new $C(this,"textTrack2"),n=new $C(this,"textTrack3"),i=new $C(this,"textTrack4");this.cea608Parser1=new FC(1,e,t),this.cea608Parser2=new FC(3,n,i)}}addCues(e,t,n,i,a){let r=!1;for(let e=a.length;e--;){const i=a[e],u=(o=i[0],s=i[1],l=t,d=n,Math.min(s,d)-Math.max(o,l));if(u>=0&&(i[0]=Math.min(i[0],t),i[1]=Math.max(i[1],n),r=!0,u/(n-t)>.5))return}var o,s,l,d;if(r||a.push([t,n]),this.config.renderTextTracksNatively){const a=this.captionsTracks[e];this.Cues.newCue(a,t,n,i)}else{const a=this.Cues.newCue(null,t,n,i);this.hls.trigger(QE.CUES_PARSED,{type:"captions",cues:a,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:i,timescale:a}){const{unparsedVttFrags:r}=this;"main"===n&&(this.initPTS[t.cc]={baseTime:i,timescale:a}),r.length&&(this.unparsedVttFrags=[],r.forEach((e=>{this.onFragLoaded(QE.FRAG_LOADED,e)})))}getExistingTrack(e,t){const{media:n}=this;if(n)for(let i=0;i<n.textTracks.length;i++){const a=n.textTracks[i];if(pL(a,{name:e,lang:t,attrs:{}}))return a}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:n,media:i}=this,{label:a,languageCode:r}=t[e],o=this.getExistingTrack(a,r);if(o)n[e]=o,yA(n[e]),gA(n[e],i);else{const t=this.createTextTrack("captions",a,r);t&&(t[e]=!0,n[e]=t)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const n={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=n,this.hls.trigger(QE.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}createTextTrack(e,t,n){const i=this.media;if(i)return i.addTextTrack(e,t,n)}onMediaAttaching(e,t){this.media=t.media,this._cleanTracks()}onMediaDetaching(){const{captionsTracks:e}=this;Object.keys(e).forEach((t=>{yA(e[t]),delete e[t]})),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let e=0;e<t.length;e++)yA(t[e])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],i=n.some((e=>e.textCodec===iL));if(this.config.enableWebVTT||i&&this.config.enableIMSC1){if(pC(this.tracks,n))return void(this.tracks=n);if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const e=this.media,t=e?bA(e.textTracks):null;if(this.tracks.forEach(((e,n)=>{let i;if(t){let n=null;for(let i=0;i<t.length;i++)if(t[i]&&pL(t[i],e)){n=t[i],t[i]=null;break}n&&(i=n)}if(i)yA(i);else{const t=fL(e);i=this.createTextTrack(t,e.name,e.lang),i&&(i.mode="disabled")}i&&this.textTracks.push(i)})),null!=t&&t.length){const e=t.filter((e=>null!==e)).map((e=>e.label));e.length&&rT.warn(`Media element contains unused subtitle tracks: ${e.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const e=this.tracks.map((e=>({label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e})));this.hls.trigger(QE.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:e})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach((e=>{const t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(!t)return;const n=`textTrack${t[1]}`,i=this.captionsProperties[n];i&&(i.label=e.name,e.lang&&(i.languageCode=e.lang),i.media=e)}))}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return null==t?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===uA){var n,i;const{cea608Parser1:e,cea608Parser2:a,lastSn:r}=this,{cc:o,sn:s}=t.frag,l=null!=(n=null==(i=t.part)?void 0:i.index)?n:-1;e&&a&&(s!==r+1||s===r&&l!==this.lastPartIndex+1||o!==this.lastCc)&&(e.reset(),a.reset()),this.lastCc=o,this.lastSn=s,this.lastPartIndex=l}}onFragLoaded(e,t){const{frag:n,payload:i}=t;if(n.type===hA)if(i.byteLength){const e=n.decryptdata,a="stats"in t;if(null==e||!e.encrypted||a){const e=this.tracks[n.level],a=this.vttCCs;a[n.cc]||(a[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),e&&e.textCodec===iL?this._parseIMSC1(n,i):this._parseVTTs(t)}}else this.hls.trigger(QE.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;sL(t,this.initPTS[e.cc],(t=>{this._appendCues(t,e.level),n.trigger(QE.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(t=>{rT.log(`Failed to parse IMSC1: ${t}`),n.trigger(QE.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))}_parseVTTs(e){var t;const{frag:n,payload:i}=e,{initPTS:a,unparsedVttFrags:r}=this,o=a.length-1;if(!a[n.cc]&&-1===o)return void r.push(e);const s=this.hls;nL(null!=(t=n.initSegment)&&t.data?kP(n.initSegment.data,new Uint8Array(i)):i,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,(e=>{this._appendCues(e,n.level),s.trigger(QE.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})}),(t=>{const a="Missing initPTS for VTT MPEGTS"===t.message;a?r.push(e):this._fallbackToIMSC1(n,i),rT.log(`Failed to parse VTT cue: ${t}`),a&&o>n.cc||s.trigger(QE.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:t})}))}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||sL(t,this.initPTS[e.cc],(()=>{n.textCodec=iL,this._parseIMSC1(e,t)}),(()=>{n.textCodec="wvtt"}))}_appendCues(e,t){const n=this.hls;if(this.config.renderTextTracksNatively){const n=this.textTracks[t];if(!n||"disabled"===n.mode)return;e.forEach((e=>vA(n,e)))}else{const i=this.tracks[t];if(!i)return;const a=i.default?"default":"subtitles"+t;n.trigger(QE.CUES_PARSED,{type:"subtitles",cues:e,track:a})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===hA&&this.onFragLoaded(QE.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){this.initCea608Parsers();const{cea608Parser1:n,cea608Parser2:i}=this;if(!this.enabled||!n||!i)return;const{frag:a,samples:r}=t;if(a.type!==uA||"NONE"!==this.closedCaptionsForLevel(a))for(let e=0;e<r.length;e++){const t=r[e].bytes;if(t){const a=this.extractCea608Data(t);n.addData(r[e].pts,a[0]),i.addData(r[e].pts,a[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:n,endOffsetSubtitles:i,type:a}){const{media:r}=this;if(r&&!(r.currentTime<n)){if(!a||"video"===a){const{captionsTracks:e}=this;Object.keys(e).forEach((i=>wA(e[i],t,n)))}if(this.config.renderTextTracksNatively&&0===t&&void 0!==i){const{textTracks:e}=this;Object.keys(e).forEach((n=>wA(e[n],t,i)))}}}extractCea608Data(e){const t=[[],[]],n=31&e[0];let i=2;for(let a=0;a<n;a++){const n=e[i++],a=127&e[i++],r=127&e[i++];if(0===a&&0===r)continue;if(!!(4&n)){const e=3&n;0!==e&&1!==e||(t[e].push(a),t[e].push(r))}}return t}},audioStreamController:class extends o_{constructor(e,t,n){super(e,t,n,"[audio-stream-controller]",cA),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null}_registerListeners(){const{hls:e}=this;e.on(QE.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(QE.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.on(QE.LEVEL_LOADED,this.onLevelLoaded,this),e.on(QE.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(QE.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(QE.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(QE.ERROR,this.onError,this),e.on(QE.BUFFER_RESET,this.onBufferReset,this),e.on(QE.BUFFER_CREATED,this.onBufferCreated,this),e.on(QE.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(QE.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(QE.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(QE.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(QE.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(QE.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.off(QE.LEVEL_LOADED,this.onLevelLoaded,this),e.off(QE.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(QE.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(QE.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(QE.ERROR,this.onError,this),e.off(QE.BUFFER_RESET,this.onBufferReset,this),e.off(QE.BUFFER_CREATED,this.onBufferCreated,this),e.off(QE.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(QE.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(QE.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(QE.FRAG_BUFFERED,this.onFragBuffered,this)}onInitPtsFound(e,{frag:t,id:n,initPTS:i,timescale:a}){if("main"===n){const e=t.cc;this.initPTS[t.cc]={baseTime:i,timescale:a},this.log(`InitPTS for cc: ${e} found from main: ${i}`),this.videoTrackCC=e,this.state===a_&&this.tick()}}startLoad(e){if(!this.levels)return this.startPosition=e,void(this.state=Vx);const t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),t>0&&-1===e?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=Kx):(this.loadedmetadata=!1,this.state=Zx),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case Kx:this.doTickIdle();break;case Zx:{var e;const{levels:t,trackId:n}=this,i=null==t||null==(e=t[n])?void 0:e.details;if(i){if(this.waitForCdnTuneIn(i))break;this.state=a_}break}case Qx:{var t;const e=performance.now(),n=this.retryDate;if(!n||e>=n||null!=(t=this.media)&&t.seeking){const{levels:e,trackId:t}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((null==e?void 0:e[t])||null),this.state=Kx}break}case a_:{const e=this.waitingData;if(e){const{frag:t,part:n,cache:i,complete:a}=e;if(void 0!==this.initPTS[t.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=Jx;const e={frag:t,part:n,payload:i.flush(),networkDetails:null};this._handleFragmentLoadProgress(e),a&&super._handleFragmentLoadComplete(e)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${t.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const e=this.getLoadPosition(),n=Lx.bufferInfo(this.mediaBuffer,e,this.config.maxBufferHole);ex(n.end,this.config.maxFragLookUpTolerance,t)<0&&(this.log(`Waiting fragment cc (${t.cc}) @ ${t.start} cancelled because another fragment at ${n.end} is needed`),this.clearWaitingFragment())}}else this.state=Kx}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=Kx)}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;null!=e&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){const{hls:e,levels:t,media:n,trackId:i}=this,a=e.config;if(!n&&(this.startFragRequested||!a.startFragPrefetch)||null==t||!t[i])return;const r=t[i],o=r.details;if(!o||o.live&&this.levelLastLoaded!==r||this.waitForCdnTuneIn(o))return void(this.state=Zx);const s=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&s&&(this.bufferFlushed=!1,this.afterBufferFlushed(s,hT,cA));const l=this.getFwdBufferInfo(s,cA);if(null===l)return;const{bufferedTrack:d,switchingTrack:u}=this;if(!u&&this._streamEnded(l,o))return e.trigger(QE.BUFFER_EOS,{type:"audio"}),void(this.state=n_);const c=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,uA),h=l.len,m=this.getMaxBufferLength(null==c?void 0:c.len),f=o.fragments,p=f[0].start;let g=this.flushing?this.getLoadPosition():l.end;if(u&&n){const e=this.getLoadPosition();d&&!gC(u.attrs,d.attrs)&&(g=e),o.PTSKnown&&e<p&&(l.end>p||l.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=p+.05)}if(h>=m&&!u&&g<f[f.length-1].start)return;let v=this.getNextFragment(g,o),y=!1;if(v&&this.isLoopLoading(v,g)&&(y=!!v.gap,v=this.getNextFragmentLoopLoading(v,o,l,uA,m)),!v)return void(this.bufferFlushed=!0);const w=c&&v.start>c.end+o.targetduration;if(w||(null==c||!c.len)&&l.len){const e=this.getAppendedFrag(v.start,uA);if(null===e)return;if(y||(y=!!e.gap||!!w&&0===c.len),w&&!y||y&&l.nextStart&&l.nextStart<e.end)return}this.loadFragment(v,r,g)}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.min(Math.max(t,e),this.config.maxMaxBufferLength):t}onMediaDetaching(){this.videoBuffer=null,this.bufferFlushed=this.flushing=!1,super.onMediaDetaching()}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map((e=>new OA(e)))}onAudioTrackSwitching(e,t){const n=!!t.url;this.trackId=t.id;const{fragCurrent:i}=this;i&&(i.abortRequests(),this.removeUnbufferedFrags(i.start)),this.resetLoadingState(),n?this.setInterval(100):this.resetTransmuxer(),n?(this.switchingTrack=t,this.state=Kx,this.flushAudioIfNeeded(t)):(this.switchingTrack=null,this.bufferedTrack=t,this.state=Vx),this.tick()}onManifestLoading(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=this.flushing=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1}onLevelLoaded(e,t){this.mainDetails=t.details,null!==this.cachedTrackLoadedData&&(this.hls.trigger(QE.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(e,t){var n;if(null==this.mainDetails)return void(this.cachedTrackLoadedData=t);const{levels:i}=this,{details:a,id:r}=t;if(!i)return void this.warn(`Audio tracks were reset while loading level ${r}`);this.log(`Audio track ${r} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""},duration:${a.totalduration}`);const o=i[r];let s=0;if(a.live||null!=(n=o.details)&&n.live){this.checkLiveUpdate(a);const e=this.mainDetails;if(a.deltaUpdateFailed||!e)return;var l;if(!o.details&&a.hasProgramDateTime&&e.hasProgramDateTime)Ox(a,e),s=a.fragments[0].start;else s=this.alignPlaylists(a,o.details,null==(l=this.levelLastLoaded)?void 0:l.details)}o.details=a,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&a.live||this.setStartPosition(this.mainDetails||a,s),this.state!==Zx||this.waitForCdnTuneIn(a)||(this.state=Kx),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:n,part:i,payload:a}=e,{config:r,trackId:o,levels:s}=this;if(!s)return void this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);const l=s[o];if(!l)return void this.warn("Audio track is undefined on fragment load progress");const d=l.details;if(!d)return this.warn("Audio track details undefined on fragment load progress"),void this.removeUnbufferedFrags(n.start);const u=r.defaultAudioCodec||l.audioCodec||"mp4a.40.2";let c=this.transmuxer;c||(c=this.transmuxer=new fC(this.hls,cA,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const h=this.initPTS[n.cc],m=null==(t=n.initSegment)?void 0:t.data;if(void 0!==h){const e=!1,t=i?i.index:-1,r=-1!==t,o=new Ix(n.level,n.sn,n.stats.chunkCount,a.byteLength,t,r);c.push(a,m,u,"",n,i,d.totalduration,e,o,h)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${d.startSN} ,${d.endSN}],track ${o}`);const{cache:e}=this.waitingData=this.waitingData||{frag:n,part:i,cache:new s_,complete:!1};e.push(new Uint8Array(a)),this.waitingVideoCC=this.videoTrackCC,this.state=a_}}_handleFragmentLoadComplete(e){this.waitingData?this.waitingData.complete=!0:super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}onBufferCreated(e,t){const n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)}onFragBuffered(e,t){const{frag:n,part:i}=t;if(n.type===cA)if(this.fragContextChanged(n))this.warn(`Fragment ${n.sn}${i?" p: "+i.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);else{if("initSegment"!==n.sn){this.fragPrevious=n;const e=this.switchingTrack;e&&(this.bufferedTrack=e,this.switchingTrack=null,this.hls.trigger(QE.AUDIO_TRACK_SWITCHED,GE({},e)))}this.fragBufferedComplete(n,i)}else if(!this.loadedmetadata&&n.type===uA){const e=this.videoBuffer||this.media;if(e){Lx.getBuffered(e).length&&(this.loadedmetadata=!0)}}}onError(e,t){var n;if(t.fatal)this.state=i_;else switch(t.details){case eT.FRAG_GAP:case eT.FRAG_PARSING_ERROR:case eT.FRAG_DECRYPT_ERROR:case eT.FRAG_LOAD_ERROR:case eT.FRAG_LOAD_TIMEOUT:case eT.KEY_LOAD_ERROR:case eT.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(cA,t);break;case eT.AUDIO_TRACK_LOAD_ERROR:case eT.AUDIO_TRACK_LOAD_TIMEOUT:case eT.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==Zx||(null==(n=t.context)?void 0:n.type)!==lA||(this.state=Kx);break;case eT.BUFFER_APPEND_ERROR:case eT.BUFFER_FULL_ERROR:if(!t.parent||"audio"!==t.parent)return;if(t.details===eT.BUFFER_APPEND_ERROR)return void this.resetLoadingState();this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case eT.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}onBufferFlushing(e,{type:t}){t!==mT&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==mT){this.flushing=!1,this.bufferFlushed=!0,this.state===n_&&(this.state=Kx);const e=this.mediaBuffer||this.media;e&&(this.afterBufferFlushed(e,t,cA),this.tick())}}_handleTransmuxComplete(e){var t;const n="audio",{hls:i}=this,{remuxResult:a,chunkMeta:r}=e,o=this.getCurrentContext(r);if(!o)return void this.resetWhenMissingContext(r);const{frag:s,part:l,level:d}=o,{details:u}=d,{audio:c,text:h,id3:m,initSegment:f}=a;if(!this.fragContextChanged(s)&&u){if(this.state=e_,this.switchingTrack&&c&&this.completeAudioSwitch(this.switchingTrack),null!=f&&f.tracks){const e=s.initSegment||s;this._bufferInitSegment(d,f.tracks,e,r),i.trigger(QE.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:n,tracks:f.tracks})}if(c){const{startPTS:e,endPTS:t,startDTS:n,endDTS:i}=c;l&&(l.elementaryStreams[hT]={startPTS:e,endPTS:t,startDTS:n,endDTS:i}),s.setElementaryStreamInfo(hT,e,t,n,i),this.bufferFragmentData(c,s,l,r)}if(null!=m&&null!=(t=m.samples)&&t.length){const e=VE({id:n,frag:s,details:u},m);i.trigger(QE.FRAG_PARSING_METADATA,e)}if(h){const e=VE({id:n,frag:s,details:u},h);i.trigger(QE.FRAG_PARSING_USERDATA,e)}}else this.fragmentTracker.removeFragment(s)}_bufferInitSegment(e,t,n,i){if(this.state!==e_)return;t.video&&delete t.video;const a=t.audio;if(!a)return;a.id="audio";const r=e.audioCodec;this.log(`Init audio buffer, container:${a.container}, codecs[level/parsed]=[${r}/${a.codec}]`),r&&1===r.split(",").length&&(a.levelCodec=r),this.hls.trigger(QE.BUFFER_CODECS,t);const o=a.initSegment;if(null!=o&&o.byteLength){const e={type:"audio",frag:n,part:null,chunkMeta:i,parent:n.type,data:o};this.hls.trigger(QE.BUFFER_APPENDING,e)}this.tickImmediate()}loadFragment(e,t,n){const i=this.fragmentTracker.getState(e);var a;if(this.fragCurrent=e,this.switchingTrack||i===Mx||i===Tx)if("initSegment"===e.sn)this._loadInitSegment(e,t);else if(null!=(a=t.details)&&a.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=a_;const n=this.mainDetails;n&&n.fragments[0].start!==t.details.fragments[0].start&&Ox(t.details,n)}else this.startFragRequested=!0,super.loadFragment(e,t,n);else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){const{media:t,bufferedTrack:n}=this,i=null==n?void 0:n.attrs,a=e.attrs;t&&i&&(i.CHANNELS!==a.CHANNELS||n.name!==e.name||n.lang!==e.lang)&&(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null)}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(QE.AUDIO_TRACK_SWITCHED,GE({},e))}},audioTrackController:class extends dx{constructor(e){super(e,"[audio-track-controller]"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.on(QE.MANIFEST_PARSED,this.onManifestParsed,this),e.on(QE.LEVEL_LOADING,this.onLevelLoading,this),e.on(QE.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(QE.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(QE.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.off(QE.MANIFEST_PARSED,this.onManifestParsed,this),e.off(QE.LEVEL_LOADING,this.onLevelLoading,this),e.off(QE.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(QE.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(QE.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:n,groupId:i,details:a}=t,r=this.tracksInGroup[n];if(!r||r.groupId!==i)return void this.warn(`Audio track with id:${n} and group:${i} not found in active group ${null==r?void 0:r.groupId}`);const o=r.details;r.details=t.details,this.log(`Audio track ${n} "${r.name}" lang:${r.lang} group:${i} loaded [${a.startSN}-${a.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.audioGroups||null,i=this.groupIds;let a=this.currentTrack;if(!n||(null==i?void 0:i.length)!==(null==n?void 0:n.length)||null!=n&&n.some((e=>-1===(null==i?void 0:i.indexOf(e))))){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const e=this.tracks.filter((e=>!n||-1!==n.indexOf(e.groupId)));if(e.length)this.selectDefaultTrack&&!e.some((e=>e.default))&&(this.selectDefaultTrack=!1),e.forEach(((e,t)=>{e.id=t}));else if(!a&&!this.tracksInGroup.length)return;this.tracksInGroup=e;const t=this.hls.config.audioPreference;if(!a&&t){const n=yx(t,e,bx);if(n>-1)a=e[n];else{const e=yx(t,this.tracks);a=this.tracks[e]}}let i=this.findTrackId(a);-1===i&&a&&(i=this.findTrackId(null));const o={audioTracks:e};this.log(`Updating audio tracks, ${e.length} track(s) found in group(s): ${null==n?void 0:n.join(",")}`),this.hls.trigger(QE.AUDIO_TRACKS_UPDATED,o);const s=this.trackId;if(-1!==i&&-1===s)this.setAudioTrack(i);else if(e.length&&-1===s){var r;const t=new Error(`No audio track selected for current audio group-ID(s): ${null==(r=this.groupIds)?void 0:r.join(",")} track count: ${e.length}`);this.warn(t.message),this.hls.trigger(QE.ERROR,{type:ZE.MEDIA_ERROR,details:eT.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:t})}}else this.shouldReloadPlaylist(a)&&this.setAudioTrack(this.trackId)}onError(e,t){!t.fatal&&t.context&&(t.context.type!==lA||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||(this.requestScheduled=-1,this.checkRetry(t)))}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const n=this.allAudioTracks;if(this.selectDefaultTrack=!1,n.length){const i=this.currentTrack;if(i&&wx(e,i,bx))return i;const a=yx(e,this.tracksInGroup,bx);if(a>-1){const e=this.tracksInGroup[a];return this.setAudioTrack(a),e}if(i){let i=t.loadLevel;-1===i&&(i=t.firstAutoLevel);const a=function(e,t,n,i,a){const r=t[i],o=t.reduce(((e,t,n)=>{const i=t.uri;return(e[i]||(e[i]=[])).push(n),e}),{})[r.uri];o.length>1&&(i=Math.max.apply(Math,o));const s=r.videoRange,l=r.frameRate,d=r.codecSet.substring(0,4),u=kx(t,i,(t=>{if(t.videoRange!==s||t.frameRate!==l||t.codecSet.substring(0,4)!==d)return!1;const i=t.audioGroups,r=n.filter((e=>!i||-1!==i.indexOf(e.groupId)));return yx(e,r,a)>-1}));return u>-1?u:kx(t,i,(t=>{const i=t.audioGroups,r=n.filter((e=>!i||-1!==i.indexOf(e.groupId)));return yx(e,r,a)>-1}))}(e,t.levels,n,i,bx);if(-1===a)return null;t.nextLoadLevel=a}if(e.channels||e.audioCodec){const t=yx(e,n);if(t>-1)return n[t]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length)return void this.warn(`Invalid audio track id: ${e}`);this.clearTimer(),this.selectDefaultTrack=!1;const n=this.currentTrack,i=t[e],a=i.details&&!i.details.live;if(e===this.trackId&&i===n&&a)return;if(this.log(`Switching to audio-track ${e} "${i.name}" lang:${i.lang} group:${i.groupId} channels:${i.channels}`),this.trackId=e,this.currentTrack=i,this.hls.trigger(QE.AUDIO_TRACK_SWITCHING,GE({},i)),a)return;const r=this.switchParams(i.url,null==n?void 0:n.details,i.details);this.loadPlaylist(r)}findTrackId(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const i=t[n];if((!this.selectDefaultTrack||i.default)&&(!e||wx(e,i,bx)))return n}if(e){const{name:n,lang:i,assocLang:a,characteristics:r,audioCodec:o,channels:s}=e;for(let e=0;e<t.length;e++){if(wx({name:n,lang:i,assocLang:a,characteristics:r,audioCodec:o,channels:s},t[e],bx))return e}for(let n=0;n<t.length;n++){const i=t[n];if(gC(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return n}for(let n=0;n<t.length;n++){const i=t[n];if(gC(e.attrs,i.attrs,["LANGUAGE"]))return n}}return-1}loadPlaylist(e){const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){super.loadPlaylist();const n=t.id,i=t.groupId;let a=t.url;if(e)try{a=e.addDirectives(a)}catch(e){this.warn(`Could not construct new URL with HLS Delivery Directives: ${e}`)}this.log(`loading audio-track playlist ${n} "${t.name}" lang:${t.lang} group:${i}`),this.clearTimer(),this.hls.trigger(QE.AUDIO_TRACK_LOADING,{url:a,id:n,groupId:i,deliveryDirectives:e||null})}}},emeController:yL,cmcdController:class{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=e=>{try{this.apply(e,{ot:bL.MANIFEST,su:!this.initialized})}catch(e){rT.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=e=>{try{const t=e.frag,n=this.hls.levels[t.level],i=this.getObjectType(t),a={d:1e3*t.duration,ot:i};i!==bL.VIDEO&&i!==bL.AUDIO&&i!=bL.MUXED||(a.br=n.bitrate/1e3,a.tb=this.getTopBandwidth(i)/1e3,a.bl=this.getBufferLength(i)),this.apply(e,a)}catch(e){rT.warn("Could not generate segment CMCD data.",e)}},this.hls=e;const t=this.config=e.config,{cmcd:n}=t;null!=n&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=n.sessionId||function(){try{return crypto.randomUUID()}catch(e){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){let t=(new Date).getTime();const n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?n:3&n|8).toString(16)}));return n}}}(),this.cid=n.contentId,this.useHeaders=!0===n.useHeaders,this.includeKeys=n.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(QE.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(QE.MEDIA_DETACHED,this.onMediaDetached,this),e.on(QE.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(QE.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(QE.MEDIA_DETACHED,this.onMediaDetached,this),e.off(QE.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var n,i;this.audioBuffer=null==(n=t.tracks.audio)?void 0:n.buffer,this.videoBuffer=null==(i=t.tracks.video)?void 0:i.buffer}createData(){var e;return{v:1,sf:kL.HLS,sid:this.sid,cid:this.cid,pr:null==(e=this.media)?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){VE(t,this.createData());const n=t.ot===bL.INIT||t.ot===bL.VIDEO||t.ot===bL.MUXED;this.starved&&n&&(t.bs=!0,t.su=!0,this.starved=!1),null==t.su&&(t.su=this.buffering);const{includeKeys:i}=this;i&&(t=Object.keys(t).reduce(((e,n)=>(i.includes(n)&&(e[n]=t[n]),e)),{})),this.useHeaders?(e.headers||(e.headers={}),eI(e.headers,t)):e.url=iI(e.url,t)}getObjectType(e){const{type:t}=e;return"subtitle"===t?bL.TIMED_TEXT:"initSegment"===e.sn?bL.INIT:"audio"===t?bL.AUDIO:"main"===t?this.hls.audioTracks.length?bL.VIDEO:bL.MUXED:void 0}getTopBandwidth(e){let t,n=0;const i=this.hls;if(e===bL.AUDIO)t=i.audioTracks;else{const e=i.maxAutoLevel,n=e>-1?e+1:i.levels.length;t=i.levels.slice(0,n)}for(const e of t)e.bitrate>n&&(n=e.bitrate);return n>0?n:NaN}getBufferLength(e){const t=this.hls.media,n=e===bL.AUDIO?this.audioBuffer:this.videoBuffer;if(!n||!t)return NaN;return 1e3*Lx.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,n=e||this.config.loader;return class{constructor(e){this.loader=void 0,this.loader=new n(e)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,n,i){t(e),this.loader.load(e,n,i)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,n=e||this.config.loader;return class{constructor(e){this.loader=void 0,this.loader=new n(e)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,n,i){t(e),this.loader.load(e,n,i)}}}},contentSteeringController:class{constructor(e){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.log=rT.log.bind(rT,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.on(QE.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(QE.MANIFEST_PARSED,this.onManifestParsed,this),e.on(QE.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.off(QE.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(QE.MANIFEST_PARSED,this.onManifestParsed,this),e.off(QE.ERROR,this.onError,this))}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=1e3*this.timeToLoad-(performance.now()-this.updated);if(e>0)return void this.scheduleRefresh(this.uri,e)}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){-1!==this.reloadTimer&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter((t=>t!==e)))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:n}=t;null!==n&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:n}=t;if((null==n?void 0:n.action)===ix&&n.flags===sx){const e=this.levels;let i=this.pathwayPriority,a=this.pathwayId;if(t.context){const{groupId:n,pathwayId:i,type:r}=t.context;n&&e?a=this.getPathwayForGroupId(n,r,a):i&&(a=i)}a in this.penalizedPathways||(this.penalizedPathways[a]=performance.now()),!i&&e&&(i=e.reduce(((e,t)=>(-1===e.indexOf(t.pathwayId)&&e.push(t.pathwayId),e)),[])),i&&i.length>1&&(this.updatePathwayPriority(i),n.resolved=this.pathwayId!==a),n.resolved||rT.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${a} levels: ${e?e.length:e} priorities: ${JSON.stringify(i)} penalized: ${JSON.stringify(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(0===t.length){const n=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${n}"`),t=this.getLevelsForPathway(n),this.pathwayId=n}return t.length!==e.length?(this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t):e}getLevelsForPathway(e){return null===this.levels?[]:this.levels.filter((t=>e===t.pathwayId))}updatePathwayPriority(e){let t;this.pathwayPriority=e;const n=this.penalizedPathways,i=performance.now();Object.keys(n).forEach((e=>{i-n[e]>3e5&&delete n[e]}));for(let i=0;i<e.length;i++){const a=e[i];if(a in n)continue;if(a===this.pathwayId)return;const r=this.hls.nextLoadLevel,o=this.hls.levels[r];if(t=this.getLevelsForPathway(a),t.length>0){this.log(`Setting Pathway to "${a}"`),this.pathwayId=a,XA(t),this.hls.trigger(QE.LEVELS_UPDATED,{levels:t});const e=this.hls.levels[r];o&&e&&this.levels&&(e.attrs["STABLE-VARIANT-ID"]!==o.attrs["STABLE-VARIANT-ID"]&&e.bitrate!==o.bitrate&&this.log(`Unstable Pathways change from bitrate ${o.bitrate} to ${e.bitrate}`),this.hls.nextLoadLevel=r);break}}}getPathwayForGroupId(e,t,n){const i=this.getLevelsForPathway(n).concat(this.levels||[]);for(let n=0;n<i.length;n++)if(t===lA&&i[n].hasAudioGroup(e)||t===dA&&i[n].hasSubtitleGroup(e))return i[n].pathwayId;return n}clonePathways(e){const t=this.levels;if(!t)return;const n={},i={};e.forEach((e=>{const{ID:a,"BASE-ID":r,"URI-REPLACEMENT":o}=e;if(t.some((e=>e.pathwayId===a)))return;const s=this.getLevelsForPathway(r).map((e=>{const t=new lT(e.attrs);t["PATHWAY-ID"]=a;const r=t.AUDIO&&`${t.AUDIO}_clone_${a}`,s=t.SUBTITLES&&`${t.SUBTITLES}_clone_${a}`;r&&(n[t.AUDIO]=r,t.AUDIO=r),s&&(i[t.SUBTITLES]=s,t.SUBTITLES=s);const l=rI(e.uri,t["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",o),d=new OA({attrs:t,audioCodec:e.audioCodec,bitrate:e.bitrate,height:e.height,name:e.name,url:l,videoCodec:e.videoCodec,width:e.width});if(e.audioGroups)for(let t=1;t<e.audioGroups.length;t++)d.addGroupId("audio",`${e.audioGroups[t]}_clone_${a}`);if(e.subtitleGroups)for(let t=1;t<e.subtitleGroups.length;t++)d.addGroupId("text",`${e.subtitleGroups[t]}_clone_${a}`);return d}));t.push(...s),aI(this.audioTracks,n,o,a),aI(this.subtitleTracks,i,o,a)}))}loadSteeringManifest(e){const t=this.hls.config,n=t.loader;let i;this.loader&&this.loader.destroy(),this.loader=new n(t);try{i=new self.URL(e)}catch(t){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest URI: ${e}`)}if("data:"!==i.protocol){const e=0|(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate);i.searchParams.set("_HLS_pathway",this.pathwayId),i.searchParams.set("_HLS_throughput",""+e)}const a={responseType:"json",url:i.href},r=t.steeringManifestLoadPolicy.default,o=r.errorRetry||r.timeoutRetry||{},s={loadPolicy:r,timeout:r.maxLoadTimeMs,maxRetry:o.maxNumRetry||0,retryDelay:o.retryDelayMs||0,maxRetryDelay:o.maxRetryDelayMs||0},l={onSuccess:(e,t,n,a)=>{this.log(`Loaded steering manifest: "${i}"`);const r=e.data;if(1!==r.VERSION)return void this.log(`Steering VERSION ${r.VERSION} not supported!`);this.updated=performance.now(),this.timeToLoad=r.TTL;const{"RELOAD-URI":o,"PATHWAY-CLONES":s,"PATHWAY-PRIORITY":l}=r;if(o)try{this.uri=new self.URL(o,i).href}catch(e){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest RELOAD-URI: ${o}`)}this.scheduleRefresh(this.uri||n.url),s&&this.clonePathways(s);const d={steeringManifest:r,url:i.toString()};this.hls.trigger(QE.STEERING_MANIFEST_LOADED,d),l&&this.updatePathwayPriority(l)},onError:(e,t,n,i)=>{if(this.log(`Error loading steering manifest: ${e.code} ${e.text} (${t.url})`),this.stopLoad(),410===e.code)return this.enabled=!1,void this.log(`Steering manifest ${t.url} no longer available`);let a=1e3*this.timeToLoad;if(429!==e.code)this.scheduleRefresh(this.uri||t.url,a);else{const e=this.loader;if("function"==typeof(null==e?void 0:e.getResponseHeader)){const t=e.getResponseHeader("Retry-After");t&&(a=1e3*parseFloat(t))}this.log(`Steering manifest ${t.url} rate limited`)}},onTimeout:(e,t,n)=>{this.log(`Timeout loading steering manifest (${t.url})`),this.scheduleRefresh(this.uri||t.url)}};this.log(`Requesting steering manifest: ${i}`),this.loader.load(a,s,l)}scheduleRefresh(e,t=1e3*this.timeToLoad){this.clearTimeout(),this.reloadTimer=self.setTimeout((()=>{var t;const n=null==(t=this.hls)?void 0:t.media;!n||n.ended?this.scheduleRefresh(e,1e3*this.timeToLoad):this.loadSteeringManifest(e)}),t)}}});function pI(e){return e&&"object"==typeof e?Array.isArray(e)?e.map(pI):Object.keys(e).reduce(((t,n)=>(t[n]=pI(e[n]),t)),{}):e}function gI(e){const t=e.loader;if(t!==dI&&t!==sI)rT.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1;else{(function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1})()&&(e.loader=dI,e.progressive=!0,e.enableSoftwareAES=!0,rT.log("[config]: Progressive streaming enabled, using FetchLoader"))}}let vI;class yI extends dx{constructor(e,t){super(e,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.on(QE.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(QE.LEVEL_LOADED,this.onLevelLoaded,this),e.on(QE.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(QE.FRAG_BUFFERED,this.onFragBuffered,this),e.on(QE.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.off(QE.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(QE.LEVEL_LOADED,this.onLevelLoaded,this),e.off(QE.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(QE.FRAG_BUFFERED,this.onFragBuffered,this),e.off(QE.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach((e=>{e.loadError=0,e.fragmentError=0})),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const n=this.hls.config.preferManagedMediaSource,i=[],a={},r={};let o=!1,s=!1,l=!1;t.levels.forEach((e=>{var t,d;const u=e.attrs;let{audioCodec:c,videoCodec:h}=e;-1!==(null==(t=c)?void 0:t.indexOf("mp4a.40.34"))&&(vI||(vI=/chrome|firefox/i.test(navigator.userAgent)),vI&&(e.audioCodec=c=void 0)),c&&(e.audioCodec=c=GP(c,n)),0===(null==(d=h)?void 0:d.indexOf("avc1"))&&(h=e.videoCodec=function(e){const t=e.split(",");for(let e=0;e<t.length;e++){const n=t[e].split(".");if(n.length>2){let i=n.shift()+".";i+=parseInt(n.shift()).toString(16),i+=("000"+parseInt(n.shift()).toString(16)).slice(-4),t[e]=i}}return t.join(",")}(h));const{width:m,height:f,unknownCodecs:p}=e;if(o||(o=!(!m||!f)),s||(s=!!h),l||(l=!!c),null!=p&&p.length||c&&!FP(c,"audio",n)||h&&!FP(h,"video",n))return;const{CODECS:g,"FRAME-RATE":v,"HDCP-LEVEL":y,"PATHWAY-ID":w,RESOLUTION:b,"VIDEO-RANGE":k}=u,S=`${`${w||"."}-`}${e.bitrate}-${b}-${v}-${g}-${k}-${y}`;if(a[S])if(a[S].uri===e.url||e.attrs["PATHWAY-ID"])a[S].addGroupId("audio",u.AUDIO),a[S].addGroupId("text",u.SUBTITLES);else{const t=r[S]+=1;e.attrs["PATHWAY-ID"]=new Array(t+1).join(".");const n=new OA(e);a[S]=n,i.push(n)}else{const t=new OA(e);a[S]=t,r[S]=1,i.push(t)}})),this.filterAndSortMediaOptions(i,t,o,s,l)}filterAndSortMediaOptions(e,t,n,i,a){let r=[],o=[],s=e;if((n||i)&&a&&(s=s.filter((({videoCodec:e,videoRange:t,width:n,height:i})=>{return(!!e||!(!n||!i))&&(!!(a=t)&&LA.indexOf(a)>-1);var a}))),0===s.length)return void Promise.resolve().then((()=>{if(this.hls){t.levels.length&&this.warn(`One or more CODECS in variant not supported: ${JSON.stringify(t.levels[0].attrs)}`);const e=new Error("no level with compatible codecs found in manifest");this.hls.trigger(QE.ERROR,{type:ZE.MEDIA_ERROR,details:eT.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:e,reason:e.message})}}));if(t.audioTracks){const{preferManagedMediaSource:e}=this.hls.config;r=t.audioTracks.filter((t=>!t.audioCodec||FP(t.audioCodec,"audio",e))),wI(r)}t.subtitles&&(o=t.subtitles,wI(o));const l=s.slice(0);s.sort(((e,t)=>{if(e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"])return(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&e.height!==t.height)return e.height-t.height;if(e.frameRate!==t.frameRate)return e.frameRate-t.frameRate;if(e.videoRange!==t.videoRange)return LA.indexOf(e.videoRange)-LA.indexOf(t.videoRange);if(e.videoCodec!==t.videoCodec){const n=$P(e.videoCodec),i=$P(t.videoCodec);if(n!==i)return i-n}if(e.uri===t.uri&&e.codecSet!==t.codecSet){const n=UP(e.codecSet),i=UP(t.codecSet);if(n!==i)return i-n}return e.averageBitrate!==t.averageBitrate?e.averageBitrate-t.averageBitrate:0}));let d=l[0];if(this.steering&&(s=this.steering.filterParsedLevels(s),s.length!==l.length))for(let e=0;e<l.length;e++)if(l[e].pathwayId===s[0].pathwayId){d=l[e];break}this._levels=s;for(let e=0;e<s.length;e++)if(s[e]===d){var u;this._firstLevel=e;const t=d.bitrate,n=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${s.length} level(s) found, first bitrate: ${t}`),void 0===(null==(u=this.hls.userConfig)?void 0:u.abrEwmaDefaultEstimate)){const e=Math.min(t,this.hls.config.abrEwmaDefaultEstimateMax);e>n&&n===fI.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=e)}break}const c=a&&!i,h={levels:s,audioTracks:r,subtitleTracks:o,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:a,video:i,altAudio:!c&&r.some((e=>!!e.url))};this.hls.trigger(QE.MANIFEST_PARSED,h),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return 0===this._levels.length?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(0===t.length)return;if(e<0||e>=t.length){const n=new Error("invalid level idx"),i=e<0;if(this.hls.trigger(QE.ERROR,{type:ZE.OTHER_ERROR,details:eT.LEVEL_SWITCH_ERROR,level:e,fatal:i,error:n,reason:n.message}),i)return;e=Math.min(e,t.length-1)}const n=this.currentLevelIndex,i=this.currentLevel,a=i?i.attrs["PATHWAY-ID"]:void 0,r=t[e],o=r.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=r,n===e&&r.details&&i&&a===o)return;this.log(`Switching to level ${e} (${r.height?r.height+"p ":""}${r.videoRange?r.videoRange+" ":""}${r.codecSet?r.codecSet+" ":""}@${r.bitrate})${o?" with Pathway "+o:""} from level ${n}${a?" with Pathway "+a:""}`);const s={level:e,attrs:r.attrs,details:r.details,bitrate:r.bitrate,averageBitrate:r.averageBitrate,maxBitrate:r.maxBitrate,realBitrate:r.realBitrate,width:r.width,height:r.height,codecSet:r.codecSet,audioCodec:r.audioCodec,videoCodec:r.videoCodec,audioGroups:r.audioGroups,subtitleGroups:r.subtitleGroups,loaded:r.loaded,loadError:r.loadError,fragmentError:r.fragmentError,name:r.name,id:r.id,uri:r.uri,url:r.url,urlId:0,audioGroupIds:r.audioGroupIds,textGroupIds:r.textGroupIds};this.hls.trigger(QE.LEVEL_SWITCHING,s);const l=r.details;if(!l||l.live){const e=this.switchParams(r.uri,null==i?void 0:i.details,l);this.loadPlaylist(e)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(void 0===this._startLevel){const e=this.hls.config.startLevel;return void 0!==e?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}onError(e,t){!t.fatal&&t.context&&t.context.type===sA&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(void 0!==t&&t.type===uA){const e=t.elementaryStreams;if(!Object.keys(e).some((t=>!!e[t])))return;const n=this._levels[t.level];null!=n&&n.loadError&&(this.log(`Resetting level error count of ${n.loadError} on frag buffered`),n.loadError=0)}}onLevelLoaded(e,t){var n;const{level:i,details:a}=t,r=this._levels[i];var o;if(!r)return this.warn(`Invalid level index ${i}`),void(null!=(o=t.deliveryDirectives)&&o.skip&&(a.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===r.fragmentError&&(r.loadError=0),this.playlistLoaded(i,t,r.details)):null!=(n=t.deliveryDirectives)&&n.skip&&(a.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,n=this.currentLevel;if(n&&this.shouldLoadPlaylist(n)){let i=n.uri;if(e)try{i=e.addDirectives(i)}catch(e){this.warn(`Could not construct new URL with HLS Delivery Directives: ${e}`)}const a=n.attrs["PATHWAY-ID"];this.log(`Loading level index ${t}${void 0!==(null==e?void 0:e.msn)?" at sn "+e.msn+" part "+e.part:""} with${a?" Pathway "+a:""} ${i}`),this.clearTimer(),this.hls.trigger(QE.LEVEL_LOADING,{url:i,level:t,pathwayId:n.attrs["PATHWAY-ID"],id:0,deliveryDirectives:e||null})}}get nextLoadLevel(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;const n=this._levels.filter(((t,n)=>n!==e||(this.steering&&this.steering.removeLevel(t),t===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,t.details&&t.details.fragments.forEach((e=>e.level=-1))),!1)));XA(n),this._levels=n,this.currentLevelIndex>-1&&null!=(t=this.currentLevel)&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(QE.LEVELS_UPDATED,{levels:n})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:n}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(QE.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function wI(e){const t={};e.forEach((e=>{const n=e.groupId||"";e.id=t[n]=t[n]||0,t[n]++}))}class bI{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const n in this.keyUriToKeyInfo){const i=this.keyUriToKeyInfo[n].loader;if(i){var t;if(e&&e!==(null==(t=i.context)?void 0:t.frag.type))return;i.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=eT.KEY_LOAD_ERROR,n,i,a){return new Ux({type:ZE.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:a,error:n,networkDetails:i})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:n,cc:i}=e;for(let e=0;e<t.length;e++){const a=t[e];if(i<=a.cc&&("initSegment"===n||"initSegment"===a.sn||n<a.sn)){this.emeController.selectKeySystemFormat(a).then((e=>{a.setKeyFormat(e)}));break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(e).then((t=>this.loadInternal(e,t))):this.loadInternal(e)}loadInternal(e,t){var n,i;t&&e.setKeyFormat(t);const a=e.decryptdata;if(!a){const n=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,eT.KEY_LOAD_ERROR,n))}const r=a.uri;if(!r)return Promise.reject(this.createKeyLoadError(e,eT.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${r}"`)));let o=this.keyUriToKeyInfo[r];if(null!=(n=o)&&n.decryptdata.key)return a.key=o.decryptdata.key,Promise.resolve({frag:e,keyInfo:o});var s;if(null!=(i=o)&&i.keyLoadPromise)switch(null==(s=o.mediaKeySessionContext)?void 0:s.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return o.keyLoadPromise.then((t=>(a.key=t.keyInfo.decryptdata.key,{frag:e,keyInfo:o})))}switch(o=this.keyUriToKeyInfo[r]={decryptdata:a,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},a.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===a.keyFormat?this.loadKeyHTTP(o,e):this.loadKeyEME(o,e);case"AES-128":return this.loadKeyHTTP(o,e);default:return Promise.reject(this.createKeyLoadError(e,eT.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${a.method}"`)))}}loadKeyEME(e,t){const n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const t=this.emeController.loadKey(n);if(t)return(e.keyLoadPromise=t.then((t=>(e.mediaKeySessionContext=t,n)))).catch((t=>{throw e.keyLoadPromise=null,t}))}return Promise.resolve(n)}loadKeyHTTP(e,t){const n=this.config,i=new(0,n.loader)(n);return t.keyLoader=e.loader=i,e.keyLoadPromise=new Promise(((a,r)=>{const o={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},s=n.keyLoadPolicy.default,l={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(e,t,n,i)=>{const{frag:o,keyInfo:s,url:l}=n;if(!o.decryptdata||s!==this.keyUriToKeyInfo[l])return r(this.createKeyLoadError(o,eT.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),i));s.decryptdata.key=o.decryptdata.key=new Uint8Array(e.data),o.keyLoader=null,s.loader=null,a({frag:o,keyInfo:s})},onError:(e,n,i,a)=>{this.resetLoader(n),r(this.createKeyLoadError(t,eT.KEY_LOAD_ERROR,new Error(`HTTP Error ${e.code} loading key ${e.text}`),i,GE({url:o.url,data:void 0},e)))},onTimeout:(e,n,i)=>{this.resetLoader(n),r(this.createKeyLoadError(t,eT.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),i))},onAbort:(e,n,i)=>{this.resetLoader(n),r(this.createKeyLoadError(t,eT.INTERNAL_ABORTED,new Error("key loading aborted"),i))}};i.load(o,l,d)}))}resetLoader(e){const{frag:t,keyInfo:n,url:i}=e,a=n.loader;t.keyLoader===a&&(t.keyLoader=null,n.loader=null),delete this.keyUriToKeyInfo[i],a&&a.destroy()}}function kI(){return self.SourceBuffer||self.WebKitSourceBuffer}function SI(){if(!NP())return!1;const e=kI();return!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove}class MI{constructor(e,t,n,i){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=n,this.hls=i}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:n,media:i,stalled:a}=this;if(null===i)return;const{currentTime:r,seeking:o}=i,s=this.seeking&&!o,l=!this.seeking&&o;if(this.seeking=o,r!==e){if(this.moved=!0,o||(this.nudgeRetry=0),null!==a){if(this.stallReported){const e=self.performance.now()-a;rT.warn(`playback not stuck anymore @${r}, after ${Math.round(e)}ms`),this.stallReported=!1}this.stalled=null}return}if(l||s)return void(this.stalled=null);if(i.paused&&!o||i.ended||0===i.playbackRate||!Lx.getBuffered(i).length)return void(this.nudgeRetry=0);const d=Lx.bufferInfo(i,r,0),u=d.nextStart||0;if(o){const e=d.len>2,n=!u||t&&t.start<=r||u-r>2&&!this.fragmentTracker.getPartialFragment(r);if(e||n)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var c;if(!(d.len>0)&&!u)return;const e=Math.max(u,d.start||0)-r,t=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,n=(null==t||null==(c=t.details)?void 0:c.live)?2*t.details.targetduration:2,a=this.fragmentTracker.getPartialFragment(r);if(e>0&&(e<=n||a))return void(i.paused||this._trySkipBufferHole(a))}const h=self.performance.now();if(null===a)return void(this.stalled=h);const m=h-a;if(!o&&m>=250&&(this._reportStall(d),!this.media))return;const f=Lx.bufferInfo(i,r,n.maxBufferHole);this._tryFixBufferStall(f,m)}_tryFixBufferStall(e,t){const{config:n,fragmentTracker:i,media:a}=this;if(null===a)return;const r=a.currentTime,o=i.getPartialFragment(r);if(o){if(this._trySkipBufferHole(o)||!this.media)return}(e.len>n.maxBufferHole||e.nextStart&&e.nextStart-r<n.maxBufferHole)&&t>1e3*n.highBufferWatchdogPeriod&&(rT.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:n,stallReported:i}=this;if(!i&&n){this.stallReported=!0;const i=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${JSON.stringify(e)})`);rT.warn(i.message),t.trigger(QE.ERROR,{type:ZE.MEDIA_ERROR,details:eT.BUFFER_STALLED_ERROR,fatal:!1,error:i,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:n,media:i}=this;if(null===i)return 0;const a=i.currentTime,r=Lx.bufferInfo(i,a,0),o=a<r.start?r.start:r.nextStart;if(o){const s=r.len<=t.maxBufferHole,l=r.len>0&&r.len<1&&i.readyState<3,d=o-a;if(d>0&&(s||l)){if(d>t.maxBufferHole){const{fragmentTracker:t}=this;let n=!1;if(0===a){const e=t.getAppendedFrag(0,uA);e&&o<e.end&&(n=!0)}if(!n){const n=e||t.getAppendedFrag(a,uA);if(n){let e=!1,i=n.end;for(;i<o;){const n=t.getPartialFragment(i);if(!n){e=!0;break}i+=n.duration}if(e)return 0}}}const r=Math.max(o+.05,a+.1);if(rT.warn(`skipping hole, adjusting currentTime from ${a} to ${r}`),this.moved=!0,this.stalled=null,i.currentTime=r,e&&!e.gap){const t=new Error(`fragment loaded with buffer holes, seeking from ${a} to ${r}`);n.trigger(QE.ERROR,{type:ZE.MEDIA_ERROR,details:eT.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:t,reason:t.message,frag:e})}return r}}return 0}_tryNudgeBuffer(){const{config:e,hls:t,media:n,nudgeRetry:i}=this;if(null===n)return;const a=n.currentTime;if(this.nudgeRetry++,i<e.nudgeMaxRetry){const r=a+(i+1)*e.nudgeOffset,o=new Error(`Nudging 'currentTime' from ${a} to ${r}`);rT.warn(o.message),n.currentTime=r,t.trigger(QE.ERROR,{type:ZE.MEDIA_ERROR,details:eT.BUFFER_NUDGE_ON_STALL,error:o,fatal:!1})}else{const n=new Error(`Playhead still not moving while enough data buffered @${a} after ${e.nudgeMaxRetry} nudges`);rT.error(n.message),t.trigger(QE.ERROR,{type:ZE.MEDIA_ERROR,details:eT.BUFFER_STALLED_ERROR,error:n,fatal:!0})}}}class EI extends o_{constructor(e,t,n){super(e,t,n,"[stream-controller]",uA),this.audioCodecSwap=!1,this.gapController=null,this.level=-1,this._forceStartLoad=!1,this.altAudio=!1,this.audioOnly=!1,this.fragPlaying=null,this.onvplaying=null,this.onvseeked=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(QE.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(QE.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.on(QE.MANIFEST_PARSED,this.onManifestParsed,this),e.on(QE.LEVEL_LOADING,this.onLevelLoading,this),e.on(QE.LEVEL_LOADED,this.onLevelLoaded,this),e.on(QE.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(QE.ERROR,this.onError,this),e.on(QE.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(QE.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(QE.BUFFER_CREATED,this.onBufferCreated,this),e.on(QE.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(QE.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(QE.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(QE.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(QE.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(QE.MANIFEST_LOADING,this.onManifestLoading,this),e.off(QE.MANIFEST_PARSED,this.onManifestParsed,this),e.off(QE.LEVEL_LOADED,this.onLevelLoaded,this),e.off(QE.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(QE.ERROR,this.onError,this),e.off(QE.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(QE.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(QE.BUFFER_CREATED,this.onBufferCreated,this),e.off(QE.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(QE.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(QE.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying()}startLoad(e){if(this.levels){const{lastCurrentTime:t,hls:n}=this;if(this.stopLoad(),this.setInterval(100),this.level=-1,!this.startFragRequested){let e=n.startLevel;-1===e&&(n.config.testBandwidth&&this.levels.length>1?(e=0,this.bitrateTest=!0):e=n.firstAutoLevel),n.nextLoadLevel=e,this.level=n.loadLevel,this.loadedmetadata=!1}t>0&&-1===e&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=Kx,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=Vx}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case r_:{const{levels:e,level:t}=this,n=null==e?void 0:e[t],i=null==n?void 0:n.details;if(i&&(!i.live||this.levelLastLoaded===n)){if(this.waitForCdnTuneIn(i))break;this.state=Kx;break}if(this.hls.nextLoadLevel!==this.level){this.state=Kx;break}break}case Qx:{var e;const t=self.performance.now(),n=this.retryDate;if(!n||t>=n||null!=(e=this.media)&&e.seeking){const{levels:e,level:t}=this,n=null==e?void 0:e[t];this.resetStartWhenNotLoaded(n||null),this.state=Kx}}}this.state===Kx&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:n,media:i}=this;if(null===t||!i&&(this.startFragRequested||!e.config.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;const a=e.nextLoadLevel;if(null==n||!n[a])return;const r=n[a],o=this.getMainFwdBufferInfo();if(null===o)return;const s=this.getLevelDetails();if(s&&this._streamEnded(o,s)){const e={};return this.altAudio&&(e.type="video"),this.hls.trigger(QE.BUFFER_EOS,e),void(this.state=n_)}e.loadLevel!==a&&-1===e.manualLevel&&this.log(`Adapting to level ${a} from level ${this.level}`),this.level=e.nextLoadLevel=a;const l=r.details;if(!l||this.state===r_||l.live&&this.levelLastLoaded!==r)return this.level=a,void(this.state=r_);const d=o.len,u=this.getMaxBufferLength(r.maxBitrate);if(d>=u)return;this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);const c=this.backtrackFragment?this.backtrackFragment.start:o.end;let h=this.getNextFragment(c,l);if(this.couldBacktrack&&!this.fragPrevious&&h&&"initSegment"!==h.sn&&this.fragmentTracker.getState(h)!==Px){var m;const e=(null!=(m=this.backtrackFragment)?m:h).sn-l.startSN,t=l.fragments[e-1];t&&h.cc===t.cc&&(h=t,this.fragmentTracker.removeFragment(t))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(h&&this.isLoopLoading(h,c)){if(!h.gap){const e=this.audioOnly&&!this.altAudio?hT:mT,t=(e===mT?this.videoBuffer:this.mediaBuffer)||this.media;t&&this.afterBufferFlushed(t,e,uA)}h=this.getNextFragmentLoopLoading(h,l,o,uA,u)}h&&(!h.initSegment||h.initSegment.data||this.bitrateTest||(h=h.initSegment),this.loadFragment(h,r,c))}loadFragment(e,t,n){const i=this.fragmentTracker.getState(e);this.fragCurrent=e,i===Mx||i===Tx?"initSegment"===e.sn?this._loadInitSegment(e,t):this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):(this.startFragRequested=!0,super.loadFragment(e,t,n)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,uA)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(null!=t&&t.readyState){let n;const i=this.getAppendedFrag(t.currentTime);i&&i.start>1&&this.flushMainBuffer(0,i.start-1);const a=this.getLevelDetails();if(null!=a&&a.live){const e=this.getMainFwdBufferInfo();if(!e||e.len<2*a.targetduration)return}if(!t.paused&&e){const t=e[this.hls.nextLoadLevel],i=this.fragLastKbps;n=i&&this.fragCurrent?this.fragCurrent.duration*t.maxBitrate/(1e3*i)+1:0}else n=0;const r=this.getBufferedFrag(t.currentTime+n);if(r){const e=this.followingBufferedFrag(r);if(e){this.abortCurrentFrag();const t=e.maxStartPTS?e.maxStartPTS:e.start,n=e.duration,i=Math.max(r.end,t+Math.min(Math.max(n-this.config.maxFragLookUpTolerance,n*(this.couldBacktrack?.5:.125)),n*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(i,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case qx:case Jx:case Qx:case e_:case t_:this.state=Kx}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const n=t.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),n.addEventListener("playing",this.onvplaying),n.addEventListener("seeked",this.onvseeked),this.gapController=new MI(this.config,n,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const e=this.media,t=e?e.currentTime:null;KE(t)&&this.log(`Media seeked to ${t.toFixed(3)}`);const n=this.getMainFwdBufferInfo();null!==n&&0!==n.len?this.tick():this.warn(`Main forward buffer length on "seeked" event ${n?n.len:"empty"})`)}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(QE.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=this.fragLastKbps=0,this.levels=this.fragPlaying=this.backtrackFragment=this.levelLastLoaded=null,this.altAudio=this.audioOnly=this.startFragRequested=!1}onManifestParsed(e,t){let n=!1,i=!1;t.levels.forEach((e=>{const t=e.audioCodec;t&&(n=n||-1!==t.indexOf("mp4a.40.2"),i=i||-1!==t.indexOf("mp4a.40.5"))})),this.audioCodecSwitch=n&&i&&!function(){var e;const t=kI();return"function"==typeof(null==t||null==(e=t.prototype)?void 0:e.changeType)}(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:n}=this;if(!n||this.state!==Kx)return;const i=n[t.level];(!i.details||i.details.live&&this.levelLastLoaded!==i||this.waitForCdnTuneIn(i.details))&&(this.state=r_)}onLevelLoaded(e,t){var n;const{levels:i}=this,a=t.level,r=t.details,o=r.totalduration;if(!i)return void this.warn(`Levels were reset while loading level ${a}`);this.log(`Level ${a} loaded [${r.startSN},${r.endSN}]${r.lastPartSn?`[part-${r.lastPartSn}-${r.lastPartIndex}]`:""}, cc [${r.startCC}, ${r.endCC}] duration:${o}`);const s=i[a],l=this.fragCurrent;!l||this.state!==Jx&&this.state!==Qx||l.level!==t.level&&l.loader&&this.abortCurrentFrag();let d=0;if(r.live||null!=(n=s.details)&&n.live){var u;if(this.checkLiveUpdate(r),r.deltaUpdateFailed)return;d=this.alignPlaylists(r,s.details,null==(u=this.levelLastLoaded)?void 0:u.details)}if(s.details=r,this.levelLastLoaded=s,this.hls.trigger(QE.LEVEL_UPDATED,{details:r,level:a}),this.state===r_){if(this.waitForCdnTuneIn(r))return;this.state=Kx}this.startFragRequested?r.live&&this.synchronizeToLiveEdge(r):this.setStartPosition(r,d),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:n,part:i,payload:a}=e,{levels:r}=this;if(!r)return void this.warn(`Levels were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);const o=r[n.level],s=o.details;if(!s)return this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),void this.fragmentTracker.removeFragment(n);const l=o.videoCodec,d=s.PTSKnown||!s.live,u=null==(t=n.initSegment)?void 0:t.data,c=this._getAudioCodec(o),h=this.transmuxer=this.transmuxer||new fC(this.hls,uA,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),m=i?i.index:-1,f=-1!==m,p=new Ix(n.level,n.sn,n.stats.chunkCount,a.byteLength,m,f),g=this.initPTS[n.cc];h.push(a,u,c,l,n,i,s.totalduration,d,p,g)}onAudioTrackSwitching(e,t){const n=this.altAudio;if(!!!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const e=this.fragCurrent;e&&(this.log("Switching to main audio track, cancel main fragment load"),e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const e=this.hls;n&&(e.trigger(QE.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),e.trigger(QE.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=t.id,i=!!this.hls.audioTracks[n].url;if(i){const e=this.videoBuffer;e&&this.mediaBuffer!==e&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=e)}this.altAudio=i,this.tick()}onBufferCreated(e,t){const n=t.tracks;let i,a,r=!1;for(const e in n){const t=n[e];if("main"===t.id){if(a=e,i=t,"video"===e){const t=n[e];t&&(this.videoBuffer=t.buffer)}}else r=!0}r&&i?(this.log(`Alternate track found, use ${a}.buffered to schedule main fragment loading`),this.mediaBuffer=i.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:n,part:i}=t;if(n&&n.type!==uA)return;if(this.fragContextChanged(n))return this.warn(`Fragment ${n.sn}${i?" p: "+i.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`),void(this.state===t_&&(this.state=Kx));const a=i?i.stats:n.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.loading.first)),"initSegment"!==n.sn&&(this.fragPrevious=n),this.fragBufferedComplete(n,i)}onError(e,t){var n;if(t.fatal)this.state=i_;else switch(t.details){case eT.FRAG_GAP:case eT.FRAG_PARSING_ERROR:case eT.FRAG_DECRYPT_ERROR:case eT.FRAG_LOAD_ERROR:case eT.FRAG_LOAD_TIMEOUT:case eT.KEY_LOAD_ERROR:case eT.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(uA,t);break;case eT.LEVEL_LOAD_ERROR:case eT.LEVEL_LOAD_TIMEOUT:case eT.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==r_||(null==(n=t.context)?void 0:n.type)!==sA||(this.state=Kx);break;case eT.BUFFER_APPEND_ERROR:case eT.BUFFER_FULL_ERROR:if(!t.parent||"main"!==t.parent)return;if(t.details===eT.BUFFER_APPEND_ERROR)return void this.resetLoadingState();this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case eT.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}checkBuffer(){const{media:e,gapController:t}=this;if(e&&t&&e.readyState){if(this.loadedmetadata||!Lx.getBuffered(e).length){const e=this.state!==Kx?this.fragCurrent:null;t.poll(this.lastCurrentTime,e)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=Kx,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==hT||this.audioOnly&&!this.altAudio){const e=(t===mT?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(e,t,uA),this.tick()}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let n=this.startPosition;if(n>=0&&t<n){if(e.seeking)return void this.log(`could not seek to ${n}, already seeking at ${t}`);const i=Lx.getBuffered(e),a=(i.length?i.start(0):0)-n;a>0&&(a<this.config.maxBufferHole||a<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${a} to match buffer start`),n+=a,this.startPosition=n),this.log(`seek to target start position ${n} from current time ${t}`),e.currentTime=n}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then((n=>{const{hls:i}=this;if(!n||this.fragContextChanged(e))return;t.fragmentError=0,this.state=Kx,this.startFragRequested=!1,this.bitrateTest=!1;const a=e.stats;a.parsing.start=a.parsing.end=a.buffering.start=a.buffering.end=self.performance.now(),i.trigger(QE.FRAG_LOADED,n),e.bitrateTest=!1}))}_handleTransmuxComplete(e){var t;const n="main",{hls:i}=this,{remuxResult:a,chunkMeta:r}=e,o=this.getCurrentContext(r);if(!o)return void this.resetWhenMissingContext(r);const{frag:s,part:l,level:d}=o,{video:u,text:c,id3:h,initSegment:m}=a,{details:f}=d,p=this.altAudio?void 0:a.audio;if(this.fragContextChanged(s))this.fragmentTracker.removeFragment(s);else{if(this.state=e_,m){if(null!=m&&m.tracks){const e=s.initSegment||s;this._bufferInitSegment(d,m.tracks,e,r),i.trigger(QE.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:n,tracks:m.tracks})}const e=m.initPTS,t=m.timescale;KE(e)&&(this.initPTS[s.cc]={baseTime:e,timescale:t},i.trigger(QE.INIT_PTS_FOUND,{frag:s,id:n,initPTS:e,timescale:t}))}if(u&&f&&"initSegment"!==s.sn){const e=f.fragments[s.sn-1-f.startSN],t=s.sn===f.startSN,n=!e||s.cc>e.cc;if(!1!==a.independent){const{startPTS:e,endPTS:i,startDTS:a,endDTS:o}=u;if(l)l.elementaryStreams[u.type]={startPTS:e,endPTS:i,startDTS:a,endDTS:o};else if(u.firstKeyFrame&&u.independent&&1===r.id&&!n&&(this.couldBacktrack=!0),u.dropped&&u.independent){const a=this.getMainFwdBufferInfo(),r=(a?a.end:this.getLoadPosition())+this.config.maxBufferHole,l=u.firstKeyFramePTS?u.firstKeyFramePTS:e;if(!t&&r<l-this.config.maxBufferHole&&!n)return void this.backtrack(s);n&&(s.gap=!0),s.setElementaryStreamInfo(u.type,s.start,i,s.start,o,!0)}else t&&e>2&&(s.gap=!0);s.setElementaryStreamInfo(u.type,e,i,a,o),this.backtrackFragment&&(this.backtrackFragment=s),this.bufferFragmentData(u,s,l,r,t||n)}else{if(!t&&!n)return void this.backtrack(s);s.gap=!0}}if(p){const{startPTS:e,endPTS:t,startDTS:n,endDTS:i}=p;l&&(l.elementaryStreams[hT]={startPTS:e,endPTS:t,startDTS:n,endDTS:i}),s.setElementaryStreamInfo(hT,e,t,n,i),this.bufferFragmentData(p,s,l,r)}if(f&&null!=h&&null!=(t=h.samples)&&t.length){const e={id:n,frag:s,details:f,samples:h.samples};i.trigger(QE.FRAG_PARSING_METADATA,e)}if(f&&c){const e={id:n,frag:s,details:f,samples:c.samples};i.trigger(QE.FRAG_PARSING_USERDATA,e)}}}_bufferInitSegment(e,t,n,i){if(this.state!==e_)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:a,video:r,audiovideo:o}=t;if(a){let t=e.audioCodec;const n=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){t&&(t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5");const e=a.metadata;e&&"channelCount"in e&&1!==(e.channelCount||1)&&-1===n.indexOf("firefox")&&(t="mp4a.40.5")}t&&-1!==t.indexOf("mp4a.40.5")&&-1!==n.indexOf("android")&&"audio/mpeg"!==a.container&&(t="mp4a.40.2",this.log(`Android: force audio codec to ${t}`)),e.audioCodec&&e.audioCodec!==t&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${t}"`),a.levelCodec=t,a.id="main",this.log(`Init audio buffer, container:${a.container}, codecs[selected/level/parsed]=[${t||""}/${e.audioCodec||""}/${a.codec}]`)}r&&(r.levelCodec=e.videoCodec,r.id="main",this.log(`Init video buffer, container:${r.container}, codecs[level/parsed]=[${e.videoCodec||""}/${r.codec}]`)),o&&this.log(`Init audiovideo buffer, container:${o.container}, codecs[level/parsed]=[${e.codecs}/${o.codec}]`),this.hls.trigger(QE.BUFFER_CODECS,t),Object.keys(t).forEach((e=>{const a=t[e].initSegment;null!=a&&a.byteLength&&this.hls.trigger(QE.BUFFER_APPENDING,{type:e,data:a,frag:n,part:null,chunkMeta:i,parent:n.type})})),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,uA)}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=Kx}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&!1===e.seeking){const n=e.currentTime;if(Lx.isBuffered(e,n)?t=this.getAppendedFrag(n):Lx.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;const e=this.fragPlaying,n=t.level;e&&t.sn===e.sn&&e.level===n||(this.fragPlaying=t,this.hls.trigger(QE.FRAG_CHANGED,{frag:t}),e&&e.level===n||this.hls.trigger(QE.LEVEL_SWITCHED,{level:n}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const t=e.currentTime,n=this.currentFrag;if(n&&KE(t)&&KE(n.programDateTime)){const e=n.programDateTime+1e3*(t-n.start);return new Date(e)}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class TI{static get version(){return"1.5.15"}static isMSESupported(){return SI()}static isSupported(){return function(){if(!SI())return!1;const e=NP();return"function"==typeof(null==e?void 0:e.isTypeSupported)&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some((t=>e.isTypeSupported(zP(t,"video"))))||["mp4a.40.2","fLaC"].some((t=>e.isTypeSupported(zP(t,"audio")))))}()}static getMediaSource(){return NP()}static get Events(){return QE}static get ErrorTypes(){return ZE}static get ErrorDetails(){return eT}static get DefaultConfig(){return TI.defaultConfig?TI.defaultConfig:fI}static set DefaultConfig(e){TI.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this.started=!1,this._emitter=new mC,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,this.triggeringException=void 0,function(e,t){if("object"==typeof console&&!0===e||"object"==typeof e){aT(e,"debug","log","info","warn","error");try{iT.log(`Debug logs enabled for "${t}" in hls.js version 1.5.15`)}catch(e){iT=nT}}else iT=nT}(e.debug||!1,"Hls instance");const t=this.config=function(e,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const n=pI(e),i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return["manifest","level","frag"].forEach((e=>{const a=`${"level"===e?"playlist":e}LoadPolicy`,r=void 0===t[a],o=[];i.forEach((i=>{const s=`${e}Loading${i}`,l=t[s];if(void 0!==l&&r){o.push(s);const e=n[a].default;switch(t[a]={default:e},i){case"TimeOut":e.maxLoadTimeMs=l,e.maxTimeToFirstByteMs=l;break;case"MaxRetry":e.errorRetry.maxNumRetry=l,e.timeoutRetry.maxNumRetry=l;break;case"RetryDelay":e.errorRetry.retryDelayMs=l,e.timeoutRetry.retryDelayMs=l;break;case"MaxRetryTimeout":e.errorRetry.maxRetryDelayMs=l,e.timeoutRetry.maxRetryDelayMs=l}}})),o.length&&rT.warn(`hls.js config: "${o.join('", "')}" setting(s) are deprecated, use "${a}": ${JSON.stringify(t[a])}`)})),GE(GE({},n),t)}(TI.DefaultConfig,e);this.userConfig=e,t.progressive&&gI(t);const{abrController:n,bufferController:i,capLevelController:a,errorController:r,fpsController:o}=t,s=new r(this),l=this.abrController=new n(this),d=this.bufferController=new i(this),u=this.capLevelController=new a(this),c=new o(this),h=new pA(this),m=new xA(this),f=t.contentSteeringController,p=f?new f(this):null,g=this.levelController=new yI(this,p),v=new Ax(this),y=new bI(this.config),w=this.streamController=new EI(this,v,y);u.setStreamController(w),c.setStreamController(w);const b=[h,g,w];p&&b.splice(1,0,p),this.networkControllers=b;const k=[l,d,u,c,m,v];this.audioTrackController=this.createController(t.audioTrackController,b);const S=t.audioStreamController;S&&b.push(new S(this,v,y)),this.subtitleTrackController=this.createController(t.subtitleTrackController,b);const M=t.subtitleStreamController;M&&b.push(new M(this,v,y)),this.createController(t.timelineController,k),y.emeController=this.emeController=this.createController(t.emeController,k),this.cmcdController=this.createController(t.cmcdController,k),this.latencyController=this.createController(_A,k),this.coreComponents=k,b.push(s);const E=s.onErrorOut;"function"==typeof E&&this.on(QE.ERROR,E,s)}createController(e,t){if(e){const n=new e(this);return t&&t.push(n),n}return null}on(e,t,n=this){this._emitter.on(e,t,n)}once(e,t,n=this){this._emitter.once(e,t,n)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,n=this,i){this._emitter.off(e,t,n,i)}listeners(e){return this._emitter.listeners(e)}emit(e,t,n){return this._emitter.emit(e,t,n)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){if(rT.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),!this.triggeringException){this.triggeringException=!0;const n=e===QE.ERROR;this.trigger(QE.ERROR,{type:ZE.OTHER_ERROR,details:eT.INTERNAL_EXCEPTION,fatal:n,event:e,error:t}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){rT.log("destroy"),this.trigger(QE.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((e=>e.destroy())),this.networkControllers.length=0,this.coreComponents.forEach((e=>e.destroy())),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){rT.log("attachMedia"),this._media=e,this.trigger(QE.MEDIA_ATTACHING,{media:e})}detachMedia(){rT.log("detachMedia"),this.trigger(QE.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,n=this.url,i=this.url=HE.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,rT.log(`loadSource:${i}`),t&&n&&(n!==i||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(QE.MANIFEST_LOADING,{url:e})}startLoad(e=-1){rT.log(`startLoad(${e})`),this.started=!0,this.networkControllers.forEach((t=>{t.startLoad(e)}))}stopLoad(){rT.log("stopLoad"),this.started=!1,this.networkControllers.forEach((e=>{e.stopLoad()}))}resumeBuffering(){this.started&&this.networkControllers.forEach((e=>{"fragmentLoader"in e&&e.startLoad(-1)}))}pauseBuffering(){this.networkControllers.forEach((e=>{"fragmentLoader"in e&&e.stopLoad()}))}swapAudioCodec(){rT.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){rT.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e){this.levelController.removeLevel(e)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){rT.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){rT.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){rT.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){rT.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return-1===e&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){rT.log(`set startLevel:${e}`),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(rT.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){(function(e){return CA.indexOf(e)>-1})(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return-1===this.levelController.manualLevel}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const n=e.length;for(let i=0;i<n;i++)if(e[i].maxBitrate>=t)return i;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:n}=this;let i;if(i=-1===t&&null!=e&&e.length?e.length-1:t,n)for(let t=i;t--;){const i=e[t].attrs["HDCP-LEVEL"];if(i&&i<=n)return t}return i}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}setAudioOption(e){var t;return null==(t=this.audioTrackController)?void 0:t.setAudioOption(e)}setSubtitleOption(e){var t;return null==(t=this.subtitleTrackController)||t.setSubtitleOption(e),null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return!!e&&e.subtitleDisplay}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}TI.defaultConfig=void 0;let PI=class extends Yu{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1,this.bgVideo=!1}styles(){const{url:e,imageCropping:t,alignment:n,rightMargin:i,spacing:r}=this.component,o="fit"===t,s=this.getRootNode().host.tagName.toLowerCase();this.bgVideo=s.includes("background");const l=o?"":a(` position: ${this.bgVideo?"fixed":"relative"};\n right: 0;\n top: 0;\n min-width: 100%;\n `);return a(`\n :host {\n box-sizing: border-box;\n display: flex;\n transition: all 0.3s;\n background-image: url(${e});\n background-size: ${o?"contain":"cover"};\n background-position: ${n||""} center;\n background-repeat: no-repeat;\n ${Ic(this.component,this.scaleFactor)};\n margin-right: ${i||r||0}px;\n ${Oc(this.component,this.scaleFactor,!1)}\n ${this.component.hidden?"display:none":""}\n ${l}\n }\n :host(:focus) {\n ${Oc(this.component,this.scaleFactor,!0)}\n }\n #nami-video {\n ${Ic(this.component,this.scaleFactor)};\n object-fit: ${o?"contain":"cover"};\n }\n `)}loadMediaSrc(e){const{url:t}=this.component;if(t&&!t.includes(Ce)&&e.src!==t)if(!t.includes("m3u8")||e.canPlayType("application/vnd.apple.mpegurl"))e.src=t;else if(TI.isSupported()){const n=new TI;n.loadSource(t),n.attachMedia(e)}}updated(){Object.keys(this.component).forEach((e=>{this.component[e]=Yc(this.component[e])}));const{id:e,title:t,autoplayVideo:n,mute:i,loopVideo:a,controlsType:r,fallbackImage:o}=this.component,s=this.shadowRoot?.getElementById("nami-video");s&&(s.autoplay=n??!1,s.loop=a??!1,s.muted=!!n||(i??!1),s.controls="none"!==r,s.poster=o??"",s.playsInline=n??this.bgVideo,this.loadMediaSrc(s),Ah.instance=new Ah(s,t,e))}render(){const{focusedBorderColor:e,focusedFillColor:t,fillColor:n,screenreaderText:a,title:r}=this.component;return this.ariaLabel=a??r??"",!e&&Zc(n,t)||(this.tabIndex=0),i`<video id="nami-video" preload="auto"></video>`}};c([Xu({type:Object})],PI.prototype,"component",void 0),c([Xu({type:Boolean})],PI.prototype,"inFocusedState",void 0),c([Xu({type:Number})],PI.prototype,"scaleFactor",void 0),PI=c([ku("nami-video")],PI);let AI=class extends Yu{constructor(){super(...arguments),this.inFocusedState=!1,this.height=0,this.scaleFactor=1,this.isCollapsed=!0,this._handleClick=()=>{this.isCollapsed=!this.isCollapsed,lu.setOpenHeaderIds(this.component.id||"",this.component.sku),this.height=this.shadowRoot?.getElementById("collapse")?.scrollHeight||0,this.shadowRoot?.getElementById("collapse")?.classList.toggle("hidden")}}styles(){const{component:e,height:t,scaleFactor:n}=this,{backgroundBlur:i}=e;return a(`\n :host {\n display: ${e.hidden?"none":"flex"};\n gap: ${e.spacing||0}px;\n ${i?`backdrop-filter: blur(${i}px);`:""}\n ${Tc(e,!1)};\n ${Pc(this.component)}\n ${Oc(e,n,!1)}\n cursor: pointer;\n }\n :host(:focus){\n ${Tc(e,!0)}\n ${Oc(e,n,!0)}\n }\n #collapse.hidden{\n max-height: 0;\n opacity: 0;\n }\n #collapse {\n ${Ic(e,n)}\n max-height: ${t}px;\n opacity: 1;\n transition: all linear 0.5s;\n }\n #collapse-btn{\n background: transparent;\n border: none;\n width: 100%;\n }\n `)}render(){const{components:e,collapseHeader:t,focusedBorderColor:n,focusedFillColor:a,fillColor:r}=this.component;!n&&Zc(r,a)||(this.tabIndex=0);const o=e.map((e=>eh(e,this.scaleFactor,this.inFocusedState)));return i`
|
|
71
|
-
<button
|
|
72
|
-
id="collapse-btn"
|
|
73
|
-
aria-label="${this.isCollapsed?"Expand":"Collapse"}"
|
|
74
|
-
aria-expanded=${!this.isCollapsed}
|
|
75
|
-
@click=${this._handleClick}
|
|
76
|
-
>
|
|
77
|
-
${eh(t,this.scaleFactor,this.inFocusedState)}
|
|
78
|
-
</button>
|
|
79
|
-
|
|
80
|
-
<div
|
|
81
|
-
id="collapse"
|
|
82
|
-
class="hidden"
|
|
83
|
-
aria-hidden=${this.isCollapsed}
|
|
84
|
-
tabindex="${this.isCollapsed?"-1":"0"}"
|
|
85
|
-
>
|
|
86
|
-
${o}
|
|
87
|
-
</div>
|
|
88
|
-
`}};c([Xu({type:Object})],AI.prototype,"component",void 0),c([Xu({type:Boolean})],AI.prototype,"inFocusedState",void 0),c([Xu({type:Number})],AI.prototype,"height",void 0),c([Xu({type:Number})],AI.prototype,"scaleFactor",void 0),AI=c([ku("nami-collapse-container")],AI);let xI=class extends Yu{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1,this.mouseDown=!1,this.startDragging=e=>{e.preventDefault(),this.mouseDown=!0,this.startX=e.pageX-this.offsetLeft},this.stopDragging=()=>{this.mouseDown=!1},this.move=e=>{e.preventDefault(),this.mouseDown&&(this.scrollLeft=this.scrollLeft-(e.pageX-this.offsetLeft-this.startX))}}connectedCallback(){super.connectedCallback(),this.addEventListener("mousemove",this.move,!1),this.addEventListener("mousedown",this.startDragging,!1),this.addEventListener("mouseup",this.stopDragging,!1),this.addEventListener("mouseleave",this.stopDragging,!1)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("mousemove",this.move,!1),this.removeEventListener("mousedown",this.startDragging,!1),this.removeEventListener("mouseup",this.stopDragging,!1),this.removeEventListener("mouseleave",this.stopDragging,!1)}styles(){const e="vertical"===this.component.direction,t=e?"margin-top":"margin-left";return a(`\n :host {\n display: ${this.component.hidden?"none":"grid"};\n grid-gap: ${this.component.spacing}px;\n grid-auto-flow: ${e?"row":"column"};\n overflow: auto;\n place-items: center;\n ${Tc(this.component,!1)}\n ${Fc(this.component,!1)}\n align-self: baseline;\n cursor: grab;\n }\n :host(:focus){\n ${Tc(this.component,!0)}\n ${Fc(this.component,!0)}\n }\n :host > :not(:first-child) {\n ${t}: ${this.component.spacing||0}px;\n }\n `)}render(){const{focusedBorderColor:e,focusedFillColor:t,fillColor:n}=this.component;!e&&Zc(n,t)||(this.tabIndex=0);const i=function(e){if(!e.loopSource)return[];const t=JSON.parse(e.loopSource)?.map((t=>(e.loopSourceConditions?.every((e=>Vc(e,t))),Bc(e.components,Bc({block:t},{block:t})))))??[];return t.filter((e=>null!=e))}(this.component);return i.map((e=>e.map((e=>eh(e,this.scaleFactor,this.inFocusedState)))))}};function _I(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function CI(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(t).forEach((n=>{void 0===e[n]?e[n]=t[n]:_I(t[n])&&_I(e[n])&&Object.keys(t[n]).length>0&&CI(e[n],t[n])}))}c([Xu({type:Object})],xI.prototype,"component",void 0),c([Xu({type:Boolean})],xI.prototype,"inFocusedState",void 0),c([Xu({type:Number})],xI.prototype,"scaleFactor",void 0),xI=c([ku("nami-responsive-grid")],xI);const LI={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function II(){const e="undefined"!=typeof document?document:{};return CI(e,LI),e}const DI={document:LI,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function RI(){const e="undefined"!=typeof window?window:{};return CI(e,DI),e}function WI(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function NI(){return Date.now()}function OI(e,t){void 0===t&&(t="x");const n=RI();let i,a,r;const o=function(e){const t=RI();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}(e);return n.WebKitCSSMatrix?(a=o.transform||o.webkitTransform,a.split(",").length>6&&(a=a.split(", ").map((e=>e.replace(",","."))).join(", ")),r=new n.WebKitCSSMatrix("none"===a?"":a)):(r=o.MozTransform||o.OTransform||o.MsTransform||o.msTransform||o.transform||o.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),i=r.toString().split(",")),"x"===t&&(a=n.WebKitCSSMatrix?r.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(a=n.WebKitCSSMatrix?r.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),a||0}function FI(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function jI(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let i=1;i<arguments.length;i+=1){const a=i<0||arguments.length<=i?void 0:arguments[i];if(null!=a&&(n=a,!("undefined"!=typeof window&&void 0!==window.HTMLElement?n instanceof HTMLElement:n&&(1===n.nodeType||11===n.nodeType)))){const n=Object.keys(Object(a)).filter((e=>t.indexOf(e)<0));for(let t=0,i=n.length;t<i;t+=1){const i=n[t],r=Object.getOwnPropertyDescriptor(a,i);void 0!==r&&r.enumerable&&(FI(e[i])&&FI(a[i])?a[i].__swiper__?e[i]=a[i]:jI(e[i],a[i]):!FI(e[i])&&FI(a[i])?(e[i]={},a[i].__swiper__?e[i]=a[i]:jI(e[i],a[i])):e[i]=a[i])}}}var n;return e}function zI(e,t,n){e.style.setProperty(t,n)}function $I(e){let{swiper:t,targetPosition:n,side:i}=e;const a=RI(),r=-t.translate;let o,s=null;const l=t.params.speed;t.wrapperEl.style.scrollSnapType="none",a.cancelAnimationFrame(t.cssModeFrameID);const d=n>r?"next":"prev",u=(e,t)=>"next"===d&&e>=t||"prev"===d&&e<=t,c=()=>{o=(new Date).getTime(),null===s&&(s=o);const e=Math.max(Math.min((o-s)/l,1),0),d=.5-Math.cos(e*Math.PI)/2;let h=r+d*(n-r);if(u(h,n)&&(h=n),t.wrapperEl.scrollTo({[i]:h}),u(h,n))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[i]:h})})),void a.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=a.requestAnimationFrame(c)};c()}function UI(e,t){void 0===t&&(t="");const n=[...e.children];return e instanceof HTMLSlotElement&&n.push(...e.assignedElements()),t?n.filter((e=>e.matches(t))):n}function HI(e){try{return void console.warn(e)}catch(e){}}function BI(e,t){void 0===t&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:function(e){return void 0===e&&(e=""),e.trim().split(" ").filter((e=>!!e.trim()))}(t)),n}function GI(e,t){return RI().getComputedStyle(e,null).getPropertyValue(t)}function XI(e){let t,n=e;if(n){for(t=0;null!==(n=n.previousSibling);)1===n.nodeType&&(t+=1);return t}}function YI(e,t){const n=[];let i=e.parentElement;for(;i;)t?i.matches(t)&&n.push(i):n.push(i),i=i.parentElement;return n}function VI(e,t,n){const i=RI();return e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom"))}function KI(e){return(Array.isArray(e)?e:[e]).filter((e=>!!e))}let qI,JI,QI;function ZI(){return qI||(qI=function(){const e=RI(),t=II();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),qI}function eD(e){return void 0===e&&(e={}),JI||(JI=function(e){let{userAgent:t}=void 0===e?{}:e;const n=ZI(),i=RI(),a=i.navigator.platform,r=t||i.navigator.userAgent,o={ios:!1,android:!1},s=i.screen.width,l=i.screen.height,d=r.match(/(Android);?[\s\/]+([\d.]+)?/);let u=r.match(/(iPad).*OS\s([\d_]+)/);const c=r.match(/(iPod)(.*OS\s([\d_]+))?/),h=!u&&r.match(/(iPhone\sOS|iOS)\s([\d_]+)/),m="Win32"===a;let f="MacIntel"===a;return!u&&f&&n.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${s}x${l}`)>=0&&(u=r.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),f=!1),d&&!m&&(o.os="android",o.android=!0),(u||h||c)&&(o.os="ios",o.ios=!0),o}(e)),JI}function tD(){return QI||(QI=function(){const e=RI(),t=eD();let n=!1;function i(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(i()){const t=String(e.navigator.userAgent);if(t.includes("Version/")){const[e,i]=t.split("Version/")[1].split(" ")[0].split(".").map((e=>Number(e)));n=e<16||16===e&&i<2}}const a=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),r=i();return{isSafari:n||r,needPerspectiveFix:n,need3dFix:r||a&&t.ios,isWebView:a}}()),QI}var nD={on(e,t,n){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;const a=n?"unshift":"push";return e.split(" ").forEach((e=>{i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][a](t)})),i},once(e,t,n){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;function a(){i.off(e,a),a.__emitterProxy&&delete a.__emitterProxy;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];t.apply(i,r)}return a.__emitterProxy=t,i.on(e,a,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof e)return n;const i=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[i](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed?n:n.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach(((i,a)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&n.eventsListeners[e].splice(a,1)}))})),n):n},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,n,i;for(var a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o];"string"==typeof r[0]||Array.isArray(r[0])?(t=r[0],n=r.slice(1,r.length),i=e):(t=r[0].events,n=r[0].data,i=r[0].context||e),n.unshift(i);return(Array.isArray(t)?t:t.split(" ")).forEach((t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach((e=>{e.apply(i,[t,...n])})),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach((e=>{e.apply(i,n)}))})),e}};const iD=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};const aD=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};const rD=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(n){let t=n.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(n.shadowRoot?t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame((()=>{n.shadowRoot&&(t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())}))),t&&t.remove()}},oD=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},sD=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const i="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),a=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const n=a,r=[n-t];return r.push(...Array.from({length:t}).map(((e,t)=>n+i+t))),void e.slides.forEach(((t,n)=>{r.includes(t.column)&&oD(e,n)}))}const r=a+i-1;if(e.params.rewind||e.params.loop)for(let i=a-t;i<=r+t;i+=1){const t=(i%n+n)%n;(t<a||t>r)&&oD(e,t)}else for(let i=Math.max(a-t,0);i<=Math.min(r+t,n-1);i+=1)i!==a&&(i>r||i<a)&&oD(e,i)};var lD={updateSize:function(){const e=this;let t,n;const i=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:i.clientWidth,n=void 0!==e.params.height&&null!==e.params.height?e.params.height:i.clientHeight,0===t&&e.isHorizontal()||0===n&&e.isVertical()||(t=t-parseInt(GI(i,"padding-left")||0,10)-parseInt(GI(i,"padding-right")||0,10),n=n-parseInt(GI(i,"padding-top")||0,10)-parseInt(GI(i,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))},updateSlides:function(){const e=this;function t(t,n){return parseFloat(t.getPropertyValue(e.getDirectionLabel(n))||0)}const n=e.params,{wrapperEl:i,slidesEl:a,size:r,rtlTranslate:o,wrongRTL:s}=e,l=e.virtual&&n.virtual.enabled,d=l?e.virtual.slides.length:e.slides.length,u=UI(a,`.${e.params.slideClass}, swiper-slide`),c=l?e.virtual.slides.length:u.length;let h=[];const m=[],f=[];let p=n.slidesOffsetBefore;"function"==typeof p&&(p=n.slidesOffsetBefore.call(e));let g=n.slidesOffsetAfter;"function"==typeof g&&(g=n.slidesOffsetAfter.call(e));const v=e.snapGrid.length,y=e.slidesGrid.length;let w=n.spaceBetween,b=-p,k=0,S=0;if(void 0===r)return;"string"==typeof w&&w.indexOf("%")>=0?w=parseFloat(w.replace("%",""))/100*r:"string"==typeof w&&(w=parseFloat(w)),e.virtualSize=-w,u.forEach((e=>{o?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""})),n.centeredSlides&&n.cssMode&&(zI(i,"--swiper-centered-offset-before",""),zI(i,"--swiper-centered-offset-after",""));const M=n.grid&&n.grid.rows>1&&e.grid;let E;M?e.grid.initSlides(u):e.grid&&e.grid.unsetSlides();const T="auto"===n.slidesPerView&&n.breakpoints&&Object.keys(n.breakpoints).filter((e=>void 0!==n.breakpoints[e].slidesPerView)).length>0;for(let i=0;i<c;i+=1){let a;if(E=0,u[i]&&(a=u[i]),M&&e.grid.updateSlide(i,a,u),!u[i]||"none"!==GI(a,"display")){if("auto"===n.slidesPerView){T&&(u[i].style[e.getDirectionLabel("width")]="");const r=getComputedStyle(a),o=a.style.transform,s=a.style.webkitTransform;if(o&&(a.style.transform="none"),s&&(a.style.webkitTransform="none"),n.roundLengths)E=e.isHorizontal()?VI(a,"width"):VI(a,"height");else{const e=t(r,"width"),n=t(r,"padding-left"),i=t(r,"padding-right"),o=t(r,"margin-left"),s=t(r,"margin-right"),l=r.getPropertyValue("box-sizing");if(l&&"border-box"===l)E=e+o+s;else{const{clientWidth:t,offsetWidth:r}=a;E=e+n+i+o+s+(r-t)}}o&&(a.style.transform=o),s&&(a.style.webkitTransform=s),n.roundLengths&&(E=Math.floor(E))}else E=(r-(n.slidesPerView-1)*w)/n.slidesPerView,n.roundLengths&&(E=Math.floor(E)),u[i]&&(u[i].style[e.getDirectionLabel("width")]=`${E}px`);u[i]&&(u[i].swiperSlideSize=E),f.push(E),n.centeredSlides?(b=b+E/2+k/2+w,0===k&&0!==i&&(b=b-r/2-w),0===i&&(b=b-r/2-w),Math.abs(b)<.001&&(b=0),n.roundLengths&&(b=Math.floor(b)),S%n.slidesPerGroup==0&&h.push(b),m.push(b)):(n.roundLengths&&(b=Math.floor(b)),(S-Math.min(e.params.slidesPerGroupSkip,S))%e.params.slidesPerGroup==0&&h.push(b),m.push(b),b=b+E+w),e.virtualSize+=E+w,k=E,S+=1}}if(e.virtualSize=Math.max(e.virtualSize,r)+g,o&&s&&("slide"===n.effect||"coverflow"===n.effect)&&(i.style.width=`${e.virtualSize+w}px`),n.setWrapperSize&&(i.style[e.getDirectionLabel("width")]=`${e.virtualSize+w}px`),M&&e.grid.updateWrapperSize(E,h),!n.centeredSlides){const t=[];for(let i=0;i<h.length;i+=1){let a=h[i];n.roundLengths&&(a=Math.floor(a)),h[i]<=e.virtualSize-r&&t.push(a)}h=t,Math.floor(e.virtualSize-r)-Math.floor(h[h.length-1])>1&&h.push(e.virtualSize-r)}if(l&&n.loop){const t=f[0]+w;if(n.slidesPerGroup>1){const i=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),a=t*n.slidesPerGroup;for(let e=0;e<i;e+=1)h.push(h[h.length-1]+a)}for(let i=0;i<e.virtual.slidesBefore+e.virtual.slidesAfter;i+=1)1===n.slidesPerGroup&&h.push(h[h.length-1]+t),m.push(m[m.length-1]+t),e.virtualSize+=t}if(0===h.length&&(h=[0]),0!==w){const t=e.isHorizontal()&&o?"marginLeft":e.getDirectionLabel("marginRight");u.filter(((e,t)=>!(n.cssMode&&!n.loop)||t!==u.length-1)).forEach((e=>{e.style[t]=`${w}px`}))}if(n.centeredSlides&&n.centeredSlidesBounds){let e=0;f.forEach((t=>{e+=t+(w||0)})),e-=w;const t=e>r?e-r:0;h=h.map((e=>e<=0?-p:e>t?t+g:e))}if(n.centerInsufficientSlides){let e=0;f.forEach((t=>{e+=t+(w||0)})),e-=w;const t=(n.slidesOffsetBefore||0)+(n.slidesOffsetAfter||0);if(e+t<r){const n=(r-e-t)/2;h.forEach(((e,t)=>{h[t]=e-n})),m.forEach(((e,t)=>{m[t]=e+n}))}}if(Object.assign(e,{slides:u,snapGrid:h,slidesGrid:m,slidesSizesGrid:f}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){zI(i,"--swiper-centered-offset-before",-h[0]+"px"),zI(i,"--swiper-centered-offset-after",e.size/2-f[f.length-1]/2+"px");const t=-e.snapGrid[0],n=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+n))}if(c!==d&&e.emit("slidesLengthChange"),h.length!==v&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),m.length!==y&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(l||n.cssMode||"slide"!==n.effect&&"fade"!==n.effect)){const t=`${n.containerModifierClass}backface-hidden`,i=e.el.classList.contains(t);c<=n.maxBackfaceHiddenSlides?i||e.el.classList.add(t):i&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,n=[],i=t.virtual&&t.params.virtual.enabled;let a,r=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const o=e=>i?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=>{n.push(e)}));else for(a=0;a<Math.ceil(t.params.slidesPerView);a+=1){const e=t.activeIndex+a;if(e>t.slides.length&&!i)break;n.push(o(e))}else n.push(o(t.activeIndex));for(a=0;a<n.length;a+=1)if(void 0!==n[a]){const e=n[a].offsetHeight;r=e>r?e:r}(r||0===r)&&(t.wrapperEl.style.height=`${r}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let i=0;i<t.length;i+=1)t[i].swiperSlideOffset=(e.isHorizontal()?t[i].offsetLeft:t[i].offsetTop)-n-e.cssOverflowAdjustment()},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);const t=this,n=t.params,{slides:i,rtlTranslate:a,snapGrid:r}=t;if(0===i.length)return;void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();let o=-e;a&&(o=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let s=n.spaceBetween;"string"==typeof s&&s.indexOf("%")>=0?s=parseFloat(s.replace("%",""))/100*t.size:"string"==typeof s&&(s=parseFloat(s));for(let e=0;e<i.length;e+=1){const l=i[e];let d=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(d-=i[0].swiperSlideOffset);const u=(o+(n.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+s),c=(o-r[0]+(n.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+s),h=-(o-d),m=h+t.slidesSizesGrid[e],f=h>=0&&h<=t.size-t.slidesSizesGrid[e],p=h>=0&&h<t.size-1||m>1&&m<=t.size||h<=0&&m>=t.size;p&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e)),iD(l,p,n.slideVisibleClass),iD(l,f,n.slideFullyVisibleClass),l.progress=a?-u:u,l.originalProgress=a?-c:c}},updateProgress:function(e){const t=this;if(void 0===e){const n=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*n||0}const n=t.params,i=t.maxTranslate()-t.minTranslate();let{progress:a,isBeginning:r,isEnd:o,progressLoop:s}=t;const l=r,d=o;if(0===i)a=0,r=!0,o=!0;else{a=(e-t.minTranslate())/i;const n=Math.abs(e-t.minTranslate())<1,s=Math.abs(e-t.maxTranslate())<1;r=n||a<=0,o=s||a>=1,n&&(a=0),s&&(a=1)}if(n.loop){const n=t.getSlideIndexByData(0),i=t.getSlideIndexByData(t.slides.length-1),a=t.slidesGrid[n],r=t.slidesGrid[i],o=t.slidesGrid[t.slidesGrid.length-1],l=Math.abs(e);s=l>=a?(l-a)/o:(l+o-r)/o,s>1&&(s-=1)}Object.assign(t,{progress:a,progressLoop:s,isBeginning:r,isEnd:o}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),r&&!l&&t.emit("reachBeginning toEdge"),o&&!d&&t.emit("reachEnd toEdge"),(l&&!r||d&&!o)&&t.emit("fromEdge"),t.emit("progress",a)},updateSlidesClasses:function(){const e=this,{slides:t,params:n,slidesEl:i,activeIndex:a}=e,r=e.virtual&&n.virtual.enabled,o=e.grid&&n.grid&&n.grid.rows>1,s=e=>UI(i,`.${n.slideClass}${e}, swiper-slide${e}`)[0];let l,d,u;if(r)if(n.loop){let t=a-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),l=s(`[data-swiper-slide-index="${t}"]`)}else l=s(`[data-swiper-slide-index="${a}"]`);else o?(l=t.filter((e=>e.column===a))[0],u=t.filter((e=>e.column===a+1))[0],d=t.filter((e=>e.column===a-1))[0]):l=t[a];l&&(o||(u=function(e,t){const n=[];for(;e.nextElementSibling;){const i=e.nextElementSibling;t?i.matches(t)&&n.push(i):n.push(i),e=i}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!u&&(u=t[0]),d=function(e,t){const n=[];for(;e.previousElementSibling;){const i=e.previousElementSibling;t?i.matches(t)&&n.push(i):n.push(i),e=i}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&0===!d&&(d=t[t.length-1]))),t.forEach((e=>{aD(e,e===l,n.slideActiveClass),aD(e,e===u,n.slideNextClass),aD(e,e===d,n.slidePrevClass)})),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:i,params:a,activeIndex:r,realIndex:o,snapIndex:s}=t;let l,d=e;const u=e=>{let n=e-t.virtual.slidesBefore;return n<0&&(n=t.virtual.slides.length+n),n>=t.virtual.slides.length&&(n-=t.virtual.slides.length),n};if(void 0===d&&(d=function(e){const{slidesGrid:t,params:n}=e,i=e.rtlTranslate?e.translate:-e.translate;let a;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?i>=t[e]&&i<t[e+1]-(t[e+1]-t[e])/2?a=e:i>=t[e]&&i<t[e+1]&&(a=e+1):i>=t[e]&&(a=e);return n.normalizeSlideIndex&&(a<0||void 0===a)&&(a=0),a}(t)),i.indexOf(n)>=0)l=i.indexOf(n);else{const e=Math.min(a.slidesPerGroupSkip,d);l=e+Math.floor((d-e)/a.slidesPerGroup)}if(l>=i.length&&(l=i.length-1),d===r&&!t.params.loop)return void(l!==s&&(t.snapIndex=l,t.emit("snapIndexChange")));if(d===r&&t.params.loop&&t.virtual&&t.params.virtual.enabled)return void(t.realIndex=u(d));const c=t.grid&&a.grid&&a.grid.rows>1;let h;if(t.virtual&&a.virtual.enabled&&a.loop)h=u(d);else if(c){const e=t.slides.filter((e=>e.column===d))[0];let n=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(n)&&(n=Math.max(t.slides.indexOf(e),0)),h=Math.floor(n/a.grid.rows)}else if(t.slides[d]){const e=t.slides[d].getAttribute("data-swiper-slide-index");h=e?parseInt(e,10):d}else h=d;Object.assign(t,{previousSnapIndex:s,snapIndex:l,previousRealIndex:o,realIndex:h,previousIndex:r,activeIndex:d}),t.initialized&&sD(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(o!==h&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const n=this,i=n.params;let a=e.closest(`.${i.slideClass}, swiper-slide`);!a&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach((e=>{!a&&e.matches&&e.matches(`.${i.slideClass}, swiper-slide`)&&(a=e)}));let r,o=!1;if(a)for(let e=0;e<n.slides.length;e+=1)if(n.slides[e]===a){o=!0,r=e;break}if(!a||!o)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=a,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=r,i.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}};var dD={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");const{params:t,rtlTranslate:n,translate:i,wrapperEl:a}=this;if(t.virtualTranslate)return n?-i:i;if(t.cssMode)return i;let r=OI(a,e);return r+=this.cssOverflowAdjustment(),n&&(r=-r),r||0},setTranslate:function(e,t){const n=this,{rtlTranslate:i,params:a,wrapperEl:r,progress:o}=n;let s,l=0,d=0;n.isHorizontal()?l=i?-e:e:d=e,a.roundLengths&&(l=Math.floor(l),d=Math.floor(d)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:d,a.cssMode?r[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-d:a.virtualTranslate||(n.isHorizontal()?l-=n.cssOverflowAdjustment():d-=n.cssOverflowAdjustment(),r.style.transform=`translate3d(${l}px, ${d}px, 0px)`);const u=n.maxTranslate()-n.minTranslate();s=0===u?0:(e-n.minTranslate())/u,s!==o&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,n,i,a){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),void 0===i&&(i=!0);const r=this,{params:o,wrapperEl:s}=r;if(r.animating&&o.preventInteractionOnTransition)return!1;const l=r.minTranslate(),d=r.maxTranslate();let u;if(u=i&&e>l?l:i&&e<d?d:e,r.updateProgress(u),o.cssMode){const e=r.isHorizontal();if(0===t)s[e?"scrollLeft":"scrollTop"]=-u;else{if(!r.support.smoothScroll)return $I({swiper:r,targetPosition:-u,side:e?"left":"top"}),!0;s.scrollTo({[e?"left":"top"]:-u,behavior:"smooth"})}return!0}return 0===t?(r.setTransition(0),r.setTranslate(u),n&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(u),n&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,r.animating=!1,n&&r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}};function uD(e){let{swiper:t,runCallbacks:n,direction:i,step:a}=e;const{activeIndex:r,previousIndex:o}=t;let s=i;if(s||(s=r>o?"next":r<o?"prev":"reset"),t.emit(`transition${a}`),n&&r!==o){if("reset"===s)return void t.emit(`slideResetTransition${a}`);t.emit(`slideChangeTransition${a}`),"next"===s?t.emit(`slideNextTransition${a}`):t.emit(`slidePrevTransition${a}`)}}var cD={slideTo:function(e,t,n,i,a){void 0===e&&(e=0),void 0===n&&(n=!0),"string"==typeof e&&(e=parseInt(e,10));const r=this;let o=e;o<0&&(o=0);const{params:s,snapGrid:l,slidesGrid:d,previousIndex:u,activeIndex:c,rtlTranslate:h,wrapperEl:m,enabled:f}=r;if(!f&&!i&&!a||r.destroyed||r.animating&&s.preventInteractionOnTransition)return!1;void 0===t&&(t=r.params.speed);const p=Math.min(r.params.slidesPerGroupSkip,o);let g=p+Math.floor((o-p)/r.params.slidesPerGroup);g>=l.length&&(g=l.length-1);const v=-l[g];if(s.normalizeSlideIndex)for(let e=0;e<d.length;e+=1){const t=-Math.floor(100*v),n=Math.floor(100*d[e]),i=Math.floor(100*d[e+1]);void 0!==d[e+1]?t>=n&&t<i-(i-n)/2?o=e:t>=n&&t<i&&(o=e+1):t>=n&&(o=e)}if(r.initialized&&o!==c){if(!r.allowSlideNext&&(h?v>r.translate&&v>r.minTranslate():v<r.translate&&v<r.minTranslate()))return!1;if(!r.allowSlidePrev&&v>r.translate&&v>r.maxTranslate()&&(c||0)!==o)return!1}let y;o!==(u||0)&&n&&r.emit("beforeSlideChangeStart"),r.updateProgress(v),y=o>c?"next":o<c?"prev":"reset";const w=r.virtual&&r.params.virtual.enabled;if(!(w&&a)&&(h&&-v===r.translate||!h&&v===r.translate))return r.updateActiveIndex(o),s.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),"slide"!==s.effect&&r.setTranslate(v),"reset"!==y&&(r.transitionStart(n,y),r.transitionEnd(n,y)),!1;if(s.cssMode){const e=r.isHorizontal(),n=h?v:-v;if(0===t)w&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),w&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=>{m[e?"scrollLeft":"scrollTop"]=n}))):m[e?"scrollLeft":"scrollTop"]=n,w&&requestAnimationFrame((()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1}));else{if(!r.support.smoothScroll)return $I({swiper:r,targetPosition:n,side:e?"left":"top"}),!0;m.scrollTo({[e?"left":"top"]:n,behavior:"smooth"})}return!0}return r.setTransition(t),r.setTranslate(v),r.updateActiveIndex(o),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,i),r.transitionStart(n,y),0===t?r.transitionEnd(n,y):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(n,y))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,n,i){if(void 0===e&&(e=0),void 0===n&&(n=!0),"string"==typeof e){e=parseInt(e,10)}const a=this;if(a.destroyed)return;void 0===t&&(t=a.params.speed);const r=a.grid&&a.params.grid&&a.params.grid.rows>1;let o=e;if(a.params.loop)if(a.virtual&&a.params.virtual.enabled)o+=a.virtual.slidesBefore;else{let e;if(r){const t=o*a.params.grid.rows;e=a.slides.filter((e=>1*e.getAttribute("data-swiper-slide-index")===t))[0].column}else e=a.getSlideIndexByData(o);const t=r?Math.ceil(a.slides.length/a.params.grid.rows):a.slides.length,{centeredSlides:n}=a.params;let s=a.params.slidesPerView;"auto"===s?s=a.slidesPerViewDynamic():(s=Math.ceil(parseFloat(a.params.slidesPerView,10)),n&&s%2==0&&(s+=1));let l=t-e<s;if(n&&(l=l||e<Math.ceil(s/2)),i&&n&&"auto"!==a.params.slidesPerView&&!r&&(l=!1),l){const i=n?e<a.activeIndex?"prev":"next":e-a.activeIndex-1<a.params.slidesPerView?"next":"prev";a.loopFix({direction:i,slideTo:!0,activeSlideIndex:"next"===i?e+1:e-t+1,slideRealIndex:"next"===i?a.realIndex:void 0})}if(r){const e=o*a.params.grid.rows;o=a.slides.filter((t=>1*t.getAttribute("data-swiper-slide-index")===e))[0].column}else o=a.getSlideIndexByData(o)}return requestAnimationFrame((()=>{a.slideTo(o,t,n,i)})),a},slideNext:function(e,t,n){void 0===t&&(t=!0);const i=this,{enabled:a,params:r,animating:o}=i;if(!a||i.destroyed)return i;void 0===e&&(e=i.params.speed);let s=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(s=Math.max(i.slidesPerViewDynamic("current",!0),1));const l=i.activeIndex<r.slidesPerGroupSkip?1:s,d=i.virtual&&r.virtual.enabled;if(r.loop){if(o&&!d&&r.loopPreventsSliding)return!1;if(i.loopFix({direction:"next"}),i._clientLeft=i.wrapperEl.clientLeft,i.activeIndex===i.slides.length-1&&r.cssMode)return requestAnimationFrame((()=>{i.slideTo(i.activeIndex+l,e,t,n)})),!0}return r.rewind&&i.isEnd?i.slideTo(0,e,t,n):i.slideTo(i.activeIndex+l,e,t,n)},slidePrev:function(e,t,n){void 0===t&&(t=!0);const i=this,{params:a,snapGrid:r,slidesGrid:o,rtlTranslate:s,enabled:l,animating:d}=i;if(!l||i.destroyed)return i;void 0===e&&(e=i.params.speed);const u=i.virtual&&a.virtual.enabled;if(a.loop){if(d&&!u&&a.loopPreventsSliding)return!1;i.loopFix({direction:"prev"}),i._clientLeft=i.wrapperEl.clientLeft}function c(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const h=c(s?i.translate:-i.translate),m=r.map((e=>c(e)));let f=r[m.indexOf(h)-1];if(void 0===f&&a.cssMode){let e;r.forEach(((t,n)=>{h>=t&&(e=n)})),void 0!==e&&(f=r[e>0?e-1:e])}let p=0;if(void 0!==f&&(p=o.indexOf(f),p<0&&(p=i.activeIndex-1),"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(p=p-i.slidesPerViewDynamic("previous",!0)+1,p=Math.max(p,0))),a.rewind&&i.isBeginning){const a=i.params.virtual&&i.params.virtual.enabled&&i.virtual?i.virtual.slides.length-1:i.slides.length-1;return i.slideTo(a,e,t,n)}return a.loop&&0===i.activeIndex&&a.cssMode?(requestAnimationFrame((()=>{i.slideTo(p,e,t,n)})),!0):i.slideTo(p,e,t,n)},slideReset:function(e,t,n){void 0===t&&(t=!0);const i=this;if(!i.destroyed)return void 0===e&&(e=i.params.speed),i.slideTo(i.activeIndex,e,t,n)},slideToClosest:function(e,t,n,i){void 0===t&&(t=!0),void 0===i&&(i=.5);const a=this;if(a.destroyed)return;void 0===e&&(e=a.params.speed);let r=a.activeIndex;const o=Math.min(a.params.slidesPerGroupSkip,r),s=o+Math.floor((r-o)/a.params.slidesPerGroup),l=a.rtlTranslate?a.translate:-a.translate;if(l>=a.snapGrid[s]){const e=a.snapGrid[s];l-e>(a.snapGrid[s+1]-e)*i&&(r+=a.params.slidesPerGroup)}else{const e=a.snapGrid[s-1];l-e<=(a.snapGrid[s]-e)*i&&(r-=a.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,a.slidesGrid.length-1),a.slideTo(r,e,t,n)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,i="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let a,r=e.clickedIndex;const o=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;a=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?r<e.loopedSlides-i/2||r>e.slides.length-e.loopedSlides+i/2?(e.loopFix(),r=e.getSlideIndex(UI(n,`${o}[data-swiper-slide-index="${a}"]`)[0]),WI((()=>{e.slideTo(r)}))):e.slideTo(r):r>e.slides.length-i?(e.loopFix(),r=e.getSlideIndex(UI(n,`${o}[data-swiper-slide-index="${a}"]`)[0]),WI((()=>{e.slideTo(r)}))):e.slideTo(r)}else e.slideTo(r)}};var hD={loopCreate:function(e){const t=this,{params:n,slidesEl:i}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;const a=()=>{UI(i,`.${n.slideClass}, swiper-slide`).forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t)}))},r=t.grid&&n.grid&&n.grid.rows>1,o=n.slidesPerGroup*(r?n.grid.rows:1),s=t.slides.length%o!=0,l=r&&t.slides.length%n.grid.rows!=0,d=e=>{for(let i=0;i<e;i+=1){const e=t.isElement?BI("swiper-slide",[n.slideBlankClass]):BI("div",[n.slideClass,n.slideBlankClass]);t.slidesEl.append(e)}};if(s){if(n.loopAddBlankSlides){d(o-t.slides.length%o),t.recalcSlides(),t.updateSlides()}else HI("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");a()}else if(l){if(n.loopAddBlankSlides){d(n.grid.rows-t.slides.length%n.grid.rows),t.recalcSlides(),t.updateSlides()}else HI("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");a()}else a();t.loopFix({slideRealIndex:e,direction:n.centeredSlides?void 0:"next"})},loopFix:function(e){let{slideRealIndex:t,slideTo:n=!0,direction:i,setTranslate:a,activeSlideIndex:r,byController:o,byMousewheel:s}=void 0===e?{}:e;const l=this;if(!l.params.loop)return;l.emit("beforeLoopFix");const{slides:d,allowSlidePrev:u,allowSlideNext:c,slidesEl:h,params:m}=l,{centeredSlides:f}=m;if(l.allowSlidePrev=!0,l.allowSlideNext=!0,l.virtual&&m.virtual.enabled)return n&&(m.centeredSlides||0!==l.snapIndex?m.centeredSlides&&l.snapIndex<m.slidesPerView?l.slideTo(l.virtual.slides.length+l.snapIndex,0,!1,!0):l.snapIndex===l.snapGrid.length-1&&l.slideTo(l.virtual.slidesBefore,0,!1,!0):l.slideTo(l.virtual.slides.length,0,!1,!0)),l.allowSlidePrev=u,l.allowSlideNext=c,void l.emit("loopFix");let p=m.slidesPerView;"auto"===p?p=l.slidesPerViewDynamic():(p=Math.ceil(parseFloat(m.slidesPerView,10)),f&&p%2==0&&(p+=1));const g=m.slidesPerGroupAuto?p:m.slidesPerGroup;let v=g;v%g!=0&&(v+=g-v%g),v+=m.loopAdditionalSlides,l.loopedSlides=v;const y=l.grid&&m.grid&&m.grid.rows>1;d.length<p+v?HI("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled and not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):y&&"row"===m.grid.fill&&HI("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const w=[],b=[];let k=l.activeIndex;void 0===r?r=l.getSlideIndex(d.filter((e=>e.classList.contains(m.slideActiveClass)))[0]):k=r;const S="next"===i||!i,M="prev"===i||!i;let E=0,T=0;const P=y?Math.ceil(d.length/m.grid.rows):d.length,A=(y?d[r].column:r)+(f&&void 0===a?-p/2+.5:0);if(A<v){E=Math.max(v-A,g);for(let e=0;e<v-A;e+=1){const t=e-Math.floor(e/P)*P;if(y){const e=P-t-1;for(let t=d.length-1;t>=0;t-=1)d[t].column===e&&w.push(t)}else w.push(P-t-1)}}else if(A+p>P-v){T=Math.max(A-(P-2*v),g);for(let e=0;e<T;e+=1){const t=e-Math.floor(e/P)*P;y?d.forEach(((e,n)=>{e.column===t&&b.push(n)})):b.push(t)}}if(l.__preventObserver__=!0,requestAnimationFrame((()=>{l.__preventObserver__=!1})),M&&w.forEach((e=>{d[e].swiperLoopMoveDOM=!0,h.prepend(d[e]),d[e].swiperLoopMoveDOM=!1})),S&&b.forEach((e=>{d[e].swiperLoopMoveDOM=!0,h.append(d[e]),d[e].swiperLoopMoveDOM=!1})),l.recalcSlides(),"auto"===m.slidesPerView?l.updateSlides():y&&(w.length>0&&M||b.length>0&&S)&&l.slides.forEach(((e,t)=>{l.grid.updateSlide(t,e,l.slides)})),m.watchSlidesProgress&&l.updateSlidesOffset(),n)if(w.length>0&&M){if(void 0===t){const e=l.slidesGrid[k],t=l.slidesGrid[k+E]-e;s?l.setTranslate(l.translate-t):(l.slideTo(k+Math.ceil(E),0,!1,!0),a&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-t,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-t))}else if(a){const e=y?w.length/m.grid.rows:w.length;l.slideTo(l.activeIndex+e,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(b.length>0&&S)if(void 0===t){const e=l.slidesGrid[k],t=l.slidesGrid[k-T]-e;s?l.setTranslate(l.translate-t):(l.slideTo(k-T,0,!1,!0),a&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-t,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-t))}else{const e=y?b.length/m.grid.rows:b.length;l.slideTo(l.activeIndex-e,0,!1,!0)}if(l.allowSlidePrev=u,l.allowSlideNext=c,l.controller&&l.controller.control&&!o){const e={slideRealIndex:t,direction:i,setTranslate:a,activeSlideIndex:r,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach((t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===m.slidesPerView&&n})})):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...e,slideTo:l.controller.control.params.slidesPerView===m.slidesPerView&&n})}l.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const i=[];e.slides.forEach((e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;i[t]=e})),e.slides.forEach((e=>{e.removeAttribute("data-swiper-slide-index")})),i.forEach((e=>{n.append(e)})),e.recalcSlides(),e.slideTo(e.realIndex,0)}};var mD={setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame((()=>{t.__preventObserver__=!1}))},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame((()=>{e.__preventObserver__=!1})))}};function fD(e,t,n){const i=RI(),{params:a}=e,r=a.edgeSwipeDetection,o=a.edgeSwipeThreshold;return!r||!(n<=o||n>=i.innerWidth-o)||"prevent"===r&&(t.preventDefault(),!0)}function pD(e){const t=this,n=II();let i=e;i.originalEvent&&(i=i.originalEvent);const a=t.touchEventsData;if("pointerdown"===i.type){if(null!==a.pointerId&&a.pointerId!==i.pointerId)return;a.pointerId=i.pointerId}else"touchstart"===i.type&&1===i.targetTouches.length&&(a.touchId=i.targetTouches[0].identifier);if("touchstart"===i.type)return void fD(t,i,i.targetTouches[0].pageX);const{params:r,touches:o,enabled:s}=t;if(!s)return;if(!r.simulateTouch&&"mouse"===i.pointerType)return;if(t.animating&&r.preventInteractionOnTransition)return;!t.animating&&r.cssMode&&r.loop&&t.loopFix();let l=i.target;if("wrapper"===r.touchEventsTarget&&!function(e,t){const n=t.contains(e);if(!n&&t instanceof HTMLSlotElement)return[...t.assignedElements()].includes(e);return n}(l,t.wrapperEl))return;if("which"in i&&3===i.which)return;if("button"in i&&i.button>0)return;if(a.isTouched&&a.isMoved)return;const d=!!r.noSwipingClass&&""!==r.noSwipingClass,u=i.composedPath?i.composedPath():i.path;d&&i.target&&i.target.shadowRoot&&u&&(l=u[0]);const c=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,h=!(!i.target||!i.target.shadowRoot);if(r.noSwiping&&(h?function(e,t){return void 0===t&&(t=this),function t(n){if(!n||n===II()||n===RI())return null;n.assignedSlot&&(n=n.assignedSlot);const i=n.closest(e);return i||n.getRootNode?i||t(n.getRootNode().host):null}(t)}(c,l):l.closest(c)))return void(t.allowClick=!0);if(r.swipeHandler&&!l.closest(r.swipeHandler))return;o.currentX=i.pageX,o.currentY=i.pageY;const m=o.currentX,f=o.currentY;if(!fD(t,i,m))return;Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=m,o.startY=f,a.touchStartTime=NI(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(a.allowThresholdMove=!1);let p=!0;l.matches(a.focusableElements)&&(p=!1,"SELECT"===l.nodeName&&(a.isTouched=!1)),n.activeElement&&n.activeElement.matches(a.focusableElements)&&n.activeElement!==l&&n.activeElement.blur();const g=p&&t.allowTouchMove&&r.touchStartPreventDefault;!r.touchStartForcePreventDefault&&!g||l.isContentEditable||i.preventDefault(),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.animating&&!r.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",i)}function gD(e){const t=II(),n=this,i=n.touchEventsData,{params:a,touches:r,rtlTranslate:o,enabled:s}=n;if(!s)return;if(!a.simulateTouch&&"mouse"===e.pointerType)return;let l,d=e;if(d.originalEvent&&(d=d.originalEvent),"pointermove"===d.type){if(null!==i.touchId)return;if(d.pointerId!==i.pointerId)return}if("touchmove"===d.type){if(l=[...d.changedTouches].filter((e=>e.identifier===i.touchId))[0],!l||l.identifier!==i.touchId)return}else l=d;if(!i.isTouched)return void(i.startMoving&&i.isScrolling&&n.emit("touchMoveOpposite",d));const u=l.pageX,c=l.pageY;if(d.preventedByNestedSwiper)return r.startX=u,void(r.startY=c);if(!n.allowTouchMove)return d.target.matches(i.focusableElements)||(n.allowClick=!1),void(i.isTouched&&(Object.assign(r,{startX:u,startY:c,currentX:u,currentY:c}),i.touchStartTime=NI()));if(a.touchReleaseOnEdges&&!a.loop)if(n.isVertical()){if(c<r.startY&&n.translate<=n.maxTranslate()||c>r.startY&&n.translate>=n.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(u<r.startX&&n.translate<=n.maxTranslate()||u>r.startX&&n.translate>=n.minTranslate())return;if(t.activeElement&&d.target===t.activeElement&&d.target.matches(i.focusableElements))return i.isMoved=!0,void(n.allowClick=!1);i.allowTouchCallbacks&&n.emit("touchMove",d),r.previousX=r.currentX,r.previousY=r.currentY,r.currentX=u,r.currentY=c;const h=r.currentX-r.startX,m=r.currentY-r.startY;if(n.params.threshold&&Math.sqrt(h**2+m**2)<n.params.threshold)return;if(void 0===i.isScrolling){let e;n.isHorizontal()&&r.currentY===r.startY||n.isVertical()&&r.currentX===r.startX?i.isScrolling=!1:h*h+m*m>=25&&(e=180*Math.atan2(Math.abs(m),Math.abs(h))/Math.PI,i.isScrolling=n.isHorizontal()?e>a.touchAngle:90-e>a.touchAngle)}if(i.isScrolling&&n.emit("touchMoveOpposite",d),void 0===i.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(i.startMoving=!0)),i.isScrolling||"touchmove"===d.type&&i.preventTouchMoveFromPointerMove)return void(i.isTouched=!1);if(!i.startMoving)return;n.allowClick=!1,!a.cssMode&&d.cancelable&&d.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&d.stopPropagation();let f=n.isHorizontal()?h:m,p=n.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;a.oneWayMovement&&(f=Math.abs(f)*(o?1:-1),p=Math.abs(p)*(o?1:-1)),r.diff=f,f*=a.touchRatio,o&&(f=-f,p=-p);const g=n.touchesDirection;n.swipeDirection=f>0?"prev":"next",n.touchesDirection=p>0?"prev":"next";const v=n.params.loop&&!a.cssMode,y="next"===n.touchesDirection&&n.allowSlideNext||"prev"===n.touchesDirection&&n.allowSlidePrev;if(!i.isMoved){if(v&&y&&n.loopFix({direction:n.swipeDirection}),i.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(e)}i.allowMomentumBounce=!1,!a.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",d)}if((new Date).getTime(),i.isMoved&&i.allowThresholdMove&&g!==n.touchesDirection&&v&&y&&Math.abs(f)>=1)return Object.assign(r,{startX:u,startY:c,currentX:u,currentY:c,startTranslate:i.currentTranslate}),i.loopSwapReset=!0,void(i.startTranslate=i.currentTranslate);n.emit("sliderMove",d),i.isMoved=!0,i.currentTranslate=f+i.startTranslate;let w=!0,b=a.resistanceRatio;if(a.touchReleaseOnEdges&&(b=0),f>0?(v&&y&&i.allowThresholdMove&&i.currentTranslate>(a.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-("auto"!==a.slidesPerView&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),i.currentTranslate>n.minTranslate()&&(w=!1,a.resistance&&(i.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+i.startTranslate+f)**b))):f<0&&(v&&y&&i.allowThresholdMove&&i.currentTranslate<(a.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+("auto"!==a.slidesPerView&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-("auto"===a.slidesPerView?n.slidesPerViewDynamic():Math.ceil(parseFloat(a.slidesPerView,10)))}),i.currentTranslate<n.maxTranslate()&&(w=!1,a.resistance&&(i.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-i.startTranslate-f)**b))),w&&(d.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),n.allowSlidePrev||n.allowSlideNext||(i.currentTranslate=i.startTranslate),a.threshold>0){if(!(Math.abs(f)>a.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,i.currentTranslate=i.startTranslate,void(r.diff=n.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}a.followFinger&&!a.cssMode&&((a.freeMode&&a.freeMode.enabled&&n.freeMode||a.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),a.freeMode&&a.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(i.currentTranslate),n.setTranslate(i.currentTranslate))}function vD(e){const t=this,n=t.touchEventsData;let i,a=e;a.originalEvent&&(a=a.originalEvent);if("touchend"===a.type||"touchcancel"===a.type){if(i=[...a.changedTouches].filter((e=>e.identifier===n.touchId))[0],!i||i.identifier!==n.touchId)return}else{if(null!==n.touchId)return;if(a.pointerId!==n.pointerId)return;i=a}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(a.type)){if(!(["pointercancel","contextmenu"].includes(a.type)&&(t.browser.isSafari||t.browser.isWebView)))return}n.pointerId=null,n.touchId=null;const{params:r,touches:o,rtlTranslate:s,slidesGrid:l,enabled:d}=t;if(!d)return;if(!r.simulateTouch&&"mouse"===a.pointerType)return;if(n.allowTouchCallbacks&&t.emit("touchEnd",a),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&r.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);r.grabCursor&&n.isMoved&&n.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const u=NI(),c=u-n.touchStartTime;if(t.allowClick){const e=a.path||a.composedPath&&a.composedPath();t.updateClickedSlide(e&&e[0]||a.target,e),t.emit("tap click",a),c<300&&u-n.lastClickTime<300&&t.emit("doubleTap doubleClick",a)}if(n.lastClickTime=NI(),WI((()=>{t.destroyed||(t.allowClick=!0)})),!n.isTouched||!n.isMoved||!t.swipeDirection||0===o.diff&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);let h;if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,h=r.followFinger?s?t.translate:-t.translate:-n.currentTranslate,r.cssMode)return;if(r.freeMode&&r.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:h});const m=h>=-t.maxTranslate()&&!t.params.loop;let f=0,p=t.slidesSizesGrid[0];for(let e=0;e<l.length;e+=e<r.slidesPerGroupSkip?1:r.slidesPerGroup){const t=e<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;void 0!==l[e+t]?(m||h>=l[e]&&h<l[e+t])&&(f=e,p=l[e+t]-l[e]):(m||h>=l[e])&&(f=e,p=l[l.length-1]-l[l.length-2])}let g=null,v=null;r.rewind&&(t.isBeginning?v=r.virtual&&r.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(g=0));const y=(h-l[f])/p,w=f<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(c>r.longSwipesMs){if(!r.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(y>=r.longSwipesRatio?t.slideTo(r.rewind&&t.isEnd?g:f+w):t.slideTo(f)),"prev"===t.swipeDirection&&(y>1-r.longSwipesRatio?t.slideTo(f+w):null!==v&&y<0&&Math.abs(y)>r.longSwipesRatio?t.slideTo(v):t.slideTo(f))}else{if(!r.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(a.target===t.navigation.nextEl||a.target===t.navigation.prevEl)?a.target===t.navigation.nextEl?t.slideTo(f+w):t.slideTo(f):("next"===t.swipeDirection&&t.slideTo(null!==g?g:f+w),"prev"===t.swipeDirection&&t.slideTo(null!==v?v:f))}}function yD(){const e=this,{params:t,el:n}=e;if(n&&0===n.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:i,allowSlidePrev:a,snapGrid:r}=e,o=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const s=o&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||s?e.params.loop&&!o?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout((()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()}),500)),e.allowSlidePrev=a,e.allowSlideNext=i,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}function wD(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function bD(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:i}=e;if(!i)return;let a;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const r=e.maxTranslate()-e.minTranslate();a=0===r?0:(e.translate-e.minTranslate())/r,a!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function kD(e){const t=this;rD(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function SD(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const MD=(e,t)=>{const n=II(),{params:i,el:a,wrapperEl:r,device:o}=e,s=!!i.nested,l="on"===t?"addEventListener":"removeEventListener",d=t;a&&"string"!=typeof a&&(n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:s}),a[l]("touchstart",e.onTouchStart,{passive:!1}),a[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:s}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:s}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(i.preventClicks||i.preventClicksPropagation)&&a[l]("click",e.onClick,!0),i.cssMode&&r[l]("scroll",e.onScroll),i.updateOnWindowResize?e[d](o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",yD,!0):e[d]("observerUpdate",yD,!0),a[l]("load",e.onLoad,{capture:!0}))};const ED=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var TD={setBreakpoint:function(){const e=this,{realIndex:t,initialized:n,params:i,el:a}=e,r=i.breakpoints;if(!r||r&&0===Object.keys(r).length)return;const o=e.getBreakpoint(r,e.params.breakpointsBase,e.el);if(!o||e.currentBreakpoint===o)return;const s=(o in r?r[o]:void 0)||e.originalParams,l=ED(e,i),d=ED(e,s),u=e.params.grabCursor,c=s.grabCursor,h=i.enabled;l&&!d?(a.classList.remove(`${i.containerModifierClass}grid`,`${i.containerModifierClass}grid-column`),e.emitContainerClasses()):!l&&d&&(a.classList.add(`${i.containerModifierClass}grid`),(s.grid.fill&&"column"===s.grid.fill||!s.grid.fill&&"column"===i.grid.fill)&&a.classList.add(`${i.containerModifierClass}grid-column`),e.emitContainerClasses()),u&&!c?e.unsetGrabCursor():!u&&c&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach((t=>{if(void 0===s[t])return;const n=i[t]&&i[t].enabled,a=s[t]&&s[t].enabled;n&&!a&&e[t].disable(),!n&&a&&e[t].enable()}));const m=s.direction&&s.direction!==i.direction,f=i.loop&&(s.slidesPerView!==i.slidesPerView||m),p=i.loop;m&&n&&e.changeDirection(),jI(e.params,s);const g=e.params.enabled,v=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),h&&!g?e.disable():!h&&g&&e.enable(),e.currentBreakpoint=o,e.emit("_beforeBreakpoint",s),n&&(f?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!p&&v?(e.loopCreate(t),e.updateSlides()):p&&!v&&e.loopDestroy()),e.emit("breakpoint",s)},getBreakpoint:function(e,t,n){if(void 0===t&&(t="window"),!e||"container"===t&&!n)return;let i=!1;const a=RI(),r="window"===t?a.innerHeight:n.clientHeight,o=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}}));o.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e<o.length;e+=1){const{point:r,value:s}=o[e];"window"===t?a.matchMedia(`(min-width: ${s}px)`).matches&&(i=r):s<=n.clientWidth&&(i=r)}return i||"max"}};var PD={addClasses:function(){const e=this,{classNames:t,params:n,rtl:i,el:a,device:r}=e,o=function(e,t){const n=[];return e.forEach((e=>{"object"==typeof e?Object.keys(e).forEach((i=>{e[i]&&n.push(t+i)})):"string"==typeof e&&n.push(t+e)})),n}(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:i},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&"column"===n.grid.fill},{android:r.android},{ios:r.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...o),a.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}};var AD={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function xD(e,t){return function(n){void 0===n&&(n={});const i=Object.keys(n)[0],a=n[i];"object"==typeof a&&null!==a?(!0===e[i]&&(e[i]={enabled:!0}),"navigation"===i&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),i in e&&"enabled"in a?("object"!=typeof e[i]||"enabled"in e[i]||(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),jI(t,n)):jI(t,n)):jI(t,n)}}const _D={eventsEmitter:nD,update:lD,translate:dD,transition:{setTransition:function(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=0===e?"0ms":""),n.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const n=this,{params:i}=n;i.cssMode||(i.autoHeight&&n.updateAutoHeight(),uD({swiper:n,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const n=this,{params:i}=n;n.animating=!1,i.cssMode||(n.setTransition(0),uD({swiper:n,runCallbacks:e,direction:t,step:"End"}))}},slide:cD,loop:hD,grabCursor:mD,events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=pD.bind(e),e.onTouchMove=gD.bind(e),e.onTouchEnd=vD.bind(e),e.onDocumentTouchStart=SD.bind(e),t.cssMode&&(e.onScroll=bD.bind(e)),e.onClick=wD.bind(e),e.onLoad=kD.bind(e),MD(e,"on")},detachEvents:function(){MD(this,"off")}},breakpoints:TD,checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:i}=n;if(i){const t=e.slides.length-1,n=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*i;e.isLocked=e.size>n}else e.isLocked=1===e.snapGrid.length;!0===n.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===n.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:PD},CD={};class LD{constructor(){let e,t;for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];1===i.length&&i[0].constructor&&"Object"===Object.prototype.toString.call(i[0]).slice(8,-1)?t=i[0]:[e,t]=i,t||(t={}),t=jI({},t),e&&!t.el&&(t.el=e);const r=II();if(t.el&&"string"==typeof t.el&&r.querySelectorAll(t.el).length>1){const e=[];return r.querySelectorAll(t.el).forEach((n=>{const i=jI({},t,{el:n});e.push(new LD(i))})),e}const o=this;o.__swiper__=!0,o.support=ZI(),o.device=eD({userAgent:t.userAgent}),o.browser=tD(),o.eventsListeners={},o.eventsAnyListeners=[],o.modules=[...o.__modules__],t.modules&&Array.isArray(t.modules)&&o.modules.push(...t.modules);const s={};o.modules.forEach((e=>{e({params:t,swiper:o,extendParams:xD(t,s),on:o.on.bind(o),once:o.once.bind(o),off:o.off.bind(o),emit:o.emit.bind(o)})}));const l=jI({},AD,s);return o.params=jI({},l,CD,t),o.originalParams=jI({},o.params),o.passedParams=jI({},t),o.params&&o.params.on&&Object.keys(o.params.on).forEach((e=>{o.on(e,o.params.on[e])})),o.params&&o.params.onAny&&o.onAny(o.params.onAny),Object.assign(o,{enabled:o.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===o.params.direction,isVertical:()=>"vertical"===o.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:o.params.allowSlideNext,allowSlidePrev:o.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:o.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:o.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),o.emit("_swiper"),o.params.init&&o.init(),o}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:n}=this,i=XI(UI(t,`.${n.slideClass}, swiper-slide`)[0]);return XI(e)-i}getSlideIndexByData(e){return this.getSlideIndex(this.slides.filter((t=>1*t.getAttribute("data-swiper-slide-index")===e))[0])}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=UI(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const n=this;e=Math.min(Math.max(e,0),1);const i=n.minTranslate(),a=(n.maxTranslate()-i)*e+i;n.translateTo(a,void 0===t?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach((n=>{const i=e.getSlideClasses(n);t.push({slideEl:n,classNames:i}),e.emit("_slideClass",n,i)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:n,slides:i,slidesGrid:a,slidesSizesGrid:r,size:o,activeIndex:s}=this;let l=1;if("number"==typeof n.slidesPerView)return n.slidesPerView;if(n.centeredSlides){let e,t=i[s]?Math.ceil(i[s].swiperSlideSize):0;for(let n=s+1;n<i.length;n+=1)i[n]&&!e&&(t+=Math.ceil(i[n].swiperSlideSize),l+=1,t>o&&(e=!0));for(let n=s-1;n>=0;n-=1)i[n]&&!e&&(t+=i[n].swiperSlideSize,l+=1,t>o&&(e=!0))}else if("current"===e)for(let e=s+1;e<i.length;e+=1){(t?a[e]+r[e]-a[s]<o:a[e]-a[s]<o)&&(l+=1)}else for(let e=s-1;e>=0;e-=1){a[s]-a[e]<o&&(l+=1)}return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;function i(){const t=e.rtlTranslate?-1*e.translate:e.translate,n=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses()}let a;if(n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach((t=>{t.complete&&rD(e,t)})),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),n.freeMode&&n.freeMode.enabled&&!n.cssMode)i(),n.autoHeight&&e.updateAutoHeight();else{if(("auto"===n.slidesPerView||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){const t=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;a=e.slideTo(t.length-1,0,!1,!0)}else a=e.slideTo(e.activeIndex,0,!1,!0);a||i()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const n=this,i=n.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(n.el.classList.remove(`${n.params.containerModifierClass}${i}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEach((t=>{"vertical"===e?t.style.width="":t.style.height=""})),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let n=e||t.params.el;if("string"==typeof n&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const i=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let a=(()=>{if(n&&n.shadowRoot&&n.shadowRoot.querySelector){return n.shadowRoot.querySelector(i())}return UI(n,i())[0]})();return!a&&t.params.createElements&&(a=BI("div",t.params.wrapperClass),n.append(a),UI(n,`.${t.params.slideClass}`).forEach((e=>{a.append(e)}))),Object.assign(t,{el:n,wrapperEl:a,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:a,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:"rtl"===n.dir.toLowerCase()||"rtl"===GI(n,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===n.dir.toLowerCase()||"rtl"===GI(n,"direction")),wrongRTL:"-webkit-box"===GI(a,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(),t.attachEvents();const n=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&n.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),n.forEach((e=>{e.complete?rD(t,e):e.addEventListener("load",(e=>{rD(t,e.target)}))})),sD(t),t.initialized=!0,sD(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const n=this,{params:i,el:a,wrapperEl:r,slides:o}=n;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),i.loop&&n.loopDestroy(),t&&(n.removeClasses(),a&&"string"!=typeof a&&a.removeAttribute("style"),r&&r.removeAttribute("style"),o&&o.length&&o.forEach((e=>{e.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")}))),n.emit("destroy"),Object.keys(n.eventsListeners).forEach((e=>{n.off(e)})),!1!==e&&(n.el&&"string"!=typeof n.el&&(n.el.swiper=null),function(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}(n)),n.destroyed=!0),null}static extendDefaults(e){jI(CD,e)}static get extendedDefaults(){return CD}static get defaults(){return AD}static installModule(e){LD.prototype.__modules__||(LD.prototype.__modules__=[]);const t=LD.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>LD.installModule(e))),LD):(LD.installModule(e),LD)}}function ID(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function DD(e){let{swiper:t,extendParams:n,on:i,emit:a}=e;const r="swiper-pagination";let o;n({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),t.pagination={el:null,bullets:[]};let s=0;function l(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function d(e,n){const{bulletActiveClass:i}=t.params.pagination;e&&(e=e[("prev"===n?"previous":"next")+"ElementSibling"])&&(e.classList.add(`${i}-${n}`),(e=e[("prev"===n?"previous":"next")+"ElementSibling"])&&e.classList.add(`${i}-${n}-${n}`))}function u(e){const n=e.target.closest(ID(t.params.pagination.bulletClass));if(!n)return;e.preventDefault();const i=XI(n)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===i)return;const e=(a=t.realIndex,r=i,o=t.slides.length,(r%=o)==1+(a%=o)?"next":r===a-1?"previous":void 0);"next"===e?t.slideNext():"previous"===e?t.slidePrev():t.slideToLoop(i)}else t.slideTo(i);var a,r,o}function c(){const e=t.rtl,n=t.params.pagination;if(l())return;let i,r,u=t.pagination.el;u=KI(u);const c=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,h=t.params.loop?Math.ceil(c/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(r=t.previousRealIndex||0,i=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(i=t.snapIndex,r=t.previousSnapIndex):(r=t.previousIndex||0,i=t.activeIndex||0),"bullets"===n.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const a=t.pagination.bullets;let l,c,h;if(n.dynamicBullets&&(o=VI(a[0],t.isHorizontal()?"width":"height"),u.forEach((e=>{e.style[t.isHorizontal()?"width":"height"]=o*(n.dynamicMainBullets+4)+"px"})),n.dynamicMainBullets>1&&void 0!==r&&(s+=i-(r||0),s>n.dynamicMainBullets-1?s=n.dynamicMainBullets-1:s<0&&(s=0)),l=Math.max(i-s,0),c=l+(Math.min(a.length,n.dynamicMainBullets)-1),h=(c+l)/2),a.forEach((e=>{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${n.bulletActiveClass}${e}`))].map((e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e)).flat();e.classList.remove(...t)})),u.length>1)a.forEach((e=>{const a=XI(e);a===i?e.classList.add(...n.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),n.dynamicBullets&&(a>=l&&a<=c&&e.classList.add(...`${n.bulletActiveClass}-main`.split(" ")),a===l&&d(e,"prev"),a===c&&d(e,"next"))}));else{const e=a[i];if(e&&e.classList.add(...n.bulletActiveClass.split(" ")),t.isElement&&a.forEach(((e,t)=>{e.setAttribute("part",t===i?"bullet-active":"bullet")})),n.dynamicBullets){const e=a[l],t=a[c];for(let e=l;e<=c;e+=1)a[e]&&a[e].classList.add(...`${n.bulletActiveClass}-main`.split(" "));d(e,"prev"),d(t,"next")}}if(n.dynamicBullets){const i=Math.min(a.length,n.dynamicMainBullets+4),r=(o*i-o)/2-h*o,s=e?"right":"left";a.forEach((e=>{e.style[t.isHorizontal()?s:"top"]=`${r}px`}))}}u.forEach(((e,r)=>{if("fraction"===n.type&&(e.querySelectorAll(ID(n.currentClass)).forEach((e=>{e.textContent=n.formatFractionCurrent(i+1)})),e.querySelectorAll(ID(n.totalClass)).forEach((e=>{e.textContent=n.formatFractionTotal(h)}))),"progressbar"===n.type){let a;a=n.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const r=(i+1)/h;let o=1,s=1;"horizontal"===a?o=r:s=r,e.querySelectorAll(ID(n.progressbarFillClass)).forEach((e=>{e.style.transform=`translate3d(0,0,0) scaleX(${o}) scaleY(${s})`,e.style.transitionDuration=`${t.params.speed}ms`}))}"custom"===n.type&&n.renderCustom?(e.innerHTML=n.renderCustom(t,i+1,h),0===r&&a("paginationRender",e)):(0===r&&a("paginationRender",e),a("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](n.lockClass)}))}function h(){const e=t.params.pagination;if(l())return;const n=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.grid&&t.params.grid.rows>1?t.slides.length/Math.ceil(t.params.grid.rows):t.slides.length;let i=t.pagination.el;i=KI(i);let r="";if("bullets"===e.type){let i=t.params.loop?Math.ceil(n/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&i>n&&(i=n);for(let n=0;n<i;n+=1)e.renderBullet?r+=e.renderBullet.call(t,n,e.bulletClass):r+=`<${e.bulletElement} ${t.isElement?'part="bullet"':""} class="${e.bulletClass}"></${e.bulletElement}>`}"fraction"===e.type&&(r=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`),"progressbar"===e.type&&(r=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`<span class="${e.progressbarFillClass}"></span>`),t.pagination.bullets=[],i.forEach((n=>{"custom"!==e.type&&(n.innerHTML=r||""),"bullets"===e.type&&t.pagination.bullets.push(...n.querySelectorAll(ID(e.bulletClass)))})),"custom"!==e.type&&a("paginationRender",i[0])}function m(){t.params.pagination=function(e,t,n,i){return e.params.createElements&&Object.keys(i).forEach((a=>{if(!n[a]&&!0===n.auto){let r=UI(e.el,`.${i[a]}`)[0];r||(r=BI("div",i[a]),r.className=i[a],e.el.append(r)),n[a]=r,t[a]=r}})),n}(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let n;"string"==typeof e.el&&t.isElement&&(n=t.el.querySelector(e.el)),n||"string"!=typeof e.el||(n=[...document.querySelectorAll(e.el)]),n||(n=e.el),n&&0!==n.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(n)&&n.length>1&&(n=[...t.el.querySelectorAll(e.el)],n.length>1&&(n=n.filter((e=>YI(e,".swiper")[0]===t.el))[0])),Array.isArray(n)&&1===n.length&&(n=n[0]),Object.assign(t.pagination,{el:n}),n=KI(n),n.forEach((n=>{"bullets"===e.type&&e.clickable&&n.classList.add(...(e.clickableClass||"").split(" ")),n.classList.add(e.modifierClass+e.type),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(n.classList.add(`${e.modifierClass}${e.type}-dynamic`),s=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&n.classList.add(e.progressbarOppositeClass),e.clickable&&n.addEventListener("click",u),t.enabled||n.classList.add(e.lockClass)})))}function f(){const e=t.params.pagination;if(l())return;let n=t.pagination.el;n&&(n=KI(n),n.forEach((n=>{n.classList.remove(e.hiddenClass),n.classList.remove(e.modifierClass+e.type),n.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&(n.classList.remove(...(e.clickableClass||"").split(" ")),n.removeEventListener("click",u))}))),t.pagination.bullets&&t.pagination.bullets.forEach((t=>t.classList.remove(...e.bulletActiveClass.split(" "))))}i("changeDirection",(()=>{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:n}=t.pagination;n=KI(n),n.forEach((n=>{n.classList.remove(e.horizontalClass,e.verticalClass),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),i("init",(()=>{!1===t.params.pagination.enabled?p():(m(),h(),c())})),i("activeIndexChange",(()=>{void 0===t.snapIndex&&c()})),i("snapIndexChange",(()=>{c()})),i("snapGridLengthChange",(()=>{h(),c()})),i("destroy",(()=>{f()})),i("enable disable",(()=>{let{el:e}=t.pagination;e&&(e=KI(e),e.forEach((e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass))))})),i("lock unlock",(()=>{c()})),i("click",((e,n)=>{const i=n.target,r=KI(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&r&&r.length>0&&!i.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&i===t.navigation.nextEl||t.navigation.prevEl&&i===t.navigation.prevEl))return;const e=r[0].classList.contains(t.params.pagination.hiddenClass);a(!0===e?"paginationShow":"paginationHide"),r.forEach((e=>e.classList.toggle(t.params.pagination.hiddenClass)))}}));const p=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=KI(e),e.forEach((e=>e.classList.add(t.params.pagination.paginationDisabledClass)))),f()};Object.assign(t.pagination,{enable:()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=KI(e),e.forEach((e=>e.classList.remove(t.params.pagination.paginationDisabledClass)))),m(),h(),c()},disable:p,render:h,update:c,init:m,destroy:f})}function RD(e){let t,n,{swiper:i,extendParams:a,on:r,emit:o,params:s}=e;i.autoplay={running:!1,paused:!1,timeLeft:0},a({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let l,d,u,c,h,m,f,p,g=s&&s.autoplay?s.autoplay.delay:3e3,v=s&&s.autoplay?s.autoplay.delay:3e3,y=(new Date).getTime();function w(e){i&&!i.destroyed&&i.wrapperEl&&e.target===i.wrapperEl&&(i.wrapperEl.removeEventListener("transitionend",w),p||e.detail&&e.detail.bySwiperTouchMove||T())}const b=()=>{if(i.destroyed||!i.autoplay.running)return;i.autoplay.paused?d=!0:d&&(v=l,d=!1);const e=i.autoplay.paused?l:y+v-(new Date).getTime();i.autoplay.timeLeft=e,o("autoplayTimeLeft",e,e/g),n=requestAnimationFrame((()=>{b()}))},k=e=>{if(i.destroyed||!i.autoplay.running)return;cancelAnimationFrame(n),b();let a=void 0===e?i.params.autoplay.delay:e;g=i.params.autoplay.delay,v=i.params.autoplay.delay;const r=(()=>{let e;if(e=i.virtual&&i.params.virtual.enabled?i.slides.filter((e=>e.classList.contains("swiper-slide-active")))[0]:i.slides[i.activeIndex],!e)return;return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(r)&&r>0&&void 0===e&&(a=r,g=r,v=r),l=a;const s=i.params.speed,d=()=>{i&&!i.destroyed&&(i.params.autoplay.reverseDirection?!i.isBeginning||i.params.loop||i.params.rewind?(i.slidePrev(s,!0,!0),o("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(i.slides.length-1,s,!0,!0),o("autoplay")):!i.isEnd||i.params.loop||i.params.rewind?(i.slideNext(s,!0,!0),o("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(0,s,!0,!0),o("autoplay")),i.params.cssMode&&(y=(new Date).getTime(),requestAnimationFrame((()=>{k()}))))};return a>0?(clearTimeout(t),t=setTimeout((()=>{d()}),a)):requestAnimationFrame((()=>{d()})),a},S=()=>{y=(new Date).getTime(),i.autoplay.running=!0,k(),o("autoplayStart")},M=()=>{i.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(n),o("autoplayStop")},E=(e,n)=>{if(i.destroyed||!i.autoplay.running)return;clearTimeout(t),e||(f=!0);const a=()=>{o("autoplayPause"),i.params.autoplay.waitForTransition?i.wrapperEl.addEventListener("transitionend",w):T()};if(i.autoplay.paused=!0,n)return m&&(l=i.params.autoplay.delay),m=!1,void a();const r=l||i.params.autoplay.delay;l=r-((new Date).getTime()-y),i.isEnd&&l<0&&!i.params.loop||(l<0&&(l=0),a())},T=()=>{i.isEnd&&l<0&&!i.params.loop||i.destroyed||!i.autoplay.running||(y=(new Date).getTime(),f?(f=!1,k(l)):k(),i.autoplay.paused=!1,o("autoplayResume"))},P=()=>{if(i.destroyed||!i.autoplay.running)return;const e=II();"hidden"===e.visibilityState&&(f=!0,E(!0)),"visible"===e.visibilityState&&T()},A=e=>{"mouse"===e.pointerType&&(f=!0,p=!0,i.animating||i.autoplay.paused||E(!0))},x=e=>{"mouse"===e.pointerType&&(p=!1,i.autoplay.paused&&T())};r("init",(()=>{i.params.autoplay.enabled&&(i.params.autoplay.pauseOnMouseEnter&&(i.el.addEventListener("pointerenter",A),i.el.addEventListener("pointerleave",x)),II().addEventListener("visibilitychange",P),S())})),r("destroy",(()=>{i.el&&"string"!=typeof i.el&&(i.el.removeEventListener("pointerenter",A),i.el.removeEventListener("pointerleave",x)),II().removeEventListener("visibilitychange",P),i.autoplay.running&&M()})),r("_freeModeStaticRelease",(()=>{(c||f)&&T()})),r("_freeModeNoMomentumRelease",(()=>{i.params.autoplay.disableOnInteraction?M():E(!0,!0)})),r("beforeTransitionStart",((e,t,n)=>{!i.destroyed&&i.autoplay.running&&(n||!i.params.autoplay.disableOnInteraction?E(!0,!0):M())})),r("sliderFirstMove",(()=>{!i.destroyed&&i.autoplay.running&&(i.params.autoplay.disableOnInteraction?M():(u=!0,c=!1,f=!1,h=setTimeout((()=>{f=!0,c=!0,E(!0)}),200)))})),r("touchEnd",(()=>{if(!i.destroyed&&i.autoplay.running&&u){if(clearTimeout(h),clearTimeout(t),i.params.autoplay.disableOnInteraction)return c=!1,void(u=!1);c&&i.params.cssMode&&T(),c=!1,u=!1}})),r("slideChange",(()=>{!i.destroyed&&i.autoplay.running&&(m=!0)})),Object.assign(i.autoplay,{start:S,stop:M,pause:E,resume:T})}Object.keys(_D).forEach((e=>{Object.keys(_D[e]).forEach((t=>{LD.prototype[t]=_D[e][t]}))})),LD.use([function(e){let{swiper:t,on:n,emit:i}=e;const a=RI();let r=null,o=null;const s=()=>{t&&!t.destroyed&&t.initialized&&(i("beforeResize"),i("resize"))},l=()=>{t&&!t.destroyed&&t.initialized&&i("orientationchange")};n("init",(()=>{t.params.resizeObserver&&void 0!==a.ResizeObserver?t&&!t.destroyed&&t.initialized&&(r=new ResizeObserver((e=>{o=a.requestAnimationFrame((()=>{const{width:n,height:i}=t;let a=n,r=i;e.forEach((e=>{let{contentBoxSize:n,contentRect:i,target:o}=e;o&&o!==t.el||(a=i?i.width:(n[0]||n).inlineSize,r=i?i.height:(n[0]||n).blockSize)})),a===n&&r===i||s()}))})),r.observe(t.el)):(a.addEventListener("resize",s),a.addEventListener("orientationchange",l))})),n("destroy",(()=>{o&&a.cancelAnimationFrame(o),r&&r.unobserve&&t.el&&(r.unobserve(t.el),r=null),a.removeEventListener("resize",s),a.removeEventListener("orientationchange",l)}))},function(e){let{swiper:t,extendParams:n,on:i,emit:a}=e;const r=[],o=RI(),s=function(e,n){void 0===n&&(n={});const i=new(o.MutationObserver||o.WebkitMutationObserver)((e=>{if(t.__preventObserver__)return;if(1===e.length)return void a("observerUpdate",e[0]);const n=function(){a("observerUpdate",e[0])};o.requestAnimationFrame?o.requestAnimationFrame(n):o.setTimeout(n,0)}));i.observe(e,{attributes:void 0===n.attributes||n.attributes,childList:t.isElement||(void 0===n.childList||n).childList,characterData:void 0===n.characterData||n.characterData}),r.push(i)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),i("init",(()=>{if(t.params.observer){if(t.params.observeParents){const e=YI(t.hostEl);for(let t=0;t<e.length;t+=1)s(e[t])}s(t.hostEl,{childList:t.params.observeSlideChildren}),s(t.wrapperEl,{attributes:!1})}})),i("destroy",(()=>{r.forEach((e=>{e.disconnect()})),r.splice(0,r.length)}))}]);let WD=class extends Yu{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1,this.updateSpacing=e=>{this.slideSpacing=e.detail.spacing,this.swiperInstance&&(this.swiperInstance.params.spaceBetween=this.slideSpacing,this.swiperInstance.update())}}connectedCallback(){super.connectedCallback(),window.addEventListener("child-spacing",this.updateSpacing,!1)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("child-spacing",this.updateSpacing,!1)}styles(){const{scaleFactor:e,component:t}=this,{backgroundBlur:n}=t;return a(`\n :host {\n display: ${t.hidden?"none":"flex"};\n gap: ${t.spacing??0}px;\n flex-direction: column !important;\n ${jc(t.position)} \n width: 100%;\n bottom: -1px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n ${n?`backdrop-filter: blur(${n}px);`:""}\n z-index: ${t.zIndex??1};\n top: 0px;\n transition: all 0.3s;\n ${_c(t,e)}\n ${function(e,t){return`\n padding-right: ${(e.nextSlidePadding??0)*t}px !important;\n padding-left: ${(e.previousSlidePadding??0)*t}px !important;\n `}(t,e)}\n ${Pc(t)}\n ${Oc(t,e,!1)}\n ${Tc(t,!1)}\n }\n :host(:focus){\n ${Tc(t,!0)}\n ${Oc(t,e,!0)}\n }\n .swiper-container {\n ${Ic(t,e)};\n }\n .swiper-pagination{\n position: relative;\n padding: 8px;\n }\n .swiper-pagination-bullet {\n background: ${t.indicatorColor} !important;\n opacity: 1 !important;\n }\n .swiper-pagination-bullet-active {\n background: ${t.activeIndicatorColor} !important;\n }\n `)}updated(){LD.use([DD,RD]);const{autoplay:e,autoplaySeconds:t,showIndicators:n,slideSpacing:i,nextSlidePadding:a,previousSlidePadding:r}=this.component,o=this.shadowRoot?.querySelector(".swiper-container"),s=this.shadowRoot?.querySelector(".swiper-pagination");o&&!this.swiperInstance&&(this.swiperInstance=new LD(o,{initialSlide:0,slidesPerView:1,loop:e,spaceBetween:a??r??i??this.slideSpacing??0,autoplay:!!e&&{delay:1e3*t,disableOnInteraction:!1},pagination:!(null!=n&&!n)&&{el:s,clickable:!0},on:{slideChange(){lu.setCurrentSlideIndex(this.realIndex)}}}))}render(){const e=function(e){if(!e.loopSource)return[];const{slides:t,selectedProducts:n}=lu.state,i="string"==typeof e.loopSource?e.loopSource:"",a=Qd(lu.productDetails,lu.state.selectedPaywall?.sku_menus||[],i);let r=[];return t&&(r=""!=i?t[i].carouselName:e.loopSource??[]),r.map((t=>{const i=a.find((e=>e.id==n[t.productGroupId]));return Bc(e.components,Bc({slide:t},{sku:{...eu(i?.product_details,t,a)}}))||[]}))??[]}(this.component),{focusedBorderColor:t,focusedFillColor:n,fillColor:a}=this.component;return!t&&Zc(a,n)||(this.tabIndex=0),i`
|
|
89
|
-
<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css"/>
|
|
90
|
-
<div class="swiper-container" aria-live="assertive" aria-atomic="true">
|
|
91
|
-
<div class="swiper-wrapper">
|
|
92
|
-
${e.map((e=>e.map((e=>(e.spacing&&(this.slideSpacing=2*e.spacing),i`<div class="swiper-slide">${eh(e,this.scaleFactor)}</div>`)))))}
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
<div class="swiper-pagination"></div>
|
|
96
|
-
`}};c([Xu({type:Object})],WD.prototype,"component",void 0),c([Xu({type:Boolean})],WD.prototype,"inFocusedState",void 0),c([Xu({type:Number})],WD.prototype,"scaleFactor",void 0),WD=c([ku("nami-carousel-container")],WD);let ND=class extends Yu{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this._handleFocus=()=>{this.inFocusedState=!0},this._handleBlur=()=>{this.inFocusedState=!1},this._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||this._handleClick()},this._handleClick=()=>{xh(this.muted?this.component.mutedOnTap:this.component.volumeOnTap),this.requestUpdate()},this.addEventListener("click",this._handleClick,!1),this.addEventListener("focus",this._handleFocus,!1),this.addEventListener("blur",this._handleBlur,!1),this.addEventListener("keydown",this._handleKeyDown,!1)}updated(){this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=this.component.screenreaderHint??""}styles(){const{component:e,scaleFactor:t}=this;return a(`\n :host {\n display: ${e.hidden?"none":"flex"};\n gap: ${e.spacing??0}px;\n cursor: pointer;\n ${Tc(e,!1)}\n ${Pc(e)}\n ${Oc(e,t,!1)}\n }\n :host(:focus){\n ${Tc(e,!0)}\n ${Oc(e,t,!0)}\n }\n `)}render(){this.muted=Ah.instance.muted,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus();const e=this.muted?this.component.mutedComponents:this.component.volumeComponents;return e?.map((e=>eh(e,this.scaleFactor,this.inFocusedState)))}};c([Xu({type:Object})],ND.prototype,"component",void 0),c([Xu({type:Boolean})],ND.prototype,"inFocusedState",void 0),c([Xu({type:Number})],ND.prototype,"scaleFactor",void 0),ND=c([ku("nami-volume-button")],ND);let OD=class extends Yu{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this._handleFocus=()=>{this.inFocusedState=!0},this._handleBlur=()=>{this.inFocusedState=!1},this._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||this._handleClick()},this._handleClick=()=>{xh(this.playing?this.component.playingOnTap:this.component.pausedOnTap),this.requestUpdate()},this.addEventListener("click",this._handleClick,!1),this.addEventListener("focus",this._handleFocus,!1),this.addEventListener("blur",this._handleBlur,!1),this.addEventListener("keydown",this._handleKeyDown,!1)}updated(){this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=this.component.screenreaderHint??""}styles(){const{component:e,scaleFactor:t}=this;return a(`\n :host {\n display: ${e.hidden?"none":"flex"};\n gap: ${e.spacing??0}px;\n cursor: pointer;\n ${Tc(e,!1)}\n ${Pc(e)}\n ${Oc(e,t,!1)}\n }\n :host(:focus){\n ${Tc(e,!0)}\n ${Oc(e,t,!0)}\n }\n `)}render(){this.playing=Ah.instance.playing,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus();return(this.playing?this.component.playingComponents:this.component.pausedComponents).map((e=>eh(e,this.scaleFactor,this.inFocusedState)))}};c([Xu({type:Object})],OD.prototype,"component",void 0),c([Xu({type:Boolean})],OD.prototype,"inFocusedState",void 0),c([Xu({type:Number})],OD.prototype,"scaleFactor",void 0),OD=c([ku("nami-play-pause-button")],OD);let FD=class extends Yu{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1}styles(){const{component:e}=this;return a(`\n :host {\n display: ${e.hidden?"none":"flex"};\n align-items: center;\n justify-content: center;\n }\n\n :host > *:not(nami-text) {\n position: absolute;\n }\n `)}render(){const{focusedBorderColor:e,focusedFillColor:t,fillColor:n}=this.component;!e&&Zc(n,t)||(this.tabIndex=0);return(this.component.components??[]).map((e=>eh(e,this.scaleFactor)))}};c([Xu({type:Object})],FD.prototype,"component",void 0),c([Xu({type:Boolean})],FD.prototype,"inFocusedState",void 0),c([Xu({type:Number})],FD.prototype,"scaleFactor",void 0),FD=c([ku("nami-stack")],FD);var jD,zD,$D={};function UD(){return zD?jD:(zD=1,jD=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var HD,BD={},GD={};function XD(){if(HD)return GD;let e;HD=1;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return GD.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},GD.getSymbolTotalCodewords=function(e){return t[e]},GD.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},GD.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},GD.isKanjiModeEnabled=function(){return void 0!==e},GD.toSJIS=function(t){return e(t)},GD}var YD,VD,KD,qD,JD,QD={};function ZD(){return YD||(YD=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(e){return n}}}(QD)),QD}var eR,tR={};var nR,iR={};var aR,rR={};var oR,sR={};function lR(){if(oR)return sR;oR=1;const e=ZD(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return sR.getBlocksCount=function(n,i){switch(i){case e.L:return t[4*(n-1)+0];case e.M:return t[4*(n-1)+1];case e.Q:return t[4*(n-1)+2];case e.H:return t[4*(n-1)+3];default:return}},sR.getTotalCodewordsCount=function(t,i){switch(i){case e.L:return n[4*(t-1)+0];case e.M:return n[4*(t-1)+1];case e.Q:return n[4*(t-1)+2];case e.H:return n[4*(t-1)+3];default:return}},sR}var dR,uR,cR,hR,mR={},fR={};function pR(){return uR||(uR=1,function(e){const t=function(){if(dR)return fR;dR=1;const e=new Uint8Array(512),t=new Uint8Array(256);return function(){let n=1;for(let i=0;i<255;i++)e[i]=n,t[n]=i,n<<=1,256&n&&(n^=285);for(let t=255;t<512;t++)e[t]=e[t-255]}(),fR.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},fR.exp=function(t){return e[t]},fR.mul=function(n,i){return 0===n||0===i?0:e[t[n]+t[i]]},fR}();e.mul=function(e,n){const i=new Uint8Array(e.length+n.length-1);for(let a=0;a<e.length;a++)for(let r=0;r<n.length;r++)i[a+r]^=t.mul(e[a],n[r]);return i},e.mod=function(e,n){let i=new Uint8Array(e);for(;i.length-n.length>=0;){const e=i[0];for(let a=0;a<n.length;a++)i[a]^=t.mul(n[a],e);let a=0;for(;a<i.length&&0===i[a];)a++;i=i.slice(a)}return i},e.generateECPolynomial=function(n){let i=new Uint8Array([1]);for(let a=0;a<n;a++)i=e.mul(i,new Uint8Array([1,t.exp(a)]));return i}}(mR)),mR}var gR,vR={},yR={},wR={};function bR(){return gR||(gR=1,wR.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),wR}var kR,SR,MR,ER={};function TR(){if(kR)return ER;kR=1;const e="[0-9]+";let t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";t=t.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+t+")(?:.|[\r\n]))+";ER.KANJI=new RegExp(t,"g"),ER.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),ER.BYTE=new RegExp(n,"g"),ER.NUMERIC=new RegExp(e,"g"),ER.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+t+"$"),a=new RegExp("^"+e+"$"),r=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return ER.testKanji=function(e){return i.test(e)},ER.testNumeric=function(e){return a.test(e)},ER.testAlphanumeric=function(e){return r.test(e)},ER}function PR(){return SR||(SR=1,function(e){const t=bR(),n=TR();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(e){return n}}}(yR)),yR}function AR(){return MR||(MR=1,function(e){const t=XD(),n=lR(),i=ZD(),a=PR(),r=bR(),o=t.getBCHDigit(7973);function s(e,t){return a.getCharCountIndicator(e,t)+4}function l(e,t){let n=0;return e.forEach((function(e){const i=s(e.mode,t);n+=i+e.getBitsLength()})),n}e.from=function(e,t){return r.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,i,o){if(!r.isValid(e))throw new Error("Invalid QR Code version");void 0===o&&(o=a.BYTE);const l=8*(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,i));if(o===a.MIXED)return l;const d=l-s(o,e);switch(o){case a.NUMERIC:return Math.floor(d/10*3);case a.ALPHANUMERIC:return Math.floor(d/11*2);case a.KANJI:return Math.floor(d/13);case a.BYTE:default:return Math.floor(d/8)}},e.getBestVersionForData=function(t,n){let r;const o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let i=1;i<=40;i++)if(l(t,i)<=e.getCapacity(i,n,a.MIXED))return i}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,i){for(let a=1;a<=40;a++)if(n<=e.getCapacity(a,i,t))return a}(r.mode,r.getLength(),o)},e.getEncodedBits=function(e){if(!r.isValid(e)||e<7)throw new Error("Invalid QR Code version");let n=e<<12;for(;t.getBCHDigit(n)-o>=0;)n^=7973<<t.getBCHDigit(n)-o;return e<<12|n}}(vR)),vR}var xR,_R={};var CR,LR,IR,DR,RR,WR,NR,OR,FR={};var jR,zR,$R,UR={exports:{}};function HR(){return jR||(jR=1,function(e){var t={single_source_shortest_paths:function(e,n,i){var a={},r={};r[n]=0;var o,s,l,d,u,c,h,m=t.PriorityQueue.make();for(m.push(n,0);!m.empty();)for(l in s=(o=m.pop()).value,d=o.cost,u=e[s]||{})u.hasOwnProperty(l)&&(c=d+u[l],h=r[l],(void 0===r[l]||h>c)&&(r[l]=c,m.push(l,c),a[l]=s));if(void 0!==i&&void 0===r[i]){var f=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(f)}return a},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],i=t;i;)n.push(i),e[i],i=e[i];return n.reverse(),n},find_path:function(e,n,i){var a=t.single_source_shortest_paths(e,n,i);return t.extract_shortest_path_from_predecessor_list(a,i)},PriorityQueue:{make:function(e){var n,i=t.PriorityQueue,a={};for(n in e=e||{},i)i.hasOwnProperty(n)&&(a[n]=i[n]);return a.queue=[],a.sorter=e.sorter||i.default_sorter,a},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t}(UR)),UR.exports}function BR(){return zR||(zR=1,function(e){const t=PR(),n=function(){if(LR)return CR;LR=1;const e=PR();function t(t){this.mode=e.NUMERIC,this.data=t.toString()}return t.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){let t,n,i;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),i=parseInt(n,10),e.put(i,10);const a=this.data.length-t;a>0&&(n=this.data.substr(t),i=parseInt(n,10),e.put(i,3*a+1))},CR=t}(),i=function(){if(DR)return IR;DR=1;const e=PR(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(t){this.mode=e.ALPHANUMERIC,this.data=t}return n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let i=45*t.indexOf(this.data[n]);i+=t.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(t.indexOf(this.data[n]),6)},IR=n}(),a=function(){if(WR)return RR;WR=1;const e=PR();function t(t){this.mode=e.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}return t.getBitsLength=function(e){return 8*e},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},RR=t}(),r=function(){if(OR)return NR;OR=1;const e=PR(),t=XD();function n(t){this.mode=e.KANJI,this.data=t}return n.getBitsLength=function(e){return 13*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n<this.data.length;n++){let i=t.toSJIS(this.data[n]);if(i>=33088&&i<=40956)i-=33088;else{if(!(i>=57408&&i<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");i-=49472}i=192*(i>>>8&255)+(255&i),e.put(i,13)}},NR=n}(),o=TR(),s=XD(),l=HR();function d(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){const i=[];let a;for(;null!==(a=e.exec(n));)i.push({data:a[0],index:a.index,mode:t,length:a[0].length});return i}function c(e){const n=u(o.NUMERIC,t.NUMERIC,e),i=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e);let a,r;s.isKanjiModeEnabled()?(a=u(o.BYTE,t.BYTE,e),r=u(o.KANJI,t.KANJI,e)):(a=u(o.BYTE_KANJI,t.BYTE,e),r=[]);return n.concat(i,a,r).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function h(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return i.getBitsLength(e);case t.KANJI:return r.getBitsLength(e);case t.BYTE:return a.getBitsLength(e)}}function m(e,o){let l;const d=t.getBestModeForData(e);if(l=t.from(o,d),l!==t.BYTE&&l.bit<d.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(l)+".\n Suggested mode is: "+t.toString(d));switch(l!==t.KANJI||s.isKanjiModeEnabled()||(l=t.BYTE),l){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new i(e);case t.KANJI:return new r(e);case t.BYTE:return new a(e)}}e.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e}),[])},e.fromString=function(n,i){const a=function(e){const n=[];for(let i=0;i<e.length;i++){const a=e[i];switch(a.mode){case t.NUMERIC:n.push([a,{data:a.data,mode:t.ALPHANUMERIC,length:a.length},{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.ALPHANUMERIC:n.push([a,{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.KANJI:n.push([a,{data:a.data,mode:t.BYTE,length:d(a.data)}]);break;case t.BYTE:n.push([{data:a.data,mode:t.BYTE,length:d(a.data)}])}}return n}(c(n,s.isKanjiModeEnabled())),r=function(e,n){const i={},a={start:{}};let r=["start"];for(let o=0;o<e.length;o++){const s=e[o],l=[];for(let e=0;e<s.length;e++){const d=s[e],u=""+o+e;l.push(u),i[u]={node:d,lastCount:0},a[u]={};for(let e=0;e<r.length;e++){const o=r[e];i[o]&&i[o].node.mode===d.mode?(a[o][u]=h(i[o].lastCount+d.length,d.mode)-h(i[o].lastCount,d.mode),i[o].lastCount+=d.length):(i[o]&&(i[o].lastCount=d.length),a[o][u]=h(d.length,d.mode)+4+t.getCharCountIndicator(d.mode,n))}}r=l}for(let e=0;e<r.length;e++)a[r[e]].end=0;return{map:a,table:i}}(a,i),o=l.find_path(r.map,"start","end"),u=[];for(let e=1;e<o.length-1;e++)u.push(r.table[o[e]].node);return e.fromArray(function(e){return e.reduce((function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(u))},e.rawSplit=function(t){return e.fromArray(c(t,s.isKanjiModeEnabled()))}}(FR)),FR}function GR(){if($R)return BD;$R=1;const e=XD(),t=ZD(),n=function(){if(KD)return VD;function e(){this.buffer=[],this.length=0}return KD=1,e.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},VD=e}(),i=function(){if(JD)return qD;function e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return JD=1,e.prototype.set=function(e,t,n,i){const a=e*this.size+t;this.data[a]=n,i&&(this.reservedBit[a]=!0)},e.prototype.get=function(e,t){return this.data[e*this.size+t]},e.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},qD=e}(),a=(eR||(eR=1,function(e){const t=XD().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];const n=Math.floor(e/7)+2,i=t(e),a=145===i?26:2*Math.ceil((i-13)/(2*n-2)),r=[i-7];for(let e=1;e<n-1;e++)r[e]=r[e-1]-a;return r.push(6),r.reverse()},e.getPositions=function(t){const n=[],i=e.getRowColCoords(t),a=i.length;for(let e=0;e<a;e++)for(let t=0;t<a;t++)0===e&&0===t||0===e&&t===a-1||e===a-1&&0===t||n.push([i[e],i[t]]);return n}}(tR)),tR),r=function(){if(nR)return iR;nR=1;const e=XD().getSymbolSize;return iR.getPositions=function(t){const n=e(t);return[[0,0],[n-7,0],[0,n-7]]},iR}(),o=(aR||(aR=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t=3,n=3,i=40,a=10;function r(t,n,i){switch(t){case e.Patterns.PATTERN000:return(n+i)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return i%3==0;case e.Patterns.PATTERN011:return(n+i)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(i/3))%2==0;case e.Patterns.PATTERN101:return n*i%2+n*i%3==0;case e.Patterns.PATTERN110:return(n*i%2+n*i%3)%2==0;case e.Patterns.PATTERN111:return(n*i%3+(n+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){const n=e.size;let i=0,a=0,r=0,o=null,s=null;for(let l=0;l<n;l++){a=r=0,o=s=null;for(let d=0;d<n;d++){let n=e.get(l,d);n===o?a++:(a>=5&&(i+=t+(a-5)),o=n,a=1),n=e.get(d,l),n===s?r++:(r>=5&&(i+=t+(r-5)),s=n,r=1)}a>=5&&(i+=t+(a-5)),r>=5&&(i+=t+(r-5))}return i},e.getPenaltyN2=function(e){const t=e.size;let i=0;for(let n=0;n<t-1;n++)for(let a=0;a<t-1;a++){const t=e.get(n,a)+e.get(n,a+1)+e.get(n+1,a)+e.get(n+1,a+1);4!==t&&0!==t||i++}return i*n},e.getPenaltyN3=function(e){const t=e.size;let n=0,a=0,r=0;for(let i=0;i<t;i++){a=r=0;for(let o=0;o<t;o++)a=a<<1&2047|e.get(i,o),o>=10&&(1488===a||93===a)&&n++,r=r<<1&2047|e.get(o,i),o>=10&&(1488===r||93===r)&&n++}return n*i},e.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let i=0;i<n;i++)t+=e.data[i];return Math.abs(Math.ceil(100*t/n/5)-10)*a},e.applyMask=function(e,t){const n=t.size;for(let i=0;i<n;i++)for(let a=0;a<n;a++)t.isReserved(a,i)||t.xor(a,i,r(e,a,i))},e.getBestMask=function(t,n){const i=Object.keys(e.Patterns).length;let a=0,r=1/0;for(let o=0;o<i;o++){n(o),e.applyMask(o,t);const i=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),i<r&&(r=i,a=o)}return a}}(rR)),rR),s=lR(),l=function(){if(hR)return cR;hR=1;const e=pR();function t(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(t){this.degree=t,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const i=e.mod(n,this.genPoly),a=this.degree-i.length;if(a>0){const e=new Uint8Array(this.degree);return e.set(i,a),e}return i},cR=t}(),d=AR(),u=function(){if(xR)return _R;xR=1;const e=XD(),t=e.getBCHDigit(1335);return _R.getEncodedBits=function(n,i){const a=n.bit<<3|i;let r=a<<10;for(;e.getBCHDigit(r)-t>=0;)r^=1335<<e.getBCHDigit(r)-t;return 21522^(a<<10|r)},_R}(),c=PR(),h=BR();function m(e,t,n){const i=e.size,a=u.getEncodedBits(t,n);let r,o;for(r=0;r<15;r++)o=1==(a>>r&1),r<6?e.set(r,8,o,!0):r<8?e.set(r+1,8,o,!0):e.set(i-15+r,8,o,!0),r<8?e.set(8,i-r-1,o,!0):r<9?e.set(8,15-r-1+1,o,!0):e.set(8,15-r-1,o,!0);e.set(i-8,8,1,!0)}function f(t,i,a){const r=new n;a.forEach((function(e){r.put(e.mode.bit,4),r.put(e.getLength(),c.getCharCountIndicator(e.mode,t)),e.write(r)}));const o=8*(e.getSymbolTotalCodewords(t)-s.getTotalCodewordsCount(t,i));for(r.getLengthInBits()+4<=o&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);const d=(o-r.getLengthInBits())/8;for(let e=0;e<d;e++)r.put(e%2?17:236,8);return function(t,n,i){const a=e.getSymbolTotalCodewords(n),r=s.getTotalCodewordsCount(n,i),o=a-r,d=s.getBlocksCount(n,i),u=a%d,c=d-u,h=Math.floor(a/d),m=Math.floor(o/d),f=m+1,p=h-m,g=new l(p);let v=0;const y=new Array(d),w=new Array(d);let b=0;const k=new Uint8Array(t.buffer);for(let e=0;e<d;e++){const t=e<c?m:f;y[e]=k.slice(v,v+t),w[e]=g.encode(y[e]),v+=t,b=Math.max(b,t)}const S=new Uint8Array(a);let M,E,T=0;for(M=0;M<b;M++)for(E=0;E<d;E++)M<y[E].length&&(S[T++]=y[E][M]);for(M=0;M<p;M++)for(E=0;E<d;E++)S[T++]=w[E][M];return S}(r,t,i)}function p(t,n,s,l){let u;if(Array.isArray(t))u=h.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let e=n;if(!e){const n=h.rawSplit(t);e=d.getBestVersionForData(n,s)}u=h.fromString(t,e||40)}}const c=d.getBestVersionForData(u,s);if(!c)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<c)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+c+".\n")}else n=c;const p=f(n,s,u),g=e.getSymbolSize(n),v=new i(g);return function(e,t){const n=e.size,i=r.getPositions(t);for(let t=0;t<i.length;t++){const a=i[t][0],r=i[t][1];for(let t=-1;t<=7;t++)if(!(a+t<=-1||n<=a+t))for(let i=-1;i<=7;i++)r+i<=-1||n<=r+i||(t>=0&&t<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===t||6===t)||t>=2&&t<=4&&i>=2&&i<=4?e.set(a+t,r+i,!0,!0):e.set(a+t,r+i,!1,!0))}}(v,n),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(v),function(e,t){const n=a.getPositions(t);for(let t=0;t<n.length;t++){const i=n[t][0],a=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(i+t,a+n,!0,!0):e.set(i+t,a+n,!1,!0)}}(v,n),m(v,s,0),n>=7&&function(e,t){const n=e.size,i=d.getEncodedBits(t);let a,r,o;for(let t=0;t<18;t++)a=Math.floor(t/3),r=t%3+n-8-3,o=1==(i>>t&1),e.set(a,r,o,!0),e.set(r,a,o,!0)}(v,n),function(e,t){const n=e.size;let i=-1,a=n-1,r=7,o=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(a,s-n)){let i=!1;o<t.length&&(i=1==(t[o]>>>r&1)),e.set(a,s-n,i),r--,-1===r&&(o++,r=7)}if(a+=i,a<0||n<=a){a-=i,i=-i;break}}}(v,p),isNaN(l)&&(l=o.getBestMask(v,m.bind(null,v,s))),o.applyMask(l,v),m(v,s,l),{modules:v,version:n,errorCorrectionLevel:s,maskPattern:l,segments:u}}return BD.create=function(n,i){if(void 0===n||""===n)throw new Error("No input text");let a,r,s=t.M;return void 0!==i&&(s=t.from(i.errorCorrectionLevel,t.M),a=d.from(i.version),r=o.from(i.maskPattern),i.toSJISFunc&&e.setToSJISFunction(i.toSJISFunc)),p(n,a,s,r)},BD}var XR,YR,VR={},KR={};function qR(){return XR||(XR=1,function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});const n=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,i=e.width&&e.width>=21?e.width:void 0,a=e.scale||4;return{width:i,scale:i?4:a,margin:n,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,n){const i=e.getScale(t,n);return Math.floor((t+2*n.margin)*i)},e.qrToImageData=function(t,n,i){const a=n.modules.size,r=n.modules.data,o=e.getScale(a,i),s=Math.floor((a+2*i.margin)*o),l=i.margin*o,d=[i.color.light,i.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=4*(e*s+n),c=i.color.light;if(e>=l&&n>=l&&e<s-l&&n<s-l){c=d[r[Math.floor((e-l)/o)*a+Math.floor((n-l)/o)]?1:0]}t[u++]=c.r,t[u++]=c.g,t[u++]=c.b,t[u]=c.a}}}(KR)),KR}function JR(){return YR||(YR=1,function(e){const t=qR();e.render=function(e,n,i){let a=i,r=n;void 0!==a||n&&n.getContext||(a=n,n=void 0),n||(r=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),a=t.getOptions(a);const o=t.getImageWidth(e.modules.size,a),s=r.getContext("2d"),l=s.createImageData(o,o);return t.qrToImageData(l.data,e,a),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(s,r,o),s.putImageData(l,0,0),r},e.renderToDataURL=function(t,n,i){let a=i;void 0!==a||n&&n.getContext||(a=n,n=void 0),a||(a={});const r=e.render(t,n,a),o=a.type||"image/png",s=a.rendererOpts||{};return r.toDataURL(o,s.quality)}}(VR)),VR}var QR,ZR,eW={};function tW(){if(QR)return eW;QR=1;const e=qR();function t(e,t){const n=e.a/255,i=t+'="'+e.hex+'"';return n<1?i+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function n(e,t,n){let i=e+t;return void 0!==n&&(i+=" "+n),i}return eW.render=function(i,a,r){const o=e.getOptions(a),s=i.modules.size,l=i.modules.data,d=s+2*o.margin,u=o.color.light.a?"<path "+t(o.color.light,"fill")+' d="M0 0h'+d+"v"+d+'H0z"/>':"",c="<path "+t(o.color.dark,"stroke")+' d="'+function(e,t,i){let a="",r=0,o=!1,s=0;for(let l=0;l<e.length;l++){const d=Math.floor(l%t),u=Math.floor(l/t);d||o||(o=!0),e[l]?(s++,l>0&&d>0&&e[l-1]||(a+=o?n("M",d+i,.5+u+i):n("m",r,0),r=0,o=!1),d+1<t&&e[l+1]||(a+=n("h",s),s=0)):r++}return a}(l,s,o.margin)+'"/>',h='viewBox="0 0 '+d+" "+d+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+h+' shape-rendering="crispEdges">'+u+c+"</svg>\n";return"function"==typeof r&&r(null,m),m},eW}var nW=function(){if(ZR)return $D;ZR=1;const e=UD(),t=GR(),n=JR(),i=tW();function a(n,i,a,r,o){const s=[].slice.call(arguments,1),l=s.length,d="function"==typeof s[l-1];if(!d&&!e())throw new Error("Callback required as last argument");if(!d){if(l<1)throw new Error("Too few arguments provided");return 1===l?(a=i,i=r=void 0):2!==l||i.getContext||(r=a,a=i,i=void 0),new Promise((function(e,o){try{const o=t.create(a,r);e(n(o,i,r))}catch(e){o(e)}}))}if(l<2)throw new Error("Too few arguments provided");2===l?(o=a,a=i,i=r=void 0):3===l&&(i.getContext&&void 0===o?(o=r,r=void 0):(o=r,r=a,a=i,i=void 0));try{const e=t.create(a,r);o(null,n(e,i,r))}catch(e){o(e)}}return $D.create=t.create,$D.toCanvas=a.bind(null,n.render),$D.toDataURL=a.bind(null,n.renderToDataURL),$D.toString=a.bind(null,(function(e,t,n){return i.render(e,n)})),$D}(),iW=Rs(nW);let aW=class extends Yu{styles(){return a(`\n :host {\n border-width: ${this.component.borderWidth??0}px;\n border-color: ${this.component.borderColor??"transparent"};\n border-style: solid;\n }`)}async renderQr(){const e=this.renderRoot.querySelector("canvas");if(e&&this.component.url)try{await iW.toCanvas(e,this.component.url,{width:Number(this.component.width),color:{dark:this.component.color||"#000000",light:this.component.fillColor||"#ffffff"},margin:0})}catch(e){console.error(`QR render failed for URL "${this.component.url}":`,e)}}firstUpdated(){this.renderQr()}render(){if(this.component){const{height:e,width:t}=this.component;return i`<canvas height="${e}" width="${t}"></canvas>`}return i`<canvas></canvas>`}};c([Xu({type:Object})],aW.prototype,"component",void 0),aW=c([ku("nami-qr-code")],aW);export{hc as LaunchCampaignError,De as LogLevel,yu as Nami,fc as NamiCampaignManager,xs as NamiCampaignRuleType,gc as NamiCustomerManager,yc as NamiEntitlementManager,wc as NamiFlowManager,Ku as NamiPaywallAction,vc as NamiPaywallManager,As as isNamiFlowCampaign};
|