@namiml/web-sdk 1.3.1 → 1.4.0

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.
Files changed (80) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/components/ContextConsumer.d.ts +1 -1
  3. package/dist/components/ContextProvider.d.ts +7 -7
  4. package/dist/components/Paywall.d.ts +4 -4
  5. package/dist/components/TemplateComponent.d.ts +1 -1
  6. package/dist/components/containers/BackgroundContainer.d.ts +2 -1
  7. package/dist/components/containers/CollapseContainer.d.ts +1 -1
  8. package/dist/components/containers/Container.d.ts +6 -2
  9. package/dist/components/containers/Content.d.ts +1 -1
  10. package/dist/components/containers/Footer.d.ts +1 -1
  11. package/dist/components/containers/Header.d.ts +1 -1
  12. package/dist/components/containers/ProductContainer.d.ts +1 -1
  13. package/dist/components/containers/ResponsiveGrid.d.ts +9 -0
  14. package/dist/components/elements/Button.d.ts +4 -1
  15. package/dist/components/elements/Image.d.ts +1 -1
  16. package/dist/components/elements/SegmentPicker.d.ts +1 -1
  17. package/dist/components/elements/SegmentPickerItem.d.ts +1 -1
  18. package/dist/components/elements/Spacer.d.ts +1 -1
  19. package/dist/components/elements/Text.d.ts +1 -1
  20. package/dist/components/elements/Video.d.ts +2 -1
  21. package/dist/components/index.d.ts +3 -1
  22. package/dist/components/productDetails.d.ts +2 -2
  23. package/dist/components/utils/actionTap.d.ts +2 -2
  24. package/dist/components/utils/dateTIme.d.ts +3 -0
  25. package/dist/components/utils/helpers.d.ts +6 -5
  26. package/dist/components/utils/impression.d.ts +2 -2
  27. package/dist/components/utils/products.d.ts +4 -3
  28. package/dist/components/utils/state.d.ts +6 -4
  29. package/dist/components/utils/styles.d.ts +4 -3
  30. package/dist/nami/api.d.ts +4 -3
  31. package/dist/nami/campaign.d.ts +36 -10
  32. package/dist/nami/customer.d.ts +58 -14
  33. package/dist/nami/entitlement.d.ts +22 -5
  34. package/dist/nami/index.d.ts +7 -1
  35. package/dist/nami/namiRefs.d.ts +1 -1
  36. package/dist/nami/paywalls.d.ts +49 -18
  37. package/dist/nami/purchase.d.ts +5 -1
  38. package/dist/nami/utils/campaign.d.ts +2 -2
  39. package/dist/nami/utils/entitlement.d.ts +4 -4
  40. package/dist/nami/utils/paywall.d.ts +1 -1
  41. package/dist/nami/utils/purchase.d.ts +2 -2
  42. package/dist/nami-web.cjs +14 -15
  43. package/dist/nami-web.d.ts +8 -879
  44. package/dist/nami-web.js +14 -15
  45. package/dist/nami-web.mjs +14 -15
  46. package/dist/nami-web.umd.js +14 -15
  47. package/dist/repositories/campaignRule.repository.d.ts +3 -3
  48. package/dist/repositories/config.repository.d.ts +1 -1
  49. package/dist/repositories/customerJourney.repository.d.ts +5 -0
  50. package/dist/repositories/device.repository.d.ts +1 -1
  51. package/dist/repositories/entitlement.repository.d.ts +1 -1
  52. package/dist/repositories/paywall.repository.d.ts +1 -1
  53. package/dist/repositories/products.repository.d.ts +1 -1
  54. package/dist/services/logger.service.d.ts +1 -1
  55. package/dist/services/storage.service.d.ts +7 -1
  56. package/dist/types/components/containers.d.ts +11 -2
  57. package/dist/types/components/elements.d.ts +1 -0
  58. package/dist/types/components/index.d.ts +2 -2
  59. package/dist/types/config.d.ts +2 -2
  60. package/dist/types/customer.d.ts +2 -0
  61. package/dist/types/entitlements.d.ts +2 -0
  62. package/dist/types/externals/campaign.d.ts +9 -1
  63. package/dist/types/externals/config.d.ts +27 -1
  64. package/dist/types/externals/customer.d.ts +18 -0
  65. package/dist/types/externals/entitlement.d.ts +27 -0
  66. package/dist/types/externals/index.d.ts +3 -0
  67. package/dist/types/externals/languages.d.ts +197 -1
  68. package/dist/types/{loglevel.d.ts → externals/loglevel.d.ts} +3 -0
  69. package/dist/types/externals/paywall.d.ts +31 -0
  70. package/dist/types/externals/product.d.ts +4 -0
  71. package/dist/types/externals/purchase.d.ts +24 -0
  72. package/dist/types/externals/sku.d.ts +14 -0
  73. package/dist/types/paywall.d.ts +8 -7
  74. package/dist/types/profile.d.ts +2 -1
  75. package/dist/utils/config.d.ts +2 -1
  76. package/dist/utils/const.d.ts +1 -1
  77. package/dist/utils/device.d.ts +1 -1
  78. package/dist/utils/fonts.d.ts +1 -1
  79. package/package.json +5 -4
  80. /package/dist/types/{errors.d.ts → externals/errors.d.ts} +0 -0
package/dist/nami-web.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("lit");const t=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(){}},n=new WeakMap,r=e=>{let t=n.get(e);return void 0===t&&n.set(e,t=new Map),t},s=class{constructor(){this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(r(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){r(this).set(e,String(t))}removeAttribute(e){r(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 r(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 t(this);return this.__internals=e,e}getAttribute(e){return r(this).get(e)??null}},i=class extends s{};function o(e,t,n,r){var s,i=arguments.length,o=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,n,o):s(t,n))||o);return i>3&&o&&Object.defineProperty(t,n,o),o}function a(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}"undefined"==typeof HTMLElement&&(globalThis.HTMLElement=i),"function"==typeof SuppressedError&&SuppressedError;const{NAMI_SDK_VERSION:c="3.2.1",PRODUCTION:l="production",DEVELOPMENT:u="development",PLATFORM_ID_REQUIRED:h="Platform ID is required",DEVICE_ID_REQUIRED:p="Device ID is required",EXTERNAL_ID_REQUIRED:d="External ID is required",SDK_NOT_INITIALIZED:m="SDK has not been initialized. Make sure to call Nami.configure() first!",CAMPAIGN_NOT_AVAILABLE:f="Campaign is not available",UNABLE_TO_UPDATE_CDP_ID:g="Unable to update CDP id in anonymous mode",ANONYMOUS_MODE_ALREADY_ON:y="Anonymous mode is already turned on.",ANONYMOUS_MODE_ALREADY_OFF:b="Anonymous mode is already turned off.",ANONYMOUS_MODE_LOGIN_NOT_ALLOWED:_="Login/logout are not available in anonymous mode",SESSION_REQUIRED:v="Session is required",AUTH_DEVICE:w="nami_auth_device",NAMI_CONFIGURATION:S="nami_configuration",NAMI_PROFILE:A="nami_profile",API_CONFIG:k="api_config",API_CAMPAIGN_RULES:E="api_campaign_rules",API_PAYWALLS:I="api_paywalls",API_PRODUCTS:x="api_products",API_ACTIVE_ENTITLEMENTS:C="api_active_entitlements",SERVER_NAMI_ENTITLEMENTS:P="server_active_entitlements",INITIAL_APP_CONFIG:O="initial_app_config",INITIAL_CAMPAIGN_RULES:$="initial_campaign_rules",INITIAL_PAYWALLS:N="initial_paywalls",INITIAL_PRODUCTS:L="initial_products",LOCAL_NAMI_ENTITLEMENTS:M="local_active_entitlements",CUSTOMER_ATTRIBUTES_KEY_PREFIX:T="nami_cmr_attributes_",ANONYMOUS_MODE:R="nami_anonymous_mode",KEY_SESSION_COUNTER:D="nami_session_counter",INITIAL_SESSION_COUNTER_VALUE:F=1,NAMI_LAST_IMPRESSION_ID:z="nami_last_impression_id",NAMI_PURCHASE_IMPRESSION_ID:U="nami_purchase_impression_id",NAMI_SESSION_ID:B="nami_session_id",API_VERSION:j="v3",BASE_URL_PATH:H=`sdk/${j}/platform`,BASE_URL:X="https://app.namiml.com",BASE_STAGING_URL:V="https://app-staging.namiml.com",CUSTOM_HOST_PREFIX:G="namiAPIHost=",USE_STAGING_API:W="useStagingAPI",EXTENDED_CLIENT_INFO_PREFIX:Y="extendedClientInfo",EXTENDED_CLIENT_INFO_DELIMITER:q=":",EXTENDED_PLATFORM:K="extended-platform",EXTENDED_PLATFORM_VERSION:Q="extended-platform-version",API_MAX_CALLS_LIMIT:Z=2,API_RETRY_DELAY_SEC:J=2,API_TIMEOUT_LIMIT:ee=2e4,DEVICE_API_TIMEOUT_LIMIT:te=3e3,STATUS_SUCCESS:ne=200,STATUS_BAD_REQUEST:re=400,STATUS_NOT_FOUND:se=404,STATUS_INTERNAL_SERVER_ERROR:ie=500,INITIAL_SUCCESS:oe="Initial success",RECONFIG_SUCCESS:ae="Reconfig success",ALREADY_CONFIGURED:ce="Already configured",AVAILABLE_CAMPAIGNS_CHANGED:le="AvailableCampaignsChanged",PAYWALL_ACTION_EVENT:ue="PaywallActionEvent",AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED:he="AvailableActiveEntitlementsChanged",SKU_TEXT_REGEX:pe=/\$\{sku\.(\w+)(:\d+)?\}/g,VAR_REGEX:de=/\$\{\s*(\w+(\.[a-zA-Z\d_:${}-]{0,99})*?)\s*}/g,CORS_PROXY_URL:me="https://hosted-content-staging.namiml.com",CORS_PROXY_URL_LOCAL:fe="http://localhost:8001"}={};var ge;!function(e){e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR"}(ge||(ge={}));const ye={debug:ge.DEBUG,info:ge.INFO,warn:ge.WARN,error:ge.ERROR};const be=new class{constructor(){this.setLogger=e=>{this.currentLogLevel=e?ye[e]:ge.WARN}}debug(e,...t){this.shouldLog(ge.DEBUG)&&console.debug(this.formatMessage(ge.DEBUG,e,...t))}info(e,...t){this.shouldLog(ge.INFO)&&console.info(this.formatMessage(ge.INFO,e,...t))}warn(e,...t){this.shouldLog(ge.WARN)&&console.warn(this.formatMessage(ge.WARN,e,...t))}error(e,...t){this.shouldLog(ge.ERROR)&&console.error(this.formatMessage(ge.ERROR,e,...t))}shouldLog(e){return e>=this.currentLogLevel}formatMessage(e,t,...n){const r=ge[e];return`[${(new Date).toISOString()}] [${r}] ${t} ${n=n.map((e=>"object"==typeof e?JSON.stringify(e):e))}`}};var _e="object"==typeof global&&global&&global.Object===Object&&global,ve="object"==typeof self&&self&&self.Object===Object&&self,we=_e||ve||Function("return this")(),Se=we.Symbol,Ae=Object.prototype,ke=Ae.hasOwnProperty,Ee=Ae.toString,Ie=Se?Se.toStringTag:void 0;var xe=Object.prototype.toString;var Ce="[object Null]",Pe="[object Undefined]",Oe=Se?Se.toStringTag:void 0;function $e(e){return null==e?void 0===e?Pe:Ce:Oe&&Oe in Object(e)?function(e){var t=ke.call(e,Ie),n=e[Ie];try{e[Ie]=void 0;var r=!0}catch(e){}var s=Ee.call(e);return r&&(t?e[Ie]=n:delete e[Ie]),s}(e):function(e){return xe.call(e)}(e)}function Ne(e){return null!=e&&"object"==typeof e}var Le="[object Symbol]";function Me(e){return"symbol"==typeof e||Ne(e)&&$e(e)==Le}var Te=Array.isArray,Re=1/0,De=Se?Se.prototype:void 0,Fe=De?De.toString:void 0;function ze(e){if("string"==typeof e)return e;if(Te(e))return function(e,t){for(var n=-1,r=null==e?0:e.length,s=Array(r);++n<r;)s[n]=t(e[n],n,e);return s}(e,ze)+"";if(Me(e))return Fe?Fe.call(e):"";var t=e+"";return"0"==t&&1/e==-Re?"-0":t}function Ue(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Be(e){return e}var je="[object AsyncFunction]",He="[object Function]",Xe="[object GeneratorFunction]",Ve="[object Proxy]";function Ge(e){if(!Ue(e))return!1;var t=$e(e);return t==He||t==Xe||t==je||t==Ve}var We,Ye=we["__core-js_shared__"],qe=(We=/[^.]+$/.exec(Ye&&Ye.keys&&Ye.keys.IE_PROTO||""))?"Symbol(src)_1."+We:"";var Ke=Function.prototype.toString;function Qe(e){if(null!=e){try{return Ke.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Ze=/^\[object .+?Constructor\]$/,Je=Function.prototype,et=Object.prototype,tt=Je.toString,nt=et.hasOwnProperty,rt=RegExp("^"+tt.call(nt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function st(e){return!(!Ue(e)||(t=e,qe&&qe in t))&&(Ge(e)?rt:Ze).test(Qe(e));var t}function it(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return st(n)?n:void 0}var ot=it(we,"WeakMap");function at(e){return e!=e}function ct(e,t){return!!(null==e?0:e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var r=n-1,s=e.length;++r<s;)if(e[r]===t)return r;return-1}(e,t,n):function(e,t,n){for(var r=e.length,s=n+-1;++s<r;)if(t(e[s],s,e))return s;return-1}(e,at,n)}(e,t,0)>-1}var lt=9007199254740991,ut=/^(?:0|[1-9]\d*)$/;function ht(e,t){var n=typeof e;return!!(t=null==t?lt:t)&&("number"==n||"symbol"!=n&&ut.test(e))&&e>-1&&e%1==0&&e<t}function pt(e,t){return e===t||e!=e&&t!=t}var dt=9007199254740991;function mt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=dt}var ft=Object.prototype;function gt(e){return Ne(e)&&"[object Arguments]"==$e(e)}var yt=Object.prototype,bt=yt.hasOwnProperty,_t=yt.propertyIsEnumerable,vt=gt(function(){return arguments}())?gt:function(e){return Ne(e)&&bt.call(e,"callee")&&!_t.call(e,"callee")};var wt="object"==typeof exports&&exports&&!exports.nodeType&&exports,St=wt&&"object"==typeof module&&module&&!module.nodeType&&module,At=St&&St.exports===wt?we.Buffer:void 0,kt=(At?At.isBuffer:void 0)||function(){return!1},Et={};Et["[object Float32Array]"]=Et["[object Float64Array]"]=Et["[object Int8Array]"]=Et["[object Int16Array]"]=Et["[object Int32Array]"]=Et["[object Uint8Array]"]=Et["[object Uint8ClampedArray]"]=Et["[object Uint16Array]"]=Et["[object Uint32Array]"]=!0,Et["[object Arguments]"]=Et["[object Array]"]=Et["[object ArrayBuffer]"]=Et["[object Boolean]"]=Et["[object DataView]"]=Et["[object Date]"]=Et["[object Error]"]=Et["[object Function]"]=Et["[object Map]"]=Et["[object Number]"]=Et["[object Object]"]=Et["[object RegExp]"]=Et["[object Set]"]=Et["[object String]"]=Et["[object WeakMap]"]=!1;var It,xt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ct=xt&&"object"==typeof module&&module&&!module.nodeType&&module,Pt=Ct&&Ct.exports===xt&&_e.process,Ot=function(){try{var e=Ct&&Ct.require&&Ct.require("util").types;return e||Pt&&Pt.binding&&Pt.binding("util")}catch(e){}}(),$t=Ot&&Ot.isTypedArray,Nt=$t?(It=$t,function(e){return It(e)}):function(e){return Ne(e)&&mt(e.length)&&!!Et[$e(e)]},Lt=Object.prototype.hasOwnProperty;function Mt(e,t){var n=Te(e),r=!n&&vt(e),s=!n&&!r&&kt(e),i=!n&&!r&&!s&&Nt(e),o=n||r||s||i,a=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=a.length;for(var l in e)!Lt.call(e,l)||o&&("length"==l||s&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ht(l,c))||a.push(l);return a}var Tt=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Rt=Object.prototype.hasOwnProperty;function Dt(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||ft))return Tt(e);var t,n,r=[];for(var s in Object(e))Rt.call(e,s)&&"constructor"!=s&&r.push(s);return r}function Ft(e){return null!=(t=e)&&mt(t.length)&&!Ge(t)?Mt(e):Dt(e);var t}var zt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ut=/^\w*$/;function Bt(e,t){if(Te(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Me(e))||(Ut.test(e)||!zt.test(e)||null!=t&&e in Object(t))}var jt=it(Object,"create");var Ht=Object.prototype.hasOwnProperty;var Xt=Object.prototype.hasOwnProperty;function Vt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gt(e,t){for(var n=e.length;n--;)if(pt(e[n][0],t))return n;return-1}Vt.prototype.clear=function(){this.__data__=jt?jt(null):{},this.size=0},Vt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vt.prototype.get=function(e){var t=this.__data__;if(jt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ht.call(t,e)?t[e]:void 0},Vt.prototype.has=function(e){var t=this.__data__;return jt?void 0!==t[e]:Xt.call(t,e)},Vt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=jt&&void 0===t?"__lodash_hash_undefined__":t,this};var Wt=Array.prototype.splice;function Yt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Yt.prototype.clear=function(){this.__data__=[],this.size=0},Yt.prototype.delete=function(e){var t=this.__data__,n=Gt(t,e);return!(n<0)&&(n==t.length-1?t.pop():Wt.call(t,n,1),--this.size,!0)},Yt.prototype.get=function(e){var t=this.__data__,n=Gt(t,e);return n<0?void 0:t[n][1]},Yt.prototype.has=function(e){return Gt(this.__data__,e)>-1},Yt.prototype.set=function(e,t){var n=this.__data__,r=Gt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var qt=it(we,"Map");function Kt(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function Qt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qt.prototype.clear=function(){this.size=0,this.__data__={hash:new Vt,map:new(qt||Yt),string:new Vt}},Qt.prototype.delete=function(e){var t=Kt(this,e).delete(e);return this.size-=t?1:0,t},Qt.prototype.get=function(e){return Kt(this,e).get(e)},Qt.prototype.has=function(e){return Kt(this,e).has(e)},Qt.prototype.set=function(e,t){var n=Kt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Zt="Expected a function";function Jt(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(Zt);var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],i=n.cache;if(i.has(s))return i.get(s);var o=e.apply(this,r);return n.cache=i.set(s,o)||i,o};return n.cache=new(Jt.Cache||Qt),n}Jt.Cache=Qt;var en=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tn=/\\(\\)?/g,nn=function(e){var t=Jt(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(en,(function(e,n,r,s){t.push(r?s.replace(tn,"$1"):n||e)})),t}));function rn(e,t){return Te(e)?e:Bt(e,t)?[e]:nn(function(e){return null==e?"":ze(e)}(e))}var sn=1/0;function on(e){if("string"==typeof e||Me(e))return e;var t=e+"";return"0"==t&&1/e==-sn?"-0":t}function an(e,t){for(var n=0,r=(t=rn(t,e)).length;null!=e&&n<r;)e=e[on(t[n++])];return n&&n==r?e:void 0}function cn(e){var t=this.__data__=new Yt(e);this.size=t.size}cn.prototype.clear=function(){this.__data__=new Yt,this.size=0},cn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},cn.prototype.get=function(e){return this.__data__.get(e)},cn.prototype.has=function(e){return this.__data__.has(e)},cn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Yt){var r=n.__data__;if(!qt||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Qt(r)}return n.set(e,t),this.size=n.size,this};var ln=Object.prototype.propertyIsEnumerable,un=Object.getOwnPropertySymbols,hn=un?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,s=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[s++]=o)}return i}(un(e),(function(t){return ln.call(e,t)})))}:function(){return[]};function pn(e){return function(e,t,n){var r=t(e);return Te(e)?r:function(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}(r,n(e))}(e,Ft,hn)}var dn=it(we,"DataView"),mn=it(we,"Promise"),fn=it(we,"Set"),gn="[object Map]",yn="[object Promise]",bn="[object Set]",_n="[object WeakMap]",vn="[object DataView]",wn=Qe(dn),Sn=Qe(qt),An=Qe(mn),kn=Qe(fn),En=Qe(ot),In=$e;(dn&&In(new dn(new ArrayBuffer(1)))!=vn||qt&&In(new qt)!=gn||mn&&In(mn.resolve())!=yn||fn&&In(new fn)!=bn||ot&&In(new ot)!=_n)&&(In=function(e){var t=$e(e),n="[object Object]"==t?e.constructor:void 0,r=n?Qe(n):"";if(r)switch(r){case wn:return vn;case Sn:return gn;case An:return yn;case kn:return bn;case En:return _n}return t});var xn=we.Uint8Array;function Cn(e){for(var t=-1,n=null==e?0:e.length,r=0,s=[];++t<n;){var i=e[t];i&&(s[r++]=i)}return s}function Pn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Qt;++t<n;)this.add(e[t])}function On(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function $n(e,t){return e.has(t)}Pn.prototype.add=Pn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Pn.prototype.has=function(e){return this.__data__.has(e)};var Nn=1,Ln=2;function Mn(e,t,n,r,s,i){var o=n&Nn,a=e.length,c=t.length;if(a!=c&&!(o&&c>a))return!1;var l=i.get(e),u=i.get(t);if(l&&u)return l==t&&u==e;var h=-1,p=!0,d=n&Ln?new Pn:void 0;for(i.set(e,t),i.set(t,e);++h<a;){var m=e[h],f=t[h];if(r)var g=o?r(f,m,h,t,e,i):r(m,f,h,e,t,i);if(void 0!==g){if(g)continue;p=!1;break}if(d){if(!On(t,(function(e,t){if(!$n(d,t)&&(m===e||s(m,e,n,r,i)))return d.push(t)}))){p=!1;break}}else if(m!==f&&!s(m,f,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p}function Tn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Dn=1,Fn=2,zn="[object Boolean]",Un="[object Date]",Bn="[object Error]",jn="[object Map]",Hn="[object Number]",Xn="[object RegExp]",Vn="[object Set]",Gn="[object String]",Wn="[object Symbol]",Yn="[object ArrayBuffer]",qn="[object DataView]",Kn=Se?Se.prototype:void 0,Qn=Kn?Kn.valueOf:void 0;var Zn=1,Jn=Object.prototype.hasOwnProperty;var er=1,tr="[object Arguments]",nr="[object Array]",rr="[object Object]",sr=Object.prototype.hasOwnProperty;function ir(e,t,n,r,s,i){var o=Te(e),a=Te(t),c=o?nr:In(e),l=a?nr:In(t),u=(c=c==tr?rr:c)==rr,h=(l=l==tr?rr:l)==rr,p=c==l;if(p&&kt(e)){if(!kt(t))return!1;o=!0,u=!1}if(p&&!u)return i||(i=new cn),o||Nt(e)?Mn(e,t,n,r,s,i):function(e,t,n,r,s,i,o){switch(n){case qn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Yn:return!(e.byteLength!=t.byteLength||!i(new xn(e),new xn(t)));case zn:case Un:case Hn:return pt(+e,+t);case Bn:return e.name==t.name&&e.message==t.message;case Xn:case Gn:return e==t+"";case jn:var a=Tn;case Vn:var c=r&Dn;if(a||(a=Rn),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Fn,o.set(e,t);var u=Mn(a(e),a(t),r,s,i,o);return o.delete(e),u;case Wn:if(Qn)return Qn.call(e)==Qn.call(t)}return!1}(e,t,c,n,r,s,i);if(!(n&er)){var d=u&&sr.call(e,"__wrapped__"),m=h&&sr.call(t,"__wrapped__");if(d||m){var f=d?e.value():e,g=m?t.value():t;return i||(i=new cn),s(f,g,n,r,i)}}return!!p&&(i||(i=new cn),function(e,t,n,r,s,i){var o=n&Zn,a=pn(e),c=a.length;if(c!=pn(t).length&&!o)return!1;for(var l=c;l--;){var u=a[l];if(!(o?u in t:Jn.call(t,u)))return!1}var h=i.get(e),p=i.get(t);if(h&&p)return h==t&&p==e;var d=!0;i.set(e,t),i.set(t,e);for(var m=o;++l<c;){var f=e[u=a[l]],g=t[u];if(r)var y=o?r(g,f,u,t,e,i):r(f,g,u,e,t,i);if(!(void 0===y?f===g||s(f,g,n,r,i):y)){d=!1;break}m||(m="constructor"==u)}if(d&&!m){var b=e.constructor,_=t.constructor;b==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,n,r,s,i))}function or(e,t,n,r,s){return e===t||(null==e||null==t||!Ne(e)&&!Ne(t)?e!=e&&t!=t:ir(e,t,n,r,or,s))}var ar=1,cr=2;function lr(e){return e==e&&!Ue(e)}function ur(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function hr(e){var t=function(e){for(var t=Ft(e),n=t.length;n--;){var r=t[n],s=e[r];t[n]=[r,s,lr(s)]}return t}(e);return 1==t.length&&t[0][2]?ur(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var s=n.length,i=s;if(null==e)return!i;for(e=Object(e);s--;){var o=n[s];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++s<i;){var a=(o=n[s])[0],c=e[a],l=o[1];if(o[2]){if(void 0===c&&!(a in e))return!1}else{var u=new cn;if(!or(l,c,ar|cr,r,u))return!1}}return!0}(n,0,t)}}function pr(e,t){return null!=e&&t in Object(e)}function dr(e,t){return null!=e&&function(e,t,n){for(var r=-1,s=(t=rn(t,e)).length,i=!1;++r<s;){var o=on(t[r]);if(!(i=null!=e&&n(e,o)))break;e=e[o]}return i||++r!=s?i:!!(s=null==e?0:e.length)&&mt(s)&&ht(o,s)&&(Te(e)||vt(e))}(e,t,pr)}var mr=1,fr=2;function gr(e,t){return Bt(e)&&lr(t)?ur(on(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:an(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?dr(n,e):or(t,r,mr|fr)}}function yr(e){return Bt(e)?(t=on(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return an(t,e)}}(e);var t}function br(e,t){return or(e,t)}var _r=fn&&1/Rn(new fn([,-0]))[1]==1/0?function(e){return new fn(e)}:function(){},vr=200;function wr(e,t){return e&&e.length?function(e,t,n){var r=-1,s=ct,i=e.length,o=!0,a=[],c=a;if(i>=vr){var l=t?null:_r(e);if(l)return Rn(l);o=!1,s=$n,c=new Pn}else c=t?[]:a;e:for(;++r<i;){var u=e[r],h=t?t(u):u;if(u=0!==u?u:0,o&&h==h){for(var p=c.length;p--;)if(c[p]===h)continue e;t&&c.push(h),a.push(u)}else s(c,h,n)||(c!==a&&c.push(h),a.push(u))}return a}(e,"function"==typeof(n=t)?n:null==n?Be:"object"==typeof n?Te(n)?gr(n[0],n[1]):hr(n):yr(n)):[];var n}const Sr=new class{setDevice(e){this.setItem(w,e)}getDevice(){return this.getItem(w)}resetDevice(){this.resetItem(w)}getAnonymousMode(){return this.getItem(R)||!1}setAnonymousMode(e){this.setItem(R,e)}clearAnonymousMode(){this.resetItem(R)}setAppConfig(e,t){this.setItem(e,t)}getAppConfig(e){return this.getItem(e)}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)}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(x)??[];return wr(Cn([...this.getItem(L)??[],...e]),"sku_ref_id")}setNamiConfig(e){this.setItem(S,e)}getNamiConfig(){return this.getItem(S)}setCustomerAttribute(e,t){this.setItem(T+e,t)}getCustomerAttribute(e){return this.getItem(T+e)}getAllCustomerAttributes(){return Object.keys(localStorage).filter((e=>e.includes(T))).map((e=>e.replace(T,"")))}clearCustomerAttribute(e){const t=T+e,n=this.getItem(t);return n&&this.resetItem(t),!!n}clearAllCustomerAttributes(){Object.keys(localStorage).filter((e=>e.includes(T))).map((e=>this.resetItem(e)))}setNamiProfile(e){this.setItem(A,e)}getNamiProfile(){return this.getItem(A)}removeNamiProfile(){this.resetItem(A)}setSessionCounter(){const e=this.getItem(D),t=e?parseInt(e):F||F;this.setItem(D,t+1)}setLastImpressionId(e){this.setItem(z,e)}getLastImpressionId(){return this.getItem(z)??""}setPurchaseImpression(){const e=this.getLastImpressionId()??"";this.setItem(U,e)}getPurchaseImpression(){return this.getItem(U)??""}setSessionId(e){e&&this.setItem(B,e)}getSessionId(){return this.getItem(B)??""}clearSessionId(){this.resetItem(B)}setItem(e,t){try{const n=JSON.stringify(t);localStorage.setItem(e,n)}catch(e){be.error("Error setting item in localStorage:",e)}}getItem(e){try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(t){return be.error("Error getting item from localStorage:",e,": ",t),null}}resetItem(e){try{localStorage.removeItem(e)}catch(e){be.error("Error removing item from localStorage:",e)}}clear(){try{localStorage.clear()}catch(e){be.error("Error clearing localStorage:",e)}}};class Ar extends Error{constructor(e,t){super(t),this.statusCode=e,this.status=e,this.message=`RetryLimitExceededError: ${this.message}`}}class kr extends Error{constructor(){super(m)}}class Er extends Error{constructor(){super(h)}}class Ir extends Error{constructor(){super(p)}}class xr extends Error{constructor(){super(d)}}class Cr extends Error{constructor(){super(y)}}class Pr extends Error{constructor(){super(b)}}class Or extends Error{constructor(){super(b)}}class $r extends Error{constructor(){super(g)}}class Nr extends Error{constructor(e){super(e),this.message=`BadRequestError: ${this.message}`}}class Lr extends Error{constructor(e){super(e),this.message=`NotFoundError: ${this.message}`}}class Mr extends Error{constructor(e,t){super(t),this.statusCode=e,this.message=`ClientError: ${this.message}`}}class Tr extends Error{constructor(e){super(e),this.message=`ServerError: ${this.message}`}}const Rr=(e,t)=>{if(e==re)throw new Nr(t);if(e==se)throw new Lr(t);if(e>re&&e<ie)throw new Mr(e,t);if(e>=ie)throw new Tr(t)};async function Dr(e,t,n=ee,r=Z){let s=0;const i=async()=>{const o=await async function(e,t={},n){const r=new AbortController,s=setTimeout((()=>r.abort()),n);t.signal=r.signal;const i=await fetch(e,t);return clearTimeout(s),i}(e,t,n);if(!o.ok){if(s++,s<=r){const e=1e3*(s+J);return await new Promise((t=>setTimeout(t,e))),i()}throw new Ar(o.status,`Request failed after ${r} retries`)}return o};return(await i()).json()}var Fr;!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"}(Fr||(Fr={}));const zr=e=>{let t;if(e?.includes(W))t=V;else{const n=e?.find((e=>e.includes(G)));t=n?n.split("=")[1]:X}return t=t.replace(/\/$/,""),t+"/"+H},Ur=e=>{const t=Sr.getAppConfig(k)||Sr.getAppConfig(O);return t?.capabilities?.includes(e)??!1},Br=e=>{const t=!Ur(Fr.THIRD_PARTY_TRANSACTIONS);return e&&!t&&be.info(`[${e}] Your plan does not have purchase management features.`),t};function jr(e,t,n){const r=n.value;return n.value=function(...e){if(!this.platformID)throw new Er;return r.apply(this,e)},n}function Hr(e,t,n){const r=n.value;return n.value=function(...e){const t=Sr.getDevice();if(!t?.id)throw new Ir;return r.apply(this,e)},n}class Xr{get deviceID(){return Sr.getDevice()?.id}static configure(e){this.instance.configure(e)}configure(e){this.baseURL=zr(e.namiCommands),this.platformID=e.appPlatformID}async login(e){if(!e)throw new xr;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"});Sr.setSessionCounter(),n.id&&Sr.setSessionId(n.id)}async postImpression(e){const t=`device/${this.deviceID}/impression/`,n=await this.requestBodyAPI(t,e,"POST",!0);n.id&&Sr.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){const t=`${this.baseURL}/${this.platformID}/`+e;return await Dr(t)}async requestBodyAPI(e,t,n="POST",r=!1,s){const i=`${this.baseURL}/${this.platformID}/`+e,o={method:n,headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:r};return await Dr(i,o,s)}}Xr.instance=new Xr,o([Hr],Xr.prototype,"login",null),o([Hr],Xr.prototype,"logout",null),o([Hr],Xr.prototype,"startSession",null),o([Hr],Xr.prototype,"postImpression",null),o([Hr],Xr.prototype,"postConversion",null),o([Hr],Xr.prototype,"purchaseValidation",null),o([jr],Xr.prototype,"fetchAPI",null),o([jr],Xr.prototype,"requestBodyAPI",null);var Vr,Gr="object"==typeof Reflect?Reflect:null,Wr=Gr&&"function"==typeof Gr.apply?Gr.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};Vr=Gr&&"function"==typeof Gr.ownKeys?Gr.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var Yr=Number.isNaN||function(e){return e!=e};function qr(){qr.init.call(this)}qr.EventEmitter=qr,qr.prototype._events=void 0,qr.prototype._eventsCount=0,qr.prototype._maxListeners=void 0;var Kr=10;function Qr(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function Zr(e){return void 0===e._maxListeners?qr.defaultMaxListeners:e._maxListeners}function Jr(e,t,n,r){var s,i,o,a;if(Qr(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),o=i[t]),void 0===o)o=i[t]=n,++e._eventsCount;else if("function"==typeof o?o=i[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(s=Zr(e))>0&&o.length>s&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,a=c,console&&console.warn&&console.warn(a)}return e}function es(){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 ts(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},s=es.bind(r);return s.listener=n,r.wrapFn=s,s}function ns(e,t,n){var r=e._events;if(void 0===r)return[];var s=r[t];return void 0===s?[]:"function"==typeof s?n?[s.listener||s]:[s]: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}(s):ss(s,s.length)}function rs(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 ss(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(qr,"defaultMaxListeners",{enumerable:!0,get:function(){return Kr},set:function(e){if("number"!=typeof e||e<0||Yr(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Kr=e}}),qr.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},qr.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||Yr(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},qr.prototype.getMaxListeners=function(){return Zr(this)},qr.prototype.emit=function(e){var t=[];for(let e=1;e<arguments.length;e++)t.push(arguments[e]);var n="error"===e,r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var i=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw i.context=s,i}var o=r[e];if(void 0===o)return!1;if("function"==typeof o)Wr(o,this,t);else{var a=o.length,c=ss(o,a);for(let e=0;e<a;++e)Wr(c[e],this,t)}return!0},qr.prototype.addListener=function(e,t){return Jr(this,e,t,!1)},qr.prototype.on=qr.prototype.addListener,qr.prototype.prependListener=function(e,t){return Jr(this,e,t,!0)},qr.prototype.once=function(e,t){return Qr(t),this.on(e,ts(this,e,t)),this},qr.prototype.prependOnceListener=function(e,t){return Qr(t),this.prependListener(e,ts(this,e,t)),this},qr.prototype.removeListener=function(e,t){var n,r,s,i,o;if(Qr(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(s=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){o=n[i].listener,s=i;break}if(s<0)return this;0===s?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,s),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},qr.prototype.off=qr.prototype.removeListener,qr.prototype.removeAllListeners=function(e){var t,n,r;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 s,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(s=i[r])&&this.removeAllListeners(s);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(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},qr.prototype.listeners=function(e){return ns(this,e,!0)},qr.prototype.rawListeners=function(e){return ns(this,e,!1)},qr.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):rs.call(e,t)},qr.prototype.listenerCount=rs,qr.prototype.eventNames=function(){return this._eventsCount>0?Vr(this._events):[]};class is{constructor(){this.emitter=new qr}static getInstance(){return this.instance||(this.instance=new is),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)}listeners(e){return this.emitter.listeners(e)}listenerCount(e){return this.emitter.listenerCount(e)}}const os={"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"},as={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"},cs={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},ls={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"},us={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class hs{static getFirstMatch(e,t){const n=t.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,t){const n=t.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(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}}static getMacOSVersionName(e){const t=e.split(".").splice(0,2).map((e=>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}}static getAndroidVersionName(e){const t=e.split(".").splice(0,2).map((e=>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}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,n=!1){const r=hs.getVersionPrecision(e),s=hs.getVersionPrecision(t);let i=Math.max(r,s),o=0;const a=hs.map([e,t],(e=>{const t=i-hs.getVersionPrecision(e),n=e+new Array(t+1).join(".0");return hs.map(n.split("."),(e=>new Array(20-e.length).join("0")+e)).reverse()}));for(n&&(o=i-Math.min(r,s)),i-=1;i>=o;){if(a[0][i]>a[1][i])return 1;if(a[0][i]===a[1][i]){if(i===o)return 0;i-=1}else if(a[0][i]<a[1][i])return-1}}static map(e,t){const n=[];let r;if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n}static find(e,t){let n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){const r=e[n];if(t(r,n))return r}}static assign(e,...t){const n=e;let r,s;if(Object.assign)return Object.assign(e,...t);for(r=0,s=t.length;r<s;r+=1){const e=t[r];if("object"==typeof e&&null!==e){Object.keys(e).forEach((t=>{n[t]=e[t]}))}}return e}static getBrowserAlias(e){return os[e]}static getBrowserTypeByAlias(e){return as[e]||""}}const ps=/version\/(\d+(\.?_?\d+)+)/i,ds=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=hs.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||hs.getFirstMatch(ps,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=hs.getFirstMatch(ps,e)||hs.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=hs.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||hs.getFirstMatch(ps,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=hs.getFirstMatch(ps,e)||hs.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=hs.getFirstMatch(ps,e)||hs.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=hs.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||hs.getFirstMatch(ps,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=hs.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||hs.getFirstMatch(ps,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=hs.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||hs.getFirstMatch(ps,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=hs.getFirstMatch(ps,e)||hs.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=hs.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||hs.getFirstMatch(ps,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=hs.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||hs.getFirstMatch(ps,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=hs.getFirstMatch(ps,e)||hs.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=hs.getFirstMatch(ps,e)||hs.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=hs.getFirstMatch(ps,e)||hs.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=hs.getFirstMatch(ps,e)||hs.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=hs.getFirstMatch(ps,e)||hs.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=hs.getFirstMatch(ps,e)||hs.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=hs.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||hs.getFirstMatch(ps,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=hs.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||hs.getFirstMatch(ps,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=hs.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=hs.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=hs.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=hs.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=hs.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=hs.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=hs.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=hs.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=hs.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=hs.getFirstMatch(ps,e)||hs.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=hs.getFirstMatch(ps,e)||hs.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=hs.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=hs.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||hs.getFirstMatch(ps,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=hs.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||hs.getFirstMatch(ps,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=hs.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=hs.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=hs.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=hs.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||hs.getFirstMatch(ps,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=hs.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=hs.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=hs.getFirstMatch(ps,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=hs.getFirstMatch(ps,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=hs.getFirstMatch(ps,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:hs.getFirstMatch(t,e),version:hs.getSecondMatch(t,e)}}}];var ms=[{test:[/Roku\/DVP/],describe(e){const t=hs.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:ls.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=hs.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:ls.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=hs.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=hs.getWindowsVersionName(t);return{name:ls.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:ls.iOS},n=hs.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=hs.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=hs.getMacOSVersionName(t),r={name:ls.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=hs.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:ls.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=hs.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=hs.getAndroidVersionName(t),r={name:ls.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=hs.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:ls.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=hs.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||hs.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||hs.getFirstMatch(/\bbb(\d+)/i,e);return{name:ls.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=hs.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:ls.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=hs.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:ls.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:ls.Linux})},{test:[/CrOS/],describe:()=>({name:ls.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=hs.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:ls.PlayStation4,version:t}}}],fs=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(e){const t=hs.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:cs.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:cs.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:cs.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:cs.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:cs.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:cs.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:cs.tablet})},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=hs.getFirstMatch(/(ipod|iphone)/i,e);return{type:cs.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:cs.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:cs.mobile})},{test:e=>"blackberry"===e.getBrowserName(!0),describe:()=>({type:cs.mobile,vendor:"BlackBerry"})},{test:e=>"bada"===e.getBrowserName(!0),describe:()=>({type:cs.mobile})},{test:e=>"windows phone"===e.getBrowserName(),describe:()=>({type:cs.mobile,vendor:"Microsoft"})},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:()=>({type:cs.tablet})},{test:e=>"android"===e.getOSName(!0),describe:()=>({type:cs.mobile})},{test:e=>"macos"===e.getOSName(!0),describe:()=>({type:cs.desktop,vendor:"Apple"})},{test:e=>"windows"===e.getOSName(!0),describe:()=>({type:cs.desktop})},{test:e=>"linux"===e.getOSName(!0),describe:()=>({type:cs.desktop})},{test:e=>"playstation 4"===e.getOSName(!0),describe:()=>({type:cs.tv})},{test:e=>"roku"===e.getOSName(!0),describe:()=>({type:cs.tv})}],gs=[{test:e=>"microsoft edge"===e.getBrowserName(!0),describe(e){if(/\sedg\//i.test(e))return{name:us.Blink};const t=hs.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:us.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:us.Trident},n=hs.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:us.Presto},n=hs.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:us.Gecko},n=hs.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:us.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:us.WebKit},n=hs.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class ys{constructor(e,t=!1){if(null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=hs.find(ds,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const e=hs.find(ms,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};const e=hs.find(fs,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=hs.find(gs,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return hs.assign({},this.parsedResult)}satisfies(e){const t={};let n=0;const r={};let s=0;if(Object.keys(e).forEach((i=>{const o=e[i];"string"==typeof o?(r[i]=o,s+=1):"object"==typeof o&&(t[i]=o,n+=1)})),n>0){const e=Object.keys(t),n=hs.find(e,(e=>this.isOS(e)));if(n){const e=this.satisfies(t[n]);if(void 0!==e)return e}const r=hs.find(e,(e=>this.isPlatform(e)));if(r){const e=this.satisfies(t[r]);if(void 0!==e)return e}}if(s>0){const e=Object.keys(r),t=hs.find(e,(e=>this.isBrowser(e,!0)));if(void 0!==t)return this.compareVersion(r[t])}}isBrowser(e,t=!1){const n=this.getBrowserName().toLowerCase();let r=e.toLowerCase();const s=hs.getBrowserTypeByAlias(r);return t&&s&&(r=s.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1;const s=this.getBrowserVersion();if("string"==typeof s)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(hs.compareVersions(s,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some((e=>this.is(e)))}}class bs{static getParser(e,t=!1){if("string"!=typeof e)throw new Error("UserAgent should be a string");return new ys(e,t)}static parse(e){return new ys(e).getResult()}static get BROWSER_MAP(){return as}static get ENGINE_MAP(){return us}static get OS_MAP(){return ls}static get PLATFORMS_MAP(){return cs}}const _s={tablet:"tablet",mobile:"phone",tv:"television",desktop:"desktop"},vs=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:c,language:"en"};const t=bs.getParser(window.navigator.userAgent),n=t.getPlatform(),r={os_version:t.getOSVersion(),os_name:t.getOSName(),browser_name:t.getBrowserName(),browser_version:t.getBrowserVersion(),sdk_client:"web",sdk_version:c,language:window.navigator.language};if(n.type&&(r.form_factor=_s[n.type]),n.model&&(r.device_model=n.model),e&&e.length>0){const t=(e=>{const t=e.find((e=>e.includes(Y))),n={platform:"",version:""};if(t){const e=t.split(q);n.platform=e[1],n.version=e[2]}return n})(e);r.extended_platform=t.platform,r.extended_platform_version=t.version}return r},ws=()=>{const e=Sr.getNamiConfig();if(e?.formFactor)return e.formFactor;if("undefined"==typeof window)return _s.desktop;const t=bs.getParser(window.navigator.userAgent).getPlatform();return t.type?_s[t.type]:_s.desktop};class Ss{constructor(e){this.currentFormFactor=e}async fetchCampaignRules(e){const t=Sr.getDevice();let n;return n=t?.id?await this.getCampaigns(t.id):await this.getAnonymousCampaigns(),n=n?.filter((e=>e.form_factors.some((e=>e.form_factor===this.currentFormFactor)))),n=n?.filter((t=>{const n=e.find((e=>e.id==t.paywall));if(n)return t})),Sr.setCampaignRules(E,n),this.invokeAvailableCampaignsResponseHandler(),n}invokeAvailableCampaignsResponseHandler(e){const t=is.getInstance().listeners(le);if(!e){const t=Sr.getCampaignRules(E)??[],n=Sr.getCampaignRules($)??[];e=wr(Cn([...t,...n]),"rule")}t.forEach((t=>{t(e)}))}async getAnonymousCampaigns(){const e="campaign_rules/";let t=null;try{t=await Xr.instance.fetchAPI(e)}catch(t){throw be.error(Rr(t.status,e)),t}return t?.results||[]}async getCampaigns(e){const t=`device/${e}/campaign_rules/`;let n;try{n=await Xr.instance.fetchAPI(t)}catch(e){if(n=this.fallbackData(),!n)throw be.error(Rr(e.status,t)),e}return n?.results||[]}fallbackData(){const e=Sr.getCampaignRules(E)||Sr.getCampaignRules($);return e?{count:e.length,results:e}:null}}Ss.instance=new Ss(ws());class As{async createOrUpdateDevice(e){const t=Sr.getDevice();return t?.id?this.isEqualDevices(t,e)?t:this.updateDevice(t.id,e):this.createDevice(e)}async createDevice(e){const t=await this.requestAPIData("device/",e);return t&&Sr.setDevice(t),t}async updateDevice(e,t){const n=await this.requestAPIData(`device/${e}/`,t,"PUT");return n&&Sr.setDevice(n),n}async updateDeviceField(e,t){const n={[e]:t},r=Sr.getDevice();if(!r?.id)throw new Ir;const s=await this.requestAPIData(`device/${r.id}/`,n,"PATCH");return s&&Sr.setDevice(s),s}async requestAPIData(e,t,n="POST"){let r;try{r=await Xr.instance.requestBodyAPI(e,t,n,!1,te)}catch(t){if(t instanceof Er)throw t;if(r=Sr.getDevice(),!r)return be.error(Rr(t.status,e)),null}return r}isEqualDevices(e,t){const n={...e,...t};return br(Object.keys(e).reduce(((e,t)=>(e[t]=n[t],e)),{}),e)}}As.instance=new As;class ks{async fetchProducts(){if(Ur(Fr.THIRD_PARTY_TRANSACTIONS))return[];let e;try{e=await Xr.instance.fetchAPI("products/")}catch(t){if(e=this.fallbackData(),!e)throw be.error(Rr(t.status,"products/")),t}return e?.results&&Sr.setProducts(x,e.results),e?.results||[]}fallbackData(){const e=Sr.getProducts(x)||Sr.getProducts(L);return e?{count:e.length,results:e}:null}}ks.instance=new ks;class Es{async fetchPaywalls(){const e=Sr.getDevice();let t;return t=e?.id?await this.getPaywalls(e.id):await this.getAnonymousPaywalls(),t&&Sr.setPaywalls(I,t),t}async getAnonymousPaywalls(e=c){const t=`paywalls/?sdk_version=${e}`;let n=null;try{n=await Xr.instance.fetchAPI(t)}catch(e){throw be.error(Rr(e.status,t)),e}return n?.results||[]}async getPaywalls(e){const t=`device/${e}/paywalls/`;let n;try{n=await Xr.instance.fetchAPI(t)}catch(e){if(n=this.fallbackData(),!n)throw be.error(Rr(e.status,t)),e}return n?.results||[]}fallbackData(){const e=Sr.getPaywalls(I)||Sr.getPaywalls(N);return e?{count:e.length,results:e}:null}}Es.instance=new Es;class Is{async fetchConfig(){let e;try{e=await Xr.instance.fetchAPI("config/")}catch(t){if(e=Sr.getAppConfig(k)||Sr.getAppConfig(O),!e)throw be.error(Rr(t.status,"config/")),t}return e&&Sr.setAppConfig(k,e),e}}Is.instance=new Is;class xs{async startSession(){Sr.getAnonymousMode()?be.debug("Skipping session start call - anonymous mode"):await Xr.instance.startSession(new Date)}}xs.instance=new xs;function Cs(e){if("subscription"===e?.product_type){const t=function(e){if(!e||!e.subscription_period)return[];const t=e.offers.filter((e=>"promo"===e.offer_type));return Os(t,e.subscription_period)}(e).find((e=>0===e.priceAmountMicros));return t?.billingPeriod}}function Ps(e){if(!e||!e.subscription_period)return[];return Os(e.offers.filter((e=>"default"===e.offer_type)),e.subscription_period)}function Os(e,t){return e.map((e=>$s(e,t)))}function $s(e,t){if(!e)return{};const n=e.promo_period?.count??t?.count,r=e.promo_period?.type??t?.type,s=e.promo_price?.price??e.price,i=e.promo_price?.currency??e.currency;return{priceAmountMicros:1e6*s,priceCurrencyCode:i,billingPeriod:r?`P${n}${r[0].toUpperCase()}`:"",formattedPrice:Ls(i).format(s)}}function Ns(e,t=!1,n=!1,r=!1){if(!e)return null;const s=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?/);if(!s)return null;const[i,o,a]=s.slice(1).map((e=>parseInt(e))),c=(e,t,n,r,s,i)=>r?e.toString():n?1===e||t?s:i:1===e||t?`${e} ${s}`:`${e} ${i}`;switch(e.at(-1)){case"D":return c(a,t,n,r,"day","days");case"W":return c(a/7,t,n,r,"week","weeks");case"M":return c(o,t,n,r,"month","months");case"Y":return c(i,t,n,r,"year","years")}return null}function Ls(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 Ms=(e,t,n)=>e&&t&&n?n.format(e-t):null,Ts=(e,t,n,r)=>{if(e&&t&&n&&r){const s=100*(1-e/(n/r*t));return`${Math.round(s)}%`}return null},Rs=(e,t)=>{if(""==t)return;const n=parseInt(t);return n>=0&&n<e?.length?e[n]:e?.find((e=>e.sku_ref_id===t))},Ds=e=>zs(e.priceAmountMicros)/Fs(e.billingPeriod),Fs=e=>{let t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},zs=e=>e/1e6;function Us(e){return parseFloat((Math.round(e)/100).toFixed(2))}const Bs={price:"$XX.XX",name:"",title:"",description:"",duration:"XXXXX",durationSingular:"XXXXX",period:"XXXXX",periodNumber:"X",freeTrialDuration:"XXXXX",freeTrialDurationSingular:"XXXXX",freeTrialPeriod:"XXXXX",freeTrialPeriodNumber:"X",pricePerMonth:"$XX.XX",pricePerMonthRounded:"$XX",periodInMonths:"XXXXX",durationInMonths:"XXXXX",durationInMonthsSingular:"XXXXX",periodNumberInMonths:"X",percentagePriceDifferenceFromSku:"XX%",priceDifferenceFromSku:"$XX.XX",promoEligible:!1,freeTrialEligible:!1,promo:"XXXXX",promoCode:"XXXXX",promoPrice:"$XX.XX",promoPeriod:"XXXXX",promoPeriodNumber:"X",promoDuration:"XXXXX",promoDurationSingular:"XXXXX",introEligible:!1,pricePerDay:"$X.XX",pricePerWeek:"$X.XX",pricePerWeekRounded:"$XX",introductoryPrice:"$XX.XX",introductoryPeriod:"XXXXX",introductoryPeriodNumber:"X",introductoryDuration:"XXXXX",introductoryDurationSingular:"XXXXX",introductoryPricePerMonth:"$XX.XX",introductoryPricePerMonthRounded:"$XX",invalid:!1,unavailable:!1},js=(e,t,n,r=[])=>{const s=Bs[e];if(!t)return s;return(0,{price:()=>Hs(t),name:()=>t?.name,title:()=>t?.name,description:()=>t?.description,duration:()=>Xs(t),durationSingular:()=>Xs(t,!0),period:()=>Xs(t,!1,!0),periodNumber:()=>Xs(t,!1,!1,!0),freeTrialDuration:()=>Vs(t),freeTrialDurationSingular:()=>Vs(t,!0),freeTrialPeriod:()=>Vs(t,!1,!0),freeTrialPeriodNumber:()=>Vs(t,!1,!1,!0),pricePerMonth:()=>Gs(t),pricePerMonthRounded:()=>Gs(t,!0),periodInMonths:()=>Ws(t),durationInMonths:()=>Ys(t),durationInMonthsSingular:()=>Ys(t,!0),periodNumberInMonths:()=>qs(t),percentagePriceDifferenceFromSku:()=>Ks(t,n,r),priceDifferenceFromSku:()=>Qs(t,n,r),promoEligible:()=>null===Zs(t)&&null!==Js(t,n),freeTrialEligible:()=>null!==Zs(t),promo:()=>Js(t,n)?.offer_ref_id,promoCode:()=>"XXXXX",promoPrice:()=>ei(t,n)?.formattedPrice,promoPeriod:()=>ti(t,n,!1,!0),promoPeriodNumber:()=>ti(t,n,!1,!1,!0),promoDuration:()=>ti(t,n),promoDurationSingular:()=>ti(t,n,!0),introEligible:()=>!1,pricePerDay:()=>ni(t),pricePerWeek:()=>ri(t),pricePerWeekRounded:()=>ri(t,!0),introductoryPrice:()=>si(t,n),introductoryPeriod:()=>ii(t,n,!1,!0),introductoryPeriodNumber:()=>ii(t,n,!1,!1,!0),introductoryDuration:()=>ii(t,n),introductoryDurationSingular:()=>ii(t,n,!0),introductoryPricePerMonth:()=>oi(t,n),introductoryPricePerMonthRounded:()=>oi(t,n,!0),invalid:()=>!1,unavailable:()=>!1}[e])()??s??null},Hs=e=>{if("subscription"===e?.product_type){const t=Ps(e);return t&&t.length?t[0].formattedPrice:null}return null},Xs=(e,t,n,r)=>Ns(function(e){if("subscription"===e?.product_type){const t=Ps(e);if(t.length>0)return t[0].billingPeriod}}(e),t,n,r),Vs=(e,t,n,r)=>Ns(Cs(e),t,n,r),Gs=(e,t)=>{const n=Ps(e);if(!n||0===n.length)return null;const r=Ds(n[0]);return r?Ls(n[0].priceCurrencyCode).format(t?Math.round(r):r):null},Ws=e=>{const t=Ps(e);return"P1Y"===t[0].billingPeriod&&(t[0].billingPeriod="P12M"),t&&t.length?Ns(t[0].billingPeriod):null},Ys=(e,t,n,r)=>{const s=Ps(e);return s&&0!==s.length?("P1Y"===s[0].billingPeriod&&(s[0].billingPeriod="P12M"),Ns(s[0].billingPeriod,t,n,r)):null},qs=e=>{if(!e)return 0;const t=Ps(e);return t&&t.length?Fs(t[0].billingPeriod):0},Ks=(e,t,n=[])=>{const r=Ps(e);if(!r||0===r.length)return null;const s=Rs(n,t??"")?.product_details;if(!t||!s)return Ts(Us(r[0].priceAmountMicros),qs(e));const i=Ps(s);return Ts(Us(r[0].priceAmountMicros),qs(e),i?.length>0?Us(i[0].priceAmountMicros):0,qs(s))},Qs=(e,t,n=[])=>{const r=Ps(e);if(!r||0===r.length)return null;const s=Rs(n,t??"")?.product_details;if(!t||!s)return Ms(Ds(r[0]));const i=Ps(s);return Ms(Ds(r[0]),Ds(i[0]),Ls(i[0].priceCurrencyCode))},Zs=e=>Cs(e),Js=(e,t)=>{if(!e)return null;const n=e.offers.filter((e=>"promo"===e.offer_type));if(!t)return n[0];const r=n[parseInt(t)];return r||(n.find((e=>e.offer_ref_id===t))||null)},ei=(e,t)=>{if(!e)return null;return $s(Js(e,t),e.subscription_period)},ti=(e,t,n,r,s)=>{const i=ei(e,t);return Ns(i?.billingPeriod,n,r,s)},ni=(e,t)=>{const n=Ps(e);if(!n||0===n.length)return null;const r=zs(n[0].priceAmountMicros)/(e=>{const t=Fs(e);return t?30.437*t:1})(n[0].billingPeriod);return r?Ls(n[0].priceCurrencyCode).format(r):null},ri=(e,t)=>{const n=Ps(e);if(!n||0===n.length)return null;const r=zs(n[0].priceAmountMicros)/(e=>{const t=Fs(e);return t?52*t/12:1})(n[0].billingPeriod);return r?Ls(n[0].priceCurrencyCode).format(t?Math.round(r):r):null},si=(e,t)=>{const n=ai(e,t);return n?.formattedPrice||null},ii=(e,t,n,r,s)=>{const i=ai(e,t);return Ns(i?.billingPeriod,n,r,s)},oi=(e,t,n)=>{const r=ai(e,t);if(!r)return;const s=zs(r.priceAmountMicros),i=Fs(r.billingPeriod),o=n?Math.round(s/i):s/i;return Ls(r.priceCurrencyCode).format(o)},ai=(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],$s(n,e.subscription_period)};function ci(e,t,n){if(!t)return{};const r=t.variables;return r&&Object.keys(r).forEach((t=>{var s;"string"==typeof r[t]&&r[t].includes("${")&&(r[t]=(s=r[t]).replace(pe,((t,r)=>{const i=pe.exec(s)?.slice(1)||[];r=i[0]??r;const o=i[1]?.replace(":","")??"";return js(r,e,o,n)})))})),{...t,...r}}function li(e,t,n){return hi(t,n)?.some((()=>1==js("freeTrialEligible",ui(e,""))))??!1}function ui(e=[],t){return e.find((e=>e.name===t))||null}function hi(e,t){const n=e?.filter((e=>t?.some((t=>t===e.ref)))),r=n?.filter((t=>e.find((e=>e.products?.some((e=>e.id===t.id))))))?.map((e=>e.products))[0];return r}function pi(e){return!e||"object"==typeof e&&0==Object.keys(e).length}const di={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:"",fullScreenPresentation:!1,launch:{productGroups:[],customAttributes:{}},sku:{},orientation:"portrait",focusedState:!1,platformId:"",mediaList:{},skuItems:[],customer:{},hasNotch:!1,purchaseInProgress:!1,formFactor:"desktop"};const mi=new class{constructor(){this.host=null,this.state=di,this.subscribers=new Set}subscribe(e){return this.subscribers.add(e),()=>this.unsubscribe(e)}unsubscribe(e){this.subscribers.delete(e)}hostConnected(){}hostDisconnected(){this.subscribers.forEach((e=>this.unsubscribe(e)))}setState(e){this.state=e,this.subscribers.forEach((e=>e())),this.host&&this.host.requestUpdate()}setProductDetails(e){this.productDetails=e}getProductDetails(){return this.productDetails}setCurrentGroupId(e){this.setState({...this.state,currentGroupId:e})}currentGroupId(){return this.state.currentGroupId}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 r={...this.state,selectedPaywall:e,selectedCampaign:n};if(!pi(e)){const n=e.template.initialState.groups?.map((e=>e.ref))||[],s=function(e,t,n){const r=t?.find((e=>n===e.id))?.products||[];return r.map((t=>{t.product_details=ui(e,t.name||"")})),r.forEach((e=>{ci(e.product_details,e,r)})),r||[]}(this.productDetails,e.sku_menus,e.template.initialState.currentGroupId);r={...r,...e.template.initialState},r.skuItems=s,r.launch=t||{...this.state.launch,productGroups:n},r.anySkuHasTrialOffer=li(this.productDetails,e.sku_menus,n),r.anySkuHasPromoOffer=function(e,t,n){return!li(e,t,n)&&(hi(t,n)?.some((()=>1==js("promoEligible",ui(e,""))))??!1)}(this.productDetails,e.sku_menus,n),r.paywallId=e.id,r.sku=function(e,t,n,r){const s=n?.flatMap((e=>e.products)).find((e=>e.id===t.selectedProducts[t.currentGroupId]));return ci(ui(e,s?.name??""),s,r)}(this.productDetails,e.template.initialState,e.sku_menus,s)}this.setState(r)}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}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})}};class fi{constructor(){this.refIdToPurchasedSKUs={},this.refIdToRelatedSKUs={},this.refIdToActivePurchases={}}}fi.instance=new fi;const gi=()=>wr(Cn([...Sr.getNamiEntitlements(P),...Sr.getNamiEntitlements(M)]),"referenceId"),yi=()=>{is.getInstance().emit(he,gi())};function bi(e){return{id:e.id,skuId:e.sku_ref_id,name:e.name,type:e.sku_type,entitlements:e.entitlements,productDetails:"product_details"in e?e.product_details:null}}class _i{constructor(){}async fetchActiveEntitlements(){let e=null;if(Sr.getAnonymousMode()||Ur(Fr.THIRD_PARTY_TRANSACTIONS)||!Ur(Fr.ENTITLEMENT_MANAGEMENT))Sr.getAnonymousMode()&&be.debug("Skipping active entitlements update - anonymous mode"),Ur(Fr.THIRD_PARTY_TRANSACTIONS)&&be.debug("Skipping active entitlements update - paywalls-only mode"),Ur(Fr.ENTITLEMENT_MANAGEMENT)||be.debug("Skipping active entitlements update - no entitlement_management capability");else{const t=Sr.getDevice();if(t?.id){const n=await this.getAPIEntitlements(t.id);e=n?.results,e&&(Sr.setActiveEntitlements(C,e),this.invokeActiveEntitlementsHandler(e))}}return e}async getAPIEntitlements(e){const t=`device/${e}/active_entitlements/`;let n={};try{n=await Xr.instance.fetchAPI(t)}catch(e){throw be.error(Rr(e.status,t)),e}return n}invokeActiveEntitlementsHandler(e){if(Br()){(e=>{Sr.setNamiEntitlements(P,e);const t=Sr.getNamiEntitlements(M),n=new Set(e.map((e=>e.referenceId))),r=t.filter((e=>{const t=n.has(e.referenceId);return t&&be.debug(`Server granted verified entitlement for ${e.referenceId}, so replacing provisional entitlement grant.`),!t}));r.length!==t.length&&Sr.setNamiEntitlements(M,r),yi()})(e.map((e=>(e=>{const t=e.entitlement_ref_id;return{name:e.name||"",desc:e.description||"",namiId:"",referenceId:t,relatedSkus:fi.instance.refIdToRelatedSKUs[t]||[],activePurchases:fi.instance.refIdToActivePurchases[t]||[],purchasedSkus:fi.instance.refIdToPurchasedSKUs[t]||[]}})(e))))}}}var vi;_i.instance=new _i,exports.NamiCampaignRuleType=void 0,(vi=exports.NamiCampaignRuleType||(exports.NamiCampaignRuleType={})).DEFAULT="default",vi.LABEL="label",vi.UNKNOWN="unknown",vi.URL="url";const wi=()=>wr(Cn([...Sr.getPaywalls(I)??[],...Sr.getPaywalls(N)??[]]),"id"),Si=e=>{try{return Boolean(new URL(e))}catch{return!1}},Ai=()=>wr(Cn([...Sr.getCampaignRules(E)??[],...Sr.getCampaignRules($)??[]]),"rule"),ki=(e,t)=>{const n=Cn(Ai().filter((n=>t?n.type==t&&n.value==e:n.type==exports.NamiCampaignRuleType.DEFAULT))),r=wi().find((e=>n.find((t=>t.paywall===e.id)))),s=n.find((e=>e.paywall===r?.id));return{campaign:s,paywall:r}};class Ei{async init(e){this.setInitialValues(e),await this.initAndFetchRequiredData(e)}setInitialValues(e){Sr.clearSessionId(),Sr.setNamiConfig(e);const t=e.initialConfig;if(t.campaign_rules&&Sr.setCampaignRules($,t.campaign_rules),t.appConfig||t.platform_config){const e=t?.appConfig||t?.platform_config;e&&Sr.setAppConfig(O,e)}t?.paywalls&&Sr.setPaywalls(N,t.paywalls),t?.products&&Sr.setProducts(L,t.products)}async initAndFetchRequiredData(e){Is.instance.fetchConfig();let t=null;if(!Sr.getAnonymousMode()){const n=vs(e.namiCommands);e.formFactor&&(n.form_factor=e.formFactor),t=await As.instance.createOrUpdateDevice(n)}const n=e.formFactor??t?.form_factor??ws();mi.setFormFactor(n),Ss.instance.currentFormFactor=n;const r=Promise.all([ks.instance.fetchProducts(),_i.instance.fetchActiveEntitlements(),Es.instance.fetchPaywalls().then((e=>Ss.instance.fetchCampaignRules(e)))]),s=e.initialConfig;s.campaign_rules?.length&&s.paywalls?.length||await r,r.then((()=>this.reRenderPaywall())),xs.instance.startSession()}reRenderPaywall(){if("undefined"==typeof document)return;const{launchValue:e,launchType:t}=mi.state,{campaign:n,paywall:r}=ki(e,t),s=document.querySelector("nami-paywall");s&&r&&n&&s.setPaywallData(r,n)}}var Ii,xi;Ei.instance=new Ei;class Ci{constructor(){Ii.set(this,!1)}get isInitialized(){return a(this,Ii,"f")}static async configure(e){if(!e.appPlatformID)throw new Er;return this.setInitialConfig(e),await Ci.instance.initializeSDK(e)}static setInitialConfig(e){let t={};if(e.initialConfig)if("string"==typeof e.initialConfig)try{t=JSON.parse(e.initialConfig)}catch{be.error("Failed to parse NamiConfiguration.initialConfig"),t={}}else t=e.initialConfig;else t={};e.initialConfig=t}async initializeSDK(e){let t=!1,n=!1;const r=a(this,Ii,"f")?Sr.getNamiConfig():null;if(be.setLogger(e.logLevel),null!==r){if(br(e,r))return be.warn("Nami SDK is already configured, ignoring this configure call."),{sdkInitialized:!0,configureState:ce};n=!0;const s=zr(e.namiCommands),i=zr(r.namiCommands);e.appPlatformID==r.appPlatformID&&s==i||(t=!0),e.namiLanguageCode===r.namiLanguageCode&&e.logLevel==r.logLevel||(n=!0)}t&&(be.info("SDK full reconfigure called"),Sr.resetDevice()),function(e,t,n,r,s){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===r?s.call(e,n):s?s.value=n:t.set(e,n)}(this,Ii,!0,"f"),Xr.configure(e),await Ei.instance.init(e),be.info("SDK successfully initialized!");return{sdkInitialized:!0,configureState:n||t?ae:oe}}}Ii=new WeakMap,Ci.instance=new Ci,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"}(xi||(xi={}));class Pi{constructor(){this.load()}setExternalId(e){return this.externalId=e,this}getExternalId(){return this.externalId}isLoggedIn(){return!!this.externalId}save(){return this.externalId?Sr.setNamiProfile({externalId:this.externalId}):Sr.removeNamiProfile(),this}load(){const e=Sr.getNamiProfile();e&&(this.externalId=e.externalId)}async login(e){const t=await Xr.instance.login(e);t.external_id&&mi.setIsLoggedIn(!0),this.setExternalId(t.external_id).save()}async logout(){await Xr.instance.logout(),mi.setIsLoggedIn(!1),this.setExternalId(void 0).save()}}var Oi;Pi.instance=new Pi,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"}(Oi||(Oi={}));class $i{constructor(){this.emitter=is.getInstance()}static isLoggedIn(){return Pi.instance.isLoggedIn()}static loggedInId(){return this.instance.isSDKInitialized||be.debug(m),Pi.instance.getExternalId()}static async login(e){if(!this.instance.isSDKInitialized){const e=new kr;throw this.invokeStateHandler(Oi.LOGIN,!1,e),e}if(this.inAnonymousMode()){const e=new Or;throw this.invokeStateHandler(Oi.LOGIN,!1,e),e}try{await Pi.instance.login(e),await _i.instance.fetchActiveEntitlements(),this.invokeStateHandler(Oi.LOGIN,!0)}catch(e){throw this.invokeStateHandler(Oi.LOGIN,!1,e),e}}static async logout(){if(!this.instance.isSDKInitialized){const e=new kr;throw this.invokeStateHandler(Oi.LOGOUT,!1,e),e}if(this.inAnonymousMode()){const e=new Or;throw this.invokeStateHandler(Oi.LOGOUT,!1,e),e}try{await Pi.instance.logout(),await _i.instance.fetchActiveEntitlements(),this.invokeStateHandler(Oi.LOGOUT,!0)}catch(e){throw this.invokeStateHandler(Oi.LOGOUT,!1,e),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?Oi.ANONYMOUS_MODE_ON:Oi.ANONYMOUS_MODE_OFF;if(!this.instance.isSDKInitialized){const e=new kr;throw this.invokeStateHandler(t,!1,e),e}if(this.anonymousModeCapability())if(this.inAnonymousMode()!==e)if(e)Sr.setAnonymousMode(e),Sr.resetDevice(),this.refetchConfig(),this.invokeStateHandler(Oi.ANONYMOUS_MODE_ON,!0);else{Sr.clearAnonymousMode();const e=Sr.getNamiConfig()?.namiCommands;await As.instance.createOrUpdateDevice(vs(e)),this.refetchConfig(),this.invokeStateHandler(Oi.ANONYMOUS_MODE_OFF,!0)}else{const n=e?new Cr:new Pr;this.invokeStateHandler(t,!1,n)}else be.warn("Anonymous mode feature is not enabled for your Nami account. Contact support@nami.ml for details.")}static inAnonymousMode(){return!!this.instance.isSDKInitialized&&Sr.getAnonymousMode()}static setCustomerAttribute(e,t){if(!this.instance.isSDKInitialized)throw new kr;Sr.setCustomerAttribute(e,t),Ur(Fr.PAYWALL_PERSONALIZATION)?(mi.setCustomerAttribute({[e]:t}),be.debug(`This customer attribute you set is now available for paywall personalization using the smart text variable: ${e}`)):be.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 kr;const t=Sr.getCustomerAttribute(e);return null!=t?Ur(Fr.PAYWALL_PERSONALIZATION)?be.debug(`Found customer attribute. ${e} is available for paywall personalization on this device.`):be.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.`):be.warn(`No ${e} customer attribute found.`),t}static clearCustomerAttribute(e){if(!this.instance.isSDKInitialized)throw new kr;Sr.clearCustomerAttribute(e)?(mi.removeCustomerAttribute(e),be.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.`)):be.warn(`No value to clear for attribute ${e}.`)}static clearAllCustomerAttributes(){if(!this.instance.isSDKInitialized)throw new kr;Sr.getAllCustomerAttributes().forEach((e=>{mi.removeCustomerAttribute(e)})),Sr.clearAllCustomerAttributes(),be.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 invokeStateHandler(e,t,n){this.instance.emitter.emit("accountStateChange",e,t,n)}get isSDKInitialized(){return Ci.instance.isInitialized}static async updateCustomerDataPlatformId(e){if(!this.instance.isSDKInitialized){const e=new kr;throw this.invokeStateHandler(Oi.CUSTOMER_DATA_PLATFORM_ID_SET,!1,e),e}if(this.inAnonymousMode()){const e=new $r;throw this.invokeStateHandler(Oi.CUSTOMER_DATA_PLATFORM_ID_SET,!1,e),e}try{await As.instance.updateDeviceField("customer_data_platform_id",e),this.invokeStateHandler(Oi.CUSTOMER_DATA_PLATFORM_ID_SET,!0)}catch(e){this.invokeStateHandler(Oi.CUSTOMER_DATA_PLATFORM_ID_SET,!1,e)}}static anonymousModeCapability(){if(!this.instance.isSDKInitialized)return!1;const e=Ur(Fr.ANONYMOUS_MODE_CAPABILITY),t=Ur(Fr.THIRD_PARTY_TRANSACTIONS);return e&&t}static async refetchConfig(){this.instance.isSDKInitialized&&await Promise.all([ks.instance.fetchProducts(),Es.instance.fetchPaywalls().then((e=>Ss.instance.fetchCampaignRules(e)))])}}$i.instance=new $i;class Ni{constructor(){this.emitter=is.getInstance()}static allPaywalls(){if(!this.instance.sdkInitialized)throw new kr;return wi()}static setProductDetails(e){this.instance.productDetails=e,mi.setProductDetails(e)}static registerSignInHandler(e){return this.instance.emitter.addListener(xi.PAYWALL_SIGNIN_REQUESTED,e),()=>{this.instance.emitter.removeListener(xi.PAYWALL_SIGNIN_REQUESTED,e)}}static registerCloseHandler(e){return this.instance.emitter.addListener(xi.PAYWALL_CLOSE_REQUESTED,e),()=>{this.instance.emitter.removeListener(xi.PAYWALL_CLOSE_REQUESTED,e)}}static registerDeeplinkActionHandler(e){return this.instance.emitter.addListener(xi.PAYWALL_DEEPLINK_ACTION,e),()=>{this.instance.emitter.removeListener(xi.PAYWALL_DEEPLINK_ACTION,e)}}static registerBuySkuHandler(e){return Br()&&be.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(xi.REGISTER_BUY_SKU,e),()=>{this.instance.emitter.removeListener(xi.REGISTER_BUY_SKU,e)}}static registerRestoreHandler(e){return this.instance.emitter.addListener(xi.PAYWALL_RESTORE_REQUESTED,e),()=>{this.instance.emitter.removeListener(xi.PAYWALL_RESTORE_REQUESTED,e)}}static async buySkuComplete(e){if(mi.setPurchaseInProgress(!1),$i.inAnonymousMode())return void be.debug("Skipping purchase validation - anonymous mode");const t=Sr.getSessionId(),n=Sr.getPurchaseImpression();if(n){try{await(async e=>{if(Sr.getAnonymousMode())be.info("Skipping transaction post - anonymous mode");else try{await Xr.instance.postConversion(e)}catch(e){be.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){be.error("Error posting conversion",e)}if(!Ur(Fr.THIRD_PARTY_TRANSACTIONS))try{await Xr.instance.purchaseValidation({app_env:"production",payload:"",sku:e.skuId})}catch(e){be.error("Error validating purchase",e)}}else be.debug("Not sending paywall conversion call complete due to unknown impression")}static buySkuCancel(){Ur(Fr.THIRD_PARTY_TRANSACTIONS)?mi.setPurchase(!1):be.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){Si(e)?(be.debug(`NamiPaywallManager: setAppSuppliedVideoDetails received valid url ${e}`),mi.setAppSuppliedVideoDetails({url:e,name:t})):be.debug(`NamiPaywallManager: setAppSuppliedVideoDetails received invalid url ${e}`)}get sdkInitialized(){return Ci.instance.isInitialized}}Ni.instance=new Ni;const Li=e.css`
1
+ "use strict";var e=require("lit");const t=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(){}},n=new WeakMap,i=e=>{let t=n.get(e);return void 0===t&&n.set(e,t=new Map),t},a=class{constructor(){this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(i(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){i(this).set(e,String(t))}removeAttribute(e){i(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 i(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 t(this);return this.__internals=e,e}getAttribute(e){return i(this).get(e)??null}},r=class extends a{};function o(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 s(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=r),"function"==typeof SuppressedError&&SuppressedError;const{NAMI_SDK_VERSION:d="3.2.1",PRODUCTION:u="production",DEVELOPMENT:l="development",PLATFORM_ID_REQUIRED:h="Platform ID is required",DEVICE_ID_REQUIRED:c="Device ID is required",EXTERNAL_ID_REQUIRED:m="External ID is required",SDK_NOT_INITIALIZED:f="SDK has not been initialized. Make sure to call Nami.configure() first!",CAMPAIGN_NOT_AVAILABLE:g="Campaign is not available",UNABLE_TO_UPDATE_CDP_ID:p="Unable to update CDP id in anonymous mode",ANONYMOUS_MODE_ALREADY_ON:v="Anonymous mode is already turned on.",ANONYMOUS_MODE_ALREADY_OFF:y="Anonymous mode is already turned off.",ANONYMOUS_MODE_LOGIN_NOT_ALLOWED:b="Login/logout are not available in anonymous mode",SESSION_REQUIRED:w="Session is required",DEVICE_ID_NOT_SET:k="Nami Device ID is not set",AUTH_DEVICE:M="nami_auth_device",NAMI_CONFIGURATION:S="nami_configuration",NAMI_PROFILE:P="nami_profile",API_CONFIG:E="api_config",API_CAMPAIGN_RULES:T="api_campaign_rules",API_PAYWALLS:A="api_paywalls",API_PRODUCTS:x="api_products",API_ACTIVE_ENTITLEMENTS:C="api_active_entitlements",SERVER_NAMI_ENTITLEMENTS:L="server_active_entitlements",INITIAL_APP_CONFIG:D="initial_app_config",INITIAL_CAMPAIGN_RULES:I="initial_campaign_rules",INITIAL_PAYWALLS:R="initial_paywalls",INITIAL_PRODUCTS:_="initial_products",LOCAL_NAMI_ENTITLEMENTS:W="local_active_entitlements",CUSTOMER_ATTRIBUTES_KEY_PREFIX:N="nami_cmr_attributes_",NAMI_CUSTOMER_JOURNEY_STATE:O="nami_customer_journey_state",ANONYMOUS_MODE:F="nami_anonymous_mode",KEY_SESSION_COUNTER:j="nami_session_counter",INITIAL_SESSION_COUNTER_VALUE:z=1,NAMI_LAST_IMPRESSION_ID:$="nami_last_impression_id",NAMI_PURCHASE_IMPRESSION_ID:H="nami_purchase_impression_id",NAMI_SESSION_ID:U="nami_session_id",NAMI_LANGUAGE_CODE:B="nami_language_code",API_VERSION:G="v3",BASE_URL_PATH:X=`sdk/${G}/platform`,BASE_URL:Y="https://app.namiml.com",BASE_STAGING_URL:K="https://app-staging.namiml.com",CUSTOM_HOST_PREFIX:V="namiAPIHost=",USE_STAGING_API:q="useStagingAPI",EXTENDED_CLIENT_INFO_PREFIX:J="extendedClientInfo",EXTENDED_CLIENT_INFO_DELIMITER:Q=":",VALIDATE_PRODUCT_GROUPS:Z="validateProductGroups",EXTENDED_PLATFORM:ee="extended-platform",EXTENDED_PLATFORM_VERSION:te="extended-platform-version",API_MAX_CALLS_LIMIT:ne=2,API_RETRY_DELAY_SEC:ie=2,API_TIMEOUT_LIMIT:ae=2e4,DEVICE_API_TIMEOUT_LIMIT:re=3e3,STATUS_SUCCESS:oe=200,STATUS_BAD_REQUEST:se=400,STATUS_NOT_FOUND:de=404,STATUS_INTERNAL_SERVER_ERROR:ue=500,INITIAL_SUCCESS:le="Initial success",RECONFIG_SUCCESS:he="Reconfig success",ALREADY_CONFIGURED:ce="Already configured",AVAILABLE_CAMPAIGNS_CHANGED:me="AvailableCampaignsChanged",PAYWALL_ACTION_EVENT:fe="PaywallActionEvent",AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED:ge="AvailableActiveEntitlementsChanged",CUSTOMER_JOURNEY_STATE_CHANGED:pe="CustomerJourneyStateChanged",SKU_TEXT_REGEX:ve=/\$\{sku\.(\w+)(:\d+)?\}/g,VAR_REGEX:ye=/\$\{\s*(\w+(\.[a-zA-Z\d_:${}-]{0,99})*?)\s*}/g,HTML_REGEX:be=/<\/?[a-z][\s\S]*>/i,SMART_TEXT_PATTERN:we="${",CORS_PROXY_URL:ke="https://hosted-content-staging.namiml.com",CORS_PROXY_URL_LOCAL:Me="http://localhost:8001"}={};var Se;exports.LogLevel=void 0,(Se=exports.LogLevel||(exports.LogLevel={}))[Se.DEBUG=1]="DEBUG",Se[Se.INFO=2]="INFO",Se[Se.WARN=3]="WARN",Se[Se.ERROR=4]="ERROR";const Pe={debug:exports.LogLevel.DEBUG,info:exports.LogLevel.INFO,warn:exports.LogLevel.WARN,error:exports.LogLevel.ERROR};const Ee=new class{constructor(){this.setLogger=e=>{this.currentLogLevel=e?Pe[e]:exports.LogLevel.WARN}}debug(e,...t){this.shouldLog(exports.LogLevel.DEBUG)&&console.debug(this.formatMessage(exports.LogLevel.DEBUG,e,...t))}info(e,...t){this.shouldLog(exports.LogLevel.INFO)&&console.info(this.formatMessage(exports.LogLevel.INFO,e,...t))}warn(e,...t){this.shouldLog(exports.LogLevel.WARN)&&console.warn(this.formatMessage(exports.LogLevel.WARN,e,...t))}error(e,...t){this.shouldLog(exports.LogLevel.ERROR)&&console.error(this.formatMessage(exports.LogLevel.ERROR,e,...t))}shouldLog(e){return e>=this.currentLogLevel}formatMessage(e,t,...n){const i=exports.LogLevel[e];return`[${(new Date).toISOString()}] [${i}] ${t} ${n=n.map((e=>"object"==typeof e?JSON.stringify(e):e))}`}};var Te="object"==typeof global&&global&&global.Object===Object&&global,Ae="object"==typeof self&&self&&self.Object===Object&&self,xe=Te||Ae||Function("return this")(),Ce=xe.Symbol,Le=Object.prototype,De=Le.hasOwnProperty,Ie=Le.toString,Re=Ce?Ce.toStringTag:void 0;var _e=Object.prototype.toString;var We="[object Null]",Ne="[object Undefined]",Oe=Ce?Ce.toStringTag:void 0;function Fe(e){return null==e?void 0===e?Ne:We:Oe&&Oe in Object(e)?function(e){var t=De.call(e,Re),n=e[Re];try{e[Re]=void 0;var i=!0}catch(e){}var a=Ie.call(e);return i&&(t?e[Re]=n:delete e[Re]),a}(e):function(e){return _e.call(e)}(e)}function je(e){return null!=e&&"object"==typeof e}var ze="[object Symbol]";function $e(e){return"symbol"==typeof e||je(e)&&Fe(e)==ze}var He=Array.isArray,Ue=1/0,Be=Ce?Ce.prototype:void 0,Ge=Be?Be.toString:void 0;function Xe(e){if("string"==typeof e)return e;if(He(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,Xe)+"";if($e(e))return Ge?Ge.call(e):"";var t=e+"";return"0"==t&&1/e==-Ue?"-0":t}function Ye(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ke(e){return e}var Ve="[object AsyncFunction]",qe="[object Function]",Je="[object GeneratorFunction]",Qe="[object Proxy]";function Ze(e){if(!Ye(e))return!1;var t=Fe(e);return t==qe||t==Je||t==Ve||t==Qe}var et,tt=xe["__core-js_shared__"],nt=(et=/[^.]+$/.exec(tt&&tt.keys&&tt.keys.IE_PROTO||""))?"Symbol(src)_1."+et:"";var it=Function.prototype.toString;function at(e){if(null!=e){try{return it.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var rt=/^\[object .+?Constructor\]$/,ot=Function.prototype,st=Object.prototype,dt=ot.toString,ut=st.hasOwnProperty,lt=RegExp("^"+dt.call(ut).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ht(e){return!(!Ye(e)||(t=e,nt&&nt in t))&&(Ze(e)?lt:rt).test(at(e));var t}function ct(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ht(n)?n:void 0}var mt=ct(xe,"WeakMap");function ft(e){return e!=e}function gt(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,ft,n)}(e,t,0)>-1}var pt=9007199254740991,vt=/^(?:0|[1-9]\d*)$/;function yt(e,t){var n=typeof e;return!!(t=null==t?pt:t)&&("number"==n||"symbol"!=n&&vt.test(e))&&e>-1&&e%1==0&&e<t}function bt(e,t){return e===t||e!=e&&t!=t}var wt=9007199254740991;function kt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=wt}var Mt=Object.prototype;function St(e){return je(e)&&"[object Arguments]"==Fe(e)}var Pt=Object.prototype,Et=Pt.hasOwnProperty,Tt=Pt.propertyIsEnumerable,At=St(function(){return arguments}())?St:function(e){return je(e)&&Et.call(e,"callee")&&!Tt.call(e,"callee")};var xt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ct=xt&&"object"==typeof module&&module&&!module.nodeType&&module,Lt=Ct&&Ct.exports===xt?xe.Buffer:void 0,Dt=(Lt?Lt.isBuffer:void 0)||function(){return!1},It={};It["[object Float32Array]"]=It["[object Float64Array]"]=It["[object Int8Array]"]=It["[object Int16Array]"]=It["[object Int32Array]"]=It["[object Uint8Array]"]=It["[object Uint8ClampedArray]"]=It["[object Uint16Array]"]=It["[object Uint32Array]"]=!0,It["[object Arguments]"]=It["[object Array]"]=It["[object ArrayBuffer]"]=It["[object Boolean]"]=It["[object DataView]"]=It["[object Date]"]=It["[object Error]"]=It["[object Function]"]=It["[object Map]"]=It["[object Number]"]=It["[object Object]"]=It["[object RegExp]"]=It["[object Set]"]=It["[object String]"]=It["[object WeakMap]"]=!1;var Rt,_t="object"==typeof exports&&exports&&!exports.nodeType&&exports,Wt=_t&&"object"==typeof module&&module&&!module.nodeType&&module,Nt=Wt&&Wt.exports===_t&&Te.process,Ot=function(){try{var e=Wt&&Wt.require&&Wt.require("util").types;return e||Nt&&Nt.binding&&Nt.binding("util")}catch(e){}}(),Ft=Ot&&Ot.isTypedArray,jt=Ft?(Rt=Ft,function(e){return Rt(e)}):function(e){return je(e)&&kt(e.length)&&!!It[Fe(e)]},zt=Object.prototype.hasOwnProperty;function $t(e,t){var n=He(e),i=!n&&At(e),a=!n&&!i&&Dt(e),r=!n&&!i&&!a&&jt(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):[],d=s.length;for(var u in e)!zt.call(e,u)||o&&("length"==u||a&&("offset"==u||"parent"==u)||r&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||yt(u,d))||s.push(u);return s}var Ht=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Ut=Object.prototype.hasOwnProperty;function Bt(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||Mt))return Ht(e);var t,n,i=[];for(var a in Object(e))Ut.call(e,a)&&"constructor"!=a&&i.push(a);return i}function Gt(e){return null!=(t=e)&&kt(t.length)&&!Ze(t)?$t(e):Bt(e);var t}var Xt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Yt=/^\w*$/;function Kt(e,t){if(He(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!$e(e))||(Yt.test(e)||!Xt.test(e)||null!=t&&e in Object(t))}var Vt=ct(Object,"create");var qt=Object.prototype.hasOwnProperty;var Jt=Object.prototype.hasOwnProperty;function Qt(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 Zt(e,t){for(var n=e.length;n--;)if(bt(e[n][0],t))return n;return-1}Qt.prototype.clear=function(){this.__data__=Vt?Vt(null):{},this.size=0},Qt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Qt.prototype.get=function(e){var t=this.__data__;if(Vt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return qt.call(t,e)?t[e]:void 0},Qt.prototype.has=function(e){var t=this.__data__;return Vt?void 0!==t[e]:Jt.call(t,e)},Qt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Vt&&void 0===t?"__lodash_hash_undefined__":t,this};var en=Array.prototype.splice;function tn(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])}}tn.prototype.clear=function(){this.__data__=[],this.size=0},tn.prototype.delete=function(e){var t=this.__data__,n=Zt(t,e);return!(n<0)&&(n==t.length-1?t.pop():en.call(t,n,1),--this.size,!0)},tn.prototype.get=function(e){var t=this.__data__,n=Zt(t,e);return n<0?void 0:t[n][1]},tn.prototype.has=function(e){return Zt(this.__data__,e)>-1},tn.prototype.set=function(e,t){var n=this.__data__,i=Zt(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};var nn=ct(xe,"Map");function an(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 rn(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])}}rn.prototype.clear=function(){this.size=0,this.__data__={hash:new Qt,map:new(nn||tn),string:new Qt}},rn.prototype.delete=function(e){var t=an(this,e).delete(e);return this.size-=t?1:0,t},rn.prototype.get=function(e){return an(this,e).get(e)},rn.prototype.has=function(e){return an(this,e).has(e)},rn.prototype.set=function(e,t){var n=an(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this};var on="Expected a function";function sn(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(on);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(sn.Cache||rn),n}sn.Cache=rn;var dn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,un=/\\(\\)?/g,ln=function(e){var t=sn(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(dn,(function(e,n,i,a){t.push(i?a.replace(un,"$1"):n||e)})),t}));function hn(e){return null==e?"":Xe(e)}function cn(e,t){return He(e)?e:Kt(e,t)?[e]:ln(hn(e))}var mn=1/0;function fn(e){if("string"==typeof e||$e(e))return e;var t=e+"";return"0"==t&&1/e==-mn?"-0":t}function gn(e,t){for(var n=0,i=(t=cn(t,e)).length;null!=e&&n<i;)e=e[fn(t[n++])];return n&&n==i?e:void 0}function pn(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 vn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function yn(e){return vn.test(e)}var bn="\\ud800-\\udfff",wn="["+bn+"]",kn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Mn="\\ud83c[\\udffb-\\udfff]",Sn="[^"+bn+"]",Pn="(?:\\ud83c[\\udde6-\\uddff]){2}",En="[\\ud800-\\udbff][\\udc00-\\udfff]",Tn="(?:"+kn+"|"+Mn+")"+"?",An="[\\ufe0e\\ufe0f]?",xn=An+Tn+("(?:\\u200d(?:"+[Sn,Pn,En].join("|")+")"+An+Tn+")*"),Cn="(?:"+[Sn+kn+"?",kn,Pn,En,wn].join("|")+")",Ln=RegExp(Mn+"(?="+Mn+")|"+Cn+xn,"g");function Dn(e){return yn(e)?function(e){return e.match(Ln)||[]}(e):function(e){return e.split("")}(e)}var In,Rn=(In="toUpperCase",function(e){var t=yn(e=hn(e))?Dn(e):void 0,n=t?t[0]:e.charAt(0),i=t?pn(t,1).join(""):e.slice(1);return n[In]()+i});var _n,Wn=(_n={"À":"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==_n?void 0:_n[e]}),Nn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,On=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Fn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var jn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var zn="\\ud800-\\udfff",$n="\\u2700-\\u27bf",Hn="a-z\\xdf-\\xf6\\xf8-\\xff",Un="A-Z\\xc0-\\xd6\\xd8-\\xde",Bn="\\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",Gn="["+Bn+"]",Xn="\\d+",Yn="["+$n+"]",Kn="["+Hn+"]",Vn="[^"+zn+Bn+Xn+$n+Hn+Un+"]",qn="(?:\\ud83c[\\udde6-\\uddff]){2}",Jn="[\\ud800-\\udbff][\\udc00-\\udfff]",Qn="["+Un+"]",Zn="(?:"+Kn+"|"+Vn+")",ei="(?:"+Qn+"|"+Vn+")",ti="(?:['’](?:d|ll|m|re|s|t|ve))?",ni="(?:['’](?:D|LL|M|RE|S|T|VE))?",ii="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",ai="[\\ufe0e\\ufe0f]?",ri=ai+ii+("(?:\\u200d(?:"+["[^"+zn+"]",qn,Jn].join("|")+")"+ai+ii+")*"),oi="(?:"+[Yn,qn,Jn].join("|")+")"+ri,si=RegExp([Qn+"?"+Kn+"+"+ti+"(?="+[Gn,Qn,"$"].join("|")+")",ei+"+"+ni+"(?="+[Gn,Qn+Zn,"$"].join("|")+")",Qn+"?"+Zn+"+"+ti,Qn+"+"+ni,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Xn,oi].join("|"),"g");function di(e,t,n){return e=hn(e),void 0===t?function(e){return jn.test(e)}(e)?function(e){return e.match(si)||[]}(e):function(e){return e.match(Fn)||[]}(e):e.match(t)||[]}var ui=RegExp("['’]","g");var li,hi=(li=function(e,t,n){return t=t.toLowerCase(),e+(n?Rn(hn(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}(di(function(e){return(e=hn(e))&&e.replace(Nn,Wn).replace(On,"")}(e).replace(ui,"")),li,"")});function ci(e){var t=this.__data__=new tn(e);this.size=t.size}ci.prototype.clear=function(){this.__data__=new tn,this.size=0},ci.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ci.prototype.get=function(e){return this.__data__.get(e)},ci.prototype.has=function(e){return this.__data__.has(e)},ci.prototype.set=function(e,t){var n=this.__data__;if(n instanceof tn){var i=n.__data__;if(!nn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new rn(i)}return n.set(e,t),this.size=n.size,this};var mi=Object.prototype.propertyIsEnumerable,fi=Object.getOwnPropertySymbols,gi=fi?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}(fi(e),(function(t){return mi.call(e,t)})))}:function(){return[]};function pi(e){return function(e,t,n){var i=t(e);return He(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,Gt,gi)}var vi=ct(xe,"DataView"),yi=ct(xe,"Promise"),bi=ct(xe,"Set"),wi="[object Map]",ki="[object Promise]",Mi="[object Set]",Si="[object WeakMap]",Pi="[object DataView]",Ei=at(vi),Ti=at(nn),Ai=at(yi),xi=at(bi),Ci=at(mt),Li=Fe;(vi&&Li(new vi(new ArrayBuffer(1)))!=Pi||nn&&Li(new nn)!=wi||yi&&Li(yi.resolve())!=ki||bi&&Li(new bi)!=Mi||mt&&Li(new mt)!=Si)&&(Li=function(e){var t=Fe(e),n="[object Object]"==t?e.constructor:void 0,i=n?at(n):"";if(i)switch(i){case Ei:return Pi;case Ti:return wi;case Ai:return ki;case xi:return Mi;case Ci:return Si}return t});var Di=xe.Uint8Array;function Ii(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 Ri(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new rn;++t<n;)this.add(e[t])}function _i(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 Wi(e,t){return e.has(t)}Ri.prototype.add=Ri.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Ri.prototype.has=function(e){return this.__data__.has(e)};var Ni=1,Oi=2;function Fi(e,t,n,i,a,r){var o=n&Ni,s=e.length,d=t.length;if(s!=d&&!(o&&d>s))return!1;var u=r.get(e),l=r.get(t);if(u&&l)return u==t&&l==e;var h=-1,c=!0,m=n&Oi?new Ri:void 0;for(r.set(e,t),r.set(t,e);++h<s;){var f=e[h],g=t[h];if(i)var p=o?i(g,f,h,t,e,r):i(f,g,h,e,t,r);if(void 0!==p){if(p)continue;c=!1;break}if(m){if(!_i(t,(function(e,t){if(!Wi(m,t)&&(f===e||a(f,e,n,i,r)))return m.push(t)}))){c=!1;break}}else if(f!==g&&!a(f,g,n,i,r)){c=!1;break}}return r.delete(e),r.delete(t),c}function ji(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function zi(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var $i=1,Hi=2,Ui="[object Boolean]",Bi="[object Date]",Gi="[object Error]",Xi="[object Map]",Yi="[object Number]",Ki="[object RegExp]",Vi="[object Set]",qi="[object String]",Ji="[object Symbol]",Qi="[object ArrayBuffer]",Zi="[object DataView]",ea=Ce?Ce.prototype:void 0,ta=ea?ea.valueOf:void 0;var na=1,ia=Object.prototype.hasOwnProperty;var aa=1,ra="[object Arguments]",oa="[object Array]",sa="[object Object]",da=Object.prototype.hasOwnProperty;function ua(e,t,n,i,a,r){var o=He(e),s=He(t),d=o?oa:Li(e),u=s?oa:Li(t),l=(d=d==ra?sa:d)==sa,h=(u=u==ra?sa:u)==sa,c=d==u;if(c&&Dt(e)){if(!Dt(t))return!1;o=!0,l=!1}if(c&&!l)return r||(r=new ci),o||jt(e)?Fi(e,t,n,i,a,r):function(e,t,n,i,a,r,o){switch(n){case Zi:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Qi:return!(e.byteLength!=t.byteLength||!r(new Di(e),new Di(t)));case Ui:case Bi:case Yi:return bt(+e,+t);case Gi:return e.name==t.name&&e.message==t.message;case Ki:case qi:return e==t+"";case Xi:var s=ji;case Vi:var d=i&$i;if(s||(s=zi),e.size!=t.size&&!d)return!1;var u=o.get(e);if(u)return u==t;i|=Hi,o.set(e,t);var l=Fi(s(e),s(t),i,a,r,o);return o.delete(e),l;case Ji:if(ta)return ta.call(e)==ta.call(t)}return!1}(e,t,d,n,i,a,r);if(!(n&aa)){var m=l&&da.call(e,"__wrapped__"),f=h&&da.call(t,"__wrapped__");if(m||f){var g=m?e.value():e,p=f?t.value():t;return r||(r=new ci),a(g,p,n,i,r)}}return!!c&&(r||(r=new ci),function(e,t,n,i,a,r){var o=n&na,s=pi(e),d=s.length;if(d!=pi(t).length&&!o)return!1;for(var u=d;u--;){var l=s[u];if(!(o?l in t:ia.call(t,l)))return!1}var h=r.get(e),c=r.get(t);if(h&&c)return h==t&&c==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++u<d;){var g=e[l=s[u]],p=t[l];if(i)var v=o?i(p,g,l,t,e,r):i(g,p,l,e,t,r);if(!(void 0===v?g===p||a(g,p,n,i,r):v)){m=!1;break}f||(f="constructor"==l)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,n,i,a,r))}function la(e,t,n,i,a){return e===t||(null==e||null==t||!je(e)&&!je(t)?e!=e&&t!=t:ua(e,t,n,i,la,a))}var ha=1,ca=2;function ma(e){return e==e&&!Ye(e)}function fa(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function ga(e){var t=function(e){for(var t=Gt(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,ma(a)]}return t}(e);return 1==t.length&&t[0][2]?fa(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],d=e[s],u=o[1];if(o[2]){if(void 0===d&&!(s in e))return!1}else{var l=new ci;if(!la(u,d,ha|ca,i,l))return!1}}return!0}(n,0,t)}}function pa(e,t){return null!=e&&t in Object(e)}function va(e,t){return null!=e&&function(e,t,n){for(var i=-1,a=(t=cn(t,e)).length,r=!1;++i<a;){var o=fn(t[i]);if(!(r=null!=e&&n(e,o)))break;e=e[o]}return r||++i!=a?r:!!(a=null==e?0:e.length)&&kt(a)&&yt(o,a)&&(He(e)||At(e))}(e,t,pa)}var ya=1,ba=2;function wa(e,t){return Kt(e)&&ma(t)?fa(fn(e),t):function(n){var i=function(e,t,n){var i=null==e?void 0:gn(e,t);return void 0===i?n:i}(n,e);return void 0===i&&i===t?va(n,e):la(t,i,ya|ba)}}function ka(e){return Kt(e)?(t=fn(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return gn(t,e)}}(e);var t}function Ma(e,t){return la(e,t)}var Sa=bi&&1/zi(new bi([,-0]))[1]==1/0?function(e){return new bi(e)}:function(){},Pa=200;function Ea(e,t){return e&&e.length?function(e,t,n){var i=-1,a=gt,r=e.length,o=!0,s=[],d=s;if(r>=Pa){var u=t?null:Sa(e);if(u)return zi(u);o=!1,a=Wi,d=new Ri}else d=t?[]:s;e:for(;++i<r;){var l=e[i],h=t?t(l):l;if(l=0!==l?l:0,o&&h==h){for(var c=d.length;c--;)if(d[c]===h)continue e;t&&d.push(h),s.push(l)}else a(d,h,n)||(d!==s&&d.push(h),s.push(l))}return s}(e,"function"==typeof(n=t)?n:null==n?Ke:"object"==typeof n?He(n)?wa(n[0],n[1]):ga(n):ka(n)):[];var n}const Ta=new class{setDevice(e){this.setItem(M,e)}getDevice(){return this.getItem(M)}resetDevice(){this.resetItem(M)}getAnonymousMode(){return this.getItem(F)||!1}setAnonymousMode(e){this.setItem(F,e)}clearAnonymousMode(){this.resetItem(F)}setAppConfig(e,t){this.setItem(e,t)}getAppConfig(e){return this.getItem(e)}setLanguageCode(e){this.setItem(B,e||"en")}getLanguageCode(){return this.getItem(B)||"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)}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(x)??[];return Ea(Ii([...this.getItem(_)??[],...e]),"sku_ref_id")}setNamiConfig(e){this.setItem(S,e)}getNamiConfig(){return this.getItem(S)}setCustomerAttribute(e,t){this.setItem(N+e,t)}getCustomerAttribute(e){return this.getItem(N+e)}getAllCustomerAttributes(){return Object.entries(localStorage).filter((([e])=>e.includes(N))).map((([e,t])=>e.replace(N,"")+":"+t))}getAllCustomerAttributesKeys(){return Object.keys(localStorage).filter((e=>e.includes(N))).map((e=>e.replace(N,"")))}clearCustomerAttribute(e){const t=N+e,n=this.getItem(t);return n&&this.resetItem(t),!!n}clearAllCustomerAttributes(){Object.keys(localStorage).filter((e=>e.includes(N))).map((e=>this.resetItem(e)))}setNamiProfile(e){this.setItem(P,e)}getNamiProfile(){return this.getItem(P)}removeNamiProfile(){this.resetItem(P)}setCustomerJourneyState(e){this.setItem(O,e)}getCustomerJourneyState(){return this.getItem(O)}setSessionCounter(){const e=this.getItem(j),t=e?parseInt(e):z||z;this.setItem(j,t+1)}setLastImpressionId(e){this.setItem($,e)}getLastImpressionId(){return this.getItem($)??""}setPurchaseImpression(){const e=this.getLastImpressionId()??"";this.setItem(H,e)}getPurchaseImpression(){return this.getItem(H)??""}setSessionId(e){e&&this.setItem(U,e)}getSessionId(){return this.getItem(U)??""}clearSessionId(){this.resetItem(U)}setItem(e,t){try{const n=JSON.stringify(t);localStorage.setItem(e,n)}catch(e){Ee.error("Error setting item in localStorage:",e)}}getItem(e){try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(t){return Ee.error("Error getting item from localStorage:",e,": ",t),null}}resetItem(e){try{localStorage.removeItem(e)}catch(e){Ee.error("Error removing item from localStorage:",e)}}clear(){try{localStorage.clear()}catch(e){Ee.error("Error clearing localStorage:",e)}}};class Aa extends Error{constructor(e,t){super(t),this.statusCode=e,this.status=e,this.message=`RetryLimitExceededError: ${this.message}`}}class xa extends Error{constructor(){super(f)}}class Ca extends Error{constructor(){super(h)}}class La extends Error{constructor(){super(c)}}class Da extends Error{constructor(){super(m)}}class Ia extends Error{constructor(){super(g)}}class Ra extends Error{constructor(){super(v)}}class _a extends Error{constructor(){super(y)}}class Wa extends Error{constructor(){super(y)}}class Na extends Error{constructor(){super(p)}}class Oa extends Error{constructor(e){super(e),this.message=`BadRequestError: ${this.message}`}}class Fa extends Error{constructor(e){super(e),this.message=`NotFoundError: ${this.message}`}}class ja extends Error{constructor(e,t){super(t),this.statusCode=e,this.message=`ClientError: ${this.message}`}}class za extends Error{constructor(e){super(e),this.message=`ServerError: ${this.message}`}}const $a=(e,t)=>{if(e==se)throw new Oa(t);if(e==de)throw new Fa(t);if(e>se&&e<ue)throw new ja(e,t);if(e>=ue)throw new za(t)};async function Ha(e,t,n=ae,i=ne){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(a++,a<=i){const e=1e3*(a+ie);return await new Promise((t=>setTimeout(t,e))),r()}throw new Aa(o.status,`Request failed after ${i} retries`)}return o};return(await r()).json()}var Ua;!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"}(Ua||(Ua={}));const Ba=e=>{let t;if(e?.includes(q))t=K;else{const n=e?.find((e=>e.includes(V)));t=n?n.split("=")[1]:Y}return t=t.replace(/\/$/,""),t+"/"+X},Ga=e=>{const t=Ta.getAppConfig(E)||Ta.getAppConfig(D);return t?.capabilities?.includes(e)??!1},Xa=e=>{const t=!Ga(Ua.THIRD_PARTY_TRANSACTIONS);return e&&!t&&Ee.info(`[${e}] Your plan does not have purchase management features.`),t};function Ya(e,t,n){const i=n.value;return n.value=function(...e){if(!this.platformID)throw new Ca;return i.apply(this,e)},n}function Ka(e,t,n){const i=n.value;return n.value=function(...e){const t=Ta.getDevice();if(!t?.id)throw new La;return i.apply(this,e)},n}class Va{get deviceID(){return Ta.getDevice()?.id}constructor(){const e=Ta.getNamiConfig();!this.platformID&&e&&this.configure(e)}static configure(e){this.instance.configure(e)}configure(e){this.baseURL=Ba(e.namiCommands),this.platformID=e.appPlatformID}async login(e){if(!e)throw new Da;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"});Ta.setSessionCounter(),n.id&&Ta.setSessionId(n.id)}async postImpression(e){const t=`device/${this.deviceID}/impression/`,n=await this.requestBodyAPI(t,e,"POST",!0);n.id&&Ta.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){const t=`${this.baseURL}/${this.platformID}/`+e;return await Ha(t)}async requestBodyAPI(e,t,n="POST",i=!1,a){const r=`${this.baseURL}/${this.platformID}/`+e,o={method:n,headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:i};return await Ha(r,o,a)}}Va.instance=new Va,o([Ka],Va.prototype,"login",null),o([Ka],Va.prototype,"logout",null),o([Ka],Va.prototype,"startSession",null),o([Ka],Va.prototype,"postImpression",null),o([Ka],Va.prototype,"postConversion",null),o([Ka],Va.prototype,"purchaseValidation",null),o([Ya],Va.prototype,"fetchAPI",null),o([Ya],Va.prototype,"requestBodyAPI",null);var qa,Ja="object"==typeof Reflect?Reflect:null,Qa=Ja&&"function"==typeof Ja.apply?Ja.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};qa=Ja&&"function"==typeof Ja.ownKeys?Ja.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var Za=Number.isNaN||function(e){return e!=e};function er(){er.init.call(this)}er.EventEmitter=er,er.prototype._events=void 0,er.prototype._eventsCount=0,er.prototype._maxListeners=void 0;var tr=10;function nr(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function ir(e){return void 0===e._maxListeners?er.defaultMaxListeners:e._maxListeners}function ar(e,t,n,i){var a,r,o,s;if(nr(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=ir(e))>0&&o.length>a&&!o.warned){o.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=o.length,s=d,console&&console.warn&&console.warn(s)}return e}function rr(){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 or(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=rr.bind(i);return a.listener=n,i.wrapFn=a,a}function sr(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):ur(a,a.length)}function dr(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 ur(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}Object.defineProperty(er,"defaultMaxListeners",{enumerable:!0,get:function(){return tr},set:function(e){if("number"!=typeof e||e<0||Za(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");tr=e}}),er.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},er.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||Za(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},er.prototype.getMaxListeners=function(){return ir(this)},er.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)Qa(o,this,t);else{var s=o.length,d=ur(o,s);for(let e=0;e<s;++e)Qa(d[e],this,t)}return!0},er.prototype.addListener=function(e,t){return ar(this,e,t,!1)},er.prototype.on=er.prototype.addListener,er.prototype.prependListener=function(e,t){return ar(this,e,t,!0)},er.prototype.once=function(e,t){return nr(t),this.on(e,or(this,e,t)),this},er.prototype.prependOnceListener=function(e,t){return nr(t),this.prependListener(e,or(this,e,t)),this},er.prototype.removeListener=function(e,t){var n,i,a,r,o;if(nr(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},er.prototype.off=er.prototype.removeListener,er.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},er.prototype.listeners=function(e){return sr(this,e,!0)},er.prototype.rawListeners=function(e){return sr(this,e,!1)},er.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):dr.call(e,t)},er.prototype.listenerCount=dr,er.prototype.eventNames=function(){return this._eventsCount>0?qa(this._events):[]};class lr{constructor(){this.emitter=new er}static getInstance(){return this.instance||(this.instance=new lr),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)}listeners(e){return this.emitter.listeners(e)}listenerCount(e){return this.emitter.listenerCount(e)}}const hr={"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"},cr={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"},mr={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},fr={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"},gr={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class pr{static getFirstMatch(e,t){const n=t.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,t){const n=t.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(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}}static getMacOSVersionName(e){const t=e.split(".").splice(0,2).map((e=>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}}static getAndroidVersionName(e){const t=e.split(".").splice(0,2).map((e=>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}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,n=!1){const i=pr.getVersionPrecision(e),a=pr.getVersionPrecision(t);let r=Math.max(i,a),o=0;const s=pr.map([e,t],(e=>{const t=r-pr.getVersionPrecision(e),n=e+new Array(t+1).join(".0");return pr.map(n.split("."),(e=>new Array(20-e.length).join("0")+e)).reverse()}));for(n&&(o=r-Math.min(i,a)),r-=1;r>=o;){if(s[0][r]>s[1][r])return 1;if(s[0][r]===s[1][r]){if(r===o)return 0;r-=1}else if(s[0][r]<s[1][r])return-1}}static map(e,t){const n=[];let i;if(Array.prototype.map)return Array.prototype.map.call(e,t);for(i=0;i<e.length;i+=1)n.push(t(e[i]));return n}static find(e,t){let n,i;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,i=e.length;n<i;n+=1){const i=e[n];if(t(i,n))return i}}static assign(e,...t){const n=e;let i,a;if(Object.assign)return Object.assign(e,...t);for(i=0,a=t.length;i<a;i+=1){const e=t[i];if("object"==typeof e&&null!==e){Object.keys(e).forEach((t=>{n[t]=e[t]}))}}return e}static getBrowserAlias(e){return hr[e]}static getBrowserTypeByAlias(e){return cr[e]||""}}const vr=/version\/(\d+(\.?_?\d+)+)/i,yr=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=pr.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||pr.getFirstMatch(vr,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=pr.getFirstMatch(vr,e)||pr.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=pr.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||pr.getFirstMatch(vr,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=pr.getFirstMatch(vr,e)||pr.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=pr.getFirstMatch(vr,e)||pr.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=pr.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||pr.getFirstMatch(vr,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=pr.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||pr.getFirstMatch(vr,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=pr.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||pr.getFirstMatch(vr,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=pr.getFirstMatch(vr,e)||pr.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=pr.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||pr.getFirstMatch(vr,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=pr.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||pr.getFirstMatch(vr,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=pr.getFirstMatch(vr,e)||pr.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=pr.getFirstMatch(vr,e)||pr.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=pr.getFirstMatch(vr,e)||pr.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=pr.getFirstMatch(vr,e)||pr.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=pr.getFirstMatch(vr,e)||pr.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=pr.getFirstMatch(vr,e)||pr.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=pr.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||pr.getFirstMatch(vr,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=pr.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||pr.getFirstMatch(vr,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=pr.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=pr.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=pr.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=pr.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=pr.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=pr.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=pr.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=pr.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=pr.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=pr.getFirstMatch(vr,e)||pr.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=pr.getFirstMatch(vr,e)||pr.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=pr.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=pr.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||pr.getFirstMatch(vr,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=pr.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||pr.getFirstMatch(vr,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=pr.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=pr.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=pr.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=pr.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||pr.getFirstMatch(vr,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=pr.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=pr.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=pr.getFirstMatch(vr,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=pr.getFirstMatch(vr,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=pr.getFirstMatch(vr,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:pr.getFirstMatch(t,e),version:pr.getSecondMatch(t,e)}}}];var br=[{test:[/Roku\/DVP/],describe(e){const t=pr.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:fr.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=pr.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:fr.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=pr.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=pr.getWindowsVersionName(t);return{name:fr.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:fr.iOS},n=pr.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=pr.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=pr.getMacOSVersionName(t),i={name:fr.MacOS,version:t};return n&&(i.versionName=n),i}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=pr.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:fr.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=pr.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=pr.getAndroidVersionName(t),i={name:fr.Android,version:t};return n&&(i.versionName=n),i}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=pr.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:fr.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=pr.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||pr.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||pr.getFirstMatch(/\bbb(\d+)/i,e);return{name:fr.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=pr.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:fr.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=pr.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:fr.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:fr.Linux})},{test:[/CrOS/],describe:()=>({name:fr.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=pr.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:fr.PlayStation4,version:t}}}],wr=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(e){const t=pr.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:mr.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:mr.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:mr.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:mr.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:mr.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:mr.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:mr.tablet})},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=pr.getFirstMatch(/(ipod|iphone)/i,e);return{type:mr.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:mr.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:mr.mobile})},{test:e=>"blackberry"===e.getBrowserName(!0),describe:()=>({type:mr.mobile,vendor:"BlackBerry"})},{test:e=>"bada"===e.getBrowserName(!0),describe:()=>({type:mr.mobile})},{test:e=>"windows phone"===e.getBrowserName(),describe:()=>({type:mr.mobile,vendor:"Microsoft"})},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:()=>({type:mr.tablet})},{test:e=>"android"===e.getOSName(!0),describe:()=>({type:mr.mobile})},{test:e=>"macos"===e.getOSName(!0),describe:()=>({type:mr.desktop,vendor:"Apple"})},{test:e=>"windows"===e.getOSName(!0),describe:()=>({type:mr.desktop})},{test:e=>"linux"===e.getOSName(!0),describe:()=>({type:mr.desktop})},{test:e=>"playstation 4"===e.getOSName(!0),describe:()=>({type:mr.tv})},{test:e=>"roku"===e.getOSName(!0),describe:()=>({type:mr.tv})}],kr=[{test:e=>"microsoft edge"===e.getBrowserName(!0),describe(e){if(/\sedg\//i.test(e))return{name:gr.Blink};const t=pr.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:gr.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:gr.Trident},n=pr.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:gr.Presto},n=pr.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:gr.Gecko},n=pr.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:gr.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:gr.WebKit},n=pr.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class Mr{constructor(e,t=!1){if(null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=pr.find(yr,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const e=pr.find(br,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};const e=pr.find(wr,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=pr.find(kr,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return pr.assign({},this.parsedResult)}satisfies(e){const t={};let n=0;const i={};let a=0;if(Object.keys(e).forEach((r=>{const o=e[r];"string"==typeof o?(i[r]=o,a+=1):"object"==typeof o&&(t[r]=o,n+=1)})),n>0){const e=Object.keys(t),n=pr.find(e,(e=>this.isOS(e)));if(n){const e=this.satisfies(t[n]);if(void 0!==e)return e}const i=pr.find(e,(e=>this.isPlatform(e)));if(i){const e=this.satisfies(t[i]);if(void 0!==e)return e}}if(a>0){const e=Object.keys(i),t=pr.find(e,(e=>this.isBrowser(e,!0)));if(void 0!==t)return this.compareVersion(i[t])}}isBrowser(e,t=!1){const n=this.getBrowserName().toLowerCase();let i=e.toLowerCase();const a=pr.getBrowserTypeByAlias(i);return t&&a&&(i=a.toLowerCase()),i===n}compareVersion(e){let t=[0],n=e,i=!1;const 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(pr.compareVersions(a,n,i))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some((e=>this.is(e)))}}class Sr{static getParser(e,t=!1){if("string"!=typeof e)throw new Error("UserAgent should be a string");return new Mr(e,t)}static parse(e){return new Mr(e).getResult()}static get BROWSER_MAP(){return cr}static get ENGINE_MAP(){return gr}static get OS_MAP(){return fr}static get PLATFORMS_MAP(){return mr}}const Pr={tablet:"tablet",mobile:"phone",tv:"television",desktop:"desktop"},Er=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:d,language:"en"};const t=Sr.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:d,language:window.navigator.language};if(n.type&&(i.form_factor=Pr[n.type]),n.model&&(i.device_model=n.model),e&&e.length>0){const t=(e=>{const t=e.find((e=>e.includes(J))),n={platform:"",version:""};if(t){const e=t.split(Q);n.platform=e[1],n.version=e[2]}return n})(e);i.extended_platform=t.platform,i.extended_platform_version=t.version}return i},Tr=()=>{const e=Ta.getNamiConfig();if(e?.formFactor)return e.formFactor;if("undefined"==typeof window)return Pr.desktop;const t=Sr.getParser(window.navigator.userAgent).getPlatform();return t.type?Pr[t.type]:Pr.desktop};class Ar{constructor(e){this.currentFormFactor=e}async fetchCampaignRules(e){const t=Ta.getDevice();let n;return n=t?.id?await this.getCampaigns(t.id):await this.getAnonymousCampaigns(),n=n?.filter((e=>e.form_factors.some((e=>e.form_factor===this.currentFormFactor)))),n=n?.filter((t=>{const n=e.find((e=>e.id==t.paywall));if(n)return t})),Ta.setCampaignRules(T,n),this.invokeAvailableCampaignsResponseHandler(),n}invokeAvailableCampaignsResponseHandler(e){const t=lr.getInstance().listeners(me);if(!e){const t=Ta.getCampaignRules(T)??[],n=Ta.getCampaignRules(I)??[];e=Ea(Ii([...t,...n]),"rule")}t.forEach((t=>{t(e)}))}async getAnonymousCampaigns(){const e="campaign_rules/";let t=null;try{t=await Va.instance.fetchAPI(e)}catch(t){throw Ee.error($a(t.status,e)),t}return t?.results||[]}async getCampaigns(e){const t=`device/${e}/campaign_rules/`;let n;try{n=await Va.instance.fetchAPI(t)}catch(e){if(n=this.fallbackData(),!n)throw Ee.error($a(e.status,t)),e}return n?.results||[]}fallbackData(){const e=Ta.getCampaignRules(T)||Ta.getCampaignRules(I);return e?{count:e.length,results:e}:null}}Ar.instance=new Ar(Tr());class xr{async createOrUpdateDevice(e){const t=Ta.getDevice();return t?.id?this.isEqualDevices(t,e)?t:this.updateDevice(t.id,e):this.createDevice(e)}async createDevice(e){const t=await this.requestAPIData("device/",e);return t&&Ta.setDevice(t),t}async updateDevice(e,t){const n=await this.requestAPIData(`device/${e}/`,t,"PUT");return n&&Ta.setDevice(n),n}async updateDeviceField(e,t){const n={[e]:t},i=Ta.getDevice();if(!i?.id)throw new La;const a=await this.requestAPIData(`device/${i.id}/`,n,"PATCH");return a&&Ta.setDevice(a),a}async requestAPIData(e,t,n="POST"){let i;try{i=await Va.instance.requestBodyAPI(e,t,n,!1,re)}catch(t){if(t instanceof Ca)throw t;if(i=Ta.getDevice(),!i)return Ee.error($a(t.status,e)),null}return i}isEqualDevices(e,t){const n={...e,...t};return Ma(Object.keys(e).reduce(((e,t)=>(e[t]=n[t],e)),{}),e)}}xr.instance=new xr;class Cr{async fetchProducts(){if(Ga(Ua.THIRD_PARTY_TRANSACTIONS))return[];let e;try{e=await Va.instance.fetchAPI("products/")}catch(t){if(e=this.fallbackData(),!e)throw Ee.error($a(t.status,"products/")),t}return e?.results&&Ta.setProducts(x,e.results),e?.results||[]}fallbackData(){const e=Ta.getProducts(x)||Ta.getProducts(_);return e?{count:e.length,results:e}:null}}Cr.instance=new Cr;class Lr{async fetchPaywalls(){const e=Ta.getDevice();let t;return t=e?.id?await this.getPaywalls(e.id):await this.getAnonymousPaywalls(),t&&Ta.setPaywalls(A,t),t}async getAnonymousPaywalls(e=d){const t=`paywalls/?sdk_version=${e}`;let n=null;try{n=await Va.instance.fetchAPI(t)}catch(e){throw Ee.error($a(e.status,t)),e}return n?.results||[]}async getPaywalls(e){const t=`device/${e}/paywalls/`;let n;try{n=await Va.instance.fetchAPI(t)}catch(e){if(n=this.fallbackData(),!n)throw Ee.error($a(e.status,t)),e}return n?.results||[]}fallbackData(){const e=Ta.getPaywalls(A)||Ta.getPaywalls(R);return e?{count:e.length,results:e}:null}}Lr.instance=new Lr;class Dr{async fetchConfig(){let e;try{e=await Va.instance.fetchAPI("config/")}catch(t){if(e=Ta.getAppConfig(E)||Ta.getAppConfig(D),!e)throw Ee.error($a(t.status,"config/")),t}return e&&Ta.setAppConfig(E,e),e}}Dr.instance=new Dr;class Ir{async startSession(){if(Ta.getAnonymousMode())Ee.debug("Skipping session start call - anonymous mode");else try{await Va.instance.startSession(new Date)}catch(e){console.error("error on start session: ",e)}}}Ir.instance=new Ir;const Rr=e=>"subscription"===e;function _r(e){const t=function(e){if(!e)return[];const t=e.offers.filter((e=>"promo"===e.offer_type));return Nr(t,e.subscription_period)}(e).find((e=>0===e.priceAmountMicros));return t?.billingPeriod}function Wr(e){if(!e)return[];return Nr(e.offers.filter((e=>"default"===e.offer_type)),e.subscription_period)}function Nr(e,t){return e.map((e=>Or(e,t)))}function Or(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:jr(r).format(a)}}function Fr(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,d]=a.slice(1).map((e=>parseInt(e))),u=(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 u(d,t,n,i,"day","days");case"W":return u(s,t,n,i,"week","weeks");case"M":return u(o,t,n,i,"month","months");case"Y":return u(r,t,n,i,"year","years")}return null}function jr(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 zr=(e,t,n)=>e&&t&&n?n.format(e-t):null,$r=(e,t,n,i)=>{if(e&&t&&n&&i){const a=100*(1-e/(n/i*t));return`${Math.round(a)}%`}return null},Hr=(e,t)=>{if(""==t)return;const n=parseInt(t);return n>=0&&n<e?.length?e[n]:e?.find((e=>e.sku_ref_id===t))},Ur=e=>Gr(e.priceAmountMicros)/Br(e.billingPeriod),Br=e=>{let t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},Gr=e=>e/1e6;function Xr(e){return parseFloat((Math.round(e)/100).toFixed(2))}const Yr={price:"$XX.XX",name:"",title:"",description:"",duration:"XXXXX",durationSingular:"XXXXX",period:"XXXXX",periodNumber:"X",freeTrialDuration:"XXXXX",freeTrialDurationSingular:"XXXXX",freeTrialPeriod:"XXXXX",freeTrialPeriodNumber:"X",pricePerMonth:"$XX.XX",pricePerMonthRounded:"$XX",periodInMonths:"XXXXX",durationInMonths:"XXXXX",durationInMonthsSingular:"XXXXX",periodNumberInMonths:"X",percentagePriceDifferenceFromSku:"XX%",priceDifferenceFromSku:"$XX.XX",promoEligible:!1,freeTrialEligible:!1,promo:"XXXXX",promoCode:"XXXXX",promoPrice:"$XX.XX",promoPeriod:"XXXXX",promoPeriodNumber:"X",promoDuration:"XXXXX",promoDurationSingular:"XXXXX",introEligible:!1,pricePerDay:"$X.XX",pricePerWeek:"$X.XX",pricePerWeekRounded:"$XX",introductoryPrice:"$XX.XX",introductoryPeriod:"XXXXX",introductoryPeriodNumber:"X",introductoryDuration:"XXXXX",introductoryDurationSingular:"XXXXX",introductoryPricePerMonth:"$XX.XX",introductoryPricePerMonthRounded:"$XX",invalid:!1,unavailable:!1},Kr=(e,t,n,i=[])=>{const a=Yr[e];if(!t)return a;return(0,{price:()=>Vr(t),name:()=>t?.name,title:()=>t?.name,description:()=>t?.description,duration:()=>qr(t),durationSingular:()=>qr(t,!0),period:()=>qr(t,!1,!0),periodNumber:()=>qr(t,!1,!1,!0),freeTrialDuration:()=>Jr(t),freeTrialDurationSingular:()=>Jr(t,!0),freeTrialPeriod:()=>Jr(t,!1,!0),freeTrialPeriodNumber:()=>Jr(t,!1,!1,!0),pricePerMonth:()=>Qr(t),pricePerMonthRounded:()=>Qr(t,!0),periodInMonths:()=>Zr(t),durationInMonths:()=>eo(t),durationInMonthsSingular:()=>eo(t,!0),periodNumberInMonths:()=>to(t),percentagePriceDifferenceFromSku:()=>no(t,n,i),priceDifferenceFromSku:()=>io(t,n,i),promoEligible:()=>null===ao(t)&&null!==ro(t,n),freeTrialEligible:()=>null!==ao(t),promo:()=>ro(t,n)?.offer_ref_id,promoCode:()=>"XXXXX",promoPrice:()=>oo(t,n)?.formattedPrice,promoPeriod:()=>so(t,n,!1,!0),promoPeriodNumber:()=>so(t,n,!1,!1,!0),promoDuration:()=>so(t,n),promoDurationSingular:()=>so(t,n,!0),introEligible:()=>!1,pricePerDay:()=>uo(t),pricePerWeek:()=>lo(t),pricePerWeekRounded:()=>lo(t,!0),introductoryPrice:()=>ho(t,n),introductoryPeriod:()=>co(t,n,!1,!0),introductoryPeriodNumber:()=>co(t,n,!1,!1,!0),introductoryDuration:()=>co(t,n),introductoryDurationSingular:()=>co(t,n,!0),introductoryPricePerMonth:()=>mo(t,n),introductoryPricePerMonthRounded:()=>mo(t,n,!0),invalid:()=>!1,unavailable:()=>!1}[e])()??a??null},Vr=e=>{const t=Wr(e);return t&&t.length?t[0].formattedPrice:null},qr=(e,t,n,i)=>Fr(function(e){if(Rr(e?.product_type)){const t=Wr(e);if(t.length>0)return t[0].billingPeriod}}(e),t,n,i),Jr=(e,t,n,i)=>Fr(_r(e),t,n,i),Qr=(e,t)=>{const n=Wr(e);if(!n||0===n.length)return null;const i=Ur(n[0]);return i?jr(n[0].priceCurrencyCode).format(t?Math.round(i):i):null},Zr=e=>{const t=Wr(e);return"P1Y"===t[0].billingPeriod&&(t[0].billingPeriod="P12M"),t&&t.length?Fr(t[0].billingPeriod):null},eo=(e,t,n,i)=>{const a=Wr(e);return a&&0!==a.length?("P1Y"===a[0].billingPeriod&&(a[0].billingPeriod="P12M"),Fr(a[0].billingPeriod,t,n,i)):null},to=e=>{if(!e)return 0;const t=Wr(e);return t&&t.length?Br(t[0].billingPeriod):0},no=(e,t,n=[])=>{const i=Wr(e);if(!i||0===i.length)return null;const a=Hr(n,t??"")?.product_details;if(!t||!a)return $r(Xr(i[0].priceAmountMicros),to(e));const r=Wr(a);return $r(Xr(i[0].priceAmountMicros),to(e),r?.length>0?Xr(r[0].priceAmountMicros):0,to(a))},io=(e,t,n=[])=>{const i=Wr(e);if(!i||0===i.length)return null;const a=Hr(n,t??"")?.product_details;if(!t||!a)return zr(Ur(i[0]));const r=Wr(a);return zr(Ur(i[0]),Ur(r[0]),jr(r[0].priceCurrencyCode))},ao=e=>_r(e),ro=(e,t)=>{if(!e)return null;const n=e.offers.filter((e=>"promo"===e.offer_type));if(!t)return n[0];const i=n[parseInt(t)];return i||(n.find((e=>e.offer_ref_id===t))||null)},oo=(e,t)=>{if(!e)return null;return Or(ro(e,t),e.subscription_period)},so=(e,t,n,i,a)=>{const r=oo(e,t);return Fr(r?.billingPeriod,n,i,a)},uo=(e,t)=>{const n=Wr(e);if(!n||0===n.length)return null;const i=Gr(n[0].priceAmountMicros)/(e=>{const t=Br(e);return t?30.437*t:1})(n[0].billingPeriod);return i?jr(n[0].priceCurrencyCode).format(i):null},lo=(e,t)=>{const n=Wr(e);if(!n||0===n.length)return null;const i=Gr(n[0].priceAmountMicros)/(e=>{const t=Br(e);return t?52*t/12:1})(n[0].billingPeriod);return i?jr(n[0].priceCurrencyCode).format(t?Math.round(i):i):null},ho=(e,t)=>{const n=fo(e,t);return n?.formattedPrice||null},co=(e,t,n,i,a)=>{const r=fo(e,t);return Fr(r?.billingPeriod,n,i,a)},mo=(e,t,n)=>{const i=fo(e,t);if(!i)return;const a=Gr(i.priceAmountMicros),r=Br(i.billingPeriod),o=n?Math.round(a/r):a/r;return jr(i.priceCurrencyCode).format(o)},fo=(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],Or(n,e.subscription_period)};function go(e,t,n){const i=t?.find((e=>n===e.id))?.products||[];return i.map((t=>{t.product_details=yo(e,t.sku_ref_id||"")})),i.forEach((e=>{po(e.product_details,e,i)})),i||[]}function po(e,t,n){if(!t)return{};const i=t.variables;return i&&Object.keys(i).forEach((t=>{var a;"string"==typeof i[t]&&i[t].includes(we)&&(i[t]=i[hi(t)]=(a=i[t]).replace(ve,((t,i)=>{const r=ve.exec(a)?.slice(1)||[];i=r[0]??i;const o=r[1]?.replace(":","")??"";return Kr(i,e,o,n)})))})),{...t,...i}}function vo(e,t,n){return bo(t,n)?.some((()=>1==Kr("freeTrialEligible",yo(e,""))))??!1}function yo(e=[],t){return e.find((e=>e.product_ref_id===t))||null}function bo(e,t){const n=e?.filter((e=>t?.some((t=>t===e.ref)))),i=n?.filter((t=>e.find((e=>e.products?.some((e=>e.id===t.id))))))?.map((e=>e.products))[0];return i}function wo(e){return!e||"object"==typeof e&&0==Object.keys(e).length}const ko={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:"",fullScreenPresentation:!1,launch:{productGroups:[],customAttributes:{}},sku:{},orientation:"portrait",focusedState:!1,platformId:"",mediaList:{},skuItems:[],customer:{},hasNotch:!1,purchaseInProgress:!1,formFactor:"desktop"};const Mo=new class{constructor(){this.host=null,this.state=ko,this.subscribers=new Set}subscribe(e){return this.subscribers.add(e),()=>this.unsubscribe(e)}unsubscribe(e){this.subscribers.delete(e)}hostConnected(){}hostDisconnected(){this.subscribers.forEach((e=>this.unsubscribe(e)))}setState(e){this.state=e,this.subscribers.forEach((e=>e())),this.host&&this.host.requestUpdate()}setProductDetails(e){this.productDetails=e}getProductDetails(){return this.productDetails}setCurrentGroupId(e){this.setState({...this.state,currentGroupId:e})}getCurrentGroupId(){return this.state.currentGroupId}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,selectedPaywall:e,selectedCampaign:n};if(!wo(e)){const n=e.template?.initialState;i={...i,...n};const s=function(e,t){const n=t?.productGroups?.length?t.productGroups:e?.map((e=>e.ref))||[],i={customAttributes:t?.customAttributes??{},productGroups:n},a=t?.customObject;return a&&(i.customObject=a),i}(n.groups,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 d=go(this.productDetails,e.sku_menus,i.currentGroupId);i.skuItems=d,i.launch=s,i.anySkuHasTrialOffer=vo(this.productDetails,e.sku_menus,s.productGroups??[]),i.anySkuHasPromoOffer=(a=this.productDetails,r=e.sku_menus,o=s.productGroups??[],!vo(a,r,o)&&(bo(r,o)?.some((()=>1==Kr("promoEligible",yo(a,""))))??!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 po(yo(e,a?.sku_ref_id??""),a,i)}(this.productDetails,n,e.sku_menus,d)}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}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})}};class So{constructor(){this.refIdToPurchasedSKUs={},this.refIdToRelatedSKUs={},this.refIdToActivePurchases={}}}So.instance=new So;const Po=()=>Ea(Ii([...Ta.getNamiEntitlements(L),...Ta.getNamiEntitlements(W)]),"referenceId"),Eo=()=>{lr.getInstance().emit(ge,Po())};function To(e){return{id:e.id,skuId:e.sku_ref_id,name:e.name,type:e.sku_type,entitlements:e.entitlements,productDetails:"product_details"in e?e.product_details:null}}class Ao{constructor(){}async fetchActiveEntitlements(){let e=null;if(Ta.getAnonymousMode()||Ga(Ua.THIRD_PARTY_TRANSACTIONS)||!Ga(Ua.ENTITLEMENT_MANAGEMENT))Ta.getAnonymousMode()&&Ee.debug("Skipping active entitlements update - anonymous mode"),Ga(Ua.THIRD_PARTY_TRANSACTIONS)&&Ee.debug("Skipping active entitlements update - paywalls-only mode"),Ga(Ua.ENTITLEMENT_MANAGEMENT)||Ee.debug("Skipping active entitlements update - no entitlement_management capability");else{const t=Ta.getDevice();if(t?.id){const n=await this.getAPIEntitlements(t.id);e=n?.results,e&&(Ta.setActiveEntitlements(C,e),this.invokeActiveEntitlementsHandler(e))}}return e}async getAPIEntitlements(e){const t=`device/${e}/active_entitlements/`;let n={};try{n=await Va.instance.fetchAPI(t)}catch(e){throw Ee.error($a(e.status,t)),e}return n}invokeActiveEntitlementsHandler(e){if(Xa()){(e=>{Ta.setNamiEntitlements(L,e);const t=Ta.getNamiEntitlements(W),n=new Set(e.map((e=>e.referenceId))),i=t.filter((e=>{const t=n.has(e.referenceId);return t&&Ee.debug(`Server granted verified entitlement for ${e.referenceId}, so replacing provisional entitlement grant.`),!t}));i.length!==t.length&&Ta.setNamiEntitlements(W,i),Eo()})(e.map((e=>(e=>{const t=e.entitlement_ref_id;return{name:e.name||"",desc:e.description||"",namiId:"",referenceId:t,relatedSkus:So.instance.refIdToRelatedSKUs[t]||[],activePurchases:So.instance.refIdToActivePurchases[t]||[],purchasedSkus:So.instance.refIdToPurchasedSKUs[t]||[],expires:e.expires?new Date(e.expires).valueOf():0}})(e))))}}}var xo;Ao.instance=new Ao,exports.NamiCampaignRuleType=void 0,(xo=exports.NamiCampaignRuleType||(exports.NamiCampaignRuleType={})).DEFAULT="default",xo.LABEL="label",xo.UNKNOWN="unknown",xo.URL="url";const Co=()=>Ea(Ii([...Ta.getPaywalls(A)??[],...Ta.getPaywalls(R)??[]]),"id"),Lo=e=>{try{return Boolean(new URL(e))}catch{return!1}},Do=()=>Ea(Ii([...Ta.getCampaignRules(T)??[],...Ta.getCampaignRules(I)??[]]),"rule"),Io=(e,t)=>{const n=Ii(Do().filter((n=>t?n.type==t&&n.value==e:n.type==exports.NamiCampaignRuleType.DEFAULT))),i=Co().find((e=>n.find((t=>t.paywall===e.id)))),a=n.find((e=>e.paywall===i?.id));return{campaign:a,paywall:i}};class Ro{async fetchCustomerJourneyState(){if(Ta.getAnonymousMode())return Ee.debug("Skipping customer journey state update - anonymous mode"),null;const e=Ta.getDevice();if(!e?.id)return null;const t=`device/${e?.id}/profile/`;let n=null;try{n=await Va.instance.fetchAPI(t)}catch(e){throw Ee.error($a(e.status,t)),e}return n?(Ta.setCustomerJourneyState(n.customer_journey_state),n.customer_journey_state):null}}Ro.instance=new Ro;class _o{async init(e){this.setInitialValues(e),await this.initAndFetchRequiredData(e)}setInitialValues(e){Ta.clearSessionId(),Ta.setNamiConfig(e),Ta.setLanguageCode(e.namiLanguageCode);const t=e.initialConfig;if(t.campaign_rules&&Ta.setCampaignRules(I,t.campaign_rules),t.appConfig||t.platform_config){const e=t?.appConfig||t?.platform_config;e&&Ta.setAppConfig(D,e)}t?.paywalls&&Ta.setPaywalls(R,t.paywalls),t?.products&&Ta.setProducts(_,t.products)}async initAndFetchRequiredData(e){Dr.instance.fetchConfig();let t=null;if(!Ta.getAnonymousMode()){const n=Er(e.namiCommands);e.formFactor&&(n.form_factor=e.formFactor),t=await xr.instance.createOrUpdateDevice(n)}const n=e.formFactor??t?.form_factor??Tr();Mo.setFormFactor(n),Ar.instance.currentFormFactor=n;const i=Promise.all([Cr.instance.fetchProducts(),Ro.instance.fetchCustomerJourneyState(),Ao.instance.fetchActiveEntitlements(),Lr.instance.fetchPaywalls().then((e=>Ar.instance.fetchCampaignRules(e)))]),a=e.initialConfig;a.campaign_rules?.length&&a.paywalls?.length||await i,i.then((()=>this.reRenderPaywall())),Ir.instance.startSession()}reRenderPaywall(){if("undefined"==typeof document)return;const{launchValue:e,launchType:t}=Mo.state,{campaign:n,paywall:i}=Io(e,t),a=document.querySelector("nami-paywall");a&&i&&n&&a.setPaywallData(i,n)}}var Wo,No;_o.instance=new _o;class Oo{constructor(){Wo.set(this,!1)}get isInitialized(){return s(this,Wo,"f")||null!=Ta.getNamiConfig()}static async configure(e){if(!e.appPlatformID)throw new Ca;return this.setInitialConfig(e),await Oo.instance.initializeSDK(e)}static setInitialConfig(e){let t={};if(e.initialConfig)if("string"==typeof e.initialConfig)try{t=JSON.parse(e.initialConfig)}catch{Ee.error("Failed to parse NamiConfiguration.initialConfig"),t={}}else t=e.initialConfig;else t={};e.initialConfig=t}async initializeSDK(e){let t=!1,n=!1;const i=s(this,Wo,"f")?Ta.getNamiConfig():null;if(Ee.setLogger(e.logLevel),null!==i){if(Ma(e,i))return Ee.warn("Nami SDK is already configured, ignoring this configure call."),{sdkInitialized:!0,configureState:ce};n=!0;const a=Ba(e.namiCommands),r=Ba(i.namiCommands);e.appPlatformID==i.appPlatformID&&a==r||(t=!0),e.namiLanguageCode===i.namiLanguageCode&&e.logLevel==i.logLevel||(n=!0)}t&&(Ee.info("SDK full reconfigure called"),Ta.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,Wo,!0,"f"),Va.configure(e),await _o.instance.init(e),Ee.info("SDK successfully initialized!");return{sdkInitialized:!0,configureState:n||t?he:le}}}Wo=new WeakMap,Oo.instance=new Oo,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"}(No||(No={}));class Fo{constructor(){this.load()}setExternalId(e){return this.externalId=e,this}getExternalId(){return this.externalId}isLoggedIn(){return!!this.externalId}save(){return this.externalId?Ta.setNamiProfile({externalId:this.externalId}):Ta.removeNamiProfile(),this}load(){const e=Ta.getNamiProfile();e&&(this.externalId=e.externalId)}async login(e){const t=await Va.instance.login(e);t.external_id&&Mo.setIsLoggedIn(!0),this.setExternalId(t.external_id).save()}async logout(){await Va.instance.logout(),Mo.setIsLoggedIn(!1),this.setExternalId(void 0).save()}}var jo;Fo.instance=new Fo,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"}(jo||(jo={}));class zo{constructor(){this.emitter=lr.getInstance()}static isLoggedIn(){return Fo.instance.isLoggedIn()}static loggedInId(){return this.instance.isSDKInitialized||Ee.debug(f),Fo.instance.getExternalId()}static async login(e){if(!this.instance.isSDKInitialized){const e=new xa;throw this.invokeStateHandler(jo.LOGIN,!1,e),e}if(this.inAnonymousMode()){const e=new Wa;throw this.invokeStateHandler(jo.LOGIN,!1,e),e}try{await Fo.instance.login(e),await Ao.instance.fetchActiveEntitlements(),this.invokeStateHandler(jo.LOGIN,!0)}catch(e){throw this.invokeStateHandler(jo.LOGIN,!1,e),e}}static async logout(){if(!this.instance.isSDKInitialized){const e=new xa;throw this.invokeStateHandler(jo.LOGOUT,!1,e),e}if(this.inAnonymousMode()){const e=new Wa;throw this.invokeStateHandler(jo.LOGOUT,!1,e),e}try{await Fo.instance.logout(),await Ao.instance.fetchActiveEntitlements(),this.invokeStateHandler(jo.LOGOUT,!0)}catch(e){throw this.invokeStateHandler(jo.LOGOUT,!1,e),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?jo.ANONYMOUS_MODE_ON:jo.ANONYMOUS_MODE_OFF;if(!this.instance.isSDKInitialized){const e=new xa;throw this.invokeStateHandler(t,!1,e),e}if(this.anonymousModeCapability())if(this.inAnonymousMode()!==e)if(e)Ta.setAnonymousMode(e),Ta.resetDevice(),this.refetchConfig(),this.invokeStateHandler(jo.ANONYMOUS_MODE_ON,!0);else{Ta.clearAnonymousMode();const e=Ta.getNamiConfig()?.namiCommands;await xr.instance.createOrUpdateDevice(Er(e)),this.refetchConfig(),this.invokeStateHandler(jo.ANONYMOUS_MODE_OFF,!0)}else{const n=e?new Ra:new _a;this.invokeStateHandler(t,!1,n)}else Ee.warn("Anonymous mode feature is not enabled for your Nami account. Contact support@nami.ml for details.")}static inAnonymousMode(){return!!this.instance.isSDKInitialized&&Ta.getAnonymousMode()}static setCustomerAttribute(e,t){if(!this.instance.isSDKInitialized)throw new xa;Ta.setCustomerAttribute(e,t),Ga(Ua.PAYWALL_PERSONALIZATION)?(Mo.setCustomerAttribute({[e]:t}),Ee.debug(`This customer attribute you set is now available for paywall personalization using the smart text variable: ${e}`)):Ee.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 xa;const t=Ta.getCustomerAttribute(e);return null!=t?Ga(Ua.PAYWALL_PERSONALIZATION)?Ee.debug(`Found customer attribute. ${e} is available for paywall personalization on this device.`):Ee.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.`):Ee.warn(`No ${e} customer attribute found.`),t}static getAllCustomerAttributes(){if(!this.instance.isSDKInitialized)throw new xa;return Ta.getAllCustomerAttributes()}static clearCustomerAttribute(e){if(!this.instance.isSDKInitialized)throw new xa;Ta.clearCustomerAttribute(e)?(Mo.removeCustomerAttribute(e),Ee.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.`)):Ee.warn(`No value to clear for attribute ${e}.`)}static clearAllCustomerAttributes(){if(!this.instance.isSDKInitialized)throw new xa;Ta.getAllCustomerAttributesKeys().forEach((e=>{Mo.removeCustomerAttribute(e)})),Ta.clearAllCustomerAttributes(),Ee.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 xa;return Ta.getCustomerJourneyState()}static deviceId(){return this.instance.isSDKInitialized?Ta.getDevice()?.id??k:k}static registerJourneyStateHandler(e){if(Xa("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 Oo.instance.isInitialized}static async updateCustomerDataPlatformId(e){if(!this.instance.isSDKInitialized){const e=new xa;throw this.invokeStateHandler(jo.CUSTOMER_DATA_PLATFORM_ID_SET,!1,e),e}if(this.inAnonymousMode()){const e=new Na;throw this.invokeStateHandler(jo.CUSTOMER_DATA_PLATFORM_ID_SET,!1,e),e}try{await xr.instance.updateDeviceField("customer_data_platform_id",e),this.invokeStateHandler(jo.CUSTOMER_DATA_PLATFORM_ID_SET,!0)}catch(e){this.invokeStateHandler(jo.CUSTOMER_DATA_PLATFORM_ID_SET,!1,e)}}static anonymousModeCapability(){if(!this.instance.isSDKInitialized)return!1;const e=Ga(Ua.ANONYMOUS_MODE_CAPABILITY),t=Ga(Ua.THIRD_PARTY_TRANSACTIONS);return e&&t}static async refetchConfig(){this.instance.isSDKInitialized&&await Promise.all([Cr.instance.fetchProducts(),Lr.instance.fetchPaywalls().then((e=>Ar.instance.fetchCampaignRules(e)))])}}zo.instance=new zo;class $o{constructor(){this.emitter=lr.getInstance()}static allPaywalls(){if(!this.instance.sdkInitialized)throw new xa;return Co()}static setProductDetails(e){this.instance.productDetails=e,Mo.setProductDetails(e)}static registerSignInHandler(e){return this.instance.emitter.addListener(No.PAYWALL_SIGNIN_REQUESTED,e),()=>{this.instance.emitter.removeListener(No.PAYWALL_SIGNIN_REQUESTED,e)}}static registerCloseHandler(e){return this.instance.emitter.addListener(No.PAYWALL_CLOSE_REQUESTED,e),()=>{this.instance.emitter.removeListener(No.PAYWALL_CLOSE_REQUESTED,e)}}static registerDeeplinkActionHandler(e){return this.instance.emitter.addListener(No.PAYWALL_DEEPLINK_ACTION,e),()=>{this.instance.emitter.removeListener(No.PAYWALL_DEEPLINK_ACTION,e)}}static registerBuySkuHandler(e){return Xa()&&Ee.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(No.REGISTER_BUY_SKU,e),()=>{this.instance.emitter.removeListener(No.REGISTER_BUY_SKU,e)}}static registerRestoreHandler(e){return this.instance.emitter.addListener(No.PAYWALL_RESTORE_REQUESTED,e),()=>{this.instance.emitter.removeListener(No.PAYWALL_RESTORE_REQUESTED,e)}}static async buySkuComplete(e){if(Mo.setPurchaseInProgress(!1),zo.inAnonymousMode())return void Ee.debug("Skipping purchase validation - anonymous mode");const t=Ta.getSessionId(),n=Ta.getPurchaseImpression();if(n){try{await(async e=>{if(Ta.getAnonymousMode())Ee.info("Skipping transaction post - anonymous mode");else try{await Va.instance.postConversion(e)}catch(e){Ee.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){Ee.error("Error posting conversion",e)}if(!Ga(Ua.THIRD_PARTY_TRANSACTIONS))try{await Va.instance.purchaseValidation({app_env:"production",payload:"",sku:e.skuId})}catch(e){Ee.error("Error validating purchase",e)}}else Ee.debug("Not sending paywall conversion call complete due to unknown impression")}static buySkuCancel(){Ga(Ua.THIRD_PARTY_TRANSACTIONS)?Mo.setPurchase(!1):Ee.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){Lo(e)?(Ee.debug(`NamiPaywallManager: setAppSuppliedVideoDetails received valid url ${e}`),Mo.setAppSuppliedVideoDetails({url:e,name:t})):Ee.debug(`NamiPaywallManager: setAppSuppliedVideoDetails received invalid url ${e}`)}get sdkInitialized(){return Oo.instance.isInitialized}}$o.instance=new $o;const Ho=e.css`
2
2
  :host {
3
3
  -webkit-font-smoothing: antialiased;
4
4
  }
@@ -15,35 +15,34 @@
15
15
  :host p, :host h1, :host h2, :host h3, :host h4, :host h5, :host h6 {
16
16
  overflow-wrap: break-word;
17
17
  }
18
- `;class Mi{constructor(e){this.host=e,this.state=mi.state,e.addController(this),this.handleStateChange=this.handleStateChange.bind(this),mi.subscribe(this.handleStateChange)}handleStateChange(){this.state=mi.state,this.host.requestUpdate()}hostConnected(){}hostDisconnected(){mi.unsubscribe(this.handleStateChange)}}const Ti=e=>(t,n)=>{void 0!==n?n.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)},Ri=globalThis,Di=Ri.ShadowRoot&&(void 0===Ri.ShadyCSS||Ri.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Fi=Symbol(),zi=new WeakMap;let Ui=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==Fi)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(Di&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=zi.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&zi.set(t,e))}return e}toString(){return this.cssText}};const Bi=(e,t)=>{if(Di)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const n of t){const t=document.createElement("style"),r=Ri.litNonce;void 0!==r&&t.setAttribute("nonce",r),t.textContent=n.cssText,e.appendChild(t)}},ji=Di?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new Ui("string"==typeof e?e:e+"",void 0,Fi))(t)})(e):e,{is:Hi,defineProperty:Xi,getOwnPropertyDescriptor:Vi,getOwnPropertyNames:Gi,getOwnPropertySymbols:Wi,getPrototypeOf:Yi}=Object,qi=globalThis,Ki=qi.trustedTypes,Qi=Ki?Ki.emptyScript:"",Zi=qi.reactiveElementPolyfillSupport,Ji=(e,t)=>e,eo={toAttribute(e,t){switch(t){case Boolean:e=e?Qi: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}},to=(e,t)=>!Hi(e,t),no={attribute:!0,type:String,converter:eo,reflect:!1,hasChanged:to};Symbol.metadata??=Symbol("metadata"),qi.litPropertyMetadata??=new WeakMap;class ro 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=no){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(e,n,t);void 0!==r&&Xi(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){const{get:r,set:s}=Vi(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return r?.call(this)},set(t){const i=r?.call(this);s.call(this,t),this.requestUpdate(e,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??no}static _$Ei(){if(this.hasOwnProperty(Ji("elementProperties")))return;const e=Yi(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Ji("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ji("properties"))){const e=this.properties,t=[...Gi(e),...Wi(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(ji(e))}else void 0!==e&&t.push(ji(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 Bi(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),r=this.constructor._$Eu(e,n);if(void 0!==r&&!0===n.reflect){const s=(void 0!==n.converter?.toAttribute?n.converter:eo).toAttribute(t,n.type);this._$Em=e,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(e,t){const n=this.constructor,r=n._$Eh.get(e);if(void 0!==r&&this._$Em!==r){const e=n.getPropertyOptions(r),s="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:eo;this._$Em=r,this[r]=s.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,n){if(void 0!==e){if(n??=this.constructor.getPropertyOptions(e),!(n.hasChanged??to)(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){}}ro.elementStyles=[],ro.shadowRootOptions={mode:"open"},ro[Ji("elementProperties")]=new Map,ro[Ji("finalized")]=new Map,Zi?.({ReactiveElement:ro}),(qi.reactiveElementVersions??=[]).push("2.0.4");const so={attribute:!0,type:String,converter:eo,reflect:!1,hasChanged:to},io=(e=so,t,n)=>{const{kind:r,metadata:s}=n;let i=globalThis.litPropertyMetadata.get(s);if(void 0===i&&globalThis.litPropertyMetadata.set(s,i=new Map),i.set(n.name,e),"accessor"===r){const{name:r}=n;return{set(n){const s=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,s,e)},init(t){return void 0!==t&&this.P(r,void 0,e),t}}}if("setter"===r){const{name:r}=n;return function(n){const s=this[r];t.call(this,n),this.requestUpdate(r,s,e)}}throw Error("Unsupported decorator location: "+r)};function oo(e){return(t,n)=>"object"==typeof n?io(e,t,n):((e,t,n)=>{const r=t.hasOwnProperty(n);return t.constructor.createProperty(n,r?{...e,wrapped:!0}:e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}class ao extends e.LitElement{constructor(){super(),this.contextConsumer=new Mi(this)}styles(){return e.css``}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return e.adoptStyles(t,[Li,this.styles()]),t}willUpdate(t){super.willUpdate(t),this.shadowRoot&&e.adoptStyles(this.shadowRoot,[Li,this.styles()])}disconnectedCallback(){super.disconnectedCallback(),this.contextConsumer.hostDisconnected()}}o([oo({type:Object})],ao.prototype,"contextConsumer",void 0);const co=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 r=new FontFace(n,`url(${e.file})`);document.fonts.add(r)})),document.fonts.ready.then()};var lo;exports.NamiPaywallAction=void 0,(lo=exports.NamiPaywallAction||(exports.NamiPaywallAction={})).BUY_SKU="BUY_SKU",lo.SELECT_SKU="SELECT_SKU",lo.RESTORE_PURCHASES="RESTORE_PURCHASES",lo.SIGN_IN="SIGN_IN",lo.CLOSE_PAYWALL="CLOSE_PAYWALL",lo.SHOW_PAYWALL="SHOW_PAYWALL",lo.PURCHASE_SELECTED_SKU="PURCHASE_SELECTED_SKU",lo.PURCHASE_SUCCESS="PURCHASE_SUCCESS",lo.PURCHASE_FAILED="PURCHASE_FAILED",lo.PURCHASE_CANCELLED="PURCHASE_CANCELLED",lo.PURCHASE_PENDING="PURCHASE_PENDING",lo.PURCHASE_UNKNOWN="PURCHASE_UNKNOWN",lo.PURCHASE_DEFERRED="PURCHASE_DEFERRED",lo.DEEPLINK="DEEPLINK",lo.TOGGLE_CHANGE="TOGGLE_CHANGE",lo.PAGE_CHANGE="PAGE_CHANGE",lo.SLIDE_CHANGE="SLIDE_CHANGE",lo.COLLAPSIBLE_DRAWER_OPEN="COLLAPSIBLE_DRAWER_OPEN",lo.COLLAPSIBLE_DRAWER_CLOSE="COLLAPSIBLE_DRAWER_CLOSE",lo.VIDEO_STARTED="VIDEO_STARTED",lo.VIDEO_PAUSED="VIDEO_PAUSED",lo.VIDEO_RESUMED="VIDEO_RESUMED",lo.VIDEO_ENDED="VIDEO_ENDED",lo.VIDEO_CHANGED="VIDEO_CHANGED",lo.VIDEO_MUTED="VIDEO_MUTED",lo.VIDEO_UNMUTED="VIDEO_UNMUTED",lo.UNKNOWN="UNKNOWN";let uo=class extends ao{constructor(e,t,n,r){super(),mi.setPaywall(e,r,n),this.formFactor=mi.getFormFactor(),this.paywall=e,this.paywallEvent=t,n&&(this.campaign=n)}setPaywallData(e,t){e.id===this.paywall?.id&&t.segment===this.campaign?.segment||this.postImpression(e,t),this.paywall=e,this.campaign=t,mi.setPaywall(e,void 0,t),this.requestUpdate()}firstUpdated(){mi.setTimeSpentOnPaywall(Date.now()),pi(this.paywall)||this.postImpression(this.paywall,this.campaign),is.getInstance().emit(ue,{...this.paywallEvent,action:exports.NamiPaywallAction.SHOW_PAYWALL})}postImpression(e,t){(async e=>{if(Sr.getAnonymousMode())return void be.info("Skipping paywall impression - anonymous mode");const t=Sr.getSessionId();t&&(e.session=t),e.app_env="production",be.info("Post paywall impression - segment ",e.segment);try{await Xr.instance.postImpression(e)}catch(e){be.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.css`
18
+ `;class Uo{constructor(e){this.host=e,this.state=Mo.state,e.addController(this),this.handleStateChange=this.handleStateChange.bind(this),Mo.subscribe(this.handleStateChange)}handleStateChange(){this.state=Mo.state,this.host.requestUpdate()}hostConnected(){}hostDisconnected(){Mo.unsubscribe(this.handleStateChange)}}const Bo=e=>(t,n)=>{void 0!==n?n.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)},Go=globalThis,Xo=Go.ShadowRoot&&(void 0===Go.ShadyCSS||Go.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Yo=Symbol(),Ko=new WeakMap;let Vo=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==Yo)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(Xo&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=Ko.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Ko.set(t,e))}return e}toString(){return this.cssText}};const qo=(e,t)=>{if(Xo)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const n of t){const t=document.createElement("style"),i=Go.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=n.cssText,e.appendChild(t)}},Jo=Xo?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new Vo("string"==typeof e?e:e+"",void 0,Yo))(t)})(e):e,{is:Qo,defineProperty:Zo,getOwnPropertyDescriptor:es,getOwnPropertyNames:ts,getOwnPropertySymbols:ns,getPrototypeOf:is}=Object,as=globalThis,rs=as.trustedTypes,os=rs?rs.emptyScript:"",ss=as.reactiveElementPolyfillSupport,ds=(e,t)=>e,us={toAttribute(e,t){switch(t){case Boolean:e=e?os: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}},ls=(e,t)=>!Qo(e,t),hs={attribute:!0,type:String,converter:us,reflect:!1,hasChanged:ls};Symbol.metadata??=Symbol("metadata"),as.litPropertyMetadata??=new WeakMap;class cs 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=hs){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&&Zo(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){const{get:i,set:a}=es(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)??hs}static _$Ei(){if(this.hasOwnProperty(ds("elementProperties")))return;const e=is(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ds("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ds("properties"))){const e=this.properties,t=[...ts(e),...ns(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(Jo(e))}else void 0!==e&&t.push(Jo(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 qo(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:us).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:us;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??ls)(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){}}cs.elementStyles=[],cs.shadowRootOptions={mode:"open"},cs[ds("elementProperties")]=new Map,cs[ds("finalized")]=new Map,ss?.({ReactiveElement:cs}),(as.reactiveElementVersions??=[]).push("2.0.4");const ms={attribute:!0,type:String,converter:us,reflect:!1,hasChanged:ls},fs=(e=ms,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 gs(e){return(t,n)=>"object"==typeof n?fs(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 ps extends e.LitElement{constructor(){super(),this.contextConsumer=new Uo(this)}styles(){return e.css``}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return e.adoptStyles(t,[Ho,this.styles()]),t}willUpdate(t){super.willUpdate(t),this.shadowRoot&&e.adoptStyles(this.shadowRoot,[Ho,this.styles()])}disconnectedCallback(){super.disconnectedCallback(),this.contextConsumer.hostDisconnected()}}o([gs({type:Object})],ps.prototype,"contextConsumer",void 0);const vs=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 ys;exports.NamiPaywallAction=void 0,(ys=exports.NamiPaywallAction||(exports.NamiPaywallAction={})).BUY_SKU="BUY_SKU",ys.SELECT_SKU="SELECT_SKU",ys.RESTORE_PURCHASES="RESTORE_PURCHASES",ys.SIGN_IN="SIGN_IN",ys.CLOSE_PAYWALL="CLOSE_PAYWALL",ys.SHOW_PAYWALL="SHOW_PAYWALL",ys.PURCHASE_SELECTED_SKU="PURCHASE_SELECTED_SKU",ys.PURCHASE_SUCCESS="PURCHASE_SUCCESS",ys.PURCHASE_FAILED="PURCHASE_FAILED",ys.PURCHASE_CANCELLED="PURCHASE_CANCELLED",ys.PURCHASE_PENDING="PURCHASE_PENDING",ys.PURCHASE_UNKNOWN="PURCHASE_UNKNOWN",ys.PURCHASE_DEFERRED="PURCHASE_DEFERRED",ys.DEEPLINK="DEEPLINK",ys.TOGGLE_CHANGE="TOGGLE_CHANGE",ys.PAGE_CHANGE="PAGE_CHANGE",ys.SLIDE_CHANGE="SLIDE_CHANGE",ys.COLLAPSIBLE_DRAWER_OPEN="COLLAPSIBLE_DRAWER_OPEN",ys.COLLAPSIBLE_DRAWER_CLOSE="COLLAPSIBLE_DRAWER_CLOSE",ys.VIDEO_STARTED="VIDEO_STARTED",ys.VIDEO_PAUSED="VIDEO_PAUSED",ys.VIDEO_RESUMED="VIDEO_RESUMED",ys.VIDEO_ENDED="VIDEO_ENDED",ys.VIDEO_CHANGED="VIDEO_CHANGED",ys.VIDEO_MUTED="VIDEO_MUTED",ys.VIDEO_UNMUTED="VIDEO_UNMUTED",ys.UNKNOWN="UNKNOWN";let bs=class extends ps{constructor(e,t,n,i){super(),Mo.setPaywall(e,i,n),this.formFactor=Mo.getFormFactor(),this.paywall=e,this.paywallEvent=t,n&&(this.campaign=n)}setPaywallData(e,t){e.id===this.paywall?.id&&t.segment===this.campaign?.segment||this.postImpression(e,t),this.paywall=e,this.campaign=t,Mo.setPaywall(e,void 0,t),this.requestUpdate()}firstUpdated(){Mo.setTimeSpentOnPaywall(Date.now()),wo(this.paywall)||this.postImpression(this.paywall,this.campaign),lr.getInstance().emit(fe,{...this.paywallEvent,action:exports.NamiPaywallAction.SHOW_PAYWALL})}postImpression(e,t){(async e=>{if(Ta.getAnonymousMode())return void Ee.info("Skipping paywall impression - anonymous mode");const t=Ta.getSessionId();t&&(e.session=t),e.app_env="production",Ee.info("Post paywall impression - segment ",e.segment);try{await Va.instance.postImpression(e)}catch(e){Ee.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.css`
19
19
  :host {
20
20
  box-sizing: border-box;
21
21
  width: 100%;
22
- position: relative;
23
22
  display: inline-block;
24
- }`}render(){const{state:t}=this.contextConsumer,n=this.getTemplate();if(pi(this.paywall))return e.html``;const{backgroundContainer:r,header:s=[],footer:i=[],contentContainer:o}=n;t.selectedPaywall&&"undefined"!=typeof document&&function(e){const t=Object.values(e).map((({id:e,family:t,style:n,file:r})=>("production"===u&&(r=r.replace(me,fe)),{id:e,family:t,style:n,file:r})));co(t)}(t.selectedPaywall.fonts);const a=t.fullScreenPresentation??!1;return e.html`
23
+ }`}render(){const{state:t}=this.contextConsumer,n=this.getTemplate();if(wo(this.paywall))return e.html``;const{backgroundContainer:i,header:a=[],footer:r=[],contentContainer:o}=n;t.selectedPaywall&&"undefined"!=typeof document&&function(e){const t=Object.values(e).map((({id:e,family:t,style:n,file:i})=>("production"===l&&(i=i.replace(ke,Me)),{id:e,family:t,style:n,file:i})));vs(t)}(t.selectedPaywall.fonts);const s=t.fullScreenPresentation??!1;return e.html`
25
24
  <nami-background-container
26
- .component=${r}
25
+ .component=${i}
27
26
  ></nami-background-container>
28
27
  <nami-header
29
- .components=${s}
30
- .inFullScreen=${a}
28
+ .components=${a}
29
+ .inFullScreen=${s}
31
30
  ></nami-header>
32
31
  <nami-content-container
33
32
  .component=${o}
34
33
  .device=${this.formFactor}>
35
34
  </nami-content-container>
36
35
  <nami-footer
37
- .components=${i}>
36
+ .components=${r}>
38
37
  </nami-footer>
39
- `}};var ho;o([oo({type:String})],uo.prototype,"formFactor",void 0),o([oo({type:Object})],uo.prototype,"campaign",void 0),o([oo({type:Object})],uo.prototype,"paywall",void 0),o([oo({type:Object})],uo.prototype,"paywallEvent",void 0),uo=o([Ti("nami-paywall")],uo),function(e){e[e.DEFAULT_CAMPAIGN_NOT_FOUND=0]="DEFAULT_CAMPAIGN_NOT_FOUND",e[e.LABELED_CAMPAIGN_NOT_FOUND=1]="LABELED_CAMPAIGN_NOT_FOUND",e[e.CAMPAIGN_DATA_NOT_FOUND=2]="CAMPAIGN_DATA_NOT_FOUND",e[e.PAYWALL_ALREADY_DISPLAYED=3]="PAYWALL_ALREADY_DISPLAYED",e[e.SDK_NOT_INITIALIZED=4]="SDK_NOT_INITIALIZED",e[e.PAYWALL_COULD_NOT_DISPLAY=5]="PAYWALL_COULD_NOT_DISPLAY",e[e.URL_CAMPAIGN_NOT_FOUND=6]="URL_CAMPAIGN_NOT_FOUND",e[e.PRODUCT_DATA_NOT_FOUND=7]="PRODUCT_DATA_NOT_FOUND",e[e.PRODUCT_GROUPS_NOT_FOUND=8]="PRODUCT_GROUPS_NOT_FOUND"}(ho||(ho={}));class po{constructor(){this.emitter=is.getInstance()}static allCampaigns(){if(!this.instance.sdkInitialized)throw new kr;return Ai()}static isCampaignAvailable(e){if(!this.instance.sdkInitialized)throw new kr;const t=Si(e)?exports.NamiCampaignRuleType.URL:exports.NamiCampaignRuleType.LABEL;let n=Cn(this.allCampaigns().filter((n=>n.type===t&&n.value===e)));return n=n.flatMap((e=>{const t=Ni.allPaywalls().find((t=>t.id===e.paywall));return t?[e]:[]})),n.length>0}static async refresh(){if(!this.instance.sdkInitialized)throw new kr;const e=await Es.instance.fetchPaywalls();return await Ss.instance.fetchCampaignRules(e),this.allCampaigns()}static registerAvailableCampaignsHandler(e){return this.instance.emitter.addListener(le,e),()=>{this.instance.emitter.removeListener(le,e)}}static launch(e,t,n,r,s){let i;r=r??(()=>{});let o="";if(e?(o=e,i=exports.NamiCampaignRuleType.LABEL):t&&(o=t,i=exports.NamiCampaignRuleType.URL),!this.instance.sdkInitialized)throw r(!1,ho.SDK_NOT_INITIALIZED),new kr;mi.setLaunchDetails(o,i);const a=ki(o,i);let c=a.paywall;const l=a.campaign;if(!c){let n;n=e?ho.LABELED_CAMPAIGN_NOT_FOUND:t?ho.URL_CAMPAIGN_NOT_FOUND:ho.DEFAULT_CAMPAIGN_NOT_FOUND,r(!1,n),c={}}const u={campaignId:l?.rule??"",campaignName:l?.name??"",campaignType:l?.type??"",campaignLabel:e?o:"",campaignUrl:t?o:"",paywallId:c?.id||"",paywallName:c?.name||"",segmentId:l?.segment,externalSegmentId:l?.external_segment_id??null,action:exports.NamiPaywallAction.UNKNOWN},h=new uo(c,u,l,n);return s&&this.instance.emitter.addListener(ue,(({action:e,sku:t,timeSpentOnPaywall:n,componentChange:r,purchaseError:i,purchases:o})=>{s({...u,action:e,sku:t,componentChange:r,purchaseError:i,purchases:o,timeSpentOnPaywall:n})})),setTimeout((()=>r(!0)),0),h}get sdkInitialized(){return Ci.instance.isInitialized}}po.instance=new po;class mo{constructor(){this.emitter=is.getInstance()}static active(){return Br(),gi()}static isEntitlementActive(e){return!!Br("NamiEntitlementManager.isEntitlementActive")&&this.active().some((t=>t.referenceId==e))}static async refresh(){if(!this.instance.sdkInitialized)throw new kr;return Br("NamiEntitlementManager.refresh")?(await _i.instance.fetchActiveEntitlements(),gi()):[]}static registerActiveEntitlementsHandler(e){if(Br("NamiEntitlementManager.registerActiveEntitlementsHandler"))return this.instance.emitter.addListener(he,e),()=>{this.instance.emitter.removeListener(he,e)}}get sdkInitialized(){return Ci.instance.isInitialized}}mo.instance=new mo;const fo={upperLeft:"border-top-left-radius",upperRight:"border-top-right-radius",lowerLeft:"border-bottom-left-radius",lowerRight:"border-bottom-right-radius"},go={left:"border-left-style",right:"border-right-style",top:"border-top-style",bottom:"border-bottom-style"},yo={top:"start",left:"start",right:"end",bottom:"end",center:"center"};function bo(e){let t;return t="number"==typeof e?`${e}px`:"fitContent"==e?"fit-content":e,`${t} !important`}function _o(e){return e.includes("gradient")?`background-image: ${e};`:`background-color: ${e};`}function vo(e,t){return t&&e.focusedFillColor?_o(e.focusedFillColor):_o(e.fillColor||"transparent")}function wo({direction:e}){return`flex-direction: ${"vertical"===e?"column":"row"};`}function So(e){return`\n padding-right: ${e.rightPadding??0}px;\n padding-left: ${e.leftPadding??0}px;\n padding-top: ${e.topPadding??0}px;\n padding-bottom: ${e.bottomPadding??0}px;\n margin-right: ${e.rightMargin??0}px;\n margin-left: ${e.leftMargin??0}px;\n margin-top: ${e.topMargin??0}px;\n margin-bottom: ${e.bottomMargin??0}px;\n `}function Ao({alignment:e}){return`\n justify-content: ${e&&yo[e]||"center"};\n `}function ko(e){return e?"\n text-decoration: line-through;\n text-decoration-thickness: auto;\n ":""}function Eo({fontName:e}){const[t]=(e||"").split("-");return`font-family: '${e}', '${t}', 'Helvetica';`}function Io(e,t){return`\n transition: all 0.3s;\n ${function({grow:e}){return e?"flex-grow: 1;":""}(e)}\n ${So(e)}\n ${function({moveX:e=0,moveY:t=0}){return`\n position: relative;\n left: ${"number"==typeof e?`${e}px`:e};\n transform: translate(\n 0,\n ${"number"==typeof t?`${t}px`:t}\n );\n `}(e)}\n ${function(e,t){const n=t&&e.focusedBorderColor?e.focusedBorderColor:e.borderColor,r=t&&e.focusedBorderRadius?e.focusedBorderRadius:e.borderRadius??0,s=t&&e.focusedRoundBorders?e.focusedRoundBorders:e.roundBorders||null,i=s?s.map((e=>`${fo[e]}: ${r}px;`)).join("\n"):`border-radius: ${r}px;`,o=t&&e.focusedBorderWidth?e.focusedBorderWidth:e.borderWidth||0,a=t&&e.focusedBorders?e.focusedBorders:e.borders||[];return`\n border-color: ${n?`${n} !important`:"transparent"};\n border-width: ${o}px !important;\n ${a.length?a.map((e=>`${go[e]}: solid;`)).join("\n"):"border-style: solid;"}\n ${i}\n `}(e,t)}\n ${function({alignment:e}){return`\n align-items: ${e&&yo[e]||"center"};\n `}(e)}\n ${Ao(e)}\n ${function(e){const t=e.width||e.fixedWidth,n=e.height||e.fixedHeight;return`\n max-width: 100%;\n ${void 0!==t?`width: ${bo(t)};`:""}\n ${void 0!==n?`height: ${bo(n)};`:""}\n `}(e)}\n ${function({zIndex:e}){return`z-index: ${e??"initial"};`}(e)}\n ${function(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 `:""}(e)}\n `}function xo(e){if(!e)return"";const[t,n]=e.split("-");return`\n align-self: ${t};\n ${n}: 0;\n `}function Co(e,t){return Object.keys(t).filter((t=>t.startsWith(e))).reduce(((n,r)=>{const s=function(e,t){const n=e.replace(t,"");return n.charAt(0).toLowerCase()+n.slice(1)}(r,e);return n[s]=t[r],n}),{})}function Po(e,t){return`\n ${vo(e,t)}\n ${Oo(e)}\n ${Io(e,t)}\n width: 50% !important;\n height: 100% !important;\n `}function Oo(e){return`\n ${e.fontColor?`color: ${e.fontColor};`:""}\n font-size: ${e.fontSize??12}px;\n text-align: ${e.alignment||"center"};\n font-family: '${e.fontName}', '${(e.fontName||"").split("-")}', 'Helvetica';\n `}let $o=class extends ao{constructor(){super(...arguments),this.inFocusedState=!1}styles(){const t=this.component,n=t.height||t.fixedHeight||t.width||t.fixedWidth;return e.unsafeCSS(`\n :host {\n display: ${t.hidden?"none":"block"};\n ${n?"":"flex-grow: 1;"}\n ${Io(t,this.inFocusedState)}\n }\n `)}render(){return e.html``}};function No(e,t){return Array.isArray(e)?e.reduce(((e,n)=>{const r=No(n,t);return Array.isArray(r)?[...e,...r]:[...e,r]}),[]):null==e?e:"object"==typeof e?Object.entries(e).reduce(((e,[n,r])=>{const s="newRow"===n?r:No(r,t);return{...e,[n]:s}}),{}):"string"==typeof e?Fo(e,t):e}function Lo(e,t,n={},r){const s=t.productBaseComponents||t.components||[],i=t.productFeaturedComponents||s;return e.map((e=>{const t=e.featured?i:s,o={...e,...e.variables,...r,id:e.sku_ref_id};!function(e,t){const n=e=>{for(const r of e)r.sku=bi(t),r.components&&n(r.components)};n(e)}(t,e);const a={sku:o,media:Do(n,{convertToUrl:!0})};return[e.featured??!1,No(t,No(a,a))]}),[])}function Mo(e){return e.assertions?e.assertions.every(Ro):!!e.orAssertions&&(!e.orAssertions.length||e.orAssertions.some(Ro))}function To(e,t){const n=mi.state,r={state:n,launch:n.launch,sku:n.sku,customer:n.customer};return"string"==typeof e&&e.startsWith("${")&&(e=Fo(e,r)),e}function Ro({value:e,expected:t,operator:n}){const r=/\${[A-Za-z.]+}/g;return e=To(e),t=To(t),"equals"===n?e===t:"notEquals"===n?e!==t:"contains"===n?(Array.isArray(e)||"string"==typeof e||e instanceof String||(e=e.toString()),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(r):"notSet"===n&&(!e||e.toString().match(r))}function Do(e,{convertToUrl:t}={convertToUrl:!1}){return Object.entries(e).reduce(((e,[n,{content:r}])=>(t&&"string"!=typeof r&&r&&(r=URL.createObjectURL(r)),{...e,[n]:r})),{})}function Fo(e,t){let n=e;if("string"!=typeof e)return n;for(const[s,i]of Array.from(e.matchAll(de))){const o=Fo(i,t);if(s===e)return r(s,o);o!==i&&(n=n.replace(i,o)),n=n.replace(de,r)}return n;function r(e,n){const r=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===r?e:"string"!=typeof r?r:Fo(r,t)}}o([oo({type:Object})],$o.prototype,"component",void 0),o([oo({type:Boolean})],$o.prototype,"inFocusedState",void 0),$o=o([Ti("nami-spacer")],$o);function zo(t,n){if("condition"===t.component){if(!Mo(t))return null;const e=t.components?.map((e=>zo(e,n)));return e}return t.conditionAttributes&&(t=function({conditionAttributes:e,...t}){return e?e.reduce(((e,t)=>Mo(t)?(Object.entries(t.attributes).forEach((([e,n])=>{t.attributes[e]=To(n)})),{...e,...t.attributes}):e),t):t}(t)),Object.keys(t).forEach((e=>{t[e]=To(t[e])})),((t,n)=>{const r=t.component;switch(r){case"spacer":return e.html`<nami-spacer .component=${t} .inFocusedState=${n}></nami-spacer>`;case"button":return e.html`<nami-button .component=${t} .inFocusedState=${n}></nami-button>`;case"text":return e.html`<nami-text .component=${t} .inFocusedState=${n}></nami-text>`;case"text-list":return e.html`<nami-text-list .component=${t} .inFocusedState=${n}></nami-text-list>`;case"segmentPicker":return e.html`<nami-segment-picker .component=${t} .inFocusedState=${n}></nami-segment-picker>`;case"segmentPickerItem":return e.html`<nami-segment-picker-item .component=${t} .inFocusedState=${n}></nami-segment-picker-item>`;case"container":return e.html`<nami-container .component=${t} .inFocusedState=${n}></nami-container>`;case"productContainer":return e.html`<nami-product-container .component=${t} .inFocusedState=${n}></nami-product-container>`;case"image":return e.html`<nami-image .component=${t} .inFocusedState=${n}></nami-image>`;case"videoUrl":return e.html`<nami-video .component=${t} .inFocusedState=${n}></nami-video>`;case"symbol":return e.html`<nami-symbol .component=${t} .inFocusedState=${n}></nami-symbol>`;case"collapseContainer":return e.html`<nami-collapse-container .component=${t} .inFocusedState=${n}></nami-collapse-container>`;default:return be.debug("Cannot render component:",r),e.html``}})(t,n??!1)}const{NAMI_CLOSE_PAYWALL:Uo="namiClosePaywall",NAMI_RESTORE_PURCHASES:Bo="namiRestorePurchases",NAMI_SIGN_IN:jo="namiSignIn",NAMI_BUY_SKU:Ho="namiBuySKU",SET_STATE:Xo="setState",NAMI_SELECT_SKU:Vo="namiSelectSKU",NAMI_PURCHASE_SELECTED_SKU:Go="namiPurchaseSelectedSKU",NAMI_DEEP_LINK:Wo="namiDeeplink",NAMI_NAVIGATE_TO_SCREEN:Yo="namiNavigateToScreen",NAMI_RELOAD_PRODUCTS:qo="namiReloadProducts",UNSUPPORTED:Ko="",NAMI_PURCHASE_SUCCESS:Qo="namiPurchaseSuccess",NAMI_PURCHASE_CANCELLED:Zo="namiPurchaseCancelled",NAMI_PURCHASE_FAILED:Jo="namiPurchaseFailed",NAMI_PURCHASE_PENDING:ea="namiPurchasePending",NAMI_PURCHASE_UNKNOWN:ta="namiPurchaseUnknown",NAMI_SHOW_PAYWALL:na="namiShowPaywall",NAMI_PAGE_CHANGE:ra="namiPageChange",NAMI_TOGGLE_CHANGE:sa="namiToggleChange",NAMI_SLIDE_CHANGE:ia="namiSlideChange"}={};var oa,aa;!function(e){e.DEFAULT="default",e.LABEL="label",e.URL="url"}(oa||(oa={})),function(e){e.DEEPLINK="deeplink",e.IN_APP="in_app"}(aa||(aa={}));const ca=(e,t)=>{let n,r,s=exports.NamiPaywallAction.UNKNOWN;switch(e?.function){case Uo:s=exports.NamiPaywallAction.CLOSE_PAYWALL,n=la(),ua();break;case Bo:s=exports.NamiPaywallAction.RESTORE_PURCHASES,ha();break;case jo:s=exports.NamiPaywallAction.SIGN_IN,pa();break;case Wo:da(e.parameters?.url);break;case Ho:t&&(s=exports.NamiPaywallAction.BUY_SKU,t=ma(e,t));break;case Yo:r={name:e?.parameters?.screen},fa(e?.parameters?.screen);break;case Xo:ga();break;case Vo:t&&(s=exports.NamiPaywallAction.SELECT_SKU,ya(t));break;case Go:t&&(s=exports.NamiPaywallAction.PURCHASE_SELECTED_SKU,ba(t))}s!==exports.NamiPaywallAction.UNKNOWN&&is.getInstance().emit(ue,{action:s,sku:t,timeSpentOnPaywall:n,componentChange:r,purchaseError:undefined,purchases:undefined})},la=()=>{const e=mi.state.timeSpentOnPaywall;if(e)return Date.now()-e},ua=()=>{if(!_a(xi.PAYWALL_CLOSE_REQUESTED)&&"undefined"!=typeof window)return window.history.back(),void mi.resetAppSuppliedVideoDetails()},ha=()=>{const e=Ur(Fr.THIRD_PARTY_TRANSACTIONS);_a(xi.PAYWALL_RESTORE_REQUESTED)||e||be.warn("NamiPaywallManager.registerRestoreHandler is not registered, so restore option on the paywall will use default behavior.")},pa=()=>{_a(xi.PAYWALL_SIGNIN_REQUESTED)},da=e=>{e?_a(xi.PAYWALL_DEEPLINK_ACTION,e)||"undefined"!=typeof window&&window.open(e,"_blank"):be.debug("Paywall deep link action invoked, but no url present.")},ma=(e,t)=>{const n=e.parameters?.promo,r=t;if(n)be.debug(`promo id is not null ${t?.id}`),r.promoId=n.toString();else{be.debug(`promo id is null for ${t.id}, product details: ${JSON.stringify(t.productDetails)}`);const e=t.productDetails;if("subscription"==e?.product_type){const t=function(e){if("subscription"===e?.product_type)return e.offers.find((e=>"promo"===e.offer_type&&0===e.price))}(e);if(t&&t.offer_ref_id)be.debug(`Found a free trial offer ${t.offer_ref_id}`),r.promoId=t.offer_ref_id.toString();else{const t=e.offers[0];t&&(be.debug(`Found an offer ${t.offer_ref_id}`),r.promoId=t.offer_ref_id?.toString())}}}return function(e){if(Ur(Fr.THIRD_PARTY_TRANSACTIONS)){if(Sr.setPurchaseImpression(),is.getInstance().listenerCount(xi.REGISTER_BUY_SKU)<=0)return void be.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.");be.info(`Handing off purchase for processing by developer skuId=${e.skuId} promoId=${e.promoId}`),_a(xi.REGISTER_BUY_SKU,e)}else{const t=function(e){if(!Br("NamiPurchaseManager.buySKU"))return;const t=Sr.getCachedProducts(),n=t?.find((t=>t.sku_ref_id==e));return{success:!!n,billingResponseCode:n?0:-999}}(e.skuId);if(t&&(be.info(`Purchase flow completed, success=${t.success}, code=${t.billingResponseCode}, message=${t.message}`),t.success)){is.getInstance().emit(ue,{action:exports.NamiPaywallAction.CLOSE_PAYWALL,sku:e,timeSpentOnPaywall:la()});const t=mi.getSelectedCampaign();t&&t.conversion_event_type==aa.IN_APP&&t.conversion_event_url?window.location.href=t.conversion_event_url:ua()}}}(r),r},fa=e=>{e&&(window.history.state?.prevUrl==e?window.history.back():mi.setCurrentPage(e))},ga=()=>{const e=Ni.allPaywalls().find((e=>e.id===mi.paywallId()));e&&(e.template.initialState={...e.template.initialState,currentGroupId:mi.currentGroupId()},mi.setPaywall(e))},ya=e=>{const t=mi.currentGroupId(),n=mi.selectedProducts();t&&e.id!=n[t]&&(n[t]=e.id,mi.setSelectedProdcuts(n))},ba=e=>{mi.setPurchase(!0,e)};function _a(e,...t){const n=is.getInstance();return n.emit(e,...t),n.listenerCount(e)>0}const{SHOULD_SHOW_LOADING_INDICATOR:va=!1}={};let wa=class extends ao{constructor(){super(),this.inFocusedState=!1,this._handleClick=()=>{ca(this.component.onTap,this.component.sku)},this.addEventListener("click",this._handleClick,!1)}styles(){const{component:t,inFocusedState:n}=this,r="vertical"===t.direction?"margin-top":"margin-left",s=t.spacing??0;return e.unsafeCSS(`\n :host {\n display: ${t.hidden?"none":"flex"};\n flex-direction: column;\n cursor: pointer;\n ${vo(t,n)}\n ${wo(t)}\n ${Io(t,n)}\n }\n\n :host > :not(:first-child) {\n ${r}: ${s}px;\n }\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 t=this.contextConsumer.state.purchaseInProgress&&this.component.sku?.id==this.contextConsumer.state.productBeingPurchased?.id;if(va&&t)return e.html`<span class="loader"></span>`;return function(e){const t={sku:mi.state.sku};return No(e.components||[],No(t,t))}(this.component).map((e=>zo(e,this.inFocusedState)))}};o([oo({type:Object})],wa.prototype,"component",void 0),o([oo({type:Boolean})],wa.prototype,"inFocusedState",void 0),wa=o([Ti("nami-button")],wa);let Sa=class extends ao{constructor(){super(...arguments),this.components=[],this.zIndex="2",this.inFocusedState=!1}styles(){const{formFactor:t}=this.contextConsumer.state,n="phone"!==t||this.inFullScreen?0:40;return e.unsafeCSS(`\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: ${n}px;\n }`)}render(){return this.components.map((e=>zo(e,this.inFocusedState)))}};o([oo({type:Array})],Sa.prototype,"components",void 0),o([oo({type:String})],Sa.prototype,"zIndex",void 0),o([oo({type:Boolean})],Sa.prototype,"inFullScreen",void 0),o([oo({type:Boolean})],Sa.prototype,"inFocusedState",void 0),Sa=o([Ti("nami-header")],Sa);let Aa=class extends ao{constructor(){super(...arguments),this.components=[],this.zIndex="3",this.inFocusedState=!1}styles(){return e.unsafeCSS(`\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=>zo(e,this.inFocusedState)))}};function ka(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}o([oo({type:Array})],Aa.prototype,"components",void 0),o([oo({type:String})],Aa.prototype,"zIndex",void 0),o([oo({type:Boolean})],Aa.prototype,"inFocusedState",void 0),Aa=o([Ti("nami-footer")],Aa);let Ea={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Ia(e){Ea=e}const xa=/[&<>"']/,Ca=new RegExp(xa.source,"g"),Pa=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Oa=new RegExp(Pa.source,"g"),$a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Na=e=>$a[e];function La(e,t){if(t){if(xa.test(e))return e.replace(Ca,Na)}else if(Pa.test(e))return e.replace(Oa,Na);return e}const Ma=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Ta(e){return e.replace(Ma,((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 Ra=/(^|[^\[])\^/g;function Da(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(Ra,"$1"),n=n.replace(e,s),r},getRegex:()=>new RegExp(n,t)};return r}function Fa(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const za={exec:()=>null};function Ua(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,s=t;for(;--s>=0&&"\\"===n[s];)r=!r;return r?"|":" |"})).split(/ \|/);let r=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(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function Ba(e,t,n){const r=e.length;if(0===r)return"";let s=0;for(;s<r;){const i=e.charAt(r-s-1);if(i!==t||n){if(i===t||!n)break;s++}else s++}return e.slice(0,r-s)}function ja(e,t,n,r){const s=t.href,i=t.title?La(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:s,title:i,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:s,title:i,text:La(o)}}class Ha{options;rules;lexer;constructor(e){this.options=e||Ea}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:Ba(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 r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.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=Ba(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=Ba(e.replace(/^ *>[ \t]?/gm,""),"\n");const n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,s={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const i=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let o="",a="",c=!1;for(;e;){let n=!1;if(!(t=i.exec(e)))break;if(this.rules.block.hr.test(e))break;o=t[0],e=e.substring(o.length);let r=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),l=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,a=r.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,a=r.slice(u),u+=t[1].length);let h=!1;if(!r&&/^ *$/.test(l)&&(o+=l+"\n",e=e.substring(l.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+|$)`),s=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),i=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const c=e.split("\n",1)[0];if(l=c,this.options.pedantic&&(l=l.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),s.test(l))break;if(i.test(l))break;if(t.test(l))break;if(n.test(e))break;if(l.search(/[^ ]/)>=u||!l.trim())a+="\n"+l.slice(u);else{if(h)break;if(r.search(/[^ ]/)>=4)break;if(s.test(r))break;if(i.test(r))break;if(n.test(r))break;a+="\n"+l}h||l.trim()||(h=!0),o+=c+"\n",e=e.substring(c.length+1),r=l.slice(u)}}s.loose||(c?s.loose=!0:/\n *\n *$/.test(o)&&(c=!0));let p,d=null;this.options.gfm&&(d=/^\[[ xX]\] /.exec(a),d&&(p="[ ] "!==d[0],a=a.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:o,task:!!d,checked:p,loose:!1,text:a,tokens:[]}),s.raw+=o}s.items[s.items.length-1].raw=o.trimEnd(),s.items[s.items.length-1].text=a.trimEnd(),s.raw=s.raw.trimEnd();for(let e=0;e<s.items.length;e++)if(this.lexer.state.top=!1,s.items[e].tokens=this.lexer.blockTokens(s.items[e].text,[]),!s.loose){const t=s.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));s.loose=n}if(s.loose)for(let e=0;e<s.items.length;e++)s.items[e].loose=!0;return s}}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"):"",r=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:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=Ua(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),s=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?i.align.push("right"):/^ *:-+: *$/.test(e)?i.align.push("center"):/^ *:-+ *$/.test(e)?i.align.push("left"):i.align.push(null);for(const e of n)i.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of s)i.rows.push(Ua(e,i.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return i}}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:La(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=Ba(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 r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;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],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=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)),ja(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},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 ja(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let s,i,o=n,a=0;const c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=c.exec(t));){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(i=[...s].length,r[3]||r[4]){o+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){a+=i;continue}if(o-=i,o>0)continue;i=Math.min(i,i+o+a);const t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+i);if(Math.min(n,i)%2){const e=c.slice(1,-1);return{type:"em",raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}const l=c.slice(2,-2);return{type:"strong",raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=La(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=La(t[1]),n="mailto:"+e):(e=La(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=La(t[0]),n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=La(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]:La(t[0]),{type:"text",raw:t[0],text:e}}}}const Xa=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Va=/(?:[*+-]|\d{1,9}[.)])/,Ga=Da(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Va).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(),Wa=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ya=/(?!\s*\])(?:\\.|[^\[\]\\])+/,qa=Da(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Ya).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ka=Da(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Va).getRegex(),Qa="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",Za=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ja=Da("^ {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",Za).replace("tag",Qa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ec=Da(Wa).replace("hr",Xa).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",Qa).getRegex(),tc={blockquote:Da(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ec).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:qa,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Xa,html:Ja,lheading:Ga,list:Ka,newline:/^(?: *(?:\n|$))+/,paragraph:ec,table:za,text:/^[^\n]+/},nc=Da("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Xa).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",Qa).getRegex(),rc={...tc,table:nc,paragraph:Da(Wa).replace("hr",Xa).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",nc).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",Qa).getRegex()},sc={...tc,html:Da("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Za).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:za,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Da(Wa).replace("hr",Xa).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Ga).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ic=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,oc=/^( {2,}|\\)\n(?!\s*$)/,ac="\\p{P}\\p{S}",cc=Da(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,ac).getRegex(),lc=Da(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,ac).getRegex(),uc=Da("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,ac).getRegex(),hc=Da("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,ac).getRegex(),pc=Da(/\\([punct])/,"gu").replace(/punct/g,ac).getRegex(),dc=Da(/^<(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(),mc=Da(Za).replace("(?:--\x3e|$)","--\x3e").getRegex(),fc=Da("^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",mc).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),gc=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,yc=Da(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",gc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),bc=Da(/^!?\[(label)\]\[(ref)\]/).replace("label",gc).replace("ref",Ya).getRegex(),_c=Da(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ya).getRegex(),vc={_backpedal:za,anyPunctuation:pc,autolink:dc,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:oc,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:za,emStrongLDelim:lc,emStrongRDelimAst:uc,emStrongRDelimUnd:hc,escape:ic,link:yc,nolink:_c,punctuation:cc,reflink:bc,reflinkSearch:Da("reflink|nolink(?!\\()","g").replace("reflink",bc).replace("nolink",_c).getRegex(),tag:fc,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:za},wc={...vc,link:Da(/^!?\[(label)\]\((.*?)\)/).replace("label",gc).getRegex(),reflink:Da(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",gc).getRegex()},Sc={...vc,escape:Da(ic).replace("])","~|])").getRegex(),url:Da(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Ac={...Sc,br:Da(oc).replace("{2,}","*").getRegex(),text:Da(Sc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},kc={normal:tc,gfm:rc,pedantic:sc},Ec={normal:vc,gfm:Sc,breaks:Ac,pedantic:wc};class Ic{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ea,this.options.tokenizer=this.options.tokenizer||new Ha,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:kc.normal,inline:Ec.normal};this.options.pedantic?(t.block=kc.pedantic,t.inline=Ec.pedantic):this.options.gfm&&(t.block=kc.gfm,this.options.breaks?t.inline=Ec.breaks:t.inline=Ec.gfm),this.tokenizer.rules=t}static get rules(){return{block:kc,inline:Ec}}static lex(e,t){return new Ic(t).lex(e)}static lexInline(e,t){return new Ic(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,r,s,i;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((r=>!!(n=r.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),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.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),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.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(s=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s)))r=t[t.length-1],i&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),i=s.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.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,r,s,i,o,a,c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.anyPunctuation.exec(c));)c=c.slice(0,i.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.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),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.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),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,c,a))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(s=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(s))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),o=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.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 xc{options;constructor(e){this.options=e||Ea}code(e,t,n){const r=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="language-'+La(r)+'">'+(n?e:La(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:La(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 r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\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 r=Fa(e);if(null===r)return n;let s='<a href="'+(e=r)+'"';return t&&(s+=' title="'+t+'"'),s+=">"+n+"</a>",s}image(e,t,n){const r=Fa(e);if(null===r)return n;let s=`<img src="${e=r}" alt="${n}"`;return t&&(s+=` title="${t}"`),s+=">",s}text(e){return e}}class Cc{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 Pc{options;renderer;textRenderer;constructor(e){this.options=e||Ea,this.options.renderer=this.options.renderer||new xc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Cc}static parse(e,t){return new Pc(t).parse(e)}static parseInline(e,t){return new Pc(t).parseInline(e)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){const s=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const e=s,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(s.type){case"space":continue;case"hr":n+=this.renderer.hr();continue;case"heading":{const e=s;n+=this.renderer.heading(this.parseInline(e.tokens),e.depth,Ta(this.parseInline(e.tokens,this.textRenderer)));continue}case"code":{const e=s;n+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=s;let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.renderer.tablecell(this.parseInline(e.header[t].tokens),{header:!0,align:e.align[t]});t+=this.renderer.tablerow(r);let i="";for(let t=0;t<e.rows.length;t++){const n=e.rows[t];r="";for(let t=0;t<n.length;t++)r+=this.renderer.tablecell(this.parseInline(n[t].tokens),{header:!1,align:e.align[t]});i+=this.renderer.tablerow(r)}n+=this.renderer.table(t,i);continue}case"blockquote":{const e=s,t=this.parse(e.tokens);n+=this.renderer.blockquote(t);continue}case"list":{const e=s,t=e.ordered,r=e.start,i=e.loose;let o="";for(let t=0;t<e.items.length;t++){const n=e.items[t],r=n.checked,s=n.task;let a="";if(n.task){const e=this.renderer.checkbox(!!r);i?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+" "}):a+=e+" "}a+=this.parse(n.tokens,i),o+=this.renderer.listitem(a,s,!!r)}n+=this.renderer.list(o,t,r);continue}case"html":{const e=s;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=s;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let i=s,o=i.tokens?this.parseInline(i.tokens):i.text;for(;r+1<e.length&&"text"===e[r+1].type;)i=e[++r],o+="\n"+(i.tokens?this.parseInline(i.tokens):i.text);n+=t?this.renderer.paragraph(o):o;continue}default:{const e='Token with "'+s.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 r=0;r<e.length;r++){const s=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const e=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=e||"";continue}}switch(s.type){case"escape":{const e=s;n+=t.text(e.text);break}case"html":{const e=s;n+=t.html(e.text);break}case"link":{const e=s;n+=t.link(e.href,e.title,this.parseInline(e.tokens,t));break}case"image":{const e=s;n+=t.image(e.href,e.title,e.text);break}case"strong":{const e=s;n+=t.strong(this.parseInline(e.tokens,t));break}case"em":{const e=s;n+=t.em(this.parseInline(e.tokens,t));break}case"codespan":{const e=s;n+=t.codespan(e.text);break}case"br":n+=t.br();break;case"del":{const e=s;n+=t.del(this.parseInline(e.tokens,t));break}case"text":{const e=s;n+=t.text(e.text);break}default:{const e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class Oc{options;constructor(e){this.options=e||Ea}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}const $c=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(Ic.lex,Pc.parse);parseInline=this.#e(Ic.lexInline,Pc.parseInline);Parser=Pc;Renderer=xc;TextRenderer=Cc;Lexer=Ic;Tokenizer=Ha;Hooks=Oc;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const s=e[r].flat(1/0);n=n.concat(this.walkTokens(s,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 r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}: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 xc(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 r=n,s=e.renderer[r],i=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new Ha(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 r=n,s=e.tokenizer[r],i=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new Oc;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,s=e.hooks[r],i=t[r];Oc.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(s.call(t,e)).then((e=>i.call(t,e)));const n=s.call(t,e);return i.call(t,n)}:t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.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 Ic.lex(e,t??this.defaults)}parser(e,t){return Pc.parse(e,t??this.defaults)}#e(e,t){return(n,r)=>{const s={...r},i={...this.defaults,...s};!0===this.defaults.async&&!1===s.async&&(i.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),i.async=!0);const o=this.#t(!!i.silent,!!i.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(i.hooks&&(i.hooks.options=i),i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(n):n).then((t=>e(t,i))).then((e=>i.hooks?i.hooks.processAllTokens(e):e)).then((e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then((()=>e)):e)).then((e=>t(e,i))).then((e=>i.hooks?i.hooks.postprocess(e):e)).catch(o);try{i.hooks&&(n=i.hooks.preprocess(n));let r=e(n,i);i.hooks&&(r=i.hooks.processAllTokens(r)),i.walkTokens&&this.walkTokens(r,i.walkTokens);let s=t(r,i);return i.hooks&&(s=i.hooks.postprocess(s)),s}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>"+La(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Nc(e,t){return $c.parse(e,t)}Nc.options=Nc.setOptions=function(e){return $c.setOptions(e),Nc.defaults=$c.defaults,Ia(Nc.defaults),Nc},Nc.getDefaults=ka,Nc.defaults=Ea,Nc.use=function(...e){return $c.use(...e),Nc.defaults=$c.defaults,Ia(Nc.defaults),Nc},Nc.walkTokens=function(e,t){return $c.walkTokens(e,t)},Nc.parseInline=$c.parseInline,Nc.Parser=Pc,Nc.parser=Pc.parse,Nc.Renderer=xc,Nc.TextRenderer=Cc,Nc.Lexer=Ic,Nc.lexer=Ic.lex,Nc.Tokenizer=Ha,Nc.Hooks=Oc,Nc.parse=Nc,Nc.options,Nc.setOptions,Nc.use,Nc.walkTokens,Nc.parseInline,Pc.parse,Ic.lex;const Lc={CheckCircleFilled:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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" />`};function Mc(t,n=""){const r=t.linkColor||"blue";return e.unsafeCSS(`\n ${n} a:link {\n color: ${r};\n text-decoration-line: underline;\n }\n ${n} a:visited {\n color: ${r};\n text-decoration-line: underline;\n }\n ${n} a:hover {\n color: ${r};\n }\n ${n} a:active {\n color: ${r};\n text-decoration-line: underline;\n }\n `)}let Tc=class extends ao{constructor(){super(...arguments),this.inFocusedState=!1}styles(){const{component:t}=this;return"legal"===t.textType?e.unsafeCSS(`\n :host {\n display: block;\n overflow-wrap: break-word;\n width: fit-content;\n ${vo(t,this.inFocusedState)}\n color: ${t.fontColor};\n font-size: ${t.fontSize??12}px;\n text-align: ${t.alignment||"center"};\n ${Eo(t)}\n ${Io(t,this.inFocusedState)}\n }\n :host p {\n margin: 0;\n }\n ${Mc(t,":host")}\n `):e.unsafeCSS(`\n :host {\n display: flex;\n width: fit-content;\n ${function(e){return"fitContent"===e.width?"white-space: nowrap;":"overflow-wrap: anywhere;"}(t)}\n ${vo(t,this.inFocusedState)}\n color: ${this.inFocusedState&&t.focusedFontColor?t.focusedFontColor:t.fontColor??""};\n font-size: ${t.fontSize??12}px;\n text-align: ${t.alignment||"center"};\n ${ko("string"!=typeof t.strikethrough&&t.strikethrough)}\n ${Eo(t)}\n ${Io(t,this.inFocusedState)}\n }\n :host p {\n margin: 0;\n }\n ${e.unsafeCSS(Mc(t,":host"))}\n `)}render(){return this.component.text?e.html`<div class="content" .innerHTML="${Nc.parse(this.component.text)}"></div>`:(this.style.display="none",e.html``)}};o([oo({type:Object})],Tc.prototype,"component",void 0),o([oo({type:Boolean})],Tc.prototype,"inFocusedState",void 0),Tc=o([Ti("nami-text")],Tc);let Rc=class extends ao{constructor(){super(...arguments),this.inFocusedState=!1}styles(){return e.unsafeCSS(`\n :host { \n display: flex;\n transition: all 0.3s;\n &:not(:first-child) {\n margin-top: ${this.component.spacing||0}px;\n }\n }\n `)}render(){return e.html`<slot></slot>`}};o([oo({type:Object})],Rc.prototype,"component",void 0),o([oo({type:Boolean})],Rc.prototype,"inFocusedState",void 0),Rc=o([Ti("nami-text-list-item-wrapper")],Rc);let Dc=class extends ao{constructor(){super(...arguments),this.inFocusedState=!1}styles(){return e.unsafeCSS(`\n :host { \n display: flex;\n overflow-wrap: anywhere;\n transition: all 0.3s;\n margin-right: ${this.component.rightMargin||this.component.spacing||0}px;\n ${vo(this.component,this.inFocusedState)}\n color: ${this.component.fontColor};\n font-size: ${this.component.fontSize??12}px;\n }\n `)}render(){return e.html`
38
+ `}};var ws;o([gs({type:String})],bs.prototype,"formFactor",void 0),o([gs({type:Object})],bs.prototype,"campaign",void 0),o([gs({type:Object})],bs.prototype,"paywall",void 0),o([gs({type:Object})],bs.prototype,"paywallEvent",void 0),bs=o([Bo("nami-paywall")],bs),exports.LaunchCampaignError=void 0,(ws=exports.LaunchCampaignError||(exports.LaunchCampaignError={}))[ws.DEFAULT_CAMPAIGN_NOT_FOUND=0]="DEFAULT_CAMPAIGN_NOT_FOUND",ws[ws.LABELED_CAMPAIGN_NOT_FOUND=1]="LABELED_CAMPAIGN_NOT_FOUND",ws[ws.CAMPAIGN_DATA_NOT_FOUND=2]="CAMPAIGN_DATA_NOT_FOUND",ws[ws.PAYWALL_ALREADY_DISPLAYED=3]="PAYWALL_ALREADY_DISPLAYED",ws[ws.SDK_NOT_INITIALIZED=4]="SDK_NOT_INITIALIZED",ws[ws.PAYWALL_COULD_NOT_DISPLAY=5]="PAYWALL_COULD_NOT_DISPLAY",ws[ws.URL_CAMPAIGN_NOT_FOUND=6]="URL_CAMPAIGN_NOT_FOUND",ws[ws.PRODUCT_DATA_NOT_FOUND=7]="PRODUCT_DATA_NOT_FOUND",ws[ws.PRODUCT_GROUPS_NOT_FOUND=8]="PRODUCT_GROUPS_NOT_FOUND";class ks{constructor(){this.emitter=lr.getInstance()}static allCampaigns(){if(!this.instance.sdkInitialized)throw new xa;return Do()}static isCampaignAvailable(e){if(!this.instance.sdkInitialized)throw new xa;const t=Lo(e)?exports.NamiCampaignRuleType.URL:exports.NamiCampaignRuleType.LABEL;let n=Ii(this.allCampaigns().filter((n=>n.type===t&&n.value===e)));return n=n.flatMap((e=>{const t=$o.allPaywalls().find((t=>t.id===e.paywall));return t?[e]:[]})),n.length>0}static async refresh(){if(!this.instance.sdkInitialized)throw new xa;const e=await Lr.instance.fetchPaywalls();return await Ar.instance.fetchCampaignRules(e),this.allCampaigns()}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,exports.LaunchCampaignError.SDK_NOT_INITIALIZED),new xa;Mo.setLaunchDetails(o,r);const s=Io(o,r);let d=s.paywall;const u=s.campaign;if(!d){let n;n=e?exports.LaunchCampaignError.LABELED_CAMPAIGN_NOT_FOUND:t?exports.LaunchCampaignError.URL_CAMPAIGN_NOT_FOUND:exports.LaunchCampaignError.DEFAULT_CAMPAIGN_NOT_FOUND,i(!1,n),d={}}const l={campaignId:u?.rule??"",campaignName:u?.name??"",campaignType:u?.type??"",campaignLabel:e?o:"",campaignUrl:t?o:"",paywallId:d?.id||"",paywallName:d?.name||"",segmentId:u?.segment,externalSegmentId:u?.external_segment??null,action:exports.NamiPaywallAction.UNKNOWN},h=n?.productGroups,c=d.sku_menus?.map((e=>e.ref));if((()=>{const e=Ta.getNamiConfig()?.namiCommands;return e?.includes(Z)??!1})()&&h?.length&&null!=c){const e=c?.filter((e=>h?.some((t=>t===e))));if(0==e.length)throw i(!1,exports.LaunchCampaignError.PRODUCT_GROUPS_NOT_FOUND),new Ia}const m=new bs(d,l,u,n);return a&&this.instance.emitter.addListener(fe,(({action:e,sku:t,timeSpentOnPaywall:n,componentChange:i,purchaseError:r,purchases:o})=>{a({...l,action:e,sku:t,componentChange:i,purchaseError:r,purchases:o,timeSpentOnPaywall:n})})),setTimeout((()=>i(!0)),0),m}static getProductGroups(e,t){const{type:n,value:i}=this.instance.campaignTypeAndLabel(e,t),a=Io(i,n);return a.paywall?.sku_menus?.map((e=>e.ref))??[]}get sdkInitialized(){return Oo.instance.isInitialized}campaignTypeAndLabel(e,t){let n,i="";return e?(i=e,n=exports.NamiCampaignRuleType.LABEL):t&&(i=t,n=exports.NamiCampaignRuleType.URL),{type:n,value:i}}}ks.instance=new ks;class Ms{constructor(){this.emitter=lr.getInstance()}static active(){return Xa(),Po()}static isEntitlementActive(e){return!!Xa("NamiEntitlementManager.isEntitlementActive")&&this.active().some((t=>t.referenceId==e))}static async refresh(){if(!this.instance.sdkInitialized)throw new xa;return Xa("NamiEntitlementManager.refresh")?(await Ao.instance.fetchActiveEntitlements(),Po()):[]}static registerActiveEntitlementsHandler(e){if(Xa("NamiEntitlementManager.registerActiveEntitlementsHandler"))return this.instance.emitter.addListener(ge,e),()=>{this.instance.emitter.removeListener(ge,e)}}static clearProvisionalEntitlementGrants(){let e=Po();e=e.filter((e=>e.expires&&e.expires>(new Date).valueOf())),Ta.setNamiEntitlements(W,e),this.instance.emitter.emit(ge)}get sdkInitialized(){return Oo.instance.isInitialized}}Ms.instance=new Ms;const Ss={upperLeft:"border-top-left-radius",upperRight:"border-top-right-radius",lowerLeft:"border-bottom-left-radius",lowerRight:"border-bottom-right-radius"},Ps={left:"border-left-style",right:"border-right-style",top:"border-top-style",bottom:"border-bottom-style"},Es={top:"start",left:"start",right:"end",bottom:"end",center:"center"};function Ts(e){let t;return t="number"==typeof e?`${e}px`:"fitContent"==e?"fit-content":e,`${t} !important`}function As(e){return e.includes("gradient")?`background-image: ${e};`:`background-color: ${e};`}function xs(e,t){return t&&e.focusedFillColor?As(e.focusedFillColor):As(e.fillColor||"transparent")}function Cs({direction:e}){return`flex-direction: ${"vertical"===e?"column":"row"};`}function Ls({grow:e}){return e?"flex-grow: 1;":""}function Ds(e){return`\n padding-right: ${e.rightPadding??0}px;\n padding-left: ${e.leftPadding??0}px;\n padding-top: ${e.topPadding??0}px;\n padding-bottom: ${e.bottomPadding??0}px;\n margin-right: ${e.rightMargin??0}px;\n margin-left: ${e.leftMargin??0}px;\n margin-top: ${e.topMargin??0}px;\n margin-bottom: ${e.bottomMargin??0}px;\n `}function Is({moveX:e=0,moveY:t=0}){return`\n position: relative;\n left: ${"number"==typeof e?`${e}px`:e};\n transform: translate(\n 0,\n ${"number"==typeof t?`${t}px`:t}\n );\n `}function Rs(e,t){const n=t&&e.focusedBorderColor?e.focusedBorderColor:e.borderColor,i=t&&e.focusedBorderRadius?e.focusedBorderRadius:e.borderRadius??0,a=t&&e.focusedRoundBorders?e.focusedRoundBorders:e.roundBorders||null,r=a?a.map((e=>`${Ss[e]}: ${i}px;`)).join("\n"):`border-radius: ${i}px;`,o=t&&e.focusedBorderWidth?e.focusedBorderWidth:e.borderWidth||0,s=t&&e.focusedBorders?e.focusedBorders:e.borders||[];return`\n border-color: ${n?`${n} !important`:"transparent"};\n border-width: ${o}px !important;\n ${s.length?s.map((e=>`${Ps[e]}: solid;`)).join("\n"):"border-style: solid;"}\n ${r}\n `}function _s({alignment:e}){return`\n justify-content: ${e&&Es[e]||"center"};\n `}function Ws(e){const t=e.width||e.fixedWidth,n=e.height||e.fixedHeight;return`\n max-width: 100%;\n ${void 0!==t?`width: ${Ts(t)};`:""}\n ${void 0!==n?`height: ${Ts(n)};`:""}\n `}function Ns({zIndex:e}){return`z-index: ${e??"initial"};`}function Os(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 Fs(e){return e?"\n text-decoration: line-through;\n text-decoration-thickness: auto;\n ":""}function js({fontName:e}){const[t]=(e||"").split("-");return`font-family: '${e}', '${t}', 'Helvetica';`}function zs(e,t){return`\n transition: all 0.3s;\n ${Ls(e)}\n ${Ds(e)}\n ${Is(e)}\n ${Rs(e,t)}\n ${function({alignment:e}){return`\n align-items: ${e&&Es[e]||"center"};\n `}(e)}\n ${_s(e)}\n ${Ws(e)}\n ${Ns(e)}\n ${Os(e)}\n `}function $s(e){if(!e)return"";const[t,n]=e.split("-");return`\n align-self: ${t};\n ${n}: 0;\n `}function Hs(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 Us(e,t){return`\n ${xs(e,t)}\n ${Bs(e)}\n ${zs(e,t)}\n width: 50% !important;\n height: 100% !important;\n `}function Bs(e){return`\n ${e.fontColor?`color: ${e.fontColor};`:""}\n font-size: ${e.fontSize??12}px;\n text-align: ${e.alignment||"center"};\n font-family: '${e.fontName}', '${(e.fontName||"").split("-")}', 'Helvetica';\n `}let Gs=class extends ps{constructor(){super(...arguments),this.inFocusedState=!1}styles(){const t=this.component,n=t.height||t.fixedHeight||t.width||t.fixedWidth;return e.unsafeCSS(`\n :host {\n display: ${t.hidden?"none":"block"};\n ${n?"":"flex-grow: 1;"}\n ${zs(t,this.inFocusedState)}\n }\n `)}render(){return e.html``}};function Xs(e,t){return Array.isArray(e)?e.reduce(((e,n)=>{const i=Xs(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:Xs(i,t);return{...e,[n]:a}}),{}):"string"==typeof e?Qs(e,t):e}function Ys(e,t,n={},i){const a=t.productBaseComponents||t.components||[],r=t.productFeaturedComponents||a;return e.map((e=>{const t=e.featured?r:a,o=e.entitlements.map((e=>e.entitlement_ref_id)),s={...e,...e.variables,...i,id:e.sku_ref_id,entitlements:o};!function(e,t){const n=e=>{for(const i of e)i.sku=To(t),i.components&&n(i.components)};n(e)}(t,e);const d={sku:s,media:Js(n,{convertToUrl:!0})};return[e.featured??!1,Xs(t,Xs(d,d))]}),[])}function Ks(e){return e.assertions?e.assertions.every(qs):!!e.orAssertions&&(!e.orAssertions.length||e.orAssertions.some(qs))}function Vs(e,t){const n=Mo.state,i={state:n,launch:n.launch,sku:n.sku,customer:n.customer};return"string"==typeof e&&e.includes(we)&&(e=Qs(e,i)),e}function qs({value:e,expected:t,operator:n}){const i=/\${[A-Za-z.]+}/g;return e=Vs(e),t=Vs(t),"equals"===n?e===t:"notEquals"===n?e!==t:"contains"===n?(Array.isArray(e)||"string"==typeof e||e instanceof String||(e=e.toString()),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(i):"notSet"===n&&(!e||e.toString().match(i))}function Js(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 Qs(e,t){let n=e;if("string"!=typeof e)return n;for(const[a,r]of Array.from(e.matchAll(ye))){const o=Qs(r,t);if(a===e)return i(a,o);o!==r&&(n=n.replace(r,o)),n=n.replace(ye,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:Qs(i,t)}}o([gs({type:Object})],Gs.prototype,"component",void 0),o([gs({type:Boolean})],Gs.prototype,"inFocusedState",void 0),Gs=o([Bo("nami-spacer")],Gs);function Zs(t,n){if("condition"===t.component){if(!Ks(t))return null;const e=t.components?.map((e=>Zs(e,n)));return e}return t.conditionAttributes&&(t=function({conditionAttributes:e,...t}){return e?e.reduce(((e,t)=>Ks(t)?(Object.entries(t.attributes).forEach((([e,n])=>{t.attributes[e]=Vs(n)})),{...e,...t.attributes}):e),t):t}(t)),Object.keys(t).forEach((e=>{t[e]=Vs(t[e])})),((t,n)=>{const i=t.component;switch(i){case"spacer":return e.html`<nami-spacer .component=${t} .inFocusedState=${n}></nami-spacer>`;case"button":return e.html`<nami-button .component=${t} .inFocusedState=${n}></nami-button>`;case"text":return e.html`<nami-text .component=${t} .inFocusedState=${n}></nami-text>`;case"text-list":return e.html`<nami-text-list .component=${t} .inFocusedState=${n}></nami-text-list>`;case"segmentPicker":return e.html`<nami-segment-picker .component=${t} .inFocusedState=${n}></nami-segment-picker>`;case"segmentPickerItem":return e.html`<nami-segment-picker-item .component=${t} .inFocusedState=${n}></nami-segment-picker-item>`;case"container":return e.html`<nami-container .component=${t} .inFocusedState=${n}></nami-container>`;case"productContainer":return e.html`<nami-product-container .component=${t} .inFocusedState=${n}></nami-product-container>`;case"image":return e.html`<nami-image .component=${t} .inFocusedState=${n}></nami-image>`;case"videoUrl":return e.html`<nami-video .component=${t} .inFocusedState=${n}></nami-video>`;case"symbol":return e.html`<nami-symbol .component=${t} .inFocusedState=${n}></nami-symbol>`;case"collapseContainer":return e.html`<nami-collapse-container .component=${t} .inFocusedState=${n}></nami-collapse-container>`;case"responsiveGrid":return e.html`<nami-responsive-grid .component=${t} .inFocusedState=${n}></nami-responsive-grid>`;default:return Ee.debug("Cannot render component:",i),e.html``}})(t,n??!1)}const{NAMI_CLOSE_PAYWALL:ed="namiClosePaywall",NAMI_RESTORE_PURCHASES:td="namiRestorePurchases",NAMI_SIGN_IN:nd="namiSignIn",NAMI_BUY_SKU:id="namiBuySKU",SET_STATE:ad="setState",NAMI_SELECT_SKU:rd="namiSelectSKU",NAMI_PURCHASE_SELECTED_SKU:od="namiPurchaseSelectedSKU",NAMI_DEEP_LINK:sd="namiDeeplink",NAMI_NAVIGATE_TO_SCREEN:dd="namiNavigateToScreen",NAMI_RELOAD_PRODUCTS:ud="namiReloadProducts",UNSUPPORTED:ld="",NAMI_PURCHASE_SUCCESS:hd="namiPurchaseSuccess",NAMI_PURCHASE_CANCELLED:cd="namiPurchaseCancelled",NAMI_PURCHASE_FAILED:md="namiPurchaseFailed",NAMI_PURCHASE_PENDING:fd="namiPurchasePending",NAMI_PURCHASE_UNKNOWN:gd="namiPurchaseUnknown",NAMI_SHOW_PAYWALL:pd="namiShowPaywall",NAMI_PAGE_CHANGE:vd="namiPageChange",NAMI_TOGGLE_CHANGE:yd="namiToggleChange",NAMI_SLIDE_CHANGE:bd="namiSlideChange"}={};var wd,kd;!function(e){e.DEFAULT="default",e.LABEL="label",e.URL="url"}(wd||(wd={})),function(e){e.DEEPLINK="deeplink",e.IN_APP="in_app"}(kd||(kd={}));const Md=(e,t)=>{let n,i,a=exports.NamiPaywallAction.UNKNOWN;switch(e?.function){case ed:a=exports.NamiPaywallAction.CLOSE_PAYWALL,n=Sd(),Pd();break;case td:a=exports.NamiPaywallAction.RESTORE_PURCHASES,Ed();break;case nd:a=exports.NamiPaywallAction.SIGN_IN,Td();break;case sd:Ad(e.parameters?.url);break;case id:t&&(a=exports.NamiPaywallAction.BUY_SKU,t=xd(e,t));break;case dd:i={name:e?.parameters?.screen},Cd(e?.parameters?.screen);break;case ad:Ld();break;case rd:t&&(a=exports.NamiPaywallAction.SELECT_SKU,Dd(t));break;case od:t&&(a=exports.NamiPaywallAction.PURCHASE_SELECTED_SKU,Id(t))}a!==exports.NamiPaywallAction.UNKNOWN&&lr.getInstance().emit(fe,{action:a,sku:t,timeSpentOnPaywall:n,componentChange:i,purchaseError:undefined,purchases:undefined})},Sd=()=>{const e=Mo.state.timeSpentOnPaywall;if(e)return Date.now()-e},Pd=()=>{if(!Rd(No.PAYWALL_CLOSE_REQUESTED)&&"undefined"!=typeof window)return window.history.back(),void Mo.resetAppSuppliedVideoDetails()},Ed=()=>{const e=Ga(Ua.THIRD_PARTY_TRANSACTIONS);Rd(No.PAYWALL_RESTORE_REQUESTED)||e||Ee.warn("NamiPaywallManager.registerRestoreHandler is not registered, so restore option on the paywall will use default behavior.")},Td=()=>{Rd(No.PAYWALL_SIGNIN_REQUESTED)},Ad=e=>{e?Rd(No.PAYWALL_DEEPLINK_ACTION,e)||"undefined"!=typeof window&&window.open(e,"_blank"):Ee.debug("Paywall deep link action invoked, but no url present.")},xd=(e,t)=>{const n=e.parameters?.promo,i=t;if(n)Ee.debug(`promo id is not null ${t?.id}`),i.promoId=n.toString();else{Ee.debug(`promo id is null for ${t.id}, product details: ${JSON.stringify(t.productDetails)}`);const e=t.productDetails;if(Rr(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)Ee.debug(`Found a free trial offer ${t.offer_ref_id}`),i.promoId=t.offer_ref_id.toString();else{const t=e.offers[0];t&&(Ee.debug(`Found an offer ${t.offer_ref_id}`),i.promoId=t.offer_ref_id?.toString())}}}return function(e){if(Ga(Ua.THIRD_PARTY_TRANSACTIONS)){if(Ta.setPurchaseImpression(),lr.getInstance().listenerCount(No.REGISTER_BUY_SKU)<=0)return void Ee.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.");Ee.info(`Handing off purchase for processing by developer skuId=${e.skuId} promoId=${e.promoId}`),Rd(No.REGISTER_BUY_SKU,e)}else{const t=function(e){if(!Xa("NamiPurchaseManager.buySKU"))return;const t=Ta.getCachedProducts(),n=t?.find((t=>t.sku_ref_id==e));return{success:!!n,billingResponseCode:n?0:-999}}(e.skuId);if(t&&(Ee.info(`Purchase flow completed, success=${t.success}, code=${t.billingResponseCode}, message=${t.message}`),t.success)){lr.getInstance().emit(fe,{action:exports.NamiPaywallAction.CLOSE_PAYWALL,sku:e,timeSpentOnPaywall:Sd()});const t=Mo.getSelectedCampaign();t&&t.conversion_event_type==kd.IN_APP&&t.conversion_event_url?window.location.href=t.conversion_event_url:Pd()}}}(i),i},Cd=e=>{e&&(window.history.state?.prevUrl==e?window.history.back():Mo.setCurrentPage(e))},Ld=()=>{const e=$o.allPaywalls().find((e=>e.id===Mo.paywallId()));e&&(e.template.initialState={...e.template.initialState,currentGroupId:Mo.getCurrentGroupId()},Mo.setPaywall(e))},Dd=e=>{const t=Mo.getCurrentGroupId(),n=Mo.selectedProducts();t&&e.id!=n[t]&&(n[t]=e.id,Mo.setSelectedProdcuts(n))},Id=e=>{Mo.setPurchase(!0,e)};function Rd(e,...t){const n=lr.getInstance();return n.emit(e,...t),n.listenerCount(e)>0}const{SHOULD_SHOW_LOADING_INDICATOR:_d=!1}={};let Wd=class extends ps{constructor(){super(),this.inFocusedState=!1,this._handleFocus=()=>{this.inFocusedState=!0},this._handleBlur=()=>{this.inFocusedState=!1},this._handleClick=()=>{Md(this.component.onTap,this.component.sku)},this.addEventListener("click",this._handleClick,!1),this.addEventListener("focus",this._handleFocus,!1),this.addEventListener("blur",this._handleBlur,!1)}updated(){this.setAttribute("aria-label",this.component.screenreaderText||"")}styles(){const{component:t,inFocusedState:n}=this,i="vertical"===t.direction?"margin-top":"margin-left",a=t.spacing??0;return e.unsafeCSS(`\n :host {\n display: ${t.hidden?"none":"flex"};\n flex-direction: column;\n cursor: pointer;\n ${xs(t,n)}\n ${Cs(t)}\n ${zs(t,n)}\n }\n\n :host > :not(:first-child) {\n ${i}: ${a}px;\n }\n\n :host(:focus){\n outline: none !important;\n }\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,1==this.inFocusedState&&this.focus();const t=this.contextConsumer.state.purchaseInProgress&&this.component.sku?.id==this.contextConsumer.state.productBeingPurchased?.id;if(_d&&t)return e.html`<span class="loader"></span>`;return function(e){const t={sku:Mo.state.sku};return Xs(e.components||[],Xs(t,t))}(this.component).map((e=>Zs(e,this.inFocusedState)))}};o([gs({type:Object})],Wd.prototype,"component",void 0),o([gs({type:Boolean})],Wd.prototype,"inFocusedState",void 0),Wd=o([Bo("nami-button")],Wd);let Nd=class extends ps{constructor(){super(...arguments),this.components=[],this.zIndex="2",this.inFocusedState=!1}styles(){const{formFactor:t}=this.contextConsumer.state,n="phone"!==t||this.inFullScreen?0:40;return e.unsafeCSS(`\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: ${n}px;\n }`)}render(){return this.components.map((e=>Zs(e,this.inFocusedState)))}};o([gs({type:Array})],Nd.prototype,"components",void 0),o([gs({type:String})],Nd.prototype,"zIndex",void 0),o([gs({type:Boolean})],Nd.prototype,"inFullScreen",void 0),o([gs({type:Boolean})],Nd.prototype,"inFocusedState",void 0),Nd=o([Bo("nami-header")],Nd);let Od=class extends ps{constructor(){super(...arguments),this.components=[],this.zIndex="3",this.inFocusedState=!1}styles(){return e.unsafeCSS(`\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=>Zs(e,this.inFocusedState)))}};function Fd(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}o([gs({type:Array})],Od.prototype,"components",void 0),o([gs({type:String})],Od.prototype,"zIndex",void 0),o([gs({type:Boolean})],Od.prototype,"inFocusedState",void 0),Od=o([Bo("nami-footer")],Od);let jd={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function zd(e){jd=e}const $d=/[&<>"']/,Hd=new RegExp($d.source,"g"),Ud=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Bd=new RegExp(Ud.source,"g"),Gd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Xd=e=>Gd[e];function Yd(e,t){if(t){if($d.test(e))return e.replace(Hd,Xd)}else if(Ud.test(e))return e.replace(Bd,Xd);return e}const Kd=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Vd(e){return e.replace(Kd,((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 qd=/(^|[^\[])\^/g;function Jd(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(qd,"$1"),n=n.replace(e,a),i},getRegex:()=>new RegExp(n,t)};return i}function Qd(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const Zd={exec:()=>null};function eu(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 tu(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 nu(e,t,n,i){const a=t.href,r=t.title?Yd(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:Yd(o)}}class iu{options;rules;lexer;constructor(e){this.options=e||jd}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:tu(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=tu(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=tu(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="",d=!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))),u=e.split("\n",1)[0],l=0;this.options.pedantic?(l=2,s=i.trimStart()):(l=t[2].search(/[^ ]/),l=l>4?1:l,s=i.slice(l),l+=t[1].length);let h=!1;if(!i&&/^ *$/.test(u)&&(o+=u+"\n",e=e.substring(u.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,l-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,l-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),a=new RegExp(`^ {0,${Math.min(3,l-1)}}(?:\`\`\`|~~~)`),r=new RegExp(`^ {0,${Math.min(3,l-1)}}#`);for(;e;){const d=e.split("\n",1)[0];if(u=d,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),a.test(u))break;if(r.test(u))break;if(t.test(u))break;if(n.test(e))break;if(u.search(/[^ ]/)>=l||!u.trim())s+="\n"+u.slice(l);else{if(h)break;if(i.search(/[^ ]/)>=4)break;if(a.test(i))break;if(r.test(i))break;if(n.test(i))break;s+="\n"+u}h||u.trim()||(h=!0),o+=d+"\n",e=e.substring(d.length+1),i=u.slice(l)}}a.loose||(d?a.loose=!0:/\n *\n *$/.test(o)&&(d=!0));let c,m=null;this.options.gfm&&(m=/^\[[ xX]\] /.exec(s),m&&(c="[ ] "!==m[0],s=s.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:o,task:!!m,checked:c,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=eu(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(eu(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:Yd(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=tu(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)),nu(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 nu(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 d="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+n);null!=(i=d.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,d=e.slice(0,n+i.index+t+r);if(Math.min(n,r)%2){const e=d.slice(1,-1);return{type:"em",raw:d,text:e,tokens:this.lexer.inlineTokens(e)}}const u=d.slice(2,-2);return{type:"strong",raw:d,text:u,tokens:this.lexer.inlineTokens(u)}}}}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=Yd(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=Yd(t[1]),n="mailto:"+e):(e=Yd(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=Yd(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=Yd(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]:Yd(t[0]),{type:"text",raw:t[0],text:e}}}}const au=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ru=/(?:[*+-]|\d{1,9}[.)])/,ou=Jd(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ru).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(),su=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,du=/(?!\s*\])(?:\\.|[^\[\]\\])+/,uu=Jd(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",du).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),lu=Jd(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ru).getRegex(),hu="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",cu=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,mu=Jd("^ {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",cu).replace("tag",hu).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fu=Jd(su).replace("hr",au).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",hu).getRegex(),gu={blockquote:Jd(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",fu).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:uu,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:au,html:mu,lheading:ou,list:lu,newline:/^(?: *(?:\n|$))+/,paragraph:fu,table:Zd,text:/^[^\n]+/},pu=Jd("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",au).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",hu).getRegex(),vu={...gu,table:pu,paragraph:Jd(su).replace("hr",au).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",pu).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",hu).getRegex()},yu={...gu,html:Jd("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",cu).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:Zd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Jd(su).replace("hr",au).replace("heading"," *#{1,6} *[^\n]").replace("lheading",ou).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},bu=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,wu=/^( {2,}|\\)\n(?!\s*$)/,ku="\\p{P}\\p{S}",Mu=Jd(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,ku).getRegex(),Su=Jd(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,ku).getRegex(),Pu=Jd("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,ku).getRegex(),Eu=Jd("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,ku).getRegex(),Tu=Jd(/\\([punct])/,"gu").replace(/punct/g,ku).getRegex(),Au=Jd(/^<(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(),xu=Jd(cu).replace("(?:--\x3e|$)","--\x3e").getRegex(),Cu=Jd("^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",xu).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Lu=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Du=Jd(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Lu).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Iu=Jd(/^!?\[(label)\]\[(ref)\]/).replace("label",Lu).replace("ref",du).getRegex(),Ru=Jd(/^!?\[(ref)\](?:\[\])?/).replace("ref",du).getRegex(),_u={_backpedal:Zd,anyPunctuation:Tu,autolink:Au,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:wu,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:Zd,emStrongLDelim:Su,emStrongRDelimAst:Pu,emStrongRDelimUnd:Eu,escape:bu,link:Du,nolink:Ru,punctuation:Mu,reflink:Iu,reflinkSearch:Jd("reflink|nolink(?!\\()","g").replace("reflink",Iu).replace("nolink",Ru).getRegex(),tag:Cu,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:Zd},Wu={..._u,link:Jd(/^!?\[(label)\]\((.*?)\)/).replace("label",Lu).getRegex(),reflink:Jd(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Lu).getRegex()},Nu={..._u,escape:Jd(bu).replace("])","~|])").getRegex(),url:Jd(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Ou={...Nu,br:Jd(wu).replace("{2,}","*").getRegex(),text:Jd(Nu.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Fu={normal:gu,gfm:vu,pedantic:yu},ju={normal:_u,gfm:Nu,breaks:Ou,pedantic:Wu};class zu{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||jd,this.options.tokenizer=this.options.tokenizer||new iu,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:Fu.normal,inline:ju.normal};this.options.pedantic?(t.block=Fu.pedantic,t.inline=ju.pedantic):this.options.gfm&&(t.block=Fu.gfm,this.options.breaks?t.inline=ju.breaks:t.inline=ju.gfm),this.tokenizer.rules=t}static get rules(){return{block:Fu,inline:ju}}static lex(e,t){return new zu(t).lex(e)}static lexInline(e,t){return new zu(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,d=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(d));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(d=d.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+d.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(d));)d=d.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+d.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(d));)d=d.slice(0,r.index)+"++"+d.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,d,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 $u{options;constructor(e){this.options=e||jd}code(e,t,n){const i=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",i?'<pre><code class="language-'+Yd(i)+'">'+(n?e:Yd(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:Yd(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=Qd(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=Qd(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 Hu{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 Uu{options;renderer;textRenderer;constructor(e){this.options=e||jd,this.options.renderer=this.options.renderer||new $u,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Hu}static parse(e,t){return new Uu(t).parse(e)}static parseInline(e,t){return new Uu(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,Vd(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 Bu{options;constructor(e){this.options=e||jd}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}const Gu=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(zu.lex,Uu.parse);parseInline=this.#e(zu.lexInline,Uu.parseInline);Parser=Uu;Renderer=$u;TextRenderer=Hu;Lexer=zu;Tokenizer=iu;Hooks=Bu;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 $u(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 iu(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 Bu;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];Bu.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 zu.lex(e,t??this.defaults)}parser(e,t){return Uu.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>"+Yd(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Xu(e,t){return Gu.parse(e,t)}Xu.options=Xu.setOptions=function(e){return Gu.setOptions(e),Xu.defaults=Gu.defaults,zd(Xu.defaults),Xu},Xu.getDefaults=Fd,Xu.defaults=jd,Xu.use=function(...e){return Gu.use(...e),Xu.defaults=Gu.defaults,zd(Xu.defaults),Xu},Xu.walkTokens=function(e,t){return Gu.walkTokens(e,t)},Xu.parseInline=Gu.parseInline,Xu.Parser=Uu,Xu.parser=Uu.parse,Xu.Renderer=$u,Xu.TextRenderer=Hu,Xu.Lexer=zu,Xu.lexer=zu.lex,Xu.Tokenizer=iu,Xu.Hooks=Bu,Xu.parse=Xu,Xu.options,Xu.setOptions,Xu.use,Xu.walkTokens,Xu.parseInline,Uu.parse,zu.lex;const Yu={CheckCircleFilled:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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:e.svg`<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" />`},Ku={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 Vu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const qu={date:Vu({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"yyyy/MM/dd"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ju={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 Qu(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 Zu={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:Qu({values:{narrow:["vC","nC"],abbreviated:["vC","nC"],wide:["voor Christus","na Christus"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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 el(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],d=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 u;u=e.valueCallback?e.valueCallback(d):d,u=n.valueCallback?n.valueCallback(u):u;return{value:u,rest:t.slice(o.length)}}}function tl(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 nl={ordinalNumber:tl({matchPattern:/^(\d+)(ste|de)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^([vn]\.? ?C\.?)/,abbreviated:/^([vn]\. ?C\.?)/,wide:/^((voor|na) Christus)/},defaultMatchWidth:"wide",parsePatterns:{any:[/^v/,/^n/]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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"})},il={code:"af",formatDistance:(e,t,n)=>{let i;const a=Ku[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:qu,formatRelative:(e,t,n,i)=>Ju[e],localize:Zu,match:nl,options:{weekStartsOn:0,firstWeekContainsDate:1}},al={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}} سنة"}},rl={date:Vu({formats:{full:"EEEE، do MMMM y",long:"do MMMM y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss",long:"HH:mm:ss",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'عند الساعة' {{time}}",long:"{{date}} 'عند الساعة' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ol={lastWeek:"eeee 'الماضي عند الساعة' p",yesterday:"'الأمس عند الساعة' p",today:"'اليوم عند الساعة' p",tomorrow:"'غدا عند الساعة' p",nextWeek:"eeee 'القادم عند الساعة' p",other:"P"},sl={code:"ar",formatDistance:(e,t,n)=>{const i=al[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:rl,formatRelative:e=>ol[e],localize:{ordinalNumber:e=>String(e),era:Qu({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["ي","ف","م","أ","م","ي","ي","أ","س","أ","ن","د"],abbreviated:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],wide:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],wide:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/[قب]/,abbreviated:/[قب]\.م\./,wide:/(قبل|بعد) الميلاد/},defaultMatchWidth:"wide",parsePatterns:{any:[/قبل/,/بعد/]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({matchPatterns:{narrow:/^(ص|م|منتصف الليل|الظهر|بعد الظهر|في الصباح|في المساء|في الليل)/,any:/^(ص|م|منتصف الليل|الظهر|بعد الظهر|في الصباح|في المساء|في الليل)/},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ص/,pm:/^م/,midnight:/منتصف الليل/,noon:/الظهر/,afternoon:/بعد الظهر/,morning:/في الصباح/,evening:/في المساء/,night:/في الليل/}},defaultParseWidth:"any"})},options:{weekStartsOn:6,firstWeekContainsDate:1}},dl={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}} عام تقريباً"}},ul={date:Vu({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} 'عند' {{time}}",long:"{{date}} 'عند' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ll={lastWeek:"'أخر' eeee 'عند' p",yesterday:"'أمس عند' p",today:"'اليوم عند' p",tomorrow:"'غداً عند' p",nextWeek:"eeee 'عند' p",other:"P"},hl={code:"ar-DZ",formatDistance:(e,t,n)=>{n=n||{};const i=dl[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:ul,formatRelative:(e,t,n,i)=>ll[e],localize:{ordinalNumber:e=>String(e),era:Qu({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:Qu({values:{narrow:["ج","ف","م","أ","م","ج","ج","أ","س","أ","ن","د"],abbreviated:["جانـ","فيفـ","مارس","أفريل","مايـ","جوانـ","جويـ","أوت","سبتـ","أكتـ","نوفـ","ديسـ"],wide:["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنـ","ثلا","أربـ","خميـ","جمعة","سبت"],wide:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(ق|ب)/i,abbreviated:/^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,wide:/^(قبل الميلاد|قبل الميلاد|بعد الميلاد|بعد الميلاد)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^قبل/i,/^بعد/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},cl={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}} عام تقريبًا"}},ml={date:Vu({formats:{full:"EEEE، do MMMM y",long:"do MMMM y",medium:"dd/MMM/y",short:"d/MM/y"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} 'الساعة' {{time}}",long:"{{date}} 'الساعة' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},fl={lastWeek:"eeee 'اللي جاي الساعة' p",yesterday:"'إمبارح الساعة' p",today:"'النهاردة الساعة' p",tomorrow:"'بكرة الساعة' p",nextWeek:"eeee 'الساعة' p",other:"P"},gl={code:"ar-EG",formatDistance:(e,t,n)=>{let i;const a=cl[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:ml,formatRelative:(e,t,n,i)=>fl[e],localize:{ordinalNumber:(e,t)=>String(e),era:Qu({values:{narrow:["ق","ب"],abbreviated:["ق.م","ب.م"],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["ي","ف","م","أ","م","ي","ي","أ","س","أ","ن","د"],abbreviated:["ينا","فبر","مارس","أبريل","مايو","يونـ","يولـ","أغسـ","سبتـ","أكتـ","نوفـ","ديسـ"],wide:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],wide:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)/,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:el({matchPatterns:{narrow:/^(ق|ب)/g,abbreviated:/^(ق.م|ب.م)/g,wide:/^(قبل الميلاد|بعد الميلاد)/g},defaultMatchWidth:"wide",parsePatterns:{any:[/^ق/g,/^ب/g]},defaultParseWidth:"any"}),quarter:el({matchPatterns:{narrow:/^[1234]/,abbreviated:/^ر[1234]/,wide:/^الربع (الأول|الثاني|الثالث|الرابع)/},defaultMatchWidth:"wide",parsePatterns:{wide:[/الربع الأول/,/الربع الثاني/,/الربع الثالث/,/الربع الرابع/],any:[/1/,/2/,/3/,/4/]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:el({matchPatterns:{narrow:/^(ي|ف|م|أ|س|ن|د)/,abbreviated:/^(ينا|فبر|مارس|أبريل|مايو|يونـ|يولـ|أغسـ|سبتـ|أكتـ|نوفـ|ديسـ)/,wide:/^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ي/,/^ف/,/^م/,/^أ/,/^م/,/^ي/,/^ي/,/^أ/,/^س/,/^أ/,/^ن/,/^د/],any:[/^ينا/,/^فبر/,/^مارس/,/^أبريل/,/^مايو/,/^يون/,/^يول/,/^أغس/,/^سبت/,/^أكت/,/^نوف/,/^ديس/]},defaultParseWidth:"any"}),day:el({matchPatterns:{narrow:/^(ح|ن|ث|ر|خ|ج|س)/,short:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/,abbreviated:/^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/,wide:/^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ح/,/^ن/,/^ث/,/^ر/,/^خ/,/^ج/,/^س/],any:[/أحد/,/اثنين/,/ثلاثاء/,/أربعاء/,/خميس/,/جمعة/,/سبت/]},defaultParseWidth:"any"}),dayPeriod:el({matchPatterns:{narrow:/^(ص|م|ن|ظ|في الصباح|بعد الظهر|في المساء|في الليل)/,abbreviated:/^(ص|م|نصف الليل|ظهراً|في الصباح|بعد الظهر|في المساء|في الليل)/,wide:/^(ص|م|نصف الليل|في الصباح|ظهراً|بعد الظهر|في المساء|في الليل)/,any:/^(ص|م|صباح|ظهر|مساء|ليل)/},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ص/,pm:/^م/,midnight:/^ن/,noon:/^ظ/,morning:/^ص/,afternoon:/^بعد/,evening:/^م/,night:/^ل/}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},pl={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}} عام تقريباً"}},vl={date:Vu({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} 'عند' {{time}}",long:"{{date}} 'عند' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},yl={lastWeek:"'أخر' eeee 'عند' p",yesterday:"'أمس عند' p",today:"'اليوم عند' p",tomorrow:"'غداً عند' p",nextWeek:"eeee 'عند' p",other:"P"},bl={code:"ar-MA",formatDistance:(e,t,n)=>{n=n||{};const i=pl[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:vl,formatRelative:(e,t,n,i)=>yl[e],localize:{ordinalNumber:e=>String(e),era:Qu({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:Qu({values:{narrow:["ي","ف","م","أ","م","ي","ي","غ","ش","أ","ن","د"],abbreviated:["ينا","فبر","مارس","أبريل","ماي","يونـ","يولـ","غشت","شتنـ","أكتـ","نونـ","دجنـ"],wide:["يناير","فبراير","مارس","أبريل","ماي","يونيو","يوليوز","غشت","شتنبر","أكتوبر","نونبر","دجنبر"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنـ","ثلا","أربـ","خميـ","جمعة","سبت"],wide:["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(ق|ب)/i,abbreviated:/^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,wide:/^(قبل الميلاد|قبل الميلاد|بعد الميلاد|بعد الميلاد)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^قبل/i,/^بعد/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},wl={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}} عام تقريباً"}},kl={date:Vu({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} 'عند' {{time}}",long:"{{date}} 'عند' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ml={lastWeek:"'أخر' eeee 'عند' p",yesterday:"'أمس عند' p",today:"'اليوم عند' p",tomorrow:"'غداً عند' p",nextWeek:"eeee 'عند' p",other:"P"},Sl={code:"ar-SA",formatDistance:(e,t,n)=>{let i;const a=wl[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:kl,formatRelative:(e,t,n,i)=>Ml[e],localize:{ordinalNumber:e=>String(e),era:Qu({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["ي","ف","م","أ","م","ي","ي","أ","س","أ","ن","د"],abbreviated:["ينا","فبر","مارس","أبريل","مايو","يونـ","يولـ","أغسـ","سبتـ","أكتـ","نوفـ","ديسـ"],wide:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنـ","ثلا","أربـ","خميـ","جمعة","سبت"],wide:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(ق|ب)/i,abbreviated:/^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,wide:/^(قبل الميلاد|قبل الميلاد|بعد الميلاد|بعد الميلاد)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^قبل/i,/^بعد/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},Pl={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}} عام تقريب"}},El={date:Vu({formats:{full:"EEEE، do MMMM y",long:"do MMMM y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss",long:"HH:mm:ss",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'مع' {{time}}",long:"{{date}} 'مع' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Tl={lastWeek:"eeee 'إلي فات مع' p",yesterday:"'البارح مع' p",today:"'اليوم مع' p",tomorrow:"'غدوة مع' p",nextWeek:"eeee 'الجمعة الجاية مع' p 'نهار'",other:"P"},Al={code:"ar-TN",formatDistance:(e,t,n)=>{const i=Pl[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:El,formatRelative:e=>Tl[e],localize:{ordinalNumber:e=>String(e),era:Qu({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل الميلاد","بعد الميلاد"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["ر1","ر2","ر3","ر4"],wide:["الربع الأول","الربع الثاني","الربع الثالث","الربع الرابع"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["د","ن","أ","س","أ","ج","ج","م","أ","م","ف","ج"],abbreviated:["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],wide:["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["ح","ن","ث","ر","خ","ج","س"],short:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],abbreviated:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],wide:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/[قب]/,abbreviated:/[قب]\.م\./,wide:/(قبل|بعد) الميلاد/},defaultMatchWidth:"wide",parsePatterns:{any:[/قبل/,/بعد/]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({matchPatterns:{narrow:/^(ص|ع|ن ل|ل|(في|مع) (صباح|قايلة|عشية|ليل))/,any:/^([صع]|نص الليل|قايلة|(في|مع) (صباح|قايلة|عشية|ليل))/},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ص/,pm:/^ع/,midnight:/نص الليل/,noon:/قايلة/,afternoon:/بعد القايلة/,morning:/صباح/,evening:/عشية/,night:/ليل/}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},xl={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"}},Cl={date:Vu({formats:{full:"EEEE, do MMMM y 'il'",long:"do MMMM y 'il'",medium:"d MMM y 'il'",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} {{time}} - 'də'",long:"{{date}} {{time}} - 'də'",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ll={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"},Dl={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ı"},Il={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 Dl[t]?Dl[t]:Dl[n]?Dl[n]:null!==i?Dl[i]:""})(n);return n+i},era:Qu({values:{narrow:["e.ə","b.e"],abbreviated:["e.ə","b.e"],wide:["eramızdan əvvəl","bizim era"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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"})},Rl={code:"az",formatDistance:(e,t,n)=>{let i;const a=xl[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:Cl,formatRelative:(e,t,n,i)=>Ll[e],localize:Il,match:{ordinalNumber:tl({matchPattern:/^(\d+)(-?(ci|inci|nci|uncu|üncü|ncı))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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 _l(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 Wl(e){return(t,n)=>n&&n.addSuffix?n.comparison&&n.comparison>0?e.future?_l(e.future,t):"праз "+_l(e.regular,t):e.past?_l(e.past,t):_l(e.regular,t)+" таму":_l(e.regular,t)}const Nl={lessThanXSeconds:Wl({regular:{one:"менш за секунду",singularNominative:"менш за {{count}} секунду",singularGenitive:"менш за {{count}} секунды",pluralGenitive:"менш за {{count}} секунд"},future:{one:"менш, чым праз секунду",singularNominative:"менш, чым праз {{count}} секунду",singularGenitive:"менш, чым праз {{count}} секунды",pluralGenitive:"менш, чым праз {{count}} секунд"}}),xSeconds:Wl({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:Wl({regular:{one:"менш за хвіліну",singularNominative:"менш за {{count}} хвіліну",singularGenitive:"менш за {{count}} хвіліны",pluralGenitive:"менш за {{count}} хвілін"},future:{one:"менш, чым праз хвіліну",singularNominative:"менш, чым праз {{count}} хвіліну",singularGenitive:"менш, чым праз {{count}} хвіліны",pluralGenitive:"менш, чым праз {{count}} хвілін"}}),xMinutes:Wl({regular:{singularNominative:"{{count}} хвіліна",singularGenitive:"{{count}} хвіліны",pluralGenitive:"{{count}} хвілін"},past:{singularNominative:"{{count}} хвіліну таму",singularGenitive:"{{count}} хвіліны таму",pluralGenitive:"{{count}} хвілін таму"},future:{singularNominative:"праз {{count}} хвіліну",singularGenitive:"праз {{count}} хвіліны",pluralGenitive:"праз {{count}} хвілін"}}),aboutXHours:Wl({regular:{singularNominative:"каля {{count}} гадзіны",singularGenitive:"каля {{count}} гадзін",pluralGenitive:"каля {{count}} гадзін"},future:{singularNominative:"прыблізна праз {{count}} гадзіну",singularGenitive:"прыблізна праз {{count}} гадзіны",pluralGenitive:"прыблізна праз {{count}} гадзін"}}),xHours:Wl({regular:{singularNominative:"{{count}} гадзіна",singularGenitive:"{{count}} гадзіны",pluralGenitive:"{{count}} гадзін"},past:{singularNominative:"{{count}} гадзіну таму",singularGenitive:"{{count}} гадзіны таму",pluralGenitive:"{{count}} гадзін таму"},future:{singularNominative:"праз {{count}} гадзіну",singularGenitive:"праз {{count}} гадзіны",pluralGenitive:"праз {{count}} гадзін"}}),xDays:Wl({regular:{singularNominative:"{{count}} дзень",singularGenitive:"{{count}} дні",pluralGenitive:"{{count}} дзён"}}),aboutXWeeks:Wl({regular:{singularNominative:"каля {{count}} тыдні",singularGenitive:"каля {{count}} тыдняў",pluralGenitive:"каля {{count}} тыдняў"},future:{singularNominative:"прыблізна праз {{count}} тыдзень",singularGenitive:"прыблізна праз {{count}} тыдні",pluralGenitive:"прыблізна праз {{count}} тыдняў"}}),xWeeks:Wl({regular:{singularNominative:"{{count}} тыдзень",singularGenitive:"{{count}} тыдні",pluralGenitive:"{{count}} тыдняў"}}),aboutXMonths:Wl({regular:{singularNominative:"каля {{count}} месяца",singularGenitive:"каля {{count}} месяцаў",pluralGenitive:"каля {{count}} месяцаў"},future:{singularNominative:"прыблізна праз {{count}} месяц",singularGenitive:"прыблізна праз {{count}} месяцы",pluralGenitive:"прыблізна праз {{count}} месяцаў"}}),xMonths:Wl({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяцы",pluralGenitive:"{{count}} месяцаў"}}),aboutXYears:Wl({regular:{singularNominative:"каля {{count}} года",singularGenitive:"каля {{count}} гадоў",pluralGenitive:"каля {{count}} гадоў"},future:{singularNominative:"прыблізна праз {{count}} год",singularGenitive:"прыблізна праз {{count}} гады",pluralGenitive:"прыблізна праз {{count}} гадоў"}}),xYears:Wl({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} гады",pluralGenitive:"{{count}} гадоў"}}),overXYears:Wl({regular:{singularNominative:"больш за {{count}} год",singularGenitive:"больш за {{count}} гады",pluralGenitive:"больш за {{count}} гадоў"},future:{singularNominative:"больш, чым праз {{count}} год",singularGenitive:"больш, чым праз {{count}} гады",pluralGenitive:"больш, чым праз {{count}} гадоў"}}),almostXYears:Wl({regular:{singularNominative:"амаль {{count}} год",singularGenitive:"амаль {{count}} гады",pluralGenitive:"амаль {{count}} гадоў"},future:{singularNominative:"амаль праз {{count}} год",singularGenitive:"амаль праз {{count}} гады",pluralGenitive:"амаль праз {{count}} гадоў"}})},Ol={date:Vu({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:Vu({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})};function Fl(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 jl={};function zl(){return jl}function $l(e,t){const n=zl(),i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=Fl(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 Hl(e,t,n){return+$l(e,n)==+$l(t,n)}const Ul=["нядзелю","панядзелак","аўторак","сераду","чацвер","пятніцу","суботу"];function Bl(e){return"'у "+Ul[e]+" а' p"}const Gl={lastWeek:(e,t,n)=>{const i=Fl(e),a=i.getDay();return Hl(i,t,n)?Bl(a):function(e){const t=Ul[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=Fl(e),a=i.getDay();return Hl(i,t,n)?Bl(a):function(e){const t=Ul[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"},Xl={code:"be",formatDistance:(e,t,n)=>(n=n||{},Nl[e](t,n)),formatLong:Ol,formatRelative:(e,t,n,i)=>{const a=Gl[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:Qu({values:{narrow:["да н.э.","н.э."],abbreviated:["да н. э.","н. э."],wide:["да нашай эры","нашай эры"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["1-ы кв.","2-і кв.","3-і кв.","4-ы кв."],wide:["1-ы квартал","2-і квартал","3-і квартал","4-ы квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["С","Л","С","К","М","Ч","Л","Ж","В","К","Л","С"],abbreviated:["студз.","лют.","сак.","крас.","май","чэрв.","ліп.","жн.","вер.","кастр.","ліст.","снеж."],wide:["студзень","люты","сакавік","красавік","май","чэрвень","ліпень","жнівень","верасень","кастрычнік","лістапад","снежань"]},defaultWidth:"wide",formattingValues:{narrow:["С","Л","С","К","М","Ч","Л","Ж","В","К","Л","С"],abbreviated:["студз.","лют.","сак.","крас.","мая","чэрв.","ліп.","жн.","вер.","кастр.","ліст.","снеж."],wide:["студзеня","лютага","сакавіка","красавіка","мая","чэрвеня","ліпеня","жніўня","верасня","кастрычніка","лістапада","снежня"]},defaultFormattingWidth:"wide"}),day:Qu({values:{narrow:["Н","П","А","С","Ч","П","С"],short:["нд","пн","аў","ср","чц","пт","сб"],abbreviated:["нядз","пан","аўт","сер","чац","пят","суб"],wide:["нядзеля","панядзелак","аўторак","серада","чацвер","пятніца","субота"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(-?(е|я|га|і|ы|ае|ая|яя|шы|гі|ці|ты|мы))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^((да )?н\.?\s?э\.?)/i,abbreviated:/^((да )?н\.?\s?э\.?)/i,wide:/^(да нашай эры|нашай эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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 Yl(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 Kl(e){return(t,n)=>n&&n.addSuffix?n.comparison&&n.comparison>0?e.future?Yl(e.future,t):"праз "+Yl(e.regular,t):e.past?Yl(e.past,t):Yl(e.regular,t)+" таму":Yl(e.regular,t)}const Vl={lessThanXSeconds:Kl({regular:{one:"менш за секунду",singularNominative:"менш за {{count}} секунду",singularGenitive:"менш за {{count}} секунды",pluralGenitive:"менш за {{count}} секунд"},future:{one:"менш, чым праз секунду",singularNominative:"менш, чым праз {{count}} секунду",singularGenitive:"менш, чым праз {{count}} секунды",pluralGenitive:"менш, чым праз {{count}} секунд"}}),xSeconds:Kl({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:Kl({regular:{one:"менш за хвіліну",singularNominative:"менш за {{count}} хвіліну",singularGenitive:"менш за {{count}} хвіліны",pluralGenitive:"менш за {{count}} хвілін"},future:{one:"менш, чым праз хвіліну",singularNominative:"менш, чым праз {{count}} хвіліну",singularGenitive:"менш, чым праз {{count}} хвіліны",pluralGenitive:"менш, чым праз {{count}} хвілін"}}),xMinutes:Kl({regular:{singularNominative:"{{count}} хвіліна",singularGenitive:"{{count}} хвіліны",pluralGenitive:"{{count}} хвілін"},past:{singularNominative:"{{count}} хвіліну таму",singularGenitive:"{{count}} хвіліны таму",pluralGenitive:"{{count}} хвілін таму"},future:{singularNominative:"праз {{count}} хвіліну",singularGenitive:"праз {{count}} хвіліны",pluralGenitive:"праз {{count}} хвілін"}}),aboutXHours:Kl({regular:{singularNominative:"каля {{count}} гадзіны",singularGenitive:"каля {{count}} гадзін",pluralGenitive:"каля {{count}} гадзін"},future:{singularNominative:"прыблізна праз {{count}} гадзіну",singularGenitive:"прыблізна праз {{count}} гадзіны",pluralGenitive:"прыблізна праз {{count}} гадзін"}}),xHours:Kl({regular:{singularNominative:"{{count}} гадзіна",singularGenitive:"{{count}} гадзіны",pluralGenitive:"{{count}} гадзін"},past:{singularNominative:"{{count}} гадзіну таму",singularGenitive:"{{count}} гадзіны таму",pluralGenitive:"{{count}} гадзін таму"},future:{singularNominative:"праз {{count}} гадзіну",singularGenitive:"праз {{count}} гадзіны",pluralGenitive:"праз {{count}} гадзін"}}),xDays:Kl({regular:{singularNominative:"{{count}} дзень",singularGenitive:"{{count}} дні",pluralGenitive:"{{count}} дзён"}}),aboutXWeeks:Kl({regular:{singularNominative:"каля {{count}} тыдні",singularGenitive:"каля {{count}} тыдняў",pluralGenitive:"каля {{count}} тыдняў"},future:{singularNominative:"прыблізна праз {{count}} тыдзень",singularGenitive:"прыблізна праз {{count}} тыдні",pluralGenitive:"прыблізна праз {{count}} тыдняў"}}),xWeeks:Kl({regular:{singularNominative:"{{count}} тыдзень",singularGenitive:"{{count}} тыдні",pluralGenitive:"{{count}} тыдняў"}}),aboutXMonths:Kl({regular:{singularNominative:"каля {{count}} месяца",singularGenitive:"каля {{count}} месяцаў",pluralGenitive:"каля {{count}} месяцаў"},future:{singularNominative:"прыблізна праз {{count}} месяц",singularGenitive:"прыблізна праз {{count}} месяцы",pluralGenitive:"прыблізна праз {{count}} месяцаў"}}),xMonths:Kl({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяцы",pluralGenitive:"{{count}} месяцаў"}}),aboutXYears:Kl({regular:{singularNominative:"каля {{count}} года",singularGenitive:"каля {{count}} гадоў",pluralGenitive:"каля {{count}} гадоў"},future:{singularNominative:"прыблізна праз {{count}} год",singularGenitive:"прыблізна праз {{count}} гады",pluralGenitive:"прыблізна праз {{count}} гадоў"}}),xYears:Kl({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} гады",pluralGenitive:"{{count}} гадоў"}}),overXYears:Kl({regular:{singularNominative:"больш за {{count}} год",singularGenitive:"больш за {{count}} гады",pluralGenitive:"больш за {{count}} гадоў"},future:{singularNominative:"больш, чым праз {{count}} год",singularGenitive:"больш, чым праз {{count}} гады",pluralGenitive:"больш, чым праз {{count}} гадоў"}}),almostXYears:Kl({regular:{singularNominative:"амаль {{count}} год",singularGenitive:"амаль {{count}} гады",pluralGenitive:"амаль {{count}} гадоў"},future:{singularNominative:"амаль праз {{count}} год",singularGenitive:"амаль праз {{count}} гады",pluralGenitive:"амаль праз {{count}} гадоў"}})},ql={date:Vu({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:Vu({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},Jl=["нядзелю","панядзелак","аўторак","сераду","чацьвер","пятніцу","суботу"];function Ql(e){return"'у "+Jl[e]+" а' p"}const Zl={lastWeek:(e,t,n)=>{const i=Fl(e),a=i.getDay();return Hl(i,t,n)?Ql(a):function(e){const t=Jl[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=Fl(e),a=i.getDay();return Hl(i,t,n)?Ql(a):function(e){const t=Jl[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"},eh={code:"be-tarask",formatDistance:(e,t,n)=>(n=n||{},Vl[e](t,n)),formatLong:ql,formatRelative:(e,t,n,i)=>{const a=Zl[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:Qu({values:{narrow:["да н.э.","н.э."],abbreviated:["да н. э.","н. э."],wide:["да нашай эры","нашай эры"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["1-ы кв.","2-і кв.","3-і кв.","4-ы кв."],wide:["1-ы квартал","2-і квартал","3-і квартал","4-ы квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["С","Л","С","К","Т","Ч","Л","Ж","В","К","Л","С"],abbreviated:["студз.","лют.","сак.","крас.","трав.","чэрв.","ліп.","жн.","вер.","кастр.","ліст.","сьнеж."],wide:["студзень","люты","сакавік","красавік","травень","чэрвень","ліпень","жнівень","верасень","кастрычнік","лістапад","сьнежань"]},defaultWidth:"wide",formattingValues:{narrow:["С","Л","С","К","Т","Ч","Л","Ж","В","К","Л","С"],abbreviated:["студз.","лют.","сак.","крас.","трав.","чэрв.","ліп.","жн.","вер.","кастр.","ліст.","сьнеж."],wide:["студзеня","лютага","сакавіка","красавіка","траўня","чэрвеня","ліпеня","жніўня","верасня","кастрычніка","лістапада","сьнежня"]},defaultFormattingWidth:"wide"}),day:Qu({values:{narrow:["Н","П","А","С","Ч","П","С"],short:["нд","пн","аў","ср","чц","пт","сб"],abbreviated:["нядз","пан","аўт","сер","чаць","пят","суб"],wide:["нядзеля","панядзелак","аўторак","серада","чацьвер","пятніца","субота"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(-?(е|я|га|і|ы|ае|ая|яя|шы|гі|ці|ты|мы))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^((да )?н\.?\s?э\.?)/i,abbreviated:/^((да )?н\.?\s?э\.?)/i,wide:/^(да нашай эры|нашай эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},th={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}} години"}},nh={date:Vu({formats:{full:"EEEE, dd MMMM yyyy",long:"dd MMMM yyyy",medium:"dd MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{any:"{{date}} {{time}}"},defaultWidth:"any"})},ih=["неделя","понеделник","вторник","сряда","четвъртък","петък","събота"];function ah(e){const t=ih[e];return 2===e?"'във "+t+" в' p":"'в "+t+" в' p"}const rh={lastWeek:(e,t,n)=>{const i=Fl(e),a=i.getDay();return Hl(i,t,n)?ah(a):function(e){const t=ih[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=Fl(e),a=i.getDay();return Hl(i,t,n)?ah(a):function(e){const t=ih[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 oh(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 sh={code:"bg",formatDistance:(e,t,n)=>{let i;const a=th[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:nh,formatRelative:(e,t,n,i)=>{const a=rh[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 oh(0,i,"ев","ева","ево");if(n%1e3==0)return oh(n,i,"ен","на","но");if(n%100==0)return oh(n,i,"тен","тна","тно");const a=n%100;if(a>20||a<10)switch(a%10){case 1:return oh(n,i,"ви","ва","во");case 2:return oh(n,i,"ри","ра","ро");case 7:case 8:return oh(n,i,"ми","ма","мо")}return oh(n,i,"ти","та","то")},era:Qu({values:{narrow:["пр.н.е.","н.е."],abbreviated:["преди н. е.","н. е."],wide:["преди новата ера","новата ера"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["1-во тримес.","2-ро тримес.","3-то тримес.","4-то тримес."],wide:["1-во тримесечие","2-ро тримесечие","3-то тримесечие","4-то тримесечие"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{abbreviated:["яну","фев","мар","апр","май","юни","юли","авг","сеп","окт","ное","дек"],wide:["януари","февруари","март","април","май","юни","юли","август","септември","октомври","ноември","декември"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["Н","П","В","С","Ч","П","С"],short:["нд","пн","вт","ср","чт","пт","сб"],abbreviated:["нед","пон","вто","сря","чет","пет","съб"],wide:["неделя","понеделник","вторник","сряда","четвъртък","петък","събота"]},defaultWidth:"wide"}),dayPeriod:Qu({values:{wide:{am:"преди обяд",pm:"след обяд",midnight:"в полунощ",noon:"на обяд",morning:"сутринта",afternoon:"следобед",evening:"вечерта",night:"през нощта"}},defaultWidth:"wide"})},match:{ordinalNumber:tl({matchPattern:/^(\d+)(-?[врмт][аи]|-?т?(ен|на)|-?(ев|ева))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^((пр)?н\.?\s?е\.?)/i,abbreviated:/^((пр)?н\.?\s?е\.?)/i,wide:/^(преди новата ера|новата ера|нова ера)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^п/i,/^н/i]},defaultParseWidth:"any"}),quarter:el({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:el({matchPatterns:{abbreviated:/^(яну|фев|мар|апр|май|юни|юли|авг|сеп|окт|ное|дек)/i,wide:/^(януари|февруари|март|април|май|юни|юли|август|септември|октомври|ноември|декември)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^май/i,/^юн/i,/^юл/i,/^ав/i,/^се/i,/^окт/i,/^но/i,/^де/i]},defaultParseWidth:"any"}),day:el({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:el({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}},dh={locale:{1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},number:{"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"}};function uh(e){return e.toString().replace(/\d/g,(function(e){return dh.locale[e]}))}const lh={ordinalNumber:(e,t)=>{const n=Number(e),i=uh(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:Qu({values:{narrow:["খ্রিঃপূঃ","খ্রিঃ"],abbreviated:["খ্রিঃপূর্ব","খ্রিঃ"],wide:["খ্রিস্টপূর্ব","খ্রিস্টাব্দ"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["১","২","৩","৪"],abbreviated:["১ত্রৈ","২ত্রৈ","৩ত্রৈ","৪ত্রৈ"],wide:["১ম ত্রৈমাসিক","২য় ত্রৈমাসিক","৩য় ত্রৈমাসিক","৪র্থ ত্রৈমাসিক"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["জানু","ফেব্রু","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্ট","অক্টো","নভে","ডিসে"],abbreviated:["জানু","ফেব্রু","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্ট","অক্টো","নভে","ডিসে"],wide:["জানুয়ারি","ফেব্রুয়ারি","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["র","সো","ম","বু","বৃ","শু","শ"],short:["রবি","সোম","মঙ্গল","বুধ","বৃহ","শুক্র","শনি"],abbreviated:["রবি","সোম","মঙ্গল","বুধ","বৃহ","শুক্র","শনি"],wide:["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার ","শুক্রবার","শনিবার"]},defaultWidth:"wide"}),dayPeriod:Qu({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"})},hh={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}} বছর"}},ch={date:Vu({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} {{time}} 'সময়'",long:"{{date}} {{time}} 'সময়'",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},mh={lastWeek:"'গত' eeee 'সময়' p",yesterday:"'গতকাল' 'সময়' p",today:"'আজ' 'সময়' p",tomorrow:"'আগামীকাল' 'সময়' p",nextWeek:"eeee 'সময়' p",other:"P"},fh={ordinalNumber:tl({matchPattern:/^(\d+)(ম|য়|র্থ|ষ্ঠ|শে|ই|তম)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(খ্রিঃপূঃ|খ্রিঃ)/i,abbreviated:/^(খ্রিঃপূর্ব|খ্রিঃ)/i,wide:/^(খ্রিস্টপূর্ব|খ্রিস্টাব্দ)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^খ্রিঃপূঃ/i,/^খ্রিঃ/i],abbreviated:[/^খ্রিঃপূর্ব/i,/^খ্রিঃ/i],wide:[/^খ্রিস্টপূর্ব/i,/^খ্রিস্টাব্দ/i]},defaultParseWidth:"wide"}),quarter:el({matchPatterns:{narrow:/^[১২৩৪]/i,abbreviated:/^[১২৩৪]ত্রৈ/i,wide:/^[১২৩৪](ম|য়|র্থ)? ত্রৈমাসিক/i},defaultMatchWidth:"wide",parsePatterns:{any:[/১/i,/২/i,/৩/i,/৪/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:el({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:el({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:el({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"})},gh={code:"bn",formatDistance:(e,t,n)=>{let i;const a=hh[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",uh(t)),n?.addSuffix?n.comparison&&n.comparison>0?i+" এর মধ্যে":i+" আগে":i},formatLong:ch,formatRelative:(e,t,n,i)=>mh[e],localize:lh,match:fh,options:{weekStartsOn:0,firstWeekContainsDate:1}},ph={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"}},vh={date:Vu({formats:{full:"EEEE, d. MMMM yyyy.",long:"d. MMMM yyyy.",medium:"d. MMM yy.",short:"dd. MM. yy."},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss (zzzz)",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'u' {{time}}",long:"{{date}} 'u' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},yh={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"},bh={ordinalNumber:(e,t)=>{const n=Number(e);return String(n)+"."},era:Qu({values:{narrow:["pr.n.e.","AD"],abbreviated:["pr. Hr.","po. Hr."],wide:["Prije Hrista","Poslije Hrista"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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"})},wh={ordinalNumber:tl({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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"})},kh={code:"bs",formatDistance:(e,t,n)=>{let i;const a=ph[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:vh,formatRelative:(e,t,n,i)=>{const a=yh[e];return"function"==typeof a?a(t):a},localize:bh,match:wh,options:{weekStartsOn:1,firstWeekContainsDate:4}},Mh={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"}},Sh={date:Vu({formats:{full:"EEEE, d 'de' MMMM y",long:"d 'de' MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'a les' {{time}}",long:"{{date}} 'a les' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ph={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"},Eh={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"},Th={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:Qu({values:{narrow:["aC","dC"],abbreviated:["a. de C.","d. de C."],wide:["abans de Crist","després de Crist"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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"})},Ah={ordinalNumber:tl({matchPattern:/^(\d+)(è|r|n|r|t)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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"})},xh={code:"ca",formatDistance:(e,t,n)=>{let i;const a=Mh[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:Sh,formatRelative:(e,t,n,i)=>1!==t.getHours()?Eh[e]:Ph[e],localize:Th,match:Ah,options:{weekStartsOn:1,firstWeekContainsDate:4}},Ch={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}} ساڵ"}},Lh={date:Vu({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} 'کاتژمێر' {{time}}",long:"{{date}} 'کاتژمێر' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Dh={lastWeek:"'هەفتەی ڕابردوو' eeee 'کاتژمێر' p",yesterday:"'دوێنێ کاتژمێر' p",today:"'ئەمڕۆ کاتژمێر' p",tomorrow:"'بەیانی کاتژمێر' p",nextWeek:"eeee 'کاتژمێر' p",other:"P"},Ih={ordinalNumber:(e,t)=>String(e),era:Qu({values:{narrow:["پ","د"],abbreviated:["پ-ز","د-ز"],wide:["پێش زاین","دوای زاین"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["چ1م","چ2م","چ3م","چ4م"],wide:["چارەگی یەکەم","چارەگی دووەم","چارەگی سێیەم","چارەگی چوارەم"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["ک-د","ش","ئا","ن","م","ح","ت","ئا","ئە","تش-ی","تش-د","ک-ی"],abbreviated:["کان-دوو","شوب","ئاد","نیس","مایس","حوز","تەم","ئاب","ئەل","تش-یەک","تش-دوو","کان-یەک"],wide:["کانوونی دووەم","شوبات","ئادار","نیسان","مایس","حوزەیران","تەمموز","ئاب","ئەیلول","تشرینی یەکەم","تشرینی دووەم","کانوونی یەکەم"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["ی-ش","د-ش","س-ش","چ-ش","پ-ش","هە","ش"],short:["یە-شە","دوو-شە","سێ-شە","چو-شە","پێ-شە","هەی","شە"],abbreviated:["یەک-شەم","دوو-شەم","سێ-شەم","چوار-شەم","پێنج-شەم","هەینی","شەمە"],wide:["یەک شەمە","دوو شەمە","سێ شەمە","چوار شەمە","پێنج شەمە","هەینی","شەمە"]},defaultWidth:"wide"}),dayPeriod:Qu({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"})},Rh={ordinalNumber:tl({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(پ|د)/i,abbreviated:/^(پ-ز|د.ز)/i,wide:/^(پێش زاین| دوای زاین)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^د/g,/^پ/g]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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"})},_h={code:"ckb",formatDistance:(e,t,n)=>{let i;const a=Ch[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:Lh,formatRelative:(e,t,n,i)=>Dh[e],localize:Ih,match:Rh,options:{weekStartsOn:0,firstWeekContainsDate:1}},Wh={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ů"}}},Nh={date:Vu({formats:{full:"EEEE, d. MMMM yyyy",long:"d. MMMM yyyy",medium:"d. M. yyyy",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'v' {{time}}",long:"{{date}} 'v' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Oh=["neděli","pondělí","úterý","středu","čtvrtek","pátek","sobotu"],Fh={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 "+Oh[t]+" o' p"},other:"P"},jh={ordinalNumber:(e,t)=>Number(e)+".",era:Qu({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:Qu({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:Qu({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:Qu({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:Qu({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"})},zh={ordinalNumber:tl({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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"})},$h={code:"cs",formatDistance:(e,t,n)=>{let i;const a=Wh[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:Nh,formatRelative:(e,t)=>{const n=Fh[e];return"function"==typeof n?n(t):n},localize:jh,match:zh,options:{weekStartsOn:1,firstWeekContainsDate:4}},Hh={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"}},Uh={date:Vu({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} 'am' {{time}}",long:"{{date}} 'am' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Bh={lastWeek:"eeee 'diwethaf am' p",yesterday:"'ddoe am' p",today:"'heddiw am' p",tomorrow:"'yfory am' p",nextWeek:"eeee 'am' p",other:"P"},Gh={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:Qu({values:{narrow:["C","O"],abbreviated:["CC","OC"],wide:["Cyn Crist","Ar ôl Crist"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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"})},Xh={ordinalNumber:tl({matchPattern:/^(\d+)(af|ail|ydd|ed|fed|eg|ain)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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"})},Yh={code:"cy",formatDistance:(e,t,n)=>{let i;const a=Hh[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:Uh,formatRelative:(e,t,n,i)=>Bh[e],localize:Gh,match:Xh,options:{weekStartsOn:0,firstWeekContainsDate:1}},Kh={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"}},Vh={date:Vu({formats:{full:"EEEE 'den' d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'kl'. {{time}}",long:"{{date}} 'kl'. {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},qh={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"},Jh={ordinalNumber:(e,t)=>Number(e)+".",era:Qu({values:{narrow:["fvt","vt"],abbreviated:["f.v.t.","v.t."],wide:["før vesterlandsk tidsregning","vesterlandsk tidsregning"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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"})},Qh={ordinalNumber:tl({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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"})},Zh={code:"da",formatDistance:(e,t,n)=>{let i;const a=Kh[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:Vh,formatRelative:(e,t,n,i)=>qh[e],localize:Jh,match:Qh,options:{weekStartsOn:1,firstWeekContainsDate:4}},ec={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"}}},tc=(e,t,n)=>{let i;const a=n?.addSuffix?ec[e].withPreposition:ec[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},nc={date:Vu({formats:{full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},ic={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},ac=(e,t,n,i)=>ic[e],rc={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"]},oc={narrow:rc.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:rc.wide},sc={ordinalNumber:e=>Number(e)+".",era:Qu({values:{narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({values:rc,formattingValues:oc,defaultWidth:"wide"}),day:Qu({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:Qu({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"})},dc={ordinalNumber:tl({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e)}),era:el({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:el({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:el({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:el({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:el({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"})},uc={code:"de",formatDistance:tc,formatLong:nc,formatRelative:ac,localize:sc,match:dc,options:{weekStartsOn:1,firstWeekContainsDate:4}},lc={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"]},hc={narrow:lc.narrow,abbreviated:["Jän.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:lc.wide},cc={ordinalNumber:e=>Number(e)+".",era:Qu({values:{narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({values:lc,formattingValues:hc,defaultWidth:"wide"}),day:Qu({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:Qu({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"})},mc={code:"de-AT",formatDistance:tc,formatLong:nc,formatRelative:ac,localize:cc,match:dc,options:{weekStartsOn:1,firstWeekContainsDate:4}},fc={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}} χρόνια"}},gc={date:Vu({formats:{full:"EEEE, d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"d/M/yy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} - {{time}}",long:"{{date}} - {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},pc={lastWeek:e=>6===e.getDay()?"'το προηγούμενο' eeee 'στις' p":"'την προηγούμενη' eeee 'στις' p",yesterday:"'χθες στις' p",today:"'σήμερα στις' p",tomorrow:"'αύριο στις' p",nextWeek:"eeee 'στις' p",other:"P"},vc={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:Qu({values:{narrow:["πΧ","μΧ"],abbreviated:["π.Χ.","μ.Χ."],wide:["προ Χριστού","μετά Χριστόν"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["Τ1","Τ2","Τ3","Τ4"],wide:["1ο τρίμηνο","2ο τρίμηνο","3ο τρίμηνο","4ο τρίμηνο"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μάρ","Απρ","Μάι","Ιούν","Ιούλ","Αύγ","Σεπ","Οκτ","Νοέ","Δεκ"],wide:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"]},defaultWidth:"wide",formattingValues:{narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μαρ","Απρ","Μαΐ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],wide:["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"]},defaultFormattingWidth:"wide"}),day:Qu({values:{narrow:["Κ","Δ","T","Τ","Π","Π","Σ"],short:["Κυ","Δε","Τρ","Τε","Πέ","Πα","Σά"],abbreviated:["Κυρ","Δευ","Τρί","Τετ","Πέμ","Παρ","Σάβ"],wide:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},defaultWidth:"wide"}),dayPeriod:Qu({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"})},yc={ordinalNumber:tl({matchPattern:/^(\d+)(ος|η|ο)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(πΧ|μΧ)/i,abbreviated:/^(π\.?\s?χ\.?|π\.?\s?κ\.?\s?χ\.?|μ\.?\s?χ\.?|κ\.?\s?χ\.?)/i,wide:/^(προ Χριστο(ύ|υ)|πριν απ(ό|ο) την Κοιν(ή|η) Χρονολογ(ί|ι)α|μετ(ά|α) Χριστ(ό|ο)ν|Κοιν(ή|η) Χρονολογ(ί|ι)α)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^π/i,/^(μ|κ)/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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"})},bc={code:"el",formatDistance:(e,t,n)=>{let i;const a=fc[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:gc,formatRelative:(e,t)=>{const n=pc[e];return"function"==typeof n?n(t):n},localize:vc,match:yc,options:{weekStartsOn:1,firstWeekContainsDate:4}},wc={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"}},kc=(e,t,n)=>{let i;const a=wc[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},Mc={date:Vu({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Sc={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Pc=(e,t,n,i)=>Sc[e],Ec={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:Qu({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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"})},Tc={ordinalNumber:tl({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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"})},Ac={code:"en-AU",formatDistance:kc,formatLong:Mc,formatRelative:Pc,localize:Ec,match:Tc,options:{weekStartsOn:1,firstWeekContainsDate:4}},xc={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"}},Cc={code:"en-CA",formatDistance:(e,t,n)=>{let i;const a=xc[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:Vu({formats:{full:"EEEE, MMMM do, yyyy",long:"MMMM do, yyyy",medium:"MMM d, yyyy",short:"yyyy-MM-dd"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:Pc,localize:Ec,match:Tc,options:{weekStartsOn:0,firstWeekContainsDate:1}},Lc={date:Vu({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Dc={code:"en-GB",formatDistance:kc,formatLong:Lc,formatRelative:Pc,localize:Ec,match:Tc,options:{weekStartsOn:1,firstWeekContainsDate:4}},Ic={code:"en-IE",formatDistance:kc,formatLong:Lc,formatRelative:Pc,localize:Ec,match:Tc,options:{weekStartsOn:1,firstWeekContainsDate:4}},Rc={code:"en-IN",formatDistance:kc,formatLong:{date:Vu({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM, yyyy",medium:"d MMM, yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:Pc,localize:Ec,match:Tc,options:{weekStartsOn:1,firstWeekContainsDate:4}},_c={code:"en-NZ",formatDistance:kc,formatLong:{date:Vu({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:Pc,localize:Ec,match:Tc,options:{weekStartsOn:1,firstWeekContainsDate:4}},Wc={code:"en-US",formatDistance:kc,formatLong:{date:Vu({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:Pc,localize:Ec,match:Tc,options:{weekStartsOn:0,firstWeekContainsDate:1}},Nc={code:"en-ZA",formatDistance:kc,formatLong:{date:Vu({formats:{full:"EEEE, dd MMMM yyyy",long:"dd MMMM yyyy",medium:"dd MMM yyyy",short:"yyyy/MM/dd"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:Pc,localize:Ec,match:Tc,options:{weekStartsOn:0,firstWeekContainsDate:1}},Oc={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"}},Fc={date:Vu({formats:{full:"EEEE, do 'de' MMMM y",long:"y-MMMM-dd",medium:"y-MMM-dd",short:"yyyy-MM-dd"},defaultWidth:"full"}),time:Vu({formats:{full:"Ho 'horo kaj' m:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{any:"{{date}} {{time}}"},defaultWidth:"any"})},jc={lastWeek:"'pasinta' eeee 'je' p",yesterday:"'hieraŭ je' p",today:"'hodiaŭ je' p",tomorrow:"'morgaŭ je' p",nextWeek:"eeee 'je' p",other:"P"},zc={code:"eo",formatDistance:(e,t,n)=>{let i;const a=Oc[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:Fc,formatRelative:(e,t,n,i)=>jc[e],localize:{ordinalNumber:e=>Number(e)+"-a",era:Qu({values:{narrow:["aK","pK"],abbreviated:["a.K.E.","p.K.E."],wide:["antaŭ Komuna Erao","Komuna Erao"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)(-?a)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:el({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:el({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:el({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:el({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:el({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}},$c={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"}},Hc={date:Vu({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:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Uc={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"},Bc={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"},Gc={code:"es",formatDistance:(e,t,n)=>{let i;const a=$c[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:Hc,formatRelative:(e,t,n,i)=>1!==t.getHours()?Bc[e]:Uc[e],localize:{ordinalNumber:(e,t)=>Number(e)+"º",era:Qu({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:el({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:el({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:el({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:el({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:el({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}},Xc={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"}}},Yc={date:Vu({formats:{full:"EEEE, d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'kell' {{time}}",long:"{{date}} 'kell' {{time}}",medium:"{{date}}. {{time}}",short:"{{date}}. {{time}}"},defaultWidth:"full"})},Kc={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"},Vc={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"]},qc={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"]},Jc={code:"et",formatDistance:(e,t,n)=>{const i=n?.addSuffix?Xc[e].withPreposition:Xc[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:Yc,formatRelative:(e,t,n,i)=>Kc[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Qu({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:Qu({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:Qu({values:Vc,defaultWidth:"wide",formattingValues:Vc,defaultFormattingWidth:"wide"}),day:Qu({values:qc,defaultWidth:"wide",formattingValues:qc,defaultFormattingWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^\d+\./i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},Qc={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"}},Zc={date:Vu({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:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'tan' {{time}}",long:"{{date}} 'tan' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},em={lastWeek:"'joan den' eeee, LT",yesterday:"'atzo,' p",today:"'gaur,' p",tomorrow:"'bihar,' p",nextWeek:"eeee, p",other:"P"},tm={lastWeek:"'joan den' eeee, p",yesterday:"'atzo,' p",today:"'gaur,' p",tomorrow:"'bihar,' p",nextWeek:"eeee, p",other:"P"},nm={code:"eu",formatDistance:(e,t,n)=>{let i;const a=Qc[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:Zc,formatRelative:(e,t)=>1!==t.getHours()?tm[e]:em[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Qu({values:{narrow:["k.a.","k.o."],abbreviated:["k.a.","k.o."],wide:["kristo aurretik","kristo ondoren"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)(.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},im={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}} سال"}},am={date:Vu({formats:{full:"EEEE do MMMM y",long:"do MMMM y",medium:"d MMM y",short:"yyyy/MM/dd"},defaultWidth:"full"}),time:Vu({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:Vu({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:"fa-IR",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)=>String(e),era:Qu({values:{narrow:["ق","ب"],abbreviated:["ق.م.","ب.م."],wide:["قبل از میلاد","بعد از میلاد"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["س‌م1","س‌م2","س‌م3","س‌م4"],wide:["سه‌ماهه 1","سه‌ماهه 2","سه‌ماهه 3","سه‌ماهه 4"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["ژ","ف","م","آ","م","ج","ج","آ","س","ا","ن","د"],abbreviated:["ژانـ","فور","مارس","آپر","می","جون","جولـ","آگو","سپتـ","اکتـ","نوامـ","دسامـ"],wide:["ژانویه","فوریه","مارس","آپریل","می","جون","جولای","آگوست","سپتامبر","اکتبر","نوامبر","دسامبر"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["ی","د","س","چ","پ","ج","ش"],short:["1ش","2ش","3ش","4ش","5ش","ج","ش"],abbreviated:["یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],wide:["یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(ق|ب)/i,abbreviated:/^(ق\.?\s?م\.?|ق\.?\s?د\.?\s?م\.?|م\.?\s?|د\.?\s?م\.?)/i,wide:/^(قبل از میلاد|قبل از دوران مشترک|میلادی|دوران مشترک|بعد از میلاد)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^قبل/i,/^بعد/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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 sm(e){return e.replace(/sekuntia?/,"sekunnin")}function dm(e){return e.replace(/minuuttia?/,"minuutin")}function um(e){return e.replace(/tuntia?/,"tunnin")}function lm(e){return e.replace(/(viikko|viikkoa)/,"viikon")}function hm(e){return e.replace(/(kuukausi|kuukautta)/,"kuukauden")}function cm(e){return e.replace(/(vuosi|vuotta)/,"vuoden")}const mm={lessThanXSeconds:{one:"alle sekunti",other:"alle {{count}} sekuntia",futureTense:sm},xSeconds:{one:"sekunti",other:"{{count}} sekuntia",futureTense:sm},halfAMinute:{one:"puoli minuuttia",other:"puoli minuuttia",futureTense:e=>"puolen minuutin"},lessThanXMinutes:{one:"alle minuutti",other:"alle {{count}} minuuttia",futureTense:dm},xMinutes:{one:"minuutti",other:"{{count}} minuuttia",futureTense:dm},aboutXHours:{one:"noin tunti",other:"noin {{count}} tuntia",futureTense:um},xHours:{one:"tunti",other:"{{count}} tuntia",futureTense:um},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:lm},xWeeks:{one:"viikko",other:"{{count}} viikkoa",futureTense:lm},aboutXMonths:{one:"noin kuukausi",other:"noin {{count}} kuukautta",futureTense:hm},xMonths:{one:"kuukausi",other:"{{count}} kuukautta",futureTense:hm},aboutXYears:{one:"noin vuosi",other:"noin {{count}} vuotta",futureTense:cm},xYears:{one:"vuosi",other:"{{count}} vuotta",futureTense:cm},overXYears:{one:"yli vuosi",other:"yli {{count}} vuotta",futureTense:cm},almostXYears:{one:"lähes vuosi",other:"lähes {{count}} vuotta",futureTense:cm}},fm={date:Vu({formats:{full:"eeee d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"d.M.y"},defaultWidth:"full"}),time:Vu({formats:{full:"HH.mm.ss zzzz",long:"HH.mm.ss z",medium:"HH.mm.ss",short:"HH.mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'klo' {{time}}",long:"{{date}} 'klo' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},gm={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"},pm={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"]},vm={narrow:pm.narrow,abbreviated:pm.abbreviated,wide:["tammikuuta","helmikuuta","maaliskuuta","huhtikuuta","toukokuuta","kesäkuuta","heinäkuuta","elokuuta","syyskuuta","lokakuuta","marraskuuta","joulukuuta"]},ym={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"]},bm={narrow:ym.narrow,short:ym.short,abbreviated:ym.abbreviated,wide:["sunnuntaina","maanantaina","tiistaina","keskiviikkona","torstaina","perjantaina","lauantaina"]},wm={ordinalNumber:(e,t)=>Number(e)+".",era:Qu({values:{narrow:["eaa.","jaa."],abbreviated:["eaa.","jaa."],wide:["ennen ajanlaskun alkua","jälkeen ajanlaskun alun"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({values:pm,defaultWidth:"wide",formattingValues:vm,defaultFormattingWidth:"wide"}),day:Qu({values:ym,defaultWidth:"wide",formattingValues:bm,defaultFormattingWidth:"wide"}),dayPeriod:Qu({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"})},km={ordinalNumber:tl({matchPattern:/^(\d+)(\.)/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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"})},Mm={code:"fi",formatDistance:(e,t,n)=>{const i=mm[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:fm,formatRelative:(e,t,n,i)=>gm[e],localize:wm,match:km,options:{weekStartsOn:1,firstWeekContainsDate:4}},Sm={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"}},Pm=(e,t,n)=>{let i;const a=Sm[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},Em={date:Vu({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Tm={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},Am=(e,t,n,i)=>Tm[e],xm=["MMM","MMMM"],Cm={preprocessor:(e,t)=>{if(1===e.getDate())return t;return t.some((e=>e.isToken&&xm.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:Qu({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:Qu({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:Qu({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:Qu({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:Qu({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"})},Lm={ordinalNumber:tl({matchPattern:/^(\d+)(ième|ère|ème|er|e)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e)}),era:el({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:el({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:el({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:el({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:el({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"})},Dm={code:"fr",formatDistance:Pm,formatLong:Em,formatRelative:Am,localize:Cm,match:Lm,options:{weekStartsOn:1,firstWeekContainsDate:4}},Im={code:"fr-CA",formatDistance:Pm,formatLong:{date:Vu({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"yy-MM-dd"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:Am,localize:Cm,match:Lm,options:{weekStartsOn:0,firstWeekContainsDate:1}},Rm={date:Vu({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},_m={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"},Wm={code:"fr-CH",formatDistance:Pm,formatLong:Rm,formatRelative:(e,t,n,i)=>_m[e],localize:Cm,match:Lm,options:{weekStartsOn:1,firstWeekContainsDate:4}},Nm={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"}},Om={date:Vu({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd-MM-y"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Fm={lastWeek:"'ôfrûne' eeee 'om' p",yesterday:"'juster om' p",today:"'hjoed om' p",tomorrow:"'moarn om' p",nextWeek:"eeee 'om' p",other:"P"},jm={code:"fy",formatDistance:(e,t,n)=>{let i;const a=Nm[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:Om,formatRelative:(e,t,n,i)=>Fm[e],localize:{ordinalNumber:(e,t)=>Number(e)+"e",era:Qu({values:{narrow:["f.K.","n.K."],abbreviated:["f.Kr.","n.Kr."],wide:["foar Kristus","nei Kristus"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)e?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^([fn]\.? ?K\.?)/,abbreviated:/^([fn]\. ?Kr\.?)/,wide:/^((foar|nei) Kristus)/},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/,/^n/]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},zm={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"}},$m={date:Vu({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} 'aig' {{time}}",long:"{{date}} 'aig' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Hm={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"},Um={code:"gd",formatDistance:(e,t,n)=>{let i;const a=zm[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:$m,formatRelative:(e,t,n,i)=>Hm[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:Qu({values:{narrow:["R","A"],abbreviated:["RC","AD"],wide:["ro Chrìosta","anno domini"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)(d|na|tr|mh)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},Bm={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"}},Gm={date:Vu({formats:{full:"EEEE, d 'de' MMMM y",long:"d 'de' MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'ás' {{time}}",long:"{{date}} 'ás' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Xm={lastWeek:"'o' eeee 'pasado á' LT",yesterday:"'onte á' p",today:"'hoxe á' p",tomorrow:"'mañá á' p",nextWeek:"eeee 'á' p",other:"P"},Ym={lastWeek:"'o' eeee 'pasado ás' p",yesterday:"'onte ás' p",today:"'hoxe ás' p",tomorrow:"'mañá ás' p",nextWeek:"eeee 'ás' p",other:"P"},Km={code:"gl",formatDistance:(e,t,n)=>{let i;const a=Bm[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:Gm,formatRelative:(e,t,n,i)=>1!==t.getHours()?Ym[e]:Xm[e],localize:{ordinalNumber:(e,t)=>Number(e)+"º",era:Qu({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","despois de cristo"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},Vm={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}} વર્ષ"}},qm={date:Vu({formats:{full:"EEEE, d MMMM, y",long:"d MMMM, y",medium:"d MMM, y",short:"d/M/yy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Jm={lastWeek:"'પાછલા' eeee p",yesterday:"'ગઈકાલે' p",today:"'આજે' p",tomorrow:"'આવતીકાલે' p",nextWeek:"eeee p",other:"P"},Qm={code:"gu",formatDistance:(e,t,n)=>{let i;const a=Vm[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:qm,formatRelative:(e,t,n,i)=>Jm[e],localize:{ordinalNumber:(e,t)=>String(e),era:Qu({values:{narrow:["ઈસપૂ","ઈસ"],abbreviated:["ઈ.સ.પૂર્વે","ઈ.સ."],wide:["ઈસવીસન પૂર્વે","ઈસવીસન"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1લો ત્રિમાસ","2જો ત્રિમાસ","3જો ત્રિમાસ","4થો ત્રિમાસ"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["જા","ફે","મા","એ","મે","જૂ","જુ","ઓ","સ","ઓ","ન","ડિ"],abbreviated:["જાન્યુ","ફેબ્રુ","માર્ચ","એપ્રિલ","મે","જૂન","જુલાઈ","ઑગસ્ટ","સપ્ટે","ઓક્ટો","નવે","ડિસે"],wide:["જાન્યુઆરી","ફેબ્રુઆરી","માર્ચ","એપ્રિલ","મે","જૂન","જુલાઇ","ઓગસ્ટ","સપ્ટેમ્બર","ઓક્ટોબર","નવેમ્બર","ડિસેમ્બર"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["ર","સો","મં","બુ","ગુ","શુ","શ"],short:["ર","સો","મં","બુ","ગુ","શુ","શ"],abbreviated:["રવિ","સોમ","મંગળ","બુધ","ગુરુ","શુક્ર","શનિ"],wide:["રવિવાર","સોમવાર","મંગળવાર","બુધવાર","ગુરુવાર","શુક્રવાર","શનિવાર"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(લ|જ|થ|ઠ્ઠ|મ)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(ઈસપૂ|ઈસ)/i,abbreviated:/^(ઈ\.સ\.પૂર્વે|ઈ\.સ\.)/i,wide:/^(ઈસવીસન\sપૂર્વે|ઈસવીસન)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ઈસપૂ/i,/^ઈસ/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},Zm={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}} שנים"}},ef={date:Vu({formats:{full:"EEEE, d בMMMM y",long:"d בMMMM y",medium:"d בMMM y",short:"d.M.y"},defaultWidth:"full"}),time:Vu({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'בשעה' {{time}}",long:"{{date}} 'בשעה' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},tf={lastWeek:"eeee 'שעבר בשעה' p",yesterday:"'אתמול בשעה' p",today:"'היום בשעה' p",tomorrow:"'מחר בשעה' p",nextWeek:"eeee 'בשעה' p",other:"P"},nf={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:Qu({values:{narrow:["לפנה״ס","לספירה"],abbreviated:["לפנה״ס","לספירה"],wide:["לפני הספירה","לספירה"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["רבעון 1","רבעון 2","רבעון 3","רבעון 4"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["ינו׳","פבר׳","מרץ","אפר׳","מאי","יוני","יולי","אוג׳","ספט׳","אוק׳","נוב׳","דצמ׳"],wide:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["א׳","ב׳","ג׳","ד׳","ה׳","ו׳","ש׳"],short:["א׳","ב׳","ג׳","ד׳","ה׳","ו׳","ש׳"],abbreviated:["יום א׳","יום ב׳","יום ג׳","יום ד׳","יום ה׳","יום ו׳","שבת"],wide:["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","יום שבת"]},defaultWidth:"wide"}),dayPeriod:Qu({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"})},af=["רא","שנ","של","רב","ח","שי","שב","שמ","ת","ע"],rf={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=Zm[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:ef,formatRelative:(e,t,n,i)=>tf[e],localize:nf,match:{ordinalNumber:tl({matchPattern:/^(\d+|(ראשון|שני|שלישי|רביעי|חמישי|שישי|שביעי|שמיני|תשיעי|עשירי|ראשונה|שנייה|שלישית|רביעית|חמישית|שישית|שביעית|שמינית|תשיעית|עשירית))/i,parsePattern:/^(\d+|רא|שנ|של|רב|ח|שי|שב|שמ|ת|ע)/i,valueCallback:e=>{const t=parseInt(e,10);return isNaN(t)?af.indexOf(e)+1:t}}),era:el({matchPatterns:{narrow:/^ל(ספירה|פנה״ס)/i,abbreviated:/^ל(ספירה|פנה״ס)/i,wide:/^ל(פני ה)?ספירה/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^לפ/i,/^לס/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},of={locale:{1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},number:{"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"}};function sf(e){return e.toString().replace(/\d/g,(function(e){return of.locale[e]}))}const df={ordinalNumber:(e,t)=>sf(Number(e)),era:Qu({values:{narrow:["ईसा-पूर्व","ईस्वी"],abbreviated:["ईसा-पूर्व","ईस्वी"],wide:["ईसा-पूर्व","ईसवी सन"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["ति1","ति2","ति3","ति4"],wide:["पहली तिमाही","दूसरी तिमाही","तीसरी तिमाही","चौथी तिमाही"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["ज","फ़","मा","अ","मई","जू","जु","अग","सि","अक्टू","न","दि"],abbreviated:["जन","फ़र","मार्च","अप्रैल","मई","जून","जुल","अग","सित","अक्टू","नव","दिस"],wide:["जनवरी","फ़रवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितंबर","अक्टूबर","नवंबर","दिसंबर"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["र","सो","मं","बु","गु","शु","श"],short:["र","सो","मं","बु","गु","शु","श"],abbreviated:["रवि","सोम","मंगल","बुध","गुरु","शुक्र","शनि"],wide:["रविवार","सोमवार","मंगलवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"]},defaultWidth:"wide"}),dayPeriod:Qu({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"})},uf={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}} वर्ष"}},lf={date:Vu({formats:{full:"EEEE, do MMMM, y",long:"do MMMM, y",medium:"d MMM, y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Vu({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:Vu({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"},cf={ordinalNumber:tl({matchPattern:/^[०१२३४५६७८९]+/i,parsePattern:/^[०१२३४५६७८९]+/i,valueCallback:function(e){const t=e.toString().replace(/[१२३४५६७८९०]/g,(function(e){return of.number[e]}));return Number(t)}}),era:el({matchPatterns:{narrow:/^(ईसा-पूर्व|ईस्वी)/i,abbreviated:/^(ईसा\.?\s?पूर्व\.?|ईसा\.?)/i,wide:/^(ईसा-पूर्व|ईसवी पूर्व|ईसवी सन|ईसवी)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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"})},mf={code:"hi",formatDistance:(e,t,n)=>{let i;const a=uf[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",sf(t)),n?.addSuffix?n.comparison&&n.comparison>0?i+"मे ":i+" पहले":i},formatLong:lf,formatRelative:(e,t,n,i)=>hf[e],localize:df,match:cf,options:{weekStartsOn:0,firstWeekContainsDate:4}},ff={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"}},gf={date:Vu({formats:{full:"EEEE, d. MMMM y.",long:"d. MMMM y.",medium:"d. MMM y.",short:"dd. MM. y."},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss (zzzz)",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'u' {{time}}",long:"{{date}} 'u' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},pf={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"},vf={code:"hr",formatDistance:(e,t,n)=>{let i;const a=ff[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:gf,formatRelative:(e,t,n,i)=>{const a=pf[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Qu({values:{narrow:["pr.n.e.","AD"],abbreviated:["pr. Kr.","po. Kr."],wide:["Prije Krista","Poslije Krista"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},yf={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"}},bf={date:Vu({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'nan lè' {{time}}",long:"{{date}} 'nan lè' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},wf={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"},kf={code:"ht",formatDistance:(e,t,n)=>{let i;const a=yf[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:bf,formatRelative:(e,t,n,i)=>wf[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e);if(0===n)return String(n);return n+(1===n?"ye":"yèm")},era:Qu({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:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)(ye|yèm)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},Mf={about:"körülbelül",over:"több mint",almost:"majdnem",lessthan:"kevesebb mint"},Sf={xseconds:" másodperc",halfaminute:"fél perc",xminutes:" perc",xhours:" óra",xdays:" nap",xweeks:" hét",xmonths:" hónap",xyears:" év"},Pf={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"}},Ef={date:Vu({formats:{full:"y. MMMM d., EEEE",long:"y. MMMM d.",medium:"y. MMM d.",short:"y. MM. dd."},defaultWidth:"full"}),time:Vu({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Tf=["vasárnap","hétfőn","kedden","szerdán","csütörtökön","pénteken","szombaton"];function Af(e){return t=>{const n=Tf[t.getDay()];return`${e?"":"'múlt' "}'${n}' p'-kor'`}}const xf={lastWeek:Af(!1),yesterday:"'tegnap' p'-kor'",today:"'ma' p'-kor'",tomorrow:"'holnap' p'-kor'",nextWeek:Af(!0),other:"P"},Cf={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?Pf[o][n?.comparison||0]:Sf[o];let d="halfaminute"===o?s:t+s;if(i){const e=i[0].toLowerCase();d=Mf[e]+" "+d}return d},formatLong:Ef,formatRelative:(e,t)=>{const n=xf[e];return"function"==typeof n?n(t):n},localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Qu({values:{narrow:["ie.","isz."],abbreviated:["i. e.","i. sz."],wide:["Krisztus előtt","időszámításunk szerint"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},Lf={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}} տարի"}},Df={date:Vu({formats:{full:"d MMMM, y, EEEE",long:"d MMMM, y",medium:"d MMM, y",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({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"},Rf={code:"hy",formatDistance:(e,t,n)=>{let i;const a=Lf[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:Df,formatRelative:(e,t,n,i)=>If[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),i=n%100;return i<10&&i%10==1?n+"֊ին":n+"֊րդ"},era:Qu({values:{narrow:["Ք","Մ"],abbreviated:["ՔԱ","ՄԹ"],wide:["Քրիստոսից առաջ","Մեր թվարկության"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["Ք1","Ք2","Ք3","Ք4"],wide:["1֊ին քառորդ","2֊րդ քառորդ","3֊րդ քառորդ","4֊րդ քառորդ"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["Հ","Փ","Մ","Ա","Մ","Հ","Հ","Օ","Ս","Հ","Ն","Դ"],abbreviated:["հուն","փետ","մար","ապր","մայ","հուն","հուլ","օգս","սեպ","հոկ","նոյ","դեկ"],wide:["հունվար","փետրվար","մարտ","ապրիլ","մայիս","հունիս","հուլիս","օգոստոս","սեպտեմբեր","հոկտեմբեր","նոյեմբեր","դեկտեմբեր"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["Կ","Ե","Ե","Չ","Հ","Ո","Շ"],short:["կր","եր","եք","չք","հգ","ուր","շբ"],abbreviated:["կիր","երկ","երք","չոր","հնգ","ուրբ","շաբ"],wide:["կիրակի","երկուշաբթի","երեքշաբթի","չորեքշաբթի","հինգշաբթի","ուրբաթ","շաբաթ"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)((-|֊)?(ին|րդ))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(Ք|Մ)/i,abbreviated:/^(Ք\.?\s?Ա\.?|Մ\.?\s?Թ\.?\s?Ա\.?|Մ\.?\s?Թ\.?|Ք\.?\s?Հ\.?)/i,wide:/^(քրիստոսից առաջ|մեր թվարկությունից առաջ|մեր թվարկության|քրիստոսից հետո)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ք/i,/^մ/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},_f={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"}},Wf={date:Vu({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Nf={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},Of={code:"id",formatDistance:(e,t,n)=>{let i;const a=_f[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:Wf,formatRelative:(e,t,n,i)=>Nf[e],localize:{ordinalNumber:(e,t)=>"ke-"+Number(e),era:Qu({values:{narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^ke-(\d+)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},Ff={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"}},jf={date:Vu({formats:{full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"d.MM.y"},defaultWidth:"full"}),time:Vu({formats:{full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},zf={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"},$f={code:"is",formatDistance:(e,t,n)=>{let i;const a=Ff[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:jf,formatRelative:(e,t,n,i)=>zf[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Qu({values:{narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["fyrir Krist","eftir Krist"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+(\.)?/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},Hf={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"}},Uf=(e,t,n)=>{let i;const a=Hf[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},Bf={date:Vu({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Gf=["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"];function Xf(e){return"'"+Gf[e]+" alle' p"}const Yf={lastWeek:(e,t,n)=>{const i=e.getDay();return Hl(e,t,n)?Xf(i):function(e){return 0===e?"'domenica scorsa alle' p":"'"+Gf[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 Hl(e,t,n)?Xf(i):function(e){return 0===e?"'domenica prossima alle' p":"'"+Gf[e]+" prossimo alle' p"}(i)},other:"P"},Kf=(e,t,n,i)=>{const a=Yf[e];return"function"==typeof a?a(t,n,i):a},Vf={ordinalNumber:(e,t)=>{const n=Number(e);return String(n)},era:Qu({values:{narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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"})},qf={ordinalNumber:tl({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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"})},Jf={code:"it",formatDistance:Uf,formatLong:Bf,formatRelative:Kf,localize:Vf,match:qf,options:{weekStartsOn:1,firstWeekContainsDate:4}},Qf={code:"it-CH",formatDistance:Uf,formatLong:{date:Vu({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},formatRelative:Kf,localize:Vf,match:qf,options:{weekStartsOn:1,firstWeekContainsDate:4}},Zf={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}}年近く"}},eg={date:Vu({formats:{full:"y年M月d日EEEE",long:"y年M月d日",medium:"y/MM/dd",short:"y/MM/dd"},defaultWidth:"full"}),time:Vu({formats:{full:"H時mm分ss秒 zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},tg={lastWeek:"先週のeeeeのp",yesterday:"昨日のp",today:"今日のp",tomorrow:"明日のp",nextWeek:"翌週のeeeeのp",other:"P"},ng={code:"ja",formatDistance:(e,t,n)=>{let i;n=n||{};const a=Zf[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:eg,formatRelative:(e,t,n,i)=>tg[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:Qu({values:{narrow:["BC","AC"],abbreviated:["紀元前","西暦"],wide:["紀元前","西暦"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["第1四半期","第2四半期","第3四半期","第4四半期"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:Qu({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:Qu({values:{narrow:["日","月","火","水","木","金","土"],short:["日","月","火","水","木","金","土"],abbreviated:["日","月","火","水","木","金","土"],wide:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^第?\d+(年|四半期|月|週|日|時|分|秒)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:el({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:el({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:el({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:el({matchPatterns:{narrow:/^[日月火水木金土]/,short:/^[日月火水木金土]/,abbreviated:/^[日月火水木金土]/,wide:/^[日月火水木金土]曜日/},defaultMatchWidth:"wide",parsePatterns:{any:[/^日/,/^月/,/^火/,/^水/,/^木/,/^金/,/^土/]},defaultParseWidth:"any"}),dayPeriod:el({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}},ig={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}}ねんちかく"}},ag={date:Vu({formats:{full:"yねんMがつdにちEEEE",long:"yねんMがつdにち",medium:"y/MM/dd",short:"y/MM/dd"},defaultWidth:"full"}),time:Vu({formats:{full:"Hじmmふんssびょう zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},rg={lastWeek:"せんしゅうのeeeeのp",yesterday:"きのうのp",today:"きょうのp",tomorrow:"あしたのp",nextWeek:"よくしゅうのeeeeのp",other:"P"},og={code:"ja-Hira",formatDistance:(e,t,n)=>{let i;n=n||{};const a=ig[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:ag,formatRelative:(e,t,n,i)=>rg[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:Qu({values:{narrow:["BC","AC"],abbreviated:["きげんぜん","せいれき"],wide:["きげんぜん","せいれき"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["だい1しはんき","だい2しはんき","だい3しはんき","だい4しはんき"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:Qu({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:Qu({values:{narrow:["にち","げつ","か","すい","もく","きん","ど"],short:["にち","げつ","か","すい","もく","きん","ど"],abbreviated:["にち","げつ","か","すい","もく","きん","ど"],wide:["にちようび","げつようび","かようび","すいようび","もくようび","きんようび","どようび"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^だ?い?\d+(ねん|しはんき|がつ|しゅう|にち|じ|ふん|びょう)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:el({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:el({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:el({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:el({matchPatterns:{narrow:/^(にち|げつ|か|すい|もく|きん|ど)/,short:/^(にち|げつ|か|すい|もく|きん|ど)/,abbreviated:/^(にち|げつ|か|すい|もく|きん|ど)/,wide:/^(にち|げつ|か|すい|もく|きん|ど)ようび/},defaultMatchWidth:"wide",parsePatterns:{any:[/^にち/,/^げつ/,/^か/,/^すい/,/^もく/,/^きん/,/^ど/]},defaultParseWidth:"any"}),dayPeriod:el({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}},sg={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}} წელში"}},dg={date:Vu({formats:{full:"EEEE, do MMMM, y",long:"do, MMMM, y",medium:"d, MMM, y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} {{time}}'-ზე'",long:"{{date}} {{time}}'-ზე'",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ug={lastWeek:"'წინა' eeee p'-ზე'",yesterday:"'გუშინ' p'-ზე'",today:"'დღეს' p'-ზე'",tomorrow:"'ხვალ' p'-ზე'",nextWeek:"'შემდეგი' eeee p'-ზე'",other:"P"},lg={code:"ka",formatDistance:(e,t,n)=>{let i;const a=sg[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:dg,formatRelative:(e,t,n,i)=>ug[e],localize:{ordinalNumber:e=>{const t=Number(e);return 1===t?t+"-ლი":t+"-ე"},era:Qu({values:{narrow:["ჩ.წ-მდე","ჩ.წ"],abbreviated:["ჩვ.წ-მდე","ჩვ.წ"],wide:["ჩვენს წელთაღრიცხვამდე","ჩვენი წელთაღრიცხვით"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["1-ლი კვ","2-ე კვ","3-ე კვ","4-ე კვ"],wide:["1-ლი კვარტალი","2-ე კვარტალი","3-ე კვარტალი","4-ე კვარტალი"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["ია","თე","მა","აპ","მს","ვნ","ვლ","აგ","სე","ოქ","ნო","დე"],abbreviated:["იან","თებ","მარ","აპრ","მაი","ივნ","ივლ","აგვ","სექ","ოქტ","ნოე","დეკ"],wide:["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["კვ","ორ","სა","ოთ","ხუ","პა","შა"],short:["კვი","ორშ","სამ","ოთხ","ხუთ","პარ","შაბ"],abbreviated:["კვი","ორშ","სამ","ოთხ","ხუთ","პარ","შაბ"],wide:["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(-ლი|-ე)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(ჩვ?\.წ)/i,abbreviated:/^(ჩვ?\.წ)/i,wide:/^(ჩვენს წელთაღრიცხვამდე|ქრისტეშობამდე|ჩვენი წელთაღრიცხვით|ქრისტეშობიდან)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(ჩვენს წელთაღრიცხვამდე|ქრისტეშობამდე)/i,/^(ჩვენი წელთაღრიცხვით|ქრისტეშობიდან)/i]},defaultParseWidth:"any"}),quarter:el({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:el({matchPatterns:{any:/^(ია|თე|მა|აპ|მს|ვნ|ვლ|აგ|სე|ოქ|ნო|დე)/i},defaultMatchWidth:"any",parsePatterns:{any:[/^ია/i,/^თ/i,/^მარ/i,/^აპ/i,/^მაი/i,/^ი?ვნ/i,/^ი?ვლ/i,/^აგ/i,/^ს/i,/^ო/i,/^ნ/i,/^დ/i]},defaultParseWidth:"any"}),day:el({matchPatterns:{narrow:/^(კვ|ორ|სა|ოთ|ხუ|პა|შა)/i,short:/^(კვი|ორშ|სამ|ოთხ|ხუთ|პარ|შაბ)/i,wide:/^(კვირა|ორშაბათი|სამშაბათი|ოთხშაბათი|ხუთშაბათი|პარასკევი|შაბათი)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^კვ/i,/^ორ/i,/^სა/i,/^ოთ/i,/^ხუ/i,/^პა/i,/^შა/i]},defaultParseWidth:"any"}),dayPeriod:el({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}},hg={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 cg(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 mg={date:Vu({formats:{full:"EEEE, do MMMM y 'ж.'",long:"do MMMM y 'ж.'",medium:"d MMM y 'ж.'",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},fg=["жексенбіде","дүйсенбіде","сейсенбіде","сәрсенбіде","бейсенбіде","жұмада","сенбіде"];function gg(e){return"'"+fg[e]+" сағат' p'-де'"}const pg={lastWeek:(e,t,n)=>{const i=e.getDay();return Hl(e,t,n)?gg(i):function(e){return"'өткен "+fg[e]+" сағат' p'-де'"}(i)},yesterday:"'кеше сағат' p'-де'",today:"'бүгін сағат' p'-де'",tomorrow:"'ертең сағат' p'-де'",nextWeek:(e,t,n)=>{const i=e.getDay();return Hl(e,t,n)?gg(i):function(e){return"'келесі "+fg[e]+" сағат' p'-де'"}(i)},other:"P"},vg={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"},yg={ordinalNumber:(e,t)=>{const n=Number(e),i=n>=100?100:null;return n+(vg[n]||vg[n%10]||i&&vg[i]||"")},era:Qu({values:{narrow:["б.з.д.","б.з."],abbreviated:["б.з.д.","б.з."],wide:["біздің заманымызға дейін","біздің заманымыз"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["1-ші тоқ.","2-ші тоқ.","3-ші тоқ.","4-ші тоқ."],wide:["1-ші тоқсан","2-ші тоқсан","3-ші тоқсан","4-ші тоқсан"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["Қ","А","Н","С","М","М","Ш","Т","Қ","Қ","Қ","Ж"],abbreviated:["қаң","ақп","нау","сәу","мам","мау","шіл","там","қыр","қаз","қар","жел"],wide:["қаңтар","ақпан","наурыз","сәуір","мамыр","маусым","шілде","тамыз","қыркүйек","қазан","қараша","желтоқсан"]},defaultWidth:"wide",formattingValues:{narrow:["Қ","А","Н","С","М","М","Ш","Т","Қ","Қ","Қ","Ж"],abbreviated:["қаң","ақп","нау","сәу","мам","мау","шіл","там","қыр","қаз","қар","жел"],wide:["қаңтар","ақпан","наурыз","сәуір","мамыр","маусым","шілде","тамыз","қыркүйек","қазан","қараша","желтоқсан"]},defaultFormattingWidth:"wide"}),day:Qu({values:{narrow:["Ж","Д","С","С","Б","Ж","С"],short:["жс","дс","сс","ср","бс","жм","сб"],abbreviated:["жс","дс","сс","ср","бс","жм","сб"],wide:["жексенбі","дүйсенбі","сейсенбі","сәрсенбі","бейсенбі","жұма","сенбі"]},defaultWidth:"wide"}),dayPeriod:Qu({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"})},bg={code:"kk",formatDistance:(e,t,n)=>{const i=hg[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?cg(i.future,t):cg(i.regular,t)+" кейін":i.past?cg(i.past,t):cg(i.regular,t)+" бұрын":cg(i.regular,t)},formatLong:mg,formatRelative:(e,t,n,i)=>{const a=pg[e];return"function"==typeof a?a(t,n,i):a},localize:yg,match:{ordinalNumber:tl({matchPattern:/^(\d+)(-?(ші|шы))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^((б )?з\.?\s?д\.?)/i,abbreviated:/^((б )?з\.?\s?д\.?)/i,wide:/^(біздің заманымызға дейін|біздің заманымыз|біздің заманымыздан)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^б/i,/^з/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},wg={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}} ឆ្នាំ"},kg={date:Vu({formats:{full:"EEEE do MMMM y",long:"do MMMM y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"h:mm:ss a",long:"h:mm:ss a",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'ម៉ោង' {{time}}",long:"{{date}} 'ម៉ោង' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Mg={lastWeek:"'ថ្ងៃ'eeee'ស​ប្តា​ហ៍​មុនម៉ោង' p",yesterday:"'ម្សិលមិញនៅម៉ោង' p",today:"'ថ្ងៃនេះម៉ោង' p",tomorrow:"'ថ្ងៃស្អែកម៉ោង' p",nextWeek:"'ថ្ងៃ'eeee'ស​ប្តា​ហ៍​ក្រោយម៉ោង' p",other:"P"},Sg={code:"km",formatDistance:(e,t,n)=>{let i=wg[e];return"number"==typeof t&&(i=i.replace("{{count}}",t.toString())),n?.addSuffix?n.comparison&&n.comparison>0?"ក្នុងរយៈពេល "+i:i+"មុន":i},formatLong:kg,formatRelative:(e,t,n,i)=>Mg[e],localize:{ordinalNumber:(e,t)=>Number(e).toString(),era:Qu({values:{narrow:["ម.គស","គស"],abbreviated:["មុនគ.ស","គ.ស"],wide:["មុនគ្រិស្តសករាជ","នៃគ្រិស្តសករាជ"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["ត្រីមាសទី 1","ត្រីមាសទី 2","ត្រីមាសទី 3","ត្រីមាសទី 4"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["ម.ក","ក.ម","មិ","ម.ស","ឧ.ស","ម.ថ","ក.ដ","សី","កញ","តុ","វិ","ធ"],abbreviated:["មករា","កុម្ភៈ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"],wide:["មករា","កុម្ភៈ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["អា","ច","អ","ព","ព្រ","សុ","ស"],short:["អា","ច","អ","ព","ព្រ","សុ","ស"],abbreviated:["អា","ច","អ","ព","ព្រ","សុ","ស"],wide:["អាទិត្យ","ចន្ទ","អង្គារ","ពុធ","ព្រហស្បតិ៍","សុក្រ","សៅរ៍"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:el({matchPatterns:{narrow:/^(ម\.)?គស/i,abbreviated:/^(មុន)?គ\.ស/i,wide:/^(មុន|នៃ)គ្រិស្តសករាជ/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(ម|មុន)គ\.?ស/i,/^(នៃ)?គ\.?ស/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},Pg={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 Eg(e,t){return t?.addSuffix?t.comparison&&t.comparison>0?e.future:e.past:e.default}const Tg={date:Vu({formats:{full:"EEEE, MMMM d, y",long:"MMMM d, y",medium:"MMM d, y",short:"d/M/yy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Ag={lastWeek:"'ಕಳೆದ' eeee p 'ಕ್ಕೆ'",yesterday:"'ನಿನ್ನೆ' p 'ಕ್ಕೆ'",today:"'ಇಂದು' p 'ಕ್ಕೆ'",tomorrow:"'ನಾಳೆ' p 'ಕ್ಕೆ'",nextWeek:"eeee p 'ಕ್ಕೆ'",other:"P"},xg={code:"kn",formatDistance:(e,t,n)=>{let i;const a=Pg[e];return i=a.one&&1===t?Eg(a.one,n):Eg(a.other,n),i.replace("{{count}}",String(t))},formatLong:Tg,formatRelative:(e,t,n,i)=>Ag[e],localize:{ordinalNumber:(e,t)=>Number(e)+"ನೇ",era:Qu({values:{narrow:["ಕ್ರಿ.ಪೂ","ಕ್ರಿ.ಶ"],abbreviated:["ಕ್ರಿ.ಪೂ","ಕ್ರಿ.ಶ"],wide:["ಕ್ರಿಸ್ತ ಪೂರ್ವ","ಕ್ರಿಸ್ತ ಶಕ"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["ತ್ರೈ 1","ತ್ರೈ 2","ತ್ರೈ 3","ತ್ರೈ 4"],wide:["1ನೇ ತ್ರೈಮಾಸಿಕ","2ನೇ ತ್ರೈಮಾಸಿಕ","3ನೇ ತ್ರೈಮಾಸಿಕ","4ನೇ ತ್ರೈಮಾಸಿಕ"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["ಜ","ಫೆ","ಮಾ","ಏ","ಮೇ","ಜೂ","ಜು","ಆ","ಸೆ","ಅ","ನ","ಡಿ"],abbreviated:["ಜನ","ಫೆಬ್ರ","ಮಾರ್ಚ್","ಏಪ್ರಿ","ಮೇ","ಜೂನ್","ಜುಲೈ","ಆಗ","ಸೆಪ್ಟೆಂ","ಅಕ್ಟೋ","ನವೆಂ","ಡಿಸೆಂ"],wide:["ಜನವರಿ","ಫೆಬ್ರವರಿ","ಮಾರ್ಚ್","ಏಪ್ರಿಲ್","ಮೇ","ಜೂನ್","ಜುಲೈ","ಆಗಸ್ಟ್","ಸೆಪ್ಟೆಂಬರ್","ಅಕ್ಟೋಬರ್","ನವೆಂಬರ್","ಡಿಸೆಂಬರ್"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["ಭಾ","ಸೋ","ಮಂ","ಬು","ಗು","ಶು","ಶ"],short:["ಭಾನು","ಸೋಮ","ಮಂಗಳ","ಬುಧ","ಗುರು","ಶುಕ್ರ","ಶನಿ"],abbreviated:["ಭಾನು","ಸೋಮ","ಮಂಗಳ","ಬುಧ","ಗುರು","ಶುಕ್ರ","ಶನಿ"],wide:["ಭಾನುವಾರ","ಸೋಮವಾರ","ಮಂಗಳವಾರ","ಬುಧವಾರ","ಗುರುವಾರ","ಶುಕ್ರವಾರ","ಶನಿವಾರ"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(ನೇ|ನೆ)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(ಕ್ರಿ.ಪೂ|ಕ್ರಿ.ಶ)/i,abbreviated:/^(ಕ್ರಿ\.?\s?ಪೂ\.?|ಕ್ರಿ\.?\s?ಶ\.?|ಪ್ರ\.?\s?ಶ\.?)/i,wide:/^(ಕ್ರಿಸ್ತ ಪೂರ್ವ|ಕ್ರಿಸ್ತ ಶಕ|ಪ್ರಸಕ್ತ ಶಕ)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ಪೂ/i,/^(ಶ|ಪ್ರ)/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},Cg={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}}년"}},Lg={date:Vu({formats:{full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},defaultWidth:"full"}),time:Vu({formats:{full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Dg={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},Ig={code:"ko",formatDistance:(e,t,n)=>{let i;const a=Cg[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:Lg,formatRelative:(e,t,n,i)=>Dg[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:Qu({values:{narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({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:Qu({values:{narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(일|번째)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({matchPatterns:{narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},defaultMatchWidth:"wide",parsePatterns:{any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},defaultParseWidth:"any"}),dayPeriod:el({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}},Rg={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"}}},_g=["d","h","n","t","z"],Wg=["a,","e","i","o","u"],Ng=[0,1,2,3,8,9],Og=[40,50,60,70];function Fg(e){const t=e.charAt(0).toLowerCase();if(-1!=Wg.indexOf(t)||-1!=_g.indexOf(t))return!0;const n=e.split(" ")[0],i=parseInt(n);return!isNaN(i)&&-1!=Ng.indexOf(i%10)&&-1==Og.indexOf(parseInt(n.substring(0,2)))}const jg={date:Vu({formats:{full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.yy"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},zg={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"},$g={code:"lb",formatDistance:(e,t,n)=>{let i;const a=Rg[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"+(Fg(i)?"n":"")+" "+i:"viru"+(Fg(i)?"n":"")+" "+i:i},formatLong:jg,formatRelative:(e,t,n,i)=>{const a=zg[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Qu({values:{narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["viru Christus","no Christus"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},Hg={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"},Ug=(e,t,n,i)=>t?i?"kelių sekundžių":"kelias sekundes":"kelios sekundės",Bg=(e,t,n,i)=>t?i?Yg(n)[1]:Yg(n)[2]:Yg(n)[0],Gg=(e,t,n,i)=>{const a=e+" ";return 1===e?a+Bg(0,t,n,i):t?i?a+Yg(n)[1]:a+(Xg(e)?Yg(n)[1]:Yg(n)[2]):a+(Xg(e)?Yg(n)[1]:Yg(n)[0])};function Xg(e){return e%10==0||e>10&&e<20}function Yg(e){return Hg[e].split("_")}const Kg={lessThanXSeconds:{one:Ug,other:Gg},xSeconds:{one:Ug,other:Gg},halfAMinute:"pusė minutės",lessThanXMinutes:{one:Bg,other:Gg},xMinutes:{one:Bg,other:Gg},aboutXHours:{one:Bg,other:Gg},xHours:{one:Bg,other:Gg},xDays:{one:Bg,other:Gg},aboutXWeeks:{one:Bg,other:Gg},xWeeks:{one:Bg,other:Gg},aboutXMonths:{one:Bg,other:Gg},xMonths:{one:Bg,other:Gg},aboutXYears:{one:Bg,other:Gg},xYears:{one:Bg,other:Gg},overXYears:{one:Bg,other:Gg},almostXYears:{one:Bg,other:Gg}},Vg={date:Vu({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:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},qg={lastWeek:"'Praėjusį' eeee p",yesterday:"'Vakar' p",today:"'Šiandien' p",tomorrow:"'Rytoj' p",nextWeek:"eeee p",other:"P"},Jg={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=Kg[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=Hg[e]+" "+o}return n?.addSuffix?n.comparison&&n.comparison>0?"po "+o:"prieš "+o:o},formatLong:Vg,formatRelative:(e,t,n,i)=>qg[e],localize:{ordinalNumber:(e,t)=>Number(e)+"-oji",era:Qu({values:{narrow:["pr. Kr.","po Kr."],abbreviated:["pr. Kr.","po Kr."],wide:["prieš Kristų","po Kristaus"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)(-oji)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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 Qg(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 Zg={lessThanXSeconds:Qg({one:["mazāk par {{time}}","sekundi","sekundi"],other:["mazāk nekā {{count}} {{time}}","sekunde","sekundes","sekundes","sekundēm"]}),xSeconds:Qg({one:["1 {{time}}","sekunde","sekundes"],other:["{{count}} {{time}}","sekunde","sekundes","sekundes","sekundēm"]}),halfAMinute:(e,t)=>t?.addSuffix?"pusminūtes":"pusminūte",lessThanXMinutes:Qg({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:Qg({one:["1 {{time}}","minūte","minūtes"],other:["{{count}} {{time}}","minūte","minūtes","minūtes","minūtēm"]}),aboutXHours:Qg({one:["apmēram 1 {{time}}","stunda","stundas"],other:["apmēram {{count}} {{time}}","stunda","stundas","stundas","stundām"]}),xHours:Qg({one:["1 {{time}}","stunda","stundas"],other:["{{count}} {{time}}","stunda","stundas","stundas","stundām"]}),xDays:Qg({one:["1 {{time}}","diena","dienas"],other:["{{count}} {{time}}","diena","dienas","dienas","dienām"]}),aboutXWeeks:Qg({one:["apmēram 1 {{time}}","nedēļa","nedēļas"],other:["apmēram {{count}} {{time}}","nedēļa","nedēļu","nedēļas","nedēļām"]}),xWeeks:Qg({one:["1 {{time}}","nedēļa","nedēļas"],other:["{{count}} {{time}}","nedēļa","nedēļu","nedēļas","nedēļām"]}),aboutXMonths:Qg({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:Qg({one:["1 {{time}}","mēnesis","mēneša"],other:["{{count}} {{time}}","mēnesis","mēneši","mēneša","mēnešiem"]}),aboutXYears:Qg({one:["apmēram 1 {{time}}","gads","gada"],other:["apmēram {{count}} {{time}}","gads","gadi","gada","gadiem"]}),xYears:Qg({one:["1 {{time}}","gads","gada"],other:["{{count}} {{time}}","gads","gadi","gada","gadiem"]}),overXYears:Qg({one:["ilgāk par 1 {{time}}","gadu","gadu"],other:["vairāk nekā {{count}} {{time}}","gads","gadi","gada","gadiem"]}),almostXYears:Qg({one:["gandrīz 1 {{time}}","gads","gada"],other:["vairāk nekā {{count}} {{time}}","gads","gadi","gada","gadiem"]})},ep={date:Vu({formats:{full:"EEEE, y. 'gada' d. MMMM",long:"y. 'gada' d. MMMM",medium:"dd.MM.y.",short:"dd.MM.y."},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'plkst.' {{time}}",long:"{{date}} 'plkst.' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},tp=["svētdienā","pirmdienā","otrdienā","trešdienā","ceturtdienā","piektdienā","sestdienā"],np={lastWeek:(e,t,n)=>{if(Hl(e,t,n))return"eeee 'plkst.' p";return"'Pagājušā "+tp[e.getDay()]+" plkst.' p"},yesterday:"'Vakar plkst.' p",today:"'Šodien plkst.' p",tomorrow:"'Rīt plkst.' p",nextWeek:(e,t,n)=>{if(Hl(e,t,n))return"eeee 'plkst.' p";return"'Nākamajā "+tp[e.getDay()]+" plkst.' p"},other:"P"},ip={code:"lv",formatDistance:(e,t,n)=>{const i=Zg[e](t,n);return n?.addSuffix?n.comparison&&n.comparison>0?"pēc "+i:"pirms "+i:i},formatLong:ep,formatRelative:(e,t,n,i)=>{const a=np[e];return"function"==typeof a?a(t,n,i):a},localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Qu({values:{narrow:["p.m.ē","m.ē"],abbreviated:["p. m. ē.","m. ē."],wide:["pirms mūsu ēras","mūsu ērā"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},ap={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}} години"}},rp={date:Vu({formats:{full:"EEEE, dd MMMM yyyy",long:"dd MMMM yyyy",medium:"dd MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{any:"{{date}} {{time}}"},defaultWidth:"any"})},op=["недела","понеделник","вторник","среда","четврток","петок","сабота"];function sp(e){const t=op[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 dp={lastWeek:(e,t,n)=>{const i=e.getDay();return Hl(e,t,n)?sp(i):function(e){const t=op[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 Hl(e,t,n)?sp(i):function(e){const t=op[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"},up={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:Qu({values:{narrow:["пр.н.е.","н.е."],abbreviated:["пред н. е.","н. е."],wide:["пред нашата ера","нашата ера"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["1-ви кв.","2-ри кв.","3-ти кв.","4-ти кв."],wide:["1-ви квартал","2-ри квартал","3-ти квартал","4-ти квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{abbreviated:["јан","фев","мар","апр","мај","јун","јул","авг","септ","окт","ноем","дек"],wide:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["Н","П","В","С","Ч","П","С"],short:["не","по","вт","ср","че","пе","са"],abbreviated:["нед","пон","вто","сре","чет","пет","саб"],wide:["недела","понеделник","вторник","среда","четврток","петок","сабота"]},defaultWidth:"wide"}),dayPeriod:Qu({values:{wide:{am:"претпладне",pm:"попладне",midnight:"полноќ",noon:"напладне",morning:"наутро",afternoon:"попладне",evening:"навечер",night:"ноќе"}},defaultWidth:"wide"})},lp={ordinalNumber:tl({matchPattern:/^(\d+)(-?[врмт][и])?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^((пр)?н\.?\s?е\.?)/i,abbreviated:/^((пр)?н\.?\s?е\.?)/i,wide:/^(пред нашата ера|нашата ера)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^п/i,/^н/i]},defaultParseWidth:"any"}),quarter:el({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:el({matchPatterns:{abbreviated:/^(јан|фев|мар|апр|мај|јун|јул|авг|сеп|окт|ноем|дек)/i,wide:/^(јануари|февруари|март|април|мај|јуни|јули|август|септември|октомври|ноември|декември)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ја/i,/^Ф/i,/^мар/i,/^ап/i,/^мај/i,/^јун/i,/^јул/i,/^ав/i,/^се/i,/^окт/i,/^но/i,/^де/i]},defaultParseWidth:"any"}),day:el({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:el({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"})},hp={code:"mk",formatDistance:(e,t,n)=>{let i;const a=ap[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:rp,formatRelative:(e,t,n,i)=>{const a=dp[e];return"function"==typeof a?a(t,n,i):a},localize:up,match:lp,options:{weekStartsOn:1,firstWeekContainsDate:4}},cp={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}} жил"}},mp={date:Vu({formats:{full:"y 'оны' MMMM'ын' d, EEEE 'гараг'",long:"y 'оны' MMMM'ын' d",medium:"y 'оны' MMM'ын' d",short:"y.MM.dd"},defaultWidth:"full"}),time:Vu({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},fp={lastWeek:"'өнгөрсөн' eeee 'гарагийн' p 'цагт'",yesterday:"'өчигдөр' p 'цагт'",today:"'өнөөдөр' p 'цагт'",tomorrow:"'маргааш' p 'цагт'",nextWeek:"'ирэх' eeee 'гарагийн' p 'цагт'",other:"P"},gp={ordinalNumber:(e,t)=>String(e),era:Qu({values:{narrow:["НТӨ","НТ"],abbreviated:["НТӨ","НТ"],wide:["нийтийн тооллын өмнөх","нийтийн тооллын"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["I","II","III","IV"],abbreviated:["I улирал","II улирал","III улирал","IV улирал"],wide:["1-р улирал","2-р улирал","3-р улирал","4-р улирал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({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:Qu({values:{narrow:["Н","Д","М","Л","П","Б","Б"],short:["Ня","Да","Мя","Лх","Пү","Ба","Бя"],abbreviated:["Ням","Дав","Мяг","Лха","Пүр","Баа","Бям"],wide:["Ням","Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба"]},defaultWidth:"wide",formattingValues:{narrow:["Н","Д","М","Л","П","Б","Б"],short:["Ня","Да","Мя","Лх","Пү","Ба","Бя"],abbreviated:["Ням","Дав","Мяг","Лха","Пүр","Баа","Бям"],wide:["ням","даваа","мягмар","лхагва","пүрэв","баасан","бямба"]},defaultFormattingWidth:"wide"}),dayPeriod:Qu({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"})},pp={ordinalNumber:tl({matchPattern:/\d+/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(нтө|нт)/i,abbreviated:/^(нтө|нт)/i,wide:/^(нийтийн тооллын өмнө|нийтийн тооллын)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(нтө|нийтийн тооллын өмнө)/i,/^(нт|нийтийн тооллын)/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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"})},vp={code:"mn",formatDistance:(e,t,n)=>{let i;const a=cp[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:mp,formatRelative:(e,t,n,i)=>fp[e],localize:gp,match:pp,options:{weekStartsOn:1,firstWeekContainsDate:1}},yp={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"}},bp={date:Vu({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},wp={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"},kp={code:"ms",formatDistance:(e,t,n)=>{let i;const a=yp[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:bp,formatRelative:(e,t,n,i)=>wp[e],localize:{ordinalNumber:(e,t)=>"ke-"+Number(e),era:Qu({values:{narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masihi","Masihi"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^ke-(\d+)?/i,parsePattern:/petama|\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},Mp={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"}},Sp={date:Vu({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Pp={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"},Ep={code:"mt",formatDistance:(e,t,n)=>{let i;const a=Mp[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:Sp,formatRelative:(e,t,n,i)=>Pp[e],localize:{ordinalNumber:(e,t)=>Number(e)+"º",era:Qu({values:{narrow:["Q","W"],abbreviated:["QK","WK"],wide:["qabel Kristu","wara Kristu"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},Tp={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"}},Ap={date:Vu({formats:{full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Vu({formats:{full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},xp={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"},Cp={code:"nb",formatDistance:(e,t,n)=>{let i;const a=Tp[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:Ap,formatRelative:(e,t,n,i)=>xp[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Qu({values:{narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["før Kristus","etter Kristus"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},Lp={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"}},Dp={date:Vu({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd-MM-y"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ip={lastWeek:"'afgelopen' eeee 'om' p",yesterday:"'gisteren om' p",today:"'vandaag om' p",tomorrow:"'morgen om' p",nextWeek:"eeee 'om' p",other:"P"},Rp={code:"nl",formatDistance:(e,t,n)=>{let i;const a=Lp[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:Dp,formatRelative:(e,t,n,i)=>Ip[e],localize:{ordinalNumber:(e,t)=>Number(e)+"e",era:Qu({values:{narrow:["v.C.","n.C."],abbreviated:["v.Chr.","n.Chr."],wide:["voor Christus","na Christus"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)e?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^([vn]\.? ?C\.?)/,abbreviated:/^([vn]\. ?Chr\.?)/,wide:/^((voor|na) Christus)/},defaultMatchWidth:"wide",parsePatterns:{any:[/^v/,/^n/]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},_p={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"}},Wp={date:Vu({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Np={lastWeek:"'vorige' eeee 'om' p",yesterday:"'gisteren om' p",today:"'vandaag om' p",tomorrow:"'morgen om' p",nextWeek:"eeee 'om' p",other:"P"},Op={code:"nl-BE",formatDistance:(e,t,n)=>{let i;const a=_p[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:Wp,formatRelative:(e,t,n,i)=>Np[e],localize:{ordinalNumber:(e,t)=>Number(e)+"e",era:Qu({values:{narrow:["v.C.","n.C."],abbreviated:["v.Chr.","n.Chr."],wide:["voor Christus","na Christus"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)e?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^([vn]\.? ?C\.?)/,abbreviated:/^([vn]\. ?Chr\.?)/,wide:/^((voor|na) Christus)/},defaultMatchWidth:"wide",parsePatterns:{any:[/^v/,/^n/]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},Fp={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"}},jp=["null","ein","to","tre","fire","fem","seks","sju","åtte","ni","ti","elleve","tolv"],zp={date:Vu({formats:{full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Vu({formats:{full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},$p={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"},Hp={code:"nn",formatDistance:(e,t,n)=>{let i;const a=Fp[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t<13?jp[t]:String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"om "+i:i+" sidan":i},formatLong:zp,formatRelative:(e,t,n,i)=>$p[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Qu({values:{narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["før Kristus","etter Kristus"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},Up={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"}},Bp={date:Vu({formats:{full:"EEEE d 'de' MMMM y",long:"d 'de' MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'a' {{time}}",long:"{{date}} 'a' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Gp={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"},Xp={code:"oc",formatDistance:(e,t,n)=>{let i;const a=Up[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:Bp,formatRelative:(e,t,n,i)=>Gp[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:Qu({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:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)(èr|nd|en)?[a]?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},Yp={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 Kp(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 Vp={date:Vu({formats:{full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},qp={masculine:"ostatni",feminine:"ostatnia"},Jp={masculine:"ten",feminine:"ta"},Qp={masculine:"następny",feminine:"następna"},Zp={0:"feminine",1:"masculine",2:"masculine",3:"feminine",4:"masculine",5:"masculine",6:"feminine"};function ev(e,t,n,i){let a;if(Hl(t,n,i))a=Jp;else if("lastWeek"===e)a=qp;else{if("nextWeek"!==e)throw new Error(`Cannot determine adjectives for token ${e}`);a=Qp}const r=t.getDay();return`'${a[Zp[r]]}' eeee 'o' p`}const tv={lastWeek:ev,yesterday:"'wczoraj o' p",today:"'dzisiaj o' p",tomorrow:"'jutro o' p",nextWeek:ev,other:"P"},nv={code:"pl",formatDistance:(e,t,n)=>{const i=Yp[e];return n?.addSuffix?n.comparison&&n.comparison>0?"za "+Kp(i,t,"future"):Kp(i,t,"past")+" temu":Kp(i,t,"regular")},formatLong:Vp,formatRelative:(e,t,n,i)=>{const a=tv[e];return"function"==typeof a?a(e,t,n,i):a},localize:{ordinalNumber:(e,t)=>String(e),era:Qu({values:{narrow:["p.n.e.","n.e."],abbreviated:["p.n.e.","n.e."],wide:["przed naszą erą","naszej ery"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},iv={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"}},av={date:Vu({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:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},rv={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"},ov={code:"pt",formatDistance:(e,t,n)=>{let i;const a=iv[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:av,formatRelative:(e,t,n,i)=>{const a=rv[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>Number(e)+"º",era:Qu({values:{narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)(º|ª)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},sv={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"}},dv={date:Vu({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:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},uv={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"},lv={code:"pt-BR",formatDistance:(e,t,n)=>{let i;const a=sv[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:dv,formatRelative:(e,t,n,i)=>{const a=uv[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>{const n=Number(e);return"week"===t?.unit?n+"ª":n+"º"},era:Qu({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)[ºªo]?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},hv={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"}},cv={date:Vu({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'la' {{time}}",long:"{{date}} 'la' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},mv={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"},fv={code:"ro",formatDistance:(e,t,n)=>{let i;const a=hv[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:cv,formatRelative:(e,t,n,i)=>mv[e],localize:{ordinalNumber:(e,t)=>String(e),era:Qu({values:{narrow:["Î","D"],abbreviated:["Î.d.C.","D.C."],wide:["Înainte de Cristos","După Cristos"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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 gv(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 pv(e){return(t,n)=>n?.addSuffix?n.comparison&&n.comparison>0?e.future?gv(e.future,t):"через "+gv(e.regular,t):e.past?gv(e.past,t):gv(e.regular,t)+" назад":gv(e.regular,t)}const vv={lessThanXSeconds:pv({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:pv({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:pv({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:pv({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:pv({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:pv({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:pv({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:pv({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:pv({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:pv({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:pv({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:pv({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:pv({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:pv({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:pv({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})},yv={date:Vu({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:Vu({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},bv=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function wv(e){const t=bv[e];return 2===e?"'во "+t+" в' p":"'в "+t+" в' p"}const kv={lastWeek:(e,t,n)=>{const i=e.getDay();return Hl(e,t,n)?wv(i):function(e){const t=bv[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 Hl(e,t,n)?wv(i):function(e){const t=bv[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"},Mv={code:"ru",formatDistance:(e,t,n)=>vv[e](t,n),formatLong:yv,formatRelative:(e,t,n,i)=>{const a=kv[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:Qu({values:{narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},defaultWidth:"wide",formattingValues:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},defaultFormattingWidth:"wide"}),day:Qu({values:{narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},Sv={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"}},Pv={date:Vu({formats:{full:"EEEE MMMM d. 'b.' y",long:"MMMM d. 'b.' y",medium:"MMM d. 'b.' y",short:"dd.MM.y"},defaultWidth:"full"}),time:Vu({formats:{full:"'dii.' HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'dii.' {{time}}",long:"{{date}} 'dii.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Ev={lastWeek:"'ovddit' eeee 'dii.' p",yesterday:"'ikte dii.' p",today:"'odne dii.' p",tomorrow:"'ihtin dii.' p",nextWeek:"EEEE 'dii.' p",other:"P"},Tv={code:"se",formatDistance:(e,t,n)=>{let i;const a=Sv[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:Pv,formatRelative:(e,t,n,i)=>Ev[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Qu({values:{narrow:["o.Kr.","m.Kr."],abbreviated:["o.Kr.","m.Kr."],wide:["ovdal Kristusa","maŋŋel Kristusa"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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 Av(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 xv(e){let t="";return"almost"===e&&(t="takmer"),"about"===e&&(t="približne"),t.length>0?t+" ":""}function Cv(e){let t="";return"lessThan"===e&&(t="menej než"),"over"===e&&(t="viac než"),t.length>0?t+" ":""}const Lv={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"}}},Dv={date:Vu({formats:{full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. M. y",short:"d. M. y"},defaultWidth:"full"}),time:Vu({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}}, {{time}}",long:"{{date}}, {{time}}",medium:"{{date}}, {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Iv=["nedeľu","pondelok","utorok","stredu","štvrtok","piatok","sobotu"];function Rv(e){return 4===e?"'vo' eeee 'o' p":"'v "+Iv[e]+" o' p"}const _v={lastWeek:(e,t,n)=>{const i=e.getDay();return Hl(e,t,n)?Rv(i):function(e){const t=Iv[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 Hl(e,t,n)?Rv(i):function(e){const t=Iv[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"},Wv={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=Lv[a];return n?.addSuffix?n.comparison&&n.comparison>0?xv(i)+"o "+Cv(i)+Av(o,t,"future"):xv(i)+"pred "+Cv(i)+Av(o,t,"past"):xv(i)+Cv(i)+Av(o,t,"present")},formatLong:Dv,formatRelative:(e,t,n,i)=>{const a=_v[e];return"function"==typeof a?a(t,n,i):a},localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Qu({values:{narrow:["pred Kr.","po Kr."],abbreviated:["pred Kr.","po Kr."],wide:["pred Kristom","po Kristovi"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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 Nv={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 Ov={date:Vu({formats:{full:"EEEE, dd. MMMM y",long:"dd. MMMM y",medium:"d. MMM y",short:"d. MM. yy"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Fv={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"},jv={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=Nv[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:Ov,formatRelative:(e,t,n,i)=>{const a=Fv[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Qu({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:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},zv={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"}},$v={date:Vu({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} 'në' {{time}}",long:"{{date}} 'në' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Hv={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"},Uv={code:"sq",formatDistance:(e,t,n)=>{let i;const a=zv[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:$v,formatRelative:(e,t,n,i)=>Hv[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:Qu({values:{narrow:["P","M"],abbreviated:["PK","MK"],wide:["Para Krishtit","Mbas Krishtit"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)(-rë|-të|t|)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},Bv={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}} година"}},Gv={date:Vu({formats:{full:"EEEE, d. MMMM yyyy.",long:"d. MMMM yyyy.",medium:"d. MMM yy.",short:"dd. MM. yy."},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss (zzzz)",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'у' {{time}}",long:"{{date}} 'у' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Xv={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"},Yv={code:"sr",formatDistance:(e,t,n)=>{let i;const a=Bv[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:Gv,formatRelative:(e,t,n,i)=>{const a=Xv[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Qu({values:{narrow:["пр.н.е.","АД"],abbreviated:["пр. Хр.","по. Хр."],wide:["Пре Христа","После Христа"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1.","2.","3.","4."],abbreviated:["1. кв.","2. кв.","3. кв.","4. кв."],wide:["1. квартал","2. квартал","3. квартал","4. квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({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:Qu({values:{narrow:["Н","П","У","С","Ч","П","С"],short:["нед","пон","уто","сре","чет","пет","суб"],abbreviated:["нед","пон","уто","сре","чет","пет","суб"],wide:["недеља","понедељак","уторак","среда","четвртак","петак","субота"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(пр\.н\.е\.|АД)/i,abbreviated:/^(пр\.\s?Хр\.|по\.\s?Хр\.)/i,wide:/^(Пре Христа|пре нове ере|После Христа|нова ера)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^пр/i,/^(по|нова)/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},Kv={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"}},Vv={date:Vu({formats:{full:"EEEE, d. MMMM yyyy.",long:"d. MMMM yyyy.",medium:"d. MMM yy.",short:"dd. MM. yy."},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss (zzzz)",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'u' {{time}}",long:"{{date}} 'u' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},qv={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"},Jv={code:"sr-Latn",formatDistance:(e,t,n)=>{let i;const a=Kv[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:Vv,formatRelative:(e,t,n,i)=>{const a=qv[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Qu({values:{narrow:["pr.n.e.","AD"],abbreviated:["pr. Hr.","po. Hr."],wide:["Pre Hrista","Posle Hrista"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)\./i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},Qv={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"}},Zv=["noll","en","två","tre","fyra","fem","sex","sju","åtta","nio","tio","elva","tolv"],ey={date:Vu({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"y-MM-dd"},defaultWidth:"full"}),time:Vu({formats:{full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},ty={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"},ny={code:"sv",formatDistance:(e,t,n)=>{let i;const a=Qv[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t<13?Zv[t]:String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"om "+i:i+" sedan":i},formatLong:ey,formatRelative:(e,t,n,i)=>ty[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:Qu({values:{narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["före Kristus","efter Kristus"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)(:a|:e)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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 iy={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}} ஆண்டுகளுக்கு முன்பு"}}},ay={date:Vu({formats:{full:"EEEE, d MMMM, y",long:"d MMMM, y",medium:"d MMM, y",short:"d/M/yy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ry={lastWeek:"'கடந்த' eeee p 'மணிக்கு'",yesterday:"'நேற்று ' p 'மணிக்கு'",today:"'இன்று ' p 'மணிக்கு'",tomorrow:"'நாளை ' p 'மணிக்கு'",nextWeek:"eeee p 'மணிக்கு'",other:"P"},oy={code:"ta",formatDistance:(e,t,n)=>{const i=n?.addSuffix?n.comparison&&n.comparison>0?"in":"ago":"default",a=iy[e];return void 0===a.one?a[i]:1===t?a.one[i]:a.other[i].replace("{{count}}",String(t))},formatLong:ay,formatRelative:(e,t,n,i)=>ry[e],localize:{ordinalNumber:(e,t)=>String(e),era:Qu({values:{narrow:["கி.மு.","கி.பி."],abbreviated:["கி.மு.","கி.பி."],wide:["கிறிஸ்துவுக்கு முன்","அன்னோ டோமினி"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["காலா.1","காலா.2","காலா.3","காலா.4"],wide:["ஒன்றாம் காலாண்டு","இரண்டாம் காலாண்டு","மூன்றாம் காலாண்டு","நான்காம் காலாண்டு"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["ஜ","பி","மா","ஏ","மே","ஜூ","ஜூ","ஆ","செ","அ","ந","டி"],abbreviated:["ஜன.","பிப்.","மார்.","ஏப்.","மே","ஜூன்","ஜூலை","ஆக.","செப்.","அக்.","நவ.","டிச."],wide:["ஜனவரி","பிப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["ஞா","தி","செ","பு","வி","வெ","ச"],short:["ஞா","தி","செ","பு","வி","வெ","ச"],abbreviated:["ஞாயி.","திங்.","செவ்.","புத.","வியா.","வெள்.","சனி"],wide:["ஞாயிறு","திங்கள்","செவ்வாய்","புதன்","வியாழன்","வெள்ளி","சனி"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(வது)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(கி.மு.|கி.பி.)/i,abbreviated:/^(கி\.?\s?மு\.?|கி\.?\s?பி\.?)/,wide:/^(கிறிஸ்துவுக்கு\sமுன்|அன்னோ\sடோமினி)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/கி\.?\s?மு\.?/,/கி\.?\s?பி\.?/]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},sy={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}} సంవత్సరాల"}}},dy={date:Vu({formats:{full:"d, MMMM y, EEEE",long:"d MMMM, y",medium:"d MMM, y",short:"dd-MM-yy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} {{time}}'కి'",long:"{{date}} {{time}}'కి'",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},uy={lastWeek:"'గత' eeee p",yesterday:"'నిన్న' p",today:"'ఈ రోజు' p",tomorrow:"'రేపు' p",nextWeek:"'తదుపరి' eeee p",other:"P"},ly={code:"te",formatDistance:(e,t,n)=>{let i;const a=n?.addSuffix?sy[e].withPreposition:sy[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:dy,formatRelative:(e,t,n,i)=>uy[e],localize:{ordinalNumber:(e,t)=>Number(e)+"వ",era:Qu({values:{narrow:["క్రీ.పూ.","క్రీ.శ."],abbreviated:["క్రీ.పూ.","క్రీ.శ."],wide:["క్రీస్తు పూర్వం","క్రీస్తుశకం"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["త్రై1","త్రై2","త్రై3","త్రై4"],wide:["1వ త్రైమాసికం","2వ త్రైమాసికం","3వ త్రైమాసికం","4వ త్రైమాసికం"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["జ","ఫి","మా","ఏ","మే","జూ","జు","ఆ","సె","అ","న","డి"],abbreviated:["జన","ఫిబ్ర","మార్చి","ఏప్రి","మే","జూన్","జులై","ఆగ","సెప్టెం","అక్టో","నవం","డిసెం"],wide:["జనవరి","ఫిబ్రవరి","మార్చి","ఏప్రిల్","మే","జూన్","జులై","ఆగస్టు","సెప్టెంబర్","అక్టోబర్","నవంబర్","డిసెంబర్"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["ఆ","సో","మ","బు","గు","శు","శ"],short:["ఆది","సోమ","మంగళ","బుధ","గురు","శుక్ర","శని"],abbreviated:["ఆది","సోమ","మంగళ","బుధ","గురు","శుక్ర","శని"],wide:["ఆదివారం","సోమవారం","మంగళవారం","బుధవారం","గురువారం","శుక్రవారం","శనివారం"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(వ)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(క్రీ\.పూ\.|క్రీ\.శ\.)/i,abbreviated:/^(క్రీ\.?\s?పూ\.?|ప్ర\.?\s?శ\.?\s?పూ\.?|క్రీ\.?\s?శ\.?|సా\.?\s?శ\.?)/i,wide:/^(క్రీస్తు పూర్వం|ప్రస్తుత శకానికి పూర్వం|క్రీస్తు శకం|ప్రస్తుత శకం)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(పూ|శ)/i,/^సా/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},hy={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}} ปี"}},cy={date:Vu({formats:{full:"วันEEEEที่ do MMMM y",long:"do MMMM y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"H:mm:ss น. zzzz",long:"H:mm:ss น. z",medium:"H:mm:ss น.",short:"H:mm น."},defaultWidth:"medium"}),dateTime:Vu({formats:{full:"{{date}} 'เวลา' {{time}}",long:"{{date}} 'เวลา' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},my={lastWeek:"eeee'ที่แล้วเวลา' p",yesterday:"'เมื่อวานนี้เวลา' p",today:"'วันนี้เวลา' p",tomorrow:"'พรุ่งนี้เวลา' p",nextWeek:"eeee 'เวลา' p",other:"P"},fy={code:"th",formatDistance:(e,t,n)=>{let i;const a=hy[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:cy,formatRelative:(e,t,n,i)=>my[e],localize:{ordinalNumber:(e,t)=>String(e),era:Qu({values:{narrow:["B","คศ"],abbreviated:["BC","ค.ศ."],wide:["ปีก่อนคริสตกาล","คริสต์ศักราช"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["ไตรมาสแรก","ไตรมาสที่สอง","ไตรมาสที่สาม","ไตรมาสที่สี่"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],abbreviated:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],wide:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],short:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],abbreviated:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],wide:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^\d+/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},gy={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"}},py={date:Vu({formats:{full:"d MMMM y EEEE",long:"d MMMM y",medium:"d MMM y",short:"dd.MM.yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'saat' {{time}}",long:"{{date}} 'saat' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},vy={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"},yy={code:"tr",formatDistance:(e,t,n)=>{let i;const a=gy[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:py,formatRelative:(e,t,n,i)=>vy[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Qu({values:{narrow:["MÖ","MS"],abbreviated:["MÖ","MS"],wide:["Milattan Önce","Milattan Sonra"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:el({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:el({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:el({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:el({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:el({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}},by={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}} ئاساسەن"}},wy={date:Vu({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} 'دە' {{time}}",long:"{{date}} 'دە' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ky={lastWeek:"'ئ‍ۆتكەن' eeee 'دە' p",yesterday:"'تۈنۈگۈن دە' p",today:"'بۈگۈن دە' p",tomorrow:"'ئەتە دە' p",nextWeek:"eeee 'دە' p",other:"P"},My={code:"ug",formatDistance:(e,t,n)=>{let i;const a=by[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:wy,formatRelative:(e,t,n,i)=>ky[e],localize:{ordinalNumber:(e,t)=>String(e),era:Qu({values:{narrow:["ب","ك"],abbreviated:["ب","ك"],wide:["مىيلادىدىن بۇرۇن","مىيلادىدىن كىيىن"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["1","2","3","4"],wide:["بىرىنجى چارەك","ئىككىنجى چارەك","ئۈچىنجى چارەك","تۆتىنجى چارەك"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["ي","ف","م","ا","م","ى","ى","ا","س","ۆ","ن","د"],abbreviated:["يانۋار","فېۋىرال","مارت","ئاپرىل","ماي","ئىيۇن","ئىيول","ئاۋغۇست","سىنتەبىر","ئۆكتەبىر","نويابىر","دىكابىر"],wide:["يانۋار","فېۋىرال","مارت","ئاپرىل","ماي","ئىيۇن","ئىيول","ئاۋغۇست","سىنتەبىر","ئۆكتەبىر","نويابىر","دىكابىر"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["ي","د","س","چ","پ","ج","ش"],short:["ي","د","س","چ","پ","ج","ش"],abbreviated:["يەكشەنبە","دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"],wide:["يەكشەنبە","دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(ب|ك)/i,wide:/^(مىيلادىدىن بۇرۇن|مىيلادىدىن كىيىن)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^بۇرۇن/i,/^كىيىن/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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 Sy(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 Py(e){return(t,n)=>n&&n.addSuffix?n.comparison&&n.comparison>0?e.future?Sy(e.future,t):"за "+Sy(e.regular,t):e.past?Sy(e.past,t):Sy(e.regular,t)+" тому":Sy(e.regular,t)}const Ey={lessThanXSeconds:Py({regular:{one:"менше секунди",singularNominative:"менше {{count}} секунди",singularGenitive:"менше {{count}} секунд",pluralGenitive:"менше {{count}} секунд"},future:{one:"менше, ніж за секунду",singularNominative:"менше, ніж за {{count}} секунду",singularGenitive:"менше, ніж за {{count}} секунди",pluralGenitive:"менше, ніж за {{count}} секунд"}}),xSeconds:Py({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:Py({regular:{one:"менше хвилини",singularNominative:"менше {{count}} хвилини",singularGenitive:"менше {{count}} хвилин",pluralGenitive:"менше {{count}} хвилин"},future:{one:"менше, ніж за хвилину",singularNominative:"менше, ніж за {{count}} хвилину",singularGenitive:"менше, ніж за {{count}} хвилини",pluralGenitive:"менше, ніж за {{count}} хвилин"}}),xMinutes:Py({regular:{singularNominative:"{{count}} хвилина",singularGenitive:"{{count}} хвилини",pluralGenitive:"{{count}} хвилин"},past:{singularNominative:"{{count}} хвилину тому",singularGenitive:"{{count}} хвилини тому",pluralGenitive:"{{count}} хвилин тому"},future:{singularNominative:"за {{count}} хвилину",singularGenitive:"за {{count}} хвилини",pluralGenitive:"за {{count}} хвилин"}}),aboutXHours:Py({regular:{singularNominative:"близько {{count}} години",singularGenitive:"близько {{count}} годин",pluralGenitive:"близько {{count}} годин"},future:{singularNominative:"приблизно за {{count}} годину",singularGenitive:"приблизно за {{count}} години",pluralGenitive:"приблизно за {{count}} годин"}}),xHours:Py({regular:{singularNominative:"{{count}} годину",singularGenitive:"{{count}} години",pluralGenitive:"{{count}} годин"}}),xDays:Py({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} днi",pluralGenitive:"{{count}} днів"}}),aboutXWeeks:Py({regular:{singularNominative:"близько {{count}} тижня",singularGenitive:"близько {{count}} тижнів",pluralGenitive:"близько {{count}} тижнів"},future:{singularNominative:"приблизно за {{count}} тиждень",singularGenitive:"приблизно за {{count}} тижні",pluralGenitive:"приблизно за {{count}} тижнів"}}),xWeeks:Py({regular:{singularNominative:"{{count}} тиждень",singularGenitive:"{{count}} тижні",pluralGenitive:"{{count}} тижнів"}}),aboutXMonths:Py({regular:{singularNominative:"близько {{count}} місяця",singularGenitive:"близько {{count}} місяців",pluralGenitive:"близько {{count}} місяців"},future:{singularNominative:"приблизно за {{count}} місяць",singularGenitive:"приблизно за {{count}} місяці",pluralGenitive:"приблизно за {{count}} місяців"}}),xMonths:Py({regular:{singularNominative:"{{count}} місяць",singularGenitive:"{{count}} місяці",pluralGenitive:"{{count}} місяців"}}),aboutXYears:Py({regular:{singularNominative:"близько {{count}} року",singularGenitive:"близько {{count}} років",pluralGenitive:"близько {{count}} років"},future:{singularNominative:"приблизно за {{count}} рік",singularGenitive:"приблизно за {{count}} роки",pluralGenitive:"приблизно за {{count}} років"}}),xYears:Py({regular:{singularNominative:"{{count}} рік",singularGenitive:"{{count}} роки",pluralGenitive:"{{count}} років"}}),overXYears:Py({regular:{singularNominative:"більше {{count}} року",singularGenitive:"більше {{count}} років",pluralGenitive:"більше {{count}} років"},future:{singularNominative:"більше, ніж за {{count}} рік",singularGenitive:"більше, ніж за {{count}} роки",pluralGenitive:"більше, ніж за {{count}} років"}}),almostXYears:Py({regular:{singularNominative:"майже {{count}} рік",singularGenitive:"майже {{count}} роки",pluralGenitive:"майже {{count}} років"},future:{singularNominative:"майже за {{count}} рік",singularGenitive:"майже за {{count}} роки",pluralGenitive:"майже за {{count}} років"}})},Ty={date:Vu({formats:{full:"EEEE, do MMMM y 'р.'",long:"do MMMM y 'р.'",medium:"d MMM y 'р.'",short:"dd.MM.y"},defaultWidth:"full"}),time:Vu({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} 'о' {{time}}",long:"{{date}} 'о' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ay=["неділю","понеділок","вівторок","середу","четвер","п’ятницю","суботу"];function xy(e){return"'у "+Ay[e]+" о' p"}const Cy={lastWeek:(e,t,n)=>{const i=Fl(e),a=i.getDay();return Hl(i,t,n)?xy(a):function(e){const t=Ay[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=Fl(e),a=i.getDay();return Hl(i,t,n)?xy(a):function(e){const t=Ay[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"},Ly={code:"uk",formatDistance:(e,t,n)=>(n=n||{},Ey[e](t,n)),formatLong:Ty,formatRelative:(e,t,n,i)=>{const a=Cy[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:Qu({values:{narrow:["до н.е.","н.е."],abbreviated:["до н. е.","н. е."],wide:["до нашої ери","нашої ери"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"]},defaultWidth:"wide",formattingValues:{narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"]},defaultFormattingWidth:"wide"}),day:Qu({values:{narrow:["Н","П","В","С","Ч","П","С"],short:["нд","пн","вт","ср","чт","пт","сб"],abbreviated:["нед","пон","вів","сер","чтв","птн","суб"],wide:["неділя","понеділок","вівторок","середа","четвер","п’ятниця","субота"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(-?(е|й|є|а|я))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^((до )?н\.?\s?е\.?)/i,abbreviated:/^((до )?н\.?\s?е\.?)/i,wide:/^(до нашої ери|нашої ери|наша ера)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},Dy={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"}},Iy={date:Vu({formats:{full:"EEEE, do MMMM, y",long:"do MMMM, y",medium:"d MMM, y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"h:mm:ss zzzz",long:"h:mm:ss z",medium:"h:mm:ss",short:"h:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},Ry={lastWeek:"'oldingi' eeee p 'da'",yesterday:"'kecha' p 'da'",today:"'bugun' p 'da'",tomorrow:"'ertaga' p 'da'",nextWeek:"eeee p 'da'",other:"P"},_y={code:"uz",formatDistance:(e,t,n)=>{let i;const a=Dy[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:Iy,formatRelative:(e,t,n,i)=>Ry[e],localize:{ordinalNumber:(e,t)=>String(e),era:Qu({values:{narrow:["M.A","M."],abbreviated:["M.A","M."],wide:["Miloddan Avvalgi","Milodiy"]},defaultWidth:"wide"}),quarter:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)(chi)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},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:Vu({formats:{full:"EEEE, do MMMM, y",long:"do MMMM, y",medium:"d MMM, y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Vu({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},Oy={lastWeek:"'ўтган' eeee p 'да'",yesterday:"'кеча' p 'да'",today:"'бугун' p 'да'",tomorrow:"'эртага' p 'да'",nextWeek:"eeee p 'да'",other:"P"},Fy={code:"uz-Cyrl",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)=>String(e),era:Qu({values:{narrow:["М.А","М"],abbreviated:["М.А","М"],wide:["Милоддан Аввалги","Милодий"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["1-чор.","2-чор.","3-чор.","4-чор."],wide:["1-чорак","2-чорак","3-чорак","4-чорак"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"],wide:["январ","феврал","март","апрел","май","июн","июл","август","сентабр","октабр","ноябр","декабр"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["Я","Д","С","Ч","П","Ж","Ш"],short:["як","ду","се","чо","па","жу","ша"],abbreviated:["якш","душ","сеш","чор","пай","жум","шан"],wide:["якшанба","душанба","сешанба","чоршанба","пайшанба","жума","шанба"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(\d+)(чи)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(м\.а|м\.)/i,abbreviated:/^(м\.а|м\.)/i,wide:/^(милоддан аввал|милоддан кейин)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^м/i,/^а/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({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:el({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}},jy={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"}},zy={date:Vu({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:Vu({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},$y={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"},Hy={code:"vi",formatDistance:(e,t,n)=>{let i;const a=jy[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:zy,formatRelative:(e,t,n,i)=>$y[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:Qu({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:Qu({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:Qu({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:Qu({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:Qu({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:tl({matchPattern:/^(\d+)/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({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:el({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:el({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:el({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:el({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}},Uy={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}} 年"}},By={date:Vu({formats:{full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})};function Gy(e,t,n){const i="eeee p";return Hl(e,t,n)?i:e.getTime()>t.getTime()?"'下个'"+i:"'上个'"+i}const Xy={lastWeek:Gy,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:Gy,other:"PP p"},Yy={code:"zh-CN",formatDistance:(e,t,n)=>{let i;const a=Uy[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:By,formatRelative:(e,t,n,i)=>{const a=Xy[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:Qu({values:{narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(第\s*)?\d+(日|时|分|秒)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(前)/i,/^(公元)/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({matchPatterns:{narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},defaultParseWidth:"any"}),dayPeriod:el({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}},Ky={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}} 年"}},Vy={date:Vu({formats:{full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},qy={lastWeek:"'上個'eeee p",yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:"'下個'eeee p",other:"P"},Jy={code:"zh-HK",formatDistance:(e,t,n)=>{let i;const a=Ky[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:Vy,formatRelative:(e,t,n,i)=>qy[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:Qu({values:{narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["週日","週一","週二","週三","週四","週五","週六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(第\s*)?\d+(日|時|分|秒)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(前)/i,/^(公元)/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({matchPatterns:{narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^週[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},defaultParseWidth:"any"}),dayPeriod:el({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}},Qy={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}} 年"}},Zy={date:Vu({formats:{full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},defaultWidth:"full"}),time:Vu({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:Vu({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},eb={lastWeek:"'上個'eeee p",yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:"'下個'eeee p",other:"P"},tb={code:"zh-TW",formatDistance:(e,t,n)=>{let i;const a=Qy[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:Zy,formatRelative:(e,t,n,i)=>eb[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:Qu({values:{narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},defaultWidth:"wide"}),quarter:Qu({values:{narrow:["1","2","3","4"],abbreviated:["第一刻","第二刻","第三刻","第四刻"],wide:["第一刻鐘","第二刻鐘","第三刻鐘","第四刻鐘"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qu({values:{narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},defaultWidth:"wide"}),day:Qu({values:{narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["週日","週一","週二","週三","週四","週五","週六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},defaultWidth:"wide"}),dayPeriod:Qu({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:tl({matchPattern:/^(第\s*)?\d+(日|時|分|秒)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:{narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(前)/i,/^(公元)/i]},defaultParseWidth:"any"}),quarter:el({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:el({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:el({matchPatterns:{narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^週[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},defaultMatchWidth:"wide",parsePatterns:{any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},defaultParseWidth:"any"}),dayPeriod:el({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 nb=Object.freeze({__proto__:null,af:il,ar:sl,arDZ:hl,arEG:gl,arMA:bl,arSA:Sl,arTN:Al,az:Rl,be:Xl,beTarask:eh,bg:sh,bn:gh,bs:kh,ca:xh,ckb:_h,cs:$h,cy:Yh,da:Zh,de:uc,deAT:mc,el:bc,enAU:Ac,enCA:Cc,enGB:Dc,enIE:Ic,enIN:Rc,enNZ:_c,enUS:Wc,enZA:Nc,eo:zc,es:Gc,et:Jc,eu:nm,faIR:om,fi:Mm,fr:Dm,frCA:Im,frCH:Wm,fy:jm,gd:Um,gl:Km,gu:Qm,he:rf,hi:mf,hr:vf,ht:kf,hu:Cf,hy:Rf,id:Of,is:$f,it:Jf,itCH:Qf,ja:ng,jaHira:og,ka:lg,kk:bg,km:Sg,kn:xg,ko:Ig,lb:$g,lt:Jg,lv:ip,mk:hp,mn:vp,ms:kp,mt:Ep,nb:Cp,nl:Rp,nlBE:Op,nn:Hp,oc:Xp,pl:nv,pt:ov,ptBR:lv,ro:fv,ru:Mv,se:Tv,sk:Wv,sl:jv,sq:Uv,sr:Yv,srLatn:Jv,sv:ny,ta:oy,te:ly,th:fy,tr:yy,ug:My,uk:Ly,uz:_y,uzCyrl:Fy,vi:Hy,zhCN:Yy,zhHK:Jy,zhTW:tb});const ib=6048e5,ab=864e5;function rb(e){const t=Fl(e);return t.setHours(0,0,0,0),t}function ob(e){const t=Fl(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 sb(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function db(e){const t=Fl(e),n=function(e,t){const n=rb(e),i=rb(t),a=+n-ob(n),r=+i-ob(i);return Math.round((a-r)/ab)}(t,function(e){const t=Fl(e),n=sb(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}(t));return n+1}function ub(e){return $l(e,{weekStartsOn:1})}function lb(e){const t=Fl(e),n=t.getFullYear(),i=sb(e,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const a=ub(i),r=sb(e,0);r.setFullYear(n,0,4),r.setHours(0,0,0,0);const o=ub(r);return t.getTime()>=a.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function hb(e){const t=Fl(e),n=+ub(t)-+function(e){const t=lb(e),n=sb(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ub(n)}(t);return Math.round(n/ib)+1}function cb(e,t){const n=Fl(e),i=n.getFullYear(),a=zl(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,o=sb(e,0);o.setFullYear(i+1,0,r),o.setHours(0,0,0,0);const s=$l(o,t),d=sb(e,0);d.setFullYear(i,0,r),d.setHours(0,0,0,0);const u=$l(d,t);return n.getTime()>=s.getTime()?i+1:n.getTime()>=u.getTime()?i:i-1}function mb(e,t){const n=Fl(e),i=+$l(n,t)-+function(e,t){const n=zl(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=cb(e,t),r=sb(e,0);return r.setFullYear(a,0,i),r.setHours(0,0,0,0),$l(r,t)}(n,t);return Math.round(i/ib)+1}function fb(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const gb={y(e,t){const n=e.getFullYear(),i=n>0?n:1-n;return fb("yy"===t?i%100:i,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):fb(n+1,2)},d:(e,t)=>fb(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)=>fb(e.getHours()%12||12,t.length),H:(e,t)=>fb(e.getHours(),t.length),m:(e,t)=>fb(e.getMinutes(),t.length),s:(e,t)=>fb(e.getSeconds(),t.length),S(e,t){const n=t.length,i=e.getMilliseconds();return fb(Math.trunc(i*Math.pow(10,n-3)),t.length)}},pb="midnight",vb="noon",yb="morning",bb="afternoon",wb="evening",kb="night",Mb={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 gb.y(e,t)},Y:function(e,t,n,i){const a=cb(e,i),r=a>0?a:1-a;if("YY"===t){return fb(r%100,2)}return"Yo"===t?n.ordinalNumber(r,{unit:"year"}):fb(r,t.length)},R:function(e,t){return fb(lb(e),t.length)},u:function(e,t){return fb(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 fb(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 fb(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 gb.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 fb(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=mb(e,i);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):fb(a,t.length)},I:function(e,t,n){const i=hb(e);return"Io"===t?n.ordinalNumber(i,{unit:"week"}):fb(i,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):gb.d(e,t)},D:function(e,t,n){const i=db(e);return"Do"===t?n.ordinalNumber(i,{unit:"dayOfYear"}):fb(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 fb(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 fb(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 fb(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?vb:0===i?pb: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?wb:i>=12?bb:i>=4?yb:kb,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 gb.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):gb.H(e,t)},K:function(e,t,n){const i=e.getHours()%12;return"Ko"===t?n.ordinalNumber(i,{unit:"hour"}):fb(i,t.length)},k:function(e,t,n){let i=e.getHours();return 0===i&&(i=24),"ko"===t?n.ordinalNumber(i,{unit:"hour"}):fb(i,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):gb.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):gb.s(e,t)},S:function(e,t){return gb.S(e,t)},X:function(e,t,n){const i=e.getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return Pb(i);case"XXXX":case"XX":return Eb(i);default:return Eb(i,":")}},x:function(e,t,n){const i=e.getTimezoneOffset();switch(t){case"x":return Pb(i);case"xxxx":case"xx":return Eb(i);default:return Eb(i,":")}},O:function(e,t,n){const i=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Sb(i,":");default:return"GMT"+Eb(i,":")}},z:function(e,t,n){const i=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Sb(i,":");default:return"GMT"+Eb(i,":")}},t:function(e,t,n){return fb(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return fb(e.getTime(),t.length)}};function Sb(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+fb(r,2)}function Pb(e,t){if(e%60==0){return(e>0?"-":"+")+fb(Math.abs(e)/60,2)}return Eb(e,t)}function Eb(e,t=""){const n=e>0?"-":"+",i=Math.abs(e);return n+fb(Math.trunc(i/60),2)+t+fb(i%60,2)}const Tb=(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"})}},Ab=(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"})}},xb={p:Ab,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return Tb(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}}",Tb(i,t)).replace("{{time}}",Ab(a,t))}},Cb=/^D+$/,Lb=/^Y+$/,Db=["D","DD","YY","YYYY"];function Ib(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=Fl(e);return!isNaN(Number(n))}const Rb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_b=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wb=/^'([^]*?)'?$/,Nb=/''/g,Ob=/[a-zA-Z]/;function Fb(e,t,n){const i=zl(),a=n?.locale??i.locale??Wc,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=Fl(e);if(!Ib(s))throw new RangeError("Invalid time value");let d=t.match(_b).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,xb[t])(e,a.formatLong)}return e})).join("").match(Rb).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:jb(e)};if(Mb[t])return{isToken:!0,value:e};if(t.match(Ob))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(d=a.localize.preprocessor(s,d));const u={firstWeekContainsDate:r,weekStartsOn:o,locale:a};return d.map((i=>{if(!i.isToken)return i.value;const r=i.value;(!n?.useAdditionalWeekYearTokens&&function(e){return Lb.test(e)}(r)||!n?.useAdditionalDayOfYearTokens&&function(e){return Cb.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),Db.includes(e))throw new RangeError(i)}(r,t,String(e));return(0,Mb[r[0]])(s,r,a.localize,u)})).join("")}function jb(e){const t=e.match(Wb);return t?t[1].replace(Nb,"'"):e}function zb(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 $b(e,t){const n=function(e){if(!Ub[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;Ub[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 Ub[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=Hb[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 Hb={year:0,month:1,day:2,hour:3,minute:4,second:5};const Ub={};function Bb(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 Gb=36e5,Xb=6e4,Yb={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Kb(e,t,n){if(!e)return 0;let i,a,r=Yb.timezoneZ.exec(e);if(r)return 0;if(r=Yb.timezoneHH.exec(e),r)return i=parseInt(r[1],10),qb(i)?-i*Gb:NaN;if(r=Yb.timezoneHHMM.exec(e),r){i=parseInt(r[2],10);const e=parseInt(r[3],10);return qb(i,e)?(a=Math.abs(i)*Gb+e*Xb,"+"===r[1]?-a:a):NaN}if(function(e){if(Jb[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Jb[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());const i=n?t:function(e){return Bb(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),a=Vb(i,e),r=n?a:function(e,t,n){const i=e.getTime();let a=i-t;const r=Vb(new Date(a),n);if(t===r)return t;a-=r-t;const o=Vb(new Date(a),n);if(r===o)return r;return Math.max(r,o)}(t,a,e);return-r}return NaN}function Vb(e,t){const n=$b(e,t),i=Bb(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 qb(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}const Jb={};const Qb={X:function(e,t,n){const i=Zb(n.timeZone,e);if(0===i)return"Z";switch(t){case"X":return nw(i);case"XXXX":case"XX":return tw(i);default:return tw(i,":")}},x:function(e,t,n){const i=Zb(n.timeZone,e);switch(t){case"x":return nw(i);case"xxxx":case"xx":return tw(i);default:return tw(i,":")}},O:function(e,t,n){const i=Zb(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+ew(r,2)}(i,":");default:return"GMT"+tw(i,":")}},z:function(e,t,n){switch(t){case"z":case"zz":case"zzz":return zb("short",e,n);default:return zb("long",e,n)}}};function Zb(e,t){const n=e?Kb(e,t,!0)/6e4:t?.getTimezoneOffset()??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function ew(e,t){const n=e<0?"-":"";let i=Math.abs(e).toString();for(;i.length<t;)i="0"+i;return n+i}function tw(e,t=""){const n=e>0?"-":"+",i=Math.abs(e);return n+ew(Math.floor(i/60),2)+t+ew(Math.floor(i%60),2)}function nw(e,t){if(e%60==0){return(e>0?"-":"+")+ew(Math.abs(e)/60,2)}return tw(e,t)}function iw(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 aw=36e5,rw=6e4,ow=2,sw={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 dw(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?ow: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=sw.dateTimePattern.exec(e);i?(t.date=i[1],n=i[3]):(i=sw.datePattern.exec(e),i?(t.date=i[1],n=i[2]):(t.date=null,n=e));if(n){const e=sw.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=sw.YYY[t],i=sw.YYYYY[t];let a=sw.YYYY.exec(e)||i.exec(e);if(a){const t=a[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(a=sw.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=sw.MM.exec(e);if(r)return n=new Date(0),i=parseInt(r[1],10)-1,mw(t,i)?(n.setUTCFullYear(t,i),n):new Date(NaN);if(r=sw.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=cw(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=sw.MMDD.exec(e),r){n=new Date(0),i=parseInt(r[1],10)-1;const e=parseInt(r[2],10);return mw(t,i,e)?(n.setUTCFullYear(t,i,e),n):new Date(NaN)}if(r=sw.Www.exec(e),r)return a=parseInt(r[1],10)-1,fw(a)?uw(t,a):new Date(NaN);if(r=sw.WwwD.exec(e),r){a=parseInt(r[1],10)-1;const e=parseInt(r[2],10)-1;return fw(a,e)?uw(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=sw.HH.exec(e);if(i)return t=parseFloat(i[1].replace(",",".")),gw(t)?t%24*aw:NaN;if(i=sw.HHMM.exec(e),i)return t=parseInt(i[1],10),n=parseFloat(i[2].replace(",",".")),gw(t,n)?t%24*aw+n*rw:NaN;if(i=sw.HHMMSS.exec(e),i){t=parseInt(i[1],10),n=parseInt(i[2],10);const e=parseFloat(i[3].replace(",","."));return gw(t,n,e)?t%24*aw+n*rw+1e3*e:NaN}return null}(i.time),null===a||isNaN(a)))return new Date(NaN);if(i.timeZone||t.timeZone){if(n=Kb(i.timeZone||t.timeZone,new Date(e+a)),isNaN(n))return new Date(NaN)}else n=iw(new Date(e+a)),n=iw(new Date(e+a+n));return new Date(e+a+n)}return new Date(NaN)}function uw(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 lw=[31,28,31,30,31,30,31,31,30,31,30,31],hw=[31,29,31,30,31,30,31,31,30,31,30,31];function cw(e){return e%400==0||e%4==0&&e%100!=0}function mw(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;const i=cw(e);if(i&&n>hw[t])return!1;if(!i&&n>lw[t])return!1}return!0}function fw(e,t){return!(e<0||e>52)&&(null==t||!(t<0||t>6))}function gw(e,t,n){return!(e<0||e>=25)&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}const pw=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function vw(e,t,n,i){return function(e,t,n={}){const i=(t=String(t)).match(pw);if(i){const a=dw(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,"'"+Qb[t[0]](a,t,n)+"'");return r?o.substring(0,i-1)+o.substring(i+1):o}),t)}return Fb(e,t,n)}(function(e,t,n){const i=Kb(t,e=dw(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 yw=e=>{const t=new Intl.Locale(e);return t.language+(t.region??t.script??"")};function bw(t,n=""){const i=t.linkColor||"blue";return e.unsafeCSS(`\n ${n} a:link {\n color: ${i};\n text-decoration-line: underline;\n }\n ${n} a:visited {\n color: ${i};\n text-decoration-line: underline;\n }\n ${n} a:hover {\n color: ${i};\n }\n ${n} a:active {\n color: ${i};\n text-decoration-line: underline;\n }\n `)}let ww=class extends ps{constructor(){super(...arguments),this.inFocusedState=!1}styles(){const{component:t}=this;return"legal"===t.textType?e.unsafeCSS(`\n :host {\n display: block;\n overflow-wrap: break-word;\n width: fit-content;\n ${xs(t,this.inFocusedState)}\n color: ${t.fontColor};\n font-size: ${t.fontSize??12}px;\n text-align: ${t.alignment||"center"};\n ${js(t)}\n ${zs(t,this.inFocusedState)}\n }\n :host p {\n white-space: pre-line; \n }\n ${bw(t,":host")}\n `):e.unsafeCSS(`\n :host {\n display: flex;\n width: fit-content;\n ${function(e){return"fitContent"===e.width?"white-space: nowrap;":"overflow-wrap: anywhere;"}(t)}\n ${xs(t,this.inFocusedState)}\n color: ${this.inFocusedState&&t.focusedFontColor?t.focusedFontColor:t.fontColor??""};\n font-size: ${t.fontSize??12}px;\n text-align: ${t.alignment||"center"};\n ${Fs("string"!=typeof t.strikethrough&&t.strikethrough)}\n ${js(t)}\n ${zs(t,this.inFocusedState)}\n }\n :host p {\n margin: 0;\n }\n ${e.unsafeCSS(bw(t,":host"))}\n `)}render(){let{text:t}=this.component;const{dateTimeFormat:n}=this.component;return t?(n&&(e=>{try{return!isNaN(new Date(e).getTime())}catch{return!1}})(t)&&(t=((e,t)=>{try{const n=yw(Ta.getLanguageCode());return vw(e,Intl.DateTimeFormat().resolvedOptions().timeZone,t,{locale:nb[n]})}catch{return e}})(t,n)),e.html`<div class="content" .innerHTML="${Xu.parse(t)}"></div>`):(this.style.display="none",e.html``)}};o([gs({type:Object})],ww.prototype,"component",void 0),o([gs({type:Boolean})],ww.prototype,"inFocusedState",void 0),ww=o([Bo("nami-text")],ww);let kw=class extends ps{constructor(){super(...arguments),this.inFocusedState=!1}styles(){return e.unsafeCSS(`\n :host { \n display: flex;\n transition: all 0.3s;\n &:not(:first-child) {\n margin-top: ${this.component.spacing||0}px;\n }\n }\n `)}render(){return e.html`<slot></slot>`}};o([gs({type:Object})],kw.prototype,"component",void 0),o([gs({type:Boolean})],kw.prototype,"inFocusedState",void 0),kw=o([Bo("nami-text-list-item-wrapper")],kw);let Mw=class extends ps{constructor(){super(...arguments),this.inFocusedState=!1}styles(){return e.unsafeCSS(`\n :host { \n display: flex;\n overflow-wrap: anywhere;\n transition: all 0.3s;\n margin-right: ${this.component.rightMargin||this.component.spacing||0}px;\n ${xs(this.component,this.inFocusedState)}\n color: ${this.component.fontColor};\n font-size: ${this.component.fontSize??12}px;\n }\n `)}render(){return e.html`
40
39
  <span role="img" aria-label="${this.component.name}" class="anticon anticon-${this.component.name}">
41
40
  <svg viewBox="64 64 896 896" focusable="false" data-icon="${this.component.name}" width="1em" height="1em" fill="currentColor" aria-hidden="true">
42
- ${t=this.component.name,Lc[t]||Lc.CheckCircleOutlined}
41
+ ${t=this.component.name,Yu[t]||Yu.CheckCircleOutlined}
43
42
  </svg>
44
- </span>`;var t}};o([oo({type:Object})],Dc.prototype,"component",void 0),o([oo({type:Boolean})],Dc.prototype,"inFocusedState",void 0),Dc=o([Ti("nami-symbol")],Dc);let Fc=class extends ao{constructor(){super(...arguments),this.inFocusedState=!1}styles(){return e.unsafeCSS(`\n :host {\n line-height: 1.5715;\n display: grid;\n overflow-wrap: anywhere;\n width: fit-content;\n ${vo(this.component,this.inFocusedState)}\n color: ${this.inFocusedState&&this.component.focusedFontColor?this.component.focusedFontColor:this.component.fontColor??""};\n font-size: ${this.component.fontSize??12}px;\n text-align: ${this.component.alignment||"center"};\n ${ko("string"!=typeof this.component.strikethrough&&this.component.strikethrough)}\n ${Eo(this.component)}\n ${Io(this.component,this.inFocusedState)}\n ${Mc(this.component)}\n ${wo(this.component)}\n ${Ao(this.component)}\n }\n :host > :not(:first-child) {\n margin-top: ${this.component.spacing||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 ${vo(this.component,this.inFocusedState)}\n color: ${this.inFocusedState&&this.component.focusedFontColor?this.component.focusedFontColor:this.component.fontColor??""};\n font-size: ${this.component.fontSize??12}px;\n text-align: ${this.component.alignment||"center"};\n ${ko("string"!=typeof this.component.strikethrough&&this.component.strikethrough)}\n ${Eo(this.component)}\n }\n :host .bullet-text-wrapper p {\n margin: 0;\n line-height: 1.2em;\n }\n ${Mc(this.component,":host .bullet-text-wrapper")}\n `)}render(){const{fontColor:t,fontSize:n,bulletComponent:r,texts:s,spacing:i}=this.component,o=r?{fontColor:t,fontSize:n,spacing:i,...r}:null;if(!Array.isArray(s))return e.html``;const a=s.map((t=>t?e.html`<nami-text-list-item-wrapper .component=${this.component}>
43
+ </span>`;var t}};o([gs({type:Object})],Mw.prototype,"component",void 0),o([gs({type:Boolean})],Mw.prototype,"inFocusedState",void 0),Mw=o([Bo("nami-symbol")],Mw);let Sw=class extends ps{constructor(){super(...arguments),this.inFocusedState=!1}styles(){return e.unsafeCSS(`\n :host {\n line-height: 1.5715;\n display: grid;\n overflow-wrap: anywhere;\n width: fit-content;\n ${xs(this.component,this.inFocusedState)}\n color: ${this.inFocusedState&&this.component.focusedFontColor?this.component.focusedFontColor:this.component.fontColor??""};\n font-size: ${this.component.fontSize??12}px;\n text-align: ${this.component.alignment||"center"};\n ${Fs("string"!=typeof this.component.strikethrough&&this.component.strikethrough)}\n ${js(this.component)}\n ${zs(this.component,this.inFocusedState)}\n ${bw(this.component)}\n ${Cs(this.component)}\n ${_s(this.component)}\n }\n :host > :not(:first-child) {\n margin-top: ${this.component.spacing||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 ${xs(this.component,this.inFocusedState)}\n color: ${this.inFocusedState&&this.component.focusedFontColor?this.component.focusedFontColor:this.component.fontColor??""};\n font-size: ${this.component.fontSize??12}px;\n text-align: ${this.component.alignment||"center"};\n ${Fs("string"!=typeof this.component.strikethrough&&this.component.strikethrough)}\n ${js(this.component)}\n }\n :host .bullet-text-wrapper p {\n margin: 0;\n line-height: 1.2em;\n }\n ${bw(this.component,":host .bullet-text-wrapper")}\n `)}render(){const{fontColor:t,fontSize:n,bulletComponent:i,texts:a,spacing:r}=this.component,o=i?{fontColor:t,fontSize:n,spacing:r,...i}:null;if(!Array.isArray(a))return e.html``;const s=a.map((t=>t?e.html`<nami-text-list-item-wrapper .component=${this.component}>
45
44
  ${o&&e.html`<nami-symbol .component=${o}></nami-symbol>`}
46
- <div class="bullet-text-wrapper" .innerHTML="${Nc(t)}"></div>
47
- </nami-text-list-item-wrapper>`:null));return e.html`${a}`}};o([oo({type:Object})],Fc.prototype,"component",void 0),o([oo({type:Boolean})],Fc.prototype,"inFocusedState",void 0),Fc=o([Ti("nami-text-list")],Fc);let zc=class extends ao{constructor(){super(...arguments),this.inFocusedState=!1}styles(){const{component:t,inFocusedState:n}=this,r="vertical"===t.direction?"margin-top":"margin-left",s=t.fillImage?e.unsafeCSS(`\n line-height: 1.5715;\n background-image: url(${t.fillImage});\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n `):e.unsafeCSS(vo(t,n));return e.unsafeCSS(`\n :host {\n display: ${t.hidden?"none":"flex"};\n ${s};\n ${xo(t.position)}\n ${wo(t)}\n ${Io(t,n)}\n }\n :host > :not(:first-child) {\n ${r}: ${t.spacing||0}px;\n }\n `)}render(){return(this.component.components??[]).map((e=>zo(e)))}};o([oo({type:Object})],zc.prototype,"component",void 0),o([oo({type:Boolean})],zc.prototype,"inFocusedState",void 0),zc=o([Ti("nami-container")],zc);let Uc=class extends ao{constructor(){super(...arguments),this.inFocusedState=!1}styles(){const t="vertical"===this.component.direction,n=t?"width":"height",r=t?"margin-top":"margin-left",s=this.component.fillImage?e.unsafeCSS(`\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 `):e.unsafeCSS(vo(this.component,this.inFocusedState));return e.unsafeCSS(`\n :host {\n opacity: 0;\n display: flex;\n ${s};\n ${xo(this.component.position)}\n ${wo(this.component)}\n ${Io(this.component,this.inFocusedState)}\n justify-content: center;\n transition: transform .5s ease-in;\n }\n :host > * {\n ${n}: 100%;\n }\n :host > :not(:first-child) {\n ${r}: ${this.component.spacing||0}px;\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}=mi.state;br(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout((()=>this.classList.add("fade-in")),100),this.currentGroupId=e)}_offerState(){const{anySkuHasTrialOffer:e,anySkuHasIntroOffer:t,anySkuHasPromoOffer:n}=mi.state;return{freeTrialEligible:e,introEligible:t,promoEligible:n}}render(){const{skuItems:e,mediaList:t}=mi.state;return Lo(e,this.component,t,this._offerState()).map((([,e])=>e.map((e=>zo(e,this.inFocusedState)))))}};o([oo({type:Object})],Uc.prototype,"component",void 0),o([oo({type:Boolean})],Uc.prototype,"inFocusedState",void 0),Uc=o([Ti("nami-product-container")],Uc);let Bc=class extends ao{constructor(){super(...arguments),this.inFocusedState=!1}styles(){const{url:t,imageCropping:n,alignment:r,height:s,width:i,rightMargin:o,spacing:a}=this.component,c="fit"===n;return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n position: relative;\n transition: all 0.3s;\n background-image: url(${t});\n background-size: ${c?"contain":"cover"};\n background-position: ${r||""} center;\n background-repeat: no-repeat;\n height: ${bo(s??"100%")};\n width: ${bo(("fitContent"==i?s:i)??"100%")};\n margin-right: ${o||a||0}px;\n ${So(this.component)}\n ${this.component.hidden?"display:none":""}\n }\n `)}render(){return e.html``}};o([oo({type:Object})],Bc.prototype,"component",void 0),o([oo({type:Boolean})],Bc.prototype,"inFocusedState",void 0),Bc=o([Ti("nami-image")],Bc);let jc=class extends ao{constructor(){super(...arguments),this.fullscreen=!1,this.inFocusedState=!1}styles(){const{fullscreen:t,inFocusedState:n,component:r}=this,{formFactor:s}=this.contextConsumer.state,i="phone"===s?t?0:40:0,o="phone"===s?t?0:30:0;return e.unsafeCSS(`\n :host {\n display: ${r.hidden?"none":"flex"};\n flex-direction: column;\n justify-content: center;\n overflow: hidden;\n align-items: center;\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: ${r.zIndex??1};\n border-radius: ${o}px;\n top: ${i}px;\n ${vo(r,n)}\n transition: all 0.3s;\n ${So(r)}\n }\n `)}render(){return(this.component.components??[]).map((e=>zo(e)))}};o([oo({type:Object})],jc.prototype,"component",void 0),o([oo({type:Boolean})],jc.prototype,"fullscreen",void 0),o([oo({type:Boolean})],jc.prototype,"inFocusedState",void 0),jc=o([Ti("nami-background-container")],jc);let Hc=class extends ao{constructor(){super(...arguments),this.zIndex=2,this.inFocusedState=!1}styles(){const{contextConsumer:t,component:n,zIndex:r}=this,{formFactor:s}=t.state,i="phone"!==s?"width: 100%;":"",o=n.spacing??0;return e.unsafeCSS(`\n :host {\n display: ${n.hidden?"none":"flex"};\n position: relative;\n ${wo(n)}\n height: 100%;\n ${i}\n align-items: center;\n justify-content: start;\n z-index: ${r};\n transition: all 0.3s;\n overflow-y: 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 ${So(n)}\n }\n :host > * {\n width: 100%;\n }\n \n :host > *:not(:first-child) {\n ${"vertical"===n.direction?`margin-top: ${o}px;`:`margin-left: ${o}px;`}\n `)}render(){return this.component.components.map((e=>zo(e,this.inFocusedState)))}};o([oo({type:Object})],Hc.prototype,"component",void 0),o([oo({type:Number})],Hc.prototype,"zIndex",void 0),o([oo({type:Boolean})],Hc.prototype,"inFocusedState",void 0),Hc=o([Ti("nami-content-container")],Hc);let Xc=class extends ao{constructor(){super(),this.inFocusedState=!1,this._handleClick=()=>{ca(this.component.onTap)},this.addEventListener("click",this._handleClick)}styles(){const t=Co("active",this.component.components[0]);return e.unsafeCSS(`\n :host {\n cursor: pointer;\n ${vo(this.component,this.inFocusedState)}\n ${Io(this.component,this.inFocusedState)}\n ${this.component.hidden?"display:none":""}\n }\n\n .toggle{\n position: absolute !important;\n top: 0;\n bottom: 0;\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${Po(t,this.inFocusedState)}\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(){const t=this.component.components.map((e=>zo(e,this.inFocusedState)));return e.html`${t}<div class="toggle"></div>`}};o([oo({type:Object})],Xc.prototype,"component",void 0),o([oo({type:Boolean})],Xc.prototype,"inFocusedState",void 0),Xc=o([Ti("nami-segment-picker")],Xc);let Vc=class extends ao{constructor(){super(),this.inFocusedState=!1,this._handleClick=()=>{this.component.id&&mi.setCurrentGroupId(this.component.id)},this._handleHover=()=>{this.inFocusedState=!0},this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover)}styles(){const t=Co("active",this.component),n=Co("inactive",this.component);return e.unsafeCSS(`\n :host {\n display: ${this.component.hidden?"none":"inline-flex"};\n cursor: pointer;\n ${Po({...n,...this.component},this.inFocusedState)}\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${Oo({...t,...this.component})}\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}render(){const t=this.component.id===mi.state.currentGroupId;return this.classList.toggle("active",t),e.html`<input type="radio" id="${this.component.text}" name="${this.component.text}" value="${this.component.text}" checked="${t}" />
48
- <label for="${this.component.text}">${this.component.text}</label>`}};o([oo({type:Object})],Vc.prototype,"component",void 0),o([oo({type:Boolean})],Vc.prototype,"inFocusedState",void 0),Vc=o([Ti("nami-segment-picker-item")],Vc);let Gc=class extends ao{constructor(){super(...arguments),this.inFocusedState=!1}styles(){const{url:t,imageCropping:n,alignment:r,height:s,width:i,rightMargin:o,spacing:a}=this.component,c="fit"===n,l=c?"":e.unsafeCSS(" position: fixed;\n right: 0;\n bottom: 0;\n min-width: 100%;\n min-height: 100%;\n ");return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n transition: all 0.3s;\n background-image: url(${t});\n background-size: ${c?"contain":"cover"};\n background-position: ${r||""} center;\n background-repeat: no-repeat;\n height: ${bo(s??"100%")};\n width: ${bo(("fitContent"==i?s:i)??"100%")};\n margin-right: ${o||a||0}px;\n ${Io(this.component)}\n ${this.component.hidden?"display:none":""}\n ${l}\n }\n\n #nami-video {\n height: ${bo(s??"100%")};\n width: ${bo(("fitContent"==i?s:i)??"100%")};\n object-fit: ${c?"contain":"cover"};\n }\n `)}updated(){Object.keys(this.component).forEach((e=>{this.component[e]=To(this.component[e])}));const{url:e,autoplayVideo:t,mute:n,loopVideo:r,controlsType:s,fallbackImage:i}=this.component,o=this.shadowRoot?.getElementById("nami-video");o&&(o.autoplay=t??!1,o.loop=r??!1,o.muted=!!t||(n??!1),o.controls="none"!==s,o.poster=i??"",o.src=e??"")}render(){return e.html`<video id="nami-video" preload="auto"></video>`}};o([oo({type:Object})],Gc.prototype,"component",void 0),o([oo({type:Boolean})],Gc.prototype,"inFocusedState",void 0),Gc=o([Ti("nami-video")],Gc);let Wc=class extends ao{constructor(){super(),this.inFocusedState=!1,this.height=0,this._handleClick=()=>{this.height=this.shadowRoot?.getElementById("collapse")?.scrollHeight||0,this.shadowRoot?.getElementById("collapse")?.classList.toggle("hidden")},this.addEventListener("click",this._handleClick,!1)}styles(){const t="vertical"===this.component.direction?"margin-top":"margin-left",n=e.unsafeCSS(vo(this.component,this.inFocusedState));return e.unsafeCSS(`\n :host {\n display: flex;\n ${n};\n ${wo(this.component)}\n ${Io(this.component,this.inFocusedState)}\n justify-content: center;\n cursor: pointer;\n }\n :host > :not(:first-child) {\n ${t}: ${this.component.spacing||0}px;\n }\n #collapse.hidden{\n max-height: 0;\n opacity: 0;\n }\n #collapse {\n max-height: ${this.height}px;\n opacity: 1;\n transition: all linear 0.5s;\n }\n `)}render(){const{components:t,collapseHeader:n,open:r}=this.component,s=t.map((e=>zo(e,this.inFocusedState)));return e.html`${zo(n,this.inFocusedState)}
49
- <div id="collapse" class="${"collapse"===r?"hidden":""}">${s}</div>`}};o([oo({type:Object})],Wc.prototype,"component",void 0),o([oo({type:Boolean})],Wc.prototype,"inFocusedState",void 0),o([oo({type:Number})],Wc.prototype,"height",void 0),Wc=o([Ti("nami-collapse-container")],Wc),exports.Nami=Ci,exports.NamiCampaignManager=po,exports.NamiCustomerManager=$i,exports.NamiEntitlementManager=mo,exports.NamiPaywallManager=Ni;
45
+ <div class="bullet-text-wrapper" .innerHTML="${Xu(t)}"></div>
46
+ </nami-text-list-item-wrapper>`:null));return e.html`${s}`}};o([gs({type:Object})],Sw.prototype,"component",void 0),o([gs({type:Boolean})],Sw.prototype,"inFocusedState",void 0),Sw=o([Bo("nami-text-list")],Sw);let Pw=class extends ps{constructor(){super(),this.inFocusedState=!1,this._handleFocusChanged=e=>{1==e.detail.inFocusedState&&this._handleFocus()},this._handleFocus=()=>{this.inFocusedState=!0},this._handleBlur=()=>{this.inFocusedState=!1},this.addEventListener("focus",this._handleFocus,!1),this.addEventListener("blur",this._handleBlur,!1),this.addEventListener("focus-changed",this._handleFocusChanged,!1)}styles(){const{component:t,inFocusedState:n}=this,i="vertical"===t.direction?"margin-top":"margin-left",a=t.fillImage?e.unsafeCSS(`\n line-height: 1.5715;\n background-image: url(${t.fillImage});\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n `):e.unsafeCSS(xs(t,n));return e.unsafeCSS(`\n :host {\n display: ${t.hidden?"none":"flex"};\n ${a};\n ${$s(t.position)}\n ${Cs(t)}\n ${zs(t,n)}\n }\n :host > :not(:first-child) {\n ${i}: ${t.spacing||0}px;\n }\n `)}render(){return(this.component.components??[]).map((e=>Zs(e)))}};o([gs({type:Object})],Pw.prototype,"component",void 0),o([gs({type:Boolean})],Pw.prototype,"inFocusedState",void 0),Pw=o([Bo("nami-container")],Pw);let Ew=class extends ps{constructor(){super(...arguments),this.inFocusedState=!1}styles(){const t="vertical"===this.component.direction,n=t?"width":"height",i=t?"margin-top":"margin-left",a=this.component.fillImage?e.unsafeCSS(`\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 `):e.unsafeCSS(xs(this.component,this.inFocusedState));return e.unsafeCSS(`\n :host {\n opacity: 0;\n display: flex;\n ${a};\n ${$s(this.component.position)}\n ${Cs(this.component)}\n ${zs(this.component,this.inFocusedState)}\n justify-content: center;\n transition: transform .5s ease-in;\n }\n :host > * {\n ${n}: 100%;\n }\n :host > :not(:first-child) {\n ${i}: ${this.component.spacing||0}px;\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}=Mo.state;Ma(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout((()=>this.classList.add("fade-in")),100),this.currentGroupId=e)}_offerState(){const{anySkuHasTrialOffer:e,anySkuHasIntroOffer:t,anySkuHasPromoOffer:n}=Mo.state;return{freeTrialEligible:e,introEligible:t,promoEligible:n}}render(){const{mediaList:e,selectedPaywall:t,currentGroupId:n,formFactor:i}=Mo.state;return Ys(go(Mo.productDetails,t?.sku_menus||[],this.component?.subsetGroup||n),this.component,e,this._offerState()).map((([e,t])=>(this.inFocusedState="television"==i?e:this.inFocusedState,this.dispatchEvent(new CustomEvent("focus-changed",{detail:{inFocusedState:this.inFocusedState},bubbles:!0,composed:!0})),t.map((e=>Zs(e,this.inFocusedState))))))}};o([gs({type:Object})],Ew.prototype,"component",void 0),o([gs({type:Boolean})],Ew.prototype,"inFocusedState",void 0),Ew=o([Bo("nami-product-container")],Ew);let Tw=class extends ps{constructor(){super(...arguments),this.inFocusedState=!1}styles(){const{url:t,imageCropping:n,alignment:i,height:a,width:r,rightMargin:o,spacing:s}=this.component,d="fit"===n;return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n position: relative;\n transition: all 0.3s;\n background-image: url(${t});\n background-size: ${d?"contain":"cover"};\n background-position: ${i||""} center;\n background-repeat: no-repeat;\n height: ${Ts(a??"100%")};\n width: ${Ts(("fitContent"==r?a:r)??"100%")};\n margin-right: ${o||s||0}px;\n ${Ds(this.component)}\n ${this.component.hidden?"display:none":""}\n }\n `)}render(){return e.html``}};o([gs({type:Object})],Tw.prototype,"component",void 0),o([gs({type:Boolean})],Tw.prototype,"inFocusedState",void 0),Tw=o([Bo("nami-image")],Tw);let Aw=class extends ps{constructor(){super(...arguments),this.fullscreen=!1,this.inFocusedState=!1}styles(){const{inFocusedState:t,component:n}=this;return e.unsafeCSS(`\n :host {\n display: ${n.hidden?"none":"flex"};\n flex-direction: column;\n justify-content: center;\n overflow: hidden;\n align-items: center;\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: ${n.zIndex??1};\n top: 0px;\n ${xs(n,t)}\n transition: all 0.3s;\n ${Ds(n)}\n }\n `)}updated(){Array.from(document.getElementsByTagName("nami-paywall"))[0].style.position=be.test(this.shadowRoot?.innerHTML||"")?"":"relative"}render(){return(this.component.components??[]).map((e=>Zs(e)))}};o([gs({type:Object})],Aw.prototype,"component",void 0),o([gs({type:Boolean})],Aw.prototype,"fullscreen",void 0),o([gs({type:Boolean})],Aw.prototype,"inFocusedState",void 0),Aw=o([Bo("nami-background-container")],Aw);let xw=class extends ps{constructor(){super(...arguments),this.zIndex=2,this.inFocusedState=!1}styles(){const{contextConsumer:t,component:n,zIndex:i}=this,{formFactor:a}=t.state,r="phone"!==a?"width: 100%;":"",o=n.spacing??0;return e.unsafeCSS(`\n :host {\n display: ${n.hidden?"none":"flex"};\n position: relative;\n ${Cs(n)}\n height: 100%;\n ${r}\n align-items: center;\n justify-content: start;\n z-index: ${i};\n transition: all 0.3s;\n overflow-y: 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 ${Ds(n)}\n }\n :host > * {\n width: 100%;\n }\n \n :host > *:not(:first-child) {\n ${"vertical"===n.direction?`margin-top: ${o}px;`:`margin-left: ${o}px;`}\n `)}render(){return this.component.components.map((e=>Zs(e,this.inFocusedState)))}};o([gs({type:Object})],xw.prototype,"component",void 0),o([gs({type:Number})],xw.prototype,"zIndex",void 0),o([gs({type:Boolean})],xw.prototype,"inFocusedState",void 0),xw=o([Bo("nami-content-container")],xw);let Cw=class extends ps{constructor(){super(),this.inFocusedState=!1,this._handleClick=()=>{Md(this.component.onTap)},this.addEventListener("click",this._handleClick)}styles(){const t=Hs("active",this.component.components[0]);return e.unsafeCSS(`\n :host {\n cursor: pointer;\n ${xs(this.component,this.inFocusedState)}\n ${zs(this.component,this.inFocusedState)}\n ${this.component.hidden?"display:none":""}\n }\n\n .toggle{\n position: absolute !important;\n top: 0;\n bottom: 0;\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${Us(t,this.inFocusedState)}\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(){const t=this.component.components.map((e=>Zs(e,this.inFocusedState)));return e.html`${t}<div class="toggle"></div>`}};o([gs({type:Object})],Cw.prototype,"component",void 0),o([gs({type:Boolean})],Cw.prototype,"inFocusedState",void 0),Cw=o([Bo("nami-segment-picker")],Cw);let Lw=class extends ps{constructor(){super(),this.inFocusedState=!1,this._handleClick=()=>{this.component.id&&Mo.setCurrentGroupId(this.component.id)},this._handleHover=()=>{this.inFocusedState=!0},this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover)}styles(){const t=Hs("active",this.component),n=Hs("inactive",this.component);return e.unsafeCSS(`\n :host {\n display: ${this.component.hidden?"none":"inline-flex"};\n cursor: pointer;\n ${Us({...n,...this.component},this.inFocusedState)}\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${Bs({...t,...this.component})}\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}render(){const t=this.component.id===Mo.state.currentGroupId;return this.classList.toggle("active",t),e.html`<input type="radio" id="${this.component.text}" name="${this.component.text}" value="${this.component.text}" checked="${t}" />
47
+ <label for="${this.component.text}">${this.component.text}</label>`}};function Dw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}o([gs({type:Object})],Lw.prototype,"component",void 0),o([gs({type:Boolean})],Lw.prototype,"inFocusedState",void 0),Lw=o([Bo("nami-segment-picker-item")],Lw);var Iw,Rw,_w,Ww,Nw,Ow={exports:{}};Iw=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,Rw=/^(?=([^\/?#]*))\1([^]*)$/,_w=/(?:\/|^)\.(?=\/)/g,Ww=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g;var Fw=Ow.exports=Nw={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var i=Nw.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=Nw.normalizePath(i.path),Nw.buildURLFromParts(i)}var a=Nw.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=Nw.normalizePath(a.path),Nw.buildURLFromParts(a)):t;var r=Nw.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");if(!r.netLoc&&r.path&&"/"!==r.path[0]){var o=Rw.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 d=r.path,u=d.substring(0,d.lastIndexOf("/")+1)+a.path;s.path=Nw.normalizePath(u)}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?Nw.normalizePath(a.path):a.path),Nw.buildURLFromParts(s)},parseURL:function(e){var t=Iw.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(_w,"");e.length!==(e=e.replace(Ww,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};function jw(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 zw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jw(Object(n),!0).forEach((function(t){Hw(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $w(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 Hw(e,t,n){return(t=$w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uw(){return Uw=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},Uw.apply(this,arguments)}const Bw=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},Gw=Number.isSafeInteger||function(e){return"number"==typeof e&&Math.abs(e)<=Xw},Xw=Number.MAX_SAFE_INTEGER||9007199254740991;let Yw=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}({}),Kw=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}({}),Vw=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 qw=function(){},Jw={trace:qw,debug:qw,log:qw,warn:qw,info:qw,error:qw};let Qw=Jw;function Zw(e,...t){t.forEach((function(t){Qw[t]=e[t]?e[t].bind(e):function(e){const t=self.console[e];return t?t.bind(self.console,`[${e}] >`):qw}(t)}))}const ek=Qw,tk=/^(\d+)x(\d+)$/,nk=/(.+?)=(".*?"|.*?)(?:,|$)/g;class ik{constructor(e){"string"==typeof e&&(e=ik.parseAttrList(e)),Uw(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=tk.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(nk.lastIndex=0;null!==(t=nk.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 ak(e){return"SCTE35-OUT"===e||"SCTE35-IN"===e}class rk{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]){ek.warn(`DATERANGE tag attribute: "${t}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=t;break}e=Uw(new ik({}),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"]);Bw(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(Bw(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&&Bw(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class ok{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 sk="audio",dk="video",uk="audiovideo";class lk{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[sk]:null,[dk]:null,[uk]: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=Fw.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class hk extends lk{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 ok,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(!Bw(this.programDateTime))return null;const e=Bw(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[sk]=null,e[dk]=null,e[uk]=null}}class ck extends lk{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 ok,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 mk{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&&Bw(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 fk(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}function gk(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=fk(a)):n=function(e){const t=pk(e).subarray(0,16),n=new Uint8Array(16);return n.set(t,16-t.length),n}(a)}}return n}function pk(e){return Uint8Array.from(unescape(encodeURIComponent(e)),(e=>e.charCodeAt(0)))}const vk="undefined"!=typeof self?self:void 0;var yk={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},bk="org.w3.clearkey",wk="com.apple.streamingkeydelivery",kk="com.microsoft.playready",Mk="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";function Sk(e){switch(e){case wk:return yk.FAIRPLAY;case kk:return yk.PLAYREADY;case Mk:return yk.WIDEVINE;case bk:return yk.CLEARKEY}}var Pk="1077efecc0b24d02ace33c1e52e2fb4b",Ek="e2719d58a985b3c9781ab030af78d30e",Tk="9a04f07998404286ab92e65be0885f95",Ak="edef8ba979d64acea3c827dcd51d21ed";function xk(e){return e===Ak?yk.WIDEVINE:e===Tk?yk.PLAYREADY:e===Pk||e===Ek?yk.CLEARKEY:void 0}function Ck(e){switch(e){case yk.FAIRPLAY:return wk;case yk.PLAYREADY:return kk;case yk.WIDEVINE:return Mk;case yk.CLEARKEY:return bk}}function Lk(e){const{drmSystems:t,widevineLicenseUrl:n}=e,i=t?[yk.FAIRPLAY,yk.WIDEVINE,yk.PLAYREADY,yk.CLEARKEY].filter((e=>!!t[e])):[];return!i[yk.WIDEVINE]&&n&&i.push(yk.WIDEVINE),i}const Dk=null!=vk&&null!=(Ik=vk.navigator)&&Ik.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;var Ik;function Rk(e,t,n){return Uint8Array.prototype.slice?e.slice(t,n):new Uint8Array(Array.prototype.slice.call(e,t,n))}const _k=(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,Wk=(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,Nk=(e,t)=>{const n=t;let i=0;for(;_k(e,t);){i+=10;i+=Ok(e,t+6),Wk(e,t+10)&&(i+=10),t+=i}if(i>0)return e.subarray(n,n+i)},Ok=(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},Fk=(e,t)=>_k(e,t)&&Ok(e,t+6)+10<=e.length-t,jk=e=>{const t=Hk(e);for(let e=0;e<t.length;e++){const n=t[e];if(zk(n))return Yk(n)}},zk=e=>e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info,$k=e=>{const t=String.fromCharCode(e[0],e[1],e[2],e[3]),n=Ok(e,4);return{type:t,size:n,data:e.subarray(10,10+n)}},Hk=e=>{let t=0;const n=[];for(;_k(e,t);){const i=Ok(e,t+6);t+=10;const a=t+i;for(;t+8<a;){const i=$k(e.subarray(t)),a=Uk(i);a&&n.push(a),t+=i.size+10}Wk(e,t)&&(t+=10)}return n},Uk=e=>"PRIV"===e.type?Bk(e):"W"===e.type[0]?Xk(e):Gk(e),Bk=e=>{if(e.size<2)return;const t=Kk(e.data,!0),n=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:n.buffer}},Gk=e=>{if(e.size<2)return;if("TXXX"===e.type){let t=1;const n=Kk(e.data.subarray(t),!0);t+=n.length+1;const i=Kk(e.data.subarray(t));return{key:e.type,info:n,data:i}}const t=Kk(e.data.subarray(1));return{key:e.type,data:t}},Xk=e=>{if("WXXX"===e.type){if(e.size<2)return;let t=1;const n=Kk(e.data.subarray(t),!0);t+=n.length+1;const i=Kk(e.data.subarray(t));return{key:e.type,info:n,data:i}}const t=Kk(e.data);return{key:e.type,data:t}},Yk=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)}},Kk=(e,t=!1)=>{const n=qk();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="",d=0;for(;d<i;){if(a=e[d++],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[d++],s+=String.fromCharCode((31&a)<<6|63&r);break;case 14:r=e[d++],o=e[d++],s+=String.fromCharCode((15&a)<<12|(63&r)<<6|63&o)}}return s};let Vk;function qk(){if(!navigator.userAgent.includes("PlayStation 4"))return Vk||void 0===self.TextDecoder||(Vk=new self.TextDecoder("utf-8")),Vk}const Jk={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}},Qk=Math.pow(2,32)-1,Zk=[].push,eM={video:1,audio:2,id3:3,text:4};function tM(e){return String.fromCharCode.apply(null,e)}function nM(e,t){const n=e[t]<<8|e[t+1];return n<0?65536+n:n}function iM(e,t){const n=rM(e,t);return n<0?4294967296+n:n}function aM(e,t){let n=iM(e,t);return n*=Math.pow(2,32),n+=iM(e,t+4),n}function rM(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function oM(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 sM(e,t){const n=[];if(!t.length)return n;const i=e.byteLength;for(let a=0;a<i;){const r=iM(e,a),o=r>1?a+r:i;if(tM(e.subarray(a+4,a+8))===t[0])if(1===t.length)n.push(e.subarray(a+8,o));else{const i=sM(e.subarray(a+8,o),t.slice(1));i.length&&Zk.apply(n,i)}a=o}return n}function dM(e){const t=[],n=e[0];let i=8;const a=iM(e,i);i+=4;let r=0,o=0;0===n?(r=iM(e,i),o=iM(e,i+4),i+=8):(r=aM(e,i),o=aM(e,i+8),i+=16),i+=2;let s=e.length+o;const d=nM(e,i);i+=2;for(let n=0;n<d;n++){let n=i;const r=iM(e,n);n+=4;const o=2147483647&r;if(1===(2147483648&r)>>>31)return ek.warn("SIDX has hierarchical references (not supported)"),null;const d=iM(e,n);n+=4,t.push({referenceSize:o,subsegmentDuration:d,info:{duration:d/a,start:s,end:s+o-1}}),s+=o,n+=4,i=n}return{earliestPresentationTime:r,timescale:a,version:n,referencesCount:d,references:t}}function uM(e){const t=[],n=sM(e,["moov","trak"]);for(let e=0;e<n.length;e++){const i=n[e],a=sM(i,["tkhd"])[0];if(a){let e=a[0];const n=iM(a,0===e?12:20),r=sM(i,["mdia","mdhd"])[0];if(r){e=r[0];const a=iM(r,0===e?12:20),o=sM(i,["mdia","hdlr"])[0];if(o){const e=tM(o.subarray(8,12)),r={soun:sk,vide:dk}[e];if(r){const e=lM(sM(i,["mdia","minf","stbl","stsd"])[0]);t[n]={timescale:a,type:r},t[r]=zw({timescale:a,id:n},e)}}}}}return sM(e,["moov","mvex","trex"]).forEach((e=>{const n=iM(e,4),i=t[n];i&&(i.default={duration:iM(e,12),flags:iM(e,20)})})),t}function lM(e){const t=e.subarray(8),n=t.subarray(86),i=tM(t.subarray(4,8));let a=i;const r="enca"===i||"encv"===i;if(r){const e=sM(t,[i])[0];sM(e.subarray("enca"===i?28:78),["sinf"]).forEach((e=>{const t=sM(e,["schm"])[0];if(t){const n=tM(t.subarray(4,8));if("cbcs"===n||"cenc"===n){const t=sM(e,["frma"])[0];t&&(a=tM(t))}}}))}switch(a){case"avc1":case"avc2":case"avc3":case"avc4":{const e=sM(n,["avcC"])[0];a+="."+cM(e[1])+cM(e[2])+cM(e[3]);break}case"mp4a":{const e=sM(t,[i])[0],n=sM(e.subarray(28),["esds"])[0];if(n&&n.length>12){let e=4;if(3!==n[e++])break;e=hM(n,e),e+=2;const t=n[e++];if(128&t&&(e+=2),64&t&&(e+=n[e++]),4!==n[e++])break;e=hM(n,e);const i=n[e++];if(64!==i)break;if(a+="."+cM(i),e+=12,5!==n[e++])break;e=hM(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=sM(n,["hvcC"])[0],t=e[1],i=["","A","B","C"][t>>6],r=31&t,o=iM(e,2),s=(32&t)>>5?"H":"L",d=e[12],u=e.subarray(6,12);a+="."+i+r,a+="."+o.toString(16).toUpperCase(),a+="."+s+d;let l="";for(let e=u.length;e--;){const t=u[e];if(t||l){l="."+t.toString(16).toUpperCase()+l}}a+=l;break}case"dvh1":case"dvhe":{const e=sM(n,["dvcC"])[0],t=e[2]>>1&127,i=e[2]<<5&32|e[3]>>3&31;a+="."+mM(t)+"."+mM(i);break}case"vp09":{const e=sM(n,["vpcC"])[0],t=e[4],i=e[5],r=e[6]>>4&15;a+="."+mM(t)+"."+mM(i)+"."+mM(r);break}case"av01":{const e=sM(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,d=2===t&&o?s?12:10:o?10:8,u=(16&e[2])>>4,l=(8&e[2])>>3,h=(4&e[2])>>2,c=3&e[2],m=1,f=1,g=1,p=0;a+="."+t+"."+mM(i)+r+"."+mM(d)+"."+u+"."+l+h+c+"."+mM(m)+"."+mM(f)+"."+mM(g)+"."+p;break}}return{codec:a,encrypted:r}}function hM(e,t){const n=t+5;for(;128&e[t++]&&t<n;);return t}function cM(e){return("0"+e.toString(16).toUpperCase()).slice(-2)}function mM(e){return(e<10?"0":"")+e}function fM(e){const t=sM(e,["schm"])[0];if(t){const n=tM(t.subarray(4,8));if("cbcs"===n||"cenc"===n)return sM(e,["schi","tenc"])[0]}return null}function gM(e){const t=iM(e,0);let n=8;1&t&&(n+=4),4&t&&(n+=4);let i=0;const a=iM(e,4);for(let r=0;r<a;r++){if(256&t){i+=iM(e,n),n+=4}512&t&&(n+=4),1024&t&&(n+=4),2048&t&&(n+=4)}return i}function pM(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function vM(e,t){const n=[],i=t.samples,a=t.timescale,r=t.id;let o=!1;return sM(i,["moof"]).map((s=>{const d=s.byteOffset-8;sM(s,["traf"]).map((s=>{const u=sM(s,["tfdt"]).map((e=>{const t=e[0];let n=iM(e,4);return 1===t&&(n*=Math.pow(2,32),n+=iM(e,8)),n/a}))[0];return void 0!==u&&(e=u),sM(s,["tfhd"]).map((u=>{const l=iM(u,4),h=16777215&iM(u,0);let c=0;const m=!!(16&h);let f=0;const g=!!(32&h);let p=8;l===r&&(!!(1&h)&&(p+=8),!!(2&h)&&(p+=4),!!(8&h)&&(c=iM(u,p),p+=4),m&&(f=iM(u,p),p+=4),g&&(p+=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)),sM(s,["trun"]).map((r=>{const s=r[0],u=16777215&iM(r,0),l=!!(1&u);let h=0;const m=!!(4&u),g=!!(256&u);let p=0;const v=!!(512&u);let y=0;const b=!!(1024&u),w=!!(2048&u);let k=0;const M=iM(r,4);let S=8;l&&(h=iM(r,S),S+=4),m&&(S+=4);let P=h+d;for(let d=0;d<M;d++){if(g?(p=iM(r,S),S+=4):p=c,v?(y=iM(r,S),S+=4):y=f,b&&(S+=4),w&&(k=0===s?iM(r,S):rM(r,S),S+=4),t.type===dk){let t=0;for(;t<y;){const r=iM(i,P);if(P+=4,yM(o,i[P])){bM(i.subarray(P,P+r),o?2:1,e+k/a,n)}P+=r,t+=r+4}}e+=p/a}})))}))}))})),n}function yM(e,t){if(e){const e=t>>1&63;return 39===e||40===e}return 6===(31&t)}function bM(e,t,n,i){const a=wM(e);let r=0;r+=t;let o=0,s=0,d=0;for(;r<a.length;){o=0;do{if(r>=a.length)break;d=a[r++],o+=d}while(255===d);s=0;do{if(r>=a.length)break;d=a[r++],s+=d}while(255===d);const e=a.length-r;let t=r;if(s<e)r+=s;else if(s>e){ek.error(`Malformed SEI payload. ${s} is too small, only ${e} bytes left to parse.`);break}if(4===o){if(181===a[t++]){const e=nM(a,t);if(t+=2,49===e){const e=iM(a,t);if(t+=4,1195456820===e){const e=a[t++];if(3===e){const r=a[t++],s=64&r,d=s?2+3*(31&r):0,u=new Uint8Array(d);if(s){u[0]=r;for(let e=1;e<d;e++)u[e]=a[t++]}i.push({type:e,payloadType:o,pts:n,bytes:u})}}}}}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,d=new Uint8Array(r);for(let e=0;e<r;e++)d[e]=a[t++];i.push({payloadType:o,pts:n,uuid:e.join(""),userData:Kk(d),userDataBytes:d})}}}function wM(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 kM(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 MM(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=Jk.hexDump(new Uint8Array(r,n+12,16)),s=e.getUint32(28);let d=null,u=null;if(0===a){if(t-32<s||s<22)return{offset:n,size:t};u=new Uint8Array(r,n+32,s)}else if(1===a){if(!s||i<n+32+16*s+16)return{offset:n,size:t};d=[];for(let e=0;e<s;e++)d.push(new Uint8Array(r,n+32+16*e,16))}return{version:a,systemId:o,kids:d,data:u,offset:n,size:t}}let SM={};class PM{static clearKeyUriToKeyIdMap(){SM={}}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 wk:case Mk:case kk:case bk: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||ek.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 PM(this.method,this.uri,"identity",this.keyFormatVersions,t)}const t=gk(this.uri);if(t)switch(this.keyFormat){case Mk:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case kk:{const e=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=kM(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=fk(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=SM[this.uri];if(!e){const t=Object.keys(SM).length%Number.MAX_SAFE_INTEGER;e=new Uint8Array(16);new DataView(e.buffer,12,4).setUint32(0,t),SM[this.uri]=e}this.keyId=e}return this}}const EM=/\{\$([a-zA-Z0-9-_]+)\}/g;function TM(e){return EM.test(e)}function AM(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]=xM(e,r))}}function xM(e,t){if(null!==e.variableList||e.hasVariableRefs){const n=e.variableList;return t.replace(EM,(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 CM(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 LM(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 DM(e=!0){if("undefined"==typeof self)return;return(e||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}const IM={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 RM(e,t,n=!0){return!e.split(",").some((e=>!_M(e,t,n)))}function _M(e,t,n=!0){var i;const a=DM(n);return null!=(i=null==a?void 0:a.isTypeSupported(WM(e,t)))&&i}function WM(e,t){return`${t}/mp4;codecs="${e}"`}function NM(e){if(e){const t=e.substring(0,4);return IM.video[t]}return 2}function OM(e){return e.split(",").reduce(((e,t)=>{const n=IM.video[t];return n?(2*n+e)/(e?3:2):(IM.audio[t]+e)/(e?2:1)}),0)}const FM={};const jM=/flac|opus/i;function zM(e,t=!0){return e.replace(jM,(e=>function(e,t=!0){if(FM[e])return FM[e];const n={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[e];for(let i=0;i<n.length;i++)if(_M(n[i],"audio",t))return FM[e]=n[i],n[i];return e}(e.toLowerCase(),t)))}function $M(e,t){return e&&"mp4a"!==e?e:t?t.split(",")[0]:t}const HM=/#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,UM=/#EXT-X-MEDIA:(.*)/g,BM=/^#EXT(?:INF|-X-TARGETDURATION):/m,GM=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"),XM=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 YM{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 Fw.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return BM.test(e)}static parseMasterPlaylist(e,t){const n={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:TM(e)},i=[];let a;for(HM.lastIndex=0;null!=(a=HM.exec(e));)if(a[1]){var r;const e=new ik(a[1]);AM(n,e,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const o=xM(n,a[2]),s={attrs:e,bitrate:e.decimalInteger("BANDWIDTH")||e.decimalInteger("AVERAGE-BANDWIDTH"),name:e.NAME,url:YM.resolve(o,t)},d=e.decimalResolution("RESOLUTION");d&&(s.width=d.width,s.height=d.height),qM(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 ik(i);AM(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=KM(i,t,n);e.encrypted&&e.isSupported()?(null===n.sessionKeys&&(n.sessionKeys=[]),n.sessionKeys.push(e)):ek.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${i}"`);break}case"DEFINE":{const e=new ik(i);AM(n,e,["NAME","VALUE","QUERYPARAM"]),CM(n,e,t)}break;case"CONTENT-STEERING":{const e=new ik(i);AM(n,e,["SERVER-URI","PATHWAY-ID"]),n.contentSteering={uri:YM.resolve(e["SERVER-URI"],t),pathwayId:e["PATHWAY-ID"]||"."};break}case"START":n.startTimeOffset=VM(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(UM.lastIndex=0;null!==(i=UM.exec(e));){const e=new ik(i[1]),r=e.TYPE;if(r){const i=o[r],d=a[r]||[];a[r]=d,AM(n,e,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const u=e.LANGUAGE,l=e["ASSOC-LANGUAGE"],h=e.CHANNELS,c=e.CHARACTERISTICS,m=e["INSTREAM-ID"],f={attrs:e,bitrate:0,id:s++,groupId:e["GROUP-ID"]||"",name:e.NAME||u||"",type:r,default:e.bool("DEFAULT"),autoselect:e.bool("AUTOSELECT"),forced:e.bool("FORCED"),lang:u,url:e.URI?YM.resolve(e.URI,t):""};if(l&&(f.assocLang=l),h&&(f.channels=h),c&&(f.characteristics=c),m&&(f.instreamId=m),null!=i&&i.length){const e=YM.findGroup(i,f.groupId)||i[0];JM(f,e,"audioCodec"),JM(f,e,"textCodec")}d.push(f)}}return a}static parseLevelPlaylist(e,t,n,i,a,r){const o=new mk(t),s=o.fragments;let d,u,l,h=null,c=0,m=0,f=0,g=0,p=null,v=new hk(i,t),y=-1,b=!1,w=null;for(GM.lastIndex=0,o.m3u8=e,o.hasVariableRefs=TM(e);null!==(d=GM.exec(e));){b&&(b=!1,v=new hk(i,t),v.start=f,v.sn=c,v.cc=g,v.level=n,h&&(v.initSegment=h,v.rawProgramDateTime=h.rawProgramDateTime,h.rawProgramDateTime=null,w&&(v.setByteRange(w),w=null)));const e=d[1];if(e){v.duration=parseFloat(e);const t=(" "+d[2]).slice(1);v.title=t||null,v.tagList.push(t?["INF",e,t]:["INF",e])}else if(d[3]){if(Bw(v.duration)){v.start=f,l&&eS(v,l,o),v.sn=c,v.level=n,v.cc=g,s.push(v);const e=(" "+d[3]).slice(1);v.relurl=xM(o,e),QM(v,p),p=v,f+=v.duration,c++,m=0,b=!0}}else if(d[4]){const e=(" "+d[4]).slice(1);p?v.setByteRange(e,p):v.setByteRange(e)}else if(d[5])v.rawProgramDateTime=(" "+d[5]).slice(1),v.tagList.push(["PROGRAM-DATE-TIME",v.rawProgramDateTime]),-1===y&&(y=s.length);else{if(d=d[0].match(XM),!d){ek.warn("No matches on slow regex match for level playlist!");continue}for(u=1;u<d.length&&void 0===d[u];u++);const e=(" "+d[u]).slice(1),a=(" "+d[u+1]).slice(1),f=d[u+2]?(" "+d[u+2]).slice(1):"";switch(e){case"PLAYLIST-TYPE":o.type=a.toUpperCase();break;case"MEDIA-SEQUENCE":c=o.startSN=parseInt(a);break;case"SKIP":{const e=new ik(a);AM(o,e,["RECENTLY-REMOVED-DATERANGES"]);const t=e.decimalInteger("SKIPPED-SEGMENTS");if(Bw(t)){o.skippedSegments=t;for(let e=t;e--;)s.unshift(null);c+=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":g++,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 ik(a);AM(o,e,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),AM(o,e,e.clientAttrs);const t=new rk(e,o.dateRanges[e.ID]);t.isValid||o.skippedSegments?o.dateRanges[t.id]=t:ek.warn(`Ignoring invalid DATERANGE tag: "${a}"`),v.tagList.push(["EXT-X-DATERANGE",a]);break}case"DEFINE":{const e=new ik(a);AM(o,e,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in e?LM(o,e,r):CM(o,e,t)}break;case"DISCONTINUITY-SEQUENCE":g=parseInt(a);break;case"KEY":{const e=KM(a,t,o);if(e.isSupported()){if("NONE"===e.method){l=void 0;break}l||(l={}),l[e.keyFormat]&&(l=Uw({},l)),l[e.keyFormat]=e}else ek.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${a}"`);break}case"START":o.startTimeOffset=VM(a);break;case"MAP":{const e=new ik(a);if(AM(o,e,["BYTERANGE","URI"]),v.duration){const a=new hk(i,t);ZM(a,e,n,l),h=a,v.initSegment=h,h.rawProgramDateTime&&!v.rawProgramDateTime&&(v.rawProgramDateTime=h.rawProgramDateTime)}else{const t=v.byteRangeEndOffset;if(t){const e=v.byteRangeStartOffset;w=`${t-e}@${e}`}else w=null;ZM(v,e,n,l),h=v,b=!0}break}case"SERVER-CONTROL":{const e=new ik(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 ik(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 ik(a);AM(o,r,["BYTERANGE","URI"]);const s=new ck(r,v,t,i,n);e.push(s),v.duration+=s.duration;break}case"PRELOAD-HINT":{const e=new ik(a);AM(o,e,["URI"]),o.preloadHint=e;break}case"RENDITION-REPORT":{const e=new ik(a);AM(o,e,["URI"]),o.renditionReports=o.renditionReports||[],o.renditionReports.push(e);break}default:ek.warn(`line parsed but not handled: ${d}`)}}}p&&!p.relurl?(s.pop(),f-=p.duration,o.partList&&(o.fragmentHint=p)):o.partList&&(QM(v,p),v.cc=g,o.fragmentHint=v,l&&eS(v,l,o));const k=s.length,M=s[0],S=s[k-1];if(f+=o.skippedSegments*o.targetduration,f>0&&k&&S){o.averagetargetduration=f/k;const e=S.sn;o.endSN="initSegment"!==e?e:0,o.live||(S.endList=!0),M&&(o.startCC=M.cc)}else o.endSN=0,o.startCC=0;return o.fragmentHint&&(f+=o.fragmentHint.duration),o.totalduration=f,o.endCC=g,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 KM(e,t,n){var i,a;const r=new ik(e);AM(n,r,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const o=null!=(i=r.METHOD)?i:"",s=r.URI,d=r.hexadecimalInteger("IV"),u=r.KEYFORMATVERSIONS,l=null!=(a=r.KEYFORMAT)?a:"identity";s&&r.IV&&!d&&ek.error(`Invalid IV: ${r.IV}`);const h=s?YM.resolve(s,t):"",c=(u||"1").split("/").map(Number).filter(Number.isFinite);return new PM(o,h,l,c,d)}function VM(e){const t=new ik(e).decimalFloatingPoint("TIME-OFFSET");return Bw(t)?t:null}function qM(e,t){let n=(e||"").split(/[ ,]+/).filter((e=>e));["video","audio","text"].forEach((e=>{const i=n.filter((t=>function(e,t){const n=IM[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 JM(e,t,n){const i=t[n];i&&(e[n]=i)}function QM(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),Bw(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}function ZM(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 eS(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 tS="manifest",nS="level",iS="audioTrack",aS="subtitleTrack",rS="main",oS="audio",sS="subtitle";function dS(e){const{type:t}=e;switch(t){case iS:return oS;case aS:return sS;default:return rS}}function uS(e,t){let n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}class lS{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(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Yw.LEVEL_LOADING,this.onLevelLoading,this),e.on(Yw.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(Yw.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Yw.LEVEL_LOADING,this.onLevelLoading,this),e.off(Yw.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(Yw.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:tS,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:nS,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:iS,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:aS,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 ek.trace("[playlist-loader]: playlist request ongoing");ek.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),a.abort()}if(i=e.type===tS?n.manifestLoadPolicy.default:Uw({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),a=this.createInternalLoader(e),Bw(null==(t=e.deliveryDirectives)?void 0:t.part)){let t;if(e.type===nS&&null!==e.level?t=this.hls.levels[e.level].details:e.type===iS&&null!==e.id?t=this.hls.audioTracks[e.id].details:e.type===aS&&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=Uw({},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(),YM.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=uS(e,n),s=YM.parseMasterPlaylist(r,o);if(s.playlistParsingError)return void this.handleManifestParsingError(e,n,s.playlistParsingError,i,t);const{contentSteering:d,levels:u,sessionData:l,sessionKeys:h,startTimeOffset:c,variableList:m}=s;this.variableList=m;const{AUDIO:f=[],SUBTITLES:g,"CLOSED-CAPTIONS":p}=YM.parseMasterPlaylistMedia(r,o,s);if(f.length){f.some((e=>!e.url))||!u[0].audioCodec||u[0].attrs.AUDIO||(ek.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 ik({}),bitrate:0,url:""}))}a.trigger(Yw.MANIFEST_LOADED,{levels:u,audioTracks:f,subtitles:g,captions:p,contentSteering:d,url:o,stats:t,networkDetails:i,sessionData:l,sessionKeys:h,startTimeOffset:c,variableList:m})}handleTrackOrLevelPlaylist(e,t,n,i,a){const r=this.hls,{id:o,level:s,type:d}=n,u=uS(e,n),l=Bw(s)?s:Bw(o)?o:0,h=dS(n),c=YM.parseLevelPlaylist(e.data,u,l,h,0,this.variableList);if(d===tS){const e={attrs:new ik({}),bitrate:0,details:c,name:"",url:u};r.trigger(Yw.MANIFEST_LOADED,{levels:[e],audioTracks:[],url:u,stats:t,networkDetails:i,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=c,this.handlePlaylistLoaded(c,e,t,n,i,a)}handleManifestParsingError(e,t,n,i,a){this.hls.trigger(Yw.ERROR,{type:Kw.NETWORK_ERROR,details:Vw.MANIFEST_PARSING_ERROR,fatal:t.type===tS,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===nS?r+=`: ${e.level} id: ${e.id}`:e.type!==iS&&e.type!==aS||(r+=` id: ${e.id} group-id: "${e.groupId}"`);const o=new Error(r);ek.warn(`[playlist-loader]: ${r}`);let s=Vw.UNKNOWN,d=!1;const u=this.getInternalLoader(e);switch(e.type){case tS:s=n?Vw.MANIFEST_LOAD_TIMEOUT:Vw.MANIFEST_LOAD_ERROR,d=!0;break;case nS:s=n?Vw.LEVEL_LOAD_TIMEOUT:Vw.LEVEL_LOAD_ERROR,d=!1;break;case iS:s=n?Vw.AUDIO_TRACK_LOAD_TIMEOUT:Vw.AUDIO_TRACK_LOAD_ERROR,d=!1;break;case aS:s=n?Vw.SUBTITLE_TRACK_LOAD_TIMEOUT:Vw.SUBTITLE_LOAD_ERROR,d=!1}u&&this.resetInternalLoader(e.type);const l={type:Kw.NETWORK_ERROR,details:s,fatal:d,url:e.url,loader:u,context:e,error:o,networkDetails:t,stats:a};if(i){const n=(null==t?void 0:t.url)||e.url;l.response=zw({url:n,data:void 0},i)}this.hls.trigger(Yw.ERROR,l)}handlePlaylistLoaded(e,t,n,i,a,r){const o=this.hls,{type:s,level:d,id:u,groupId:l,deliveryDirectives:h}=i,c=uS(t,i),m=dS(i),f="number"==typeof i.level&&m===rS?d:void 0;if(!e.fragments.length){const e=new Error("No Segments found in Playlist");return void o.trigger(Yw.ERROR,{type:Kw.NETWORK_ERROR,details:Vw.LEVEL_EMPTY_ERROR,fatal:!1,url:c,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 g=e.playlistParsingError;if(g)o.trigger(Yw.ERROR,{type:Kw.NETWORK_ERROR,details:Vw.LEVEL_PARSING_ERROR,fatal:!1,url:c,error:g,reason:g.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 tS:case nS:o.trigger(Yw.LEVEL_LOADED,{details:e,level:f||0,id:u||0,stats:n,networkDetails:a,deliveryDirectives:h});break;case iS:o.trigger(Yw.AUDIO_TRACK_LOADED,{details:e,id:u||0,groupId:l||"",stats:n,networkDetails:a,deliveryDirectives:h});break;case aS:o.trigger(Yw.SUBTITLE_TRACK_LOADED,{details:e,id:u||0,groupId:l||"",stats:n,networkDetails:a,deliveryDirectives:h})}}}function hS(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 cS(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){ek.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){ek.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${e}`)}}"disabled"===n&&(e.mode=n)}function mS(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 fS(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 gS(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 pS="org.id3",vS="com.apple.quicktime.HLS",yS="https://aomedia.org/emsg/ID3";function bS(){if("undefined"!=typeof self)return self.VTTCue||self.TextTrackCue}function wS(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?zw({type:a},i):i))}return r}const kS=(()=>{const e=bS();try{e&&new e(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function MS(e,t){return e.getTime()/1e3-t}class SS{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(Yw.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Yw.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Yw.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(Yw.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(Yw.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(Yw.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Yw.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Yw.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(Yw.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(Yw.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(mS(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 hS(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=bS();if(r)for(let e=0;e<a.length;e++){const t=a[e].type;if(t===yS&&!n||!i)continue;const o=Hk(a[e].data);if(o){const n=a[e].pts;let i=n+a[e].duration;i>kS&&(i=kS);i-n<=0&&(i=n+.25);for(let e=0;e<o.length;e++){const a=o[e];if(!zk(a)){this.updateId3CueEnds(n,t);const e=wS(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===kS&&(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===pS&&s:"video"===i?e=>e.type===yS&&o:e=>e.type===pS&&s||e.type===yS&&o,fS(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||!Bw(null==o?void 0:o.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const s=o.programDateTime/1e3-o.start,d=bS();for(let e=0;e<r.length;e++){const t=r[e],i=a[t],o=MS(i.startDate,s),h=n[t],c=(null==h?void 0:h.cues)||{};let m=(null==h?void 0:h.durationKnown)||!1,f=kS;const g=i.endDate;if(g)f=MS(g,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=MS(e.startDate,s),m=!0)}const p=Object.keys(i.attr);for(let e=0;e<p.length;e++){const n=p[e];if("ID"===(l=n)||"CLASS"===l||"START-DATE"===l||"DURATION"===l||"END-DATE"===l||"END-ON-NEXT"===l)continue;const a=c[n];if(a)m&&!h.durationKnown&&(a.endTime=f);else if(d){let e=i.attr[n];ak(n)&&(u=e,e=Uint8Array.from(u.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer);const a=wS(d,o,f,{key:n,data:e},vS);a&&(a.id=t,this.id3Track.addCue(a),c[n]=a)}}n[t]={cues:c,dateRange:i,durationKnown:m}}var u,l}}class PS{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 d=o&&n||t;(s.liveSyncDuration||s.liveSyncDurationCount||0===d)&&(d=void 0!==a?a:r*i);const u=i;return d+Math.min(1*this.stallCount,u)}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(Yw.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(Yw.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(Yw.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(Yw.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(Yw.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(Yw.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(Yw.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(Yw.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(Yw.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(Yw.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===Vw.BUFFER_STALLED_ERROR&&(this.stallCount++,null!=(n=this.levelDetails)&&n.live&&ek.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 ES=["NONE","TYPE-0","TYPE-1",null];const TS=["SDR","PQ","HLG"];var AS="",xS="YES",CS="v2";function LS(e){const{canSkipUntil:t,canSkipDateRanges:n,age:i}=e;return t&&i<t/2?n?CS:xS:AS}class DS{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 IS{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 RS(this._audioGroups,e)}hasSubtitleGroup(e){return RS(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 RS(e,t){return!(!t||!e)&&-1!==e.indexOf(t)}function _S(e,t){const n=t.startPTS;if(Bw(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 WS(e,t,n,i,a,r){i-n<=0&&(ek.warn("Fragment should have a positive duration",t),i=n+t.duration,r=a+t.duration);let o=n,s=i;const d=t.startPTS,u=t.endPTS;if(Bw(d)){const e=Math.abs(d-n);Bw(t.deltaPTS)?t.deltaPTS=Math.max(e,t.deltaPTS):t.deltaPTS=e,o=Math.max(n,d),n=Math.min(n,d),a=Math.min(a,t.startDTS),s=Math.min(i,u),i=Math.max(i,u),r=Math.max(r,t.endDTS)}const l=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 h=t.sn;if(!e||h<e.startSN||h>e.endSN)return 0;let c;const m=h-e.startSN,f=e.fragments;for(f[m]=t,c=m;c>0;c--)_S(f[c],f[c-1]);for(c=m;c<f.length-1;c++)_S(f[c],f[c+1]);return e.fragmentHint&&_S(f[f.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,l}function NS(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,d=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments;for(let e=a;e<=r;e++){const a=d[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),Bw(e.startPTS)&&Bw(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){ek.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=Uw({},e);n&&n.forEach((e=>{delete i[e]}));return Object.keys(t).forEach((e=>{const n=new rk(t[e].attr,i[e]);n.isValid?i[e]=n:ek.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){ek.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?WS(t,a,a.startPTS,a.endPTS,a.startDTS,a.endDTS):OS(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 OS(e,t){const n=t.startSN+t.skippedSegments-e.startSN,i=e.fragments;n<0||n>=i.length||FS(t,i[n].start)}function FS(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 jS(e,t,n){var i;return null!=e&&e.details?zS(null==(i=e.details)?void 0:i.partList,t,n):null}function zS(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 $S(e){e.forEach(((e,t)=>{const{details:n}=e;null!=n&&n.fragments&&n.fragments.forEach((e=>{e.level=t}))}))}function HS(e){switch(e.details){case Vw.FRAG_LOAD_TIMEOUT:case Vw.KEY_LOAD_TIMEOUT:case Vw.LEVEL_LOAD_TIMEOUT:case Vw.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function US(e,t){const n=HS(t);return e.default[(n?"timeout":"error")+"Retry"]}function BS(e,t){const n="linear"===e.backoff?1:Math.pow(2,t);return Math.min(n*e.retryDelayMs,e.maxRetryDelayMs)}function GS(e){return zw(zw({},e),{errorRetry:null,timeoutRetry:null})}function XS(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 YS=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 KS(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===VS(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=YS(t,VS.bind(null,n,i));return!o||o===e&&r?r:o}function VS(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 qS(e,t,n){const i=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-i>e}var JS=0,QS=2,ZS=3,eP=5,tP=0,nP=1,iP=2;class aP{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=ek.log.bind(ek,`${t}:`),this.warn=ek.warn.bind(ek,`${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){ek.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&&LS(n);return new DS(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&&NS(n,i),!this.canLoad||!i.live)return;let o,s,d;if(i.canBlockReload&&i.endSN&&i.advanced){const e=this.hls.config.lowLatencyMode,a=i.lastPartSn,r=i.endSN,u=i.lastPartIndex,l=a===r;-1!==u?(s=l?r+1:a,d=l?e?0:u:u+1):s=r+1;const h=i.age,c=h+i.ageHeader;let m=Math.min(c-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!==d){d+=Math.round(m%i.targetduration/i.partTarget)}this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${h.toFixed(2)}s goal: ${m} skip sn ${e} to part ${d}`)}i.tuneInGoal=m}if(o=this.getDeliveryDirectives(i,t.deliveryDirectives,s,d),e||!l)return void this.loadPlaylist(o)}else(i.canBlockReload||i.canSkipUntil)&&(o=this.getDeliveryDirectives(i,t.deliveryDirectives,s,d));const u=this.hls.mainForwardBufferInfo,l=u?u.end-u.len:0,h=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-l));i.updated&&r>this.requestScheduled+h&&(this.requestScheduled=a.loading.start),void 0!==s&&i.canBlockReload?this.requestScheduled=a.loading.first+h-(1e3*i.partTarget||1e3):-1===this.requestScheduled||this.requestScheduled+h<r?this.requestScheduled=r:this.requestScheduled-r<=0&&(this.requestScheduled+=h);let c=this.requestScheduled-r;c=Math.max(0,c),this.log(`reload live playlist ${e} in ${Math.round(c)} ms`),this.timer=self.setTimeout((()=>this.loadPlaylist(o)),c)}else this.clearTimer()}getDeliveryDirectives(e,t,n,i){let a=LS(e);return null!=t&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,i=t.part,a=AS),new DS(n,i,a)}checkRetry(e){const t=e.details,n=HS(e),i=e.errorAction,{action:a,retryCount:r=0,retryConfig:o}=i||{},s=!!i&&!!o&&(a===eP||!i.resolved&&a===QS);if(s){var d;if(this.requestScheduled=-1,r>=o.maxNumRetry)return!1;if(n&&null!=(d=e.context)&&d.deliveryDirectives)this.warn(`Retrying playlist loading ${r+1}/${o.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const e=BS(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 rP{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 oP{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 rP(e),this.fast_=new rP(t),this.defaultTTFB_=i,this.ttfb_=new rP(e)}update(e,t){const{slow_:n,fast_:i,ttfb_:a}=this;n.halfLife!==e&&(this.slow_=new rP(e,n.getEstimate(),n.getTotalWeight())),i.halfLife!==t&&(this.fast_=new rP(t,i.getEstimate(),i.getTotalWeight())),a.halfLife!==e&&(this.ttfb_=new rP(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 sP={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},dP={};function uP(e,t,n,i,a,r){const o=e.audioCodec?e.audioGroups:null,s=null==r?void 0:r.audioCodec,d=null==r?void 0:r.channels,u=d?parseInt(d):s?1/0:2;let l=null;if(null!=o&&o.length)try{l=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))||!!l&&Bw(u)&&Object.keys(l).some((e=>parseInt(e)>u))}function lP(e,t,n){const i=e.videoCodec,a=e.audioCodec;if(!i||!a||!n)return Promise.resolve(sP);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:zw(zw({},r),{},{contentType:WM(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);Bw(n)&&n>2&&s.push.apply(s,a.split(",").map((e=>({type:"media-source",audio:{contentType:WM(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 dP[t]||(dP[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 hP(e,t){let n=!1,i=[];return e&&(n="SDR"!==e,i=[e]),t&&(i=t.allowedVideoRanges||TS.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 cP(e,t){ek.log(`[abr] start candidates with "${e}" ignored because ${t}`)}function mP(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(fP(e,t[i],n))return i}return-1}function fP(e,t,n){const{groupId:i,name:a,lang:r,assocLang:o,characteristics:s,default:d}=e,u=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===d||t.default===d)&&(void 0===u||t.forced===u)&&(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 gP(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 pP(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 vP{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 yP="NOT_LOADED",bP="APPENDING",wP="PARTIAL",kP="OK";class MP{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(Yw.BUFFER_APPENDED,this.onBufferAppended,this),e.on(Yw.FRAG_BUFFERED,this.onFragBuffered,this),e.on(Yw.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(Yw.BUFFER_APPENDED,this.onBufferAppended,this),e.off(Yw.FRAG_BUFFERED,this.onFragBuffered,this),e.off(Yw.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=PP(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],d=o||!0===a.partial;r.range[e]=this.getBufferedTimes(n,i,d,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),SP(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=PP(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,d=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(d>=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((d=>{const u=s[d];u&&SP(u)&&(n=u.body.start-o,i=u.body.end+o,e>=n&&e<=i&&(t=Math.min(e-n,i-e),r<=t&&(a=u.body,r=t)))})),a}isEndListAppended(e){const t=this.endListFragments[e];return void 0!==t&&(t.buffered||SP(t))}getState(e){const t=PP(e),n=this.fragments[t];return n?n.buffered?SP(n)?wP:kP:bP:yP}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=PP(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=PP(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=PP(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 SP(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 PP(e){return`${e.type}_${e.level}_${e.sn}`}const EP={length:0,start:()=>0,end:()=>0};class TP{static isBuffered(e,t){try{if(e){const n=TP.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=TP.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 d=i[e].start,u=i[e].end;if(t+n>=d&&t<u)o=d,s=u,r=s-t;else if(t+n<d){a=d;break}}return{len:r,start:o||0,end:s||0,nextStart:a}}static getBuffered(e){try{return e.buffered}catch(e){return ek.log("failed to get media.buffered",e),EP}}}class AP{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 xP(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 CP(e,t){if(e){const n=e.start+t;e.start=e.startPTS=n,e.endPTS=n+e.duration}}function LP(e,t){const n=t.fragments;for(let t=0,i=n.length;t<i;t++)CP(n[t],e);t.fragmentHint&&CP(t.fragmentHint,e),t.alignedSliding=!0}function DP(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 ek.log("No fragments to align");const a=xP(n,i[0].cc);if(a&&(!a||a.startPTS))return a;ek.log("No frag in previous level to align on")}(n,t);e&&Bw(e.start)&&(ek.log(`Adjusting PTS using last level due to CC increase within current level ${t.url}`),LP(e.start,t))}}(e,n,t),!n.alignedSliding&&t&&IP(n,t),n.alignedSliding||!t||n.skippedSegments||OS(t,n))}function IP(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=xP(i,o),r=xP(n,o)),a&&r||(a=i[Math.floor(i.length/2)],r=xP(n,a.cc)||n[Math.floor(n.length/2)]);const s=a.programDateTime,d=r.programDateTime;if(!s||!d)return;LP((d-s)/1e3-(r.start-a.start),e)}const RP=Math.pow(2,17);class _P{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 OP({type:Kw.NETWORK_ERROR,details:Vw.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(NP(e));e.gap=!1}const d=this.loader=e.loader=a?new a(i):new r(i),u=WP(e),l=GS(i.fragLoadPolicy.default),h={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===e.sn?1/0:RP};e.stats=d.stats,d.load(u,h,{onSuccess:(t,n,i,a)=>{this.resetLoader(e,d);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,d),s(new OP({type:Kw.NETWORK_ERROR,details:Vw.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:zw({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,d),s(new OP({type:Kw.NETWORK_ERROR,details:Vw.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:i,stats:t}))},onTimeout:(t,n,i)=>{this.resetLoader(e,d),s(new OP({type:Kw.NETWORK_ERROR,details:Vw.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${h.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(NP(e,t));const d=this.loader=e.loader=a?new a(i):new r(i),u=WP(e,t),l=GS(i.fragLoadPolicy.default),h={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:RP};t.stats=d.stats,d.load(u,h,{onSuccess:(i,a,r,s)=>{this.resetLoader(e,d),this.updateStatsFromPart(e,t);const u={frag:e,part:t,payload:i.data,networkDetails:s};n(u),o(u)},onError:(n,i,a,r)=>{this.resetLoader(e,d),s(new OP({type:Kw.NETWORK_ERROR,details:Vw.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:zw({url:u.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,d),s(new OP({type:Kw.NETWORK_ERROR,details:Vw.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:a,stats:n}))},onTimeout:(n,i,a)=>{this.resetLoader(e,d),s(new OP({type:Kw.NETWORK_ERROR,details:Vw.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${h.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 WP(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(Bw(a)&&Bw(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 NP(e,t){const n=new Error(`GAP ${e.gap?"tag":"attribute"} found`),i={type:Kw.MEDIA_ERROR,details:Vw.FRAG_GAP,fatal:!1,frag:e,error:n,networkDetails:null};return t&&(i.part=t),(t||e).stats.aborted=!0,new OP(i)}class OP extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class FP{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 jP{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 zP{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,d=s[0],u=s[1],l=s[2],h=s[3],c=new Uint32Array(256);let m=0,f=0,g=0;for(g=0;g<256;g++)c[g]=g<128?g<<1:g<<1^283;for(g=0;g<256;g++){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=c[m],g=c[s],p=c[g];let v=257*c[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*p^65537*g^257*s^16843008*m,d[n]=v<<24|v>>>8,u[n]=v<<16|v>>>16,l[n]=v<<8|v>>>24,h[n]=v,m?(m=s^c[c[c[p^s]]],f^=c[c[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 d=this.keySchedule=new Uint32Array(r),u=this.invKeySchedule=new Uint32Array(r),l=this.sBox,h=this.rcon,c=this.invSubMix,m=c[0],f=c[1],g=c[2],p=c[3];let v,y;for(o=0;o<r;o++)o<a?v=d[o]=t[o]:(y=v,o%a==0?(y=y<<8|y>>>24,y=l[y>>>24]<<24|l[y>>>16&255]<<16|l[y>>>8&255]<<8|l[255&y],y^=h[o/a|0]<<24):a>6&&o%a==4&&(y=l[y>>>24]<<24|l[y>>>16&255]<<16|l[y>>>8&255]<<8|l[255&y]),d[o]=v=(d[o-a]^y)>>>0);for(s=0;s<r;s++)o=r-s,y=3&s?d[o]:d[o-4],u[s]=s<4||o<=4?y:m[l[y>>>24]]^f[l[y>>>16&255]]^g[l[y>>>8&255]]^p[l[255&y]],u[s]=u[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],d=o[1],u=o[2],l=o[3],h=this.uint8ArrayToUint32Array_(n);let c=h[0],m=h[1],f=h[2],g=h[3];const p=new Int32Array(e),v=new Int32Array(p.length);let y,b,w,k,M,S,P,E,T,A,x,C,L,D;const I=this.networkToHostOrderSwap;for(;t<p.length;){for(T=I(p[t]),A=I(p[t+1]),x=I(p[t+2]),C=I(p[t+3]),M=T^a[0],S=C^a[1],P=x^a[2],E=A^a[3],L=4,D=1;D<i;D++)y=s[M>>>24]^d[S>>16&255]^u[P>>8&255]^l[255&E]^a[L],b=s[S>>>24]^d[P>>16&255]^u[E>>8&255]^l[255&M]^a[L+1],w=s[P>>>24]^d[E>>16&255]^u[M>>8&255]^l[255&S]^a[L+2],k=s[E>>>24]^d[M>>16&255]^u[S>>8&255]^l[255&P]^a[L+3],M=y,S=b,P=w,E=k,L+=4;y=r[M>>>24]<<24^r[S>>16&255]<<16^r[P>>8&255]<<8^r[255&E]^a[L],b=r[S>>>24]<<24^r[P>>16&255]<<16^r[E>>8&255]<<8^r[255&M]^a[L+1],w=r[P>>>24]<<24^r[E>>16&255]<<16^r[M>>8&255]<<8^r[255&S]^a[L+2],k=r[E>>>24]<<24^r[M>>16&255]<<16^r[S>>8&255]<<8^r[255&P]^a[L+3],v[t]=I(y^c),v[t+1]=I(k^m),v[t+2]=I(w^f),v[t+3]=I(b^g),c=T,m=A,f=x,g=C,t+=4}return v.buffer}}class $P{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?Rk(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=pM(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 zP),s.expandKey(t);const d=a;return this.currentResult=s.decrypt(o.buffer,0,n),this.currentIV=Rk(o,-16).buffer,d||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 jP(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 FP(this.subtle,new Uint8Array(n)).decrypt(e.buffer,t)})).catch((i=>(ek.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=Rk(e,0,n),this.remainderData=Rk(e,n)),t}logOnce(e){this.logEnabled&&(ek.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const HP=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},UP="STOPPED",BP="IDLE",GP="KEY_LOADING",XP="FRAG_LOADING",YP="FRAG_LOADING_WAITING_RETRY",KP="WAITING_TRACK",VP="PARSING",qP="PARSED",JP="ENDED",QP="ERROR",ZP="WAITING_INIT_PTS",eE="WAITING_LEVEL";class tE extends vP{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=UP,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=ek.log.bind(ek,`${i}:`),this.warn=ek.warn.bind(ek,`${i}:`),this.hls=e,this.fragmentLoader=new _P(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new $P(e.config),e.on(Yw.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=UP}_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 TP.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===UP&&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=TP.bufferInfo(i||n,r,e.maxBufferHole);if(this.log(`media seeking to ${Bw(r)?r.toFixed(3):r}, state: ${a}`),this.state===JP)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(Yw.MANIFEST_LOADED,this.onManifestLoaded,this),this.stopLoad(),super.onHandlerDestroying(),this.hls=null}onHandlerDestroyed(){this.state=UP,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===XP||!this.fragCurrent&&n===VP)&&(this.fragmentTracker.removeFragment(e),this.state=BP):("payload"in t&&(this.log(`Loaded fragment ${e.sn} of level ${e.level}`),this.hls.trigger(Yw.FRAG_LOADED,t)),this._handleFragmentLoadComplete(t))})).catch((t=>{this.state!==UP&&this.state!==QP&&(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)===bP){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)===wP&&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(Yw.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(Yw.ERROR,{type:Kw.MEDIA_ERROR,details:Vw.FRAG_DECRYPT_ERROR,fatal:!1,error:t,reason:t.message,frag:e}),t})).then((i=>{const a=self.performance.now();return n.trigger(Yw.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!==UP&&this.state!==QP&&(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=BP,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===rS?"level":"track"} ${e.level} (frag:[${(null!=(n=e.startPTS)?n:NaN).toFixed(3)}-${(null!=(i=e.endPTS)?i:NaN).toFixed(3)}] > buffer:${o?HP(TP.getBuffered(o)):"(detached)"})`),"initSegment"!==e.sn){var s;if(e.type!==sS){const t=e.elementaryStreams;if(!Object.keys(t).some((e=>!!t[e])))return void(this.state=BP)}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=BP,o&&(!this.loadedmetadata&&e.type==rS&&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 AP(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=GP,this.fragCurrent=e,o=this.keyLoader.load(e).then((e=>{if(!this.fragContextChanged(e.frag))return this.hls.trigger(Yw.KEY_LOADED,e),this.state===GP&&(this.state=BP),e})),this.hls.trigger(Yw.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 d=a[s];let u;return this.log(`Loading part sn: ${e.sn} p: ${d.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=d.start+d.duration,this.state=XP,u=o?o.then((n=>!n||this.fragContextChanged(n.frag)?null:this.doFragPartsLoad(e,d,t,i))).catch((e=>this.handleFragLoadError(e))):this.doFragPartsLoad(e,d,t,i).catch((e=>this.handleFragLoadError(e))),this.hls.trigger(Yw.FRAG_LOADING,{frag:e,part:d,targetBufferTime:n}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):u}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))}`),Bw(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=XP;const s=this.config.progressive;let d;return d=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(Yw.FRAG_LOADING,{frag:e,targetBufferTime:n}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):d}doFragPartsLoad(e,t,n,i){return new Promise(((a,r)=>{var o;const s=[],d=null==(o=n.details)?void 0:o.partList,u=t=>{this.fragmentLoader.loadPart(e,t,i).then((i=>{s[t.index]=i;const r=i.part;this.hls.trigger(Yw.FRAG_LOADED,i);const o=jS(n,e.sn,t.index+1)||zS(d,e.sn,t.index+1);if(!o)return a({frag:e,part:r,partsLoaded:s});u(o)})).catch(r)};u(t)}))}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===Vw.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(Yw.ERROR,t)}else this.hls.trigger(Yw.ERROR,{type:Kw.OTHER_ERROR,details:Vw.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==VP)return void(this.fragCurrent||this.state===UP||this.state===QP||(this.state=BP));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?jS(o,a,r):null,d=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 d?(n&&n!==d&&(d.stats=n.stats),{frag:d,part:s,level:o}):null}bufferFragmentData(e,t,n,i,a){var r;if(!e||this.state!==VP)return;const{data1:o,data2:s}=e;let d=o;if(o&&s&&(d=pM(o,s)),null==(r=d)||!r.length)return;const u={type:e.type,frag:t,part:n,chunkMeta:i,parent:t.type,data:d};if(this.hls.trigger(Yw.BUFFER_APPENDING,u),e.dropped&&e.independent&&!n){if(a)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!TP.isBuffered(t,t.currentTime))return void this.flushMainBuffer(0,e.start);const n=t.currentTime,i=TP.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 Bw(n)?this.getFwdBufferInfoAtPos(e,n,t):null}getFwdBufferInfoAtPos(e,t,n){const{config:{maxBufferHole:i}}=this,a=TP.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 TP.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=rS){const n=this.fragmentTracker.getAppendedFrag(e,rS);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===kP||n===wP&&!!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 d=s.loaded;d?i=-1:(a||s.independent||r)&&s.fragment===t&&(i=o),a=d}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||!Bw(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(qS(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 YS(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:d}=i,u=n.partList,l=!!(i.lowLatencyMode&&null!=u&&u.length&&s);let h;if(l&&s&&!this.bitrateTest&&(r=r.concat(s),o=s.sn),e<t){h=KS(a,r,e,e>t-d?0:d)}else h=r[r.length-1];if(h){const e=h.sn-n.startSN,t=this.fragmentTracker.getState(h);if((t===kP||t===wP&&h.gap)&&(a=h),a&&h.sn===a.sn&&(!l||u[0].fragment.sn>h.sn)){if(a&&h.level===a.level){const t=r[e+1];h=h.sn<o&&this.fragmentTracker.getState(t)!==kP?t:null}}}return h}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&&Bw(a);if(r||!o&&!a){const{fragPrevious:a}=this;DP(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&&Bw(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===YP)||(this.state=BP)}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===Vw.FRAG_GAP;a&&this.fragmentTracker.fragBuffered(n,!0);const r=t.errorAction,{action:o,retryCount:s=0,retryConfig:d}=r||{};if(r&&o===eP&&d){this.resetStartWhenNotLoaded(this.levelLastLoaded);const i=BS(d,s);this.warn(`Fragment ${n.sn} of ${e} ${n.level} errored with ${t.details}, retrying loading ${s+1}/${d.maxNumRetry} in ${i}ms`),r.resolved=!0,this.retryDate=self.performance.now()+i,this.state=YP}else if(d&&r){if(this.resetFragmentErrors(e),!(s<d.maxNumRetry))return void ek.warn(`${t.details} reached or exceeded max retry (${s})`);a||o===ZS||(r.resolved=!0)}else(null==r?void 0:r.action)===QS?this.state=eE:this.state=QP;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===VP||this.state===qP){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===oS&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==UP&&(this.state=BP)}afterBufferFlushed(e,t,n){if(!e)return;const i=TP.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,i,n),this.state===JP&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=BP}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 d=i?0:WS(r,e,o.startPTS,o.endPTS,o.startDTS,o.endDTS);return this.hls.trigger(Yw.LEVEL_PTS_UPDATED,{details:r,level:n,drift:d,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(Yw.ERROR,{type:Kw.MEDIA_ERROR,details:Vw.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=qP,this.hls.trigger(Yw.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 nE{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 iE(e="",t=9e4){return{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}class aE{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=pM(this.cachedData,e),this.cachedData=null);let n,i=Nk(e,0),a=i?i.length:0;const r=this._audioTrack,o=this._id3Track,s=i?jk(i):void 0,d=e.length;for((null===this.basePTS||0===this.frameIndex&&Bw(s))&&(this.basePTS=rE(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:pS,duration:Number.POSITIVE_INFINITY});a<d;){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=d}else Fk(e,a)?(i=Nk(e,a),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:i,type:pS,duration:Number.POSITIVE_INFINITY}),a+=i.length,n=a):a++;if(a===d&&n!==d){const t=Rk(e,n);this.cachedData?this.cachedData=pM(this.cachedData,t):this.cachedData=t}}return{audioTrack:r,videoTrack:iE(),id3Track:o,textTrack:iE()}}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:iE(),id3Track:this._id3Track,textTrack:iE()}}destroy(){}}const rE=(e,t,n)=>{if(Bw(e))return 90*e;return 9e4*t+(n?9e4*n.baseTime/n.timescale:0)};function oE(e,t){return 255===e[t]&&240==(246&e[t+1])}function sE(e,t){return 1&e[t+1]?7:9}function dE(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function uE(e,t){return t+1<e.length&&oE(e,t)}function lE(e,t){if(uE(e,t)){const n=sE(e,t);if(t+n>=e.length)return!1;const i=dE(e,t);if(i<=n)return!1;const a=t+i;return a===e.length||uE(e,a)}return!1}function hE(e,t,n,i,a){if(!e.samplerate){const r=function(e,t,n,i){let a,r,o,s;const d=navigator.userAgent.toLowerCase(),u=i,l=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];a=1+((192&t[n+2])>>>6);const h=(60&t[n+2])>>>2;if(!(h>l.length-1))return o=(1&t[n+2])<<2,o|=(192&t[n+3])>>>6,ek.log(`manifest codec:${i}, ADTS type:${a}, samplingIndex:${h}`),/firefox/i.test(d)?h>=6?(a=5,s=new Array(4),r=h-3):(a=2,s=new Array(2),r=h):-1!==d.indexOf("android")?(a=2,s=new Array(2),r=h):(a=5,s=new Array(4),i&&(-1!==i.indexOf("mp4a.40.29")||-1!==i.indexOf("mp4a.40.5"))||!i&&h>=6?r=h-3:((i&&-1!==i.indexOf("mp4a.40.2")&&(h>=6&&1===o||/vivaldi/i.test(d))||!i&&1===o)&&(a=2,s=new Array(2)),r=h)),s[0]=a<<3,s[0]|=(14&h)>>1,s[1]|=(1&h)<<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:l[h],channelCount:o,codec:"mp4a.40."+a,manifestCodec:u};{const t=new Error(`invalid ADTS sampling index:${h}`);e.emit(Yw.ERROR,Yw.ERROR,{type:Kw.MEDIA_ERROR,details:Vw.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,ek.log(`parsed codec:${e.codec}, rate:${r.samplerate}, channels:${r.channelCount}`)}}function cE(e){return 9216e4/e}function mE(e,t,n,i,a){const r=i+a*cE(e.samplerate),o=function(e,t){const n=sE(e,t);if(t+n<=e.length){const i=dE(e,t)-n;if(i>0)return{headerLength:n,frameLength:i}}}(t,n);let s;if(o){const{frameLength:i,headerLength:a}=o,d=a+i,u=Math.max(0,n+d-t.length);u?(s=new Uint8Array(d-a),s.set(t.subarray(n+a,t.length),0)):s=t.subarray(n+a,n+d);const l={unit:s,pts:r};return u||e.samples.push(l),{sample:l,length:d,missing:u}}const d=t.length-n;s=new Uint8Array(d),s.set(t.subarray(n,t.length),0);return{sample:{unit:s,pts:r},length:d,missing:-1}}let fE=null;const gE=[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],pE=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],vE=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],yE=[0,1,1,4];function bE(e,t,n,i,a){if(n+24>t.length)return;const r=wE(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 wE(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,d=1e3*gE[14*(3===n?3-i:3===i?3:4)+a-1],u=pE[3*(3===n?0:2===n?1:2)+r],l=3===s?1:2,h=vE[n][i],c=yE[i],m=8*h*c,f=Math.floor(h*d/u+o)*c;if(null===fE){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);fE=e?parseInt(e[1]):0}return!!fE&&fE<=87&&2===i&&d>=224e3&&0===s&&(e[t+3]=128|e[t+3]),{sampleRate:u,channelCount:l,frameLength:f,samplesPerFrame:m}}}function kE(e,t){return!(255!==e[t]||224&~e[t+1]||!(6&e[t+1]))}function ME(e,t){return t+1<e.length&&kE(e,t)}function SE(e,t){if(t+1<e.length&&kE(e,t)){const n=4,i=wE(e,t);let a=n;null!=i&&i.frameLength&&(a=i.frameLength);const r=t+a;return r===e.length||ME(e,r)}return!1}const PE=/\/emsg[-/]ID3/i;const EE=(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),d=8-s;r[0]=4278190080>>>24+d<<d,a[0]=(o[0]&r[0])>>d,n=n?n<<s|a[0]:a[0],t+=1,i-=s}return n};class TE extends aE{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=AE(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=Nk(e,0);if(!t)return!1;const n=t.length;return 11===e[n]&&119===e[n+1]&&void 0!==jk(t)&&EE(e,n)<16}}function AE(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],d=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+d>t.length)return-1;const u=t[n+6]>>5;let l=0;2===u?l+=2:(1&u&&1!==u&&(l+=2),4&u&&(l+=2));const h=(t[n+6]<<8|t[n+7])>>12-l&1,c=[2,1,2,3,3,4,4,5][u]+h,m=t[n+5]>>3,f=7&t[n+5],g=new Uint8Array([r<<6|m<<1|f>>2,(3&f)<<6|u<<3|h<<2|s>>4,s<<4&224]),p=i+a*(1536/o*9e4),v=t.subarray(n,n+d);return e.config=g,e.channelCount=c,e.samplerate=o,e.samples.push({unit:v,pts:p}),d}class xE{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&&ek.log(e.pts+"/"+e.dts+":"+e.debug)}}class CE{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,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&&ek.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),d=this.readBits.bind(this),u=this.readUEG.bind(this),l=this.readBoolean.bind(this),h=this.skipBits.bind(this),c=this.skipEG.bind(this),m=this.skipUEG.bind(this),f=this.skipScalingList.bind(this);s();const g=s();if(d(5),h(3),s(),m(),100===g||110===g||122===g||244===g||44===g||83===g||86===g||118===g||128===g){const e=u();if(3===e&&h(1),m(),m(),h(1),l())for(t=3!==e?8:12,n=0;n<t;n++)l()&&f(n<6?16:64)}m();const p=u();if(0===p)u();else if(1===p)for(h(1),c(),c(),e=u(),n=0;n<e;n++)c();m(),h(1);const v=u(),y=u(),b=d(1);0===b&&h(1),h(1),l()&&(i=u(),a=u(),r=u(),o=u());let w=[1,1];if(l()&&l()){switch(s()){case 1:w=[1,1];break;case 2:w=[12,11];break;case 3:w=[10,11];break;case 4:w=[16,11];break;case 5:w=[40,33];break;case 6:w=[24,11];break;case 7:w=[20,11];break;case 8:w=[32,11];break;case 9:w=[80,33];break;case 10:w=[18,11];break;case 11:w=[15,11];break;case 12:w=[64,33];break;case 13:w=[160,99];break;case 14:w=[4,3];break;case 15:w=[3,2];break;case 16:w=[2,1];break;case 255:w=[s()<<8|s(),s()<<8|s()]}}return{width:Math.ceil(16*(v+1)-2*i-2*a),height:(2-b)*(y+1)*16-(b?2:4)*(r+o),pixelRatio:w}}readSliceType(){return this.readUByte(),this.readUEG(),this.readUEG()}}class LE extends xE{parseAVCPES(e,t,n,i,a){const r=this.parseAVCNALu(e,n.data);let o,s=this.VideoSample,d=!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(d&&a.length>4){const e=new CE(a).readSliceType();2!==e&&4!==e&&7!==e&&9!==e||(t=!0)}var u;if(t)null!=(u=s)&&u.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,bM(i.data,1,n.pts,t.samples);break;case 7:{var l,h;o=!0,d=!0;const t=i.data,n=new CE(t).readSPS();if(!e.sps||e.width!==n.width||e.height!==n.height||(null==(l=e.pixelRatio)?void 0:l[0])!==n.pixelRatio[0]||(null==(h=e.pixelRatio)?void 0:h[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,d,u=0,l=-1,h=0;for(-1===i&&(l=0,h=31&t[0],i=0,u=1);u<n;)if(o=t[u++],i)if(1!==i)if(o)if(1===o){if(s=u-i-1,l>=0){const e={data:t.subarray(l,s),type:h};r.push(e)}else{const n=this.getLastNalUnit(e.samples);n&&(a&&u<=4-a&&n.state&&(n.data=n.data.subarray(0,n.data.byteLength-a)),s>0&&(n.data=pM(n.data,t.subarray(0,s)),n.state=0))}u<n?(d=31&t[u],l=u,h=d,i=0):i=-1}else i=0;else i=3;else i=o?0:2;else i=o?0:1;if(l>=0&&i>=0){const e={data:t.subarray(l,n),type:h,state:i};r.push(e)}if(0===r.length){const n=this.getLastNalUnit(e.samples);n&&(n.data=pM(n.data,t))}return e.naluState=i,r}}class DE{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new $P(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=wM(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 IE=188;class RE{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 LE}static probe(e){const t=RE.syncOffset(e);return t>0&&ek.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-IE)+1,i=0;for(;i<n;){let a=!1,r=-1,o=0;for(let s=i;s<t;s+=IE){if(71!==e[s]||t-s!==IE&&71!==e[s+IE]){if(o)return-1;break}if(o++,-1===r&&(r=s,0!==r&&(n=Math.min(r+18612,e.length-IE)+1)),a||(a=0===_E(e,s)),a&&o>1&&(0===r&&o>2||s+IE>n))return r}i++}return-1}static createTrack(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:eM[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=RE.createTrack("video"),this._audioTrack=RE.createTrack("audio",i),this._id3Track=RE.createTrack("id3"),this._txtTrack=RE.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,d=this._txtTrack;let u=r.pid,l=r.pesData,h=o.pid,c=s.pid,m=o.pesData,f=s.pesData,g=null,p=this.pmtParsed,v=this._pmtId,y=e.length;if(this.remainderData&&(y=(e=pM(this.remainderData,e)).length,this.remainderData=null),y<IE&&!i)return this.remainderData=e,{audioTrack:o,videoTrack:r,id3Track:s,textTrack:d};const b=Math.max(0,RE.syncOffset(e));y-=(y-b)%IE,y<e.byteLength&&!i&&(this.remainderData=new Uint8Array(e.buffer,y,e.buffer.byteLength-y));let w=0;for(let t=b;t<y;t+=IE)if(71===e[t]){const i=!!(64&e[t+1]),y=_E(e,t);let w;if((48&e[t+3])>>4>1){if(w=t+5+e[t+4],w===t+IE)continue}else w=t+4;switch(y){case u:i&&(l&&(a=jE(l))&&this.videoParser.parseAVCPES(r,d,a,!1,this._duration),l={data:[],size:0}),l&&(l.data.push(e.subarray(w,t+IE)),l.size+=t+IE-w);break;case h:if(i){if(m&&(a=jE(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(w,t+IE)),m.size+=t+IE-w);break;case c:i&&(f&&(a=jE(f))&&this.parseID3PES(s,a),f={data:[],size:0}),f&&(f.data.push(e.subarray(w,t+IE)),f.size+=t+IE-w);break;case 0:i&&(w+=e[w]+1),v=this._pmtId=WE(e,w);break;case v:{i&&(w+=e[w]+1);const a=NE(e,w,this.typeSupported,n,this.observer);u=a.videoPid,u>0&&(r.pid=u,r.segmentCodec=a.segmentVideoCodec),h=a.audioPid,h>0&&(o.pid=h,o.segmentCodec=a.segmentAudioCodec),c=a.id3Pid,c>0&&(s.pid=c),null===g||p||(ek.warn(`MPEG-TS PMT found at ${t} after unknown PID '${g}'. Backtracking to sync byte @${b} to parse all TS packets.`),g=null,t=b-188),p=this.pmtParsed=!0;break}case 17:case 8191:break;default:g=y}}else w++;w>0&&OE(this.observer,new Error(`Found ${w} TS packet/s that do not start with 0x47`)),r.pesData=l,o.pesData=m,s.pesData=f;const k={audioTrack:o,videoTrack:r,id3Track:s,textTrack:d};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 d;if(r&&(d=jE(r))?(this.videoParser.parseAVCPES(n,a,d,!0,this._duration),n.pesData=null):n.pesData=r,o&&(d=jE(o))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,d);break;case"mp3":this.parseMPEGPES(t,d);break;case"ac3":this.parseAC3PES(t,d)}t.pesData=null}else null!=o&&o.size&&ek.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=o;s&&(d=jE(s))?(this.parseID3PES(i,d),i.pesData=null):i.pesData=s}demuxSampleAes(e,t,n){const i=this.demux(e,n,!0,!this.config.progressive),a=this.sampleAes=new DE(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=pM(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&&!uE(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",OE(this.observer,new Error(e),t),!t)return}if(hE(e,this.observer,s,a,this.audioCodec),void 0!==t.pts)o=t.pts;else{if(!i)return void ek.warn("[tsdemuxer]: AAC PES unknown PTS");{const t=cE(e.samplerate);o=i.sample.pts+t}}let d,u=0;for(;a<r;){if(d=mE(e,s,a,o,u),a+=d.length,d.missing){this.aacOverFlow=d;break}for(u++;a<r-1&&!uE(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(ME(n,r)){const t=bE(e,n,r,o,a);if(!t)break;r+=t.length,a++}else r++;else ek.warn("[tsdemuxer]: MPEG PES unknown PTS")}parseAC3PES(e,t){{const n=t.data,i=t.pts;if(void 0===i)return void ek.warn("[tsdemuxer]: AC3 PES unknown PTS");const a=n.length;let r,o=0,s=0;for(;s<a&&(r=AE(e,n,s,i,o++))>0;)s+=r}}parseID3PES(e,t){if(void 0===t.pts)return void ek.warn("[tsdemuxer]: ID3 PES unknown PTS");const n=Uw({},t,{type:this._videoTrack?yS:pS,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function _E(e,t){return((31&e[t+1])<<8)+e[t+2]}function WE(e,t){return(31&e[t+10])<<8|e[t+11]}function NE(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=_E(e,t),s=(15&e[t+3])<<8|e[t+4];switch(e[t]){case 207:if(!i){FE("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){FE("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"):ek.log("MPEG audio found, not supported in this browser");break;case 193:if(!i){FE("AC-3");break}case 129:n.ac3?-1===r.audioPid&&(r.audioPid=o,r.segmentAudioCodec="ac3"):ek.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?ek.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 OE(a,new Error("Unsupported EC-3 in M2TS found")),r;case 36:return OE(a,new Error("Unsupported HEVC in M2TS found")),r}t+=s+5}return r}function OE(e,t,n){ek.warn(`parsing error: ${t.message}`),e.emit(Yw.ERROR,Yw.ERROR,{type:Kw.MEDIA_ERROR,details:Vw.FRAG_PARSING_ERROR,fatal:!1,levelRetry:n,error:t,reason:t.message})}function FE(e){ek.log(`${e} with AES-128-CBC encryption found in unencrypted stream`)}function jE(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]=pM(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 d=t[7];192&d&&(a=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&d?(r=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,a-r>54e5&&(ek.warn(`${Math.round((a-r)/9e4)}s delta between PTS and DTS, align them`),a=r)):r=a),i=t[8];let u=i+9;if(e.size<=u)return null;e.size-=u;const l=new Uint8Array(e.size);for(let e=0,n=s.length;e<n;e++){t=s[e];let n=t.byteLength;if(u){if(u>n){u-=n;continue}t=t.subarray(u),n-=u,u=0}l.set(t,o),o+=n}return n&&(n-=i+3),{data:l,pts:a,dts:r,len:n}}return null}class zE{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 $E=Math.pow(2,32)-1;class HE{static init(){let e;for(e in HE.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:[]},HE.types)HE.types.hasOwnProperty(e)&&(HE.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]);HE.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]);HE.STTS=HE.STSC=HE.STCO=a,HE.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),HE.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),HE.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),HE.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]);HE.FTYP=HE.box(HE.types.ftyp,r,s,r,o),HE.DINF=HE.box(HE.types.dinf,HE.box(HE.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 HE.box(HE.types.hdlr,HE.HDLR_TYPES[e])}static mdat(e){return HE.box(HE.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/($E+1)),i=Math.floor(t%($E+1));return HE.box(HE.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 HE.box(HE.types.mdia,HE.mdhd(e.timescale,e.duration),HE.hdlr(e.type),HE.minf(e))}static mfhd(e){return HE.box(HE.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?HE.box(HE.types.minf,HE.box(HE.types.smhd,HE.SMHD),HE.DINF,HE.stbl(e)):HE.box(HE.types.minf,HE.box(HE.types.vmhd,HE.VMHD),HE.DINF,HE.stbl(e))}static moof(e,t,n){return HE.box(HE.types.moof,HE.mfhd(e),HE.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=HE.trak(e[t]);return HE.box.apply(null,[HE.types.moov,HE.mvhd(e[0].timescale,e[0].duration)].concat(n).concat(HE.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=HE.trex(e[t]);return HE.box.apply(null,[HE.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/($E+1)),i=Math.floor(t%($E+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 HE.box(HE.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 HE.box(HE.types.sdtp,n)}static stbl(e){return HE.box(HE.types.stbl,HE.stsd(e),HE.box(HE.types.stts,HE.STTS),HE.box(HE.types.stsc,HE.STSC),HE.box(HE.types.stsz,HE.STSZ),HE.box(HE.types.stco,HE.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=HE.box(HE.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,d=e.height,u=e.pixelRatio[0],l=e.pixelRatio[1];return HE.box(HE.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,d>>8&255,255&d,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,HE.box(HE.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),HE.box(HE.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,l>>24,l>>16&255,l>>8&255,255&l])))}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 HE.box(HE.types.mp4a,HE.audioStsd(e),HE.box(HE.types.esds,HE.esds(e)))}static mp3(e){return HE.box(HE.types[".mp3"],HE.audioStsd(e))}static ac3(e){return HE.box(HE.types["ac-3"],HE.audioStsd(e),HE.box(HE.types.dac3,e.config))}static stsd(e){return"audio"===e.type?"mp3"===e.segmentCodec&&"mp3"===e.codec?HE.box(HE.types.stsd,HE.STSD,HE.mp3(e)):"ac3"===e.segmentCodec?HE.box(HE.types.stsd,HE.STSD,HE.ac3(e)):HE.box(HE.types.stsd,HE.STSD,HE.mp4a(e)):HE.box(HE.types.stsd,HE.STSD,HE.avc1(e))}static tkhd(e){const t=e.id,n=e.duration*e.timescale,i=e.width,a=e.height,r=Math.floor(n/($E+1)),o=Math.floor(n%($E+1));return HE.box(HE.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=HE.sdtp(e),i=e.id,a=Math.floor(t/($E+1)),r=Math.floor(t%($E+1));return HE.box(HE.types.traf,HE.box(HE.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),HE.box(HE.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])),HE.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,HE.box(HE.types.trak,HE.tkhd(e),HE.mdia(e))}static trex(e){const t=e.id;return HE.box(HE.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,d,u,l,h;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],d=s.duration,u=s.size,l=s.flags,h=s.cts,r.set([d>>>24&255,d>>>16&255,d>>>8&255,255&d,u>>>24&255,u>>>16&255,u>>>8&255,255&u,l.isLeading<<2|l.dependsOn,l.isDependedOn<<6|l.hasRedundancy<<4|l.paddingValue<<1|l.isNonSync,61440&l.degradPrio,15&l.degradPrio,h>>>24&255,h>>>16&255,h>>>8&255,255&h],12+16*o);return HE.box(HE.types.trun,r)}static initSegment(e){HE.types||HE.init();const t=HE.moov(e);return pM(HE.FTYP,t)}}HE.types=void 0,HE.HDLR_TYPES=void 0,HE.STTS=void 0,HE.STSC=void 0,HE.STCO=void 0,HE.STSZ=void 0,HE.VMHD=void 0,HE.SMHD=void 0,HE.STSD=void 0,HE.FTYP=void 0,HE.DINF=void 0;const UE=9e4;function BE(e,t,n=1,i=!1){const a=e*t*n;return i?Math.round(a):a}function GE(e,t=!1){return BE(e,1e3,1/UE,t)}let XE,YE=null,KE=null;class VE{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===YE){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);YE=e?parseInt(e[1]):0}if(null===KE){const e=navigator.userAgent.match(/Safari\/(\d+)/i);KE=e?parseInt(e[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){ek.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){ek.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){ek.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,qE(e,n.pts)):i>0?e:n.pts}),e[0].pts);return t&&ek.debug("PTS rollover detected"),n}remux(e,t,n,i,a,r,o,s){let d,u,l,h,c,m,f=a,g=a;const p=e.pid>-1,v=t.pid>-1,y=t.samples.length,b=e.samples.length>0,w=o&&y>0||y>1;if((!p||b)&&(!v||w)||this.ISGenerated||o){if(this.ISGenerated){var k,M,S,P;const e=this.videoTrackConfig;!e||t.width===e.width&&t.height===e.height&&(null==(k=t.pixelRatio)?void 0:k[0])===(null==(M=e.pixelRatio)?void 0:M[0])&&(null==(S=t.pixelRatio)?void 0:S[1])===(null==(P=e.pixelRatio)?void 0:P[1])||this.resetInitSegment()}else l=this.generateIS(e,t,a,r);const n=this.isVideoContiguous;let i,o=-1;if(w&&(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){ek.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,g+=(t.samples[0].pts-e)/t.inputTimeScale,i=g}else-1===o&&(ek.warn(`[mp4-remuxer]: No keyframe found out of ${y} video samples`),m=!1);if(this.ISGenerated){if(b&&w){const n=this.getVideoStartPts(t.samples),i=(qE(e.samples[0].pts,n)-n)/t.inputTimeScale;f+=Math.max(0,i),g+=Math.max(0,-i)}if(b){if(e.samplerate||(ek.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),l=this.generateIS(e,t,a,r)),u=this.remuxAudio(e,f,this.isAudioContiguous,r,v||w||s===oS?g:void 0),w){const i=u?u.endPTS-u.startPTS:0;t.inputTimeScale||(ek.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),l=this.generateIS(e,t,a,r)),d=this.remuxVideo(t,g,n,i)}}else w&&(d=this.remuxVideo(t,g,n,0));d&&(d.firstKeyFrame=o,d.independent=-1!==o,d.firstKeyFramePTS=i)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(c=JE(n,a,this._initPTS,this._initDTS)),i.samples.length&&(h=QE(i,a,this._initPTS))),{audio:u,video:d,initSegment:l,independent:m,text:h,id3:c}}generateIS(e,t,n,i){const a=e.samples,r=t.samples,o=this.typeSupported,s={},d=this._initPTS;let u,l,h,c=!d||i,m="audio/mp4";if(c&&(u=l=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):HE.initSegment([e]),metadata:{channelCount:e.channelCount}},c&&(h=e.inputTimeScale,d&&h===d.timescale?c=!1:u=l=a[0].pts-Math.round(h*n))}if(t.sps&&t.pps&&r.length){if(t.timescale=t.inputTimeScale,s.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:HE.initSegment([t]),metadata:{width:t.width,height:t.height}},c)if(h=t.inputTimeScale,d&&h===d.timescale)c=!1;else{const e=this.getVideoStartPts(r),t=Math.round(h*n);l=Math.min(l,qE(r[0].dts,e)-t),u=Math.min(u,e-t)}this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(s).length)return this.ISGenerated=!0,c?(this._initPTS={baseTime:u,timescale:h},this._initDTS={baseTime:l,timescale:h}):u=h=void 0,{tracks:s,initPTS:u,timescale:h}}remuxVideo(e,t,n,i){const a=e.inputTimeScale,r=e.samples,o=[],s=r.length,d=this._initPTS;let u,l,h=this.nextAvcDts,c=8,m=this.videoSampleDuration,f=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,p=!1;if(!n||null===h){const e=t*a,i=r[0].pts-qE(r[0].dts,r[0].pts);YE&&null!==h&&Math.abs(e-i-h)<15e3?n=!0:h=e-i}const v=d.baseTime*a/d.timescale;for(let e=0;e<s;e++){const t=r[e];t.pts=qE(t.pts-v,h),t.dts=qE(t.dts-v,h),t.dts<r[e>0?e-1:e].dts&&(p=!0)}p&&r.sort((function(e,t){const n=e.dts-t.dts,i=e.pts-t.pts;return n||i})),u=r[0].dts,l=r[r.length-1].dts;const y=l-u,b=y?Math.round(y/(s-1)):m||e.inputTimeScale/30;if(n){const e=u-h,n=e>b,i=e<-1;if((n||i)&&(n?ek.warn(`AVC: ${GE(e,!0)} ms (${e}dts) hole between fragments detected at ${t.toFixed(3)}`):ek.warn(`AVC: ${GE(-e,!0)} ms (${e}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!i||h>=r[0].pts||YE)){u=h;const t=r[0].pts-e;if(n)r[0].dts=u,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;ek.log(`Video: Initial PTS/DTS adjusted: ${GE(t,!0)}/${GE(u,!0)}, delta: ${GE(e,!0)} ms`)}}u=Math.max(0,u);let w=0,k=0,M=u;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,w+=i,t.length=a,t.dts<M?(t.dts=M,M+=b/4|0||1):M=t.dts,f=Math.min(t.pts,f),g=Math.max(t.pts,g)}l=r[s-1].dts;const S=k+4*w+8;let P;try{P=new Uint8Array(S)}catch(e){return void this.observer.emit(Yw.ERROR,Yw.ERROR,{type:Kw.MUX_ERROR,details:Vw.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:S,reason:`fail allocating video mdat ${S}`})}const E=new DataView(P.buffer);E.setUint32(0,S),P.set(HE.types.mdat,4);let T=!1,A=Number.POSITIVE_INFINITY,x=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY,L=Number.NEGATIVE_INFINITY;for(let e=0;e<s;e++){const t=r[e],n=t.units;let d,u=0;for(let e=0,t=n.length;e<t;e++){const t=n[e],i=t.data,a=t.data.byteLength;E.setUint32(c,a),c+=4,P.set(i,c),c+=a,u+=4+a}if(e<s-1)m=r[e+1].dts-t.dts,d=r[e+1].pts-t.pts;else{const n=this.config,o=e>0?t.dts-r[e-1].dts:b;if(d=e>0?t.pts-r[e-1].pts:b,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:T=!0,ek.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 l=Math.round(t.pts-t.dts);A=Math.min(A,m),C=Math.max(C,m),x=Math.min(x,d),L=Math.max(L,d),o.push(new ZE(t.key,m,u,l))}if(o.length)if(YE){if(YE<70){const e=o[0].flags;e.dependsOn=2,e.isNonSync=0}}else if(KE&&L-x<C-A&&b/C<.025&&0===o[0].cts){ek.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let e=u;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:b;o[t].cts=0,e=i}}m=T||!m?b:m,this.nextAvcDts=h=l+m,this.videoSampleDuration=m,this.isVideoContiguous=!0;const D={data1:HE.moof(e.sequenceNumber++,u,Uw({},e,{samples:o})),data2:P,startPTS:f/a,endPTS:(g+m)/a,startDTS:u/a,endDTS:h/a,type:"video",hasAudio:!1,hasVideo:!0,nb:o.length,dropped:e.dropped};return e.samples=[],e.dropped=0,D}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return 1152;case"ac3":return 1536;default:return 1024}}remuxAudio(e,t,n,i,a){const r=e.inputTimeScale,o=r/(e.samplerate?e.samplerate:r),s=this.getSamplesPerFrame(e),d=s*o,u=this._initPTS,l="mp3"===e.segmentCodec&&this.typeSupported.mpeg,h=[],c=void 0!==a;let m=e.samples,f=l?0:8,g=this.nextAudioPts||-1;const p=t*r,v=u.baseTime*r/u.timescale;if(this.isAudioContiguous=n=n||m.length&&g>0&&(i&&Math.abs(p-g)<9e3||Math.abs(qE(m[0].pts-v,p)-g)<20*d),m.forEach((function(e){e.pts=qE(e.pts-v,p)})),!n||g<0){if(m=m.filter((e=>e.pts>=0)),!m.length)return;g=0===a?0:i&&!c?Math.max(0,p):m[0].pts}if("aac"===e.segmentCodec){const t=this.config.maxAudioFramesDrift;for(let n=0,i=g;n<m.length;n++){const a=m[n],o=a.pts,s=o-i,u=Math.abs(1e3*s/r);if(s<=-t*d&&c)0===n&&(ek.warn(`Audio frame @ ${(o/r).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*s/r)} ms.`),this.nextAudioPts=g=i=o);else if(s>=t*d&&u<1e4&&c){let t=Math.round(s/d);i=o-t*d,i<0&&(t--,i+=d),0===n&&(this.nextAudioPts=g=i),ek.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=zE.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);r||(ek.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+=d,n++}}a.pts=i,i+=d}}let y,b=null,w=null,k=0,M=m.length;for(;M--;)k+=m[M].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!==w){h[t-1].duration=Math.round((r-w)/o)}else{if(n&&"aac"===e.segmentCodec&&(r=g),b=r,!(k>0))return;k+=f;try{y=new Uint8Array(k)}catch(e){return void this.observer.emit(Yw.ERROR,Yw.ERROR,{type:Kw.MUX_ERROR,details:Vw.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:k,reason:`fail allocating audio mdat ${k}`})}if(!l){new DataView(y.buffer).setUint32(0,k),y.set(HE.types.mdat,4)}}y.set(a,f);const d=a.byteLength;f+=d,h.push(new ZE(!0,s,d,0)),w=r}const S=h.length;if(!S)return;const P=h[h.length-1];this.nextAudioPts=g=w+o*P.duration;const E=l?new Uint8Array(0):HE.moof(e.sequenceNumber++,b/o,Uw({},e,{samples:h}));e.samples=[];const T=b/r,A=g/r,x={data1:E,data2:y,startPTS:T,endPTS:A,startDTS:T,endDTS:A,type:"audio",hasAudio:!0,hasVideo:!1,nb:S};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,d=9e4*s.baseTime/s.timescale,u=(null!==o?o:i.startDTS*a)+d,l=i.endDTS*a+d,h=1024*r,c=Math.ceil((l-u)/h),m=zE.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(ek.warn("[mp4-remuxer]: remux empty Audio"),!m)return void ek.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<c;e++){const t=u+e*h;f.push({unit:m,pts:t,dts:t})}return e.samples=f,this.remuxAudio(e,t,n,!1)}}function qE(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 JE(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=qE(a.pts-n.baseTime*r/n.timescale,t*r)/r,a.dts=qE(a.dts-i.baseTime*r/i.timescale,t*r)/r}const o=e.samples;return e.samples=[],{samples:o}}function QE(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=qE(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 ZE{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 eT(e,t){const n=null==e?void 0:e.codec;if(n&&n.length>4)return n;if(t===sk){if("ec-3"===n||"ac-3"===n||"alac"===n)return n;if("fLaC"===n||"Opus"===n){return zM(n,!1)}const e="mp4a.40.5";return ek.info(`Parsed audio codec "${n}" or audio object type not handled. Using "${e}"`),e}return ek.warn(`Unhandled video codec "${n}"`),"hvc1"===n||"hev1"===n?"hvc1.1.6.L120.90":"av01"===n?"av01.0.04M.08":"avc1.42e01e"}try{XE=self.performance.now.bind(self.performance)}catch(e){ek.debug("Unable to use Performance API on this environment"),XE=null==vk?void 0:vk.Date.now}const tT=[{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=iE("video",1),r=this.audioTrack=iE("audio",1),o=this.txtTrack=iE("text",1);if(this.id3Track=iE("id3",1),this.timeOffset=0,null==e||!e.byteLength)return;const s=uM(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=eM.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=iM(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=pM(this.remainderData,e));const t=function(e){const t={valid:null,remainder:null},n=sM(e,["moof"]);if(n.length<2)return t.remainder=e,t;const i=n[n.length-1];return t.valid=Rk(e,0,i.byteOffset-8),t.remainder=Rk(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=vM(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=vM(e,t),{videoTrack:t,audioTrack:iE(),id3Track:i,textTrack:iE()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const i=sM(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,d=0,u=0;if(0===t){for(;"\0"!==tM(e.subarray(u,u+1));)n+=tM(e.subarray(u,u+1)),u+=1;for(n+=tM(e.subarray(u,u+1)),u+=1;"\0"!==tM(e.subarray(u,u+1));)i+=tM(e.subarray(u,u+1)),u+=1;i+=tM(e.subarray(u,u+1)),u+=1,a=iM(e,12),r=iM(e,16),s=iM(e,20),d=iM(e,24),u=28}else if(1===t){u+=4,a=iM(e,u),u+=4;const t=iM(e,u);u+=4;const r=iM(e,u);for(u+=4,o=2**32*t+r,Gw(o)||(o=Number.MAX_SAFE_INTEGER,ek.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),s=iM(e,u),u+=4,d=iM(e,u),u+=4;"\0"!==tM(e.subarray(u,u+1));)n+=tM(e.subarray(u,u+1)),u+=1;for(n+=tM(e.subarray(u,u+1)),u+=1;"\0"!==tM(e.subarray(u,u+1));)i+=tM(e.subarray(u,u+1)),u+=1;i+=tM(e.subarray(u,u+1)),u+=1}return{schemeIdUri:n,value:i,timeScale:a,presentationTime:o,presentationTimeDelta:r,eventDuration:s,id:d,payload:e.subarray(u,e.byteLength)}}(e);if(PE.test(i.schemeIdUri)){const e=Bw(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:yS,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&&sM(e,["moov","trak"]).forEach((e=>{const t=sM(e,["mdia","minf","stbl","stsd"])[0].subarray(8);let i=sM(t,["enca"]);const a=i.length>0;a||(i=sM(t,["encv"])),i.forEach((e=>{sM(a?e.subarray(28):e.subarray(78),["sinf"]).forEach((e=>{const t=fM(e);if(t){const e=t.subarray(8,24);e.some((e=>0!==e))||(ek.log(`[eme] Patching keyId in 'enc${a?"a":"v"}>sinf>>tenc' box: ${Jk.hexDump(e)} -> ${Jk.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=uM(e);i.audio&&(t=eT(i.audio,sk)),i.video&&(n=eT(i.video,dk));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"}:ek.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:d,lastEndTime:u}=this;const l={audio:void 0,video:void 0,text:i,id3:n,initSegment:void 0};Bw(u)||(u=this.lastEndTime=a||0);const h=t.samples;if(null==h||!h.length)return l;const c={initPTS:void 0,timescale:1};let m=this.initData;if(null!=(o=m)&&o.length||(this.generateInitSegment(h),m=this.initData),null==(s=m)||!s.length)return ek.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),l;this.emitInitSegment&&(c.tracks=this.initTracks,this.emitInitSegment=!1);const f=function(e,t){let n=0,i=0,a=0;const r=sM(e,["moof","traf"]);for(let e=0;e<r.length;e++){const o=r[e],s=sM(o,["tfhd"])[0],d=t[iM(s,4)];if(!d)continue;const u=d.default,l=iM(s,0)|(null==u?void 0:u.flags);let h=null==u?void 0:u.duration;8&l&&(h=iM(s,2&l?12:8));const c=d.timescale||9e4,m=sM(o,["trun"]);for(let e=0;e<m.length;e++)n=gM(m[e]),!n&&h&&(n=h*iM(m[e],4)),d.type===dk?i+=n/c:d.type===sk&&(a+=n/c)}if(0===i&&0===a){let t=1/0,n=0,i=0;const a=sM(e,["sidx"]);for(let e=0;e<a.length;e++){const r=dM(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&&Bw(i))return i}return i||a}(h,m),g=function(e,t){return sM(t,["moof","traf"]).reduce(((t,n)=>{const i=sM(n,["tfdt"])[0],a=i[0],r=sM(n,["tfhd"]).reduce(((t,n)=>{const r=iM(n,4),o=e[r];if(o){let e=iM(i,4);if(1===a){if(e===Qk)return ek.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),t;e*=Qk+1,e+=iM(i,8)}const n=e/(o.timescale||9e4);if(Bw(n)&&(null===t||n<t))return n}return t}),null);return null!==r&&Bw(r)&&(null===t||r<t)?r:t}),null)}(m,h),p=null===g?a:g;(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}(d,p,a,f)||c.timescale!==d.timescale&&r)&&(c.initPTS=p-a,d&&1===d.timescale&&ek.warn("Adjusting initPTS by "+(c.initPTS-d.baseTime)),this.initPTS=d={baseTime:c.initPTS,timescale:1});const v=e?p-d.baseTime/d.timescale:u,y=v+f;!function(e,t,n){sM(t,["moof","traf"]).forEach((t=>{sM(t,["tfhd"]).forEach((i=>{const a=iM(i,4),r=e[a];if(!r)return;const o=r.timescale||9e4;sM(t,["tfdt"]).forEach((e=>{const t=e[0],i=n*o;if(i){let n=iM(e,4);if(0===t)n-=i,n=Math.max(n,0),oM(e,4,n);else{n*=Math.pow(2,32),n+=iM(e,8),n-=i,n=Math.max(n,0);const t=Math.floor(n/(Qk+1)),a=Math.floor(n%(Qk+1));oM(e,4,t),oM(e,8,a)}}}))}))}))}(m,h,d.baseTime/d.timescale),f>0?this.lastEndTime=y:(ek.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const b=!!m.audio,w=!!m.video;let k="";b&&(k+="audio"),w&&(k+="video");const M={data1:h,startPTS:v,startDTS:v,endPTS:y,endDTS:y,type:k,hasAudio:b,hasVideo:w,nb:1,dropped:0};return l.audio="audio"===M.type?M:void 0,l.video="audio"!==M.type?M:void 0,l.initSegment=c,l.id3=JE(n,a,d,d),i.samples.length&&(l.text=QE(i,a,d)),l}}},{demux:RE,remux:VE},{demux:class extends aE{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=Nk(e,0);let n=(null==t?void 0:t.length)||0;if(SE(e,n))return!1;for(let t=e.length;n<t;n++)if(lE(e,n))return ek.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)&&oE(e,t)&&dE(e,t)<=e.length-t}(e,t)}appendFrame(e,t,n){hE(e,this.observer,t,n,e.manifestCodec);const i=mE(e,t,n,this.basePTS,this.frameIndex);if(i&&0===i.missing)return i}},remux:VE},{demux:class extends aE{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=Nk(e,0);let n=(null==t?void 0:t.length)||0;if(t&&11===e[n]&&119===e[n+1]&&void 0!==jk(t)&&EE(e,n)<=16)return!1;for(let t=e.length;n<t;n++)if(SE(e,n))return ek.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return function(e,t){return kE(e,t)&&4<=e.length-t}(e,t)}appendFrame(e,t,n){if(null!==this.basePTS)return bE(e,t,n,this.basePTS,this.frameIndex)}},remux:VE}];tT.splice(2,0,{demux:TE,remux:VE});class nT{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=XE();let r=new Uint8Array(e);const{currentTransmuxState:o,transmuxConfig:s}=this;i&&(this.currentTransmuxState=i);const{contiguous:d,discontinuity:u,trackSwitch:l,accurateTimeOffset:h,timeOffset:c,initSegmentChange:m}=i||o,{audioCodec:f,videoCodec:g,defaultInitPts:p,duration:v,initSegmentData:y}=s,b=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(b&&"AES-128"===b.method){const e=this.getDecrypter();if(!e.isSync())return this.decryptionPromise=e.webCryptoDecrypt(r,b.key.buffer,b.iv.buffer).then((e=>{const t=this.push(e,null,n);return this.decryptionPromise=null,t})),this.decryptionPromise;{let t=e.softwareDecrypt(r,b.key.buffer,b.iv.buffer);if(n.part>-1&&(t=e.flush()),!t)return a.executeEnd=XE(),iT(n);r=new Uint8Array(t)}}const w=this.needsProbing(u,l);if(w){const e=this.configureTransmuxer(r);if(e)return ek.warn(`[transmuxer] ${e.message}`),this.observer.emit(Yw.ERROR,Yw.ERROR,{type:Kw.MEDIA_ERROR,details:Vw.FRAG_PARSING_ERROR,fatal:!1,error:e,reason:e.message}),a.executeEnd=XE(),iT(n)}(u||l||m||w)&&this.resetInitSegment(y,f,g,v,t),(u||m||w)&&this.resetInitialTimestamp(p),d||this.resetContiguity();const k=this.transmux(r,b,c,h,n),M=this.currentTransmuxState;return M.contiguous=!0,M.discontinuity=!1,M.trackSwitch=!1,a.executeEnd=XE(),k}flush(e){const t=e.transmuxing;t.executeStart=XE();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:d}=this;if(!s||!d)return t.executeEnd=XE(),[iT(e)];const u=s.flush(o);return aT(u)?u.then((t=>(this.flushRemux(r,t,e),r))):(this.flushRemux(r,u,e),r)}flushRemux(e,t,n){const{audioTrack:i,videoTrack:a,id3Track:r,textTrack:o}=t,{accurateTimeOffset:s,timeOffset:d}=this.currentTransmuxState;ek.log(`[transmuxer.ts]: Flushed fragment ${n.sn}${n.part>-1?" p: "+n.part:""} of level ${n.level}`);const u=this.remuxer.remux(i,a,r,o,d,s,!0,this.id);e.push({remuxResult:u,chunkMeta:n}),n.transmuxing.executeEnd=XE()}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=tT.length;t<n;t++){var o;if(null!=(o=tT[t].demux)&&o.probe(e)){r=tT[t];break}}if(!r)return new Error("Failed to find demuxer by probing fragment data");const s=this.demuxer,d=this.remuxer,u=r.remux,l=r.demux;d&&d instanceof u||(this.remuxer=new u(n,t,i,a)),s&&s instanceof l||(this.demuxer=new l(n,t,i),this.probe=l.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new $P(this.config)),e}}const iT=e=>({remuxResult:{},chunkMeta:e});function aT(e){return"then"in e&&e.then instanceof Function}class rT{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 oT{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 sT={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),d=n?n+t:t;return e._events[d]?e._events[d].fn?e._events[d]=[e._events[d],s]:e._events[d].push(s):(e._events[d]=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 d,u,l=this._events[s],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,i),!0;case 4:return l.fn.call(l.context,t,i,a),!0;case 5:return l.fn.call(l.context,t,i,a,r),!0;case 6:return l.fn.call(l.context,t,i,a,r,o),!0}for(u=1,d=new Array(h-1);u<h;u++)d[u-1]=arguments[u];l.fn.apply(l.context,d)}else{var c,m=l.length;for(u=0;u<m;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),h){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,i);break;case 4:l[u].fn.call(l[u].context,t,i,a);break;default:if(!d)for(c=1,d=new Array(h-1);c<h;c++)d[c-1]=arguments[c];l[u].fn.apply(l[u].context,d)}}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 d=0,u=[],l=s.length;d<l;d++)(s[d].fn!==t||a&&!s[d].once||i&&s[d].context!==i)&&u.push(s[d]);u.length?this._events[r]=1===u.length?u[0]:u: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}(sT);var dT=Dw(sT.exports);class uT{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===Yw.ERROR&&(this.error=t.error),this.hls.trigger(e,t)};this.observer=new dT,this.observer.on(Yw.FRAG_DECRYPTED,r),this.observer.on(Yw.ERROR,r);const o=DM(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?(ek.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)):(ek.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,ek.warn(`Error in "${t}" Web Worker, fallback to inline`),this.hls.trigger(Yw.ERROR,{type:Kw.OTHER_ERROR,details:Vw.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:n})},e.postMessage({cmd:"init",typeSupported:s,vendor:"",id:t,config:JSON.stringify(a)})}catch(e){ek.warn(`Error setting up "${t}" Web Worker, fallback to inline`,e),this.resetWorker(),this.error=null,this.transmuxer=new nT(this.observer,s,a,"",t)}return}}this.transmuxer=new nT(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,d,u){var l,h;d.transmuxing.start=self.performance.now();const{transmuxer:c}=this,m=r?r.start:a.start,f=a.decryptdata,g=this.frag,p=!(g&&a.cc===g.cc),v=!(g&&d.level===g.level),y=g?d.sn-g.sn:-1,b=this.part?d.part-this.part.index:-1,w=0===y&&d.id>1&&d.id===(null==g?void 0:g.stats.chunkCount),k=!v&&(1===y||0===y&&(1===b||w&&b<=0)),M=self.performance.now();(v||y||0===a.stats.parsing.start)&&(a.stats.parsing.start=M),!r||!b&&k||(r.stats.parsing.start=M);const S=!(g&&(null==(l=a.initSegment)?void 0:l.url)===(null==(h=g.initSegment)?void 0:h.url)),P=new oT(p,k,s,v,m,S);if(!k||p||S){ek.log(`[transmuxer-interface, ${a.type}]: Starting new transmux session for sn: ${d.sn} p: ${d.part} level: ${d.level} id: ${d.id}\n discontinuity: ${p}\n trackSwitch: ${v}\n contiguous: ${k}\n accurateTimeOffset: ${s}\n timeOffset: ${m}\n initSegmentChange: ${S}`);const e=new rT(n,i,t,o,u);this.configureTransmuxer(e)}if(this.frag=a,this.part=r,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:f,chunkMeta:d,state:P},e instanceof ArrayBuffer?[e]:[]);else if(c){const t=c.push(e,f,d,P);aT(t)?(c.async=!0,t.then((e=>{this.handleTransmuxComplete(e)})).catch((e=>{this.transmuxerError(e,d,"transmuxer-interface push error")}))):(c.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);aT(n)||t.async?(aT(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(Yw.ERROR,{type:Kw.MEDIA_ERROR,details:Vw.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 ek.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":ek[t.data.logType]&&ek[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 lT(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!hT(e[n].attrs,t[n].attrs))return!1;return!0}function hT(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 cT(e,t){return t.label.toLowerCase()===e.name.toLowerCase()&&(!t.language||t.language.toLowerCase()===(e.lang||"").toLowerCase())}class mT{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 fT{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){ek.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 gT=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/;function pT(e){const t=e.querySelectorAll("source");[].slice.call(t).forEach((t=>{e.removeChild(t)}))}const vT={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},yT=e=>String.fromCharCode(vT[e]||e),bT=15,wT=100,kT={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},MT={17:2,18:4,21:6,22:8,23:10,19:13,20:15},ST={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},PT={25:2,26:4,29:6,30:8,31:10,27:13,28:15},ET=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class TT{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n="function"==typeof t?t():t;ek.log(`${this.time} [${e}] ${n}`)}}}const AT=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].toString(16));return t};class xT{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 CT{constructor(){this.uchar=" ",this.penState=new xT}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 LT{constructor(e){this.chars=[],this.pos=0,this.currPenState=new xT,this.cueStartTime=null,this.logger=void 0;for(let e=0;e<wT;e++)this.chars.push(new CT);this.logger=e}equals(e){for(let t=0;t<wT;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<wT;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<wT;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>wT&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=wT)}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=yT(e);this.pos>=wT?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<wT;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<wT;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 DT{constructor(e){this.rows=[],this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<bT;t++)this.rows.push(new LT(e));this.logger=e}reset(){for(let e=0;e<bT;e++)this.rows[e].clear();this.currRow=14}equals(e){let t=!0;for(let n=0;n<bT;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<bT;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<bT;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<bT;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<bT;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 IT{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 DT(n),this.nonDisplayedMemory=new DT(n),this.lastOutputScreen=new DT(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 RT{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 TT;this.channels=[null,new IT(e,t,i),new IT(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,(()=>"["+AT([t[e],t[e+1]])+"] -> ("+AT([n,i])+")"));const o=this.cmdHistory;if(n>=16&&n<=31){if(WT(n,i,o)){_T(null,null,o),this.logger.log(3,(()=>"Repeated command ("+AT([n,i])+") is dropped"));continue}_T(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 _T(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 "+AT([n,i])+" orig: "+AT([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 ("+AT([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?kT[e]:ST[e]:1===i?MT[e]:PT[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 '"+yT(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 = "+AT(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=ET[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()}_T(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 _T(e,t,n){n.a=e,n.b=t}function WT(e,t,n){return n.a===e&&n.b===t}class NT{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 OT=function(){if(null!=vk&&vk.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,d={enumerable:!0};s.hasBeenReset=!1;let u="",l=!1,h=t,c=r,m=o,f=null,g="",p=!0,v="auto",y="start",b=50,w="middle",k=50,M="middle";Object.defineProperty(s,"id",a({},d,{get:function(){return u},set:function(e){u=""+e}})),Object.defineProperty(s,"pauseOnExit",a({},d,{get:function(){return l},set:function(e){l=!!e}})),Object.defineProperty(s,"startTime",a({},d,{get:function(){return h},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");h=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",a({},d,{get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");c=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",a({},d,{get:function(){return m},set:function(e){m=""+e,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",a({},d,{get:function(){return f},set:function(e){f=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",a({},d,{get:function(){return g},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.");g=i,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",a({},d,{get:function(){return p},set:function(e){p=!!e,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",a({},d,{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({},d,{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({},d,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",a({},d,{get:function(){return w},set:function(e){const t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");w=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",a({},d,{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({},d,{get:function(){return M},set:function(e){const t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");M=t,this.hasBeenReset=!0}})),s.displayState=void 0}return r.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},r}();class FT{decode(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function jT(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 zT{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 $T(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 HT=new OT(0,0,""),UT="middle"===HT.align?"middle":"center";function BT(e,t,n){const i=e;function a(){const t=jT(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 zT;$T(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",UT,"end"]);break;case"position":a=t.split(","),i.percent(e,a[0]),2===a.length&&i.alt("positionAlign",a[1],["start",UT,"end","line-left","line-right","auto"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start",UT,"end","left","right"])}}),/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");let a=i.get("line","auto");"auto"===a&&-1===HT.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",UT);let r=i.get("position","auto");"auto"===r&&50===HT.position&&(r="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=r}(e,t)}function GT(e){return e.replace(/<br(?: \/)?>/gi,"\n")}class XT{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new FT,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=GT(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)?$T(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 OT(0,0,""),t.state="CUE",-1===e.indexOf("--\x3e")){t.cue.id=e;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{BT(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 YT=/\r\n|\n\r|\n|\r/g,KT=function(e,t,n=0){return e.slice(n,n+t.length)===t},VT=function(e){let t=5381,n=e.length;for(;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()};function qT(e,t,n){return VT(e.toString())+VT(t.toString())+VT(n)}function JT(e,t,n,i,a,r,o){const s=new XT,d=Kk(new Uint8Array(e)).trim().replace(YT,"\n").split("\n"),u=[],l=t?function(e,t=1){return BE(e,UE,1/t)}(t.baseTime,t.timescale):0;let h,c="00:00.000",m=0,f=0,g=!0;s.oncue=function(e){const r=n[i];let o=n.ccOffset;const s=(m-l)/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(h=new Error("Missing initPTS for VTT MPEGTS"));o=s-n.presentationOffset}const d=e.endTime-e.startTime,c=qE(9e4*(e.startTime+o-f),9e4*a)/9e4;e.startTime=Math.max(c,0),e.endTime=Math.max(c+d,0);const g=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(g)),e.id||(e.id=qT(e.startTime,e.endTime,g)),e.endTime>0&&u.push(e)},s.onparsingerror=function(e){h=e},s.onflush=function(){h?o(h):r(u)},d.forEach((e=>{if(g){if(KT(e,"X-TIMESTAMP-MAP=")){g=!1,e.slice(16).split(",").forEach((e=>{KT(e,"LOCAL:")?c=e.slice(6):KT(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(!(Bw(t)&&Bw(n)&&Bw(i)&&Bw(a)))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=6e4*i,t+=36e5*a,t}(c)/1e3}catch(e){h=e}return}""===e&&(g=!1)}s.parse(e+"\n")})),s.flush()}const QT="stpp.ttml.im1t",ZT=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,eA=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,tA={left:"start",center:"center",right:"end",start:"start",end:"end"};function nA(e,t,n,i){const a=sM(new Uint8Array(e),["mdat"]);if(0===a.length)return void i(new Error("Could not parse IMSC1 mdat"));const r=a.map((e=>Kk(e))),o=function(e,t,n=1,i=!1){return BE(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=aA(iA(i,"styling","style")),d=aA(iA(i,"layout","region")),u=iA(i,"body","[begin]");return[].map.call(u,(e=>{const n=rA(e,o);if(!n||!e.hasAttribute("begin"))return null;const i=dA(e.getAttribute("begin"),r),a=dA(e.getAttribute("dur"),r);let u=dA(e.getAttribute("end"),r);if(null===i)throw sA(e);if(null===u){if(null===a)throw sA(e);u=i+a}const l=new OT(i-t,u-t,n);l.id=qT(l.startTime,l.endTime,l.text);const h=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=oA(t,i,r)||oA(e,i,r)||oA(a,i,r);return o&&(n[r]=o),n}),{})}(d[e.getAttribute("region")],s[e.getAttribute("style")],s),{textAlign:c}=h;if(c){const e=tA[c];e&&(l.lineAlign=e),l.align=c}return Uw(l,h),l})).filter((e=>null!==e))}(e,o))))}catch(e){i(e)}}function iA(e,t,n){const i=e.getElementsByTagName(t)[0];return i?[].slice.call(i.querySelectorAll(n)):[]}function aA(e){return e.reduce(((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e}),{})}function rA(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?rA(n,t):t?e+n.textContent.trim().replace(/\s+/g," "):e+n.textContent}),"")}function oA(e,t,n){return e&&e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function sA(e){return new Error(`Could not parse ttml timestamp ${e}`)}function dA(e,t){if(!e)return null;let n=jT(e);return null===n&&(ZT.test(e)?n=function(e,t){const n=ZT.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):eA.test(e)&&(n=function(e,t){const n=eA.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 uA(e){return e.characteristics&&/transcribes-spoken-dialog/gi.test(e.characteristics)&&/describes-music-and-sound/gi.test(e.characteristics)?"captions":"subtitles"}function lA(e,t){return!!e&&e.kind===uA(t)&&cT(t,e)}class hA{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(Yw.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(Yw.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(Yw.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Yw.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(Yw.BUFFER_CODECS,this.onBufferCodecs,this),e.on(Yw.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(Yw.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(Yw.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(Yw.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Yw.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(Yw.BUFFER_CODECS,this.onBufferCodecs,this),e.off(Yw.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&&Bw(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&&ek.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,hA.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 cA="[eme]";class mA{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=mA.CDMCleanupPromise?[mA.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=ek.debug.bind(ek,cA),this.log=ek.log.bind(ek,cA),this.warn=ek.warn.bind(ek,cA),this.error=ek.error.bind(ek,cA),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(Yw.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(Yw.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(Yw.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(Yw.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(Yw.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(Yw.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(Yw.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(Yw.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,i=t[e];if(i)return i.licenseUrl;if(e===yk.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 fA?t:new fA({type:Kw.KEY_SYSTEM_ERROR,details:Vw.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===Dk&&"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 yk.FAIRPLAY:a=["cenc","sinf"];break;case yk.WIDEVINE:case yk.PLAYREADY:a=["cenc"];break;case yk.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: ${Jk.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 Jk.hexDump(e.keyId)}updateKeySession(e,t){var n;const i=e.mediaKeysSession;return this.log(`Updating key-session "${i.sessionId}" for keyID ${Jk.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=Lk(this.config),a=e.map(Sk).filter((e=>!!e&&-1!==i.indexOf(e)));return this.getKeySystemSelectionPromise(a).then((({keySystem:e})=>{const i=Ck(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 fA?this.hls.trigger(Yw.ERROR,e.data):this.hls.trigger(Yw.ERROR,{type:Kw.KEY_SYSTEM_ERROR,details:Vw.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){const t=Sk(e.keyFormat),n=t?[t]:Lk(this.config);return this.attemptKeySystemAccess(n)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=Lk(this.config)),0===e.length)throw new fA({type:Kw.KEY_SYSTEM_ERROR,details:Vw.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[yk.FAIRPLAY]){const e=tM(new Uint8Array(n));try{const t=fk(JSON.parse(e).sinf),n=fM(new Uint8Array(t));if(!n)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");a=n.subarray(8,24),r=yk.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=MM(new DataView(e,i));t.push(n),i+=n.size}}return t}(n),t=e.filter((e=>e.systemId===Ak))[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=>xk(e.systemId))).join(",")} pssh data in favor of playlist keys`));if(r=xk(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=Jk.hexDump(a),{keyIdToKeySessionPromise:s,mediaKeySessions:d}=this;let u=s[o];for(let e=0;e<d.length;e++){const i=d[e],r=i.decryptdata;if(!r.keyId)continue;const l=Jk.hexDump(r.keyId);if(o===l||-1!==r.uri.replace(/-/g,"").indexOf(o)){if(u=s[l],r.pssh)break;delete s[l],r.pssh=new Uint8Array(n),r.keyId=a,u=s[o]=u.then((()=>this.generateRequestWithPreferredKeySession(i,t,n,"encrypted-event-key-match")));break}}u||(u=s[o]=this.getKeySystemSelectionPromise([r]).then((({keySystem:e,mediaKeys:i})=>{var r;this.throwIfDestroyed();const s=new PM("ISO-23001-7",o,null!=(r=Ck(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")}))}))),u.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 d=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${i}": ${d} (init data type: ${t} length: ${n?n.byteLength:null})`);const u=new dT,l=e._onmessage=t=>{const n=e.mediaKeysSession;if(!n)return void u.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),u.emit("error",e)})):"license-release"===i?e.keySystem===yk.FAIRPLAY&&(this.updateKeySession(e,pk("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${i}"`)},h=e._onkeystatuseschange=t=>{if(!e.mediaKeysSession)return void u.emit("error",new Error("invalid state"));this.onKeyStatusChange(e);const n=e.keyStatus;u.emit("keyStatus",n),"expired"===n&&(this.warn(`${e.keySystem} expired for key ${d}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",l),e.mediaKeysSession.addEventListener("keystatuseschange",h);const c=new Promise(((e,t)=>{u.on("error",t),u.on("keyStatus",(n=>{n.startsWith("usable")?e():"output-restricted"===n?t(new fA({type:Kw.KEY_SYSTEM_ERROR,details:Vw.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):"internal-error"===n?t(new fA({type:Kw.KEY_SYSTEM_ERROR,details:Vw.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: ${d}`)})).catch((e=>{throw new fA({type:Kw.KEY_SYSTEM_ERROR,details:Vw.KEY_SYSTEM_NO_SESSION,error:e,fatal:!1},`Error generating key-session request: ${e}`)})).then((()=>c)).catch((t=>{throw u.removeAllListeners(),this.removeSession(e),t})).then((()=>(u.removeAllListeners(),e)))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach(((t,n)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${Jk.hexDump("buffer"in n?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n))} session keyId: ${Jk.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,d={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},u={onSuccess:(e,t,n,i)=>{a(e.data)},onError:(t,n,a,s)=>{r(new fA({type:Kw.KEY_SYSTEM_ERROR,details:Vw.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:a,response:zw({url:o.url,data:void 0},t)},`"${e}" certificate request failed (${i}). Status: ${t.code} (${t.text})`))},onTimeout:(t,n,a)=>{r(new fA({type:Kw.KEY_SYSTEM_ERROR,details:Vw.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,d,u)}))):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 fA({type:Kw.KEY_SYSTEM_ERROR,details:Vw.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 fA({type:Kw.KEY_SYSTEM_ERROR,details:Vw.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"),d=null==s?void 0:s.textContent;if(!d)throw new Error("Cannot find <Challenge> in key message");return pk(atob(d))}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,d=s?s.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>d||o.status>=400&&o.status<500)a(new fA({type:Kw.KEY_SYSTEM_ERROR,details:Vw.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=d-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==yk.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={},PM.clearKeyUriToKeyIdMap();const n=t.length;mA.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}`)}))}}}mA.CDMCleanupPromise=void 0;class fA 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 gA,pA,vA;!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"}(gA||(gA={})),function(e){e.DASH="d",e.HLS="h",e.SMOOTH="s",e.OTHER="o"}(pA||(pA={})),function(e){e.OBJECT="CMCD-Object",e.REQUEST="CMCD-Request",e.SESSION="CMCD-Session",e.STATUS="CMCD-Status"}(vA||(vA={}));const yA={[vA.OBJECT]:["br","d","ot","tb"],[vA.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[vA.SESSION]:["cid","pr","sf","sid","st","v"],[vA.STATUS]:["bs","rtp"]};class bA{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map((e=>e instanceof bA?e:new bA(e)))),this.value=e,this.params=t}}class wA{constructor(e){this.description=void 0,this.description=e}}const kA="Dict";function MA(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 SA="Bare Item",PA="Boolean",EA="Byte Sequence",TA="Decimal",AA="Integer";const xA=/[\x00-\x1f\x7f]+/,CA="Token",LA="Key";function DA(e,t,n){return MA("serialize",e,t,n)}function IA(e){if(!1===ArrayBuffer.isView(e))throw DA(e,EA);return`:${t=e,btoa(String.fromCharCode(...t))}:`;var t}function RA(e){if(function(e){return e<-999999999999999||999999999999999<e}(e))throw DA(e,AA);return e.toString()}function _A(e,t){if(e<0)return-_A(-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 WA(e){const t=_A(e,3);if(Math.floor(Math.abs(t)).toString().length>12)throw DA(e,TA);const n=t.toString();return n.includes(".")?n:`${n}.0`}const NA="String";function OA(e){const t=(n=e).description||n.toString().slice(7,-1);var n;if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(t))throw DA(t,CA);return t}function FA(e){switch(typeof e){case"number":if(!Bw(e))throw DA(e,SA);return Number.isInteger(e)?RA(e):WA(e);case"string":return function(e){if(xA.test(e))throw DA(e,NA);return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}(e);case"symbol":return OA(e);case"boolean":return function(e){if("boolean"!=typeof e)throw DA(e,PA);return e?"?1":"?0"}(e);case"object":if(e instanceof Date)return function(e){return`@${RA(e.getTime()/1e3)}`}(e);if(e instanceof Uint8Array)return IA(e);if(e instanceof wA)return OA(e);default:throw DA(e,SA)}}function jA(e){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(e))throw DA(e,LA);return e}function zA(e){return null==e?"":Object.entries(e).map((([e,t])=>!0===t?`;${jA(e)}`:`;${jA(e)}=${FA(t)}`)).join("")}function $A(e){return e instanceof bA?`${FA(e.value)}${zA(e.params)}`:FA(e)}function HA(e,t={whitespace:!0}){if("object"!=typeof e)throw DA(e,kA);const n=e instanceof Map?e.entries():Object.entries(e),i=null!=t&&t.whitespace?" ":"";return Array.from(n).map((([e,t])=>{t instanceof bA==!1&&(t=new bA(t));let n=jA(e);var i;return!0===t.value?n+=zA(t.params):(n+="=",Array.isArray(t.value)?n+=`(${(i=t).value.map($A).join(" ")})${zA(i.params)}`:n+=$A(t)),n})).join(`,${i}`)}const UA=e=>"ot"===e||"sf"===e||"st"===e,BA=e=>"number"==typeof e?Bw(e):null!=e&&""!==e&&!1!==e;const GA=e=>Math.round(e),XA=e=>100*GA(e/100),YA={br:GA,d:GA,bl:XA,dl:XA,mtp:XA,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:XA,tb:GA};function KA(e,t={}){return e?function(e,t){return HA(e,t)}(function(e,t){const n={};if(null==e||"object"!=typeof e)return n;const i=Object.keys(e).sort(),a=Uw({},YA,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||BA(o)&&(UA(i)&&"string"==typeof o&&(o=new wA(o)),n[i]=o)})),n}(e,t),Uw({whitespace:!1},t)):""}function VA(e,t,n){return Uw(e,function(e,t={}){if(!e)return{};const n=Object.entries(e),i=Object.entries(yA).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])||vA.REQUEST;return null!=e[o]||(e[o]={}),e[o][a]=r,e}),{});return Object.entries(a).reduce(((e,[n,i])=>(e[n]=KA(i,t),e)),{})}(t,n))}const qA="CMCD";const JA=/CMCD=[^&#]+/;function QA(e,t,n){const i=function(e,t={}){if(!e)return"";const n=KA(e,t);return`${qA}=${encodeURIComponent(n)}`}(t,n);if(!i)return e;if(JA.test(e))return e.replace(JA,i);const a=e.includes("?")?"&":"?";return`${e}${a}${i}`}function ZA(e,t,n,i){e&&Object.keys(t).forEach((a=>{const r=e.filter((e=>e.groupId===a)).map((e=>{const r=Uw({},e);return r.details=void 0,r.attrs=new ik(r.attrs),r.url=r.attrs.URI=ex(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 ex(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 d=new self.URL(e);return a&&!s&&(d.host=a),r&&Object.keys(r).sort().forEach((e=>{e&&d.searchParams.set(e,r[e])})),d.href}const tx=/^age:\s*[\d.]+\s*$/im;class nx{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 ok,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&&Bw(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 d={url:t.responseURL,data:a,code:i};this.callbacks.onSuccess(d,n,e,t)}else{const r=a.loadPolicy.errorRetry;XS(r,n.retry,!1,{url:e.url,data:void 0,code:i})?this.retry(r):(ek.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(XS(e,this.stats.retry,!0))this.retry(e);else{var t;ek.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=BS(e,n.retry),n.retry++,ek.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&&tx.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 ix=/(\d+)-(\d+)\/(\d+)/;class ax{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||rx,this.controller=new self.AbortController,this.stats=new ok}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(Uw({},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:d,maxLoadTimeMs:u}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,a),self.clearTimeout(this.requestTimeout),t.timeout=d&&Bw(d)?d:u,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=u,this.requestTimeout=self.setTimeout((()=>{this.abortInternal(),n.onTimeout(i,e,this.response)}),u-(s-i.loading.start)),!a.ok){const{status:e,statusText:t}=a;throw new ox(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=ix.exec(e);if(t)return parseInt(t[2])-parseInt(t[1])+1}(t);if(Bw(e))return e}const n=e.get("Content-Length");if(n)return parseInt(n)}(a.headers)||i.total,r&&Bw(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 d=a[s];d&&(i.loaded=i.total=d);const u={url:o.url,data:a,code:o.status};r&&!Bw(t.highWaterMark)&&r(i,e,a,o),n.onSuccess(u,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 nE,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 d=o.value,u=d.length;return t.loaded+=u,u<i||r.dataLength?(r.push(d),r.dataLength>=i&&a(t,n,r.flush(),e)):a(t,n,d,e),s()})).catch((()=>Promise.reject()));return s()}}function rx(e,t){return new self.Request(e.url,t)}class ox extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const sx=/\s/,dx={newCue(e,t,n,i){const a=[];let r,o,s,d,u;const l=self.VTTCue||self.TextTrackCue;for(let c=0;c<i.rows.length;c++)if(r=i.rows[c],s=!0,d=0,u="",!r.isEmpty()){var h;for(let e=0;e<r.chars.length;e++)sx.test(r.chars[e].uchar)&&s?d++:(u+=r.chars[e].uchar,s=!1);r.cueStartTime=t,t===n&&(n+=1e-4),d>=16?d--:d++;const i=GT(u.trim()),m=qT(t,n,i);null!=e&&null!=(h=e.cues)&&h.getCueById(m)||(o=new l(t,n,i),o.id=m,o.line=c+1,o.align="left",o.position=10+Math.min(80,10*Math.floor(8*d/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=>cS(e,t)))),a}},ux=zw(zw({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:nx,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,d=r-o.loading.start,u=n.minAutoLevel;if(o.aborted||o.loaded&&o.loaded===o.total||e.level<=u)return this.clearTimer(),void(this._nextAutoLevel=-1);if(!i||a.paused||!a.playbackRate||!a.readyState)return;const l=n.mainForwardBufferInfo;if(null===l)return;const h=this.bwEstimator.getEstimateTTFB(),c=Math.abs(a.playbackRate);if(d<=Math.max(h,s/(2*c)*1e3))return;const m=l.len/c,f=o.loading.first?o.loading.first-o.loading.start:-1,g=o.loaded&&f>-1,p=this.getBwEstimate(),v=n.levels,y=v[e.level],b=o.total||Math.max(o.loaded,Math.round(s*y.averageBitrate/8));let w=g?d-f:d;w<1&&g&&(w=Math.min(d,8*o.loaded/p));const k=g?1e3*o.loaded/w:0,M=k?(b-o.loaded)/k:8*b/p+h/1e3;if(M<=m)return;const S=k?8*k:p;let P,E=Number.POSITIVE_INFINITY;for(P=e.level-1;P>u;P--){const e=v[P].maxBitrate;if(E=this.getTimeToLoadFrag(h/1e3,S,s*e,!v[P].details),E<m)break}if(E>=M)return;if(E>10*s)return;n.nextLoadLevel=n.nextAutoLevel=P,g?this.bwEstimator.sample(d-Math.min(h,f),o.loaded):this.bwEstimator.sampleTTFB(d);const T=v[P].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>T&&this.resetEstimator(T),this.clearTimer(),ek.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: ${M.toFixed(3)} s\n Estimated load time for down switch fragment: ${E.toFixed(3)} s\n TTFB estimate: ${0|f} ms\n Current BW estimate: ${Bw(p)?0|p:"Unknown"} bps\n New BW estimate: ${0|this.getBwEstimate()} bps\n Switching to level ${P} @ ${0|T} bps`),n.trigger(Yw.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:o})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(ek.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 oP(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Yw.FRAG_LOADING,this.onFragLoading,this),e.on(Yw.FRAG_LOADED,this.onFragLoaded,this),e.on(Yw.FRAG_BUFFERED,this.onFragBuffered,this),e.on(Yw.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(Yw.LEVEL_LOADED,this.onLevelLoaded,this),e.on(Yw.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(Yw.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(Yw.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Yw.FRAG_LOADING,this.onFragLoading,this),e.off(Yw.FRAG_LOADED,this.onFragLoaded,this),e.off(Yw.FRAG_BUFFERED,this.onFragBuffered,this),e.off(Yw.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(Yw.LEVEL_LOADED,this.onLevelLoaded,this),e.off(Yw.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(Yw.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(Yw.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 Vw.BUFFER_ADD_CODEC_ERROR:case Vw.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case Vw.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;Bw(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===rS&&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(Yw.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!==rS||"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 ek.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(),d=this.getStarvationDelay();let u=a.abrBandWidthFactor,l=a.abrBandWidthUpFactor;if(d){const e=this.findBestLevel(s,r,i,d,0,u,l);if(e>=0)return e}let h=o?Math.min(o,a.maxStarvationDelay):a.maxStarvationDelay;if(!d){const e=this.bitrateTestDelay;if(e){h=(o?Math.min(o,a.maxLoadingDelay):a.maxLoadingDelay)-e,ek.info(`[abr] bitrate test took ${Math.round(1e3*e)}ms, set first fragment max fetchDuration to ${Math.round(1e3*h)} ms`),u=l=1}}const c=this.findBestLevel(s,r,i,d,h,u,l);if(ek.info(`[abr] ${d?"rebuffering expected":"buffer is empty"}, optimal quality level ${c}`),c>-1)return c;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 d=i+a,u=this.lastLoadedFragLevel,l=-1===u?this.hls.firstLevel:u,{fragCurrent:h,partCurrent:c}=this,{levels:m,allAudioTracks:f,loadLevel:g,config:p}=this.hls;if(1===m.length)return 0;const v=m[l],y=!(null==v||null==(s=v.details)||!s.live),b=-1===g||-1===u;let w,k="SDR",M=(null==v?void 0:v.frameRate)||0;const{audioPreference:S,videoPreference:P}=p,E=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(b){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,E,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,d=o&&2===parseInt(o);let u=!0,l=!1,h=1/0,c=1/0,m=1/0,f=0,g=[];const{preferHDR:p,allowedVideoRanges:v}=hP(t,a);for(let t=r.length;t--;){const n=e[r[t]];u=n.channels[2]>0,h=Math.min(h,n.minHeight),c=Math.min(c,n.minFramerate),m=Math.min(m,n.minBitrate);const i=v.filter((e=>n.videoRanges[e]>0));i.length>0&&(l=!0,g=i)}h=Bw(h)?h:0,c=Bw(c)?c:0;const y=Math.max(1080,h),b=Math.max(30,c);return m=Bw(m)?m:n,n=Math.max(m,n),l||(t=void 0,g=[]),{codecSet:r.reduce(((t,i)=>{const a=e[i];if(i===t)return t;if(a.minBitrate>n)return cP(i,`min bitrate of ${a.minBitrate} > current estimate of ${n}`),t;if(!a.hasDefaultAudio)return cP(i,"no renditions with default or auto-select sound found"),t;if(s&&i.indexOf(s.substring(0,4))%5!=0)return cP(i,`audio codec preference "${s}" not found`),t;if(o&&!d){if(!a.channels[o])return cP(i,`no renditions with ${o} channel sound found (channels options: ${Object.keys(a.channels)})`),t}else if((!s||d)&&u&&0===a.channels[2])return cP(i,"no renditions with stereo sound found"),t;return a.minHeight>y?(cP(i,`min resolution of ${a.minHeight} > maximum of ${y}`),t):a.minFramerate>b?(cP(i,`min framerate of ${a.minFramerate} > maximum of ${b}`),t):g.some((e=>a.videoRanges[e]>0))?a.maxScore<f?(cP(i,`max score of ${a.maxScore} < selected max of ${f}`),t):t&&(OM(i)>=OM(t)||a.fragmentError>e[t].fragmentError)?t:(f=a.maxScore,i):(cP(i,`no variants with VIDEO-RANGE of ${JSON.stringify(g)} found`),t)}),void 0),videoRanges:g,preferHDR:p,minFramerate:c,minBitrate:m}}(i,k,e,S,P),{codecSet:r,videoRanges:o,minFramerate:s,minBitrate:d,preferHDR:u}=a;w=r,k=u?o[o.length-1]:o[0],M=s,e=Math.max(e,d),ek.log(`[abr] picked start tier ${JSON.stringify(a)}`)}else w=null==v?void 0:v.codecSet,k=null==v?void 0:v.videoRange;const T=c?c.duration:h?h.duration:0,A=this.bwEstimator.getEstimateTTFB()/1e3,x=[];for(let s=n;s>=t;s--){var C;const t=m[s],h=s>l;if(!t)continue;if(p.useMediaCapabilities&&!t.supportedResult&&!t.supportedPromise){const n=navigator.mediaCapabilities;"function"==typeof(null==n?void 0:n.decodingInfo)&&uP(t,E,k,M,e,S)?(t.supportedPromise=lP(t,E,n),t.supportedPromise.then((e=>{if(!this.hls)return;t.supportedResult=e;const n=this.hls.levels,i=n.indexOf(t);e.error?ek.warn(`[abr] MediaCapabilities decodingInfo error: "${e.error}" for level ${i} ${JSON.stringify(e)}`):e.supported||(ek.warn(`[abr] Unsupported MediaCapabilities decodingInfo result for level ${i} ${JSON.stringify(e)}`),i>-1&&n.length>1&&(ek.log(`[abr] Removing unsupported level ${i}`),this.hls.removeLevel(i)))}))):t.supportedResult=sP}if(w&&t.codecSet!==w||k&&t.videoRange!==k||h&&M>t.frameRate||!h&&M>0&&M<t.frameRate||t.supportedResult&&(null==(C=t.supportedResult.decodingInfoResults)||!C[0].smooth)){x.push(s);continue}const f=t.details,P=(c?null==f?void 0:f.partTarget:null==f?void 0:f.averagetargetduration)||T;let L;L=h?o*e:r*e;const D=T&&i>=2*T&&0===a?m[s].averageBitrate:m[s].maxBitrate,I=this.getTimeToLoadFrag(A,L,D*P,void 0===f);if(L>=D&&(s===u||0===t.loadError&&0===t.fragmentError)&&(I<=A||!Bw(I)||y&&!this.bitrateTestDelay||I<d)){const e=this.forcedAutoLevel;return s===g||-1!==e&&e===g||(x.length&&ek.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}`),ek.info(`[abr] switch candidate:${l}->${s} adjustedbw(${Math.round(L)})-bitrate=${Math.round(L-D)} ttfb:${A.toFixed(1)} avgDuration:${P.toFixed(1)} maxFetchDuration:${d.toFixed(1)} fetchDuration:${I.toFixed(1)} firstSelection:${b} codecSet:${w} videoRange:${k} hls.loadLevel:${g}`)),b&&(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(Yw.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&&ek.error(`Media element src was set while attaching MediaSource (${t} > ${e})`)},this.hls=e;const t="[buffer-controller]";var n;this.appendSource=(n=DM(e.config.preferManagedMediaSource),"undefined"!=typeof self&&n===self.ManagedMediaSource),this.log=ek.log.bind(ek,t),this.warn=ek.warn.bind(ek,t),this.error=ek.error.bind(ek,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(Yw.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(Yw.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Yw.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Yw.BUFFER_RESET,this.onBufferReset,this),e.on(Yw.BUFFER_APPENDING,this.onBufferAppending,this),e.on(Yw.BUFFER_CODECS,this.onBufferCodecs,this),e.on(Yw.BUFFER_EOS,this.onBufferEos,this),e.on(Yw.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(Yw.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(Yw.FRAG_PARSED,this.onFragParsed,this),e.on(Yw.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:e}=this;e.off(Yw.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(Yw.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Yw.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Yw.BUFFER_RESET,this.onBufferReset,this),e.off(Yw.BUFFER_APPENDING,this.onBufferAppending,this),e.off(Yw.BUFFER_CODECS,this.onBufferCodecs,this),e.off(Yw.BUFFER_EOS,this.onBufferEos,this),e.off(Yw.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(Yw.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(Yw.FRAG_PARSED,this.onFragParsed,this),e.off(Yw.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new fT(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=DM(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,pT(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&&pT(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(Yw.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:d}=t[e],u=$M(n.codec,n.levelCodec),l=null==u?void 0:u.replace(gT,"$1");let h=$M(r,o);const c=null==(i=h)?void 0:i.replace(gT,"$1");if(h&&l!==c){"audio"===e.slice(0,5)&&(h=zM(h,this.appendSource));const t=`${s};codecs=${h}`;this.appendChangeType(e,t),this.log(`switching codec ${u} to ${h}`),this.tracks[e]={buffer:n.buffer,codec:r,container:s,levelCodec:o,metadata:d,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:d,chunkMeta:u}=t,l=u.buffering[o],h=self.performance.now();l.start=h;const c=s.stats.buffering,m=d?d.stats.buffering:null;0===c.start&&(c.start=h),m&&0===m.start&&(m.start=h);const f=a.audio;let g=!1;"audio"===o&&"audio/mpeg"===(null==f?void 0:f.container)&&(g=!this.lastMpegAudioChunk||1===u.id||this.lastMpegAudioChunk.sn!==u.sn,this.lastMpegAudioChunk=u);const p=s.start,v={execute:()=>{if(l.executeStart=self.performance.now(),g){const e=this.sourceBuffer[o];if(e){const t=p-e.timestampOffset;Math.abs(t)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${p} (delta: ${t}) sn: ${s.sn})`),e.timestampOffset=p)}}this.appendExecutor(r,o)},onStart:()=>{},onComplete:()=>{const e=self.performance.now();l.executeEnd=l.end=e,0===c.first&&(c.first=e),m&&0===m.first&&(m.first=e);const{sourceBuffer:t}=this,n={};for(const e in t)n[e]=TP.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(Yw.BUFFER_APPENDED,{type:o,frag:s,part:d,chunkMeta:u,parent:s.type,timeRanges:n})},onError:e=>{const t={type:Kw.MEDIA_ERROR,parent:s.type,details:Vw.BUFFER_APPEND_ERROR,sourceBufferName:o,frag:s,part:d,chunkMeta:u,error:e,err:e,fatal:!1};if(e.code===DOMException.QUOTA_EXCEEDED_ERR)t.details=Vw.BUFFER_FULL_ERROR;else{const e=++this.appendErrors[o];t.details=Vw.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(Yw.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(Yw.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[uk]?a.push("audiovideo"):(r[sk]&&a.push("audio"),r[dk]&&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(Yw.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(Bw(o)&&o>0){const e=Math.max(o,r),t=Math.floor(a/r)*r-e;this.flushBackBuffer(a,r,t)}if(Bw(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=TP.getBuffered(o);if(a.length>0&&n>a.start(0)){if(this.hls.trigger(Yw.BACK_BUFFER_REACHED,{bufferEnd:n}),null!=i&&i.live)this.hls.trigger(Yw.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(Yw.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=TP.getBuffered(r),o=i.length;if(o<2)return;const s=i.start(o-1),d=i.end(o-1);if(n>s||e>=s&&e<=d)return;if(r.ended&&e-d<2*t)return void this.log(`Cannot flush ${a} front buffer while SourceBuffer is in ended state`);this.hls.trigger(Yw.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=Bw(i.duration)?i.duration:0;e.live&&t.config.liveDurationInfinity?(i.duration=1/0,this.updateSeekableRange(e)):(a>o&&a>r||!Bw(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(Yw.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(Yw.ERROR,{type:Kw.MEDIA_ERROR,details:Vw.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=zM(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(Yw.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(Yw.ERROR,{type:Kw.MEDIA_ERROR,details:Vw.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(Yw.ERROR,{type:Kw.MEDIA_ERROR,details:Vw.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 d=Bw(i.duration)?i.duration:1/0,u=Bw(a.duration)?a.duration:1/0,l=Math.max(0,t),h=Math.min(n,d,u);h>l&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${l},${h}] from the ${e} SourceBuffer`),s.remove(l,h)):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:hA,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=ek.log.bind(ek,"[info]:"),this.warn=ek.warn.bind(ek,"[warning]:"),this.error=ek.error.bind(ek,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(Yw.ERROR,this.onError,this),e.on(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Yw.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(Yw.ERROR,this.onError,this),e.off(Yw.ERROR,this.onErrorOut,this),e.off(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Yw.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)===rS?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 Vw.FRAG_LOAD_ERROR:case Vw.FRAG_LOAD_TIMEOUT:case Vw.KEY_LOAD_ERROR:case Vw.KEY_LOAD_TIMEOUT:return void(t.errorAction=this.getFragRetryOrSwitchAction(t));case Vw.FRAG_PARSING_ERROR:if(null!=(n=t.frag)&&n.gap)return void(t.errorAction={action:JS,flags:tP});case Vw.FRAG_GAP:case Vw.FRAG_DECRYPT_ERROR:return t.errorAction=this.getFragRetryOrSwitchAction(t),void(t.errorAction.action=QS);case Vw.LEVEL_EMPTY_ERROR:case Vw.LEVEL_PARSING_ERROR:{var o,s;const e=t.parent===rS?t.level:a.loadLevel;t.details===Vw.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 Vw.LEVEL_LOAD_ERROR:case Vw.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==r?void 0:r.level)&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.level)));case Vw.AUDIO_TRACK_LOAD_ERROR:case Vw.AUDIO_TRACK_LOAD_TIMEOUT:case Vw.SUBTITLE_LOAD_ERROR:case Vw.SUBTITLE_TRACK_LOAD_TIMEOUT:if(r){const e=a.levels[a.loadLevel];if(e&&(r.type===iS&&e.hasAudioGroup(r.groupId)||r.type===aS&&e.hasSubtitleGroup(r.groupId)))return t.errorAction=this.getPlaylistRetryOrSwitchAction(t,a.loadLevel),t.errorAction.action=QS,void(t.errorAction.flags=nP)}return;case Vw.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const e=a.levels[a.loadLevel],n=null==e?void 0:e.attrs["HDCP-LEVEL"];n?t.errorAction={action:QS,flags:iP,hdcpLevel:n}:this.keySystemError(t)}return;case Vw.BUFFER_ADD_CODEC_ERROR:case Vw.REMUX_ALLOC_ERROR:case Vw.BUFFER_APPEND_ERROR:return void(t.errorAction=this.getLevelSwitchAction(t,null!=(i=t.level)?i:a.loadLevel));case Vw.INTERNAL_EXCEPTION:case Vw.BUFFER_APPENDING_ERROR:case Vw.BUFFER_FULL_ERROR:case Vw.LEVEL_SWITCH_ERROR:case Vw.BUFFER_STALLED_ERROR:case Vw.BUFFER_SEEK_OVER_HOLE:case Vw.BUFFER_NUDGE_ON_STALL:return void(t.errorAction={action:JS,flags:tP})}t.type===Kw.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=US(this.hls.config.playlistLoadPolicy,e),i=this.playlistError++;if(XS(n,i,HS(e),e.response))return{action:eP,flags:tP,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=US(e.details.startsWith("key")?r:a,e),s=t.levels.reduce(((e,t)=>e+t.fragmentError),0);if(i){e.details!==Vw.FRAG_GAP&&i.fragmentError++;if(XS(o,s,HS(e),e.response))return{action:eP,flags:tP,retryConfig:o,retryCount:s}}const d=this.getLevelSwitchAction(e,n);return o&&(d.retryConfig=o,d.retryCount=s),d}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===Vw.BUFFER_APPEND_ERROR&&i.fragmentError++;let d=-1;const{levels:u,loadLevel:l,minAutoLevel:h,maxAutoLevel:c}=n;n.autoLevelEnabled||(n.loadLevel=-1);const m=null==(a=e.frag)?void 0:a.type,f=(m===oS&&t===Vw.FRAG_PARSING_ERROR||"audio"===e.sourceBufferName&&(t===Vw.BUFFER_ADD_CODEC_ERROR||t===Vw.BUFFER_APPEND_ERROR))&&u.some((({audioCodec:e})=>i.audioCodec!==e)),g="video"===e.sourceBufferName&&(t===Vw.BUFFER_ADD_CODEC_ERROR||t===Vw.BUFFER_APPEND_ERROR)&&u.some((({codecSet:e,audioCodec:t})=>i.codecSet!==e&&i.audioCodec===t)),{type:p,groupId:v}=null!=(r=e.context)?r:{};for(let n=u.length;n--;){const a=(n+l)%u.length;if(a!==l&&a>=h&&a<=c&&0===u[a].loadError){var o,s;const n=u[a];if(t===Vw.FRAG_GAP&&m===rS&&e.frag){const t=u[a].details;if(t){const n=KS(e.frag,t.fragments,e.frag.start);if(null!=n&&n.gap)continue}}else{if(p===iS&&n.hasAudioGroup(v)||p===aS&&n.hasSubtitleGroup(v))continue;if(m===oS&&null!=(o=i.audioGroups)&&o.some((e=>n.hasAudioGroup(e)))||m===sS&&null!=(s=i.subtitleGroups)&&s.some((e=>n.hasSubtitleGroup(e)))||f&&i.audioCodec===n.audioCodec||!f&&i.audioCodec!==n.audioCodec||g&&i.codecSet===n.codecSet)continue}d=a;break}}if(d>-1&&n.loadLevel!==d)return e.levelRetry=!0,this.playlistError=0,{action:QS,flags:tP,nextAutoLevel:d}}return{action:QS,flags:nP}}onErrorOut(e,t){var n;switch(null==(n=t.errorAction)?void 0:n.action){case JS:break;case QS:this.sendAlternateToPenaltyBox(t),t.errorAction.resolved||t.details===Vw.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 tP:this.switchLevel(e,r);break;case iP:a&&(t.maxHdcpLevel=ES[ES.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(Yw.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(Yw.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(Yw.FPS_DROP,{currentDropped:a,currentDecoded:r,totalDroppedFrames:n}),o>0&&a>s.config.fpsDroppedMonitoringThreshold*r){let e=s.currentLevel;ek.warn("drop FPS ratio greater than max allowed value for currentLevel: "+e),e>0&&(-1===s.autoLevelCapping||s.autoLevelCapping>=e)&&(e-=1,s.trigger(Yw.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:Dk,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:dx,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 tE{constructor(e,t,n){super(e,t,n,"[subtitle-stream-controller]",sS),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(Yw.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Yw.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Yw.LEVEL_LOADED,this.onLevelLoaded,this),e.on(Yw.ERROR,this.onError,this),e.on(Yw.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(Yw.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(Yw.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(Yw.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(Yw.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(Yw.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(Yw.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Yw.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Yw.LEVEL_LOADED,this.onLevelLoaded,this),e.off(Yw.ERROR,this.onError,this),e.off(Yw.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(Yw.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(Yw.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(Yw.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(Yw.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(Yw.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(e){this.stopLoad(),this.state=BP,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=BP,!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,sS)}}onFragBuffered(e,t){var n;this.loadedmetadata||t.frag.type!==rS||null!=(n=this.media)&&n.buffered.length&&(this.loadedmetadata=!0)}onError(e,t){const n=t.frag;(null==n?void 0:n.type)===sS&&(t.details===Vw.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==UP&&(this.state=BP))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){this.levels&&lT(this.levels,t)?this.levels=t.map((e=>new IS(e))):(this.tracksBuffered=[],this.levels=t.map((e=>{const t=new IS(e);return this.tracksBuffered[t.id]=[],t})),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,sS),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 d=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 u;if(s.details)d=this.alignPlaylists(r,s.details,null==(u=this.levelLastLoaded)?void 0:u.details),0===d&&t&&(d=t.start,FS(r,d));else r.hasProgramDateTime&&e.hasProgramDateTime?(IP(r,e),d=r.fragments[0].start):t&&(d=t.start,FS(r,d))}if(s.details=r,this.levelLastLoaded=s,o===i&&(this.startFragRequested||!this.mainDetails&&r.live||this.setStartPosition(this.mainDetails||r,d),this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===BP)){KS(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(Yw.ERROR,{type:Kw.MEDIA_ERROR,details:Vw.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:t}),e})).then((n=>{const i=performance.now();a.trigger(Yw.FRAG_DECRYPTED,{frag:t,payload:n,stats:{tstart:e,tdecrypt:i}})})).catch((e=>{this.warn(`${e.name}: ${e.message}`),this.state=BP}))}}doTick(){if(this.media){if(this.state===BP){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=TP.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],a,i.maxBufferHole),{end:o,len:s}=r,d=this.getFwdBufferInfo(this.media,rS),u=n.details;if(s>this.getMaxBufferLength(null==d?void 0:d.len)+u.levelTargetDuration)return;const l=u.fragments,h=l.length,c=u.edge;let m=null;const f=this.fragPrevious;if(o<c){const e=i.maxFragLookUpTolerance,t=o>c-e?0:e;m=KS(f,l,Math.max(l[0].start,o),t),!m&&f&&f.start<l[0].start&&(m=l[0])}else m=l[h-1];if(!m)return;if(m=this.mapToInitFragWhenRequired(m),"initSegment"!==m.sn){const e=l[m.sn-u.startSN-1];e&&e.cc===m.cc&&this.fragmentTracker.getState(e)===yP&&(m=e)}this.fragmentTracker.getState(m)===yP&&this.loadFragment(m,n,o)}}else this.state=BP}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 mT(this.tracksBuffered[this.currentTrackId]||[])}},subtitleTrackController:class extends aP{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=gS(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(Yw.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Yw.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Yw.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Yw.LEVEL_LOADING,this.onLevelLoading,this),e.on(Yw.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(Yw.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(Yw.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(Yw.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Yw.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Yw.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Yw.LEVEL_LOADING,this.onLevelLoading,this),e.off(Yw.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(Yw.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(Yw.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);gS(this.media.textTracks).forEach((e=>{mS(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=mP(t,e);if(n>-1)a=e[n];else{const e=mP(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(Yw.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||fP(a,e)))return i}if(e){for(let n=0;n<t.length;n++){const i=t[n];if(hT(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return n}for(let n=0;n<t.length;n++){const i=t[n];if(hT(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(cT(t[n],e))return n}}return-1}onError(e,t){!t.fatal&&t.context&&(t.context.type!==aS||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&&fP(e,n))return n;const i=mP(e,this.tracksInGroup);if(i>-1){const e=this.tracksInGroup[i];return this.setSubtitleTrack(i),e}if(n)return null;{const n=mP(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(Yw.SUBTITLE_TRACK_LOADING,{url:a,id:n,groupId:i,deliveryDirectives:e||null})}}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=gS(e.textTracks),n=this.currentTrack;let i;if(n&&(i=t.filter((e=>cT(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||!Bw(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(Yw.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:d,url:u}=i;this.hls.trigger(Yw.SUBTITLE_TRACK_SWITCH,{id:r,groupId:o,name:s,type:d,url:u});const l=this.switchParams(i.url,null==n?void 0:n.details,i.details);this.loadPlaylist(l)}},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(Yw.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(Yw.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Yw.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(Yw.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(Yw.FRAG_LOADING,this.onFragLoading,this),e.on(Yw.FRAG_LOADED,this.onFragLoaded,this),e.on(Yw.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(Yw.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(Yw.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(Yw.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(Yw.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(Yw.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(Yw.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Yw.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(Yw.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(Yw.FRAG_LOADING,this.onFragLoading,this),e.off(Yw.FRAG_LOADED,this.onFragLoaded,this),e.off(Yw.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(Yw.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(Yw.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(Yw.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(Yw.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 NT(this,"textTrack1"),t=new NT(this,"textTrack2"),n=new NT(this,"textTrack3"),i=new NT(this,"textTrack4");this.cea608Parser1=new RT(1,e,t),this.cea608Parser2=new RT(3,n,i)}}addCues(e,t,n,i,a){let r=!1;for(let e=a.length;e--;){const i=a[e],l=(o=i[0],s=i[1],d=t,u=n,Math.min(s,u)-Math.max(o,d));if(l>=0&&(i[0]=Math.min(i[0],t),i[1]=Math.max(i[1],n),r=!0,l/(n-t)>.5))return}var o,s,d,u;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(Yw.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(Yw.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(lA(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,mS(n[e]),hS(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(Yw.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=>{mS(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++)mS(t[e])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],i=n.some((e=>e.textCodec===QT));if(this.config.enableWebVTT||i&&this.config.enableIMSC1){if(lT(this.tracks,n))return void(this.tracks=n);if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const e=this.media,t=e?gS(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]&&lA(t[i],e)){n=t[i],t[i]=null;break}n&&(i=n)}if(i)mS(i);else{const t=uA(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&&ek.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(Yw.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===rS){var n,i;const{cea608Parser1:e,cea608Parser2:a,lastSn:r}=this,{cc:o,sn:s}=t.frag,d=null!=(n=null==(i=t.part)?void 0:i.index)?n:-1;e&&a&&(s!==r+1||s===r&&d!==this.lastPartIndex+1||o!==this.lastCc)&&(e.reset(),a.reset()),this.lastCc=o,this.lastSn=s,this.lastPartIndex=d}}onFragLoaded(e,t){const{frag:n,payload:i}=t;if(n.type===sS)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===QT?this._parseIMSC1(n,i):this._parseVTTs(t)}}else this.hls.trigger(Yw.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;nA(t,this.initPTS[e.cc],(t=>{this._appendCues(t,e.level),n.trigger(Yw.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(t=>{ek.log(`Failed to parse IMSC1: ${t}`),n.trigger(Yw.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;JT(null!=(t=n.initSegment)&&t.data?pM(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(Yw.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),ek.log(`Failed to parse VTT cue: ${t}`),a&&o>n.cc||s.trigger(Yw.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:t})}))}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||nA(t,this.initPTS[e.cc],(()=>{n.textCodec=QT,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=>cS(n,e)))}else{const i=this.tracks[t];if(!i)return;const a=i.default?"default":"subtitles"+t;n.trigger(Yw.CUES_PARSED,{type:"subtitles",cues:e,track:a})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===sS&&this.onFragLoaded(Yw.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!==rS||"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=>fS(e[i],t,n)))}if(this.config.renderTextTracksNatively&&0===t&&void 0!==i){const{textTracks:e}=this;Object.keys(e).forEach((n=>fS(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 tE{constructor(e,t,n){super(e,t,n,"[audio-stream-controller]",oS),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(Yw.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Yw.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Yw.LEVEL_LOADED,this.onLevelLoaded,this),e.on(Yw.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(Yw.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(Yw.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(Yw.ERROR,this.onError,this),e.on(Yw.BUFFER_RESET,this.onBufferReset,this),e.on(Yw.BUFFER_CREATED,this.onBufferCreated,this),e.on(Yw.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(Yw.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(Yw.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(Yw.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(Yw.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Yw.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Yw.LEVEL_LOADED,this.onLevelLoaded,this),e.off(Yw.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(Yw.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(Yw.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(Yw.ERROR,this.onError,this),e.off(Yw.BUFFER_RESET,this.onBufferReset,this),e.off(Yw.BUFFER_CREATED,this.onBufferCreated,this),e.off(Yw.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(Yw.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(Yw.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(Yw.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===ZP&&this.tick()}}startLoad(e){if(!this.levels)return this.startPosition=e,void(this.state=UP);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=BP):(this.loadedmetadata=!1,this.state=KP),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case BP:this.doTickIdle();break;case KP:{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=ZP}break}case YP:{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=BP}break}case ZP:{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=XP;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=TP.bufferInfo(this.mediaBuffer,e,this.config.maxBufferHole);VS(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=BP}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=BP)}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=KP);const s=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&s&&(this.bufferFlushed=!1,this.afterBufferFlushed(s,sk,oS));const d=this.getFwdBufferInfo(s,oS);if(null===d)return;const{bufferedTrack:u,switchingTrack:l}=this;if(!l&&this._streamEnded(d,o))return e.trigger(Yw.BUFFER_EOS,{type:"audio"}),void(this.state=JP);const h=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,rS),c=d.len,m=this.getMaxBufferLength(null==h?void 0:h.len),f=o.fragments,g=f[0].start;let p=this.flushing?this.getLoadPosition():d.end;if(l&&n){const e=this.getLoadPosition();u&&!hT(l.attrs,u.attrs)&&(p=e),o.PTSKnown&&e<g&&(d.end>g||d.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=g+.05)}if(c>=m&&!l&&p<f[f.length-1].start)return;let v=this.getNextFragment(p,o),y=!1;if(v&&this.isLoopLoading(v,p)&&(y=!!v.gap,v=this.getNextFragmentLoopLoading(v,o,d,rS,m)),!v)return void(this.bufferFlushed=!0);const b=h&&v.start>h.end+o.targetduration;if(b||(null==h||!h.len)&&d.len){const e=this.getAppendedFrag(v.start,rS);if(null===e)return;if(y||(y=!!e.gap||!!b&&0===h.len),b&&!y||y&&d.nextStart&&d.nextStart<e.end)return}this.loadFragment(v,r,p)}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 IS(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=BP,this.flushAudioIfNeeded(t)):(this.switchingTrack=null,this.bufferedTrack=t,this.state=UP),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(Yw.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 d;if(!o.details&&a.hasProgramDateTime&&e.hasProgramDateTime)IP(a,e),s=a.fragments[0].start;else s=this.alignPlaylists(a,o.details,null==(d=this.levelLastLoaded)?void 0:d.details)}o.details=a,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&a.live||this.setStartPosition(this.mainDetails||a,s),this.state!==KP||this.waitForCdnTuneIn(a)||(this.state=BP),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 d=s[o];if(!d)return void this.warn("Audio track is undefined on fragment load progress");const u=d.details;if(!u)return this.warn("Audio track details undefined on fragment load progress"),void this.removeUnbufferedFrags(n.start);const l=r.defaultAudioCodec||d.audioCodec||"mp4a.40.2";let h=this.transmuxer;h||(h=this.transmuxer=new uT(this.hls,oS,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const c=this.initPTS[n.cc],m=null==(t=n.initSegment)?void 0:t.data;if(void 0!==c){const e=!1,t=i?i.index:-1,r=-1!==t,o=new AP(n.level,n.sn,n.stats.chunkCount,a.byteLength,t,r);h.push(a,m,l,"",n,i,u.totalduration,e,o,c)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${u.startSN} ,${u.endSN}],track ${o}`);const{cache:e}=this.waitingData=this.waitingData||{frag:n,part:i,cache:new nE,complete:!1};e.push(new Uint8Array(a)),this.waitingVideoCC=this.videoTrackCC,this.state=ZP}}_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===oS)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(Yw.AUDIO_TRACK_SWITCHED,zw({},e)))}this.fragBufferedComplete(n,i)}else if(!this.loadedmetadata&&n.type===rS){const e=this.videoBuffer||this.media;if(e){TP.getBuffered(e).length&&(this.loadedmetadata=!0)}}}onError(e,t){var n;if(t.fatal)this.state=QP;else switch(t.details){case Vw.FRAG_GAP:case Vw.FRAG_PARSING_ERROR:case Vw.FRAG_DECRYPT_ERROR:case Vw.FRAG_LOAD_ERROR:case Vw.FRAG_LOAD_TIMEOUT:case Vw.KEY_LOAD_ERROR:case Vw.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(oS,t);break;case Vw.AUDIO_TRACK_LOAD_ERROR:case Vw.AUDIO_TRACK_LOAD_TIMEOUT:case Vw.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==KP||(null==(n=t.context)?void 0:n.type)!==iS||(this.state=BP);break;case Vw.BUFFER_APPEND_ERROR:case Vw.BUFFER_FULL_ERROR:if(!t.parent||"audio"!==t.parent)return;if(t.details===Vw.BUFFER_APPEND_ERROR)return void this.resetLoadingState();this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case Vw.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}onBufferFlushing(e,{type:t}){t!==dk&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==dk){this.flushing=!1,this.bufferFlushed=!0,this.state===JP&&(this.state=BP);const e=this.mediaBuffer||this.media;e&&(this.afterBufferFlushed(e,t,oS),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:d,level:u}=o,{details:l}=u,{audio:h,text:c,id3:m,initSegment:f}=a;if(!this.fragContextChanged(s)&&l){if(this.state=VP,this.switchingTrack&&h&&this.completeAudioSwitch(this.switchingTrack),null!=f&&f.tracks){const e=s.initSegment||s;this._bufferInitSegment(u,f.tracks,e,r),i.trigger(Yw.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:n,tracks:f.tracks})}if(h){const{startPTS:e,endPTS:t,startDTS:n,endDTS:i}=h;d&&(d.elementaryStreams[sk]={startPTS:e,endPTS:t,startDTS:n,endDTS:i}),s.setElementaryStreamInfo(sk,e,t,n,i),this.bufferFragmentData(h,s,d,r)}if(null!=m&&null!=(t=m.samples)&&t.length){const e=Uw({id:n,frag:s,details:l},m);i.trigger(Yw.FRAG_PARSING_METADATA,e)}if(c){const e=Uw({id:n,frag:s,details:l},c);i.trigger(Yw.FRAG_PARSING_USERDATA,e)}}else this.fragmentTracker.removeFragment(s)}_bufferInitSegment(e,t,n,i){if(this.state!==VP)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(Yw.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(Yw.BUFFER_APPENDING,e)}this.tickImmediate()}loadFragment(e,t,n){const i=this.fragmentTracker.getState(e);var a;if(this.fragCurrent=e,this.switchingTrack||i===yP||i===wP)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=ZP;const n=this.mainDetails;n&&n.fragments[0].start!==t.details.fragments[0].start&&IP(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(Yw.AUDIO_TRACK_SWITCHED,zw({},e))}},audioTrackController:class extends aP{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(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Yw.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Yw.LEVEL_LOADING,this.onLevelLoading,this),e.on(Yw.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(Yw.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(Yw.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Yw.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Yw.LEVEL_LOADING,this.onLevelLoading,this),e.off(Yw.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(Yw.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(Yw.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=mP(t,e,gP);if(n>-1)a=e[n];else{const e=mP(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(Yw.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(Yw.ERROR,{type:Kw.MEDIA_ERROR,details:Vw.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!==iS||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&&fP(e,i,gP))return i;const a=mP(e,this.tracksInGroup,gP);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,d=r.frameRate,u=r.codecSet.substring(0,4),l=pP(t,i,(t=>{if(t.videoRange!==s||t.frameRate!==d||t.codecSet.substring(0,4)!==u)return!1;const i=t.audioGroups,r=n.filter((e=>!i||-1!==i.indexOf(e.groupId)));return mP(e,r,a)>-1}));return l>-1?l:pP(t,i,(t=>{const i=t.audioGroups,r=n.filter((e=>!i||-1!==i.indexOf(e.groupId)));return mP(e,r,a)>-1}))}(e,t.levels,n,i,gP);if(-1===a)return null;t.nextLoadLevel=a}if(e.channels||e.audioCodec){const t=mP(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(Yw.AUDIO_TRACK_SWITCHING,zw({},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||fP(e,i,gP)))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(fP({name:n,lang:i,assocLang:a,characteristics:r,audioCodec:o,channels:s},t[e],gP))return e}for(let n=0;n<t.length;n++){const i=t[n];if(hT(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return n}for(let n=0;n<t.length;n++){const i=t[n];if(hT(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(Yw.AUDIO_TRACK_LOADING,{url:a,id:n,groupId:i,deliveryDirectives:e||null})}}},emeController:mA,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:gA.MANIFEST,su:!this.initialized})}catch(e){ek.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!==gA.VIDEO&&i!==gA.AUDIO&&i!=gA.MUXED||(a.br=n.bitrate/1e3,a.tb=this.getTopBandwidth(i)/1e3,a.bl=this.getBufferLength(i)),this.apply(e,a)}catch(e){ek.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(Yw.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Yw.MEDIA_DETACHED,this.onMediaDetached,this),e.on(Yw.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(Yw.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Yw.MEDIA_DETACHED,this.onMediaDetached,this),e.off(Yw.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:pA.HLS,sid:this.sid,cid:this.cid,pr:null==(e=this.media)?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){Uw(t,this.createData());const n=t.ot===gA.INIT||t.ot===gA.VIDEO||t.ot===gA.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={}),VA(e.headers,t)):e.url=QA(e.url,t)}getObjectType(e){const{type:t}=e;return"subtitle"===t?gA.TIMED_TEXT:"initSegment"===e.sn?gA.INIT:"audio"===t?gA.AUDIO:"main"===t?this.hls.audioTracks.length?gA.VIDEO:gA.MUXED:void 0}getTopBandwidth(e){let t,n=0;const i=this.hls;if(e===gA.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===gA.AUDIO?this.audioBuffer:this.videoBuffer;if(!n||!t)return NaN;return 1e3*TP.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=ek.log.bind(ek,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Yw.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(Yw.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Yw.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Yw.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(Yw.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Yw.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)===QS&&n.flags===nP){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||ek.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,$S(t),this.hls.trigger(Yw.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===iS&&i[n].hasAudioGroup(e)||t===aS&&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 ik(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 d=ex(e.uri,t["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",o),u=new IS({attrs:t,audioCodec:e.audioCodec,bitrate:e.bitrate,height:e.height,name:e.name,url:d,videoCodec:e.videoCodec,width:e.width});if(e.audioGroups)for(let t=1;t<e.audioGroups.length;t++)u.addGroupId("audio",`${e.audioGroups[t]}_clone_${a}`);if(e.subtitleGroups)for(let t=1;t<e.subtitleGroups.length;t++)u.addGroupId("text",`${e.subtitleGroups[t]}_clone_${a}`);return u}));t.push(...s),ZA(this.audioTracks,n,o,a),ZA(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},d={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":d}=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 u={steeringManifest:r,url:i.toString()};this.hls.trigger(Yw.STEERING_MANIFEST_LOADED,u),d&&this.updatePathwayPriority(d)},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,d)}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 lx(e){return e&&"object"==typeof e?Array.isArray(e)?e.map(lx):Object.keys(e).reduce(((t,n)=>(t[n]=lx(e[n]),t)),{}):e}function hx(e){const t=e.loader;if(t!==ax&&t!==nx)ek.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=ax,e.progressive=!0,e.enableSoftwareAES=!0,ek.log("[config]: Progressive streaming enabled, using FetchLoader"))}}let cx;class mx extends aP{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(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Yw.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(Yw.LEVEL_LOADED,this.onLevelLoaded,this),e.on(Yw.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(Yw.FRAG_BUFFERED,this.onFragBuffered,this),e.on(Yw.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Yw.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(Yw.LEVEL_LOADED,this.onLevelLoaded,this),e.off(Yw.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(Yw.FRAG_BUFFERED,this.onFragBuffered,this),e.off(Yw.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,d=!1;t.levels.forEach((e=>{var t,u;const l=e.attrs;let{audioCodec:h,videoCodec:c}=e;-1!==(null==(t=h)?void 0:t.indexOf("mp4a.40.34"))&&(cx||(cx=/chrome|firefox/i.test(navigator.userAgent)),cx&&(e.audioCodec=h=void 0)),h&&(e.audioCodec=h=zM(h,n)),0===(null==(u=c)?void 0:u.indexOf("avc1"))&&(c=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(",")}(c));const{width:m,height:f,unknownCodecs:g}=e;if(o||(o=!(!m||!f)),s||(s=!!c),d||(d=!!h),null!=g&&g.length||h&&!RM(h,"audio",n)||c&&!RM(c,"video",n))return;const{CODECS:p,"FRAME-RATE":v,"HDCP-LEVEL":y,"PATHWAY-ID":b,RESOLUTION:w,"VIDEO-RANGE":k}=l,M=`${`${b||"."}-`}${e.bitrate}-${w}-${v}-${p}-${k}-${y}`;if(a[M])if(a[M].uri===e.url||e.attrs["PATHWAY-ID"])a[M].addGroupId("audio",l.AUDIO),a[M].addGroupId("text",l.SUBTITLES);else{const t=r[M]+=1;e.attrs["PATHWAY-ID"]=new Array(t+1).join(".");const n=new IS(e);a[M]=n,i.push(n)}else{const t=new IS(e);a[M]=t,r[M]=1,i.push(t)}})),this.filterAndSortMediaOptions(i,t,o,s,d)}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)&&TS.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(Yw.ERROR,{type:Kw.MEDIA_ERROR,details:Vw.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||RM(t.audioCodec,"audio",e))),fx(r)}t.subtitles&&(o=t.subtitles,fx(o));const d=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 TS.indexOf(e.videoRange)-TS.indexOf(t.videoRange);if(e.videoCodec!==t.videoCodec){const n=NM(e.videoCodec),i=NM(t.videoCodec);if(n!==i)return i-n}if(e.uri===t.uri&&e.codecSet!==t.codecSet){const n=OM(e.codecSet),i=OM(t.codecSet);if(n!==i)return i-n}return e.averageBitrate!==t.averageBitrate?e.averageBitrate-t.averageBitrate:0}));let u=d[0];if(this.steering&&(s=this.steering.filterParsedLevels(s),s.length!==d.length))for(let e=0;e<d.length;e++)if(d[e].pathwayId===s[0].pathwayId){u=d[e];break}this._levels=s;for(let e=0;e<s.length;e++)if(s[e]===u){var l;this._firstLevel=e;const t=u.bitrate,n=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${s.length} level(s) found, first bitrate: ${t}`),void 0===(null==(l=this.hls.userConfig)?void 0:l.abrEwmaDefaultEstimate)){const e=Math.min(t,this.hls.config.abrEwmaDefaultEstimateMax);e>n&&n===ux.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=e)}break}const h=a&&!i,c={levels:s,audioTracks:r,subtitleTracks:o,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:a,video:i,altAudio:!h&&r.some((e=>!!e.url))};this.hls.trigger(Yw.MANIFEST_PARSED,c),(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(Yw.ERROR,{type:Kw.OTHER_ERROR,details:Vw.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(Yw.LEVEL_SWITCHING,s);const d=r.details;if(!d||d.live){const e=this.switchParams(r.uri,null==i?void 0:i.details,d);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===nS&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(void 0!==t&&t.type===rS){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(Yw.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)));$S(n),this._levels=n,this.currentLevelIndex>-1&&null!=(t=this.currentLevel)&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(Yw.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(Yw.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function fx(e){const t={};e.forEach((e=>{const n=e.groupId||"";e.id=t[n]=t[n]||0,t[n]++}))}class gx{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=Vw.KEY_LOAD_ERROR,n,i,a){return new OP({type:Kw.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,Vw.KEY_LOAD_ERROR,n))}const r=a.uri;if(!r)return Promise.reject(this.createKeyLoadError(e,Vw.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,Vw.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,d={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},u={onSuccess:(e,t,n,i)=>{const{frag:o,keyInfo:s,url:d}=n;if(!o.decryptdata||s!==this.keyUriToKeyInfo[d])return r(this.createKeyLoadError(o,Vw.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,Vw.KEY_LOAD_ERROR,new Error(`HTTP Error ${e.code} loading key ${e.text}`),i,zw({url:o.url,data:void 0},e)))},onTimeout:(e,n,i)=>{this.resetLoader(n),r(this.createKeyLoadError(t,Vw.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),i))},onAbort:(e,n,i)=>{this.resetLoader(n),r(this.createKeyLoadError(t,Vw.INTERNAL_ABORTED,new Error("key loading aborted"),i))}};i.load(o,d,u)}))}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 px(){return self.SourceBuffer||self.WebKitSourceBuffer}function vx(){if(!DM())return!1;const e=px();return!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove}class yx{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,d=!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;ek.warn(`playback not stuck anymore @${r}, after ${Math.round(e)}ms`),this.stallReported=!1}this.stalled=null}return}if(d||s)return void(this.stalled=null);if(i.paused&&!o||i.ended||0===i.playbackRate||!TP.getBuffered(i).length)return void(this.nudgeRetry=0);const u=TP.bufferInfo(i,r,0),l=u.nextStart||0;if(o){const e=u.len>2,n=!l||t&&t.start<=r||l-r>2&&!this.fragmentTracker.getPartialFragment(r);if(e||n)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var h;if(!(u.len>0)&&!l)return;const e=Math.max(l,u.start||0)-r,t=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,n=(null==t||null==(h=t.details)?void 0:h.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 c=self.performance.now();if(null===a)return void(this.stalled=c);const m=c-a;if(!o&&m>=250&&(this._reportStall(u),!this.media))return;const f=TP.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&&(ek.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)})`);ek.warn(i.message),t.trigger(Yw.ERROR,{type:Kw.MEDIA_ERROR,details:Vw.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=TP.bufferInfo(i,a,0),o=a<r.start?r.start:r.nextStart;if(o){const s=r.len<=t.maxBufferHole,d=r.len>0&&r.len<1&&i.readyState<3,u=o-a;if(u>0&&(s||d)){if(u>t.maxBufferHole){const{fragmentTracker:t}=this;let n=!1;if(0===a){const e=t.getAppendedFrag(0,rS);e&&o<e.end&&(n=!0)}if(!n){const n=e||t.getAppendedFrag(a,rS);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(ek.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(Yw.ERROR,{type:Kw.MEDIA_ERROR,details:Vw.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}`);ek.warn(o.message),n.currentTime=r,t.trigger(Yw.ERROR,{type:Kw.MEDIA_ERROR,details:Vw.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`);ek.error(n.message),t.trigger(Yw.ERROR,{type:Kw.MEDIA_ERROR,details:Vw.BUFFER_STALLED_ERROR,error:n,fatal:!0})}}}class bx extends tE{constructor(e,t,n){super(e,t,n,"[stream-controller]",rS),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(Yw.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Yw.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Yw.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Yw.LEVEL_LOADING,this.onLevelLoading,this),e.on(Yw.LEVEL_LOADED,this.onLevelLoaded,this),e.on(Yw.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(Yw.ERROR,this.onError,this),e.on(Yw.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(Yw.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(Yw.BUFFER_CREATED,this.onBufferCreated,this),e.on(Yw.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(Yw.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(Yw.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(Yw.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Yw.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Yw.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Yw.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Yw.LEVEL_LOADED,this.onLevelLoaded,this),e.off(Yw.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(Yw.ERROR,this.onError,this),e.off(Yw.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(Yw.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(Yw.BUFFER_CREATED,this.onBufferCreated,this),e.off(Yw.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(Yw.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(Yw.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=BP,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=UP}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case eE:{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=BP;break}if(this.hls.nextLoadLevel!==this.level){this.state=BP;break}break}case YP:{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=BP}}}this.state===BP&&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(Yw.BUFFER_EOS,e),void(this.state=JP)}e.loadLevel!==a&&-1===e.manualLevel&&this.log(`Adapting to level ${a} from level ${this.level}`),this.level=e.nextLoadLevel=a;const d=r.details;if(!d||this.state===eE||d.live&&this.levelLastLoaded!==r)return this.level=a,void(this.state=eE);const u=o.len,l=this.getMaxBufferLength(r.maxBitrate);if(u>=l)return;this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);const h=this.backtrackFragment?this.backtrackFragment.start:o.end;let c=this.getNextFragment(h,d);if(this.couldBacktrack&&!this.fragPrevious&&c&&"initSegment"!==c.sn&&this.fragmentTracker.getState(c)!==kP){var m;const e=(null!=(m=this.backtrackFragment)?m:c).sn-d.startSN,t=d.fragments[e-1];t&&c.cc===t.cc&&(c=t,this.fragmentTracker.removeFragment(t))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(c&&this.isLoopLoading(c,h)){if(!c.gap){const e=this.audioOnly&&!this.altAudio?sk:dk,t=(e===dk?this.videoBuffer:this.mediaBuffer)||this.media;t&&this.afterBufferFlushed(t,e,rS)}c=this.getNextFragmentLoopLoading(c,d,o,rS,l)}c&&(!c.initSegment||c.initSegment.data||this.bitrateTest||(c=c.initSegment),this.loadFragment(c,r,h))}loadFragment(e,t,n){const i=this.fragmentTracker.getState(e);this.fragCurrent=e,i===yP||i===wP?"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,rS)}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 GP:case XP:case YP:case VP:case qP:this.state=BP}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 yx(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;Bw(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(Yw.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=px();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!==BP)return;const i=n[t.level];(!i.details||i.details.live&&this.levelLastLoaded!==i||this.waitForCdnTuneIn(i.details))&&(this.state=eE)}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],d=this.fragCurrent;!d||this.state!==XP&&this.state!==YP||d.level!==t.level&&d.loader&&this.abortCurrentFrag();let u=0;if(r.live||null!=(n=s.details)&&n.live){var l;if(this.checkLiveUpdate(r),r.deltaUpdateFailed)return;u=this.alignPlaylists(r,s.details,null==(l=this.levelLastLoaded)?void 0:l.details)}if(s.details=r,this.levelLastLoaded=s,this.hls.trigger(Yw.LEVEL_UPDATED,{details:r,level:a}),this.state===eE){if(this.waitForCdnTuneIn(r))return;this.state=BP}this.startFragRequested?r.live&&this.synchronizeToLiveEdge(r):this.setStartPosition(r,u),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 d=o.videoCodec,u=s.PTSKnown||!s.live,l=null==(t=n.initSegment)?void 0:t.data,h=this._getAudioCodec(o),c=this.transmuxer=this.transmuxer||new uT(this.hls,rS,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),m=i?i.index:-1,f=-1!==m,g=new AP(n.level,n.sn,n.stats.chunkCount,a.byteLength,m,f),p=this.initPTS[n.cc];c.push(a,l,h,d,n,i,s.totalduration,u,g,p)}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(Yw.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),e.trigger(Yw.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!==rS)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===qP&&(this.state=BP));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=QP;else switch(t.details){case Vw.FRAG_GAP:case Vw.FRAG_PARSING_ERROR:case Vw.FRAG_DECRYPT_ERROR:case Vw.FRAG_LOAD_ERROR:case Vw.FRAG_LOAD_TIMEOUT:case Vw.KEY_LOAD_ERROR:case Vw.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(rS,t);break;case Vw.LEVEL_LOAD_ERROR:case Vw.LEVEL_LOAD_TIMEOUT:case Vw.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==eE||(null==(n=t.context)?void 0:n.type)!==nS||(this.state=BP);break;case Vw.BUFFER_APPEND_ERROR:case Vw.BUFFER_FULL_ERROR:if(!t.parent||"main"!==t.parent)return;if(t.details===Vw.BUFFER_APPEND_ERROR)return void this.resetLoadingState();this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case Vw.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}checkBuffer(){const{media:e,gapController:t}=this;if(e&&t&&e.readyState){if(this.loadedmetadata||!TP.getBuffered(e).length){const e=this.state!==BP?this.fragCurrent:null;t.poll(this.lastCurrentTime,e)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=BP,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==sk||this.audioOnly&&!this.altAudio){const e=(t===dk?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(e,t,rS),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=TP.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=BP,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(Yw.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:d,level:u}=o,{video:l,text:h,id3:c,initSegment:m}=a,{details:f}=u,g=this.altAudio?void 0:a.audio;if(this.fragContextChanged(s))this.fragmentTracker.removeFragment(s);else{if(this.state=VP,m){if(null!=m&&m.tracks){const e=s.initSegment||s;this._bufferInitSegment(u,m.tracks,e,r),i.trigger(Yw.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:n,tracks:m.tracks})}const e=m.initPTS,t=m.timescale;Bw(e)&&(this.initPTS[s.cc]={baseTime:e,timescale:t},i.trigger(Yw.INIT_PTS_FOUND,{frag:s,id:n,initPTS:e,timescale:t}))}if(l&&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}=l;if(d)d.elementaryStreams[l.type]={startPTS:e,endPTS:i,startDTS:a,endDTS:o};else if(l.firstKeyFrame&&l.independent&&1===r.id&&!n&&(this.couldBacktrack=!0),l.dropped&&l.independent){const a=this.getMainFwdBufferInfo(),r=(a?a.end:this.getLoadPosition())+this.config.maxBufferHole,d=l.firstKeyFramePTS?l.firstKeyFramePTS:e;if(!t&&r<d-this.config.maxBufferHole&&!n)return void this.backtrack(s);n&&(s.gap=!0),s.setElementaryStreamInfo(l.type,s.start,i,s.start,o,!0)}else t&&e>2&&(s.gap=!0);s.setElementaryStreamInfo(l.type,e,i,a,o),this.backtrackFragment&&(this.backtrackFragment=s),this.bufferFragmentData(l,s,d,r,t||n)}else{if(!t&&!n)return void this.backtrack(s);s.gap=!0}}if(g){const{startPTS:e,endPTS:t,startDTS:n,endDTS:i}=g;d&&(d.elementaryStreams[sk]={startPTS:e,endPTS:t,startDTS:n,endDTS:i}),s.setElementaryStreamInfo(sk,e,t,n,i),this.bufferFragmentData(g,s,d,r)}if(f&&null!=c&&null!=(t=c.samples)&&t.length){const e={id:n,frag:s,details:f,samples:c.samples};i.trigger(Yw.FRAG_PARSING_METADATA,e)}if(f&&h){const e={id:n,frag:s,details:f,samples:h.samples};i.trigger(Yw.FRAG_PARSING_USERDATA,e)}}}_bufferInitSegment(e,t,n,i){if(this.state!==VP)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(Yw.BUFFER_CODECS,t),Object.keys(t).forEach((e=>{const a=t[e].initSegment;null!=a&&a.byteLength&&this.hls.trigger(Yw.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,rS)}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=BP}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&!1===e.seeking){const n=e.currentTime;if(TP.isBuffered(e,n)?t=this.getAppendedFrag(n):TP.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(Yw.FRAG_CHANGED,{frag:t}),e&&e.level===n||this.hls.trigger(Yw.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&&Bw(t)&&Bw(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 wx{static get version(){return"1.5.15"}static isMSESupported(){return vx()}static isSupported(){return function(){if(!vx())return!1;const e=DM();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(WM(t,"video"))))||["mp4a.40.2","fLaC"].some((t=>e.isTypeSupported(WM(t,"audio")))))}()}static getMediaSource(){return DM()}static get Events(){return Yw}static get ErrorTypes(){return Kw}static get ErrorDetails(){return Vw}static get DefaultConfig(){return wx.defaultConfig?wx.defaultConfig:ux}static set DefaultConfig(e){wx.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 dT,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){Zw(e,"debug","log","info","warn","error");try{Qw.log(`Debug logs enabled for "${t}" in hls.js version 1.5.15`)}catch(e){Qw=Jw}}else Qw=Jw}(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=lx(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}`,d=t[s];if(void 0!==d&&r){o.push(s);const e=n[a].default;switch(t[a]={default:e},i){case"TimeOut":e.maxLoadTimeMs=d,e.maxTimeToFirstByteMs=d;break;case"MaxRetry":e.errorRetry.maxNumRetry=d,e.timeoutRetry.maxNumRetry=d;break;case"RetryDelay":e.errorRetry.retryDelayMs=d,e.timeoutRetry.retryDelayMs=d;break;case"MaxRetryTimeout":e.errorRetry.maxRetryDelayMs=d,e.timeoutRetry.maxRetryDelayMs=d}}})),o.length&&ek.warn(`hls.js config: "${o.join('", "')}" setting(s) are deprecated, use "${a}": ${JSON.stringify(t[a])}`)})),zw(zw({},n),t)}(wx.DefaultConfig,e);this.userConfig=e,t.progressive&&hx(t);const{abrController:n,bufferController:i,capLevelController:a,errorController:r,fpsController:o}=t,s=new r(this),d=this.abrController=new n(this),u=this.bufferController=new i(this),l=this.capLevelController=new a(this),h=new o(this),c=new lS(this),m=new SS(this),f=t.contentSteeringController,g=f?new f(this):null,p=this.levelController=new mx(this,g),v=new MP(this),y=new gx(this.config),b=this.streamController=new bx(this,v,y);l.setStreamController(b),h.setStreamController(b);const w=[c,p,b];g&&w.splice(1,0,g),this.networkControllers=w;const k=[d,u,l,h,m,v];this.audioTrackController=this.createController(t.audioTrackController,w);const M=t.audioStreamController;M&&w.push(new M(this,v,y)),this.subtitleTrackController=this.createController(t.subtitleTrackController,w);const S=t.subtitleStreamController;S&&w.push(new S(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(PS,k),this.coreComponents=k,w.push(s);const P=s.onErrorOut;"function"==typeof P&&this.on(Yw.ERROR,P,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(ek.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===Yw.ERROR;this.trigger(Yw.ERROR,{type:Kw.OTHER_ERROR,details:Vw.INTERNAL_EXCEPTION,fatal:n,event:e,error:t}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){ek.log("destroy"),this.trigger(Yw.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){ek.log("attachMedia"),this._media=e,this.trigger(Yw.MEDIA_ATTACHING,{media:e})}detachMedia(){ek.log("detachMedia"),this.trigger(Yw.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,n=this.url,i=this.url=Fw.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,ek.log(`loadSource:${i}`),t&&n&&(n!==i||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(Yw.MANIFEST_LOADING,{url:e})}startLoad(e=-1){ek.log(`startLoad(${e})`),this.started=!0,this.networkControllers.forEach((t=>{t.startLoad(e)}))}stopLoad(){ek.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(){ek.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){ek.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){ek.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){ek.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){ek.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){ek.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){ek.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&&(ek.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){(function(e){return ES.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}}wx.defaultConfig=void 0;let kx=class extends ps{constructor(){super(...arguments),this.inFocusedState=!1}styles(){const{url:t,imageCropping:n,alignment:i,height:a,width:r,rightMargin:o,spacing:s}=this.component,d="fit"===n,u=d?"":e.unsafeCSS(" position: fixed;\n right: 0;\n bottom: 0;\n min-width: 100%;\n min-height: 100%;\n ");return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n transition: all 0.3s;\n background-image: url(${t});\n background-size: ${d?"contain":"cover"};\n background-position: ${i||""} center;\n background-repeat: no-repeat;\n height: ${Ts(a??"100%")};\n width: ${Ts(("fitContent"==r?a:r)??"100%")};\n margin-right: ${o||s||0}px;\n ${zs(this.component)}\n ${this.component.hidden?"display:none":""}\n ${u}\n }\n\n #nami-video {\n height: ${Ts(a??"100%")};\n width: ${Ts(("fitContent"==r?a:r)??"100%")};\n object-fit: ${d?"contain":"cover"};\n }\n `)}loadMediaSrc(e){const{url:t}=this.component;if(t&&!t.includes(we)&&!e.src)if(!t.includes("m3u8")||e.canPlayType("application/vnd.apple.mpegurl"))e.src=t;else if(wx.isSupported()){const n=new wx;n.loadSource(t),n.attachMedia(e)}}updated(){Object.keys(this.component).forEach((e=>{this.component[e]=Vs(this.component[e])}));const{autoplayVideo:e,mute:t,loopVideo:n,controlsType:i,fallbackImage:a}=this.component,r=this.shadowRoot?.getElementById("nami-video");r&&(r.autoplay=e??!1,r.loop=n??!1,r.muted=!!e||(t??!1),r.controls="none"!==i,r.poster=a??"",this.loadMediaSrc(r))}render(){return e.html`<video id="nami-video" preload="auto"></video>`}};o([gs({type:Object})],kx.prototype,"component",void 0),o([gs({type:Boolean})],kx.prototype,"inFocusedState",void 0),kx=o([Bo("nami-video")],kx);let Mx=class extends ps{constructor(){super(),this.inFocusedState=!1,this.height=0,this._handleClick=()=>{this.height=this.shadowRoot?.getElementById("collapse")?.scrollHeight||0,this.shadowRoot?.getElementById("collapse")?.classList.toggle("hidden")},this.addEventListener("click",this._handleClick,!1)}styles(){const t="vertical"===this.component.direction?"margin-top":"margin-left",n=e.unsafeCSS(xs(this.component,this.inFocusedState));return e.unsafeCSS(`\n :host {\n display: flex;\n ${n};\n ${Cs(this.component)}\n ${zs(this.component,this.inFocusedState)}\n justify-content: center;\n cursor: pointer;\n }\n :host > :not(:first-child) {\n ${t}: ${this.component.spacing||0}px;\n }\n #collapse.hidden{\n max-height: 0;\n opacity: 0;\n }\n #collapse {\n ${Ws(this.component)}\n max-height: ${this.height}px;\n opacity: 1;\n transition: all linear 0.5s;\n }\n `)}render(){const{components:t,collapseHeader:n,open:i}=this.component,a=t.map((e=>Zs(e,this.inFocusedState)));return e.html`${Zs(n,this.inFocusedState)}
48
+ <div id="collapse" class="${"collapse"===i?"hidden":""}">${a}</div>`}};o([gs({type:Object})],Mx.prototype,"component",void 0),o([gs({type:Boolean})],Mx.prototype,"inFocusedState",void 0),o([gs({type:Number})],Mx.prototype,"height",void 0),Mx=o([Bo("nami-collapse-container")],Mx);let Sx=class extends ps{constructor(){super(...arguments),this.inFocusedState=!1}styles(){const t="vertical"===this.component.direction,n=t?"margin-top":"margin-left",i=e.unsafeCSS(xs(this.component,this.inFocusedState));return e.unsafeCSS(`\n :host {\n display: grid;\n grid-gap: ${this.component.spacing}px;\n grid-auto-flow: ${t?"row":"column"};\n overflow: auto;\n place-items: center;\n ${i}\n ${a=this.component,r=this.inFocusedState,`\n transition: all 0.3s;\n ${Ls(a)}\n ${Ds(a)}\n ${Is(a)}\n ${Rs(a,r)}\n ${Ws(a)}\n ${Ns(a)}\n ${Os(a)}\n `}\n cursor: pointer;\n }\n :host > :not(:first-child) {\n ${n}: ${this.component.spacing||0}px;\n }\n `);var a,r}render(){const e=(t=this.component,t.loopSource?.map((e=>Xs(t.components,Xs({block:e},{block:e}))))??[]);var t;return e.map((e=>e.map((e=>Zs(e,this.inFocusedState)))))}};o([gs({type:Object})],Sx.prototype,"component",void 0),o([gs({type:Boolean})],Sx.prototype,"inFocusedState",void 0),Sx=o([Bo("nami-responsive-grid")],Sx),exports.Nami=Oo,exports.NamiCampaignManager=ks,exports.NamiCustomerManager=zo,exports.NamiEntitlementManager=Ms,exports.NamiPaywallManager=$o;