@kong-ui-public/document-viewer 0.2.11 → 0.3.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.
- package/dist/document-viewer.es.js +672 -645
- package/dist/document-viewer.es.js.map +1 -1
- package/dist/document-viewer.umd.js +10 -10
- package/dist/document-viewer.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/DocumentViewer.vue.d.ts.map +1 -1
- package/dist/types/components/nodes/Heading.vue.d.ts +9 -0
- package/dist/types/components/nodes/Heading.vue.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/utils/addUniqueHeadingSlugs.d.ts +3 -0
- package/dist/types/utils/addUniqueHeadingSlugs.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +3 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/toSlug.d.ts +2 -0
- package/dist/types/utils/toSlug.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
(function(P,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],u):(P=typeof globalThis<"u"?globalThis:P||self,u(P["kong-ui-public-document-viewer"]={},P.Vue))})(this,function(P,u){"use strict";var D=(t=>(t.header="header",t.body="body",t.footer="footer",t))(D||{}),j=(t=>(t.left="left",t.center="center",t.right="right",t))(j||{});function lt(t){return t.type==="text"}const dn="",I=(t,e)=>{const r=t.__vccOpts||t;for(const[n,o]of e)r[n]=o;return r},Wt={};function zt(t,e){return u.openBlock(),u.createElementBlock("blockquote",null,[u.renderSlot(t.$slots,"default",{},void 0,!0)])}const Qt=I(Wt,[["render",zt],["__scopeId","data-v-8e8713de"]]),_n="",Jt={};function te(t,e){return u.openBlock(),u.createElementBlock("code",null,[u.renderSlot(t.$slots,"default",{},void 0,!0)])}const ee=I(Jt,[["render",te],["__scopeId","data-v-015a6bbb"]]),En="",re={};function ne(t,e){return u.openBlock(),u.createElementBlock("pre",null,[u.createElementVNode("code",null,[u.renderSlot(t.$slots,"default",{},void 0,!0)])])}const oe=I(re,[["render",ne],["__scopeId","data-v-7d7d103e"]]),ie=u.defineComponent({__name:"Emphasis",props:{level:{type:Number,default:1,validator(t){if(!Number.isInteger(t))return!1;const e=t;return e>0&&e<3}}},setup(t){const r=t.level===1?"em":"strong";return(n,o)=>(u.openBlock(),u.createBlock(u.resolveDynamicComponent(u.unref(r)),null,{default:u.withCtx(()=>[u.renderSlot(n.$slots,"default")]),_:3}))}}),ae=u.defineComponent({__name:"Heading",props:{level:{type:Number,validator(t){if(!Number.isInteger(t))return!1;const e=t;return e>0&&e<7},default:1}},setup(t){const r=`h${t.level}`;return(n,o)=>(u.openBlock(),u.createBlock(u.resolveDynamicComponent(r),null,{default:u.withCtx(()=>[u.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}))}}),yn="",se=I(ae,[["__scopeId","data-v-07152ca1"]]),ce=["alt","src","title"],le=u.defineComponent({__name:"Image",props:{url:{type:String,required:!0},alt:{type:String,default:""},title:{type:String,default:""}},setup(t){return(e,r)=>(u.openBlock(),u.createElementBlock("figure",null,[u.createElementVNode("img",{alt:t.alt,src:t.url,title:t.title},null,8,ce),u.createElementVNode("figcaption",null,[u.renderSlot(e.$slots,"default")])]))}}),ue={};function he(t,e){return u.openBlock(),u.createElementBlock("hr")}const fe=I(ue,[["render",he]]),pe={};function me(t,e){return u.openBlock(),u.createElementBlock("table",null,[u.renderSlot(t.$slots,"default")])}const ge=I(pe,[["render",me]]),de=u.defineComponent({__name:"TableRow",props:{section:{type:String,default:D.body}},setup(t){const e=t;let r;return e.section===D.header?r="thead":e.section===D.body?r="tbody":e.section===D.footer&&(r="tfoot"),(n,o)=>(u.openBlock(),u.createBlock(u.resolveDynamicComponent(u.unref(r)),null,{default:u.withCtx(()=>[u.renderSlot(n.$slots,"default")]),_:3}))}}),_e=u.defineComponent({__name:"TableCell",props:{align:{type:String,default:j.left},parent:{type:Object,required:!0}},setup(t){var o;const e=t,r=((o=e.parent)==null?void 0:o.section)===D.header?"th":"td";let n;return e.align===j.center?n="align-center":e.align===j.right&&(n="align-right"),(i,a)=>(u.openBlock(),u.createBlock(u.resolveDynamicComponent(u.unref(r)),{class:u.normalizeClass(u.unref(n))},{default:u.withCtx(()=>[u.renderSlot(i.$slots,"default",{},void 0,!0)]),_:3},8,["class"]))}}),bn="",Ee=I(_e,[["__scopeId","data-v-6da63f53"]]),ye={key:0},be={inheritAttrs:!1},ve=u.defineComponent({...be,__name:"Text",props:{text:{type:String,required:!0},appendSpace:{type:Boolean,default:!1}},setup(t){return(e,r)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createTextVNode(u.toDisplayString(t.text),1),t.appendSpace?(u.openBlock(),u.createElementBlock("span",ye," ")):u.createCommentVNode("",!0)],64))}}),Te={};function Be(t,e){return u.openBlock(),u.createElementBlock("span",null,[u.renderSlot(t.$slots,"default")])}const Se=I(Te,[["render",Be]]),vn="",He={};function Ae(t,e){return u.openBlock(),u.createElementBlock("p",null,[u.renderSlot(t.$slots,"default",{},void 0,!0)])}const Ie=I(He,[["render",Ae],["__scopeId","data-v-c7681718"]]),Ne=u.defineComponent({__name:"List",props:{isOrdered:{type:Boolean,default:!1}},setup(t){const r=t.isOrdered?"ol":"ul";return(n,o)=>(u.openBlock(),u.createBlock(u.resolveDynamicComponent(u.unref(r)),null,{default:u.withCtx(()=>[u.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}))}}),Tn="",Re=I(Ne,[["__scopeId","data-v-f52e8277"]]),Pe={};function Le(t,e){return u.openBlock(),u.createElementBlock("li",null,[u.renderSlot(t.$slots,"default")])}const Oe=I(Pe,[["render",Le]]),Ce=["href","title"],Me=u.defineComponent({__name:"Link",props:{href:{type:String,required:!0},title:{type:String,default:""}},setup(t){return(e,r)=>(u.openBlock(),u.createElementBlock("a",{href:t.href,rel:"noreferrer noopener nofollow",title:t.title},[u.renderSlot(e.$slots,"default",{},void 0,!0)],8,Ce))}}),Bn="",we={blockquote:Qt,code:ee,code_block:oe,emphasis:ie,heading:se,image:le,line_break:fe,link:I(Me,[["__scopeId","data-v-9b27e235"]]),list:Re,list_item:Oe,paragraph:Ie,table:ge,table_row:de,table_cell:Ee,text:ve,text_block:Se},ut=[];function De(t){ut.indexOf(t)===-1&&(ut.push(t),console.warn(`[DocumentViewer] Unable to render an unknown node type "${t}"`))}function ht(t,e){return t.map(r=>{if(!r)return null;const{type:n,children:o,...i}=r,a=we[r.type];if(!a)return De(n),null;if((r==null?void 0:r.type)==="paragraph"&&(r!=null&&r.children)){const s=r.children,h=s.length-1;s.forEach((l,c)=>{var f;lt(l)&&!((f=l.text)!=null&&f.endsWith(" "))&&c!==h&&(l.appendSpace=!0)})}return u.createVNode(a,u.mergeProps(i,{parent:e}),{default:()=>o&&ht(o,r)})})}var q=function(t,e){return q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},q(t,e)};function R(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");q(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var m=function(){return m=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},m.apply(this,arguments)};function ke(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}function M(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,i;n<o;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}var g;(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(g||(g={}));var y;(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(y||(y={}));var G;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(G||(G={}));function ft(t){return t.type===y.literal}function Ue(t){return t.type===y.argument}function pt(t){return t.type===y.number}function mt(t){return t.type===y.date}function gt(t){return t.type===y.time}function dt(t){return t.type===y.select}function _t(t){return t.type===y.plural}function Fe(t){return t.type===y.pound}function Et(t){return t.type===y.tag}function yt(t){return!!(t&&typeof t=="object"&&t.type===G.number)}function W(t){return!!(t&&typeof t=="object"&&t.type===G.dateTime)}var bt=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Ge=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function je(t){var e={};return t.replace(Ge,function(r){var n=r.length;switch(r[0]){case"G":e.era=n===4?"long":n===5?"narrow":"short";break;case"y":e.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=n===4?"short":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][n-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][n-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][n-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][n-1];break;case"s":e.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e}var xe=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Ve(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var e=t.split(xe).filter(function(p){return p.length>0}),r=[],n=0,o=e;n<o.length;n++){var i=o[n],a=i.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var s=a[0],h=a.slice(1),l=0,c=h;l<c.length;l++){var f=c[l];if(f.length===0)throw new Error("Invalid number skeleton")}r.push({stem:s,options:h})}return r}function $e(t){return t.replace(/^(.*?)-/,"")}var vt=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Tt=/^(@+)?(\+|#+)?[rs]?$/g,Xe=/(\*)(0+)|(#+)(0+)|(0+)/g,Bt=/^(0+)$/;function St(t){var e={};return t[t.length-1]==="r"?e.roundingPriority="morePrecision":t[t.length-1]==="s"&&(e.roundingPriority="lessPrecision"),t.replace(Tt,function(r,n,o){return typeof o!="string"?(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length):o==="+"?e.minimumSignificantDigits=n.length:n[0]==="#"?e.maximumSignificantDigits=n.length:(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length+(typeof o=="string"?o.length:0)),""}),e}function Ht(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Ke(t){var e;if(t[0]==="E"&&t[1]==="E"?(e={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(e={notation:"scientific"},t=t.slice(1)),e){var r=t.slice(0,2);if(r==="+!"?(e.signDisplay="always",t=t.slice(2)):r==="+?"&&(e.signDisplay="exceptZero",t=t.slice(2)),!Bt.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function At(t){var e={},r=Ht(t);return r||e}function Ze(t){for(var e={},r=0,n=t;r<n.length;r++){var o=n[r];switch(o.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=o.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=$e(o.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=m(m(m({},e),{notation:"scientific"}),o.options.reduce(function(h,l){return m(m({},h),At(l))},{}));continue;case"engineering":e=m(m(m({},e),{notation:"engineering"}),o.options.reduce(function(h,l){return m(m({},h),At(l))},{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(o.options[0]);continue;case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(Xe,function(h,l,c,f,p,d){if(l)e.minimumIntegerDigits=c.length;else{if(f&&p)throw new Error("We currently do not support maximum integer digits");if(d)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Bt.test(o.stem)){e.minimumIntegerDigits=o.stem.length;continue}if(vt.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(vt,function(h,l,c,f,p,d){return c==="*"?e.minimumFractionDigits=l.length:f&&f[0]==="#"?e.maximumFractionDigits=f.length:p&&d?(e.minimumFractionDigits=p.length,e.maximumFractionDigits=p.length+d.length):(e.minimumFractionDigits=l.length,e.maximumFractionDigits=l.length),""});var i=o.options[0];i==="w"?e=m(m({},e),{trailingZeroDisplay:"stripIfInteger"}):i&&(e=m(m({},e),St(i)));continue}if(Tt.test(o.stem)){e=m(m({},e),St(o.stem));continue}var a=Ht(o.stem);a&&(e=m(m({},e),a));var s=Ke(o.stem);s&&(e=m(m({},e),s))}return e}var $={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function Ye(t,e){for(var r="",n=0;n<t.length;n++){var o=t.charAt(n);if(o==="j"){for(var i=0;n+1<t.length&&t.charAt(n+1)===o;)i++,n++;var a=1+(i&1),s=i<2?1:3+(i>>1),h="a",l=qe(e);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=h;for(;a-- >0;)r=l+r}else o==="J"?r+="H":r+=o}return r}function qe(t){var e=t.hourCycle;if(e===void 0&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=t.language,n;r!=="root"&&(n=t.maximize().region);var o=$[n||""]||$[r||""]||$["".concat(r,"-001")]||$["001"];return o[0]}var z,We=new RegExp("^".concat(bt.source,"*")),ze=new RegExp("".concat(bt.source,"*$"));function _(t,e){return{start:t,end:e}}var Qe=!!String.prototype.startsWith,Je=!!String.fromCodePoint,tr=!!Object.fromEntries,er=!!String.prototype.codePointAt,rr=!!String.prototype.trimStart,nr=!!String.prototype.trimEnd,or=!!Number.isSafeInteger,ir=or?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Q=!0;try{var ar=Pt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Q=((z=ar.exec("a"))===null||z===void 0?void 0:z[0])==="a"}catch{Q=!1}var It=Qe?function(t,e,r){return t.startsWith(e,r)}:function(t,e,r){return t.slice(r,r+e.length)===e},J=Je?String.fromCodePoint:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r="",n=t.length,o=0,i;n>o;){if(i=t[o++],i>1114111)throw RangeError(i+" is not a valid code point");r+=i<65536?String.fromCharCode(i):String.fromCharCode(((i-=65536)>>10)+55296,i%1024+56320)}return r},Nt=tr?Object.fromEntries:function(t){for(var e={},r=0,n=t;r<n.length;r++){var o=n[r],i=o[0],a=o[1];e[i]=a}return e},Rt=er?function(t,e){return t.codePointAt(e)}:function(t,e){var r=t.length;if(!(e<0||e>=r)){var n=t.charCodeAt(e),o;return n<55296||n>56319||e+1===r||(o=t.charCodeAt(e+1))<56320||o>57343?n:(n-55296<<10)+(o-56320)+65536}},sr=rr?function(t){return t.trimStart()}:function(t){return t.replace(We,"")},cr=nr?function(t){return t.trimEnd()}:function(t){return t.replace(ze,"")};function Pt(t,e){return new RegExp(t,e)}var tt;if(Q){var Lt=Pt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");tt=function(t,e){var r;Lt.lastIndex=e;var n=Lt.exec(t);return(r=n[1])!==null&&r!==void 0?r:""}}else tt=function(t,e){for(var r=[];;){var n=Rt(t,e);if(n===void 0||Ot(n)||fr(n))break;r.push(n),e+=n>=65536?2:1}return J.apply(void 0,r)};var lr=function(){function t(e,r){r===void 0&&(r={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(e,r,n){for(var o=[];!this.isEOF();){var i=this.char();if(i===123){var a=this.parseArgument(e,n);if(a.err)return a;o.push(a.val)}else{if(i===125&&e>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),o.push({type:y.pound,location:_(s,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(g.UNMATCHED_CLOSING_TAG,_(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&et(this.peek()||0)){var a=this.parseTag(e,r);if(a.err)return a;o.push(a.val)}else{var a=this.parseLiteral(e,r);if(a.err)return a;o.push(a.val)}}}return{val:o,err:null}},t.prototype.parseTag=function(e,r){var n=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:y.literal,value:"<".concat(o,"/>"),location:_(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,r,!0);if(i.err)return i;var a=i.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!et(this.char()))return this.error(g.INVALID_TAG,_(s,this.clonePosition()));var h=this.clonePosition(),l=this.parseTagName();return o!==l?this.error(g.UNMATCHED_CLOSING_TAG,_(h,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:y.tag,value:o,children:a,location:_(n,this.clonePosition())},err:null}:this.error(g.INVALID_TAG,_(s,this.clonePosition())))}else return this.error(g.UNCLOSED_TAG,_(n,this.clonePosition()))}else return this.error(g.INVALID_TAG,_(n,this.clonePosition()))},t.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&hr(this.char());)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(e,r){for(var n=this.clonePosition(),o="";;){var i=this.tryParseQuote(r);if(i){o+=i;continue}var a=this.tryParseUnquoted(e,r);if(a){o+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){o+=s;continue}break}var h=_(n,this.clonePosition());return{val:{type:y.literal,value:o,location:h},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!ur(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return J.apply(void 0,r)},t.prototype.tryParseUnquoted=function(e,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&e>0?null:(this.bump(),J(n))},t.prototype.parseArgument=function(e,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,_(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(g.EMPTY_ARGUMENT,_(n,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(g.MALFORMED_ARGUMENT,_(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,_(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:y.argument,value:o,location:_(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,_(n,this.clonePosition())):this.parseArgumentOptions(e,r,o,n);default:return this.error(g.MALFORMED_ARGUMENT,_(n,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),r=this.offset(),n=tt(this.message,r),o=r+n.length;this.bumpTo(o);var i=this.clonePosition(),a=_(e,i);return{value:n,location:a}},t.prototype.parseArgumentOptions=function(e,r,n,o){var i,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,h=this.clonePosition();switch(s){case"":return this.error(g.EXPECT_ARGUMENT_TYPE,_(a,h));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var p=cr(f.val);if(p.length===0)return this.error(g.EXPECT_ARGUMENT_STYLE,_(this.clonePosition(),this.clonePosition()));var d=_(c,this.clonePosition());l={style:p,styleLocation:d}}var b=this.tryParseArgumentClose(o);if(b.err)return b;var E=_(o,this.clonePosition());if(l&&It(l==null?void 0:l.style,"::",0)){var v=sr(l.style.slice(2));if(s==="number"){var f=this.parseNumberSkeletonFromString(v,l.styleLocation);return f.err?f:{val:{type:y.number,value:n,location:E,style:f.val},err:null}}else{if(v.length===0)return this.error(g.EXPECT_DATE_TIME_SKELETON,E);var T=v;this.locale&&(T=Ye(v,this.locale));var p={type:G.dateTime,pattern:T,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?je(T):{}},N=s==="date"?y.date:y.time;return{val:{type:N,value:n,location:E,style:p},err:null}}}return{val:{type:s==="number"?y.number:s==="date"?y.date:y.time,value:n,location:E,style:(i=l==null?void 0:l.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var S=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(g.EXPECT_SELECT_ARGUMENT_OPTIONS,_(S,m({},S)));this.bumpSpace();var V=this.parseIdentifierIfPossible(),F=0;if(s!=="select"&&V.value==="offset"){if(!this.bumpIf(":"))return this.error(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,_(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,g.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),V=this.parseIdentifierIfPossible(),F=f.val}var Y=this.tryParsePluralOrSelectOptions(e,s,r,V);if(Y.err)return Y;var b=this.tryParseArgumentClose(o);if(b.err)return b;var qt=_(o,this.clonePosition());return s==="select"?{val:{type:y.select,value:n,options:Nt(Y.val),location:qt},err:null}:{val:{type:y.plural,value:n,options:Nt(Y.val),offset:F,pluralType:s==="plural"?"cardinal":"ordinal",location:qt},err:null}}default:return this.error(g.INVALID_ARGUMENT_TYPE,_(a,h))}},t.prototype.tryParseArgumentClose=function(e){return this.isEOF()||this.char()!==125?this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,_(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var o=this.clonePosition();if(!this.bumpUntil("'"))return this.error(g.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,_(o,this.clonePosition()));this.bump();break}case 123:{e+=1,this.bump();break}case 125:{if(e>0)e-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(e,r){var n=[];try{n=Ve(e)}catch{return this.error(g.INVALID_NUMBER_SKELETON,r)}return{val:{type:G.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?Ze(n):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(e,r,n,o){for(var i,a=!1,s=[],h=new Set,l=o.value,c=o.location;;){if(l.length===0){var f=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var p=this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_SELECTOR,g.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;c=_(f,this.clonePosition()),l=this.message.slice(f.offset,this.offset())}else break}if(h.has(l))return this.error(r==="select"?g.DUPLICATE_SELECT_ARGUMENT_SELECTOR:g.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);l==="other"&&(a=!0),this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?g.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:g.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,_(this.clonePosition(),this.clonePosition()));var b=this.parseMessage(e+1,r,n);if(b.err)return b;var E=this.tryParseArgumentClose(d);if(E.err)return E;s.push([l,{value:b.val,location:_(d,this.clonePosition())}]),h.add(l),this.bumpSpace(),i=this.parseIdentifierIfPossible(),l=i.value,c=i.location}return s.length===0?this.error(r==="select"?g.EXPECT_SELECT_ARGUMENT_SELECTOR:g.EXPECT_PLURAL_ARGUMENT_SELECTOR,_(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(g.MISSING_OTHER_CLAUSE,_(this.clonePosition(),this.clonePosition())):{val:s,err:null}},t.prototype.tryParseDecimalInteger=function(e,r){var n=1,o=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)i=!0,a=a*10+(s-48),this.bump();else break}var h=_(o,this.clonePosition());return i?(a*=n,ir(a)?{val:a,err:null}:this.error(r,h)):this.error(e,h)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var r=Rt(this.message,e);if(r===void 0)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return r},t.prototype.error=function(e,r){return{val:null,err:{kind:e,message:this.message,location:r}}},t.prototype.bump=function(){if(!this.isEOF()){var e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},t.prototype.bumpIf=function(e){if(It(this.message,e,this.offset())){for(var r=0;r<e.length;r++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(e){var r=this.offset(),n=this.message.indexOf(e,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var r=this.offset();if(r===e)break;if(r>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&Ot(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(e>=65536?2:1));return n??null},t}();function et(t){return t>=97&&t<=122||t>=65&&t<=90}function ur(t){return et(t)||t===47}function hr(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function Ot(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function fr(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function rt(t){t.forEach(function(e){if(delete e.location,dt(e)||_t(e))for(var r in e.options)delete e.options[r].location,rt(e.options[r].value);else pt(e)&&yt(e.style)||(mt(e)||gt(e))&&W(e.style)?delete e.style.location:Et(e)&&rt(e.children)})}function pr(t,e){e===void 0&&(e={}),e=m({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var r=new lr(t,e).parse();if(r.err){var n=SyntaxError(g[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return e!=null&&e.captureLocation||rt(r.val),r.val}function L(t,e){var r=e&&e.cache?e.cache:yr,n=e&&e.serializer?e.serializer:Er,o=e&&e.strategy?e.strategy:gr;return o(t,{cache:r,serializer:n})}function mr(t){return t==null||typeof t=="number"||typeof t=="boolean"}function Ct(t,e,r,n){var o=mr(n)?n:r(n),i=e.get(o);return typeof i>"u"&&(i=t.call(this,n),e.set(o,i)),i}function Mt(t,e,r){var n=Array.prototype.slice.call(arguments,3),o=r(n),i=e.get(o);return typeof i>"u"&&(i=t.apply(this,n),e.set(o,i)),i}function nt(t,e,r,n,o){return r.bind(e,t,n,o)}function gr(t,e){var r=t.length===1?Ct:Mt;return nt(t,this,r,e.cache.create(),e.serializer)}function dr(t,e){return nt(t,this,Mt,e.cache.create(),e.serializer)}function _r(t,e){return nt(t,this,Ct,e.cache.create(),e.serializer)}var Er=function(){return JSON.stringify(arguments)};function ot(){this.cache=Object.create(null)}ot.prototype.get=function(t){return this.cache[t]},ot.prototype.set=function(t,e){this.cache[t]=e};var yr={create:function(){return new ot}},O={variadic:dr,monadic:_r},C;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(C||(C={}));var w=function(t){R(e,t);function e(r,n,o){var i=t.call(this,r)||this;return i.code=n,i.originalMessage=o,i}return e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),wt=function(t){R(e,t);function e(r,n,o,i){return t.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(o).join('", "'),'"'),C.INVALID_VALUE,i)||this}return e}(w),br=function(t){R(e,t);function e(r,n,o){return t.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),C.INVALID_VALUE,o)||this}return e}(w),vr=function(t){R(e,t);function e(r,n){return t.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),C.MISSING_VALUE,n)||this}return e}(w),H;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(H||(H={}));function Tr(t){return t.length<2?t:t.reduce(function(e,r){var n=e[e.length-1];return!n||n.type!==H.literal||r.type!==H.literal?e.push(r):n.value+=r.value,e},[])}function Br(t){return typeof t=="function"}function X(t,e,r,n,o,i,a){if(t.length===1&&ft(t[0]))return[{type:H.literal,value:t[0].value}];for(var s=[],h=0,l=t;h<l.length;h++){var c=l[h];if(ft(c)){s.push({type:H.literal,value:c.value});continue}if(Fe(c)){typeof i=="number"&&s.push({type:H.literal,value:r.getNumberFormat(e).format(i)});continue}var f=c.value;if(!(o&&f in o))throw new vr(f,a);var p=o[f];if(Ue(c)){(!p||typeof p=="string"||typeof p=="number")&&(p=typeof p=="string"||typeof p=="number"?String(p):""),s.push({type:typeof p=="string"?H.literal:H.object,value:p});continue}if(mt(c)){var d=typeof c.style=="string"?n.date[c.style]:W(c.style)?c.style.parsedOptions:void 0;s.push({type:H.literal,value:r.getDateTimeFormat(e,d).format(p)});continue}if(gt(c)){var d=typeof c.style=="string"?n.time[c.style]:W(c.style)?c.style.parsedOptions:n.time.medium;s.push({type:H.literal,value:r.getDateTimeFormat(e,d).format(p)});continue}if(pt(c)){var d=typeof c.style=="string"?n.number[c.style]:yt(c.style)?c.style.parsedOptions:void 0;d&&d.scale&&(p=p*(d.scale||1)),s.push({type:H.literal,value:r.getNumberFormat(e,d).format(p)});continue}if(Et(c)){var b=c.children,E=c.value,v=o[E];if(!Br(v))throw new br(E,"function",a);var T=X(b,e,r,n,o,i),N=v(T.map(function(F){return F.value}));Array.isArray(N)||(N=[N]),s.push.apply(s,N.map(function(F){return{type:typeof F=="string"?H.literal:H.object,value:F}}))}if(dt(c)){var S=c.options[p]||c.options.other;if(!S)throw new wt(c.value,p,Object.keys(c.options),a);s.push.apply(s,X(S.value,e,r,n,o));continue}if(_t(c)){var S=c.options["=".concat(p)];if(!S){if(!Intl.PluralRules)throw new w(`Intl.PluralRules is not available in this environment.
|
|
1
|
+
(function(I,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],h):(I=typeof globalThis<"u"?globalThis:I||self,h(I["kong-ui-public-document-viewer"]={},I.Vue))})(this,function(I,h){"use strict";var D=(t=>(t.header="header",t.body="body",t.footer="footer",t))(D||{}),j=(t=>(t.left="left",t.center="center",t.right="right",t))(j||{});function lt(t){return t.type==="text"}const yn="",N=(t,e)=>{const r=t.__vccOpts||t;for(const[n,o]of e)r[n]=o;return r},Jt={};function te(t,e){return h.openBlock(),h.createElementBlock("blockquote",null,[h.renderSlot(t.$slots,"default",{},void 0,!0)])}const ee=N(Jt,[["render",te],["__scopeId","data-v-8e8713de"]]),bn="",re={};function ne(t,e){return h.openBlock(),h.createElementBlock("code",null,[h.renderSlot(t.$slots,"default",{},void 0,!0)])}const oe=N(re,[["render",ne],["__scopeId","data-v-015a6bbb"]]),vn="",ie={};function ae(t,e){return h.openBlock(),h.createElementBlock("pre",null,[h.createElementVNode("code",null,[h.renderSlot(t.$slots,"default",{},void 0,!0)])])}const se=N(ie,[["render",ae],["__scopeId","data-v-7d7d103e"]]),ce=h.defineComponent({__name:"Emphasis",props:{level:{type:Number,default:1,validator(t){if(!Number.isInteger(t))return!1;const e=t;return e>0&&e<3}}},setup(t){const r=t.level===1?"em":"strong";return(n,o)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(h.unref(r)),null,{default:h.withCtx(()=>[h.renderSlot(n.$slots,"default")]),_:3}))}}),le=h.defineComponent({__name:"Heading",props:{level:{type:Number,validator(t){if(!Number.isInteger(t))return!1;const e=t;return e>0&&e<7},default:1},slug:{type:String,default:""}},setup(t){const e=t,r=`${e.slug}`,n=`h${e.level}`;return(o,i)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n),{id:r},{default:h.withCtx(()=>[h.renderSlot(o.$slots,"default",{},void 0,!0)]),_:3}))}}),Tn="",ue=N(le,[["__scopeId","data-v-2a3c189f"]]),he=["alt","src","title"],fe=h.defineComponent({__name:"Image",props:{url:{type:String,required:!0},alt:{type:String,default:""},title:{type:String,default:""}},setup(t){return(e,r)=>(h.openBlock(),h.createElementBlock("figure",null,[h.createElementVNode("img",{alt:t.alt,src:t.url,title:t.title},null,8,he),h.createElementVNode("figcaption",null,[h.renderSlot(e.$slots,"default")])]))}}),pe={};function me(t,e){return h.openBlock(),h.createElementBlock("hr")}const ge=N(pe,[["render",me]]),de={};function _e(t,e){return h.openBlock(),h.createElementBlock("table",null,[h.renderSlot(t.$slots,"default")])}const Ee=N(de,[["render",_e]]),ye=h.defineComponent({__name:"TableRow",props:{section:{type:String,default:D.body}},setup(t){const e=t;let r;return e.section===D.header?r="thead":e.section===D.body?r="tbody":e.section===D.footer&&(r="tfoot"),(n,o)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(h.unref(r)),null,{default:h.withCtx(()=>[h.renderSlot(n.$slots,"default")]),_:3}))}}),be=h.defineComponent({__name:"TableCell",props:{align:{type:String,default:j.left},parent:{type:Object,required:!0}},setup(t){var o;const e=t,r=((o=e.parent)==null?void 0:o.section)===D.header?"th":"td";let n;return e.align===j.center?n="align-center":e.align===j.right&&(n="align-right"),(i,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(h.unref(r)),{class:h.normalizeClass(h.unref(n))},{default:h.withCtx(()=>[h.renderSlot(i.$slots,"default",{},void 0,!0)]),_:3},8,["class"]))}}),Bn="",ve=N(be,[["__scopeId","data-v-6da63f53"]]),Te={key:0},Be={inheritAttrs:!1},Se=h.defineComponent({...Be,__name:"Text",props:{text:{type:String,required:!0},appendSpace:{type:Boolean,default:!1}},setup(t){return(e,r)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createTextVNode(h.toDisplayString(t.text),1),t.appendSpace?(h.openBlock(),h.createElementBlock("span",Te," ")):h.createCommentVNode("",!0)],64))}}),He={};function Ae(t,e){return h.openBlock(),h.createElementBlock("span",null,[h.renderSlot(t.$slots,"default")])}const Ie=N(He,[["render",Ae]]),Sn="",Ne={};function Re(t,e){return h.openBlock(),h.createElementBlock("p",null,[h.renderSlot(t.$slots,"default",{},void 0,!0)])}const Pe=N(Ne,[["render",Re],["__scopeId","data-v-c7681718"]]),Le=h.defineComponent({__name:"List",props:{isOrdered:{type:Boolean,default:!1}},setup(t){const r=t.isOrdered?"ol":"ul";return(n,o)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(h.unref(r)),null,{default:h.withCtx(()=>[h.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}))}}),Hn="",Oe=N(Le,[["__scopeId","data-v-f52e8277"]]),Ce={};function Me(t,e){return h.openBlock(),h.createElementBlock("li",null,[h.renderSlot(t.$slots,"default")])}const we=N(Ce,[["render",Me]]),De=["href","title"],ke=h.defineComponent({__name:"Link",props:{href:{type:String,required:!0},title:{type:String,default:""}},setup(t){return(e,r)=>(h.openBlock(),h.createElementBlock("a",{href:t.href,rel:"noreferrer noopener nofollow",title:t.title},[h.renderSlot(e.$slots,"default",{},void 0,!0)],8,De))}}),An="",Ue={blockquote:ee,code:oe,code_block:se,emphasis:ce,heading:ue,image:fe,line_break:ge,link:N(ke,[["__scopeId","data-v-9b27e235"]]),list:Oe,list_item:we,paragraph:Pe,table:Ee,table_row:ye,table_cell:ve,text:Se,text_block:Ie},ut=[];function Fe(t){ut.indexOf(t)===-1&&(ut.push(t),console.warn(`[DocumentViewer] Unable to render an unknown node type "${t}"`))}function ht(t,e){return t.map(r=>{if(!r)return null;const{type:n,children:o,...i}=r,a=Ue[r.type];if(!a)return Fe(n),null;if((r==null?void 0:r.type)==="paragraph"&&(r!=null&&r.children)){const s=r.children,u=s.length-1;s.forEach((l,c)=>{var f;lt(l)&&!((f=l.text)!=null&&f.endsWith(" "))&&c!==u&&(l.appendSpace=!0)})}return h.createVNode(a,h.mergeProps(i,{parent:e}),{default:()=>o&&ht(o,r)})})}var Y=function(t,e){return Y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Y(t,e)};function P(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Y(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var m=function(){return m=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},m.apply(this,arguments)};function Ge(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}function M(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,i;n<o;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}var g;(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(g||(g={}));var y;(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(y||(y={}));var G;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(G||(G={}));function ft(t){return t.type===y.literal}function je(t){return t.type===y.argument}function pt(t){return t.type===y.number}function mt(t){return t.type===y.date}function gt(t){return t.type===y.time}function dt(t){return t.type===y.select}function _t(t){return t.type===y.plural}function xe(t){return t.type===y.pound}function Et(t){return t.type===y.tag}function yt(t){return!!(t&&typeof t=="object"&&t.type===G.number)}function W(t){return!!(t&&typeof t=="object"&&t.type===G.dateTime)}var bt=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Ve=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function $e(t){var e={};return t.replace(Ve,function(r){var n=r.length;switch(r[0]){case"G":e.era=n===4?"long":n===5?"narrow":"short";break;case"y":e.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=n===4?"short":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][n-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][n-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][n-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][n-1];break;case"s":e.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e}var Xe=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Ke(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var e=t.split(Xe).filter(function(p){return p.length>0}),r=[],n=0,o=e;n<o.length;n++){var i=o[n],a=i.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var s=a[0],u=a.slice(1),l=0,c=u;l<c.length;l++){var f=c[l];if(f.length===0)throw new Error("Invalid number skeleton")}r.push({stem:s,options:u})}return r}function Ze(t){return t.replace(/^(.*?)-/,"")}var vt=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Tt=/^(@+)?(\+|#+)?[rs]?$/g,qe=/(\*)(0+)|(#+)(0+)|(0+)/g,Bt=/^(0+)$/;function St(t){var e={};return t[t.length-1]==="r"?e.roundingPriority="morePrecision":t[t.length-1]==="s"&&(e.roundingPriority="lessPrecision"),t.replace(Tt,function(r,n,o){return typeof o!="string"?(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length):o==="+"?e.minimumSignificantDigits=n.length:n[0]==="#"?e.maximumSignificantDigits=n.length:(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length+(typeof o=="string"?o.length:0)),""}),e}function Ht(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Ye(t){var e;if(t[0]==="E"&&t[1]==="E"?(e={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(e={notation:"scientific"},t=t.slice(1)),e){var r=t.slice(0,2);if(r==="+!"?(e.signDisplay="always",t=t.slice(2)):r==="+?"&&(e.signDisplay="exceptZero",t=t.slice(2)),!Bt.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function At(t){var e={},r=Ht(t);return r||e}function We(t){for(var e={},r=0,n=t;r<n.length;r++){var o=n[r];switch(o.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=o.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=Ze(o.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=m(m(m({},e),{notation:"scientific"}),o.options.reduce(function(u,l){return m(m({},u),At(l))},{}));continue;case"engineering":e=m(m(m({},e),{notation:"engineering"}),o.options.reduce(function(u,l){return m(m({},u),At(l))},{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(o.options[0]);continue;case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(qe,function(u,l,c,f,p,d){if(l)e.minimumIntegerDigits=c.length;else{if(f&&p)throw new Error("We currently do not support maximum integer digits");if(d)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Bt.test(o.stem)){e.minimumIntegerDigits=o.stem.length;continue}if(vt.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(vt,function(u,l,c,f,p,d){return c==="*"?e.minimumFractionDigits=l.length:f&&f[0]==="#"?e.maximumFractionDigits=f.length:p&&d?(e.minimumFractionDigits=p.length,e.maximumFractionDigits=p.length+d.length):(e.minimumFractionDigits=l.length,e.maximumFractionDigits=l.length),""});var i=o.options[0];i==="w"?e=m(m({},e),{trailingZeroDisplay:"stripIfInteger"}):i&&(e=m(m({},e),St(i)));continue}if(Tt.test(o.stem)){e=m(m({},e),St(o.stem));continue}var a=Ht(o.stem);a&&(e=m(m({},e),a));var s=Ye(o.stem);s&&(e=m(m({},e),s))}return e}var $={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function ze(t,e){for(var r="",n=0;n<t.length;n++){var o=t.charAt(n);if(o==="j"){for(var i=0;n+1<t.length&&t.charAt(n+1)===o;)i++,n++;var a=1+(i&1),s=i<2?1:3+(i>>1),u="a",l=Qe(e);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=u;for(;a-- >0;)r=l+r}else o==="J"?r+="H":r+=o}return r}function Qe(t){var e=t.hourCycle;if(e===void 0&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=t.language,n;r!=="root"&&(n=t.maximize().region);var o=$[n||""]||$[r||""]||$["".concat(r,"-001")]||$["001"];return o[0]}var z,Je=new RegExp("^".concat(bt.source,"*")),tr=new RegExp("".concat(bt.source,"*$"));function _(t,e){return{start:t,end:e}}var er=!!String.prototype.startsWith,rr=!!String.fromCodePoint,nr=!!Object.fromEntries,or=!!String.prototype.codePointAt,ir=!!String.prototype.trimStart,ar=!!String.prototype.trimEnd,sr=!!Number.isSafeInteger,cr=sr?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Q=!0;try{var lr=Pt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Q=((z=lr.exec("a"))===null||z===void 0?void 0:z[0])==="a"}catch{Q=!1}var It=er?function(t,e,r){return t.startsWith(e,r)}:function(t,e,r){return t.slice(r,r+e.length)===e},J=rr?String.fromCodePoint:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r="",n=t.length,o=0,i;n>o;){if(i=t[o++],i>1114111)throw RangeError(i+" is not a valid code point");r+=i<65536?String.fromCharCode(i):String.fromCharCode(((i-=65536)>>10)+55296,i%1024+56320)}return r},Nt=nr?Object.fromEntries:function(t){for(var e={},r=0,n=t;r<n.length;r++){var o=n[r],i=o[0],a=o[1];e[i]=a}return e},Rt=or?function(t,e){return t.codePointAt(e)}:function(t,e){var r=t.length;if(!(e<0||e>=r)){var n=t.charCodeAt(e),o;return n<55296||n>56319||e+1===r||(o=t.charCodeAt(e+1))<56320||o>57343?n:(n-55296<<10)+(o-56320)+65536}},ur=ir?function(t){return t.trimStart()}:function(t){return t.replace(Je,"")},hr=ar?function(t){return t.trimEnd()}:function(t){return t.replace(tr,"")};function Pt(t,e){return new RegExp(t,e)}var tt;if(Q){var Lt=Pt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");tt=function(t,e){var r;Lt.lastIndex=e;var n=Lt.exec(t);return(r=n[1])!==null&&r!==void 0?r:""}}else tt=function(t,e){for(var r=[];;){var n=Rt(t,e);if(n===void 0||Ot(n)||gr(n))break;r.push(n),e+=n>=65536?2:1}return J.apply(void 0,r)};var fr=function(){function t(e,r){r===void 0&&(r={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(e,r,n){for(var o=[];!this.isEOF();){var i=this.char();if(i===123){var a=this.parseArgument(e,n);if(a.err)return a;o.push(a.val)}else{if(i===125&&e>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),o.push({type:y.pound,location:_(s,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(g.UNMATCHED_CLOSING_TAG,_(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&et(this.peek()||0)){var a=this.parseTag(e,r);if(a.err)return a;o.push(a.val)}else{var a=this.parseLiteral(e,r);if(a.err)return a;o.push(a.val)}}}return{val:o,err:null}},t.prototype.parseTag=function(e,r){var n=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:y.literal,value:"<".concat(o,"/>"),location:_(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,r,!0);if(i.err)return i;var a=i.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!et(this.char()))return this.error(g.INVALID_TAG,_(s,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return o!==l?this.error(g.UNMATCHED_CLOSING_TAG,_(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:y.tag,value:o,children:a,location:_(n,this.clonePosition())},err:null}:this.error(g.INVALID_TAG,_(s,this.clonePosition())))}else return this.error(g.UNCLOSED_TAG,_(n,this.clonePosition()))}else return this.error(g.INVALID_TAG,_(n,this.clonePosition()))},t.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&mr(this.char());)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(e,r){for(var n=this.clonePosition(),o="";;){var i=this.tryParseQuote(r);if(i){o+=i;continue}var a=this.tryParseUnquoted(e,r);if(a){o+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){o+=s;continue}break}var u=_(n,this.clonePosition());return{val:{type:y.literal,value:o,location:u},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!pr(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return J.apply(void 0,r)},t.prototype.tryParseUnquoted=function(e,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&e>0?null:(this.bump(),J(n))},t.prototype.parseArgument=function(e,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,_(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(g.EMPTY_ARGUMENT,_(n,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(g.MALFORMED_ARGUMENT,_(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,_(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:y.argument,value:o,location:_(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,_(n,this.clonePosition())):this.parseArgumentOptions(e,r,o,n);default:return this.error(g.MALFORMED_ARGUMENT,_(n,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),r=this.offset(),n=tt(this.message,r),o=r+n.length;this.bumpTo(o);var i=this.clonePosition(),a=_(e,i);return{value:n,location:a}},t.prototype.parseArgumentOptions=function(e,r,n,o){var i,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(s){case"":return this.error(g.EXPECT_ARGUMENT_TYPE,_(a,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var p=hr(f.val);if(p.length===0)return this.error(g.EXPECT_ARGUMENT_STYLE,_(this.clonePosition(),this.clonePosition()));var d=_(c,this.clonePosition());l={style:p,styleLocation:d}}var b=this.tryParseArgumentClose(o);if(b.err)return b;var E=_(o,this.clonePosition());if(l&&It(l==null?void 0:l.style,"::",0)){var v=ur(l.style.slice(2));if(s==="number"){var f=this.parseNumberSkeletonFromString(v,l.styleLocation);return f.err?f:{val:{type:y.number,value:n,location:E,style:f.val},err:null}}else{if(v.length===0)return this.error(g.EXPECT_DATE_TIME_SKELETON,E);var T=v;this.locale&&(T=ze(v,this.locale));var p={type:G.dateTime,pattern:T,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?$e(T):{}},R=s==="date"?y.date:y.time;return{val:{type:R,value:n,location:E,style:p},err:null}}}return{val:{type:s==="number"?y.number:s==="date"?y.date:y.time,value:n,location:E,style:(i=l==null?void 0:l.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var S=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(g.EXPECT_SELECT_ARGUMENT_OPTIONS,_(S,m({},S)));this.bumpSpace();var V=this.parseIdentifierIfPossible(),F=0;if(s!=="select"&&V.value==="offset"){if(!this.bumpIf(":"))return this.error(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,_(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,g.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),V=this.parseIdentifierIfPossible(),F=f.val}var q=this.tryParsePluralOrSelectOptions(e,s,r,V);if(q.err)return q;var b=this.tryParseArgumentClose(o);if(b.err)return b;var Qt=_(o,this.clonePosition());return s==="select"?{val:{type:y.select,value:n,options:Nt(q.val),location:Qt},err:null}:{val:{type:y.plural,value:n,options:Nt(q.val),offset:F,pluralType:s==="plural"?"cardinal":"ordinal",location:Qt},err:null}}default:return this.error(g.INVALID_ARGUMENT_TYPE,_(a,u))}},t.prototype.tryParseArgumentClose=function(e){return this.isEOF()||this.char()!==125?this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,_(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var o=this.clonePosition();if(!this.bumpUntil("'"))return this.error(g.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,_(o,this.clonePosition()));this.bump();break}case 123:{e+=1,this.bump();break}case 125:{if(e>0)e-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(e,r){var n=[];try{n=Ke(e)}catch{return this.error(g.INVALID_NUMBER_SKELETON,r)}return{val:{type:G.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?We(n):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(e,r,n,o){for(var i,a=!1,s=[],u=new Set,l=o.value,c=o.location;;){if(l.length===0){var f=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var p=this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_SELECTOR,g.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;c=_(f,this.clonePosition()),l=this.message.slice(f.offset,this.offset())}else break}if(u.has(l))return this.error(r==="select"?g.DUPLICATE_SELECT_ARGUMENT_SELECTOR:g.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);l==="other"&&(a=!0),this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?g.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:g.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,_(this.clonePosition(),this.clonePosition()));var b=this.parseMessage(e+1,r,n);if(b.err)return b;var E=this.tryParseArgumentClose(d);if(E.err)return E;s.push([l,{value:b.val,location:_(d,this.clonePosition())}]),u.add(l),this.bumpSpace(),i=this.parseIdentifierIfPossible(),l=i.value,c=i.location}return s.length===0?this.error(r==="select"?g.EXPECT_SELECT_ARGUMENT_SELECTOR:g.EXPECT_PLURAL_ARGUMENT_SELECTOR,_(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(g.MISSING_OTHER_CLAUSE,_(this.clonePosition(),this.clonePosition())):{val:s,err:null}},t.prototype.tryParseDecimalInteger=function(e,r){var n=1,o=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)i=!0,a=a*10+(s-48),this.bump();else break}var u=_(o,this.clonePosition());return i?(a*=n,cr(a)?{val:a,err:null}:this.error(r,u)):this.error(e,u)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var r=Rt(this.message,e);if(r===void 0)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return r},t.prototype.error=function(e,r){return{val:null,err:{kind:e,message:this.message,location:r}}},t.prototype.bump=function(){if(!this.isEOF()){var e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},t.prototype.bumpIf=function(e){if(It(this.message,e,this.offset())){for(var r=0;r<e.length;r++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(e){var r=this.offset(),n=this.message.indexOf(e,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var r=this.offset();if(r===e)break;if(r>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&Ot(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(e>=65536?2:1));return n??null},t}();function et(t){return t>=97&&t<=122||t>=65&&t<=90}function pr(t){return et(t)||t===47}function mr(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function Ot(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function gr(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function rt(t){t.forEach(function(e){if(delete e.location,dt(e)||_t(e))for(var r in e.options)delete e.options[r].location,rt(e.options[r].value);else pt(e)&&yt(e.style)||(mt(e)||gt(e))&&W(e.style)?delete e.style.location:Et(e)&&rt(e.children)})}function dr(t,e){e===void 0&&(e={}),e=m({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var r=new fr(t,e).parse();if(r.err){var n=SyntaxError(g[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return e!=null&&e.captureLocation||rt(r.val),r.val}function L(t,e){var r=e&&e.cache?e.cache:Tr,n=e&&e.serializer?e.serializer:vr,o=e&&e.strategy?e.strategy:Er;return o(t,{cache:r,serializer:n})}function _r(t){return t==null||typeof t=="number"||typeof t=="boolean"}function Ct(t,e,r,n){var o=_r(n)?n:r(n),i=e.get(o);return typeof i>"u"&&(i=t.call(this,n),e.set(o,i)),i}function Mt(t,e,r){var n=Array.prototype.slice.call(arguments,3),o=r(n),i=e.get(o);return typeof i>"u"&&(i=t.apply(this,n),e.set(o,i)),i}function nt(t,e,r,n,o){return r.bind(e,t,n,o)}function Er(t,e){var r=t.length===1?Ct:Mt;return nt(t,this,r,e.cache.create(),e.serializer)}function yr(t,e){return nt(t,this,Mt,e.cache.create(),e.serializer)}function br(t,e){return nt(t,this,Ct,e.cache.create(),e.serializer)}var vr=function(){return JSON.stringify(arguments)};function ot(){this.cache=Object.create(null)}ot.prototype.get=function(t){return this.cache[t]},ot.prototype.set=function(t,e){this.cache[t]=e};var Tr={create:function(){return new ot}},O={variadic:yr,monadic:br},C;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(C||(C={}));var w=function(t){P(e,t);function e(r,n,o){var i=t.call(this,r)||this;return i.code=n,i.originalMessage=o,i}return e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),wt=function(t){P(e,t);function e(r,n,o,i){return t.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(o).join('", "'),'"'),C.INVALID_VALUE,i)||this}return e}(w),Br=function(t){P(e,t);function e(r,n,o){return t.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),C.INVALID_VALUE,o)||this}return e}(w),Sr=function(t){P(e,t);function e(r,n){return t.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),C.MISSING_VALUE,n)||this}return e}(w),H;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(H||(H={}));function Hr(t){return t.length<2?t:t.reduce(function(e,r){var n=e[e.length-1];return!n||n.type!==H.literal||r.type!==H.literal?e.push(r):n.value+=r.value,e},[])}function Ar(t){return typeof t=="function"}function X(t,e,r,n,o,i,a){if(t.length===1&&ft(t[0]))return[{type:H.literal,value:t[0].value}];for(var s=[],u=0,l=t;u<l.length;u++){var c=l[u];if(ft(c)){s.push({type:H.literal,value:c.value});continue}if(xe(c)){typeof i=="number"&&s.push({type:H.literal,value:r.getNumberFormat(e).format(i)});continue}var f=c.value;if(!(o&&f in o))throw new Sr(f,a);var p=o[f];if(je(c)){(!p||typeof p=="string"||typeof p=="number")&&(p=typeof p=="string"||typeof p=="number"?String(p):""),s.push({type:typeof p=="string"?H.literal:H.object,value:p});continue}if(mt(c)){var d=typeof c.style=="string"?n.date[c.style]:W(c.style)?c.style.parsedOptions:void 0;s.push({type:H.literal,value:r.getDateTimeFormat(e,d).format(p)});continue}if(gt(c)){var d=typeof c.style=="string"?n.time[c.style]:W(c.style)?c.style.parsedOptions:n.time.medium;s.push({type:H.literal,value:r.getDateTimeFormat(e,d).format(p)});continue}if(pt(c)){var d=typeof c.style=="string"?n.number[c.style]:yt(c.style)?c.style.parsedOptions:void 0;d&&d.scale&&(p=p*(d.scale||1)),s.push({type:H.literal,value:r.getNumberFormat(e,d).format(p)});continue}if(Et(c)){var b=c.children,E=c.value,v=o[E];if(!Ar(v))throw new Br(E,"function",a);var T=X(b,e,r,n,o,i),R=v(T.map(function(F){return F.value}));Array.isArray(R)||(R=[R]),s.push.apply(s,R.map(function(F){return{type:typeof F=="string"?H.literal:H.object,value:F}}))}if(dt(c)){var S=c.options[p]||c.options.other;if(!S)throw new wt(c.value,p,Object.keys(c.options),a);s.push.apply(s,X(S.value,e,r,n,o));continue}if(_t(c)){var S=c.options["=".concat(p)];if(!S){if(!Intl.PluralRules)throw new w(`Intl.PluralRules is not available in this environment.
|
|
2
2
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
|
-
`,C.MISSING_INTL_API,a);var V=r.getPluralRules(e,{type:c.pluralType}).select(p-(c.offset||0));S=c.options[V]||c.options.other}if(!S)throw new wt(c.value,p,Object.keys(c.options),a);s.push.apply(s,X(S.value,e,r,n,o,p-(c.offset||0)));continue}}return
|
|
3
|
+
`,C.MISSING_INTL_API,a);var V=r.getPluralRules(e,{type:c.pluralType}).select(p-(c.offset||0));S=c.options[V]||c.options.other}if(!S)throw new wt(c.value,p,Object.keys(c.options),a);s.push.apply(s,X(S.value,e,r,n,o,p-(c.offset||0)));continue}}return Hr(s)}function Ir(t,e){return e?m(m(m({},t||{}),e||{}),Object.keys(t).reduce(function(r,n){return r[n]=m(m({},t[n]),e[n]||{}),r},{})):t}function Nr(t,e){return e?Object.keys(t).reduce(function(r,n){return r[n]=Ir(t[n],e[n]),r},m({},t)):t}function it(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,r){t[e]=r}}}}}function Rr(t){return t===void 0&&(t={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:L(function(){for(var e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,M([void 0],r,!1)))},{cache:it(t.number),strategy:O.variadic}),getDateTimeFormat:L(function(){for(var e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,M([void 0],r,!1)))},{cache:it(t.dateTime),strategy:O.variadic}),getPluralRules:L(function(){for(var e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,M([void 0],r,!1)))},{cache:it(t.pluralRules),strategy:O.variadic})}}var Dt=function(){function t(e,r,n,o){r===void 0&&(r=t.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var l=i.formatToParts(u);if(l.length===1)return l[0].value;var c=l.reduce(function(f,p){return!f.length||p.type!==H.literal||typeof f[f.length-1]!="string"?f.push(p.value):f[f.length-1]+=p.value,f},[]);return c.length<=1?c[0]||"":c},this.formatToParts=function(u){return X(i.ast,i.locales,i.formatters,i.formats,u,void 0,i.message)},this.resolvedOptions=function(){var u;return{locale:((u=i.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(i.locales)[0]}},this.getAst=function(){return i.ast},this.locales=r,this.resolvedLocale=t.resolveLocale(r),typeof e=="string"){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var a=o||{};a.formatters;var s=Ge(a,["formatters"]);this.ast=t.__parse(e,m(m({},s),{locale:this.resolvedLocale}))}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Nr(t.formats,n),this.formatters=o&&o.formatters||Rr(this.formatterCache)}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(e){if(!(typeof Intl.Locale>"u")){var r=Intl.NumberFormat.supportedLocalesOf(e);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof e=="string"?e:e[0])}},t.__parse=dr,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t}(),B;(function(t){t.FORMAT_ERROR="FORMAT_ERROR",t.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",t.INVALID_CONFIG="INVALID_CONFIG",t.MISSING_DATA="MISSING_DATA",t.MISSING_TRANSLATION="MISSING_TRANSLATION"})(B||(B={}));var A=function(t){P(e,t);function e(r,n,o){var i=this,a=o?o instanceof Error?o:new Error(String(o)):void 0;return i=t.call(this,"[@formatjs/intl Error ".concat(r,"] ").concat(n,`
|
|
4
4
|
`).concat(a?`
|
|
5
5
|
`.concat(a.message,`
|
|
6
|
-
`).concat(a.stack):""))||this,i.code=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(i,e),i}return e}(Error),
|
|
6
|
+
`).concat(a.stack):""))||this,i.code=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(i,e),i}return e}(Error),Pr=function(t){P(e,t);function e(r,n){return t.call(this,B.UNSUPPORTED_FORMATTER,r,n)||this}return e}(A),Lr=function(t){P(e,t);function e(r,n){return t.call(this,B.INVALID_CONFIG,r,n)||this}return e}(A),kt=function(t){P(e,t);function e(r,n){return t.call(this,B.MISSING_DATA,r,n)||this}return e}(A),at=function(t){P(e,t);function e(r,n,o){return t.call(this,B.FORMAT_ERROR,"".concat(r,`
|
|
7
7
|
Locale: `).concat(n,`
|
|
8
|
-
`),o)||this}return e}(A),st=function(t){
|
|
8
|
+
`),o)||this}return e}(A),st=function(t){P(e,t);function e(r,n,o,i){var a=t.call(this,"".concat(r,`
|
|
9
9
|
MessageID: `).concat(o==null?void 0:o.id,`
|
|
10
10
|
Default Message: `).concat(o==null?void 0:o.defaultMessage,`
|
|
11
11
|
Description: `).concat(o==null?void 0:o.description,`
|
|
12
|
-
`),n,i)||this;return a.descriptor=o,a}return e}(at),
|
|
12
|
+
`),n,i)||this;return a.descriptor=o,a}return e}(at),Or=function(t){P(e,t);function e(r,n){var o=t.call(this,B.MISSING_TRANSLATION,'Missing message: "'.concat(r.id,'" for locale "').concat(n,'", using ').concat(r.defaultMessage?"default message (".concat(typeof r.defaultMessage=="string"?r.defaultMessage:r.defaultMessage.map(function(i){var a;return(a=i.value)!==null&&a!==void 0?a:JSON.stringify(i)}).join(),")"):"id"," as fallback."))||this;return o.descriptor=r,o}return e}(A);function k(t,e,r){return r===void 0&&(r={}),e.reduce(function(n,o){return o in t?n[o]=t[o]:o in r&&(n[o]=r[o]),n},{})}var Cr=function(t){process.env.NODE_ENV!=="production"&&console.error(t)},Mr=function(t){process.env.NODE_ENV!=="production"&&console.warn(t)},wr={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:Cr,onWarn:Mr};function Ut(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function U(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,r){t[e]=r}}}}}function Dr(t){t===void 0&&(t=Ut());var e=Intl.RelativeTimeFormat,r=Intl.ListFormat,n=Intl.DisplayNames,o=L(function(){for(var s,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return new((s=Intl.DateTimeFormat).bind.apply(s,M([void 0],u,!1)))},{cache:U(t.dateTime),strategy:O.variadic}),i=L(function(){for(var s,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return new((s=Intl.NumberFormat).bind.apply(s,M([void 0],u,!1)))},{cache:U(t.number),strategy:O.variadic}),a=L(function(){for(var s,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return new((s=Intl.PluralRules).bind.apply(s,M([void 0],u,!1)))},{cache:U(t.pluralRules),strategy:O.variadic});return{getDateTimeFormat:o,getNumberFormat:i,getMessageFormat:L(function(s,u,l,c){return new Dt(s,u,l,m({formatters:{getNumberFormat:i,getDateTimeFormat:o,getPluralRules:a}},c||{}))},{cache:U(t.message),strategy:O.variadic}),getRelativeTimeFormat:L(function(){for(var s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];return new(e.bind.apply(e,M([void 0],s,!1)))},{cache:U(t.relativeTime),strategy:O.variadic}),getPluralRules:a,getListFormat:L(function(){for(var s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];return new(r.bind.apply(r,M([void 0],s,!1)))},{cache:U(t.list),strategy:O.variadic}),getDisplayNames:L(function(){for(var s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];return new(n.bind.apply(n,M([void 0],s,!1)))},{cache:U(t.displayNames),strategy:O.variadic})}}function ct(t,e,r,n){var o=t&&t[e],i;if(o&&(i=o[r]),i)return i;n(new Pr("No ".concat(e," format named: ").concat(r)))}function kr(t,e,r){if(r===void 0&&(r=Error),!t)throw new r(e)}function K(t,e){return Object.keys(t).reduce(function(r,n){return r[n]=m({timeZone:e},t[n]),r},{})}function Ft(t,e){var r=Object.keys(m(m({},t),e));return r.reduce(function(n,o){return n[o]=m(m({},t[o]||{}),e[o]||{}),n},{})}function Gt(t,e){if(!e)return t;var r=Dt.formats;return m(m(m({},r),t),{date:Ft(K(r.date,e),K(t.date||{},e)),time:Ft(K(r.time,e),K(t.time||{},e))})}var jt=function(t,e,r,n,o){var i=t.locale,a=t.formats,s=t.messages,u=t.defaultLocale,l=t.defaultFormats,c=t.fallbackOnEmptyString,f=t.onError,p=t.timeZone,d=t.defaultRichTextElements;r===void 0&&(r={id:""});var b=r.id,E=r.defaultMessage;kr(!!b,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var v=String(b),T=s&&Object.prototype.hasOwnProperty.call(s,v)&&s[v];if(Array.isArray(T)&&T.length===1&&T[0].type===y.literal)return T[0].value;if(!n&&T&&typeof T=="string"&&!d)return T.replace(/'\{(.*?)\}'/gi,"{$1}");if(n=m(m({},d),n||{}),a=Gt(a,p),l=Gt(l,p),!T){if(c===!1&&T==="")return T;if((!E||i&&i.toLowerCase()!==u.toLowerCase())&&f(new Or(r,i)),E)try{var R=e.getMessageFormat(E,u,l,o);return R.format(n)}catch(S){return f(new st('Error formatting default message for: "'.concat(v,'", rendering default message verbatim'),i,r,S)),typeof E=="string"?E:v}return v}try{var R=e.getMessageFormat(T,i,a,m({formatters:e},o||{}));return R.format(n)}catch(S){f(new st('Error formatting message: "'.concat(v,'", using ').concat(E?"default message":"id"," as fallback."),i,r,S))}if(E)try{var R=e.getMessageFormat(E,u,l,o);return R.format(n)}catch(S){f(new st('Error formatting the default message for: "'.concat(v,'", rendering message verbatim'),i,r,S))}return typeof T=="string"?T:typeof E=="string"?E:v},xt=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function Z(t,e,r,n){var o=t.locale,i=t.formats,a=t.onError,s=t.timeZone;n===void 0&&(n={});var u=n.format,l=m(m({},s&&{timeZone:s}),u&&ct(i,e,u,a)),c=k(n,xt,l);return e==="time"&&!c.hour&&!c.minute&&!c.second&&!c.timeStyle&&!c.dateStyle&&(c=m(m({},c),{hour:"numeric",minute:"numeric"})),r(o,c)}function Ur(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=r[0],i=r[1],a=i===void 0?{}:i,s=typeof o=="string"?new Date(o||0):o;try{return Z(t,"date",e,a).format(s)}catch(u){t.onError(new A(B.FORMAT_ERROR,"Error formatting date.",u))}return String(s)}function Fr(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=r[0],i=r[1],a=i===void 0?{}:i,s=typeof o=="string"?new Date(o||0):o;try{return Z(t,"time",e,a).format(s)}catch(u){t.onError(new A(B.FORMAT_ERROR,"Error formatting time.",u))}return String(s)}function Gr(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=r[0],i=r[1],a=r[2],s=a===void 0?{}:a,u=t.timeZone,l=t.locale,c=t.onError,f=k(s,xt,u?{timeZone:u}:{});try{return e(l,f).formatRange(o,i)}catch(p){c(new A(B.FORMAT_ERROR,"Error formatting date time range.",p))}return String(o)}function jr(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=r[0],i=r[1],a=i===void 0?{}:i,s=typeof o=="string"?new Date(o||0):o;try{return Z(t,"date",e,a).formatToParts(s)}catch(u){t.onError(new A(B.FORMAT_ERROR,"Error formatting date.",u))}return[]}function xr(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=r[0],i=r[1],a=i===void 0?{}:i,s=typeof o=="string"?new Date(o||0):o;try{return Z(t,"time",e,a).formatToParts(s)}catch(u){t.onError(new A(B.FORMAT_ERROR,"Error formatting time.",u))}return[]}var Vr=["style","type","fallback","languageDisplay"];function $r(t,e,r,n){var o=t.locale,i=t.onError,a=Intl.DisplayNames;a||i(new w(`Intl.DisplayNames is not available in this environment.
|
|
13
13
|
Try polyfilling it using "@formatjs/intl-displaynames"
|
|
14
|
-
`,C.MISSING_INTL_API));var s=k(n,
|
|
14
|
+
`,C.MISSING_INTL_API));var s=k(n,Vr);try{return e(o,s).of(r)}catch(u){i(new A(B.FORMAT_ERROR,"Error formatting display name.",u))}}var Xr=["type","style"],Vt=Date.now();function Kr(t){return"".concat(Vt,"_").concat(t,"_").concat(Vt)}function Zr(t,e,r,n){n===void 0&&(n={});var o=$t(t,e,r,n).reduce(function(i,a){var s=a.value;return typeof s!="string"?i.push(s):typeof i[i.length-1]=="string"?i[i.length-1]+=s:i.push(s),i},[]);return o.length===1?o[0]:o.length===0?"":o}function $t(t,e,r,n){var o=t.locale,i=t.onError;n===void 0&&(n={});var a=Intl.ListFormat;a||i(new w(`Intl.ListFormat is not available in this environment.
|
|
15
15
|
Try polyfilling it using "@formatjs/intl-listformat"
|
|
16
|
-
`,C.MISSING_INTL_API));var s=k(n,
|
|
16
|
+
`,C.MISSING_INTL_API));var s=k(n,Xr);try{var u={},l=r.map(function(c,f){if(typeof c=="object"){var p=Kr(f);return u[p]=c,p}return String(c)});return e(o,s).formatToParts(l).map(function(c){return c.type==="literal"?c:m(m({},c),{value:u[c.value]||c.value})})}catch(c){i(new A(B.FORMAT_ERROR,"Error formatting list.",c))}return r}var qr=["type"];function Yr(t,e,r,n){var o=t.locale,i=t.onError;n===void 0&&(n={}),Intl.PluralRules||i(new w(`Intl.PluralRules is not available in this environment.
|
|
17
17
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
18
|
-
`,C.MISSING_INTL_API));var a=k(n,
|
|
18
|
+
`,C.MISSING_INTL_API));var a=k(n,qr);try{return e(o,a).select(r)}catch(s){i(new at("Error formatting plural.",o,s))}return"other"}var Wr=["numeric","style"];function zr(t,e,r){var n=t.locale,o=t.formats,i=t.onError;r===void 0&&(r={});var a=r.format,s=!!a&&ct(o,"relative",a,i)||{},u=k(r,Wr,s);return e(n,u)}function Qr(t,e,r,n,o){o===void 0&&(o={}),n||(n="second");var i=Intl.RelativeTimeFormat;i||t.onError(new w(`Intl.RelativeTimeFormat is not available in this environment.
|
|
19
19
|
Try polyfilling it using "@formatjs/intl-relativetimeformat"
|
|
20
|
-
`,C.MISSING_INTL_API));try{return
|
|
20
|
+
`,C.MISSING_INTL_API));try{return zr(t,e,o).format(r,n)}catch(a){t.onError(new at("Error formatting relative time.",t.locale,a))}return String(r)}var Jr=["style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem"];function Xt(t,e,r){var n=t.locale,o=t.formats,i=t.onError;r===void 0&&(r={});var a=r.format,s=a&&ct(o,"number",a,i)||{},u=k(r,Jr,s);return e(n,u)}function tn(t,e,r,n){n===void 0&&(n={});try{return Xt(t,e,n).format(r)}catch(o){t.onError(new A(B.FORMAT_ERROR,"Error formatting number.",o))}return String(r)}function en(t,e,r,n){n===void 0&&(n={});try{return Xt(t,e,n).formatToParts(r)}catch(o){t.onError(new A(B.FORMAT_ERROR,"Error formatting number.",o))}return[]}function rn(t){var e=t?t[Object.keys(t)[0]]:void 0;return typeof e=="string"}function nn(t){t.onWarn&&t.defaultRichTextElements&&rn(t.messages||{})&&t.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
|
|
21
21
|
Please consider using "@formatjs/cli" to pre-compile your messages for performance.
|
|
22
|
-
For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function
|
|
22
|
+
For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function on(t,e){var r=Dr(e),n=m(m({},wr),t),o=n.locale,i=n.defaultLocale,a=n.onError;return o?!Intl.NumberFormat.supportedLocalesOf(o).length&&a?a(new kt('Missing locale data for locale: "'.concat(o,'" in Intl.NumberFormat. Using default locale: "').concat(i,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(o).length&&a&&a(new kt('Missing locale data for locale: "'.concat(o,'" in Intl.DateTimeFormat. Using default locale: "').concat(i,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(a&&a(new Lr('"locale" was not configured, using "'.concat(i,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),n.locale=n.defaultLocale||"en"),nn(n),m(m({},n),{formatters:r,formatNumber:tn.bind(null,n,r.getNumberFormat),formatNumberToParts:en.bind(null,n,r.getNumberFormat),formatRelativeTime:Qr.bind(null,n,r.getRelativeTimeFormat),formatDate:Ur.bind(null,n,r.getDateTimeFormat),formatDateToParts:jr.bind(null,n,r.getDateTimeFormat),formatTime:Fr.bind(null,n,r.getDateTimeFormat),formatDateTimeRange:Gr.bind(null,n,r.getDateTimeFormat),formatTimeToParts:xr.bind(null,n,r.getDateTimeFormat),formatPlural:Yr.bind(null,n,r.getPluralRules),formatMessage:jt.bind(null,n,r),$t:jt.bind(null,n,r),formatList:Zr.bind(null,n,r.getListFormat),formatListToParts:$t.bind(null,n,r.getListFormat),formatDisplayName:$r.bind(null,n,r.getDisplayNames)})}var an=x;x.flatten=x,x.unflatten=qt;function Kt(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Zt(t){return t}function x(t,e){e=e||{};const r=e.delimiter||".",n=e.maxDepth,o=e.transformKey||Zt,i={};function a(s,u,l){l=l||1,Object.keys(s).forEach(function(c){const f=s[c],p=e.safe&&Array.isArray(f),d=Object.prototype.toString.call(f),b=Kt(f),E=d==="[object Object]"||d==="[object Array]",v=u?u+r+o(c):o(c);if(!p&&!b&&E&&Object.keys(f).length&&(!e.maxDepth||l<n))return a(f,v,l+1);i[v]=f})}return a(t),i}function qt(t,e){e=e||{};const r=e.delimiter||".",n=e.overwrite||!1,o=e.transformKey||Zt,i={};if(Kt(t)||Object.prototype.toString.call(t)!=="[object Object]")return t;function a(l){const c=Number(l);return isNaN(c)||l.indexOf(".")!==-1||e.object?l:c}function s(l,c,f){return Object.keys(f).reduce(function(p,d){return p[l+r+d]=f[d],p},c)}function u(l){const c=Object.prototype.toString.call(l),f=c==="[object Array]",p=c==="[object Object]";if(l){if(f)return!l.length;if(p)return!Object.keys(l).length}else return!0}return t=Object.keys(t).reduce(function(l,c){const f=Object.prototype.toString.call(t[c]);return!(f==="[object Object]"||f==="[object Array]")||u(t[c])?(l[c]=t[c],l):s(c,l,x(t[c],e))},{}),Object.keys(t).forEach(function(l){const c=l.split(r).map(o);let f=a(c.shift()),p=a(c[0]),d=i;for(;p!==void 0;){if(f==="__proto__")return;const b=Object.prototype.toString.call(d[f]),E=b==="[object Object]"||b==="[object Array]";if(!n&&!E&&typeof d[f]<"u")return;(n&&!E||!n&&d[f]==null)&&(d[f]=typeof p=="number"&&!e.object?[]:{}),d=d[f],c.length>0&&(f=a(c.shift()),p=a(c[0]))}d[f]=qt(t[l],e)}),i}const sn=Ut(),cn=(t,e,r=!1)=>{const n=on({locale:t,messages:an.flatten(e,{safe:!0})},sn);return{t:(i,a,s)=>n.formatMessage({id:i},a,s),te:i=>!!n.messages[i],tm:i=>n.messages[i]||[],...n,source:e}},ln=t=>h.defineComponent({name:"I18nT",props:{keypath:{type:String,required:!0},tag:{type:String,default:"span"}},setup(e,{slots:r}){const n=o=>{if(!o)return[];const i=/(\{[^}]+\})/g;return o.split(i).filter(Boolean)};return()=>{const o=Object.keys(r).filter(s=>s!=="_"),i=t.messages[e.keypath].toString();let a=n(i);return a=a.filter(s=>s!==""),a.forEach((s,u)=>{if(!s.startsWith("{")&&!s.endsWith("}"))return;const l=s.replace(/[\{\}]/g,"");l==="0"&&r.default?a[u]=r.default():o.includes(l)&&r[l]&&(a[u]=r[l]())}),h.h(e.tag,e,a)}}}),un={install(t,e){const{i18n:r}=e;t.component("I18nT",ln(r))}},hn={documentViewer:{error:"Error: Markdown content missing"}};function fn(){return{i18n:cn("en-us",hn),i18nT:un}}function pn(){return{hasRequiredProps:(e,r)=>{let n=!0;return e.forEach(o=>{r.forEach(i=>{o[i]||(n=!1)})}),n}}}const mn={useI18n:fn,useUtilities:pn};function Yt(t,e=""){return t.toLowerCase().trim().replace(/ /g,"-").replace(/[^\w-]+/g,"")+e}function Wt(t){if(!t)return t;const e=new Map;return t.map(r=>r.type==="heading"?zt(r,e):r)}function zt(t,e,r="doc-heading-"){const n=t.children[0].text,o=e.get(n);e.set(n,(o||0)+1);const i=o&&o>1?`-${o}`:"",a=r+Yt(n,i);return{...t,slug:a}}const gn={class:"document-viewer","data-testid":"document-viewer"},dn={key:1,"data-testid":"document-viewer-error"},_n=h.defineComponent({__name:"DocumentViewer",props:{document:{type:Object,required:!0}},setup(t){var a;const e=t,{i18n:r}=mn.useI18n(),n=h.computed(()=>!!e.document),o=Wt((a=e.document)==null?void 0:a.children),i=()=>{var s;return(s=e.document)!=null&&s.children?ht(o):null};return(s,u)=>(h.openBlock(),h.createElementBlock("div",gn,[h.unref(n)?(h.openBlock(),h.createBlock(i,{key:0})):(h.openBlock(),h.createElementBlock("div",dn,h.toDisplayString(h.unref(r).t("docViewer.error")),1))]))}}),Rn="",Pn="",En=N(_n,[["__scopeId","data-v-6607def2"]]);I.TableCellAlign=j,I.TableRowSection=D,I.addSlug=zt,I.addUniqueHeadingSlugs=Wt,I.default=En,I.isTextNode=lt,I.toSlug=Yt,Object.defineProperties(I,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
23
23
|
//# sourceMappingURL=document-viewer.umd.js.map
|