@silurus/ooxml 0.80.3 → 0.81.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/README.md +57 -77
- package/dist/assets/render-worker-C2ACcLes.js +11 -0
- package/dist/assets/render-worker-Cx5uR77k.js +10 -0
- package/dist/assets/render-worker-DtU8oQZ7.js +24 -0
- package/dist/{canvas-viewer-mechanics-D-r6wHY_.js → canvas-viewer-mechanics-CqxKRGCp.js} +1 -1
- package/dist/chart-ex.mjs +1017 -0
- package/dist/{document-pull-client-vxk-Aomu.js → document-pull-client-Ux4a_ax8.js} +4540 -4412
- package/dist/{docx-DN0PRx2f.js → docx-SEyQ4gS-.js} +79 -75
- package/dist/docx.mjs +5 -4
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/index.mjs +3 -3
- package/dist/{line-distribute-Bvtp0Gt6.js → line-distribute-BBGvvwLt.js} +17 -16
- package/dist/{line-metrics-DdEJYxjx.js → line-metrics-Baz31mML.js} +663 -7488
- package/dist/math.mjs +2 -2
- package/dist/node.mjs +248 -247
- package/dist/plot-area-frame-Dg1VIpUU.js +3669 -0
- package/dist/{pptx-B-Laftl1.js → pptx-5lQrMvMR.js} +236 -232
- package/dist/pptx.mjs +6 -5
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/region-map.mjs +102 -97
- package/dist/{render-CoqMHcbF.js → render-DEHjijQD.js} +1 -1
- package/dist/{render-worker-host-CYPhmBtX.js → render-worker-host-B1nbV_k7.js} +1 -1
- package/dist/{render-worker-host-GlLR1rtF.js → render-worker-host-Bze5M6k5.js} +1 -1
- package/dist/{render-worker-host-IuQFpoJM.js → render-worker-host-Dg_74V64.js} +1 -1
- package/dist/renderer-DuopJE1K.js +5855 -0
- package/dist/{renderer-module-contract-BNGz8HvO.js → renderer-module-contract-0bO_5SC0.js} +4 -3
- package/dist/{resource-measurement-CgMubiAI.js → resource-measurement-DRLp4nFt.js} +12 -11
- package/dist/{session-DkPblDiq.js → session-CNVc3VJ4.js} +8 -8
- package/dist/{slide-pull-client-m2blvngt.js → slide-pull-client-CzutXnGc.js} +888 -1082
- package/dist/three-d-BYiWCNlz.js +1345 -0
- package/dist/three-d.mjs +1238 -798
- package/dist/types/chart-ex.d.ts +949 -0
- package/dist/types/docx.d.ts +325 -18
- package/dist/types/index.d.ts +325 -26
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +303 -14
- package/dist/types/pptx.d.ts +314 -22
- package/dist/types/region-map.d.ts +318 -6
- package/dist/types/three-d.d.ts +318 -6
- package/dist/types/xlsx.d.ts +317 -18
- package/dist/{worksheet-pull-client-BntP6RiO.js → worksheet-pull-client-Cxj3Ej0s.js} +19 -19
- package/dist/{xlsx-DqMe7J2C.js → xlsx-Bl3TIEVu.js} +1313 -1279
- package/dist/xlsx.mjs +6 -5
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +7 -1
- package/dist/assets/render-worker-CRaEOHkw.js +0 -9
- package/dist/assets/render-worker-DQGLj5Zv.js +0 -22
- package/dist/assets/render-worker-rnrSLmqL.js +0 -8
- package/dist/chart-number-format-qLhnk6hj.js +0 -475
- package/dist/three-d-C28kqDym.js +0 -1086
- /package/dist/{highlight-rect-BuX5rWP4.js → highlight-rect-BqcZMHUE.js} +0 -0
- /package/dist/{mathjax-DgAl7Yi5.js → mathjax-DJa-Q93p.js} +0 -0
- /package/dist/{transfer-CKZ79zFw.js → transfer-D0U6Uhn4.js} +0 -0
- /package/dist/{visible-index-BjesVGhg.js → visible-index-DbDuGMCE.js} +0 -0
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=(e,t)=>()=>(e&&(t=e(e=0)),t),n=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},r=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,a.unregister(this),e}free(){let e=this.__destroy_into_raw();x.__wbg_docxarchive_free(e,0)}acknowledge_document_chunk(e,t,n){let r=x.docxarchive_acknowledge_document_chunk(this.__wbg_ptr,e,t,n);if(r[1])throw h(r[0])}assert_healthy(){let e=x.docxarchive_assert_healthy(this.__wbg_ptr);if(e[1])throw h(e[0])}cancel_document_cursor(){x.docxarchive_cancel_document_cursor(this.__wbg_ptr)}close_document_session(){x.docxarchive_close_document_session(this.__wbg_ptr)}document_chunk_done(){let e=x.docxarchive_document_chunk_done(this.__wbg_ptr);if(e[2])throw h(e[1]);return e[0]!==0}document_cursor_resource_usage(){let e=x.docxarchive_document_cursor_resource_usage(this.__wbg_ptr);if(e[3])throw h(e[2]);var t=o(e[0],e[1]).slice();return x.__wbindgen_free(e[0],e[1]*1,1),t}extract_image(e){let t=m(e,x.__wbindgen_malloc,x.__wbindgen_realloc),n=b,r=x.docxarchive_extract_image(this.__wbg_ptr,t,n);if(r[3])throw h(r[2]);var i=o(r[0],r[1]).slice();return x.__wbindgen_free(r[0],r[1]*1,1),i}constructor(e,t,n,r){let i=p(e,x.__wbindgen_malloc),o=b,s=x.docxarchive_new(i,o,!f(t),f(t)?BigInt(0):t,!f(n),f(n)?BigInt(0):n,!f(r),f(r)?BigInt(0):r);if(s[2])throw h(s[1]);return this.__wbg_ptr=s[0]>>>0,a.register(this,this.__wbg_ptr,this),this}open_document_cursor(e,t){let n=x.docxarchive_open_document_cursor(this.__wbg_ptr,e,t);if(n[1])throw h(n[0])}parse(){let e=x.docxarchive_parse(this.__wbg_ptr);if(e[3])throw h(e[2]);var t=o(e[0],e[1]).slice();return x.__wbindgen_free(e[0],e[1]*1,1),t}pull_document_chunk(e,t,n,r){let i=x.docxarchive_pull_document_chunk(this.__wbg_ptr,e,t,n,r);if(i[3])throw h(i[2]);var a=o(i[0],i[1]).slice();return x.__wbindgen_free(i[0],i[1]*1,1),a}resource_usage(){let e=x.docxarchive_resource_usage(this.__wbg_ptr);if(e[3])throw h(e[2]);var t=o(e[0],e[1]).slice();return x.__wbindgen_free(e[0],e[1]*1,1),t}to_markdown(){let e,t;try{let i=x.docxarchive_to_markdown(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,h(i[2]);return e=n,t=r,l(n,r)}finally{x.__wbindgen_free(e,t,1)}}};Symbol.dispose&&(r.prototype[Symbol.dispose]=r.prototype.free);function i(){return{__proto__:null,"./docx_parser_bg.js":{__proto__:null,__wbg___wbindgen_throw_6b64449b9b9ed33c:function(e,t){throw Error(l(e,t))},__wbg_error_a6fa202b58aa1cd3:function(e,t){let n,r;try{n=e,r=t,console.error(l(e,t))}finally{x.__wbindgen_free(n,r,1)}},__wbg_new_227d7c05414eb861:function(){return Error()},__wbg_stack_3b0d974bbf31e44f:function(e,t){let n=t.stack,r=m(n,x.__wbindgen_malloc,x.__wbindgen_realloc),i=b;c().setInt32(e+4,i,!0),c().setInt32(e+0,r,!0)},__wbindgen_cast_0000000000000001:function(e,t){return l(e,t)},__wbindgen_init_externref_table:function(){let e=x.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}}}}const a=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>x.__wbg_docxarchive_free(e>>>0,1));function o(e,t){return e>>>=0,d().subarray(e/1,e/1+t)}let s=null;function c(){return(s===null||s.buffer.detached===!0||s.buffer.detached===void 0&&s.buffer!==x.memory.buffer)&&(s=new DataView(x.memory.buffer)),s}function l(e,t){return e>>>=0,v(e,t)}let u=null;function d(){return(u===null||u.byteLength===0)&&(u=new Uint8Array(x.memory.buffer)),u}function f(e){return e==null}function p(e,t){let n=t(e.length*1,1)>>>0;return d().set(e,n/1),b=e.length,n}function m(e,t,n){if(n===void 0){let n=y.encode(e),r=t(n.length,1)>>>0;return d().subarray(r,r+n.length).set(n),b=n.length,r}let r=e.length,i=t(r,1)>>>0,a=d(),o=0;for(;o<r;o++){let t=e.charCodeAt(o);if(t>127)break;a[i+o]=t}if(o!==r){o!==0&&(e=e.slice(o)),i=n(i,r,r=o+e.length*3,1)>>>0;let t=d().subarray(i+o,i+r),a=y.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return b=o,i}function h(e){let t=x.__wbindgen_externrefs.get(e);return x.__externref_table_dealloc(e),t}let g=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0});g.decode();let _=0;function v(e,t){return _+=t,_>=2146435072&&(g=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),g.decode(),_=t),g.decode(d().subarray(e,e+t))}const y=new TextEncoder;`encodeInto`in y||(y.encodeInto=function(e,t){let n=y.encode(e);return t.set(n),{read:e.length,written:n.length}});let b=0,x;function S(e,t){return x=e.exports,s=null,u=null,x.__wbindgen_start(),x}async function C(e,t){if(typeof Response==`function`&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(e.ok&&n(e.type)&&e.headers.get(`Content-Type`)!==`application/wasm`)console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t);else throw t}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}function n(e){switch(e){case`basic`:case`cors`:case`default`:return!0}return!1}}async function w(e){if(x!==void 0)return x;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`));let t=i();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await C(await e,t);return S(n,r)}async function T(e){return x=void 0,s=null,u=null,w(e)}var E=class e extends Error{code;constructor(t,n){super(n),this.name=`OoxmlError`,this.code=t,Object.setPrototypeOf(this,e.prototype)}},D=class e extends Error{code=`ooxml-resource-limit`;details;constructor(t,n){super(t),this.name=`OoxmlResourceLimitError`;let r=n.violation,i=Object.freeze({format:r.format,operation:r.operation,resource:r.resource,metric:r.metric,...r.part===void 0?{}:{part:r.part},limit:r.limit,observed:r.observed,configurable:r.configurable,usage:Object.freeze({archiveEntryCount:r.usage.archiveEntryCount,declaredInflatedBytes:r.usage.declaredInflatedBytes,...r.usage.largestInflatedEntryBytes===void 0?{}:{largestInflatedEntryBytes:r.usage.largestInflatedEntryBytes},distinctInflatedBytes:r.usage.distinctInflatedBytes,operationInflatedBytes:r.usage.operationInflatedBytes})});this.details=Object.freeze({stage:n.stage,violation:i}),Object.setPrototypeOf(this,e.prototype)}};const O=new Map;function k(e,t,n){let r=O.get(e),i=r?.get(t);if(i)return i.refs++,{face:i.face,isNew:!1};let a=n(),o=r??new Map;return o.set(t,{face:a,set:t,refs:1}),O.set(e,o),{face:a,isNew:!0}}function A(e){let t=new Set;for(let n of e)if(!t.has(n)){t.add(n);for(let[e,t]of O){let r=!1;for(let[i,a]of t)if(a.face===n){if(r=!0,a.refs--,a.refs<=0){try{a.set.delete(n)}catch{}t.delete(i),t.size===0&&O.delete(e)}break}if(r)break}}}function j(e){return Promise.race([e,new Promise(e=>setTimeout(e,15e3))])}const M=new Map;function N(e){let t=[],n=/@font-face\s*\{([^}]*)\}/g,r;for(;r=n.exec(e);){let e=r[1],n=t=>e.match(RegExp(`(?:^|;|\\n)\\s*${t}\\s*:\\s*([^;]+)`,`i`))?.[1].trim(),i=n(`font-family`),a=n(`src`);if(!i||!a)continue;let o={},s=n(`font-style`);s&&(o.style=s);let c=n(`font-weight`);c&&(o.weight=c);let l=n(`font-stretch`);l&&(o.stretch=l);let u=n(`unicode-range`);u&&(o.unicodeRange=u),t.push({family:i.replace(/^['"]|['"]$/g,``),src:a,descriptors:o})}return t}function P(){return typeof document<`u`&&document&&document.fonts?document.fonts:typeof self<`u`&&self&&`fonts`in self?self.fonts:null}function F(e,t){let n=t.descriptors;return[`gfonts`,e,t.family.toLowerCase(),n.style??``,n.weight??``,n.stretch??``,n.unicodeRange??``,t.src].join(`|`)}async function I(e,t,n=P()){let r=n;if(!r||typeof FontFace>`u`||typeof fetch>`u`)return[];let i=new Set,a=new Set,o=new Set,s=new Map,c=new Set;for(let n of e){if(!n)continue;let e=n.toLowerCase();if(i.has(e))continue;i.add(e);let r=t[e];if(!r)continue;o.add(r.url);let c=(r.loadFamily??n).toLowerCase();a.add(c);let l=s.get(r.url);l||(l=new Set,s.set(r.url,l)),l.add(c)}if(a.size===0)return[];let l=await j(Promise.all([...o].map(async e=>{let t=M.get(e);if(t)return{url:e,rules:await t};let n=(async()=>{try{let t=await fetch(e);if(!t.ok)throw Error(`HTTP ${t.status}`);return N(await t.text())}catch{M.delete(e);for(let t of s.get(e)??[])c.add(t);return[]}})();return M.set(e,n),{url:e,rules:await n}}))),u=[],d=[];for(let e of Array.isArray(l)?l:[])for(let t of e.rules){let{face:n,isNew:i}=k(F(e.url,t),r,()=>{let e=new FontFace(t.family,t.src,t.descriptors);return r.add(e),e});u.push(n),i&&d.push(n)}return d.length>0&&await j(Promise.allSettled(d.map(e=>e.load())).then(e=>(e.forEach((e,t)=>{e.status===`rejected`&&c.add(d[t].family.replace(/['"]/g,``).toLowerCase())}),r.ready))),c.size>0&&console.warn(`[ooxml] failed to preload web font(s): ${[...c].join(`, `)}; falling back to system fonts (text may shift or differ).`),u}function L(e,t){let n=R(t),r=e.slice(),i=Math.min(32,r.length);for(let e=0;e<i;e++)r[e]^=n[e%16];return r}function R(e){let t=e.replace(/[{}\-\s]/g,``);if(t.length!==32||/[^0-9a-fA-F]/.test(t))throw Error(`invalid fontKey GUID: ${e}`);let n=new Uint8Array(16);for(let e=0;e<16;e++)n[e]=parseInt(t.slice(e*2,e*2+2),16);return n.reverse()}function z(e,t,n,r){let i=2166136261;for(let e=0;e<r.length;e++)i^=r[e],i=Math.imul(i,16777619);return`${e}|${t}|${n}|${r.length}|${(i>>>0).toString(16)}`}async function ee(e,t=30*1024*1024){let n=P();if(!n||typeof FontFace>`u`)return[];let r=[],i=[],a=[];for(let o of e)try{if(o.bytes.length===0||o.bytes.length>t){a.push(o.family);continue}let e=o.odttf?L(o.bytes,o.fontKey??``):o.bytes,{face:s,isNew:c}=k(`embedded:${z(o.family,o.weight,o.style,e)}`,n,()=>{let t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),r=new FontFace(o.family,t,{weight:o.weight,style:o.style});return n.add(r),r});r.push(s),c&&i.push(s)}catch{a.push(o.family)}return i.length>0&&await j(Promise.allSettled(i.map(e=>e.load())).then(e=>(e.forEach((e,t)=>{e.status===`rejected`&&a.push(i[t].family)}),n.ready))),a.length>0&&console.warn(`[ooxml] failed to register embedded font(s): ${[...new Set(a)].join(`, `)}; falling back to substitute fonts (text may shift or differ).`),r}const B=`https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;700&display=swap`,V=`https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@400;700&display=swap`,H=`https://fonts.googleapis.com/css2?family=Libre+Franklin:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap`,U={calibri:{url:`https://fonts.googleapis.com/css2?family=Carlito:ital,wght@0,400;0,700;1,400;1,700&display=swap`,loadFamily:`Carlito`},"calibri light":{url:`https://fonts.googleapis.com/css2?family=Carlito:ital,wght@0,400;0,700;1,400;1,700&display=swap`,loadFamily:`Carlito`},cambria:{url:`https://fonts.googleapis.com/css2?family=Caladea:ital,wght@0,400;0,700;1,400;1,700&display=swap`,loadFamily:`Caladea`},"cambria math":{url:`https://fonts.googleapis.com/css2?family=Caladea:ital,wght@0,400;0,700;1,400;1,700&display=swap`,loadFamily:`Caladea`},"franklin gothic book":{url:H,loadFamily:`Libre Franklin`},"franklin gothic medium":{url:H,loadFamily:`Libre Franklin`},"nunito sans":{url:`https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap`},nunito:{url:`https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,700;1,400;1,700&display=swap`},"open sans":{url:`https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap`},roboto:{url:`https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,700;1,400;1,700&display=swap`},lato:{url:`https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400;1,700&display=swap`},montserrat:{url:`https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,700;1,400;1,700&display=swap`},poppins:{url:`https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,700;1,400;1,700&display=swap`},raleway:{url:`https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,400;0,700;1,400;1,700&display=swap`},"playfair display":{url:`https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&display=swap`},ubuntu:{url:`https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,400;0,700;1,400;1,700&display=swap`},"sakkal majalla":{url:B,loadFamily:`Noto Naskh Arabic`},"traditional arabic":{url:B,loadFamily:`Noto Naskh Arabic`},"simplified arabic":{url:B,loadFamily:`Noto Naskh Arabic`},"arabic typesetting":{url:B,loadFamily:`Noto Naskh Arabic`},"univers next arabic":{url:V,loadFamily:`Noto Sans Arabic`},"noto naskh arabic":{url:B,loadFamily:`Noto Naskh Arabic`},"noto sans arabic":{url:V,loadFamily:`Noto Sans Arabic`}};function te(e,t){let n=e.trim();if(!n)throw TypeError(`Canvas font route requires a family list`);return Object.freeze({familyList:n,scope:t,fingerprint:`canvas-font-route-v1:${encodeURIComponent(t)}:${encodeURIComponent(n)}`})}function W(e,t,n,r){if(!Number.isFinite(t)||t<0)throw RangeError(`Canvas font size must be finite and non-negative`);if(!Number.isFinite(n)||n<1||n>1e3)throw RangeError(`Canvas font weight must be finite and between 1 and 1000`);if(!e.familyList.trim())throw TypeError(`Canvas font route requires a family list`);return`${r} ${n} ${t}px ${e.familyList}`}function ne(e){if(!e)return null;let t=e.toLowerCase();return/[ᄀ-ᇿ-가-]/.test(e)?`kr`:/[-ヿ]/.test(e)?`jp`:/jhenghei|微軟正黑|新細明|細明|pmingliu|mingliu|dfkai|標楷|華康|cns11643|kaiti tc|ming\s*liu/.test(t)||/新細明體|細明體|標楷體|微軟正黑體|華康/.test(e)?`tc`:/simsun|nsimsun|simhei|simkai|simfang|yahei|dengxian|fangsong|kaiti|youyuan|lisu|stsong|stkaiti|stfangsong|stheiti|stxihei|stzhongsong|songti sc|heiti sc|微软雅黑/.test(t)||/宋体|黑体|楷体|仿宋|等线|微软雅黑|隶书|幼圆/.test(e)?`sc`:/malgun|batang|gulim|dotum|gungsuh|nanum|new gulim|hancom|hy(gothic|graphic|namu)?/.test(t)?`kr`:/\bmeiryo\b|\byu\s*(gothic|mincho)\b|yugothic|yumincho|hiragino|\bms\s*(gothic|mincho|pgothic|pmincho|ui\s*gothic)\b|\bms[pg]?(gothic|mincho)\b|ipa(ex)?(gothic|mincho)|noto\s+(sans|serif)\s+jp|游ゴシック|游明朝|MS|メイリオ|ヒラギノ/.test(t)||/游ゴシック|游明朝|MS ゴシック|MS 明朝|MS Pゴシック|メイリオ|ヒラギノ/.test(e)?`jp`:null}function G(e){if(!e)return`sans`;let t=e.toLowerCase();return/mono|courier|consolas|等幅|gothic_m/.test(t)?`mono`:/roman|times|cambria|caladea|georgia|garamond|century(?!\s*gothic)|palatino|antiqua|didot|bodoni|playfair|source serif|noto serif|min\s*cho|明朝体|明朝|song|sung|simsun|nsimsun|batang|gungsuh|ming\s*liu|mingliu|pmingliu|fang\s*song|fangsong|kai\s*ti|kaiti|simkai|simfang|stsong|stkaiti|stfangsong|stzhongsong|新細明|細明|宋体|楷体|楷體|仿宋|標楷|游明朝|MS 明朝|ms mincho|yu mincho|hiragino mincho|ヒラギノ明朝/.test(t)||/新細明體|細明體|宋体|明朝|楷体|楷體|仿宋|標楷體|游明朝|MS 明朝/.test(e)?`serif`:`sans`}function K(e,t){let n=t===`serif`?`Noto Serif`:`Noto Sans`,r={jp:[`jp`,`sc`,`tc`,`kr`],sc:[`sc`,`tc`,`jp`,`kr`],tc:[`tc`,`sc`,`jp`,`kr`],kr:[`kr`,`jp`,`sc`,`tc`]},i={kr:`KR`,sc:`SC`,tc:`TC`,jp:`JP`};return r[e].map(e=>`${n} ${i[e]}`)}const q=[`Noto Sans`,`Noto Sans Hebrew`,`Noto Sans Thai`,`Noto Sans Devanagari`],J=[`Noto Serif`,`Noto Serif Hebrew`],Y=e=>`https://fonts.googleapis.com/css2?family=${e}:wght@400;700&display=swap`,re={"noto sans kr":{url:Y(`Noto+Sans+KR`)},"noto sans sc":{url:Y(`Noto+Sans+SC`)},"noto sans tc":{url:Y(`Noto+Sans+TC`)},"noto sans jp":{url:Y(`Noto+Sans+JP`)},"noto serif kr":{url:Y(`Noto+Serif+KR`)},"noto serif sc":{url:Y(`Noto+Serif+SC`)},"noto serif tc":{url:Y(`Noto+Serif+TC`)},"noto serif jp":{url:Y(`Noto+Serif+JP`)},"noto sans":{url:Y(`Noto+Sans`)},"noto serif":{url:Y(`Noto+Serif`)},"noto sans devanagari":{url:Y(`Noto+Sans+Devanagari`)},"noto sans thai":{url:Y(`Noto+Sans+Thai`)},"noto sans hebrew":{url:Y(`Noto+Sans+Hebrew`)},"noto serif hebrew":{url:Y(`Noto+Serif+Hebrew`)}};var ie=class e{hasHan=!1;hasHangul=!1;hasKana=!1;hasArabic=!1;hasThai=!1;hasHebrew=!1;hasDevanagari=!1;hasCyrGreek=!1;constructor(e){this.cjkLang=e}clone(){let t=new e(this.cjkLang);return t.hasHan=this.hasHan,t.hasHangul=this.hasHangul,t.hasKana=this.hasKana,t.hasArabic=this.hasArabic,t.hasThai=this.hasThai,t.hasHebrew=this.hasHebrew,t.hasDevanagari=this.hasDevanagari,t.hasCyrGreek=this.hasCyrGreek,t}addText(e){let t=()=>this.hasHan&&this.hasHangul&&this.hasKana&&this.hasArabic&&this.hasThai&&this.hasHebrew&&this.hasDevanagari&&this.hasCyrGreek;outer:for(let n of e)if(n)for(let e of n){let n=e.codePointAt(0);if(n!==void 0&&!(n<=591)&&(n>=4352&&n<=4607||n>=12592&&n<=12687||n>=44032&&n<=55215?this.hasHangul=!0:n>=12352&&n<=12543?this.hasKana=!0:n>=13312&&n<=19903||n>=19968&&n<=40959||n>=63744&&n<=64255||n>=131072&&n<=195103?this.hasHan=!0:n>=1536&&n<=1791||n>=1872&&n<=1919||n>=2208&&n<=2303||n>=64336&&n<=65023||n>=65136&&n<=65279?this.hasArabic=!0:n>=3584&&n<=3711?this.hasThai=!0:n>=1424&&n<=1535||n>=64285&&n<=64335?this.hasHebrew=!0:n>=2304&&n<=2431?this.hasDevanagari=!0:(n>=1024&&n<=1279||n>=880&&n<=1023)&&(this.hasCyrGreek=!0),t()))break outer}}names(){let e=[],t=new Set;this.hasHangul&&t.add(`kr`),this.hasKana&&t.add(`jp`),this.hasHan&&t.size===0&&t.add(this.cjkLang??`jp`);for(let n of[`kr`,`sc`,`tc`,`jp`])if(t.has(n)){let t={kr:`KR`,sc:`SC`,tc:`TC`,jp:`JP`}[n];e.push(`Noto Sans ${t}`,`Noto Serif ${t}`)}return this.hasCyrGreek&&e.push(`Noto Sans`,`Noto Serif`),this.hasArabic&&e.push(`Noto Naskh Arabic`,`Noto Sans Arabic`),this.hasThai&&e.push(`Noto Sans Thai`),this.hasHebrew&&e.push(`Noto Sans Hebrew`,`Noto Serif Hebrew`),this.hasDevanagari&&e.push(`Noto Sans Devanagari`),e}};function ae(e,t){let n=new ie(t);return n.addText(e),n.names()}const oe={167:`♣`,168:`♦`,169:`♥`,170:`♠`,171:`↔`,172:`←`,173:`↑`,174:`→`,175:`↓`,183:`•`,184:`÷`,185:`≠`,180:`×`,176:`°`,177:`±`,163:`≤`,179:`≥`},se={33:`✏`,34:`✂`,36:`👓`,74:`☺`,75:`😐`,76:`☹`,118:`❖`,167:`▪`,108:`●`,110:`■`,116:`◆`,119:`◆`,251:`✗`,252:`✓`,253:`☒`,254:`☑`,223:`←`,224:`→`,225:`↑`,226:`↓`,227:`↖`,228:`↗`,229:`↙`,230:`↘`};function ce(e){let t={};for(let n of Object.keys(e)){let r=Number(n);t[r]=e[r],t[61440+r]=e[r]}return t}const le=ce(oe),ue=ce(se);function de(e,t){if(!t)return e;let n=t.trim().toLowerCase(),r=n===`wingdings`?ue:n===`symbol`?le:null;return r?r[e.charCodeAt(0)]??e:e}function fe(e){if(!e)return!1;let t=e.toLowerCase();return t===`symbol`||t.includes(`wingdings`)}function pe(e,t){if(!fe(t)||e.length===0)return[{text:e,mapped:!1}];let n=[],r=``,i=null;for(let a of e){let e=de(a,t),o=e!==a;i===null||o===i?(i=o,r+=e):(n.push({text:r,mapped:i}),i=o,r=e)}return r.length>0&&n.push({text:r,mapped:i??!1}),n}function me(e,t,n){let r=Math.max(1,t),i=[],a=[],o=0;for(let t=0;t<e.length;t++){let s=Math.min(r,Math.max(0,e[t])),c=a.length===0?s:o+n+s;a.length>0&&c>r?(i.push(a),a=[t],o=s):(a.push(t),o=c)}return a.length>0&&i.push(a),i}function he(e,t){return typeof e==`number`&&Number.isFinite(e)&&e>=100&&e<=4e5?e/100*t:null}function ge(e,t,n){return he(e.titleFontSizeHpt,n)??Ae*n}function _e(e,t,n,r,i){if(!e.title&&!e.titlePresent)return{fontPx:0,topPad:0,bottomPad:0,bandH:0};let a=ge(e,t,n),o=a+t*r+t*i,s=Math.min(Math.max(0,o-a),a*je);return{fontPx:a,topPad:s,bottomPad:o-a-s,bandH:o}}function ve(e,t,n,r,i){if(!e.showLegend)return null;let a=e.legendPos??`r`,o=a===`l`?`l`:a===`t`?`t`:a===`b`?`b`:`r`;if(o===`r`||o===`l`){if(i){let e=Math.min(80,t*.3),n=t*.3,r=Math.max(0,...i.itemWidths)+i.horizontalPadding;return{side:o,reserveW:Math.min(n,Math.max(e,r)),reserveH:0}}return{side:o,reserveW:Math.max(80,t*r),reserveH:0}}if(i){let e=Math.max(1,t-i.horizontalPadding),r=me(i.itemWidths,e,i.itemGap).length*i.rowHeight+i.verticalPadding;return{side:o,reserveW:0,reserveH:Math.min(n*.3,r)}}return{side:o,reserveW:0,reserveH:Math.max(18,n*.08)}}function ye(e){return{legRightW:e?.side===`r`?e.reserveW:0,legLeftW:e?.side===`l`?e.reserveW:0,legTopH:e?.side===`t`?e.reserveH:0,legBottomH:e?.side===`b`?e.reserveH:0}}function be(e,t){return he(e,t)??10*t}function xe(e,t,n){let r=0,i=!1;if(n!=null)switch(i=!0,n){case`horz`:break;case`vert270`:r-=90;break;case`vert`:case`wordArtVert`:case`eaVert`:case`mongolianVert`:case`wordArtVertRtl`:r+=90;break}return t!=null&&Number.isFinite(t)&&(r+=t/6e4,i=!0),i?r*Math.PI/180:e===`left`||e===`right`?-Math.PI/2:0}function X(e){return Math.max(8,e*.02)}function Se(e,t,n,r){let i=be(e.catAxisTitleFontSizeHpt,r),a=be(e.valAxisTitleFontSizeHpt,r);return{catFontPx:i,valFontPx:a,catBandH:e.catAxisTitle?i+X(n)+4:0,valBandW:e.valAxisTitle?a+X(t)+4:0}}function Ce(e,t,n){if(!e.title&&!e.titlePresent)return{fontPx:0,topPad:0,bottomPad:0,bandH:0};let r=ge(e,t,n),i=r*Me,a=Math.min(Math.max(0,i-r),r*je);return{fontPx:r,topPad:a,bottomPad:i-r-a,bandH:i}}function we(e){return e*Ne}function Te(e){return 5/6*e}function Ee(e){return e}function De(e){let t=e.outerTextMarginPx??0;return{t:e.valAxisHidden?0:e.valLabelFontPx/2+t,r:(e.secondaryBandW??0)>0?(e.secondaryBandW??0)+t:0,b:e.catAxisHidden?0:e.catLabelFontPx+(e.catLabelGapPx??Te(e.catLabelFontPx))+e.catTitleBandH+t,l:e.valAxisHidden?0:e.valLabelWidth+(e.valLabelGapPx??Ee(e.valLabelFontPx))+e.valTitleBandW+t}}function Oe(e,t,n){let r=e.xMode||`factor`,i=e.yMode||`factor`,a=e.wMode||`factor`,o=e.hMode||`factor`,s=r===`edge`?t.x+e.x*t.w:n.x+e.x*t.w,c=i===`edge`?t.y+e.y*t.h:n.y+e.y*t.h,l=e.w==null?n.w:a===`edge`?t.x+e.w*t.w-s:e.w*t.w,u=e.h==null?n.h:o===`edge`?t.y+e.h*t.h-c:e.h*t.h;return![s,c,l,u].every(Number.isFinite)||l<=0||u<=0?null:{x:s,y:c,w:l,h:u}}function ke(e,t,n,r,i,a,o){let s=o.titleBand??_e(e,i,a,o.titleTopPadFrac??0,o.titleBottomPadFrac??0),c=o.legendReserve===void 0?ve(e,r,i,o.legendSideReserveFrac):o.legendReserve,l=ye(c),u=Se(e,r,i,a),d,f,p,m;if(o.radialGapFrac!=null){let e=i*o.radialGapFrac;p=r-l.legRightW-l.legLeftW,m=i-s.bandH-l.legTopH-l.legBottomH-e,d=t+l.legLeftW,f=n+s.bandH+l.legTopH+e}else{let e=o.pad;if(!e)throw Error(`computeChartFrame: cartesian frame requires params.pad`);d=t+e.l,f=n+e.t,p=r-e.l-e.r,m=i-e.t-e.b}let h=o.honorPlotAreaManualLayout?e.plotAreaManualLayout:null;if(h){let e=h.layoutTarget===`inner`?{t:0,r:0,b:0,l:0}:o.manualOuterInsets??{t:0,r:0,b:0,l:0},a=h.layoutTarget===`inner`?{x:d,y:f,w:p,h:m}:{x:d-e.l,y:f-e.t,w:p+e.l+e.r,h:m+e.t+e.b},s=Oe(h,{x:t,y:n,w:r,h:i},a);s&&s.w>e.l+e.r&&s.h>e.t+e.b&&(d=s.x+e.l,f=s.y+e.t,p=s.w-e.l-e.r,m=s.h-e.t-e.b)}return{title:s,legend:c,legendBands:l,axisTitles:u,plotRect:{px0:d,py0:f,pw:p,ph:m},center:{cx:d+p/2,cy:f+m/2}}}var Ae,je,Me,Ne,Pe,Fe=t((()=>{Ae=14,je=.62,Me=2.25,Ne=2.75,Pe=1.5}));function Ie(e,t={min:0,max:1}){let n=1/0,r=-1/0;for(let t of e)t==null||!Number.isFinite(t)||(t<n&&(n=t),t>r&&(r=t));return Number.isFinite(n)&&Number.isFinite(r)?{min:n,max:r}:t}function Le(e,t=5){if(e===0)return 1;let n=e/t,r=10**Math.floor(Math.log10(n)),i=n/r;return(i<1.5?1:i<3.5?2:i<7.5?5:10)*r}function Re(e,t,n,r){let i=Number.isFinite(e)?e:0,a=Number.isFinite(t)?t:100,o=a>i?a-i:100,s=i<0&&a>0,c=n===`horizontal`||r==null||!Number.isFinite(r)||r<120?s?4:5:10;return Ve(a>i?We(i,a,c):o/c)}function ze(e,t,n){let r=Number.isFinite(e)?e:0,i=Number.isFinite(t)?t:1,a=i>r?null:1,o=n!=null&&Number.isFinite(n)?n<45?4:n<90?8:10:8;return Ve(i>r?We(r,i,o):(a??1)/o)}function Be(e,t,n){let r=Number.isFinite(e)?e:0,i=Number.isFinite(t)?t:1;return Ve((i>r?i-r:1)/(n!=null&&Number.isFinite(n)&&n>0?Math.max(5,Math.round(n/28)):5))}function Ve(e){if(!(e>0)||!isFinite(e))return 1;let t=10**Math.floor(Math.log10(e));if(!(t>0)||!isFinite(t))return e;let n=e/t,r=n<=1?1:n<=2?2:n<=5?5:10;return Math.min(Number.MAX_VALUE,r*t)}function He(e){return e!=null&&isFinite(e)?e:null}function Ue(e){return e!=null&&isFinite(e)&&e>0?e:null}function We(e,t,n){let r=t-e,i=isFinite(r)?r/n:t/n-e/n;return i>0&&isFinite(i)?i:r>0&&isFinite(r)?Number.MIN_VALUE:Number.MAX_VALUE}function Ge(e,t,n){if(!isFinite(e)||!isFinite(t)||!(t>=e)||!(n>0)||!isFinite(n))return 0;let r=t-e,i=isFinite(r)?r/n:t/n-e/n;return!isFinite(i)||i>2**53-1?1/0:Math.max(1,Math.floor(i+1e-9)+1)}function Ke(e,t,n,r,i){let a=Ge(e,t,n);if(a===0||a>512&&r===`skip`)return[];let o=Math.min(a,512),s=[],c=t-e,l=Math.max(Math.abs(n),isFinite(c)?Math.abs(c):Math.max(Math.abs(e),Math.abs(t)))*1e-9,u=-1/0;for(let r=0;r<o;r++){let a=r*n,o=e+a;if((!isFinite(a)||!isFinite(o)||r>0&&!(o>u))&&(o=(e/n+r)*n),!isFinite(o)||o>t+l||r>0&&!(o>u))break;if(u=o,i!=null){if(o>=t-l)break;let n=o-e,r=isFinite(n)?n/i:o/i-e/i;if(isFinite(r)&&Math.abs(r-Math.round(r))<=1e-8)continue}s.push(o)}return s}function qe(e){let t=isFinite(e.dataMin)?e.dataMin:0,n=isFinite(e.dataMax)?e.dataMax:1;t>n&&([t,n]=[n,t]);let r,i,a;if(t===0&&n===0)r=0,i=1,a=.1;else{t===n&&(t=Math.min(0,t),n=Math.max(0,n));let e=t>=0&&(t===0||n>1.2*t),o=n<=0&&(n===0||Math.abs(t)>1.2*Math.abs(n)),s=e?0:t,c=o?0:n,l=c-s,u=isFinite(l)?l*.05:c*.05-s*.05,d=e?0:t-u,f=o?0:n+u;a=Ve(f/10-d/10),r=Math.floor(d/a)*a,i=Math.ceil(f/a)*a,(!isFinite(r)||!isFinite(i)||!(i>r))&&(r=Math.min(t,0),i=Math.max(n,r+a))}let o=He(e.explicitMin),s=He(e.explicitMax),c=Ue(e.majorUnit),l=o??(c==null?r:Math.floor(r/c)*c),u=s??(c==null?i:Math.ceil(i/c)*c),d=a;if(c==null&&o!=null&&s!=null&&s>o){if(e.axisOrientation===`horizontal`)d=Ve(We(o,s,e.axisLenPt!=null&&isFinite(e.axisLenPt)&&e.axisLenPt>0?Math.max(5,Math.round(e.axisLenPt/38)):8));else if(e.axisOrientation===`vertical`){let t=e.axisLenPt!=null&&isFinite(e.axisLenPt)&&e.axisLenPt>0?Math.max(5,Math.round(e.axisLenPt/28)):7;d=Math.max(Ve(We(o,s,10)),Math.min(Number.MAX_VALUE,Le(We(o,s,t),1)))}}let f=c??d;c==null&&Ge(l,u,f)>512&&(f=Ve(u/511-l/511));let p=Ue(e.minorUnit);e.needMinor&&c==null&&p==null&&Ge(l,u,f/5)>512&&(f=Ve(u/102-l/102));let m=f/5,h=e.needMinor?p??(m>0&&isFinite(m)?m:f):null,g=Ke(l,u,f,c==null?`skip`:`truncate`),_=h==null?[]:Ke(l,u,h,`skip`,f);return{min:l,max:u,majorUnit:f,minorUnit:h,majorTicks:g,minorTicks:_}}function Je(e,t,n,r){let i,a=r?.logBase;if(a!=null&&isFinite(a)&&a>=2&&t>0&&n>0){let r=Math.log(t),a=Math.log(n)-r;i=a===0?0:(Math.log(Math.max(e,Number.MIN_VALUE))-r)/a}else{let r=n-t;if(r===0)i=0;else if(Number.isFinite(r)&&Number.isFinite(e-t))i=(e-t)/r;else{let r=Math.max(Math.abs(e),Math.abs(t),Math.abs(n)),a=n/r-t/r;i=a===0?0:(e/r-t/r)/a}}return r?.reversed?1-i:i}function Ye(e,t,n,r,i){let a=isFinite(n)&&n>=2?n:10,o=e=>Math.log(e)/Math.log(a),s=t>0?t:1,c=Math.floor(o(e>0?e:s)),l=Math.ceil(o(s)),u=e=>{let t=a**+e;return t===0?Number.MIN_VALUE:isFinite(t)?t:Number.MAX_VALUE},d=r??u(c),f=i??u(Math.max(l,c+1)),p=[],m=Math.ceil(o(d)-1e-9),h=Math.floor(o(f)+1e-9);if(!isFinite(m)||!isFinite(h)||h<m)return{min:d,max:f,lines:p};let g=h-m+1,_=Math.max(1,Math.ceil((g-1)/511)),v=Math.min(512,Math.floor((g-1)/_)+1);for(let e=0;e<v;e++){let t=u(m+e*_);t>=d&&t<=f&&(p.length===0||t>p[p.length-1])&&p.push(t)}let y=u(h);return p.length<512&&y>=d&&y<=f&&y>(p[p.length-1]??0)&&p.push(y),{min:d,max:f,lines:p}}function Xe(e){let t=e.logBase;if(t!=null&&Number.isFinite(t)&&t>=2){let{min:n,max:r,lines:i}=Ye(e.dataMin,e.dataMax,t,He(e.explicitMin),He(e.explicitMax));return{min:n,max:r,majorUnit:i.length>1?i[1]-i[0]:r-n,minorUnit:null,majorTicks:i,minorTicks:[],fraction:i=>Je(i,n,r,{logBase:t,reversed:e.reversed})}}let n=qe(e);return{...n,fraction:t=>Je(t,n.min,n.max,{reversed:e.reversed})}}function Ze(e,t,n){let r=Math.min(e.length,t.length);if(r<2)return null;let i=0,a=0,o=0,s=0;for(let n=0;n<r;n++)i+=e[n],a+=t[n],o+=e[n]*e[n],s+=e[n]*t[n];let c,l;if(n!=null&&isFinite(n))c=o===0?0:(s-n*i)/o,l=n;else{let e=r*o-i*i;c=e===0?0:(r*s-i*a)/e,l=(a-c*i)/r}let u=a/r,d=0,f=0;for(let n=0;n<r;n++){let r=t[n]-(c*e[n]+l);d+=r*r;let i=t[n]-u;f+=i*i}let p=f===0?+(d===0):1-d/f;return{slope:c,intercept:l,rSquared:p}}function Qe(e,t,n,r){let i=Math.min(e.length,t.length);if(i<2)return{xs:[],ys:[]};if(n===`linear`){let n=Ze(e,t,r?.intercept);if(!n)return{xs:[],ys:[]};let a=e[0],o=e[i-1];return{xs:[a,o],ys:[n.slope*a+n.intercept,n.slope*o+n.intercept]}}if(n===`movingAvg`){let n=Math.max(2,Math.round(r?.period??2));if(i<n)return{xs:[],ys:[]};let a=[],o=[];for(let r=n-1;r<i;r++){let i=0;for(let e=0;e<n;e++)i+=t[r-e];a.push(e[r]),o.push(i/n)}return{xs:a,ys:o}}let a=[];for(let r=0;r<i;r++){let i=e[r],o=t[r];!Number.isFinite(i)||!Number.isFinite(o)||n===`log`&&i<=0||n===`exp`&&o<=0||n===`power`&&(i<=0||o<=0)||a.push({x:i,y:o})}if(a.length<2)return{xs:[],ys:[]};let o=1/0,s=-1/0;for(let e of a)o=Math.min(o,e.x),s=Math.max(s,e.x);if(!Number.isFinite(o)||!Number.isFinite(s)||s<=o)return{xs:[],ys:[]};let c=Number.isFinite(r?.backward)?Math.max(0,r?.backward??0):0,l=Number.isFinite(r?.forward)?Math.max(0,r?.forward??0):0,u=o-c,d=s+l;if((n===`log`||n===`power`)&&(u=Math.max(Number.MIN_VALUE,u)),!Number.isFinite(u)||!Number.isFinite(d)||d<=u)return{xs:[],ys:[]};let f=e=>{let t=[],n=[];for(let r=0;r<=64;r++){let i=r/64,a=u*(1-i)+d*i,o=e(a);if(!Number.isFinite(a)||!Number.isFinite(o))return{xs:[],ys:[]};t.push(a),n.push(o)}return{xs:t,ys:n}};if(n===`exp`||n===`log`||n===`power`){let e=Ze(a.map(e=>n===`log`||n===`power`?Math.log(e.x):e.x),a.map(e=>n===`exp`||n===`power`?Math.log(e.y):e.y));if(!e||![e.slope,e.intercept].every(Number.isFinite))return{xs:[],ys:[]};if(n===`exp`){let t=Math.exp(e.intercept);return f(n=>t*Math.exp(e.slope*n))}if(n===`log`)return f(t=>e.slope*Math.log(t)+e.intercept);let t=Math.exp(e.intercept);return f(n=>t*n**e.slope)}if(n===`poly`){let e=Math.min(6,a.length-1,Math.max(2,Math.round(r?.order??2)));if(e<2)return{xs:[],ys:[]};let t=o/2+s/2,n=Math.max(Math.abs(o-t),Math.abs(s-t));if(!Number.isFinite(t)||!Number.isFinite(n)||n<=0)return{xs:[],ys:[]};let i=a.length,c=e+1,l=Array.from({length:c},()=>Array(i).fill(0));for(let e=0;e<i;e++){let r=(a[e].x-t)/n,i=1;for(let t=0;t<c;t++)l[t][e]=i,i*=r}let u=[],d=Array.from({length:c},()=>Array(c).fill(0)),p=Array(c).fill(0);for(let e=0;e<c;e++){let t=l[e].slice();for(let n=0;n<e;n++){let r=0;for(let e=0;e<i;e++)r+=u[n][e]*t[e];d[n][e]=r;for(let e=0;e<i;e++)t[e]-=r*u[n][e]}let n=0;for(let e of t)n+=e*e;let r=Math.sqrt(n);if(!Number.isFinite(r)||r<=2**-52*Math.sqrt(i))return{xs:[],ys:[]};d[e][e]=r;let o=t.map(e=>e/r);u.push(o);let s=0;for(let e=0;e<i;e++)s+=o[e]*a[e].y;if(!Number.isFinite(s))return{xs:[],ys:[]};p[e]=s}let m=Array(c).fill(0);for(let e=c-1;e>=0;e--){let t=p[e];for(let n=e+1;n<c;n++)t-=d[e][n]*m[n];if(m[e]=t/d[e][e],!Number.isFinite(m[e]))return{xs:[],ys:[]}}return f(r=>{let i=(r-t)/n,a=m[e];for(let t=e-1;t>=0;t--)a=a*i+m[t];return a})}return{xs:[],ys:[]}}var $e=t((()=>{})),et,tt,nt=t((()=>{et=12700,tt=4/3}));function rt(e,t){return e?Math.max(.5,e/et)*t:1}function it(e,t,n){return{color:e?`#${e}`:`#aaa`,width:rt(t,n)}}function at(e,t,n){return{color:e?`#${e}`:`#e0e0e0`,width:t?rt(t,n):.5}}function ot(e){return e.catAxisCrossBetween!==`midCat`}var st=t((()=>{nt()}));function ct(e,t=!1){if(t)return new Date(ft+e*ut);let n=e<60?e+1:e;return new Date(dt+n*ut)}function lt(e,t=!1){if(t)return(e.getTime()-ft)/ut;let n=(e.getTime()-dt)/ut;return n<=60?n-1:n}var ut,dt,ft,pt=t((()=>{ut=864e5,dt=Date.UTC(1899,11,30),ft=Date.UTC(1904,0,1)}));function mt(e,t){if(!Number.isFinite(e))return String(e);let n=Math.max(0,Math.trunc(t)),r=e<0,[i,a=``]=ht(Math.abs(e).toString()).split(`.`),o=a.padEnd(n+1,`0`),s=o.slice(0,n),c=o.charCodeAt(n)-48,l=(i+s).split(``).map(e=>e.charCodeAt(0)-48);if(c>=5){let e=l.length-1;for(;e>=0;e--)if(l[e]===9)l[e]=0;else{l[e]+=1;break}e<0&&l.unshift(1)}let u=l.map(e=>String(e)).join(``),d=n,f=(d>0?u.slice(0,u.length-d):u)||`0`,p=d>0?u.slice(u.length-d):``,m=f.replace(/^0+(?=\d)/,``),h=p.length>0?`${m}.${p}`:m,g=/^[0.]*$/.test(h)&&!/[1-9]/.test(h);return r&&!g?`-${h}`:h}function ht(e){let t=/^(\d+)(?:\.(\d+))?[eE]([+-]?\d+)$/.exec(e);if(!t)return e;let[,n,r=``,i]=t,a=parseInt(i,10),o=n+r,s=n.length+a;return s<=0?`0.`+`0`.repeat(-s)+o:s>=o.length?o+`0`.repeat(s-o.length):o.slice(0,s)+`.`+o.slice(s)}var gt=t((()=>{}));function _t(e,t=!1,n=typeof navigator>`u`?void 0:navigator.language){let r=n??``,i=Et.get(r);return i||(i=new Intl.DateTimeFormat(n,{year:`numeric`,month:`numeric`,day:`numeric`,timeZone:`UTC`}),Et.set(r,i)),i.format(ct(e,t))}function vt(e){return Number.isInteger(e)?String(e):mt(e,6).replace(/\.?0+$/,``)}function yt(e,t,n=!1){if(!t||t.trim().toLowerCase()===`general`)return vt(e);if(xt(t))return St(e,t,n);let r=Ct(t),i;return i=e>0?r[0]??t:e<0?r[1]??r[0]??t:r[2]??r[0]??t,i===``?``:(e<0&&r.length<2?`-`:``)+wt(Math.abs(e),i)}function bt(e,t,n=!1){if(!t||e.trim()===``)return e;let r=Number(e);return Number.isFinite(r)?yt(r,t,n):e}function xt(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];if(r===`"`){t=!t;continue}if(!t){if(r===`\\`){n++;continue}if(r===`[`){for(;n<e.length&&e[n]!==`]`;)n++;continue}if(r===`y`||r===`Y`||r===`d`||r===`D`||r===`m`||r===`M`||r===`h`||r===`H`||r===`s`||r===`S`)return!0}}return!1}function St(e,t,n=!1){let r=ct(Math.floor(e),n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,o=r.getUTCDate(),s=(e-Math.floor(e))*86400,c=Math.floor(s/3600),l=Math.floor(s%3600/60),u=Math.floor(s%60),d=``,f=!1,p=0;for(;p<t.length;){let e=t[p];if(e===`"`){f=!f,p++;continue}if(f){d+=e,p++;continue}if(e===`\\`&&p+1<t.length){d+=t[p+1],p+=2;continue}if(e===`[`){for(;p<t.length&&t[p]!==`]`;)p++;p<t.length&&p++;continue}if(e===`y`||e===`Y`){let e=0;for(;p<t.length&&(t[p]===`y`||t[p]===`Y`);)e++,p++;d+=e>=3?String(i):String(i%100).padStart(2,`0`);continue}if(e===`m`||e===`M`){let e=0;for(;p<t.length&&(t[p]===`m`||t[p]===`M`);)e++,p++;if(d.match(/[Hh]+\W*$/))d+=e>=2?String(l).padStart(2,`0`):String(l);else{let t=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],n=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`];d+=e>=5?n[a-1][0]:e===4?n[a-1]:e===3?t[a-1]:e===2?String(a).padStart(2,`0`):String(a)}continue}if(e===`d`||e===`D`){let e=0;for(;p<t.length&&(t[p]===`d`||t[p]===`D`);)e++,p++;d+=e>=2?String(o).padStart(2,`0`):String(o);continue}if(e===`h`||e===`H`){let e=0;for(;p<t.length&&(t[p]===`h`||t[p]===`H`);)e++,p++;d+=e>=2?String(c).padStart(2,`0`):String(c);continue}if(e===`s`||e===`S`){let e=0;for(;p<t.length&&(t[p]===`s`||t[p]===`S`);)e++,p++;d+=e>=2?String(u).padStart(2,`0`):String(u);continue}d+=e,p++}return d}function Ct(e){let t=[],n=``;for(let r=0;r<e.length;r++){let i=e[r];if(i===`\\`&&r+1<e.length){n+=i+e[r+1],r++;continue}if(i===`"`){for(n+=i,r++;r<e.length&&e[r]!==`"`;)n+=e[r],r++;r<e.length&&(n+=e[r]);continue}if(i===`[`){for(n+=i,r++;r<e.length&&e[r]!==`]`;)n+=e[r],r++;r<e.length&&(n+=e[r]);continue}if(i===`;`){t.push(n),n=``;continue}n+=i}return t.push(n),t}function wt(e,t){let n=[],r=0,i=!1,a=!1;for(;r<t.length;){let e=t[r];if(e===`"`){r++;let e=``;for(;r<t.length&&t[r]!==`"`;)e+=t[r],r++;r<t.length&&r++,n.push({kind:`lit`,text:e});continue}if(e===`\\`&&r+1<t.length){n.push({kind:`lit`,text:t[r+1]}),r+=2;continue}if(e===`_`&&r+1<t.length){n.push({kind:`lit`,text:` `}),r+=2;continue}if(e===`*`&&r+1<t.length){r+=2;continue}if(e===`[`){for(r++;r<t.length&&t[r]!==`]`;)r++;r<t.length&&r++;continue}if(e===`%`){a=!0,n.push({kind:`lit`,text:`%`}),r++;continue}if(e===`#`||e===`0`||e===`.`||e===`,`||e===`?`){let e=``;for(;r<t.length&&(t[r]===`#`||t[r]===`0`||t[r]===`.`||t[r]===`,`||t[r]===`?`);)e+=t[r],r++;n.push({kind:`num`,text:e}),i=!0;continue}n.push({kind:`lit`,text:e}),r++}if(!i)return n.map(e=>e.text).join(``);let o=a?e*100:e,s=``;for(let e of n)e.kind===`num`&&(s+=e.text);let c=Tt(o,s),l=!1;return n.map(e=>e.kind===`lit`?e.text:l?``:(l=!0,c)).join(``)}function Tt(e,t){let n=t.indexOf(`.`),r=n>=0?t.slice(0,n):t,i=n>=0?t.slice(n+1):``,a=/,/.test(r),o=(i.match(/[#0?]/g)??[]).length,s=(r.replace(/,/g,``).match(/0/g)??[]).length,[c,l=``]=mt(e,o).split(`.`),u=c.padStart(s,`0`),d=a?u.replace(/\B(?=(\d{3})+(?!\d))/g,`,`):u;return o===0?d:`${d}.${l.padEnd(o,`0`)}`}var Et,Dt=t((()=>{pt(),gt(),Et=new Map}));function Ot(e,t,n){if(t===``||n<=0)return``;if(e.measureText(t).width<=n)return t;if(e.measureText(kt).width>n)return``;let r=0,i=t.length-1,a=0;for(;r<=i;){let o=r+i>>1;e.measureText(t.slice(0,o)+kt).width<=n?(a=o,r=o+1):i=o-1}let o=a>0?t.charCodeAt(a-1):0;return o>=55296&&o<=56319&&a--,t.slice(0,a)+kt}var kt,At=t((()=>{kt=`…`}));function jt(e,t,n,r=!1){let i=Math.max(0,t-1),a=Number.isFinite(e)?Math.max(0,Math.min(i,e)):0,o=n?(a+.5)/Math.max(1,t):t===1?.5:a/i;return r?1-o:o}function Mt(e,t){return e!=null&&Number.isFinite(e)?Math.max(0,Math.min(500,e)):t===`legacy`?150:33}var Nt=t((()=>{}));function Pt(e){return e!=null&&Number.isFinite(e)?e:null}function Ft(e){return Object.is(e,-0)?`0`:String(Number.isInteger(e)?e:Number(e.toPrecision(6)))}function It(e,t){if(e.length>1048576)return{kind:`tooManyInputPoints`};let n=t.intervalClosed===`r`?`r`:`l`,r=Pt(t.underflow),i=Pt(t.overflow);r!=null&&i!=null&&r>=i&&(r=null,i=null);let a=e=>r!=null&&(n===`r`?e<=r:e<r),o=e=>i!=null&&(n===`r`?e>i:e>=i),s=1/0,c=-1/0,l=0,u=0,d=0;for(let t of e){let e=Pt(t);e!=null&&(a(e)?u++:o(e)?d++:(l++,s=Math.min(s,e),c=Math.max(c,e)))}if(l+u+d===0)return{kind:`bins`,categories:[],counts:[]};let f=[],p=[];if(r!=null&&(f.push(`${n===`r`?`≤`:`<`} ${Ft(r)}`),p.push(u)),l>0){let u=r??s,d=i??c,m=d-u;if(!Number.isFinite(m))f.push(`${Ft(u)} – ${Ft(d)}`),p.push(l);else{let s=Pt(t.binSize),c;c=s!=null&&s>0&&m>0?Math.max(1,Math.ceil(m/s)):t.binCount!=null&&Number.isFinite(t.binCount)&&t.binCount>0?Math.max(1,Math.floor(t.binCount)):Math.max(1,Math.ceil(Math.sqrt(l)));let d=m<=0?1:Math.min(512,c),h=m>0&&s!=null&&s>0&&c<=512,g=m===0?1:h?s:m/d,_=Array(d).fill(0);for(let t of e){let e=Pt(t);if(e==null||a(e)||o(e))continue;let r=h?(e-u)/g:m===0?0:(e-u)/m*d,i=n===`r`?Math.ceil(r)-1:Math.floor(r),s=Math.max(0,Math.min(d-1,i));_[s]++}for(let e=0;e<d;e++){let t=h?u+g*e:u+e/d*m,a=h?t+g:u+m*((e+1)/d),o=i==null?a:Math.min(a,i),s=n===`r`&&(r!=null||e>0)?`>`:`≥`,c=n===`l`&&(i!=null||e<d-1)?`<`:`≤`;f.push(`${s} ${Ft(t)} – ${c} ${Ft(o)}`),p.push(_[e])}}}return i!=null&&(f.push(`${n===`r`?`>`:`≥`} ${Ft(i)}`),p.push(d)),{kind:`bins`,categories:f,counts:p}}function Lt(e){let t=Math.floor(e.length/2);return e.length%2==1?e[t]:e[t-1]/2+e[t]/2}function Rt(e){let t=0;for(let n of e)t=Math.max(t,Math.abs(n));if(t===0)return 0;let n=0;for(let r of e)n+=r/t;return n/e.length*t}function zt(e,t,n){if(!Number.isFinite(t))return n<0?-Number.MAX_VALUE:Number.MAX_VALUE;let r=e+n*t;return Number.isFinite(r)?r:n<0?-Number.MAX_VALUE:Number.MAX_VALUE}function Bt(e,t){let n=e.filter(e=>typeof e==`number`&&Number.isFinite(e)).sort((e,t)=>e-t);if(n.length===0)return null;let r=Math.floor(n.length/2),i=Lt(n),a=t===`inclusive`&&n.length%2==1,o=n.slice(0,r+ +!!a),s=n.slice(r+ +(n.length%2==1&&!a)),c=Lt(o.length>0?o:n),l=Lt(s.length>0?s:n),u=(l-c)*1.5,d=zt(c,u,-1),f=zt(l,u,1),p=[],m=[];for(let e of n)e<d||e>f?m.push(e):p.push(e);return{q1:c,median:i,q3:l,lowerFence:d,upperFence:f,whiskerLo:p[0]??n[0],whiskerHi:p[p.length-1]??n[n.length-1],mean:Rt(n),outliers:m,inner:p}}function Vt(e,t){let n=0;for(let r of e)for(let e of r)if(n+=e.length,!Number.isSafeInteger(n)||n>t)return t+1;return n}function Ht(e,t,n,r,i,a,o){if(!Number.isFinite(e)||!Number.isFinite(t)||t<=0||!Number.isInteger(n)||n<=0||!Number.isInteger(r)||r<=0||!Number.isInteger(i)||i<0||i>=n||!Number.isInteger(a)||a<0||a>=r||!Number.isFinite(o)||o<0)return null;let s=t/n,c=s/(r+o/100),l=c*r,u=c*.06,d=c-u,f=e+s*(i+.5)-l/2+a*c+u/2;return{boxX:f,boxWidth:d,centerX:f+d/2}}function Ut(e,t){return e==null?e:e.flatMap(e=>{let n=t.get(e.idx);return n==null?[]:[{...e,idx:n}]})}function Wt(e,t){return e==null?e:t.map(t=>e[t]??null)}function Gt(e,t){let n=e.values.map((e,t)=>({value:e,sourceIndex:t})).filter(e=>e.value!=null&&Number.isFinite(e.value)&&e.value>=0).sort((e,t)=>t.value-e.value||e.sourceIndex-t.sourceIndex),r=n[0]?.value??0,i=r>0?n.reduce((e,t)=>e+t.value/r,0):0,a=0,o=n.map(n=>(r>0&&(a+=n.value/r),{sourceIndex:n.sourceIndex,category:e.categories?.[n.sourceIndex]??t[n.sourceIndex]??String(n.sourceIndex+1),value:n.value,cumulativeFraction:i>0?a>=i?1:a/i:0})),s=o.map(e=>e.sourceIndex),c=new Map(s.map((e,t)=>[e,t])),l=o.map(e=>e.category),u={...e,categories:l,catFormatCodes:Wt(e.catFormatCodes,s),dataPointColors:Wt(e.dataPointColors,s),dataLabelColors:Wt(e.dataLabelColors,s),dataPointOverrides:Ut(e.dataPointOverrides,c),dataLabelOverrides:Ut(e.dataLabelOverrides,c)};return{points:o,categories:l,orderedSeries:{...u,values:o.map(e=>e.value)},series:{...u,values:o.map(e=>e.cumulativeFraction)}}}pt();const Kt=1e4;function qt(e){return e===`days`||e===`months`||e===`years`?e:null}function Jt(e,t){switch(t){case`years`:return new Date(Date.UTC(e.getUTCFullYear(),0,1));case`months`:return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1));case`days`:return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))}}function Yt(e,t,n){if(n===`days`)return new Date(e.getTime()+t*864e5);let r=new Date(e.getTime());return n===`months`?r.setUTCMonth(r.getUTCMonth()+t):r.setUTCFullYear(r.getUTCFullYear()+t),r}function Xt(e,t){switch(t){case`years`:return e.getUTCFullYear();case`months`:return e.getUTCFullYear()*12+e.getUTCMonth();case`days`:return Math.floor(e.getTime()/864e5)}}function Zt(e){let t=e.categories.map(e=>Number(e));if(t.length===0||t.some(e=>!Number.isFinite(e)))return null;let n=e.date1904===!0,r=qt(e.baseTimeUnit)??`days`,i=qt(e.majorTimeUnit)??r,a=qt(e.minorTimeUnit)??r,o=(e,t)=>e==null||!(e>0)||!Number.isFinite(e)||t!==`days`&&!Number.isInteger(e)?null:e,s=o(e.majorUnit,i),c=o(e.minorUnit,a),l=e=>Xt(ct(e,n),r),u=Array(t.length),d=1/0,f=-1/0,p=1/0,m=-1/0;for(let e=0;e<t.length;e++){let n=t[e],r=l(n);u[e]=r,d=Math.min(d,r),f=Math.max(f,r),p=Math.min(p,n),m=Math.max(m,n)}let h=e.explicitMin,g=e.explicitMax,_=h!=null&&Number.isFinite(h)?l(h):null,v=g!=null&&Number.isFinite(g)?l(g):null,y=e.crossBetween!==!1,b=_??d,x=(v??f)+ +!!y;x>b||(b-=.5,x+=.5);let S=x-b,C=e=>(l(e)-b)/S,w=e.reversed?e=>1-C(e):C,T=e=>(l(e)+(y?.5:0)-b)/S,E=e.reversed?e=>1-T(e):T,D=t.map(E),O=t.map(()=>1/S),k=h!=null&&Number.isFinite(h)?h:p,A=g!=null&&Number.isFinite(g)?g:m,j=(e,t)=>{if(t==null)return[];let r=Jt(ct(k,n),e),i=lt(r,n);for(let a=0;i<k&&a<Kt;a++){let a=Yt(r,t,e),o=lt(a,n);if(!(o>i))return[];r=a,i=o}if(i<k)return[];let a=[];for(let o=0;i<=A&&o<Kt;o++){a.push({serial:i,fraction:w(i)});let o=Yt(r,t,e),s=lt(o,n);if(!(s>i))break;r=o,i=s}return a},M=j(i,s),N=new Set(M.map(e=>l(e.serial)));return{positions:D,categoryBandFractions:O,majorTicks:M,minorTicks:c==null?[]:j(a,c).filter(e=>!N.has(l(e.serial)))}}function Qt(e,t,n,r){let i=[[]],a=0,o=e=>{if(!e)return null;let t=e.startsWith(`#`)?e.slice(1):e;return/^[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$/.test(t)?`#${t}`:null};outer:for(let s=0;s<t.runs.length&&s<nn;s++){let c=t.runs[s],l=he(c.fontSizeHpt,t.ptToPx)??n,u=c.fontFace?.trim().replaceAll(`"`,``),d=u&&!u.startsWith(`+`)?u:null,f=u&&t.fontFamilyForFace?t.fontFamilyForFace(u):d?`"${d}", Calibri, Arial, sans-serif`:t.fontFamily,p=`${c.bold??t.fallbackBold?`bold `:``}${l}px ${f}`,m=o(c.color)??r,h=``,g=()=>{h&&=(e.font=p,i[i.length-1].push({text:h,font:p,fillStyle:m,width:e.measureText(h).width,fontSizePx:l}),``)},_=!1;for(let e of c.text){if(_&&e===`
|
|
2
|
-
`){_=!1;continue}_=!1;let t=e===`\r`?`
|
|
3
|
-
`:e;if(e===`\r`&&(_=!0),a>=en){g();break outer}if(a++,t===`
|
|
4
|
-
`){if(g(),i.length>=tn)break outer;i.push([])}else h+=t}g()}if(!i.some(e=>e.length>0))return null;let s=i.map(e=>Math.max(n,...e.map(e=>e.fontSizePx))*1.15),c=i.map(e=>e.reduce((e,t)=>e+t.width,0));return{lines:i,lineHeights:s,lineWidths:c,width:Math.max(0,...c),height:s.reduce((e,t)=>e+t,0)}}function $t(e,t,n,r,i=`center`,a=`middle`){let o=a===`top`?r:a===`bottom`?r-t.height:r-t.height/2;for(let r=0;r<t.lines.length;r++){let s=t.lines[r],c=t.lineWidths[r],l=i===`left`?n:i===`right`?n-c:n-c/2,u=a===`top`?o:a===`bottom`?o+t.lineHeights[r]:o+t.lineHeights[r]/2;for(let t of s)e.font=t.font,e.fillStyle=t.fillStyle,e.textAlign=`left`,e.textBaseline=a,e.fillText(t.text,l,u),l+=t.width;o+=t.lineHeights[r]}}var en,tn,nn,rn=t((()=>{Fe(),en=4096,tn=4,nn=en}));function an(e){if(e.customText)return e.customText;let t=[];if(e.showCategory&&e.category&&t.push(e.category),e.showSeries&&e.seriesName&&t.push(e.seriesName),e.showValue&&e.sourceValue!=null){let n=e.valueDivisor!=null&&Number.isFinite(e.valueDivisor)&&e.valueDivisor>0?e.valueDivisor:1;t.push(yt(e.sourceValue/n,e.formatCode??null,e.date1904))}return e.showPercent&&e.percentRatio!=null&&t.push(yt(e.percentRatio,e.percentFormatCode??e.formatCode??`0%`,e.date1904)),t.filter(e=>e!==``).join(e.separator??e.defaultSeparator??` `)}var on=t((()=>{Dt()}));Fe();function sn(e,t,n,r,i,a,o){if(![n,r,i].every(Number.isFinite)||n<=0||r<=0||t.w<=0||t.h<=0)return null;let s=Math.max(4,i*.5),c=Math.min(n,Math.max(0,t.w-s*2)),l=Math.min(r,t.h),u=t.x+t.w*.75,d={x:o?Math.max(t.x,Math.min(t.x+t.w-c,u-c)):Math.max(t.x,t.x+t.w-s-c),y:o?Math.max(t.y,Math.min(t.y+t.h-l,o.y-l+i*.25)):Math.min(t.y+t.h-l,t.y+s),w:c,h:l};if(a){let t=Oe(a,e,d);if(t)return{...t,automatic:!1}}return{...d,automatic:!0}}function cn(e,t,n,r){if(!(!t.legendFillColor&&!t.legendLineColor)){if(e.save(),t.legendFillColor&&(e.fillStyle=`#${t.legendFillColor}`,e.fillRect(n.x,n.y,n.w,n.h)),t.legendLineColor&&n.w>0&&n.h>0){let i=rt(t.legendLineWidthEmu,r);e.strokeStyle=`#${t.legendLineColor}`,e.lineWidth=i,e.lineCap=`butt`,e.lineJoin=`miter`,e.setLineDash([]),e.strokeRect(n.x+i/2,n.y+i/2,Math.max(0,n.w-i),Math.max(0,n.h-i))}e.restore()}}var ln=t((()=>{st()}));function un(e,t){let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y),i=Math.min(e.x+e.w,t.x+t.w),a=Math.min(e.y+e.h,t.y+t.h);return i>n&&a>r?{x:n,y:r,w:i-n,h:a-r}:null}function dn(e,t,n){return Math.min(Math.max(e,t),n)}function fn(e,t,n,r,i,a=t){if(!gn(t)||!gn(a)||!Number.isFinite(r)||r<=0||![n.w,n.h].every(Number.isFinite)||n.w<0||n.h<=0)return null;let o=r*.5,s=t,c,l,u=!1,d=`center`,f=`middle`;if(e.kind===`point`){if(![e.x,e.y,e.markerGap??0].every(Number.isFinite))return null;let t=o+Math.max(0,e.markerGap??0);switch(c=e.x,l=e.y,e.position??`r`){case`l`:c-=t+n.w/2,d=`right`;break;case`t`:l-=t+n.h/2,f=`bottom`;break;case`b`:l+=t+n.h/2,f=`top`;break;case`ctr`:case`inEnd`:case`bestFit`:break;default:c+=t+n.w/2,d=`left`;break}}else if(e.kind===`box`){if(![e.rect.x,e.rect.y,e.rect.w,e.rect.h].every(Number.isFinite)||e.rect.w<=0||e.rect.h<=0)return null;let r=un(e.rect,t);if(!r)return null;let i=e.position??`ctr`;c=r.x+r.w/2,l=r.y+r.h/2,i===`inBase`?(s={x:r.x+o,y:r.y+o,w:r.w-o,h:r.h-o},c=s.x+n.w/2,l=s.y+n.h/2,d=`left`,f=`top`):i===`inEnd`?(s={x:r.x+o,y:r.y,w:r.w-o,h:r.h-o},c=s.x+n.w/2,l=s.y+s.h-n.h/2,d=`left`,f=`bottom`):i===`l`?(s={x:r.x+o,y:r.y+o,w:r.w-o,h:r.h-o*2},c=s.x+n.w/2,d=`left`):i===`r`||i===`outEnd`?(s={x:r.x,y:r.y+o,w:r.w-o,h:r.h-o*2},c=s.x+s.w-n.w/2,d=`right`):i===`t`?(s={x:r.x+o,y:r.y+o,w:r.w-o*2,h:r.h-o},l=s.y+n.h/2,f=`top`):i===`b`?(s={x:r.x+o,y:r.y,w:r.w-o*2,h:r.h-o},l=s.y+s.h-n.h/2,f=`bottom`):s={x:r.x+o,y:r.y+o,w:r.w-o*2,h:r.h-o*2}}else{if(![e.rect.x,e.rect.y,e.rect.w,e.rect.h].every(Number.isFinite)||e.rect.w<0||e.rect.h<0)return null;let r=e.position??`outEnd`,i=r===`inBase`||r===`inEnd`||r===`ctr`;if(u=!i,i){let n=un(e.rect,t);if(!n)return null;s=n}else if(e.orientation===`vertical`&&e.rect.w<=0||e.orientation===`horizontal`&&e.rect.h<=0)return null;let a=e.rect.x+e.rect.w/2,p=e.rect.y+e.rect.h/2;if(c=a,l=p,e.orientation===`vertical`){let t=e.negative?e.rect.y+e.rect.h:e.rect.y,i=e.negative?e.rect.y:e.rect.y+e.rect.h;r===`inBase`?(l=i+(e.negative?1:-1)*(o+n.h/2),f=e.negative?`top`:`bottom`):r===`inEnd`?(l=t+(e.negative?-1:1)*(o+n.h/2),f=e.negative?`bottom`:`top`):r!==`ctr`&&(l=t+(e.negative?1:-1)*(o+n.h/2),f=e.negative?`top`:`bottom`)}else{let t=e.negative?e.rect.x:e.rect.x+e.rect.w,i=e.negative?e.rect.x+e.rect.w:e.rect.x;r===`inBase`?(c=i+(e.negative?-1:1)*(o+n.w/2),d=e.negative?`right`:`left`):r===`inEnd`?(c=t+(e.negative?1:-1)*(o+n.w/2),d=e.negative?`left`:`right`):r!==`ctr`&&(c=t+(e.negative?-1:1)*(o+n.w/2),d=e.negative?`right`:`left`)}}let p=Math.max(2,r*.5),m=Math.max(2,r*.9);if(s.w<p||s.h<m)return null;let h={x:c-Math.min(n.w,s.w)/2,y:l-Math.min(n.h,s.h)/2,w:Math.min(n.w,s.w),h:Math.min(n.h,s.h)};if(i){let e=Oe(i,a,h);if(!e)return null;h=e,d=`center`,f=`middle`;let n=un(e,t);if(!n||(s=n,s.w<p||s.h<m))return null}let g=Math.min(Math.max(p,h.w),s.w),_=Math.min(Math.max(m,h.h),s.h),v=g/2,y=_/2,b=u||i?h.x+h.w/2:dn(h.x+h.w/2,s.x+v,s.x+s.w-v),x=u||i?h.y+h.h/2:dn(h.y+h.h/2,s.y+y,s.y+s.h-y);return[b,x].every(Number.isFinite)?{x:d===`left`?b-v:d===`right`?b+v:b,y:f===`top`?x-y:f===`bottom`?x+y:x,textAlign:d,textBaseline:f,maxWidth:s.w,maxHeight:s.h,clip:s,rect:h}:null}function pn(e,t,n){if(n(e)<=t)return e;if(n(`…`)>t)return``;let r=0,i=Array.from(e),a=i.length;for(;r<a;){let e=Math.ceil((r+a)/2);n(`${i.slice(0,e).join(``)}…`)<=t?r=e:a=e-1}return`${i.slice(0,r).join(``)}…`}function mn(e){let t=``,n=0;for(let r of e){if(n>=_n)return{value:t,truncated:!0};t+=r,n++}return{value:t,truncated:!1}}function hn(e,t,n,r,i){if(![t,n,r].every(Number.isFinite)||t<=0||n<r||r<=0)return[];let a=Math.max(1,Math.min(vn,Math.floor(n/r))),o=mn(e),s=o.value.split(/\r?\n/),c=[],l=o.truncated,u=e=>{let n=[],r=``;for(let a of Array.from(e)){let e=`${r}${a}`;r&&i(e)>t?(n.push(r),r=a):r=e}return r&&n.push(r),n.filter(e=>i(e)<=t)};for(let e of s){if(i(e)<=t){c.push(e);continue}let n=e.match(/\S+\s*|\s+/g)??[];if(n.length<=1)c.push(...u(e));else{let e=``;for(let r of n){let n=`${e}${r}`;if(i(n)<=t)e=n;else{e&&c.push(e);let t=u(r);e=t.pop()??``,c.push(...t)}}e&&c.push(e)}}l||=c.length>a;let d=c.slice(0,a);return l&&d.length>0&&!d[d.length-1].endsWith(`…`)&&(d[d.length-1]=pn(`${d[d.length-1]}…`,t,i)),d}var gn,_n,vn,yn=t((()=>{Fe(),gn=e=>[e.x,e.y,e.w,e.h].every(Number.isFinite)&&e.w>0&&e.h>0,_n=4096,vn=4}));function bn(e,t){return[Math.max(1,Math.ceil(e)),Math.max(1,Math.ceil(t))]}function xn(e,t){let[n,r]=bn(e,t);if(typeof OffscreenCanvas<`u`)return new OffscreenCanvas(n,r);if(typeof document<`u`){let e=document.createElement(`canvas`);return e.width=n,e.height=r,e}return null}function Sn(e,t,n){let[r,i]=bn(t,n);if(typeof OffscreenCanvas<`u`)try{return new OffscreenCanvas(r,i)}catch{}if(typeof document<`u`)try{let e=document.createElement(`canvas`);return e.width=r,e.height=i,e}catch{}try{let t=e.canvas?.constructor;return typeof t==`function`?new t(r,i):null}catch{return null}}const Cn={pct5:[0,16,0,0,0,1,0,0],pct10:[136,0,34,0,136,0,34,0],pct20:[136,34,136,34,136,34,136,34],pct25:[136,85,34,85,136,85,34,85],pct30:[170,85,170,85,170,85,170,85],pct40:[170,119,170,221,170,119,170,221],pct50:[170,85,170,85,170,85,170,85],pct60:[221,85,119,85,221,85,119,85],pct70:[238,85,187,85,238,85,187,85],pct75:[238,170,187,170,238,170,187,170],pct80:[254,239,251,191,254,239,251,191],pct90:[255,239,255,251,255,239,255,251],horz:[255,0,0,0,255,0,0,0],vert:[136,136,136,136,136,136,136,136],ltHorz:[0,255,0,0,0,0,0,0],ltVert:[32,32,32,32,32,32,32,32],dkHorz:[255,255,0,0,255,255,0,0],dkVert:[204,204,204,204,204,204,204,204],narHorz:[255,0,255,0,255,0,255,0],narVert:[170,170,170,170,170,170,170,170],cross:[255,136,136,136,255,136,136,136],lgGrid:[255,128,128,128,128,128,128,128],smGrid:[255,136,136,136,255,136,136,136],dotGrid:[136,0,0,0,136,0,0,0],dnDiag:[128,64,32,16,8,4,2,1],upDiag:[1,2,4,8,16,32,64,128],ltDnDiag:[136,68,34,17,136,68,34,17],ltUpDiag:[17,34,68,136,17,34,68,136],dkDnDiag:[195,129,0,129,195,129,0,129],dkUpDiag:[195,129,0,129,195,129,0,129],wdDnDiag:[128,64,32,16,8,4,2,129],wdUpDiag:[1,2,4,8,16,32,64,129],diagCross:[129,66,36,24,24,36,66,129],horzBrick:[255,16,16,16,255,1,1,1],diagBrick:[129,66,36,24,36,66,129,0],lgCheck:[240,240,240,240,15,15,15,15],smCheck:[204,204,51,51,204,204,51,51],trellis:[165,90,165,90,165,90,165,90]};function wn(e,t,n){let r=Cn[e];if(!r)return null;let i=xn(8,8);if(!i)return null;let a=i.getContext(`2d`);if(!a)return null;a.fillStyle=Tn(n),a.fillRect(0,0,8,8),a.fillStyle=Tn(t);for(let e=0;e<8;e++){let t=r[e];for(let n=0;n<8;n++)t&1<<7-n&&a.fillRect(n,e,1,1)}return i}function Tn(e){return`rgba(${parseInt(e.slice(0,2),16)},${parseInt(e.slice(2,4),16)},${parseInt(e.slice(4,6),16)},${e.length>=8?parseInt(e.slice(6,8),16)/255:1})`}function En(e,t){return e.map(e=>e*t)}function Dn(e,t){let n=An[e];return n?En(n,t):[]}function On(e,t){let n=jn[e];return n?En(n,t):[]}function kn(e,t){let n=On(e,t);if(n.length>0)return n;let r=e.trim().split(/[\s,]+/).map(Number);return r.length>=2&&r.every(e=>Number.isFinite(e)&&e>=0)&&r.some(e=>e>0)?(r.length%2!=0&&r.pop(),En(r,t)):[]}var An,jn,Mn=t((()=>{An={dotted:[1,2],dashed:[3,2],dashSmallGap:[3,1],dotDash:[1,2,3,2],dotDotDash:[1,2,1,2,3,2],dashDotStroked:[1,2,3,2]},jn={dash:[6,3],dot:[1.5,3],dashDot:[6,3,1.5,3],lgDash:[10,4],lgDashDot:[10,4,1.5,4],lgDashDotDot:[10,4,1.5,4,1.5,4],sysDash:[4,2],sysDot:[1,2],sysDashDot:[4,2,1,2],sysDashDotDot:[4,2,1,2,1,2]}}));Mn();function Nn(e,t,n,r,i,a,o){let s=e.tileRect;if(!s||(s.l??0)===0&&(s.t??0)===0&&(s.r??0)===0&&(s.b??0)===0)return null;let c=n+i*(s.l??0),l=r+a*(s.t??0),u=i*(1-(s.l??0)-(s.r??0)),d=a*(1-(s.t??0)-(s.b??0));if(!Number.isFinite(u)||!Number.isFinite(d)||Math.abs(u)<1e-9||Math.abs(d)<1e-9)return null;let f=Math.min(1,512/Math.abs(u),512/Math.abs(d)),p=Math.max(1,Math.ceil(Math.abs(u)*f)),m=Math.max(1,Math.ceil(Math.abs(d)*f)),h=Sn(t,p,m),g=h?.getContext(`2d`);if(!h||!g)return null;let _=Ln({...e,tileRect:void 0,flip:void 0},g,0,0,p,m,o);if(!_)return null;g.fillStyle=_,g.fillRect(0,0,p,m);let v=e.flip===`x`||e.flip===`xy`,y=e.flip===`y`||e.flip===`xy`,b=h;if(v||y){let e=Sn(t,p*(v?2:1),m*(y?2:1)),n=e?.getContext(`2d`);if(!e||!n)return null;for(let e=0;e<(y?2:1);e+=1)for(let t=0;t<(v?2:1);t+=1)n.save(),n.translate(t*p,e*m),n.scale(t===1?-1:1,e===1?-1:1),n.drawImage(h,t===1?-p:0,e===1?-m:0),n.restore();b=e}let x=t.createPattern(b,`repeat`);return!x||typeof x.setTransform!=`function`?null:(x.setTransform({a:u/p,b:0,c:0,d:d/m,e:c,f:l}),x)}function Pn(e,t=1){let n=e.charCodeAt(0)===35?e.slice(1):e;return`rgba(${parseInt(n.slice(0,2),16)},${parseInt(n.slice(2,4),16)},${parseInt(n.slice(4,6),16)},${n.length>=8?parseInt(n.slice(6,8),16)/255:t})`}function Fn(e){let t=e.charCodeAt(0)===35?e.slice(1):e,n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16);return .299*n+.587*r+.114*i}function In(e){return e&&Fn(e)<128?`#FFFFFF`:`#000000`}function Ln(e,t,n,r,i,a,o=0){if(!e||e.fillType===`none`)return null;if(e.fillType===`solid`)return Pn(e.color);if(e.fillType===`pattern`)return zn(e,t);if(e.fillType===`gradient`){let s=e.stops;if(s.length===0)return null;if(s.length===1)return Pn(s[0].color);let c=Nn(e,t,n,r,i,a,o);if(c)return c;let l,u=e.tileRect,d=n+i*(u?.l??0),f=r+a*(u?.t??0),p=i*(1-(u?.l??0)-(u?.r??0)),m=a*(1-(u?.t??0)-(u?.b??0));if(e.gradType===`radial`){let n=e.fillToRect,r=d+p*(n?.l??0),i=f+m*(n?.t??0),a=p*(1-(n?.l??0)-(n?.r??0)),o=m*(1-(n?.t??0)-(n?.b??0)),s=r+a/2,c=i+o/2,u=Math.max(Math.abs(s-d),Math.abs(d+p-s)),h=Math.max(Math.abs(c-f),Math.abs(f+m-c)),g=e.path===`rect`?Math.max(u,h):Math.sqrt(u*u+h*h);l=t.createRadialGradient(s,c,0,s,c,Math.max(g,1e-9))}else{let n=(e.rotWithShape===!1?e.angle-o:e.angle)*Math.PI/180,r=Math.cos(n),i=Math.sin(n);if(e.scaled===!0){r*=p,i*=m;let e=Math.hypot(r,i);e>0&&(r/=e,i/=e)}let a=d+p/2,s=f+m/2,c=(Math.abs(r)*p+Math.abs(i)*m)/2;l=t.createLinearGradient(a-r*c,s-i*c,a+r*c,s+i*c)}for(let e of s)l.addColorStop(Math.min(1,Math.max(0,e.position)),Pn(e.color));return l}return null}const Rn=new WeakMap;function zn(e,t){let n=`${e.preset}|${e.fg}|${e.bg}`,r=Rn.get(t);r||(r=new Map,Rn.set(t,r));let i=r.get(n);if(i)return i;let a=wn(e.preset,e.fg,e.bg);if(!a)return Pn(e.fg);let o=t.createPattern(a,`repeat`);return o?(r.set(n,o),o):Pn(e.fg)}function Bn(e,t,n){if(!t){e.strokeStyle=`transparent`,e.lineWidth=0,e.setLineDash([]),e.lineCap=`butt`,e.lineJoin=`miter`,e.miterLimit=10;return}e.strokeStyle=Pn(t.color);let r=Math.max(.5,t.width*n);e.lineWidth=r;let i=t.customDash?t.customDash.flatMap(e=>[Math.max(0,e.dash)*r,Math.max(0,e.space)*r]):t.dashStyle?kn(t.dashStyle,r):[],a=t.lineCap??`butt`,o=i.some((e,t)=>t%2==0&&e===0);e.lineCap=a===`butt`&&o?`square`:a,e.lineJoin=t.lineJoin??`miter`,e.miterLimit=t.miterLimit??10,e.setLineDash(i)}function Vn(e){return e.rotationX===15&&e.rotationY===20&&e.rightAngleAxes===!1&&e.perspective===30}function Hn(e){return Vn(e)?2:1}function Un(e,t){let n=e.replace(/^#/,``);if(!/^[0-9a-f]{6}$/i.test(n)||!Number.isFinite(t))return e;let r=Math.max(0,t),i=e=>Math.max(0,Math.min(255,Math.round(Number.parseInt(n.slice(e,e+2),16)*r))).toString(16).padStart(2,`0`);return`#${i(0)}${i(2)}${i(4)}`.toUpperCase()}function Wn(e,t){let n=e.replace(/^#/,``);if(!/^[0-9a-f]{6}$/i.test(n)||!Number.isFinite(t))return e;let r=Math.max(-1,Math.min(1,t)),i=e=>{let t=qn(Number.parseInt(n.slice(e,e+2),16)/255),i=r<0?t*(1+r):t*(1-r)+r;return Math.round(Math.max(0,Math.min(1,Jn(i)))*255).toString(16).padStart(2,`0`)};return`#${i(0)}${i(2)}${i(4)}`.toUpperCase()}function Gn(e,t,n,r){if(e.length<6||t<0||n<=0)return null;let i=e[t%6];if(!i)return null;if(![2,10,18,26,34,42].includes(r??-1))return`#${i}`.toUpperCase();let a=Math.floor(n/6);return Wn(i,-.7+1.4*((Math.floor(t/6)+1)/(a+2)))}function Kn(e){if(!e)return 1;let t=e.z<0?{x:-e.x,y:-e.y,z:-e.z}:e,n={x:.24,y:.42,z:.88},r=Math.hypot(n.x,n.y,n.z),i=Math.max(0,(t.x*n.x+t.y*n.y+t.z*n.z)/r);return Math.max(.48,Math.min(1.22,.48+.78*i))}var qn,Jn,Yn=t((()=>{qn=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4,Jn=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055}));function Xn(e,t,n,r,i){let a=Number.isFinite(e)&&e>0?e:0,o=Number.isFinite(t)?tr(t,0,500):150,s=Math.max(1,Math.trunc(r)),c=tr(Math.trunc(n),0,s-1),l=i?1:s,u=a/(l+o/100);return{offset:(a-u*l)/2+(i?0:c*u),size:u}}function Zn(e,t,n){if(![e,t,n].every(Number.isFinite))return 1;let r=e>=0?n:t;return 1-Math.min(1,Math.abs(e)/Math.max(Number.MIN_VALUE,Math.abs(r)))}function Qn(e,t,n,r=.06){if(!t.length||t.length>1e5||![n.x,n.y,n.w,n.h].every(Number.isFinite)||n.w<=0||n.h<=0)return e;let i=t.map(t=>e.project(t.x,t.y,t.depth));if(!i.every(e=>Number.isFinite(e.x)&&Number.isFinite(e.y)))return e;let a=1/0,o=-1/0,s=1/0,c=-1/0;for(let e of i)a=Math.min(a,e.x),o=Math.max(o,e.x),s=Math.min(s,e.y),c=Math.max(c,e.y);let l=o-a,u=c-s;if(!(l>2**-52)||!(u>2**-52))return e;let d=tr(er(r,.06),0,.45),f=n.w*(1-2*d),p=n.h*(1-2*d),m=Math.min(f/l,p/u);if(!(m>0)||!Number.isFinite(m))return e;let h={x:(a+o)/2,y:(s+c)/2},g={x:n.x+n.w/2,y:n.y+n.h/2},_=e.project,v=(e,t,n)=>{let r=_(e,t,n);return{x:g.x+(r.x-h.x)*m,y:g.y+(r.y-h.y)*m}};return{...e,project:v,depthX:e.depthX*m,depthY:e.depthY*m}}function $n(e,t,n={}){if(![t.x,t.y,t.w,t.h].every(Number.isFinite)||t.w<=0||t.h<=0)return null;let r=tr(er(e.rotationX,15),-90,90),i=(tr(er(e.rotationY,20),0,360)+180)%360-180,a=tr(er(e.depthPercent,100),20,2e3),o=tr(er(e.perspective,30),0,240),s=tr(er(e.gapDepthPercent,150),0,500),c=e.heightPercent!=null&&Number.isFinite(e.heightPercent)?tr(e.heightPercent,5,500):null,l=n.sceneHeightScale!=null&&Number.isFinite(n.sceneHeightScale)?tr(n.sceneHeightScale*100,5,500):null,u=c??l,d=t;if(u!=null){let e=u/100,n=Math.min(t.w,t.h/e),r=n*e;d={x:t.x+(t.w-n)/2,y:t.y+(t.h-r)/2,w:n,h:r}}let f=Math.PI/180,p=tr(er(n.sceneDepthScale,.1),.01,2),m=d.w*p*(a/100),h=d.x+d.w/2,g=d.y+d.h/2,_=-i*f,v=r*f,y=Math.cos(_),b=Math.sin(_),x=Math.cos(v),S=Math.sin(v),C=e.rightAngleAxes!==!0&&o>0,w=tr(o*.25,.25,60)*f,T=tr(er(n.perspectiveTangentGain,2),.25,4),E=Math.atan(T*Math.tan(w)),D=Math.hypot(d.w,d.h,m),O=C?D*.5/Math.tan(E):1/0,k=(e,t,n)=>{let r=e-h,i=g-t,a=(.5-tr(Number.isFinite(n)?n:0,0,1))*m,o=y*r+b*a,s=-b*r+y*a;return{x:o,y:x*i-S*s,z:S*i+x*s}},A=e=>{if(e.length<3)return null;let t=e.map(e=>k(e.x,e.y,e.depth)),n=t[0],r=null;for(let e=1;e+1<t.length&&!r;e++)for(let i=e+1;i<t.length;i++){let a=t[e],o=t[i],s={x:a.x-n.x,y:a.y-n.y,z:a.z-n.z},c={x:o.x-n.x,y:o.y-n.y,z:o.z-n.z},l={x:s.y*c.z-s.z*c.y,y:s.z*c.x-s.x*c.z,z:s.x*c.y-s.y*c.x},u=Math.hypot(l.x,l.y,l.z);if(u>2**-52){r={x:l.x/u,y:l.y/u,z:l.z/u};break}}return r?{normal:r,centroid:t.reduce((e,n)=>({x:e.x+n.x/t.length,y:e.y+n.y/t.length,z:e.z+n.z/t.length}),{x:0,y:0,z:0})}:null},j=-1/0;for(let e of[d.x,d.x+d.w])for(let t of[d.y,d.y+d.h])for(let n of[0,1])j=Math.max(j,k(e,t,n).z);let M=C?Math.max(O,j+D*.01):1/0,N=(e,t,n)=>{let r=k(e,t,n);if(!C)return{x:r.x,y:-r.y};let i=M/Math.max(M*1e-9,M-r.z);return{x:r.x*i,y:-r.y*i}},P=[];for(let e of[d.x,d.x+d.w])for(let t of[d.y,d.y+d.h])for(let n of[0,1])P.push(N(e,t,n));let F=Math.min(...P.map(e=>e.x)),I=Math.max(...P.map(e=>e.x)),L=Math.min(...P.map(e=>e.y)),R=Math.max(...P.map(e=>e.y)),z=Math.max(Number.MIN_VALUE,I-F),ee=Math.max(Number.MIN_VALUE,R-L),B=Math.min(t.w/z,t.h/ee)*.94,V=t.x+(t.w-z*B)/2-F*B,H=t.y+(t.h-ee*B)/2-L*B,U=(e,t,n)=>{let r=N(e,t,n);return{x:V+r.x*B,y:H+r.y*B}},te={...d},W=U(h,g,0),ne=U(h,g,1),G=ne.x-W.x,K=ne.y-W.y,q=(e,t)=>k(e===`x`?t===`min`?d.x:d.x+d.w:h,e===`y`?t===`min`?d.y:d.y+d.h:g,e===`depth`?t===`min`?0:1:.5).z,J=q(`x`,`min`)<=q(`x`,`max`)?`min`:`max`,Y=q(`y`,`min`)<=q(`y`,`max`)?`min`:`max`,re=q(`depth`,`min`)>=q(`depth`,`max`)?0:1,ie=+(re===0),ae=e=>{let t=e===`min`?d.x:d.x+d.w,n=U(t,d.y,re),r=U(t,d.y+d.h,re);return(n.x+r.x)/2},oe=e=>{let t=e===`min`?d.y:d.y+d.h,n=U(d.x,t,re),r=U(d.x+d.w,t,re);return(n.y+r.y)/2},se=ae(`min`)<=ae(`max`)?`min`:`max`,ce=oe(`min`)>=oe(`max`)?`min`:`max`,le=e=>1/Math.max(1,Math.trunc(e))/(1+s/100),ue=(e,t,n=!1)=>n||t<=1?.5:(tr(Math.trunc(e),0,Math.max(0,t-1))+.5)/t;return{scene:d,front:te,depthX:G,depthY:K,modelDepth:m,pieScaleY:tr(Math.sin(Math.max(1,Math.abs(r))*f)**1.15,.2,1),pieThicknessFraction:.3*Math.max(0,Math.cos(Math.abs(r)*f)),project:U,cameraDepth(e,t,n){return k(e,t,n).z},cameraProjectionWeight(e,t,n){if(!C)return 1;let r=k(e,t,n).z;return 1/Math.max(M*1e-9,M-r)},cameraFacing(e){let t=A(e);if(!t)return!1;let{normal:n,centroid:r}=t,i=C?{x:-r.x,y:-r.y,z:M-r.z}:{x:0,y:0,z:1},a=n.x*i.x+n.y*i.y+n.z*i.z,o=Math.hypot(i.x,i.y,i.z);return o>0&&a>o*1e-10},cameraNormal(e){return A(e)?.normal??null},topology:{farX:J,farY:Y,axisX:se,axisY:ce,nearDepth:re,farDepth:ie},seriesDepth:ue,prismDepth:le,prismInterval(e,t,n=!1){let r=ue(e,t,n),i=le(n?1:t)/2;return{near:tr(r-i,0,1),far:tr(r+i,0,1)}}}}var er,tr,nr=t((()=>{er=(e,t)=>typeof e==`number`&&Number.isFinite(e)?e:t,tr=(e,t,n)=>Math.min(n,Math.max(t,e))}));Fe(),$e(),st(),Dt(),At(),Nt(),rn(),on(),ln(),yn(),Mn(),Yn(),nr(),nt();const rr=[`4472C4`,`ED7D31`,`A9D18E`,`FF0000`,`70AD47`,`4BACC6`,`FFC000`,`9E480E`,`843C0C`,`636363`,`255E91`,`967300`],ir=[`5B9BD5`,`ED7D31`,`A5A5A5`,`FFC000`,`4472C4`,`70AD47`];function ar(e,t){return t?.color?`#${t.color}`:`#${rr[e%rr.length]}`}function or(e){let t=new Map;for(let n of e??[])t.has(n.idx)||t.set(n.idx,n);return t}function sr(e,t,n=!0){let r=t.dataPointColors?.[e];return r?`#${r}`:t.color===`00000000`?`#00000000`:n?`#${rr[e%rr.length]}`:ar(e,t)}function cr(e,t){return t&&(t.startsWith(`+mj`)?e.themeMajorFontLatin??null:t.startsWith(`+mn`)?e.themeMinorFontLatin??null:t)}function lr(e,t,n){let r=n===`major`?e.themeMajorFontLatin:e.themeMinorFontLatin,i=cr(e,t)??r;return i?`"${i}", Calibri, Arial, sans-serif`:`sans-serif`}function ur(e,t,n=!1,r=!1){return`${r?`italic `:``}${n?`bold `:``}${e}px ${t}`}function dr(e){return e===`pie`||e===`doughnut`}function fr(e){return!!e.varyColors&&e.series.length===1&&typeof e.chartType==`string`&&/Bar/.test(e.chartType)}function pr(e,t,n,r=!1){if(r||dr(e)){let e=t[0];return e?sr(n,e):`#${rr[n%rr.length]}`}return ar(n,t[n])}function mr(e,t,n,r,i,a,o,s,c,l,u=`sans-serif`,d,f,p,m){e.save(),e.font=ur(a,u,o,s),e.fillStyle=c;let h=p?t:Ot(e,t,l),g=xe(i,d,f),_=n,v=r;if(p&&m){let t=e.measureText(h).width,i=Math.abs(Math.cos(g)),o=Math.abs(Math.sin(g)),s=t*i+a*o,c=t*o+a*i,l={x:n-s/2,y:r-c/2,w:s,h:c},u=Oe({...p,w:void 0,h:void 0},m,l);u&&(_=u.x+u.w/2,v=u.y+u.h/2)}e.translate(_,v),g!==0&&e.rotate(g),e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(h,0,0),e.restore()}function hr(e){return e?`#${e}`:`#555`}function gr(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m=!1){let h=(t,f,p,m,h,g,_,v,y,b)=>{if(f===`left`){mr(e,t,n+u+X(i)+p/2,s+l/2,f,p,m,h,g,l,_,v,y,b,{x:n,y:r,w:i,h:a});return}mr(e,t,o+c/2,r+a-d-X(a)-p/2,f,p,m,h,g,c,_,v,y,b,{x:n,y:r,w:i,h:a})};t.valAxisTitle&&h(t.valAxisTitle,m?`horizontal`:`left`,p,t.valAxisTitleFontBold??!0,t.valAxisTitleFontItalic??!1,hr(t.valAxisTitleFontColor),lr(t,t.valAxisTitleFontFace,`major`),t.valAxisTitleRotation,t.valAxisTitleVerticalMode,t.valAxisTitleManualLayout),t.catAxisTitle&&h(t.catAxisTitle,m?`left`:`horizontal`,f,t.catAxisTitleFontBold??!0,t.catAxisTitleFontItalic??!1,hr(t.catAxisTitleFontColor),lr(t,t.catAxisTitleFontFace,`major`),t.catAxisTitleRotation,t.catAxisTitleVerticalMode,t.catAxisTitleManualLayout)}function _r(e,t){if(!e.dataTable)return 0;let n=he(e.dataTable.fontSizeHpt,t)??9*t,r=Math.max(1,n*1.2)+4*t;return(e.series.length+1)*r}function vr(e,t,n){let r=t.dataTable;if(!r)return 0;let i=he(r.fontSizeHpt,n)??9*n,a=lr(t,r.fontFace,`minor`);e.save(),e.font=ur(i,a,r.fontBold??!1,r.fontItalic??!1);let o=t.series.reduce((t,n)=>Math.max(t,e.measureText(n.name).width),0);e.restore();let s=r.showKeys?Math.max(12*n,i*1.7):0,c=r.showKeys?4*n:0;return o+s+c+6*n}function yr(e,t,n,r){let i=t.dataTable;if(!i)return null;let a=he(i.fontSizeHpt,r)??9*r,o=Math.max(1,a*1.2),s=o+4*r,c=lr(t,i.fontFace,`minor`);e.save(),e.font=ur(a,c,i.fontBold??!1,i.fontItalic??!1);let l=t.series.find(e=>e.catFormatCode)?.catFormatCode??t.catAxisFormatCode,u=t.series.find(e=>e.catFormatBuiltinId!=null)?.catFormatBuiltinId,d=Di(t).map(i=>{let a=i.trim()===``?NaN:Number(i);return ui(e,u===14&&Number.isFinite(a)?_t(a,t.date1904):bt(i,l,t.date1904),Math.max(1,n-4*r))});e.restore();let f=Math.max(1,...d.map(e=>e.length))*o+4*r;return{fontPx:a,lineHeight:o,headerLines:d,headerHeight:f,rowHeight:s,totalHeight:f+t.series.length*s}}function br(e,t,n,r,i,a,o,s){let c=t.dataTable;if(!c||!n||t.categories.length===0)return;let l=Di(t),u=a/l.length,d=lr(t,c.fontFace,`minor`),f=ur(n.fontPx,d,c.fontBold??!1,c.fontItalic??!1),p=c.showKeys?Math.max(12*s,n.fontPx*1.7):0,m=c.showKeys?4*s:0;e.save(),e.font=f;let h=t.series.reduce((t,n)=>Math.max(t,e.measureText(n.name).width),0)+p+m+6*s,g=Math.min(Math.max(0,r-o),h),_=r-g,v=g+a,y=i+n.totalHeight;e.beginPath(),e.rect(_,i,v,n.totalHeight),e.clip(),e.fillStyle=c.fontColor?`#${c.fontColor}`:`#000000`,e.textAlign=`center`,e.textBaseline=`middle`;for(let t=0;t<l.length;t++){let a=r+(t+.5)*u,o=n.headerLines[t]??[``],s=o.length*n.lineHeight,c=i+(n.headerHeight-s)/2+n.lineHeight/2;o.forEach((t,r)=>{e.fillText(t,a,c+r*n.lineHeight)})}for(let a=0;a<t.series.length;a++){let o=t.series[a],d=i+n.headerHeight+a*n.rowHeight+n.rowHeight/2;if(g>0){let n=_+3*s+p+m;if(e.textAlign=`left`,e.fillText(Ot(e,o.name,Math.max(0,r-n-2*s)),n,d),c.showKeys&&p>0){let n=ar(a,o),r=_+3*s;o.seriesType===`line`||t.chartType===`line`?(e.strokeStyle=o.lineColor?`#${o.lineColor}`:n,e.lineWidth=o.lineWidthEmu==null?Math.max(1,1.5*s):rt(o.lineWidthEmu,s),e.beginPath(),e.moveTo(r,d),e.lineTo(r+p,d),e.stroke(),o.showMarker!==!1&&(e.fillStyle=o.markerFill?`#${o.markerFill}`:n,e.beginPath(),e.arc(r+p/2,d,Math.max(2,2*s),0,Math.PI*2),e.fill())):(e.fillStyle=o.color?`#${o.color}`:n,e.fillRect(r,d-3*s,p,6*s)),e.fillStyle=c.fontColor?`#${c.fontColor}`:`#000000`}}e.textAlign=`center`;for(let t=0;t<l.length;t++){let n=o.values[t],i=n==null?``:yt(n,o.valFormatCode);e.fillText(i,r+(t+.5)*u,d)}}if(c.lineHidden!==!0){if(e.strokeStyle=c.lineColor?`#${c.lineColor}`:`#808080`,e.lineWidth=c.lineWidthEmu==null?Math.max(.5,s*.75):rt(c.lineWidthEmu,s),e.setLineDash([]),c.showHorizontalBorder){let r=i+n.headerHeight;for(let i=0;i<t.series.length;i++)e.beginPath(),e.moveTo(_,r),e.lineTo(_+v,r),e.stroke(),r+=n.rowHeight}if(c.showVerticalBorder){e.beginPath(),e.moveTo(r,i),e.lineTo(r,y),e.stroke();for(let t=1;t<l.length;t++){let n=r+t*u;e.beginPath(),e.moveTo(n,i),e.lineTo(n,y),e.stroke()}}if(c.showOutline){let t=e.lineWidth/2;e.strokeRect(_+t,i+t,Math.max(0,v-e.lineWidth),Math.max(0,n.totalHeight-e.lineWidth))}}e.restore()}function xr(e){return e&&(e===`line`||e===`stackedLine`||e===`stackedLinePct`||e===`radar`||e===`scatter`||e===`stock`)?`line`:`fill`}function Sr(e,t,n){if(e!==`scatter`)return!1;let r=t??`marker`;return(r===`line`||r===`lineMarker`||r===`lineNoMarker`||r===`smooth`||r===`smoothMarker`||r===`smoothNoMarker`)&&n.lineHidden!==!0}function Cr(e,t,n,r){let i=n[r];if(!i)return null;let a=i.seriesType??e,o=a===`stock`,s=a===`line`||a===`stackedLine`||a===`stackedLinePct`||o,c=a===`scatter`;if(!s&&!c||c&&(t===`lineNoMarker`||t===`smoothNoMarker`))return null;let l=i.markerSymbol??(o?`none`:`circle`);if(l===`none`||i.showMarker===!1)return null;let u=ar(r,i),d=i.markerFill??u.replace(/^#/,``),f=c?Sr(`scatter`,t,i):i.lineHidden!==!0;return{symbol:l,fill:d,line:i.markerLine??null,lineWidthEmu:i.markerLineWidthEmu??null,withLine:f}}function wr(e,t,n,r,i,a,o,s=null,c=void 0,l=null,u=null,d=null,f=null,p=null,m=1,h=0){if(t!==`none`){if(s&&!s.withLine){ia(e,r+a/2,i+o/2,s.symbol,o*.58,s.fill,s.line,1,s.lineWidthEmu==null?void 0:rt(s.lineWidthEmu,m));return}if(e.fillStyle=n,t===`line`){if(!(l!=null||u!=null||d!=null||f!=null||p!=null)){e.strokeStyle=n;let t=e.lineWidth;e.lineWidth=Math.max(1.5,o*.15),e.beginPath();let c=i+o/2;e.moveTo(r,c),e.lineTo(r+a,c),e.stroke(),e.lineWidth=t,s&&ia(e,r+a/2,i+o/2,s.symbol,o*.58,s.fill,s.line,1,s.lineWidthEmu==null?void 0:rt(s.lineWidthEmu,m));return}e.save(),e.strokeStyle=l?`#${l}`:n,e.lineWidth=u==null?Math.max(1.5,o*.15):rt(u,m),e.setLineDash(fa(d??void 0,e.lineWidth)),e.lineCap=f===`rnd`?`round`:f===`sq`?`square`:`butt`,e.lineJoin=p===`round`||p===`bevel`?p:`miter`,e.beginPath();let t=i+o/2;e.moveTo(r,t),e.lineTo(r+a,t),e.stroke(),s&&ia(e,r+a/2,i+o/2,s.symbol,o*.58,s.fill,s.line,1,s.lineWidthEmu==null?void 0:rt(s.lineWidthEmu,m)),e.restore()}else if(c!==null&&(c&&(e.fillStyle=c.fillType===`solid`?c.color.startsWith(`#`)?c.color:`#${c.color}`:Ln(c,e,r,i,a,o,h)??n),e.fillRect(r,i,a,o)),l){let t=rt(u,m);e.save(),e.strokeStyle=`#${l}`,e.lineWidth=t,e.setLineDash(fa(d??void 0,e.lineWidth)),e.lineCap=f===`rnd`?`round`:f===`sq`?`square`:`butt`,e.lineJoin=p===`round`||p===`bevel`?p:`miter`,e.strokeRect(r+t/2,i+t/2,Math.max(0,a-t),Math.max(0,o-t)),e.restore()}}}function Tr(e,t,n,r=!1,i=[],a=[],o=!0){if(r||dr(t)){let n=e[0],s=n?n.values.length:0,c=n?.categories??i,l=new Map(n?.dataPointOverrides?.map(e=>[e.idx,e])??[]);return Array.from({length:s},(i,s)=>{let u=l.get(s),d=(u?.lineHidden??n?.lineHidden)!==!0;return{label:(c[s]??`Item ${s+1}`).toString(),color:dr(t)&&n?sr(s,n,o):pr(t,e,s,r),marker:null,swatchStyle:xr(t),fillPaint:u?.fillHidden===!0?null:s<a.length?a[s]:void 0,outlineColor:d?u?.lineColor??n?.lineColor??null:null,outlineWidthEmu:d?u?.lineWidthEmu??n?.lineWidthEmu??null:null,outlineDash:d?u?.lineDash??n?.chartexStyle?.lineDash??null:null,outlineCap:d?n?.chartexStyle?.lineCap??null:null,outlineJoin:d?n?.chartexStyle?.lineJoin??null:null}})}return e.map((r,i)=>{let o=r.seriesType??t,s=r.lineHidden!==!0,c=s?r.lineColor??null:null,l=Cr(t,n,e,i),u=o===`stock`&&!s&&!l?`none`:xr(o);return{label:r.name||`Series ${i+1}`,color:u===`line`&&c?`#${c}`:pr(t,e,i),marker:l,swatchStyle:u,fillPaint:i<a.length?a[i]:r.fillPattern??void 0,outlineColor:c,outlineWidthEmu:s?r.lineWidthEmu??null:null,outlineDash:s?r.chartexStyle?.lineDash??null:null,outlineCap:s?r.chartexStyle?.lineCap??null:null,outlineJoin:s?r.chartexStyle?.lineJoin??null:null}})}const Er={fontFamily:`sans-serif`,color:`#333`,bold:!1,sizePx:null};function Dr(e,t){return e.sizePx??10*t}function Or(e,t,n){return e.map(e=>{if(e.swatchStyle===`fill`)return 7*n;let r=t*1.6;if(e.swatchStyle!==`line`||!e.outlineDash)return r;let i=e.outlineWidthEmu==null?Math.max(1.5,t*.15):rt(e.outlineWidthEmu,n),a=fa(e.outlineDash,i),o=a.length>0?a.reduce((e,t)=>e+t,0)+a[0]:0;return Math.max(r,o)})}function kr(e,t,n){return e.swatchStyle===`fill`?7*n:t}function Ar(e,t,n){if(!(n>0))return[];let r=ui(e,t,n);return r.length<=2?r:[r[0],Ot(e,r.slice(1).join(` `),n)]}function jr(e,t,n,r,i,a){if(!t.showLegend)return null;let o=Nr(t,a),s=Tr(ci(t),t.chartType,t.scatterStyle,fr(t),t.categories,[],t.varyColors!==!1),c=Dr(o,a),l=Or(s,c,a);e.save(),e.font=`${o.bold?`bold `:``}${c}px ${o.fontFamily}`;let u=s.map((t,n)=>l[n]+4+e.measureText(t.label).width);return e.restore(),t.legendPos,ve(t,n,r,i,{itemWidths:u,rowHeight:c+4,itemGap:12,horizontalPadding:8,verticalPadding:4})}function Mr(e,t,n,r,i,a,o=`vertical`,s,c=Er,l,u=!1,d=[],f=1,p=[],m=0,h=!0){let g=Tr(t,s,l,u,d,p,h),_=c.bold?`bold `:``,v=Dr(c,f);e.font=`${_}${v}px ${c.fontFamily}`,e.textBaseline=`middle`;let y=v+4,b=Or(g,v,f),x=g.map((t,n)=>b[n]+4+e.measureText(t.label).width);if(o===`horizontal`){let t=me(x,i,12).slice(0,Math.max(0,Math.floor((a-4)/y))),o=r+4/2;for(let r=0;r<t.length;r++){let a=t[r],s=a.map(e=>Math.min(i,x[e])),l=s.reduce((e,t)=>e+t,0)+12*Math.max(0,a.length-1),u=n+Math.max(0,(i-l)/2),d=o+r*y+y/2;for(let t=0;t<a.length;t++){let n=a[t],r=b[n],i=s[t];if(i<r){u+=i+12;continue}let o=Math.max(0,i-r-4+.01),l=Ot(e,g[n].label,o),p=kr(g[n],v,f);wr(e,g[n].swatchStyle,g[n].color,u,d-p/2,r,p,g[n].marker,g[n].fillPaint,g[n].outlineColor,g[n].outlineWidthEmu,g[n].outlineDash,g[n].outlineCap,g[n].outlineJoin,f,m),e.fillStyle=c.color,e.textAlign=`left`,e.fillText(l,u+r+4,d),u+=i+12}}return}let S=i-Math.max(...b,0)-4,C=!u&&!dr(s),w=g.map(t=>C?Ar(e,t.label,S):[Ot(e,t.label,S)]),T=w.map(e=>e.length*v+4),E=0,D=0;for(;E<g.length&&D+T[E]<=a;)D+=T[E],E++;let O=E===g.length?r+(a-D)/2:r;for(let t=0;t<E;t++){let r=b[t],a=T[t];if(i<r){O+=a;continue}let o=kr(g[t],v,f);wr(e,g[t].swatchStyle,g[t].color,n,O+(a-o)/2,r,o,g[t].marker,g[t].fillPaint,g[t].outlineColor,g[t].outlineWidthEmu,g[t].outlineDash,g[t].outlineCap,g[t].outlineJoin,f,m),e.fillStyle=c.color,e.textAlign=`left`,w[t].forEach((t,i)=>e.fillText(t,n+r+4,O+v*(i+.5))),O+=a}}function Nr(e,t){let n=cr(e,e.legendFontFace)??e.themeMinorFontLatin;return{fontFamily:n?`"${n}", Calibri, Arial, sans-serif`:`sans-serif`,color:e.legendFontColor?`#${e.legendFontColor}`:`#333`,bold:e.legendFontBold??!1,sizePx:he(e.legendFontSizeHpt,t)}}function Pr(e,t,n,r,i,a,o,s,c,l,u,d,f,p=[],m=0){if(!n)return;let h=Nr(t,f),g=ci(t),_=fr(t),v=Math.min(8/2,Math.max(0,n.reserveW)/2),y=Math.max(0,n.reserveW-v*2),b=n.side===`r`?{x:r+a-n.reserveW+v,y:c,w:y,h:u}:n.side===`l`?{x:r+v,y:c,w:y,h:u}:n.side===`t`?{x:r+4,y:i+d,w:Math.max(0,a-8),h:n.reserveH}:{x:r+4,y:i+o-n.reserveH,w:Math.max(0,a-8),h:n.reserveH},x=n.side===`t`||n.side===`b`?`horizontal`:`vertical`,S=t.legendManualLayout,C=S&&S.w>0&&S.h>0?Oe(S,{x:r,y:i,w:a,h:o},b):null;if(C){let n=C.w>=C.h?`horizontal`:`vertical`;cn(e,t,C,f),Mr(e,g,C.x,C.y,C.w,C.h,n,t.chartType,h,t.scatterStyle,_,t.categories,f,p,m,t.varyColors!==!1);return}cn(e,t,b,f),Mr(e,g,b.x,b.y,b.w,b.h,x,t.chartType,h,t.scatterStyle,_,t.categories,f,p,m,t.varyColors!==!1)}function Fr(e,t,n,r,i,a,o,s=!1,c=!1,l=`major`,u=1){if(c||t===`none`||!t)return;let d=Ir(l,o,u),f=t===`cross`?d/2:d,p=e.strokeStyle,m=e.lineWidth,h=e.getLineDash?.()??[];if(e.strokeStyle=a??`#888`,e.lineWidth=o??1,e.setLineDash([]),e.beginPath(),n===`val`){let n=r,a=i,o=s?1:-1,c=t===`out`||t===`cross`?o*f:0,l=t===`in`||t===`cross`?-o*f:0;e.moveTo(n+c,a),e.lineTo(n+l,a)}else{let n=r,a=i,o=s?-1:1,c=t===`out`||t===`cross`?o*f:0,l=t===`in`||t===`cross`?-o*f:0;e.moveTo(a,n+c),e.lineTo(a,n+l)}e.stroke(),e.strokeStyle=p,e.lineWidth=m,e.setLineDash(h)}function Ir(e,t,n){let r=(e===`minor`?4:6)*n;return t?Math.max(r,t+2*n):r}function Lr(e,t,n,r){if(e!==`out`&&e!==`cross`)return 0;let i=Ir(t,n,r);return e===`cross`?i/2:i}function Rr(e,t,n,r,i,a){a&&a.explicit?(e.strokeStyle=a.color,e.lineWidth=a.width):(e.strokeStyle=i?`#aaa`:a?.color??`#e0e0e0`,e.lineWidth=i?1:a?.width??.5);let o=a?.dash??[],s=o.length>0&&e.getLineDash?e.getLineDash():[];o.length>0&&e.setLineDash(o),e.beginPath(),e.moveTo(t,r),e.lineTo(t+n,r),e.stroke(),o.length>0&&e.setLineDash(s)}function zr(e,t){let{color:n,width:r}=at(e.valAxisGridlineColor,e.valAxisGridlineWidthEmu,t);return{color:n,width:r,explicit:e.valAxisGridlineColor!=null||e.valAxisGridlineWidthEmu!=null||e.valAxisGridlineDash!=null,dash:fa(e.valAxisGridlineDash??void 0,r)}}function Br(e,t){let{color:n,width:r}=at(e.valAxisMinorGridlineColor,e.valAxisMinorGridlineWidthEmu,t);return{color:n,width:r,explicit:e.valAxisMinorGridlineColor!=null,dash:fa(e.valAxisMinorGridlineDash??void 0,r)}}function Vr(e,t){let{color:n,width:r}=at(e.minorGridlineColor,e.minorGridlineWidthEmu,t);return{color:n,width:r,explicit:e.minorGridlineColor!=null||e.minorGridlineWidthEmu!=null||e.minorGridlineDash!=null,dash:fa(e.minorGridlineDash??void 0,r)}}function Hr(e,t){let{color:n,width:r}=at(e.majorGridlineColor,e.majorGridlineWidthEmu,t);return{color:n,width:r,explicit:e.majorGridlineColor!=null||e.majorGridlineWidthEmu!=null||e.majorGridlineDash!=null,dash:fa(e.majorGridlineDash??void 0,r)}}function Ur(e){return e.catAxisMajorGridlines===!0}function Wr(e,t){let n=at(e.catAxisGridlineColor,e.catAxisGridlineWidthEmu,t);return{...n,dash:fa(e.catAxisGridlineDash??void 0,n.width)}}function Gr(e,t){let n=at(e.catAxisMinorGridlineColor,e.catAxisMinorGridlineWidthEmu,t);return{...n,dash:fa(e.catAxisMinorGridlineDash??void 0,n.width)}}function Kr(e,t){if(t<=0)return[];let n=ot(e),r=[],i=n?t:t-1;for(let e=0;e<=i;e++)r.push(n?e/t:t===1?.5:e/(t-1));return r}function qr(e){return e.valAxisOrientation===`maxMin`}function Jr(e){return e.catAxisOrientation===`maxMin`}function Yr(e){return e.valAxisMajorGridlines!==!1}function Xr(e,t){return e==null||!t?e:e*100}function Zr(e,t,n){return yt((n?t/100:t)/Qr(e.valAxisDisplayUnits),n?e.valAxisFormatCode??`0%`:e.valAxisFormatCode,e.date1904)}function Qr(e){let t=e?.divisor;return t!=null&&Number.isFinite(t)&&t>0?t:1}function $r(e,t,n,r){return yt(e/Qr(r),t,n)}function ei(e){return e.builtInUnit?{hundreds:`Hundreds`,thousands:`Thousands`,tenThousands:`Ten Thousands`,hundredThousands:`Hundred Thousands`,millions:`Millions`,tenMillions:`Ten Millions`,hundredMillions:`Hundred Millions`,billions:`Billions`,trillions:`Trillions`}[e.builtInUnit]??e.builtInUnit:vt(e.divisor)}function ti(e,t,n,r){let i=[{units:t.valAxisDisplayUnits,vertical:!0,fallbackX:n.x+n.w*.08,fallbackY:n.y+n.h*.12},{units:t.catAxisDisplayUnits,vertical:!1,fallbackX:n.x+n.w*.82,fallbackY:n.y+n.h*.82},{units:t.secondaryValAxis?.displayUnits,vertical:!0,fallbackX:n.x+n.w*.92,fallbackY:n.y+n.h*.12},{units:t.secondaryCatAxis?.displayUnits,vertical:!1,fallbackX:n.x+n.w*.82,fallbackY:n.y+n.h*.08}];for(let{units:a,vertical:o,fallbackX:s,fallbackY:c}of i){let i=a?.label;if(!a||!i)continue;let l=i.text??ei(a),u=he(i.fontSizeHpt,r)??10*r;e.save(),e.font=ur(u,lr(t,i.fontFace,`minor`),i.fontBold??!1,i.fontItalic??!1);let d=i.rotation==null?o?-Math.PI/2:0:i.rotation/6e4*Math.PI/180,f=e.measureText(l).width,p=Math.abs(Math.cos(d))*f+Math.abs(Math.sin(d))*u,m=Math.abs(Math.sin(d))*f+Math.abs(Math.cos(d))*u,h={x:s-p/2,y:c-m/2,w:p,h:m},g=i.manualLayout?Oe({...i.manualLayout,w:void 0,h:void 0},n,h):h;if(!g){e.restore();continue}let _=g.x+g.w/2,v=g.y+g.h/2;i.boxStyle?.fill&&(e.fillStyle=`#${i.boxStyle.fill}`,e.fillRect(g.x,g.y,g.w,g.h)),i.boxStyle?.borderColor&&(e.strokeStyle=`#${i.boxStyle.borderColor}`,e.lineWidth=i.boxStyle.borderWidthEmu?Math.max(.5,i.boxStyle.borderWidthEmu/et*r):1,e.strokeRect(g.x,g.y,g.w,g.h)),e.translate(_,v),d!==0&&e.rotate(d),e.fillStyle=i.fontColor?`#${i.fontColor}`:`#595959`,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(l,0,0),e.restore()}}function ni(e,t,n,r,i=!1,a=`vertical`){let o=qr(e),s=e.valAxisLogBase,c=Xr(e.valMin,i)??(i?t:e.valMin),l=Xr(e.valMax,i)??(i?n:e.valMax),u=Xr(e.valAxisMajorUnit,i),d=i&&!(s!=null&&isFinite(s)&&s>=2)&&!(u!=null&&isFinite(u)&&u>0)?Re(t,n,a,r):u,f=e.valAxisMinorTickMark!=null&&e.valAxisMinorTickMark!==`none`,p=Xe({dataMin:t,dataMax:n,explicitMin:c,explicitMax:l,axisLenPt:r,axisOrientation:a,majorUnit:d,minorUnit:Xr(e.valAxisMinorUnit,i),needMinor:e.valAxisMinorGridlines===!0||f,logBase:s,reversed:o}),{min:m,max:h,majorUnit:g,majorTicks:_}=p;return{min:m,max:h,step:g,majorLines:_,minorLines:e.valAxisMinorGridlines?p.minorTicks:[],minorTicks:p.minorTicks,frac:p.fraction}}function ri(e,t){return t&&t.trim().toLowerCase()!==`general`?yt(e,t):vt(Number(e.toPrecision(6)))}function ii(e,t,n){if(e.labelText)return e.labelText.split(/\r?\n/);if(!t)return[];let r=e.labelFormatSourceLinked===!0?n:e.labelFormatCode,i=[];if(e.dispEq){let e=t.intercept<0?`−`:`+`;i.push(`y = ${ri(t.slope,r)}x ${e} ${ri(Math.abs(t.intercept),r)}`)}return e.dispRSqr&&i.push(`R² = ${ri(t.rSquared,r)}`),i}function ai(e,t,n,r,i,a){if(!i)return;let o=ii(t,n,a);if(o.length===0)return;let{chart:s,chartRect:c,plotRect:l}=i,u=he(t.labelFontSizeHpt,r)??he(s.dataLabelFontSizeHpt,r)??10*r;e.font=ur(u,lr(s,t.labelFontFace??s.dataLabelFontFace,`minor`),t.labelFontBold??s.dataLabelFontBold??!1,t.labelFontItalic??!1);let d=u*1.2,f=sn(c,l,Math.max(...o.map(t=>e.measureText(t).width)),o.length*d,u,t.labelManualLayout,i.automaticAnchor);if(!f)return;e.save(),f.automatic&&(e.beginPath(),e.rect(l.x,l.y,l.w,l.h),e.clip()),t.labelBox?.fill&&(e.fillStyle=`#${t.labelBox.fill}`,e.fillRect(f.x,f.y,f.w,f.h)),t.labelBox?.borderColor&&(e.strokeStyle=`#${t.labelBox.borderColor}`,e.lineWidth=t.labelBox.borderWidthEmu?Math.max(.5,t.labelBox.borderWidthEmu/et*r):1,e.strokeRect(f.x,f.y,f.w,f.h));let p=t.labelTextAlign;e.textAlign=p===`r`?`right`:p===`ctr`?`center`:`left`,e.textBaseline=`top`;let m=t.labelFontColor??s.dataLabelFontColor;e.fillStyle=m?`#${m}`:`#595959`;let h=e.textAlign===`right`?f.x+f.w:e.textAlign===`center`?f.x+f.w/2:f.x,g=f.automatic?o.length:Math.min(o.length,Math.floor(f.h/d));for(let t=0;t<g;t++)e.fillText(Ot(e,o[t],f.w),h,f.y+t*d);e.restore()}function oi(e,t,n,r,i,a,o,s,c){let l=t.trendLines;if(!l||l.length===0)return;let u=[],d=[];for(let e=0;e<t.values.length;e++){let n=t.values[e],r=o?o[e]:e;n!=null&&r!=null&&Number.isFinite(n)&&Number.isFinite(r)&&(u.push(r),d.push(n))}if(u.length<2)return;let f=e.getLineDash?e.getLineDash():[];for(let o of l){let l=Qe(u,d,o.trendlineType,{period:o.period,order:o.order,intercept:o.intercept,forward:o.forward,backward:o.backward});if(l.xs.length<2||![...l.xs,...l.ys].every(Number.isFinite))continue;let f=o.trendlineType===`linear`?Ze(u,d,o.intercept):null,p=f&&[f.slope,f.intercept,f.rSquared].every(Number.isFinite)?f:null,m=l.xs,h=l.ys;if(o.trendlineType===`linear`){let e=(l.ys[1]-l.ys[0])/(l.xs[1]-l.xs[0]||1),t=o.backward??0,n=o.forward??0;m=[l.xs[0]-t,l.xs[1]+n],h=[l.ys[0]-e*t,l.ys[1]+e*n]}if(![...m,...h].every(Number.isFinite))continue;let g=m.map((e,t)=>c?c(e,h[t]):{x:r(e),y:i(h[t])});if(g.every(e=>Number.isFinite(e.x)&&Number.isFinite(e.y))){if(!o.lineHidden){s?.clipLineToPlot&&(e.save(),e.beginPath(),e.rect(s.plotRect.x,s.plotRect.y,s.plotRect.w,s.plotRect.h),e.clip()),e.strokeStyle=o.lineColor?`#${o.lineColor}`:n,e.lineWidth=o.lineWidthEmu?rt(o.lineWidthEmu,a):1.5,e.setLineDash(fa(o.lineDash??void 0,e.lineWidth)),e.beginPath();for(let t=0;t<g.length;t++){let{x:n,y:r}=g[t];t===0?e.moveTo(n,r):e.lineTo(n,r)}e.stroke(),s?.clipLineToPlot&&e.restore()}ai(e,o,p,a,s?{...s,automaticAnchor:g.at(-1)}:void 0,t.valFormatCode)}}e.setLineDash(f)}function si(e){let t=e=>{switch(e){case`exp`:return`Exponential`;case`log`:return`Logarithmic`;case`poly`:return`Polynomial`;case`power`:return`Power`;case`movingAvg`:return`Moving Average`;default:return`Linear`}},n=[];for(let r of e)for(let e of r.trendLines??[]){if(e.lineHidden===!0)continue;let i=r.lineColor??r.color;n.push({name:e.name??`${t(e.trendlineType)} (${r.name||`Series`})`,color:e.lineColor??i,lineColor:e.lineColor??i,lineWidthEmu:e.lineWidthEmu,lineHidden:!1,chartexStyle:{lineDash:e.lineDash},values:[],seriesType:`line`,showMarker:!1})}return n}function ci(e){return dr(e.chartType)||fr(e)?e.series:e.series.flatMap(e=>[e,...si([e])])}function li(e,t,n){return he(e,n)??Math.max(8,t*.045)}function ui(e,t,n,r=0){let i=t.trim().split(/\s+/).filter(Boolean);if(i.length===0)return[``];let a=[],o=``,s=t=>{let i=o?`${o} ${t}`:t;if(e.measureText(i).width<=n){o=i;return}if(o&&=(a.push(o),``),e.measureText(t).width<=n+r){o=t;return}let s=Array.from(t),c=0;for(;c<s.length;){let t=c+1,r=s.length,i=c+1;for(;t<=r;){let a=Math.floor((t+r)/2);e.measureText(s.slice(c,a).join(``)).width<=n?(i=a,t=a+1):r=a-1}let l=s.slice(c,i).join(``);c=i,c<s.length?a.push(l):o=l}};for(let e of i)s(e);return o&&a.push(o),a.length?a:[``]}function di(e,t){return/^[+-]?(?:\d+(?:[.,]\d*)?|[.,]\d+)%?$/.test(e)?t*.15:0}function fi(e){return e.catAxisTickLabelPos!==`none`}function pi(e){let t=e.catAxisLabelRotation;return t==null||t===0||Math.abs(t)>54e5?0:t/6e4*(Math.PI/180)}function mi(e,t,n,r,i){if(i===0){e.fillText(t,n,r);return}e.save(),e.translate(n,r),e.rotate(i),e.textAlign=`right`,e.textBaseline=`middle`,e.fillText(t,0,0),e.restore()}function hi(e,t,n=Jr(e)){return e.catAxisIsDate===!0?Zt({categories:t,date1904:e.date1904,baseTimeUnit:e.catAxisBaseTimeUnit,majorTimeUnit:e.catAxisMajorTimeUnit,majorUnit:e.catAxisMajorUnit,minorTimeUnit:e.catAxisMinorTimeUnit,minorUnit:e.catAxisMinorUnit,explicitMin:e.catAxisMin,explicitMax:e.catAxisMax,crossBetween:ot(e),reversed:n}):null}function gi(e,t,n,r){for(let i of e.errBars??[]){if(i.dir!==t)continue;let a=i.barType===`plus`||i.barType===`both`,o=i.barType===`minus`||i.barType===`both`,s=Math.max(e.values.length,i.plus.length,i.minus.length);for(let e=0;e<s;e++){let t=n(e);if(t==null||!Number.isFinite(t))continue;let s=i.plus[e],c=i.minus[e];a&&s!=null&&Number.isFinite(s)&&r(t+s),o&&c!=null&&Number.isFinite(c)&&r(t-c)}}}function _i(e,t,n,r=`y`,i=!1,a=!1){if(!e)return null;let o=1/0,s=-1/0,c=e=>{Number.isFinite(e)&&(o=Math.min(o,e),s=Math.max(s,e))};a&&c(0);for(let e of t)if(e.useSecondaryAxis===!0){for(let t of e.values)t!=null&&c(t);gi(e,r,t=>e.values[t]??null,c)}(!Number.isFinite(o)||!Number.isFinite(s))&&(o=0,s=1);let l=Xe({dataMin:o,dataMax:s,explicitMin:Xr(e.min,i),explicitMax:Xr(e.max,i),axisLenPt:n,axisOrientation:`vertical`,majorUnit:Xr(e.majorUnit,i),minorUnit:Xr(e.minorUnit,i),needMinor:e.minorGridlines===!0||e.minorTickMark!=null&&e.minorTickMark!==`none`,logBase:e.logBase,reversed:e.orientation===`maxMin`}),{min:u,max:d,majorUnit:f}=l;return{min:u,max:d,step:f,majorLines:l.majorTicks,minorTicks:l.minorTicks,makeToY:(e,t)=>n=>e+t-l.fraction(n)*t}}function vi(e,t,n,r,i,a,o){if(!t.hidden){if(e.save(),t.minorGridlines){let s=Vr(t,o);for(let t of n.minorTicks)Rr(e,i,a,r(t),!1,s)}if(t.majorGridlines){let s=Hr(t,o);for(let t of n.majorLines)Rr(e,i,a,r(t),!1,s)}e.restore()}}function yi(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h=!1){let g=o+c,{color:_,width:v}=it(n.lineColor,n.lineWidthEmu,u);if(!n.lineHidden){let t=e.getLineDash?.()??[];e.strokeStyle=_,e.lineWidth=v,e.setLineDash([]),e.beginPath(),e.moveTo(g,s),e.lineTo(g,s+l),e.stroke(),e.setLineDash(t)}if(!n.hidden){e.font=`${n.fontItalic?`italic `:``}${n.fontBold?`bold `:``}${d}px ${lr(t,n.fontFace,`minor`)}`,e.fillStyle=n.fontColor?`#${n.fontColor}`:p,e.textAlign=`left`,e.textBaseline=`middle`;for(let t of r.majorLines){let r=i(t);Fr(e,n.majorTickMark,`val`,g,r,_,v,!0,n.lineHidden,`major`,u),n.tickLabelPos!==`none`&&e.fillText($r(h?t/100:t,n.formatCode??null,m,n.displayUnits),g+14,r)}if(n.minorTickMark&&n.minorTickMark!==`none`)for(let t of r.minorTicks)Fr(e,n.minorTickMark,`val`,g,i(t),_,v,!0,n.lineHidden,`minor`,u)}n.title&&bi(e,t,n,a,o,s,c,l,f,u)}function bi(e,t,n,r,i,a,o,s,c,l){if(!n.title)return;let u=be(n.titleFontSizeHpt,l),d=n.titleFontColor?`#${n.titleFontColor}`:n.fontColor?`#${n.fontColor}`:`#555`;mr(e,n.title,i+o+c+u*.6,a+s/2,`right`,u,n.titleFontBold??!0,n.titleFontItalic??!1,d,s,lr(t,n.titleFontFace,`major`),n.titleRotation,n.titleVerticalMode,n.titleManualLayout,r)}function xi(e,t,n,r,i,a,o,s,c){if(n.hidden||r.length===0)return;let{color:l,width:u}=it(n.lineColor,n.lineWidthEmu,c);if(!n.lineHidden){let t=e.getLineDash?.()??[];e.strokeStyle=l,e.lineWidth=u,e.setLineDash([]),e.beginPath(),e.moveTo(a,o),e.lineTo(a+s,o),e.stroke(),e.setLineDash(t)}let d=n.orientation===`maxMin`,f=Math.max(1,Math.floor(n.tickLabelSkip??1)),p=Math.max(1,Math.floor(n.tickMarkSkip??1)),m=r.length,h=e=>a+((d?m-1-e:e)+.5)/m*s;if(!n.lineHidden&&n.majorTickMark!==`none`){let r=ot(t),i=r?m:m-1;for(let t=0;t<=i;t+=p){let f=d?i-t:t,p=r?f/m:m===1?.5:f/(m-1);Fr(e,n.majorTickMark,`cat`,o,a+p*s,l,u,!0,n.lineHidden,`major`,c)}}let g=he(n.fontSizeHpt,c)??9*c;if(n.tickLabelPos!==`none`){e.font=ur(g,lr(t,n.fontFace,`minor`),n.fontBold??!1,n.fontItalic??!1),e.fillStyle=n.fontColor?`#${n.fontColor}`:`#555`,e.textAlign=`center`,e.textBaseline=`bottom`;let i=Math.max(1,s/m-4);for(let a=0;a<m;a+=f)e.fillText(Ot(e,bt(r[a],n.formatCode,t.date1904),i),h(a),o-Te(g))}if(n.title){let r=be(n.titleFontSizeHpt,c);mr(e,n.title,a+s/2,o-(n.tickLabelPos===`none`?0:g+Te(g))-r/2-4,`horizontal`,r,n.titleFontBold??!0,n.titleFontItalic??!1,n.titleFontColor?`#${n.titleFontColor}`:`#555`,s,lr(t,n.titleFontFace,`major`),n.titleRotation,n.titleVerticalMode,n.titleManualLayout,i)}}function Si(e,t,n){let r=n/(e.titleFontSizeHpt!=null&&e.titleFontSizeHpt>=100&&e.titleFontSizeHpt<=4e5?e.titleFontSizeHpt/100:14),i=he(t.fontSizeHpt,r)??n,a=cr(e,t.fontFace??e.titleFontFace);return{font:ur(i,a?`"${a}", Calibri, Arial, sans-serif`:`Calibri, Arial, sans-serif`,t.bold??(e.titleRichRuns?.length?!1:e.titleFontBold??!0),t.italic??!1),fontSize:i,color:t.color?`#${t.color}`:e.titleFontColor?`#${e.titleFontColor}`:`#333`}}function Ci(e,t,n,r){let i=t.titleRichRuns?.length?t.titleRichRuns:t.title?[{text:t.title}]:[],a=[{pieces:[],width:0,height:r}],o=()=>{let e={pieces:[],width:0,height:r};return a.push(e),e},s=a[0];for(let a of i){let i=Si(t,a,r);for(let t of a.text.split(/(\n|[\t ]+)/).filter(e=>e.length>0)){if(t===`
|
|
5
|
-
`){s=o();continue}e.font=i.font;let r=e.measureText(t).width,a=/^[\t ]+$/.test(t);!a&&s.pieces.length>0&&s.width+r>n&&(s=o()),!(a&&s.pieces.length===0)&&(s.pieces.push({text:t,width:r,font:i.font,color:i.color}),s.width+=r,s.height=Math.max(s.height,i.fontSize))}}return a}function wi(e,t,n,r,i){let a=Ce(t,r,i);if(a.bandH===0||!t.titleRichRuns?.length)return a;let o=e.font,s=Ci(e,t,Math.max(1,n),a.fontPx);e.font=o;let c=s.reduce((e,t)=>e+t.height,0);return{...a,bandH:a.topPad+c+a.bottomPad}}function Ti(e,t,n,r,i,a){if(!t.title)return;if(!t.titleRichRuns?.length){let o=cr(t,t.titleFontFace),s=o?`"${o}", Calibri, Arial, sans-serif`:`Calibri, Arial, sans-serif`;e.font=`${t.titleFontBold??!0?`bold `:``}${a}px ${s}`,e.fillStyle=t.titleFontColor?`#${t.titleFontColor}`:`#333`,e.textAlign=`center`,e.textBaseline=`top`,e.fillText(t.title,n+i/2,r);return}e.save();let o=Ci(e,t,Math.max(1,i),a);e.textAlign=`left`,e.textBaseline=`top`;let s=r;for(let t of o){let r=n+(i-t.width)/2;for(let n of t.pieces)e.font=n.font,e.fillStyle=n.color,e.fillText(n.text,r,s),r+=n.width;s+=t.height}e.restore()}function Ei(e,t,n,r,i,a,o,s){if(!t.title)return;let c=t.titleManualLayout;if(c){let l=cr(t,t.titleFontFace),u=l?`"${l}", Calibri, Arial, sans-serif`:`Calibri, Arial, sans-serif`;e.font=`${t.titleFontBold??!0?`bold `:``}${s}px ${u}`;let d=Ci(e,t,Math.max(1,i),s),f=Math.min(i,Math.max(...d.map(e=>e.width),0)),p={x:n+(i-f)/2,y:o,w:f,h:s},m=Oe({...c,w:void 0,h:void 0},{x:n,y:r,w:i,h:a},p);if(m){Ti(e,t,m.x,m.y,m.w,s);return}}Ti(e,t,n,o,i,s)}function Di(e){if(e.categories.length>0)return e.categories;let t=e.series[0];if(t?.categories&&t.categories.length>0)return t.categories;let n=0;for(let t of e.series)t.values.length>n&&(n=t.values.length);return n>0?Array.from({length:n},(e,t)=>String(t+1)):[]}function Oi(e,t){let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y),i=Math.min(e.x+e.w,t.x+t.w),a=Math.min(e.y+e.h,t.y+t.h);return i>n&&a>r?{x:n,y:r,w:i-n,h:a-r}:null}function ki(e,t,n,r,i,a,o,s,c,l,u,d,f,p=!1,m){la(e,t,{kind:`bar`,rect:o===`vertical`?{x:n,y:r,w:a,h:i}:{x:n,y:r,w:i,h:a},orientation:o,negative:p,position:s??`outEnd`},u,l,c?`#${c}`:`#333`,f,d,m)}function Ai(e){return 7*e}function ji(e,t,n,r,i={}){let{x:a,y:o,w:s,h:c}=n,l=t.chartType===`clusteredBarH`||t.chartType===`stackedBarH`||t.chartType===`stackedBarHPct`,u=t.chartType.startsWith(`stacked`),d=t.chartType===`stackedBarPct`||t.chartType===`stackedBarHPct`,f=t.series.filter(e=>e.seriesType!==`line`&&e.seriesType!==`scatter`&&e.seriesType!==`area`),p=e=>e.barGroupDirection==null?l:e.barGroupDirection===`bar`,m=f.filter(e=>p(e)===l),h=e=>e.useSecondaryAxis===!0?`secondary-default`:`primary-default`,g=e=>e.barGroupIndex==null?h(e):`group-${e.barGroupIndex}`,_=e=>e.barGroupGrouping??(d?`percentStacked`:u?`stacked`:`clustered`),v=e=>{let t=_(e);return t===`stacked`||t===`percentStacked`},y=e=>_(e)===`percentStacked`,b=t.series.filter(e=>e.seriesType===`line`),x=t.series.filter(e=>e.seriesType===`area`),S=t.series.filter(e=>e.seriesType===`scatter`),C=new Map(t.series.map((e,t)=>[e,t])),w=t.series.some(e=>e.useSecondaryAxis===!0),T=!l&&t.secondaryValAxis&&w?t.secondaryValAxis:null,E=T?m.filter(e=>e.useSecondaryAxis===!0):[],D=T?m.filter(e=>e.useSecondaryAxis!==!0):m,O=E.length>0?t.secondaryCatAxis:null,k=E[0]?.categories?.length?E[0].categories:t.categories,A=Di(t),j=A.length;if(j===0)return;let M=new Map;for(let e of m){let t=g(e),n=M.get(t);n?n.push(e):M.set(t,[e])}let N=e=>M.get(g(e))??[e],P=(e,t)=>N(e).reduce((e,n)=>e+Math.abs(n.values[t]??0),0)||1,F=(e,t)=>y(e)?100/P(e,t):1,I=e=>y(e)?(e.errBars??[]).map(t=>({...t,plus:t.plus.map((t,n)=>t==null?t:t*F(e,n)),minus:t.minus.map((t,n)=>t==null?t:t*F(e,n))})):e.errBars??[],L=fr(t),R=m.map(e=>new Map((e.dataPointOverrides??[]).map(e=>[e.idx,e]))),z=m.map(e=>new Map((e.dataLabelOverrides??[]).map(e=>[e.idx,e]))),ee=m.map((e,t)=>_a(e,t)),B=t.chartexDataPointStyle!=null||t.chartexColorPalette!=null,V=new Map;B&&m.forEach((e,n)=>{let r=ee[n],i=e.color??Sa(t,r,m.length,e.chartexStyle);V.set(e,Aa(t,e.name,e,t.chartexDataPointStyle,r,m.length,i))});let H={...t,series:(B?m:t.series).map(e=>V.get(e)??e)},U=wi(e,t,s,c,r),te=U.fontPx,W=U.topPad,ne=U.bandH,G=li(t.catAxisFontSizeHpt,c,r),K=li(t.valAxisFontSizeHpt,c,r),q=!l&&t.catAxisNoMultiLevelLabels!==!0&&(t.categoryLevels?.length??0)>1?t.categoryLevels:null,J=q?(q.length-1)*(G+4):0,Y=l?0:_r(t,r),re=l?0:vr(e,t,r),ie=jr(e,H,s,c,.22,r),{legRightW:ae,legLeftW:oe,legTopH:se,legBottomH:ce}=ye(ie),le=Se(t,s,c,r),ue=le.catFontPx,de=le.valFontPx,fe=l?t.valAxisTitle?de+X(c)+4:0:le.catBandH,pe=l?t.catAxisTitle?ue+X(s)+4:0:le.valBandW,me=he(O?.fontSizeHpt,r)??9*r,ge=O&&!O.hidden&&O.tickLabelPos!==`none`?me+Te(me)+2:0,_e=O?.title?be(O.titleFontSizeHpt,r)+6:0,ve=ne+se+K/2+2+ge+_e,xe=l?(t.valAxisHidden?c*.02:we(K))+fe+ce:we(G)+J+Y+fe+ce,Ce=c-ve-xe,Oe=0;if(l&&!t.catAxisHidden&&fi(t)){let n=t.catAxisFontSizeHpt==null?Math.max(8,Math.min(11,Ce/j*.5)):G;e.save(),e.font=`${n}px ${lr(t,t.catAxisFontFace,`minor`)}`;for(let n of A)Oe=Math.max(Oe,e.measureText(bt(n,t.catAxisFormatCode,t.date1904)).width);e.restore(),Oe+=(t.catAxisFontSizeHpt==null?4:Ee(n))+Pe*r}let Ae=Math.min(Oe,Math.max(0,s/2-pe-oe)),je=l?s-((t.catAxisHidden?s*.03:Ae)+pe+oe)-(ae+s*.03):0,Me=t.valAxisHidden?void 0:(l?je:Ce)/r,Ne=(e,t)=>{let n=m[e],r=n?.values[t]??0;if(!n||!v(n))return r;let i=N(n),a=y(n),o=1;a&&(o=i.reduce((e,n)=>e+Math.abs(n.values[t]??0),0)||1);let s=a?r/o*100:r,c=0,l=i.indexOf(n);for(let e=0;e<=l;e++){let n=i[e]?.values[t]??0,r=a?n/o*100:n;s<0==r<0&&(c+=r)}return c},Fe=D.some(y),Le=0,Re=0;for(let e=0;e<j;e++){let t=new Map;for(let e of D){let n=g(e),r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of t.values()){let t=n[0],r=v(t),i=y(t),a=i&&n.reduce((t,n)=>t+Math.abs(n.values[e]??0),0)||1,o=0,s=0;for(let t of n){let n=t.values[e]??0,c=i?n/a*100:n;r?c>=0?o+=c:s+=c:(Le=Math.max(Le,c),Re=Math.min(Re,c))}r&&(Le=Math.max(Le,o),Re=Math.min(Re,s))}}for(let e of[...b,...x])if(!(T&&e.useSecondaryAxis===!0))for(let t=0;t<j;t++){let n=e.values[t];if(n==null)continue;let r=Fe?n*100:n;Le=Math.max(Le,r),Re=Math.min(Re,r)}for(let e of D){let t=m.indexOf(e);for(let n of I(e))gi({...e,errBars:[n]},l?`x`:`y`,n=>e.values[n]==null?null:Ne(t,n),e=>{Le=Math.max(Le,e),Re=Math.min(Re,e)})}for(let e of[...b,...x])T&&e.useSecondaryAxis===!0||gi(e,`y`,t=>e.values[t]??null,e=>{let t=Fe?e*100:e;Le=Math.max(Le,t),Re=Math.min(Re,t)});Fe&&(D.some(e=>e.values.some(e=>e!=null&&e>0))&&(Le=Math.max(Le,100)),D.some(e=>e.values.some(e=>e!=null&&e<0))&&(Re=Math.min(Re,-100))),t.valMax!=null&&(Le=Fe?t.valMax*100:t.valMax),t.valMin!=null&&(Re=Fe?t.valMin*100:t.valMin),Le===0&&Re===0&&(Le=1);let ze=ni(t,Re,Le,Me,Fe,l?`horizontal`:`vertical`),{step:Be}=ze,Ve=new Set(m),He=new Set(f),Ue=E.some(y),We=t.series.filter(e=>!He.has(e)||Ve.has(e)).map(e=>{if(e.useSecondaryAxis!==!0)return e;if(Ve.has(e)){let t=m.indexOf(e);return{...e,values:e.values.map((e,n)=>e==null?e:Ne(t,n)),errBars:I(e)}}return Ue?{...e,values:e.values.map(e=>e==null?e:e*100),errBars:(e.errBars??[]).map(e=>({...e,plus:e.plus.map(e=>e==null?e:e*100),minus:e.minus.map(e=>e==null?e:e*100)}))}:e});if(Ue&&E[0]){let e=[];E.some(e=>e.values.some(e=>e!=null&&e>0))&&e.push(100),E.some(e=>e.values.some(e=>e!=null&&e<0))&&e.push(-100),We.push({...E[0],values:e,errBars:[]})}let Ge=_i(T,We,Ce/r,l?`x`:`y`,Ue,E.length>0),Ke=Math.max(8,Math.min(11,c/20)),qe=t.valAxisFontSizeHpt==null?Math.max(8,Math.min(11,Ce/20)):K,Je=e.font,Ye=0,Ze=0;if(!l&&!t.valAxisHidden){e.font=`${qe}px ${lr(t,t.valAxisFontFace,`minor`)}`;let n=0;for(let r of ze.majorLines){let i=Zr(t,r,Fe);n=Math.max(n,e.measureText(i).width)}Ye=n,Ze=Ye+16}let Qe=he(T?.fontSizeHpt,r)??Ke,$e=0;if(T&&!T.hidden){e.font=`${Qe}px ${lr(t,T.fontFace,`minor`)}`;let n=0;for(let r of Ge?.majorLines??[])n=Math.max(n,e.measureText($r(Ue?r/100:r,T.formatCode??null,t.date1904,T.displayUnits)).width);$e=n+18}e.font=Je;let et=T&&T.title?be(T.titleFontSizeHpt,r)+8:0,tt={t:ve,r:ae+s*.03+$e+et,b:xe,l:l?(t.catAxisHidden?s*.03:Ae)+pe+oe:oe+Math.max(pe+Ze,re)},nt=l?{t:0,r:t.valAxisHidden?0:qe/2,b:t.valAxisHidden?0:qe+fe,l:t.catAxisHidden?0:Oe+pe}:De({valAxisHidden:t.valAxisHidden,catAxisHidden:t.catAxisHidden,valLabelWidth:Ye,valLabelFontPx:qe,catLabelFontPx:G,valLabelGapPx:t.valAxisFontSizeHpt==null?12:Ee(qe),catLabelGapPx:t.catAxisFontSizeHpt==null?3:Te(G),outerTextMarginPx:Pe*r,valTitleBandW:pe,catTitleBandH:fe,secondaryBandW:$e+et}),at=ke(t,a,o,s,c,r,{titleBand:U,legendSideReserveFrac:.22,legendReserve:ie,pad:tt,honorPlotAreaManualLayout:!0,manualOuterInsets:nt}),st=wi(e,t,at.plotRect.pw,c,r);Math.abs(st.bandH-U.bandH)>.01&&(U=st,te=U.fontPx,W=U.topPad,ne=U.bandH,ve=ne+se+K/2+2+ge+_e,tt.t=ve,at=ke(t,a,o,s,c,r,{titleBand:U,legendSideReserveFrac:.22,legendReserve:ie,pad:tt,honorPlotAreaManualLayout:!0,manualOuterInsets:nt}));let{px0:ct,py0:lt,pw:ut}=at.plotRect,{ph:dt}=at.plotRect;if(Ei(e,t,t.titleManualLayout||!t.titleRichRuns?.length?a:ct,o,t.titleManualLayout||!t.titleRichRuns?.length?s:ut,c,o+W,te),ut<=0||dt<=0)return;let ft=hi(t,A,l?!Jr(t):Jr(t)),pt=pi(t),mt=[],ht=0;if(!l&&!ft&&!t.catAxisHidden&&fi(t)&&pt===0){let n=ut/j,r=t.catAxisFontSizeHpt==null?Math.max(8,Math.min(11,n*.5)):G;e.save(),e.font=ur(r,lr(t,t.catAxisFontFace,`minor`),t.catAxisFontBold??!1,t.catAxisFontItalic??!1);for(let i of A){let a=bt(i,t.catAxisFormatCode,t.date1904);mt.push(ui(e,a,Math.max(1,n),di(a,r)))}e.restore();let i=Math.max(1,...mt.map(e=>e.length));!(t.plotAreaManualLayout?.layoutTarget===`inner`&&t.plotAreaManualLayout.w!=null&&t.plotAreaManualLayout.h!=null)&&i>1&&(ht=(i-1)*(r+2),dt=Math.max(1,dt-ht))}let gt=!l&&t.dataTable?yr(e,t,ut/j,r):null;gt&>.totalHeight>Y&&(dt=Math.max(1,dt-(gt.totalHeight-Y))),t.plotAreaBg&&(e.fillStyle=`#${t.plotAreaBg}`,e.fillRect(ct,lt,ut,dt));let _t=e=>lt+dt-ze.frac(e)*dt,vt=e=>ct+ze.frac(e)*ut,yt=_t(0),xt=vt(0),St=e=>_t(Fe?e*100:e),Ct=Ge?Ge.makeToY(lt,dt):_t,wt=e=>Ct(Ue?e*100:e),Tt=zr(t,r);e.textBaseline=`middle`;let Et=t.valAxisFontSizeHpt==null?Math.max(8,Math.min(11,dt/20)):K;e.font=`${Et}px ${lr(t,t.valAxisFontFace,`minor`)}`;let Dt=t.valAxisFontColor?`#${t.valAxisFontColor}`:`#555`;if(e.fillStyle=Dt,!t.valAxisHidden){let n=Br(t,r);for(let t of ze.minorLines)if(!l)Rr(e,ct,ut,_t(t),!1,n);else{let r=vt(t);e.strokeStyle=n.color,e.lineWidth=n.width;let i=n.dash.length>0&&e.getLineDash?e.getLineDash():[];n.dash.length>0&&e.setLineDash(n.dash),e.beginPath(),e.moveTo(r,lt),e.lineTo(r,lt+dt),e.stroke(),n.dash.length>0&&e.setLineDash(i)}let a=Yr(t),o=t.valAxisTickLabelPos!==`none`;for(let n of ze.majorLines){let s=Math.abs(n)<Be*1e-9,c=Zr(t,n,Fe);if(l){let r=vt(n);if(a){e.strokeStyle=Tt.explicit?Tt.color:s?`#aaa`:Tt.color,e.lineWidth=Tt.explicit?Tt.width:s?1:Tt.width;let t=Tt.dash.length>0&&e.getLineDash?e.getLineDash():[];Tt.dash.length>0&&e.setLineDash(Tt.dash),e.beginPath(),e.moveTo(r,lt),e.lineTo(r,lt+dt),e.stroke(),Tt.dash.length>0&&e.setLineDash(t)}if(o){e.textAlign=`center`;let n=t.valAxisFontSizeHpt==null?10:Te(Et);e.fillText(c,r,lt+dt+n)}}else{let l=_t(n);if(a&&Rr(e,ct,ut,l,s,Tt),o){e.textAlign=`right`;let n=i.gapPolicy===`chartex`?Ai(r):t.valAxisFontSizeHpt==null?12:Ee(Et);e.fillText(c,ct-n,l)}}}}if(T&&Ge&&vi(e,T,Ge,Ct,ct,ut,r),!t.catAxisHidden&&Ur(t)){let n=Wr(t,r);e.strokeStyle=n.color,e.lineWidth=n.width;let i=n.dash.length>0&&e.getLineDash?e.getLineDash():[];n.dash.length>0&&e.setLineDash(n.dash);let a=ft?ft.majorTicks.map(e=>e.fraction):Kr(t,j);for(let t of a){if(e.beginPath(),l){let n=lt+t*dt;e.moveTo(ct,n),e.lineTo(ct+ut,n)}else{let n=ct+t*ut;e.moveTo(n,lt),e.lineTo(n,lt+dt)}e.stroke()}n.dash.length>0&&e.setLineDash(i)}let{color:kt,width:At}=it(t.catAxisLineColor,t.catAxisLineWidthEmu,r),{color:jt,width:Nt}=it(t.valAxisLineColor,t.valAxisLineWidthEmu,r),Pt=(t,n,r,i,a,o)=>{let s=e.getLineDash?.()??[];e.strokeStyle=a,e.lineWidth=o,e.setLineDash([]),e.beginPath(),e.moveTo(t,n),e.lineTo(r,i),e.stroke(),e.setLineDash(s)},Ft=!t.catAxisHidden&&!t.catAxisLineHidden,It=!t.valAxisHidden&&!t.valAxisLineHidden&&t.valAxisLineColor!=null,Lt=t.catAxisCrossesAt!=null&&Number.isFinite(t.catAxisCrossesAt)?ua(t.catAxisCrossesAt,ze.min,ze.max):t.catAxisCrosses===`max`?ze.max:t.catAxisCrosses===`min`?ze.min:ua(0,ze.min,ze.max),Rt=l?lt+dt:_t(Lt),zt=l?vt(Lt):ct,Bt=!l&&(t.catAxisTickLabelPos??`nextTo`)===`nextTo`?Rt:lt+dt,Vt=Math.max(1,Math.floor(t.catAxisTickMarkSkip??1)),Ht=!l&&q!=null&&ft==null&&!t.catAxisLineHidden&&ot(t)&&Math.abs(Bt-Rt)<.01,Ut=()=>{if(l?(Ft&&Pt(zt,lt,zt,lt+dt,kt,At),It&&Pt(ct,lt+dt,ct+ut,lt+dt,jt,Nt)):(Ft&&Pt(ct,Rt,ct+ut,Rt,kt,At),It&&Pt(ct,lt,ct,lt+dt,jt,Nt)),!t.valAxisHidden&&t.valAxisMajorTickMark&&t.valAxisMajorTickMark!==`none`)for(let n of ze.majorLines)l?Fr(e,t.valAxisMajorTickMark,`cat`,lt+dt,vt(n),jt,Nt,!1,t.valAxisLineHidden,`major`,r):Fr(e,t.valAxisMajorTickMark,`val`,ct,_t(n),jt,Nt,!1,t.valAxisLineHidden,`major`,r);if(!t.valAxisHidden&&t.valAxisMinorTickMark&&t.valAxisMinorTickMark!==`none`)for(let n of ze.minorTicks)l?Fr(e,t.valAxisMinorTickMark,`cat`,lt+dt,vt(n),jt,Nt,!1,t.valAxisLineHidden,`minor`,r):Fr(e,t.valAxisMinorTickMark,`val`,ct,_t(n),jt,Nt,!1,t.valAxisLineHidden,`minor`,r);if(!t.catAxisHidden&&t.catAxisMajorTickMark&&t.catAxisMajorTickMark!==`none`){let n=Ht?[]:Kr(t,j),i=ft?ft.majorTicks.map(e=>e.fraction):n.filter((e,t)=>t%Vt===0);for(let n of i)l?Fr(e,t.catAxisMajorTickMark,`val`,zt,lt+n*dt,kt,At,!1,t.catAxisLineHidden,`major`,r):Fr(e,t.catAxisMajorTickMark,`cat`,Rt,ct+n*ut,kt,At,!1,t.catAxisLineHidden,`major`,r)}if(!t.catAxisHidden&&t.catAxisMinorTickMark&&t.catAxisMinorTickMark!==`none`){let n=ot(t)?Array.from({length:j},(e,t)=>(t+.5)/j):Array.from({length:Math.max(0,j-1)},(e,t)=>(t+.5)/(j-1)),i=ft?ft.minorTicks.map(e=>e.fraction):n;for(let n of i)l?Fr(e,t.catAxisMinorTickMark,`val`,zt,lt+n*dt,kt,At,!1,t.catAxisLineHidden,`minor`,r):Fr(e,t.catAxisMinorTickMark,`cat`,Rt,ct+n*ut,kt,At,!1,t.catAxisLineHidden,`minor`,r)}},Wt=l?dt/j:ut/j,Gt=Jr(t),Kt=e=>l?Gt?e:j-1-e:Gt?j-1-e:e,qt=e=>ft?ft.categoryBandFractions[e]*(l?dt:ut):Wt,Jt=e=>ft?(l?lt:ct)+ft.positions[e]*(l?dt:ut)-qt(e)/2:(l?lt:ct)+Kt(e)*Wt,Yt=e=>ft?ct+ft.positions[e]*ut:ct+Kt(e)*Wt+Wt/2,Xt=(e,n)=>{let r=e[0],a=r?v(r):u,o=a?1:Math.max(1,e.length),s=r?.barGroupOverlap??t.barOverlap??0,c=a||!Number.isFinite(s)?0:Math.max(-100,Math.min(100,s)),l=Mt(r?.barGroupGapWidth??t.barGapWidth,i.gapPolicy??`legacy`),d=n/(1+(o-1)*(1-c/100)+l/100),f=a?0:d*(1-c/100);return{barW:d,clusterGap:f,catStart:(n-(d+(o-1)*f))/2}};for(let n=0;n<x.length;n++){let i=x[n],a=ar(C.get(i)??n,i),o=T&&i.useSecondaryAxis===!0?wt:St,s=o(0),c=t.dispBlanksAs??`zero`,l=[],u=()=>{l.length!==0&&(ft&&(e.save(),e.beginPath(),e.rect(ct,lt,ut,dt),e.clip()),e.beginPath(),e.moveTo(l[0].x,s),e.lineTo(l[0].x,l[0].y),da(e,l,!1),e.lineTo(l[l.length-1].x,s),e.closePath(),e.fillStyle=i.fillPattern?Ln(i.fillPattern,e,l[0].x,lt,Math.max(1,l[l.length-1].x-l[0].x),dt)??a:a,e.fill(),i.lineHidden!==!0&&(e.strokeStyle=i.lineColor?`#${i.lineColor}`:a,e.lineWidth=i.lineWidthEmu==null?1.5:rt(i.lineWidthEmu,r),e.setLineDash([]),e.stroke()),ft&&e.restore(),l=[])};for(let e=0;e<j;e++){let t=i.values[e];t==null&&(c===`gap`&&u(),c!==`zero`)||l.push({x:Yt(e),y:o(t??0)})}u()}for(let n=0;n<j;n++){let i=new Map,u=new Map,d=qt(n);for(let f=0;f<m.length;f++){let p=m[f],h=T!=null&&p.useSecondaryAxis===!0,_=N(p),b=g(p),x=v(p),S=y(p),C=S&&_.reduce((e,t)=>e+Math.abs(t.values[n]??0),0)||1,w=i.get(b)??0,E=u.get(b)??0,D=Math.max(0,_.indexOf(p)),{barW:k,clusterGap:j,catStart:M}=Xt(_,d),P=h&&Ge?Ge.makeToY(lt,dt):_t,F=Ge?O?.crossesAt!=null&&Number.isFinite(O.crossesAt)?Math.max(Ge.min,Math.min(Ge.max,O.crossesAt)):O?.crosses===`max`?Ge.max:O?.crosses===`min`?Ge.min:Math.max(Ge.min,Math.min(Ge.max,0)):0,I=h?P(F):yt,V=p.values[n]??0,H=S?V/C*100:V,U=H<0,te=U&&(p.invertIfNegative===!0||p.automaticNegativeStyle===!0),W=R[f].get(n),ne=W?.color??p.dataPointColors?.[n],G=ne?`#${ne}`:L?sr(n,p):ar(f,p),K=te?p.invertedFillHidden===!0?null:p.invertedFill:void 0,q=W?.fillHidden?null:W?.color?{fillType:`solid`,color:W.color}:K===void 0?B?Ta(t,ee[f],m.length,p.chartexStyle,p.color):void 0:K,J=()=>{if(W?.lineHidden!=null||W?.lineColor!=null||W?.lineWidthEmu!=null||W?.lineDash!=null){if(W?.lineHidden)return!1;let n=ya(t,t.chartexDataPointStyle,`line`,ee[f],m.length)??p.lineColor??G;return e.strokeStyle=`#${W?.lineColor??n.replace(/^#/,``)}`,e.lineWidth=W?.lineWidthEmu==null?p.lineWidthEmu==null?1:rt(p.lineWidthEmu,r):rt(W.lineWidthEmu,r),e.setLineDash(fa(W?.lineDash,e.lineWidth)),!0}return te&&(p.invertedLineHidden!=null||p.invertedLineColor!=null||p.invertedLineWidthEmu!=null)?p.invertedLineHidden?!1:(e.strokeStyle=`#${p.invertedLineColor??`000000`}`,e.lineWidth=rt(p.invertedLineWidthEmu,r),e.setLineDash([]),!0):B?ka(e,t,t.chartexDataPointStyle,p,ee[f],m.length,G,r):!p.lineColor||p.lineHidden?!1:(e.strokeStyle=`#${p.lineColor}`,e.lineWidth=rt(p.lineWidthEmu,r),e.setLineDash([]),!0)};if(l){let i=D,l=x?Jt(n)+M:Jt(n)+M+i*j,u=x?vt(U?E:w):xt,d=vt(x?(U?E:w)+H:H),m=ua(Math.min(u,d),ct,ct+ut),h=ua(Math.max(u,d),ct,ct+ut),g=Math.max(0,h-m);if(q!==null&&(e.fillStyle=q?Ea(e,q,m,l,g,k,G):p.fillPattern?Ln(p.fillPattern,e,m,l,g,k)??G:G,e.fillRect(m,l,g,k)),g>0&&k>0&&J()){let t=e.lineWidth;e.strokeRect(m+t/2,l+t/2,Math.max(0,g-t),Math.max(0,k-t))}let _=p.seriesDataLabels,v=va(t,p,n,p.categories?.[n]??A[n]??``,V,{visible:t.showDataLabels,showVal:t.showDataLabels&&!S,showPercent:t.showDataLabels&&S,showCatName:!1},z[f],S?H/100:void 0,p.useSecondaryAxis&&T?T.displayUnits:t.valAxisDisplayUnits);if(v){let i=he(v.fontSizeHpt??t.dataLabelFontSizeHpt,r)??Math.max(7,Math.min(11,k*.6)),u=z[f].get(n),d=v.fontBold||_?.fontBold==null&&u?.fontBold==null,h=lr(t,v.fontFace??t.dataLabelFontFace,`minor`);e.font=`${d?`bold `:``}${i}px ${h}`,ki(e,v.text,m,l,g,k,`horizontal`,v.position??t.dataLabelPosition??(x?`ctr`:null),p.dataLabelColors?.[n]??v.fontColor??p.labelColor??t.dataLabelFontColor??null,i,{x:ct,y:lt,w:ut,h:dt},{x:a,y:o,w:s,h:c},u?.manualLayout,U,ca(t,u,r,h,d))}}else{let i=x?Jt(n)+M:Jt(n)+M+D*j;if(i+k<=ct||i>=ct+ut)continue;let l=x?P(U?E:w):I,u=P(x?(U?E:w)+H:H),d=ua(Math.min(l,u),lt,lt+dt),m=ua(Math.max(l,u),lt,lt+dt),h=Math.max(0,m-d);if(q!==null&&(e.fillStyle=q?Ea(e,q,i,d,k,h,G):p.fillPattern?Ln(p.fillPattern,e,i,d,k,h)??G:G,e.fillRect(i,d,k,h)),k>0&&h>0&&J()){let t=e.lineWidth;e.strokeRect(i+t/2,d+t/2,Math.max(0,k-t),Math.max(0,h-t))}let g=p.seriesDataLabels,_=va(t,p,n,p.categories?.[n]??A[n]??``,V,{visible:t.showDataLabels,showVal:t.showDataLabels&&!S,showPercent:t.showDataLabels&&S,showCatName:!1},z[f],S?H/100:void 0,p.useSecondaryAxis&&T?T.displayUnits:t.valAxisDisplayUnits);if(_){let l=he(_.fontSizeHpt??t.dataLabelFontSizeHpt,r)??Math.max(7,Math.min(11,k*.6)),u=z[f].get(n),m=_.fontBold||g?.fontBold==null&&u?.fontBold==null,v=lr(t,_.fontFace??t.dataLabelFontFace,`minor`);e.font=`${m?`bold `:``}${l}px ${v}`,ki(e,_.text,i,d,h,k,`vertical`,_.position??t.dataLabelPosition??(x?`ctr`:null),p.dataLabelColors?.[n]??_.fontColor??p.labelColor??t.dataLabelFontColor??null,l,{x:ct,y:lt,w:ut,h:dt},{x:a,y:o,w:s,h:c},u?.manualLayout,U,ca(t,u,r,v,m))}}x&&(U?u.set(b,E+H):i.set(b,w+H))}}let Zt=(e,t)=>{let n=N(e),r=Math.max(0,n.indexOf(e)),i=Xt(n,qt(t)),a=Jt(t)+i.catStart;return v(e)?a+i.barW/2:a+r*i.clusterGap+i.barW/2},Qt=(e,t)=>{if(Number.isInteger(t)&&t>=0&&t<j)return Zt(e,t);let n=N(e),r=Math.max(0,n.indexOf(e)),i=Xt(n,Wt),a=l?Gt?t:j-1-t:Gt?j-1-t:t;return(l?lt:ct)+a*Wt+i.catStart+(v(e)?0:r)*i.clusterGap+i.barW/2};for(let i=0;i<m.length;i++){let a=m[i],o=T!=null&&a.useSecondaryAxis===!0&&Ge?Ge.makeToY(lt,dt):_t,s=vt,c=ar(i,a),u=e=>Ne(i,e);for(let t of I(a))ha(e,a,t,j,l,e=>Zt(a,e),l?s:o,u,c,r);oi(e,a,c,e=>Qt(a,e-1),l?s:o,r,a.values.map((e,t)=>t+1),{chart:t,chartRect:n,plotRect:{x:ct,y:lt,w:ut,h:dt}},(e,t)=>l?{x:s(t),y:Qt(a,e-1)}:{x:Qt(a,e-1),y:o(t)})}if(!t.catAxisHidden&&fi(t)){e.fillStyle=t.catAxisFontColor?`#${t.catAxisFontColor}`:`#555`;let n=t.catAxisFontSizeHpt==null?Math.max(8,Math.min(11,Wt*.5)):G;e.font=ur(n,lr(t,t.catAxisFontFace,`minor`),t.catAxisFontBold??!1,t.catAxisFontItalic??!1);let i=Wt-4,o=ct-4-(a+oe+pe),s=pt,c=ft?ft.majorTicks.map(e=>({raw:bt(String(e.serial),t.catAxisFormatCode,t.date1904),fraction:e.fraction,categoryIndex:-1})):A.map((e,n)=>({raw:bt(e.toString(),t.catAxisFormatCode,t.date1904),fraction:null,categoryIndex:n}));for(let r of c){let{raw:a}=r;if(l){let i=r.fraction==null?lt+Kt(r.categoryIndex)*Wt+Wt/2:lt+r.fraction*dt;e.textAlign=`right`,e.textBaseline=`middle`;let s=t.catAxisFontSizeHpt==null?4:Ee(n);e.fillText(Ot(e,a,o),ct-s,i)}else{let o=r.fraction==null?Yt(r.categoryIndex):ct+r.fraction*ut;e.textAlign=`center`,e.textBaseline=`top`;let c=s===0?i:dt*.4,l=t.catAxisFontSizeHpt==null?3:Te(n);s===0?(r.categoryIndex>=0?mt[r.categoryIndex]??[a]:[a]).forEach((t,r)=>{e.fillText(t,o,Bt+l+r*(n+2))}):mi(e,Ot(e,a,c),o,Bt+l,s)}}if(!l&&q){let i=t.catAxisFontSizeHpt==null?3:Te(n),a=n+4;e.textAlign=`center`,e.textBaseline=`top`,e.strokeStyle=kt,e.lineWidth=At,e.setLineDash([]);let o=e=>{if(!Ht||e%Vt!==0)return Bt;let n=Ir(`major`,At,r);return t.catAxisMajorTickMark===`cross`?Bt-n/2:t.catAxisMajorTickMark===`in`?Bt-n:Bt},s=new Set;for(let e=1;e<q.length;e++){let t=q[e]??[];for(let e=0;e<j;e++)(t[e]??``)!==``&&s.add(e);s.add(j)}let c=Bt+i+n+2;for(let t=0;t<=j;t++){if(s.has(t))continue;let n=ct+t/j*ut;e.beginPath(),e.moveTo(n,o(t)),e.lineTo(n,c),e.stroke()}let l=new Map;for(let t=1;t<q.length;t++){let r=q[t]??[],o=[];for(let e=0;e<j;e++)(r[e]??``)!==``&&o.push(e);for(let s=0;s<o.length;s++){let c=o[s],u=o[s+1]??j,d=r[c]??``,f=ct+c/j*ut,p=ct+u/j*ut,m=Bt+i+t*a;e.fillText(Ot(e,d,Math.max(0,p-f-4)),(f+p)/2,m);let h=m+n+2;for(let e of[c,u])l.set(e,Math.max(l.get(e)??Bt,h))}}for(let[t,n]of l){let r=ct+t/j*ut;e.beginPath(),e.moveTo(r,o(t)),e.lineTo(r,n),e.stroke()}}}if(b.length>0&&!l){ft&&(e.save(),e.beginPath(),e.rect(ct,lt,ut,dt),e.clip());for(let a=0;a<b.length;a++){let o=b[a],s=ar(m.length+a,o),c=T&&o.useSecondaryAxis===!0?wt:St,l=o.chartexStyle!=null||o.lineHidden!=null||o.lineColor!=null||o.lineWidthEmu!=null||t.chartexDataPointLineStyle!=null,u=l?ka(e,t,t.chartexDataPointLineStyle,o,_a(o,C.get(o)??a),b.length,s,r,{linkedNoStyleFallback:i.semanticLineNoStyleFallback}):!0;l||(e.strokeStyle=s,e.lineWidth=2,e.setLineDash([])),e.beginPath();let d=o.smooth===!0,f=t.dispBlanksAs??`gap`,p=[],h=()=>{p.length!==0&&(e.moveTo(p[0].x,p[0].y),da(e,p,d),p=[])};for(let e=0;e<j;e++){let t=o.values[e];if(t==null&&(f===`gap`&&h(),f!==`zero`))continue;let n=Yt(e);p.push({x:n,y:c(t??0)})}if(h(),u&&e.stroke(),o.showMarker!==!1)for(let t=0;t<j;t++){let n=o.values[t];if(n==null)continue;let r=Yt(t),i=c(n);e.fillStyle=s,e.beginPath(),e.arc(r,i,3,0,Math.PI*2),e.fill()}oi(e,o,s,e=>Yt(e),c,r,void 0,{chart:t,chartRect:n,plotRect:{x:ct,y:lt,w:ut,h:dt}})}ft&&e.restore()}if(S.length>0){let i=[],l=[];for(let e of S){let t=e.categories??[];for(let n=0;n<e.values.length;n++){let r=Xi(t,n,!1),a=e.values[n];r==null||a==null||(i.push(r),l.push(a))}}if(i.length&&l.length){let u=t.secondaryCatAxis,d=t.secondaryValAxis,f=Ie(i),p=Ie(l),m=e=>e?.minorGridlines===!0||e?.minorTickMark!=null&&e.minorTickMark!==`none`,h=Xe({dataMin:f.min,dataMax:f.max,explicitMin:u?.min,explicitMax:u?.max,axisLenPt:ut/r,axisOrientation:`horizontal`,majorUnit:u?.majorUnit,minorUnit:u?.minorUnit,needMinor:m(u),logBase:u?.logBase,reversed:u?.orientation===`maxMin`}),g=Xe({dataMin:p.min,dataMax:p.max,explicitMin:d?.min,explicitMax:d?.max,axisLenPt:dt/r,axisOrientation:`vertical`,majorUnit:d?.majorUnit,minorUnit:d?.minorUnit,needMinor:m(d),logBase:d?.logBase,reversed:d?.orientation===`maxMin`});na(e,t,S.map((e,t)=>({series:e,index:C.get(e)??t})),!1,e=>ct+h.fraction(e)*ut,e=>lt+dt-g.fraction(e)*dt,n,ct,lt,ut,dt,r,!1,t.scatterStyle??`marker`,{x:a,y:o,w:s,h:c})}}Ut(),O&&!l&&xi(e,t,O,k,n,ct,lt,ut,r),T&&Ge&&yi(e,t,T,Ge,Ct,n,ct,lt,ut,dt,r,Qe,$e,Dt,t.date1904,Ue),gt&&br(e,t,gt,ct,lt+dt+we(G)+J+ht,ut,a+oe,r);let $t=B?m.flatMap((e,n)=>[Ta(t,ee[n],m.length,e.chartexStyle,e.color),...si([e]).map(()=>void 0)]):[];Pr(e,H,ie,a,o,s,c,ct,lt,ut,dt,ne+2,r,$t),gr(e,t,a,o,s,c,ct,lt,ut,dt,oe,ce,ue,de,l)}function Mi(e,t,n,r){let{x:i,y:a,w:o,h:s}=n,c=Di(t),l=c.length;if(l===0)return;let u=t.chartType===`stackedLine`||t.chartType===`stackedLinePct`,d=t.chartType===`stackedLinePct`,f=d?c.map((e,n)=>{let r=0;for(let e of t.series)r+=Math.abs(e.values[n]??0);return r||1}):null,p=t.dispBlanksAs??`gap`,m=(e,n)=>{if(!u)return t.series[e].values[n]??0;let r=0;for(let i=0;i<=e;i++)r+=t.series[i].values[n]??0;return d&&f?r/f[n]*100:r},h=!u&&t.secondaryValAxis&&t.series.some(e=>e.useSecondaryAxis===!0)?t.secondaryValAxis:null,g=e=>h!=null&&e.useSecondaryAxis===!0,_=1/0,v=-1/0;for(let e=0;e<l;e++)for(let n=0;n<t.series.length;n++){if(g(t.series[n])||!u&&t.series[n].values[e]==null)continue;let r=m(n,e);_=Math.min(_,r),v=Math.max(v,r)}for(let e=0;e<t.series.length;e++){let n=t.series[e];g(n)||gi(n,`y`,t=>n.values[t]==null?null:m(e,t),e=>{_=Math.min(_,e),v=Math.max(v,e)})}isFinite(_)||(_=0,v=1);let y=t.valAxisLogBase!=null&&t.valAxisLogBase>=2;t.valMin==null?d&&_>0&&!y&&(_=0):_=d?t.valMin*100:t.valMin,t.valMax==null?d&&v<0&&(v=0):v=d?t.valMax*100:t.valMax;let b=wi(e,t,o,s,r),x=b.fontPx,S=b.topPad,C=b.bandH,w=jr(e,t,o,s,.22,r),{legRightW:T,legLeftW:E,legTopH:D,legBottomH:O}=ye(w),k=li(t.catAxisFontSizeHpt,s,r),A=li(t.valAxisFontSizeHpt,s,r),j=Se(t,o,s,r),M=j.catFontPx,N=j.valFontPx,P=j.catBandH,F=j.valBandW,I=C+D+A/2+2,L=we(k)+P+O,R=s-I-L,z=_i(h,t.series,R/r),ee=Math.max(8,Math.min(11,s/20)),B=he(h?.fontSizeHpt,r)??ee,V=0;if(h&&z&&!h.hidden){let n=e.font;e.font=ur(B,lr(t,h.fontFace,`minor`),!1,h.fontItalic??!1);let r=0;for(let n of z.majorLines)r=Math.max(r,e.measureText($r(n,h.formatCode??null,t.date1904,h.displayUnits)).width);V=r+18,e.font=n}let H=h&&h.title?be(h.titleFontSizeHpt,r)+8:0,U=A*2.2+10+F+E,te=T+o*.05+V+H,W=ni(t,_,v,R/r,d),ne=0;if(!t.valAxisHidden&&t.valAxisTickLabelPos!==`none`&&t.plotAreaManualLayout!=null&&t.plotAreaManualLayout.layoutTarget!==`inner`){let n=e.font;e.font=`${A}px ${lr(t,t.valAxisFontFace,`minor`)}`;for(let n of W.majorLines)ne=Math.max(ne,e.measureText(Zr(t,n,d)).width);e.font=n}let G={t:I,r:te,b:L,l:U},K=De({valAxisHidden:t.valAxisHidden,catAxisHidden:t.catAxisHidden,valLabelWidth:ne,valLabelFontPx:A,catLabelFontPx:k,valLabelGapPx:t.valAxisFontSizeHpt==null?6:Ee(A),catLabelGapPx:t.catAxisFontSizeHpt==null?5:Te(k),outerTextMarginPx:Pe*r,valTitleBandW:F,catTitleBandH:P,secondaryBandW:V+H}),q=ke(t,i,a,o,s,r,{titleBand:b,legendSideReserveFrac:.22,legendReserve:w,pad:G,honorPlotAreaManualLayout:!0,manualOuterInsets:K}),J=wi(e,t,q.plotRect.pw,s,r);Math.abs(J.bandH-b.bandH)>.01&&(b=J,x=b.fontPx,S=b.topPad,C=b.bandH,I=C+D+A/2+2,G.t=I,q=ke(t,i,a,o,s,r,{titleBand:b,legendSideReserveFrac:.22,legendReserve:w,pad:G,honorPlotAreaManualLayout:!0,manualOuterInsets:K}));let{plotRect:{px0:Y,py0:re,pw:ie,ph:ae}}=q;if(Ei(e,t,t.titleManualLayout||!t.titleRichRuns?.length?i:Y,a,t.titleManualLayout||!t.titleRichRuns?.length?o:ie,s,a+S,x),ie<=0||ae<=0)return;t.plotAreaBg&&(e.fillStyle=`#${t.plotAreaBg}`,e.fillRect(Y,re,ie,ae));let oe=ni(t,_,v,ae/r,d);if(oe.max-oe.min===0)return;let se=e=>re+ae-oe.frac(e)*ae,ce=z?z.makeToY(re,ae):se,le=e=>g(e)?ce:se,ue=it(t.catAxisLineColor,t.catAxisLineWidthEmu,r),de=it(t.valAxisLineColor,t.valAxisLineWidthEmu,r),fe=t.catAxisLineColor==null?void 0:ue.color,pe=t.catAxisLineWidthEmu==null?void 0:ue.width,me=t.valAxisLineColor==null?void 0:de.color,ge=t.valAxisLineWidthEmu==null?void 0:de.width,_e=hi(t,c),ve=ot(t),xe=Jr(t),X=_e?e=>Y+_e.positions[e]*ie:ve?e=>Y+((xe?l-1-e:e)+.5)/l*ie:e=>{let t=xe?l-1-e:e;return Y+(l===1?ie/2:t/(l-1)*ie)};if(!t.valAxisHidden){e.font=`${A}px ${lr(t,t.valAxisFontFace,`minor`)}`,e.textBaseline=`middle`;let n=zr(t,r),i=Br(t,r);for(let t of oe.minorLines)Rr(e,Y,ie,se(t),!1,i);let a=Yr(t),o=t.valAxisTickLabelPos!==`none`;for(let i of oe.majorLines){let s=se(i);if(a&&Rr(e,Y,ie,s,i===0,n),Fr(e,t.valAxisMajorTickMark,`val`,Y,s,me,ge,!1,t.valAxisLineHidden,`major`,r),o){e.fillStyle=t.valAxisFontColor?`#${t.valAxisFontColor}`:`#555`,e.textAlign=`right`;let n=t.valAxisFontSizeHpt==null?6:Ee(A);e.fillText(Zr(t,i,d),Y-n,s)}}if(t.valAxisMinorTickMark&&t.valAxisMinorTickMark!==`none`)for(let n of oe.minorTicks)Fr(e,t.valAxisMinorTickMark,`val`,Y,se(n),me,ge,!1,t.valAxisLineHidden,`minor`,r)}if(h&&z&&vi(e,h,z,ce,Y,ie,r),!t.catAxisHidden&&Ur(t)){let n=Wr(t,r);e.strokeStyle=n.color,e.lineWidth=n.width;let i=n.dash.length>0&&e.getLineDash?e.getLineDash():[];n.dash.length>0&&e.setLineDash(n.dash);let a=_e?_e.majorTicks.map(e=>e.fraction):Kr(t,l);for(let t of a){let n=Y+t*ie;e.beginPath(),e.moveTo(n,re),e.lineTo(n,re+ae),e.stroke()}n.dash.length>0&&e.setLineDash(i)}!t.catAxisHidden&&!t.catAxisLineHidden&&(e.strokeStyle=ue.color,e.lineWidth=ue.width,e.beginPath(),e.moveTo(Y,re+ae),e.lineTo(Y+ie,re+ae),e.stroke()),!t.valAxisHidden&&!t.valAxisLineHidden&&(e.strokeStyle=de.color,e.lineWidth=de.width,e.beginPath(),e.moveTo(Y,re),e.lineTo(Y,re+ae),e.stroke());let Ce=Math.max(1,2.25*r),Oe=Math.max(2,2.5*r),Ae=li(t.dataLabelFontSizeHpt,s,r),je=[];for(let _=0;_<t.series.length;_++){let v=t.series[_],y=or(v.dataPointOverrides),b=ar(_,v),x=le(v);e.strokeStyle=v.lineColor?`#${v.lineColor}`:b,e.lineWidth=v.lineWidthEmu==null?Ce:rt(v.lineWidthEmu,r),e.setLineDash(fa(v.chartexStyle?.lineDash??void 0,e.lineWidth)),e.lineCap=v.chartexStyle?.lineCap===`rnd`?`round`:v.chartexStyle?.lineCap===`sq`?`square`:`butt`,e.lineJoin=v.chartexStyle?.lineJoin===`round`||v.chartexStyle?.lineJoin===`bevel`?v.chartexStyle.lineJoin:`miter`,e.beginPath();let S=v.smooth===!0,C=[],w=()=>{C.length!==0&&(e.moveTo(C[0].x,C[0].y),da(e,C,S),C=[])};for(let e=0;e<l;e++){if(!u&&v.values[e]==null){if(p===`gap`){w();continue}if(p===`span`)continue}C.push({x:X(e),y:x(m(_,e))})}w(),v.lineHidden!==!0&&e.stroke();let T=e=>m(_,e);for(let t of v.errBars??[])ma(e,v,t,l,X,x,T,b);e.fillStyle=b;let E=v.showMarker!==!1,D=pa(v),O=(v.dataLabelOverrides?.length??0)>0||v.seriesDataLabels!=null;O&&je.push(()=>{ga(e,v,c,l,X,x,T,ae,r,t.date1904??!1,u||p===`zero`,lr(t,t.dataLabelFontFace,`minor`),t.dataLabelPosition??`r`,{x:i,y:re,w:o,h:ae},{x:i,y:a,w:o,h:s},d&&f?e=>(v.values[e]??0)/f[e]:void 0,e=>{if(!E)return 0;if(!D)return Oe;let t=y.get(e);return(t?.markerSymbol??v.markerSymbol??`circle`)===`none`?0:(t?.markerSize??v.markerSize??5)/2*r},e=>lr(t,e,`minor`),g(v)?h?.displayUnits:t.valAxisDisplayUnits)});for(let t=0;t<l;t++){if(!u&&v.values[t]==null&&p!==`zero`)continue;let n=m(_,t);if(E)if(D){let i=y.get(t),a=i?.markerSymbol??v.markerSymbol??`circle`;if(a!==`none`){let o=i?.markerSize??v.markerSize??5,s=i?.markerFill??i?.color??v.markerFill??b,c=i?.markerLine??v.markerLine??null,l=i?.markerLineWidthEmu??v.markerLineWidthEmu;ia(e,X(t),x(n),a,o,s,c,r,l==null?void 0:rt(l,r))}}else e.beginPath(),e.arc(X(t),x(n),Oe,0,Math.PI*2),e.fill()}t.showDataLabels&&!O&&je.push(()=>{for(let n=0;n<l;n++){if(!u&&v.values[n]==null&&p!==`zero`)continue;let r=m(_,n),i=an({showValue:!0,sourceValue:v.values[n]??0,valueDivisor:Qr(g(v)?h?.displayUnits:t.valAxisDisplayUnits),formatCode:t.dataLabelFormatCode??v.valFormatCode??null,date1904:t.date1904});sa(e,X(n),x(r),i,t.dataLabelPosition??`r`,Ae,t.dataLabelFontColor??void 0,t.dataLabelFontBold??!1,lr(t,t.dataLabelFontFace,`minor`),E?Oe+1:2,{x:Y,y:re,w:ie,h:ae})}}),oi(e,v,b,X,x,r,void 0,{chart:t,chartRect:n,plotRect:{x:Y,y:re,w:ie,h:ae}})}for(let e of je)e();if(!t.catAxisHidden){let n=t.catAxisFontColor?`#${t.catAxisFontColor}`:`#555`;e.fillStyle=n,e.textAlign=`center`,e.textBaseline=`top`,e.font=`${k}px ${lr(t,t.catAxisFontFace,`minor`)}`;let i=Math.max(1,Math.floor(t.catAxisTickMarkSkip??1)),a=_e?_e.majorTicks.map(e=>Y+e.fraction*ie):Array.from({length:Math.ceil(l/i)},(e,t)=>X(t*i));for(let n of a)Fr(e,t.catAxisMajorTickMark,`cat`,re+ae,n,fe,pe,!1,t.catAxisLineHidden,`major`,r);if(t.catAxisMinorTickMark&&t.catAxisMinorTickMark!==`none`&&_e)for(let n of _e.minorTicks)Fr(e,t.catAxisMinorTickMark,`cat`,re+ae,Y+n.fraction*ie,fe,pe,!1,t.catAxisLineHidden,`minor`,r);let o=fi(t),s=Math.max(1,Math.floor(t.catAxisTickLabelSkip??1)),u=pi(t),d=_e?_e.majorTicks.map(e=>({label:bt(String(e.serial),t.catAxisFormatCode,t.date1904),x:Y+e.fraction*ie})):Array.from({length:Math.ceil(l/s)},(e,n)=>{let r=n*s;return{label:bt((c[r]??``).toString(),t.catAxisFormatCode,t.date1904),x:X(r)}});for(let r of d){let i=r.x;if(!o)continue;e.fillStyle=n;let a=r.label;if(!a)continue;let s=t.catAxisFontSizeHpt==null?5:Te(k);mi(e,a,i,re+ae+s,u)}}if(h&&z){let i=t.valAxisFontColor?`#${t.valAxisFontColor}`:`#555`;yi(e,t,h,z,ce,n,Y,re,ie,ae,r,B,V,i,t.date1904)}Pr(e,t,w,i,a,o,s,Y,re,ie,ae,C+2,r),gr(e,t,i,a,o,s,Y,re,ie,ae,E,O,M,N)}function Ni(e,t,n,r){let{x:i,y:a,w:o,h:s}=n,c=Di(t),l=c.length;if(l===0)return;let u=t.series,d=u.length>=4,f=d?0:-1,p=+!!d,m=d?2:1,h=d?3:2,g=u[p],_=u[m],v=u[h],y=f>=0?u[f]:void 0,b=u[0],x=u.at(-1),S=wi(e,t,o,s,r),C=S.fontPx,w=S.topPad,T=S.bandH,E=jr(e,t,o,s,.22,r),{legRightW:D,legLeftW:O,legBottomH:k,legTopH:A}=ye(E),j=li(t.catAxisFontSizeHpt,s,r),M=li(t.valAxisFontSizeHpt,s,r),N=Se(t,o,s,r),P=N.catFontPx,F=N.valFontPx,I=N.catBandH,L=N.valBandW,R=T+A+M/2+2,z=we(j)+I+k,ee={t:R,r:D+o*.05,b:z,l:M*2.2+10+L+O};Ei(e,t,i,a,o,s,a+w,C);let{plotRect:{px0:B,py0:V,pw:H,ph:U}}=ke(t,i,a,o,s,r,{titleBand:S,legendSideReserveFrac:.22,legendReserve:E,pad:ee,honorPlotAreaManualLayout:!0});if(H<=0||U<=0)return;t.plotAreaBg&&(e.fillStyle=`#${t.plotAreaBg}`,e.fillRect(B,V,H,U));let te=1/0,W=-1/0;for(let e of u)for(let t=0;t<l;t++){let n=e.values[t];n!=null&&(te=Math.min(te,n),W=Math.max(W,n))}for(let e of u)gi(e,`y`,t=>e.values[t]??null,e=>{te=Math.min(te,e),W=Math.max(W,e)});isFinite(te)||(te=0,W=1),t.valMin!=null&&(te=t.valMin),t.valMax!=null&&(W=t.valMax);let ne=ni(t,te,W,U/r);if(ne.max-ne.min===0)return;let G=e=>V+U-ne.frac(e)*U,K=ot(t),q=Jr(t),J=hi(t,c),Y=J?e=>B+J.positions[e]*H:K?e=>B+((q?l-1-e:e)+.5)/l*H:e=>{let t=q?l-1-e:e;return B+(l===1?H/2:t/(l-1)*H)};if(!t.valAxisHidden){e.font=`${M}px ${lr(t,t.valAxisFontFace,`minor`)}`,e.textBaseline=`middle`;let n=zr(t,r),i=Br(t,r);for(let t of ne.minorLines)Rr(e,B,H,G(t),!1,i);let a=Yr(t),o=t.valAxisTickLabelPos!==`none`;for(let i of ne.majorLines){let s=G(i);a&&Rr(e,B,H,s,i===0,n),Fr(e,t.valAxisMajorTickMark,`val`,B,s,void 0,void 0,!1,t.valAxisLineHidden,`major`,r),o&&(e.fillStyle=t.valAxisFontColor?`#${t.valAxisFontColor}`:`#555`,e.textAlign=`right`,e.fillText(Zr(t,i,!1),B-6,s))}for(let n of ne.minorTicks)Fr(e,t.valAxisMinorTickMark,`val`,B,G(n),void 0,void 0,!1,t.valAxisLineHidden,`minor`,r)}if(e.strokeStyle=`#aaa`,e.lineWidth=1,!t.catAxisHidden&&!t.catAxisLineHidden&&(e.beginPath(),e.moveTo(B,V+U),e.lineTo(B+H,V+U),e.stroke()),!t.valAxisHidden&&!t.valAxisLineHidden&&(e.beginPath(),e.moveTo(B,V),e.lineTo(B,V+U),e.stroke()),t.stockUpDownBars&&b&&x){let n=t.stockUpDownBarStyle,i=n?.gapWidthPercent!=null&&Number.isFinite(n.gapWidthPercent)&&n.gapWidthPercent>=0?n.gapWidthPercent:150,a=J?(J.categoryBandFractions[0]??0)*H:K?H/l:l>1?H/(l-1):H,o=Math.max(0,a/(1+i/100));for(let t=0;t<l;t++){let i=b.values[t],a=x.values[t];if(i==null||a==null||!Number.isFinite(i)||!Number.isFinite(a))continue;let s=G(i),c=G(a),l=Math.abs(c-s);if(!(o>0)||!(l>0)||!Number.isFinite(l))continue;let u=a>=i?n?.up:n?.down,d=a>=i?`FFFFFF`:`000000`,f=Y(t)-o/2,p=Math.min(s,c);u?.fillHidden||(e.fillStyle=`#${u?.fillColor??d}`,e.fillRect(f,p,o,l)),u?.lineHidden||(e.strokeStyle=`#${u?.lineColor??`000000`}`,e.lineWidth=u?.lineWidthEmu==null?Math.max(1,.75*r):rt(u.lineWidthEmu,r),e.setLineDash([]),e.strokeRect(f,p,o,l))}}if((t.stockHiLowLines??!0)&&g!=null&&_!=null&&g&&_){e.strokeStyle=t.stockHiLowLineColor?`#${t.stockHiLowLineColor}`:`#595959`,e.lineWidth=Math.max(1,.75*r),e.setLineDash([]);for(let t=0;t<l;t++){let n=g.values[t],r=_.values[t];if(n==null||r==null)continue;let i=Y(t);e.beginPath(),e.moveTo(i,G(n)),e.lineTo(i,G(r)),e.stroke()}}let re=(t,n,i)=>{if(!t)return;let a=ar(n,t),o=t.markerSymbol??null,s=o!=null&&o!==`none`&&pa(t),c=Math.max(3,H/l*.22);for(let n=0;n<l;n++){let l=t.values[n];if(l==null)continue;let u=Y(n),d=G(l);if(o===`none`)continue;if(s){ia(e,u,d,o,t.markerSize??3,t.markerFill??a,t.markerLine??null,r,t.markerLineWidthEmu==null?void 0:rt(t.markerLineWidthEmu,r));continue}e.strokeStyle=a,e.lineWidth=Math.max(1,.75*r),e.beginPath();let f=i===`right`?u:i===`left`?u-c:u-c/2,p=i===`right`?u+c:i===`left`?u:u+c/2;e.moveTo(f,d),e.lineTo(p,d),e.stroke()}};re(y,f,`left`),g?.markerSymbol!=null&&re(g,p,`both`),_?.markerSymbol!=null&&re(_,m,`both`),re(v,h,`right`);for(let t=0;t<u.length;t++){let n=u[t],r=ar(t,n);for(let t of n.errBars??[])ma(e,n,t,l,Y,G,e=>n.values[e]??0,r)}if(u.length<3)for(let e=0;e<u.length;e++)re(u[e],e,`both`);if(!t.catAxisHidden){let n=Math.max(1,Math.floor(t.catAxisTickLabelSkip??1)),i=t.catAxisFontColor?`#${t.catAxisFontColor}`:`#555`;e.fillStyle=i,e.textAlign=`center`,e.textBaseline=`top`,e.font=`${j}px ${lr(t,t.catAxisFontFace,`minor`)}`;let a=J?(J.categoryBandFractions[0]??0)*H-4:H/l*n-4,o=fi(t),s=pi(t),u=J?J.majorTicks.map(e=>({label:bt(String(e.serial),t.catAxisFormatCode,t.date1904),x:B+e.fraction*H})):Array.from({length:Math.ceil(l/n)},(e,r)=>{let i=r*n;return{label:bt((c[i]??``).toString(),t.catAxisFormatCode,t.date1904),x:Y(i)}});for(let n of u){let c=n.x;if(Fr(e,t.catAxisMajorTickMark,`cat`,V+U,c,void 0,void 0,!1,t.catAxisLineHidden,`major`,r),!o)continue;e.fillStyle=i;let l=n.label;mi(e,Ot(e,l,s===0?a:U*.4),c,V+U+5,s)}if(t.catAxisMinorTickMark&&t.catAxisMinorTickMark!==`none`&&J)for(let n of J.minorTicks)Fr(e,t.catAxisMinorTickMark,`cat`,V+U,B+n.fraction*H,void 0,void 0,!1,t.catAxisLineHidden,`minor`,r)}Pr(e,t,E,i,a,o,s,B,V,H,U,T+2,r),gr(e,t,i,a,o,s,B,V,H,U,O,k,P,F)}const Pi=2e5,Fi=1.25;function Ii(e,t,n){if(e.length===0)return[];let r=[],i=e=>n?e.value>=t:e.value<=t,a=e[e.length-1],o=i(a);for(let n of e){let e=i(n);if(e!==o){let e=n.value-a.value,i=e===0?0:(t-a.value)/e;r.push({x:a.x+(n.x-a.x)*i,y:a.y+(n.y-a.y)*i,depth:a.depth+(n.depth-a.depth)*i,value:t})}e&&r.push(n),a=n,o=e}return r}function Li(e,t,n,r){let{x:i,y:a,w:o,h:s}=n,c=Di(t),l=t.series,u=c.length,d=l.length;if(u<2||d<2)return;let f=1/0,p=-1/0;for(let e of l)for(let t=0;t<u;t++){let n=e.values[t];n==null||!Number.isFinite(n)||(f=Math.min(f,n),p=Math.max(p,n))}if(!Number.isFinite(f)||!Number.isFinite(p))return;t.valMin!=null&&(f=t.valMin),t.valMax!=null&&(p=t.valMax);let m={...t.threeD??{},rotationX:t.threeD?.rotationX??15,rotationY:t.threeD?.rotationY??20,rightAngleAxes:t.threeD?.rightAngleAxes??!1,perspective:t.threeD?.perspective??30},h=Vn(m),g=Hn(m),_=$n(m,n,{sceneDepthScale:Fi,perspectiveTangentGain:g}),v;if(_){let e=_.topology.axisX===`min`?_.front.x:_.front.x+_.front.w,t=_.project(e,_.front.y+_.front.h,_.topology.nearDepth),n=_.project(e,_.front.y,_.topology.nearDepth);v=Math.hypot(n.x-t.x,n.y-t.y)/r}let y=t.valAxisMajorUnit==null?Be(f,p,v):null,b=ni(y==null?t:{...t,valAxisMajorUnit:y},f,p,v),x=b.step;if(!(x>0)||!Number.isFinite(x))return;let S=t.valMin??b.min,C=t.valMax??Math.max(S+x,S+Math.ceil((p-S)/x)*x),w=C-S;if(!(w>0)||!Number.isFinite(w))return;let T=Math.ceil(w/x),E=Math.floor(w/x+1e-9)+1,D=(u-1)*(d-1)*2;if(!Number.isSafeInteger(T)||!Number.isSafeInteger(E)||T<1||E<2||D<1||T>512||E>512||T>Math.floor(Pi/D)||E>Pi)return;let O=T,k=qr(t)?e=>1-(e-S)/w:e=>(e-S)/w,A=Array.from({length:E},(e,t)=>S+t*x),j=Array.from({length:O},(e,n)=>Gn(t.themeAccentColors??[],n,O,t.legacyChartStyle??2)??(l[n]?.color?`#${l[n].color}`:ar(n,l[n]))),M=new Map((t.surfaceBandFormats??[]).map(e=>[e.idx,e])),N=Array.from({length:O},(e,t)=>{let n=S+t*x,r=Math.min(C,n+x);return`${vt(n)}-${vt(r)}`}),P={...t,series:N.map((e,t)=>({name:e,color:j[t].replace(/^#/,``),values:[]}))};Math.abs(m.rotationX)===90&&P.series.reverse();let F=jr(e,P,o,s,.22,r),{legRightW:I,legLeftW:L,legTopH:R,legBottomH:z}=ye(F),ee=wi(e,t,o,s,r),B=li(t.catAxisFontSizeHpt,s,r),V=t.threeD?.seriesAxis,H=he(V?.fontSizeHpt,r)??B,{px0:U,py0:te,pw:W,ph:ne}=ke(t,i,a,o,s,r,{titleBand:ee,legendSideReserveFrac:.22,legendReserve:F,pad:{t:ee.bandH+R+H/2,r:I+H*3.2+12,b:we(B)+z,l:L+B*1.5},honorPlotAreaManualLayout:!0}).plotRect;if(!(W>0)||!(ne>0))return;Ei(e,t,t.titleManualLayout||!t.titleRichRuns?.length?i:U,a,t.titleManualLayout||!t.titleRichRuns?.length?o:W,s,a+ee.topPad,ee.fontPx);let G=$n(m,{x:U,y:te,w:W,h:ne},{sceneDepthScale:Fi,perspectiveTangentGain:g});if(!G)return;let K=h||Math.abs(m.rotationX)===90&&m.rotationY===0&&m.rightAngleAxes===!1&&m.perspective===0,{front:q}=G,J=t.catAxisOrientation===`maxMin`,Y=ot(t),re=e=>q.x+jt(e,u,Y,J)*q.w,ie=V?.orientation===`maxMin`,ae=e=>jt(e,d,!1,ie),oe=e=>q.y+q.h-k(e)*q.h,se=[],ce=e=>{if(t.surfaceWireframe===!0)return;let n=Math.min(...e.map(e=>e.value)),r=Math.max(...e.map(e=>e.value)),i=Math.max(0,Math.floor((n-S)/x)),a=Math.min(O-1,Math.floor((r-S)/x));for(let t=i;t<=a;t++){let n=S+t*x,r=t===O-1?C:n+x,i=Ii(e,n,!0);if(i=Ii(i,r,!1),i.length<3)continue;let a=i.map(e=>G.project(e.x,e.y,e.depth));se.push({points:a,scenePoints:i,band:t,depth:i.reduce((e,t)=>e+G.cameraDepth(t.x,t.y,t.depth),0)/i.length})}};e.save(),e.beginPath(),e.rect(U,te,W,ne),e.clip();let le=(t,n,r,i)=>{if(t.length<2)return;let a=t.map(e=>G.project(e.x,e.y,e.depth));e.beginPath(),e.moveTo(a[0].x,a[0].y);for(let t=1;t<a.length;t++)e.lineTo(a[t].x,a[t].y);e.strokeStyle=n,e.lineWidth=r,e.setLineDash(On(i??`solid`,r)),e.stroke()},ue=G.topology.farDepth,de=G.topology.nearDepth,fe=q.y+q.h,pe=G.topology.farX===`min`?q.x:q.x+q.w;if(Yr(t)){let e=at(t.valAxisGridlineColor,t.valAxisGridlineWidthEmu,r);for(let n of A){let r=oe(n);le([{x:q.x,y:r,depth:ue},{x:q.x+q.w,y:r,depth:ue}],e.color,e.width,t.valAxisGridlineDash),le([{x:pe,y:r,depth:de},{x:pe,y:r,depth:ue}],e.color,e.width,t.valAxisGridlineDash)}}if(t.catAxisMajorGridlines){let e=at(t.catAxisGridlineColor,t.catAxisGridlineWidthEmu,r);for(let n of Kr(t,u))le([{x:q.x+n*q.w,y:fe,depth:de},{x:q.x+n*q.w,y:fe,depth:ue}],e.color,e.width,t.catAxisGridlineDash)}for(let e=0;e<d-1;e++)for(let t=0;t<u-1;t++){let n=[l[e].values[t],l[e].values[t+1],l[e+1].values[t+1],l[e+1].values[t]];if(n.some(e=>e==null||!Number.isFinite(e)))continue;let r={x:re(t),y:oe(n[0]),depth:ae(e),value:n[0]},i={x:re(t+1),y:oe(n[1]),depth:ae(e),value:n[1]},a={x:re(t+1),y:oe(n[2]),depth:ae(e+1),value:n[2]},o={x:re(t),y:oe(n[3]),depth:ae(e+1),value:n[3]};r.value+a.value>i.value+o.value?(ce([r,i,a]),ce([r,a,o])):(ce([r,i,o]),ce([i,a,o]))}se.sort((e,t)=>e.depth-t.depth);for(let t of se){let n=M.get(t.band);e.beginPath(),e.moveTo(t.points[0].x,t.points[0].y);for(let n=1;n<t.points.length;n++)e.lineTo(t.points[n].x,t.points[n].y);if(e.closePath(),n?.fillHidden!==!0){let r=Math.min(...t.points.map(e=>e.x)),i=Math.max(...t.points.map(e=>e.x)),a=Math.min(...t.points.map(e=>e.y)),o=Math.max(...t.points.map(e=>e.y));e.fillStyle=(n?.fill?Ln(n.fill,e,r,a,i-r,o-a):null)??Un(j[t.band],K?Kn(G.cameraNormal(t.scenePoints)):1),e.fill()}n&&n.lineHidden!==!0&&n.lineColor&&(e.strokeStyle=`#${n.lineColor}`,e.lineWidth=n.lineWidthEmu==null?1:rt(n.lineWidthEmu,r),e.setLineDash([]),e.stroke())}if(t.surfaceWireframe===!0){e.strokeStyle=`#595959`,e.lineWidth=Math.max(1,.75*r),e.setLineDash([]);for(let t=0;t<d;t++){e.beginPath();for(let n=0;n<u;n++){let r=l[t].values[n];if(r==null||!Number.isFinite(r))continue;let i=G.project(re(n),oe(r),ae(t));n===0?e.moveTo(i.x,i.y):e.lineTo(i.x,i.y)}e.stroke()}for(let t=0;t<u;t++){e.beginPath();for(let n=0;n<d;n++){let r=l[n].values[t];if(r==null||!Number.isFinite(r))continue;let i=G.project(re(t),oe(r),ae(n));n===0?e.moveTo(i.x,i.y):e.lineTo(i.x,i.y)}e.stroke()}}e.restore();let me=G.project(q.x,fe,de),ge=G.project(q.x+q.w,fe,de);e.strokeStyle=t.catAxisLineColor?`#${t.catAxisLineColor}`:`#000000`,e.lineWidth=t.catAxisLineWidthEmu==null?1:rt(t.catAxisLineWidthEmu,r),e.setLineDash([]),e.beginPath(),e.moveTo(me.x,me.y),e.lineTo(ge.x,ge.y),e.stroke(),e.font=ur(B,lr(t,t.catAxisFontFace,`minor`)),e.fillStyle=t.catAxisFontColor?`#${t.catAxisFontColor}`:`#000000`,e.textAlign=`center`,e.textBaseline=`top`;for(let t=0;t<u;t++){let n=G.project(re(t),fe,de);e.fillText(c[t]??``,n.x,n.y+8)}if(!V?.hidden){e.strokeStyle=V?.lineColor?`#${V.lineColor}`:`#000000`,e.lineWidth=V?.lineWidthEmu==null?1:rt(V.lineWidthEmu,r);let n=G.project(q.x,fe,.5),i=G.project(q.x+q.w,fe,.5),a=n.x>=i.x?q.x:q.x+q.w,o=G.project(a,fe,de),s=G.project(a,fe,ue);e.beginPath(),e.moveTo(o.x,o.y),e.lineTo(s.x,s.y),e.stroke(),e.font=ur(H,lr(t,V?.fontFace,`minor`),V?.fontBold??!1,V?.fontItalic??!1),e.fillStyle=V?.fontColor?`#${V.fontColor}`:`#000000`,e.textAlign=`left`,e.textBaseline=`middle`;for(let t=0;t<d;t++){let n=G.project(a,fe,ae(t));e.fillText(l[t].name,n.x+8,n.y)}}if(!t.valAxisHidden){let n=G.topology.axisX===`min`?q.x:q.x+q.w,i=G.project(n,q.y+q.h,de),a=G.project(n,q.y,de);if(Math.hypot(a.x-i.x,a.y-i.y)>4){e.strokeStyle=t.valAxisLineColor?`#${t.valAxisLineColor}`:`#000000`,e.lineWidth=t.valAxisLineWidthEmu==null?1:rt(t.valAxisLineWidthEmu,r),e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(a.x,a.y),e.stroke(),e.font=ur(li(t.valAxisFontSizeHpt,s,r),lr(t,t.valAxisFontFace,`minor`)),e.fillStyle=t.valAxisFontColor?`#${t.valAxisFontColor}`:`#000000`;let o=(i.x+a.x)/2<U+W/2;e.textAlign=o?`right`:`left`,e.textBaseline=`middle`;for(let r of A){let i=G.project(n,oe(r),de);e.fillText(yt(r,t.valAxisFormatCode,t.date1904),i.x+(o?-6:6),i.y)}}}Pr(e,P,F,i,a,o,s,U,te,W,ne,ee.bandH+2,r)}function Ri(e,t,n,r){let{x:i,y:a,w:o,h:s}=n,c=Di(t),l=c.length;if(l===0)return;let u=t.series.map((e,t)=>({series:e,chartIndex:t})).filter(({series:e})=>e.seriesType==null||e.seriesType===`area`),d=t.series.map((e,t)=>({series:e,chartIndex:t})).filter(({series:e})=>e.seriesType===`line`);if(u.length===0&&d.length===0)return;let f=t.chartType===`stackedArea`||t.chartType===`stackedAreaPct`,p=t.chartType===`stackedAreaPct`,m=p?c.map((e,t)=>{let n=0;for(let{series:e}of u)n+=Math.abs(e.values[t]??0);return n||1}):null,h=(e,t)=>{let n=u[e].series.values[t]??0;return p&&m?n/m[t]*100:n},g=!f&&t.secondaryValAxis&&t.series.some(e=>e.useSecondaryAxis===!0)?t.secondaryValAxis:null,_=e=>g!=null&&e.useSecondaryAxis===!0,v=wi(e,t,o,s,r),y=v.fontPx,b=v.topPad,x=v.bandH,S=li(t.catAxisFontSizeHpt,s,r),C=li(t.valAxisFontSizeHpt,s,r),w=jr(e,t,o,s,.22,r),{legRightW:T,legLeftW:E,legTopH:D,legBottomH:O}=ye(w),k=Se(t,o,s,r),A=k.catFontPx,j=k.valFontPx,M=k.catBandH,N=k.valBandW,P=x+D+C/2+2,F=we(S)+M+O,I=s-P-F,L=_i(g,t.series,I/r),R=Math.max(8,Math.min(11,s/20)),z=he(g?.fontSizeHpt,r)??R,ee=0;if(g&&L&&!g.hidden){let n=e.font;e.font=`${z}px ${lr(t,g.fontFace,`minor`)}`;let r=0;for(let n of L.majorLines)r=Math.max(r,e.measureText($r(n,g.formatCode??null,t.date1904,g.displayUnits)).width);ee=r+18,e.font=n}let B=g&&g.title?be(g.titleFontSizeHpt,r)+8:0,V=(()=>{let e=1/0,t=-1/0;for(let n=0;n<l;n++){if(f){let r=0,i=0;for(let e=0;e<u.length;e++){let t=h(e,n);t>=0?r+=t:i+=t}e=Math.min(e,i),t=Math.max(t,r)}else for(let{series:r}of u){if(_(r))continue;let i=r.values[n];i!=null&&(e=Math.min(e,i),t=Math.max(t,i))}for(let{series:r}of d){if(_(r))continue;let i=r.values[n];i!=null&&(e=Math.min(e,i),t=Math.max(t,i))}}return!isFinite(e)||!isFinite(t)?{min:0,max:1}:p?{min:e<0?-100:0,max:t>0?100:0}:{min:e,max:t}})();if(!p){let e=e=>{V={min:Math.min(V.min,e),max:Math.max(V.max,e)}};for(let t=0;t<u.length;t++){let{series:n}=u[t];_(n)||gi(n,`y`,e=>{if(n.values[e]==null)return null;if(!f)return n.values[e];let r=0;for(let n=0;n<=t;n++)r+=h(n,e);return r},e)}for(let{series:t}of d)_(t)||gi(t,`y`,e=>t.values[e]??null,e)}let H=ni(t,V.min,V.max,I/r,p),U=t.valAxisFontSizeHpt==null?Math.max(8,Math.min(11,I/20)):C,te=0;if(!t.valAxisHidden&&t.plotAreaManualLayout!=null&&t.plotAreaManualLayout.layoutTarget!==`inner`){let n=e.font;e.font=`${U}px ${lr(t,t.valAxisFontFace,`minor`)}`;for(let n of H.majorLines)te=Math.max(te,e.measureText(Zr(t,n,p)).width);e.font=n}let W=De({valAxisHidden:t.valAxisHidden,catAxisHidden:t.catAxisHidden,valLabelWidth:te,valLabelFontPx:U,catLabelFontPx:S,valLabelGapPx:t.valAxisFontSizeHpt==null?6:Ee(U),catLabelGapPx:t.catAxisFontSizeHpt==null?3:Te(S),outerTextMarginPx:Pe*r,valTitleBandW:N,catTitleBandH:M,secondaryBandW:ee+B}),ne={t:P,r:T+o*.05+ee+B,b:F,l:o*.12+N+E};Ei(e,t,i,a,o,s,a+b,y);let{plotRect:{px0:G,py0:K,pw:q,ph:J}}=ke(t,i,a,o,s,r,{titleBand:v,legendSideReserveFrac:.22,legendReserve:w,pad:ne,honorPlotAreaManualLayout:!0,manualOuterInsets:W});if(q<=0||J<=0)return;t.plotAreaBg&&(e.fillStyle=`#${t.plotAreaBg}`,e.fillRect(G,K,q,J));let Y=ni(t,V.min,V.max,J/r,p),re=ot(t),ie=Jr(t),ae=hi(t,c),oe=ae?e=>G+ae.positions[e]*q:re?e=>G+((ie?l-1-e:e)+.5)/l*q:e=>{let t=ie?l-1-e:e;return G+(l===1?q/2:t/(l-1)*q)},se=e=>K+J-Y.frac(e)*J,ce=L?L.makeToY(K,J):se,le=e=>_(e)?ce:se,{color:ue,width:de}=it(t.catAxisLineColor,t.catAxisLineWidthEmu,r),{color:fe,width:pe}=it(t.valAxisLineColor,t.valAxisLineWidthEmu,r);if(!t.valAxisHidden){let n=zr(t,r),i=Br(t,r);if(t.valAxisMinorGridlines)for(let t of Y.minorLines)Rr(e,G,q,se(t),!1,i);if(Yr(t))for(let t of Y.majorLines)Rr(e,G,q,se(t),t===0,n)}if(g&&L&&vi(e,g,L,ce,G,q,r),!t.catAxisHidden&&Ur(t)){let n=Wr(t,r);e.strokeStyle=n.color,e.lineWidth=n.width;let i=n.dash.length>0&&e.getLineDash?e.getLineDash():[];n.dash.length>0&&e.setLineDash(n.dash);let a=ae?ae.majorTicks.map(e=>e.fraction):Kr(t,l);for(let t of a){let n=G+t*q;e.beginPath(),e.moveTo(n,K),e.lineTo(n,K+J),e.stroke()}n.dash.length>0&&e.setLineDash(i)}let me=f?Array(l).fill(0):null,ge=f?u.map((e,t)=>t):u.map((e,t)=>u.length-1-t);for(let t of ge){let{series:n,chartIndex:i}=u[t],a=ar(i,n),o=K+J,s=le(n),c=n.smooth===!0;if(e.beginPath(),f&&me){let n=[];for(let e=0;e<l;e++)n.push({x:oe(e),y:se(h(t,e)+me[e])});e.moveTo(n[0].x,n[0].y),da(e,n,c);for(let t=l-1;t>=0;t--)e.lineTo(oe(t),se(me[t]));for(let e=0;e<l;e++)me[e]+=h(t,e)}else{let t=[];for(let e=0;e<l;e++)t.push({x:oe(e),y:s(n.values[e]??0)});e.moveTo(oe(0),o),e.lineTo(t[0].x,t[0].y),da(e,t,c),e.lineTo(oe(l-1),o)}e.closePath(),e.fillStyle=a,e.fill(),n.lineHidden!==!0&&(e.strokeStyle=n.lineColor?`#${n.lineColor}`:a,e.lineWidth=n.lineWidthEmu?rt(n.lineWidthEmu,r):1.5,e.setLineDash([]),e.stroke())}{let n=Math.max(2,2.5*r),d=(e,t)=>{if(f){let n=0;for(let r=0;r<=e;r++)n+=h(r,t);return n}return u[e].series.values[t]??0};for(let f=0;f<u.length;f++){let{series:h,chartIndex:v}=u[f],y=or(h.dataPointOverrides),b=ar(v,h),x=le(h),S=e=>d(f,e);for(let t of h.errBars??[])ma(e,h,t,l,oe,x,S,b);if(h.showMarker===!0||pa(h))for(let t=0;t<l;t++){if(h.values[t]==null)continue;let i=y.get(t),a=i?.markerSymbol??h.markerSymbol??`circle`;if(a===`none`)continue;let o=oe(t),s=x(S(t));if(pa(h)){let t=i?.markerSize??h.markerSize??5,n=i?.markerFill??i?.color??h.markerFill??b,c=i?.markerLine??h.markerLine??null,l=i?.markerLineWidthEmu??h.markerLineWidthEmu;ia(e,o,s,a,t,n,c,r,l==null?void 0:rt(l,r))}else e.fillStyle=b,e.beginPath(),e.arc(o,s,n,0,Math.PI*2),e.fill()}ga(e,h,c,l,oe,x,S,J,r,t.date1904??!1,!0,lr(t,t.dataLabelFontFace,`minor`),t.dataLabelPosition??`ctr`,{x:G,y:K,w:q,h:J},{x:i,y:a,w:o,h:s},p&&m?e=>(h.values[e]??0)/m[e]:void 0,void 0,e=>lr(t,e,`minor`),_(h)?g?.displayUnits:t.valAxisDisplayUnits)}}for(let{series:u,chartIndex:f}of d){let d=or(u.dataPointOverrides),p=ar(f,u),m=u.lineColor?`#${u.lineColor}`:p,h=le(u);if(u.lineHidden!==!0){e.strokeStyle=m,e.lineWidth=u.lineWidthEmu?rt(u.lineWidthEmu,r):Math.max(1,2.25*r),e.setLineDash([]),e.beginPath();let n=[],i=()=>{n.length!==0&&(e.moveTo(n[0].x,n[0].y),da(e,n,u.smooth===!0),n=[])};for(let e=0;e<l;e++){let r=u.values[e];r==null&&((t.dispBlanksAs??`gap`)===`gap`&&i(),(t.dispBlanksAs??`gap`)!==`zero`)||n.push({x:oe(e),y:h(r??0)})}i(),e.stroke()}let v=e=>u.values[e]??0;for(let t of u.errBars??[])ma(e,u,t,l,oe,h,v,m);if(u.showMarker===!0||pa(u))for(let t=0;t<l;t++){let n=u.values[t];if(n==null)continue;let i=d.get(t),a=i?.markerSymbol??u.markerSymbol??`circle`;a!==`none`&&ia(e,oe(t),h(n),a,i?.markerSize??u.markerSize??5,i?.markerFill??i?.color??u.markerFill??m,i?.markerLine??u.markerLine??null,r,(i?.markerLineWidthEmu??u.markerLineWidthEmu)==null?void 0:rt(i?.markerLineWidthEmu??u.markerLineWidthEmu,r))}ga(e,u,c,l,oe,h,v,J,r,t.date1904??!1,!1,lr(t,t.dataLabelFontFace,`minor`),t.dataLabelPosition??`r`,{x:G,y:K,w:q,h:J},{x:i,y:a,w:o,h:s},void 0,void 0,e=>lr(t,e,`minor`),_(u)?g?.displayUnits:t.valAxisDisplayUnits),oi(e,u,m,oe,h,r,void 0,{chart:t,chartRect:n,plotRect:{x:G,y:K,w:q,h:J}})}if(!t.valAxisHidden){let n=t.valAxisFontSizeHpt==null?Math.max(8,Math.min(11,J/20)):C;e.font=`${n}px ${lr(t,t.valAxisFontFace,`minor`)}`,e.textBaseline=`middle`;for(let i of Y.majorLines){let a=se(i);Fr(e,t.valAxisMajorTickMark,`val`,G,a,fe,pe,!1,t.valAxisLineHidden,`major`,r),e.fillStyle=t.valAxisFontColor?`#${t.valAxisFontColor}`:`#555`,e.textAlign=`right`;let o=t.valAxisFontSizeHpt==null?6:Ee(n);e.fillText(Zr(t,i,p),G-o,a)}if(t.valAxisMinorTickMark&&t.valAxisMinorTickMark!==`none`)for(let n of Y.minorTicks)Fr(e,t.valAxisMinorTickMark,`val`,G,se(n),fe,pe,!1,t.valAxisLineHidden,`minor`,r)}if(!t.catAxisHidden&&!t.catAxisLineHidden&&(e.strokeStyle=ue,e.lineWidth=de,e.beginPath(),e.moveTo(G,K+J),e.lineTo(G+q,K+J),e.stroke()),!t.valAxisHidden&&!t.valAxisLineHidden&&t.valAxisLineColor!=null&&(e.strokeStyle=fe,e.lineWidth=pe,e.beginPath(),e.moveTo(G,K),e.lineTo(G,K+J),e.stroke()),!t.catAxisHidden&&t.catAxisMajorTickMark&&t.catAxisMajorTickMark!==`none`){let n=Math.max(1,Math.floor(t.catAxisTickMarkSkip??1));if(ae)for(let n of ae.majorTicks)Fr(e,t.catAxisMajorTickMark,`cat`,K+J,G+n.fraction*q,ue,de,!1,t.catAxisLineHidden,`major`,r);else if(re)for(let i=0;i<=l;i+=n)Fr(e,t.catAxisMajorTickMark,`cat`,K+J,G+i/l*q,ue,de,!1,t.catAxisLineHidden,`major`,r);else for(let i=0;i<l;i+=n)Fr(e,t.catAxisMajorTickMark,`cat`,K+J,oe(i),ue,de,!1,t.catAxisLineHidden,`major`,r)}if(!t.catAxisHidden&&t.catAxisMinorTickMark&&t.catAxisMinorTickMark!==`none`&&ae)for(let n of ae.minorTicks)Fr(e,t.catAxisMinorTickMark,`cat`,K+J,G+n.fraction*q,ue,de,!1,t.catAxisLineHidden,`minor`,r);if(!t.catAxisHidden){let n=t.catAxisFontSizeHpt==null?Math.max(8,Math.min(11,q/l*.8)):S;e.fillStyle=t.catAxisFontColor?`#${t.catAxisFontColor}`:`#555`,e.textAlign=`center`,e.textBaseline=`top`,e.font=`${n}px ${lr(t,t.catAxisFontFace,`minor`)}`;let r=Math.max(1,Math.floor(t.catAxisTickLabelSkip??1)),i=ae?ae.majorTicks.map(e=>({label:bt(String(e.serial),t.catAxisFormatCode,t.date1904),x:G+e.fraction*q})):Array.from({length:Math.ceil(l/r)},(e,n)=>{let i=n*r;return{label:bt((c[i]??``).toString(),t.catAxisFormatCode,t.date1904),x:oe(i)}});for(let r of i){let i=r.label;if(!i)continue;let a=t.catAxisFontSizeHpt==null?3:Te(n);e.fillText(i,r.x,K+J+a)}}if(g&&L){let i=t.valAxisFontColor?`#${t.valAxisFontColor}`:`#555`;yi(e,t,g,L,ce,n,G,K,q,J,r,z,ee,i,t.date1904)}Pr(e,t,w,i,a,o,s,G,K,q,J,x+2,r),gr(e,t,i,a,o,s,G,K,q,J,E,O,A,j)}const zi=.88;function Bi(e,t){let n=e.ofPie,r=t.map((e,t)=>({value:e,sourceIndex:t})).filter(e=>Number.isFinite(e.value)&&e.value>0),i=new Set;if(r.length<2)return i;let a=n?.splitType??`auto`,o=n?.splitPos;if(a===`cust`)for(let e of n?.customSplitIndices??[])r.some(t=>t.sourceIndex===e)&&i.add(e);else if(a===`val`&&o!=null&&Number.isFinite(o))for(let e of r)e.value<=o&&i.add(e.sourceIndex);else if(a===`percent`&&o!=null&&Number.isFinite(o)){let e=r.reduce((e,t)=>e+t.value,0);for(let t of r)e>0&&t.value/e*100<=o&&i.add(t.sourceIndex)}else{let e=a===`pos`&&o!=null&&Number.isFinite(o)?Math.max(0,Math.floor(o)):3;for(let t of r.slice(-e))i.add(t.sourceIndex)}return i.size>=r.length&&i.delete(r[0].sourceIndex),i}function Vi(e,t,n,r){let i=t.series[0];if(!i)return;let a=i.values.map(e=>e==null?0:Math.abs(e)),o=Bi(t,a);if(o.size===0){Hi(e,{...t,chartType:`pie`},n,!1,r);return}let s=[],c=[];for(let e=0;e<a.length;e++){let t=a[e];!(t>0)||!Number.isFinite(t)||(o.has(e)?c:s).push({sourceIndex:e,value:t})}if(s.length===0||c.length===0)return;let l={...t,chartType:`pie`},u=jr(e,l,n.w,n.h,.28,r),d=ke(t,n.x,n.y,n.w,n.h,r,{titleTopPadFrac:.035,titleBottomPadFrac:.035,legendSideReserveFrac:.28,legendReserve:u,radialGapFrac:.02,honorPlotAreaManualLayout:!0});Ei(e,t,n.x,n.y,n.w,n.h,n.y+d.title.topPad,d.title.fontPx);let{px0:f,py0:p,pw:m,ph:h}=d.plotRect;if(!(m>0)||!(h>0))return;let g=t.ofPie,_=Math.max(.05,Math.min(2,(g?.secondPieSizePercent??75)/100)),v=Math.max(0,g?.gapWidthPercent??150)/100,y=Math.min(h*.44,m*.9/(2+2*_+v)),b=y*_;if(!(y>0)||!(b>0))return;let x=f+(m-(2*y+v*y+2*b))/2,S=x+y,C=x+2*y+v*y+b,w=p+h/2,T=c.reduce((e,t)=>e+t.value,0),E=[...s,{sourceIndex:c[0].sourceIndex,value:T}],D=(n,r,a)=>{let o=n.reduce((e,t)=>e+t.value,0),s=-Math.PI/2,c=s,l=s;for(let u=0;u<n.length;u++){let d=n[u],f=o>0?d.value/o*Math.PI*2:0;e.beginPath(),e.moveTo(r,w),e.arc(r,w,a,s,s+f),e.closePath(),e.fillStyle=sr(d.sourceIndex,i,t.varyColors!==!1),e.fill(),e.strokeStyle=`#fff`,e.lineWidth=1,e.stroke(),u===n.length-1&&(c=s,l=s+f),s+=f}return{aggregateStart:c,aggregateEnd:l}},O=D(E,S,y),k=w-b,A=w+b;if((g?.type??`pie`)===`bar`){let n=w-b,r=b;for(let a of c){let o=T>0?2*b*a.value/T:0;e.fillStyle=sr(a.sourceIndex,i,t.varyColors!==!1),e.fillRect(C-r/2,n,r,o),e.strokeStyle=`#fff`,e.lineWidth=1,e.strokeRect(C-r/2,n,r,o),n+=o}k=w-b,A=w+b}else D(c,C,b);if(g?.seriesLines??!0){e.strokeStyle=`#808080`,e.lineWidth=Math.max(1,.75*r),e.setLineDash([]);let t={x:S+Math.cos(O.aggregateStart)*y,y:w+Math.sin(O.aggregateStart)*y},n={x:S+Math.cos(O.aggregateEnd)*y,y:w+Math.sin(O.aggregateEnd)*y};e.beginPath(),e.moveTo(t.x,t.y),e.lineTo(C-b,k),e.stroke(),e.beginPath(),e.moveTo(n.x,n.y),e.lineTo(C-b,A),e.stroke()}u&&Pr(e,l,u,n.x,n.y,n.w,n.h,f,p,m,h,d.title.bandH+2,r)}function Hi(e,t,n,r,i){let{x:a,y:o,w:s,h:c}=n,l=t.series[0];if(!l)return;let u=l.categories&&l.categories.length>0?l.categories:t.categories,d=l.values.map(e=>Math.abs(e??0)),f=d.reduce((e,t)=>e+t,0);if(f===0)return;let p={...t,series:[{...l,categories:u}]},m=jr(e,p,s,c,.28,i),h=ke(t,a,o,s,c,i,{titleTopPadFrac:.035,titleBottomPadFrac:.035,legendSideReserveFrac:.28,legendReserve:m,radialGapFrac:.02,honorPlotAreaManualLayout:!0}),g=h.title.fontPx,_=h.title.bandH;Ei(e,t,a,o,s,c,o+h.title.topPad,g);let{px0:v,py0:y,pw:b,ph:x}=h.plotRect,S=h.center.cx,C=h.center.cy,w=Math.min(b,x)*.42,T=-Math.PI/2+(t.firstSliceAngle??0)*Math.PI/180,E=r?Math.max(1,Math.min(90,t.holeSize??50)):0,D=r?t.series:[l],O=new Map(D.map(e=>[e,or(e.dataPointOverrides)])),k=(w-E/100*w)/D.length,A=(e,t)=>{let n=O.get(e)?.get(t)?.explosion??0;return n>0?n/100*w:0},j=l.seriesDataLabels??{showVal:!1,showCatName:!1,showSerName:!1,showPercent:!1},M=l.seriesDataLabels!=null||(l.dataLabelOverrides?.length??0)>0,N=t.showDataLabels&&!M,P=lr(t,j.fontFace??t.dataLabelFontFace,`minor`);for(let n=0;n<D.length;n++){let a=D[n],o=a.values.map(e=>Math.abs(e??0)),s=o.reduce((e,t)=>e+t,0);if(s===0)continue;let c=w-n*k,l=c-k,u=T;for(let d=0;d<o.length;d++){let f=o[d]/s*Math.PI*2,p=sr(d,a,t.varyColors!==!1),m=u+f/2,h=A(a,d),g=h>0?Math.cos(m)*h:0,_=h>0?Math.sin(m)*h:0;e.beginPath(),l>.01?(e.arc(S+g,C+_,c,u,u+f),e.arc(S+g,C+_,l,u+f,u,!0)):(e.moveTo(S+g,C+_),e.arc(S+g,C+_,c,u,u+f)),e.closePath(),e.fillStyle=p,e.fill();let v=O.get(a)?.get(d),y=v?.lineHidden??a.lineHidden,b=v?.lineColor??a.lineColor;if(y!==!0&&b){let t=v?.lineWidthEmu??a.lineWidthEmu,n=t==null?Math.max(.5,i*.75):rt(t,i);e.save(),e.strokeStyle=`#${b}`,e.lineWidth=n,e.setLineDash(fa(v?.lineDash??a.chartexStyle?.lineDash??void 0,n)),e.lineCap=a.chartexStyle?.lineCap===`rnd`?`round`:a.chartexStyle?.lineCap===`sq`?`square`:`butt`,e.lineJoin=a.chartexStyle?.lineJoin===`round`||a.chartexStyle?.lineJoin===`bevel`?a.chartexStyle.lineJoin:`miter`,e.stroke(),e.restore()}if(N&&n===0&&f>.15){let t=w*(r?.75:.6),n=S+g+Math.cos(m)*t,i=C+_+Math.sin(m)*t,a=Math.round(o[d]/s*100);e.font=`bold ${Math.max(8,w*.1)}px ${P}`,e.fillStyle=`#fff`,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(`${a}%`,n,i)}u+=f}}M&&Ui(e,t,j,l,u,d,f,S,C,w,r?w-k:0,T,P,i,v,y,b,x,a,o,s,c),m&&Pr(e,p,m,a,o,s,c,v,y,b,x,_+2,i)}function Ui(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=or(r.dataLabelOverrides??[]),C=new Set;for(let e=0;e<a.length;e++)(S.get(e)?.labelBox||n.labelBox)&&C.add(e);C.size>0&&Ji(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,g,h,_,v,y,b,x,C,S);let w=[],T=d;for(let d=0;d<a.length;d++){let E=a[d]/o*Math.PI*2,D=T+E/2;if(T+=E,C.has(d))continue;let O=S.get(d);if(O?.deleted)continue;let k=O?.showCatName??n.showCatName,A=O?.showSerName??n.showSerName,j=O?.showVal??n.showVal,M=O?.showPercent??n.showPercent,N=an({customText:O?.text,showCategory:k,showSeries:A,showValue:j,showPercent:M,category:(i[d]??``).toString(),seriesName:r.name,sourceValue:a[d],percentRatio:a[d]/o,formatCode:O?.formatCode??n.formatCode??r.valFormatCode??null,percentFormatCode:O?.formatCode??n.formatCode??`0%`,date1904:t.date1904??!1,separator:O?.separator??n.separator});if(!N)continue;let P=(O?.position??n.position??`bestFit`)===`outEnd`,F=he(O?.fontSizeHpt??n.fontSizeHpt,p)??Math.max(8,l*.1),I=O?.fontBold??n.fontBold,L=O?.fontColor??n.fontColor,R=O?.fontFace??n.fontFace?lr(t,O?.fontFace??n.fontFace,`minor`):f,z=ca(t,O,p,R,I??!1),ee=u>.01?(u+l)/2:l*zi;if(O?.manualLayout){e.font=`${I?`bold `:``}${F}px ${R}`,la(e,N,{kind:`point`,x:s+Math.cos(D)*ee,y:c+Math.sin(D)*ee,position:`ctr`},{x:m,y:h,w:g,h:_},F,L?`#${L}`:`#fff`,O.manualLayout,{x:v,y,w:b,h:x},z);continue}if(P){e.font=`${I?`bold `:``}${F}px ${R}`;let t=z?Qt(e,z,F,L?`#${L}`:`#333`):null,n=F*1.15,r=t?[]:hn(N,Math.max(0,b-F),Math.max(0,x-F),n,t=>e.measureText(t).width);if(z&&!t||!t&&r.length===0)continue;let i=t?.width??r.reduce((t,n)=>Math.max(t,e.measureText(n).width),0),a=t?.height??F+Math.max(0,r.length-1)*n;w.push(Ki(r,D,s,c,l,Math.min(i,Math.max(0,b-F)),Math.min(a,Math.max(0,x-F)),n,F,I??!1,L?`#${L}`:`#333`,R,t??void 0));continue}let B=ee,V=s+Math.cos(D)*B,H=c+Math.sin(D)*B;e.font=`${I?`bold `:``}${F}px ${R}`;let U=2*B*Math.sin(Math.min(Math.PI,Math.abs(E))/2)-F,te=u>.01?l-u-F:l-F;if(!(U>0)||!(te>0))continue;let W=Oi({x:V-U/2,y:H-te/2,w:U,h:te},{x:m,y:h,w:g,h:_});W&&la(e,N,{kind:`point`,x:V,y:H,position:`ctr`},W,F,L?`#${L}`:`#fff`,void 0,{x:v,y,w:b,h:x},z)}qi(e,n,w,s,c,l,p,v,y,b,x)}function Wi(e,t,n,r,i,a){let o=Math.max(Math.abs(n-e)-i,0),s=Math.max(Math.abs(r-t)-a,0);return Math.hypot(o,s)}function Gi(e,t,n,r,i){let a=Math.cos(e),o=Math.sin(e),s=t+i,c=0,l=s+Math.hypot(n,r);for(let e=0;e<32;e++){let e=(c+l)/2;Wi(0,0,a*e,o*e,n,r)>=s?l=e:c=e}return l}function Ki(e,t,n,r,i,a,o,s,c,l,u,d,f){let p=c*.5,m=Gi(t,i,a/2,o/2,p),h=n+Math.cos(t)*m,g=r+Math.sin(t)*m;return{lines:e,rich:f,rimX:n+Math.cos(t)*i,rimY:r+Math.sin(t)*i,boxW:a,boxH:o,lineHeight:s,fontPx:c,bold:l,fontColor:u,font:d,cxBox:h,cyBox:g,initialCx:h,initialCy:g,leftSide:Math.cos(t)<0}}function qi(e,t,n,r,i,a,o,s,c,l,u){if(n.length===0)return;let d=c,f=c+u,p=e=>{e.sort((e,t)=>e.cyBox-t.cyBox);for(let t=1;t<e.length;t++){let n=e[t-1],r=e[t],i=n.cyBox+(n.boxH+r.boxH)/2;r.cyBox<i&&(r.cyBox=i)}if(e.length===0)return;let t=e[e.length-1].cyBox+e[e.length-1].boxH/2-f;if(t>0)for(let n of e)n.cyBox-=t;let n=d-(e[0].cyBox-e[0].boxH/2);if(n>0)for(let t of e)t.cyBox+=n};p(n.filter(e=>!e.leftSide)),p(n.filter(e=>e.leftSide));for(let e of n){let t=a+e.fontPx*.5,n=e.boxW/2,o=e.boxH/2,c=Math.max(Math.abs(e.cyBox-i)-o,0);if(c<t){let i=Math.sqrt(Math.max(0,t*t-c*c));e.cxBox=e.leftSide?Math.min(e.cxBox,r-i-n):Math.max(e.cxBox,r+i+n)}let u=ua(e.cxBox,s+n,s+l-n);Wi(r,i,u,e.cyBox,n,o)>=t&&(e.cxBox=u)}e.save(),e.beginPath(),e.rect(s,c,l,u),e.clip();let m=t.leaderLineColor?`#${t.leaderLineColor}`:`#a6a6a6`,h=t.leaderLineWidthEmu?Math.max(.5,t.leaderLineWidthEmu/et*o):1;for(let r of n){let n=Math.abs(r.cxBox-r.initialCx)>.5||Math.abs(r.cyBox-r.initialCy)>.5;if(!t.showLeaderLines||!n)continue;let i=ua(r.rimX,r.cxBox-r.boxW/2,r.cxBox+r.boxW/2),a=ua(r.rimY,r.cyBox-r.boxH/2,r.cyBox+r.boxH/2);e.beginPath(),e.moveTo(r.rimX,r.rimY),e.lineTo(i,a),e.strokeStyle=m,e.lineWidth=h,e.stroke()}for(let t of n){if(t.rich){$t(e,t.rich,t.cxBox,t.cyBox);continue}e.font=`${t.bold?`bold `:``}${t.fontPx}px ${t.font}`,e.fillStyle=t.fontColor,e.textAlign=`center`,e.textBaseline=`middle`;let n=t.cyBox-(t.lines.length-1)*t.lineHeight/2;for(let r=0;r<t.lines.length;r++)e.fillText(t.lines[r],t.cxBox,n+r*t.lineHeight)}e.restore()}function Ji(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C){let w=e=>C.get(e),T=he(n.fontSizeHpt,p)??Math.max(9,l*.09),E=n.labelBox,D=[],O=d;for(let d=0;d<a.length;d++){let C=a[d]/o*Math.PI*2,k=O+C/2;if(O+=C,C<=0||!S.has(d))continue;let A=w(d);if(A?.deleted)continue;let j=A?.showCatName??n.showCatName,M=A?.showSerName??n.showSerName,N=A?.showVal??n.showVal,P=A?.showPercent??n.showPercent,F=he(A?.fontSizeHpt,p)??T,I=A?.fontBold??n.fontBold??!1,L=A?.fontFace??n.fontFace?lr(t,A?.fontFace??n.fontFace,`minor`):f,R=A?.fontColor?`#${A.fontColor}`:n.fontColor?`#${n.fontColor}`:`#000`,z=A?.labelBox??E,ee=z?.fill?`#${z.fill}`:null,B=z?.borderColor?`#${z.borderColor}`:null,V=z?.borderWidthEmu?Math.max(.75,z.borderWidthEmu/et*p):1,H=A?.position??n.position??`bestFit`,U=an({customText:A?.text,showCategory:j,showSeries:M,showValue:N,showPercent:P,category:(i[d]??``).toString(),seriesName:r.name,sourceValue:a[d],percentRatio:a[d]/o,formatCode:A?.formatCode??n.formatCode??r.valFormatCode??null,percentFormatCode:A?.formatCode??n.formatCode??`0%`,date1904:t.date1904??!1,separator:A?.separator??n.separator,defaultSeparator:`
|
|
6
|
-
`});if(!U)continue;let te=ca(t,A,p,L,I),W=Math.max(4,F*.45),ne=Math.max(2,F*.28),G=F*.22,K=F+G;e.font=`${I?`bold `:``}${F}px ${L}`;let q=te?Qt(e,te,F,R):null;if(te&&!q)continue;let J=q?[]:hn(U,Math.max(0,h-W*2),Math.max(0,_-ne*2),K,t=>e.measureText(t).width);if(!q&&J.length===0)continue;let Y=q?.width??0;if(!q)for(let t of J)Y=Math.max(Y,e.measureText(t).width);let re=Math.min(Y+W*2,h),ie=q?.height??J.length*K-G;ie=Math.min(ie+ne*2,_);let ae=s+Math.cos(k)*l,oe=c+Math.sin(k)*l,se=Math.cos(k)<0,ce=Math.max(re,ie)*.55+l*.06,le=ae+Math.cos(k)*ce,ue=oe+Math.sin(k)*ce,de,fe=!1;if(A?.manualLayout){let t=fn({kind:`point`,x:le,y:ue,position:`ctr`},{x:m,y:g,w:h,h:_},{w:re,h:ie},F,A.manualLayout,{x:v,y,w:b,h:x});if(!t||(re=t.rect.w,ie=t.rect.h,!q&&(J=hn(U,Math.max(0,re-W*2),Math.max(0,ie-ne*2),K,t=>e.measureText(t).width),J.length===0)))continue;le=t.rect.x+t.rect.w/2,ue=t.rect.y+t.rect.h/2,se=le<s,de=t.clip}else if(H!==`bestFit`&&H!==`outEnd`){let t=u>.01?(u+l)/2:l*zi,n=s+Math.cos(k)*t,r=c+Math.sin(k)*t,i=2*t*Math.sin(Math.min(Math.PI,Math.abs(C))/2)-F,a=u>.01?l-u-F:l-F,o=Oi({x:n-i/2,y:r-a/2,w:i,h:a},{x:m,y:g,w:h,h:_});if(!o)continue;if(q)re=Math.min(re,o.w),ie=Math.min(ie,o.h);else{if(J=hn(U,Math.max(0,o.w-W*2),Math.max(0,o.h-ne*2),K,t=>e.measureText(t).width),J.length===0)continue;Y=J.reduce((t,n)=>Math.max(t,e.measureText(n).width),0),re=Y+W*2,ie=J.length*K-G+ne*2}let d=fn({kind:`point`,x:n,y:r,position:H===`inBase`||H===`inEnd`?`ctr`:H},o,{w:re,h:ie},F);if(!d)continue;le=d.textAlign===`left`?d.x+re/2:d.textAlign===`right`?d.x-re/2:d.x,ue=d.textBaseline===`top`?d.y+ie/2:d.textBaseline===`bottom`?d.y-ie/2:d.y,se=le<s,de=d.clip,fe=!0}D.push({lines:J,rich:q??void 0,lineHeight:K,midAngle:k,rimX:ae,rimY:oe,boxW:re,boxH:ie,cxBox:le,cyBox:ue,leftSide:se,fontColor:R,boxFill:ee,boxBorder:B,boxBorderPx:V,fontPx:F,bold:I,font:L,inside:fe,manualClip:de})}let k=g+2,A=g+_-2,j=A-k,M=e=>{if(e.length===0)return;e.sort((e,t)=>e.cyBox-t.cyBox);let t=0;for(let n of e)t+=n.boxH;if(t+=(e.length-1)*3,t>j){let t=e.reduce((e,t)=>e+t.boxH,0),n=e.length;if(n===1){e[0].cyBox=Math.min(Math.max(e[0].cyBox,k+e[0].boxH/2),A-e[0].boxH/2);return}let r=(j-t)/(n-1),i=k;for(let t of e)t.cyBox=i+t.boxH/2,i+=t.boxH+r;return}for(let t=1;t<e.length;t++){let n=e[t-1],r=e[t],i=(n.boxH+r.boxH)/2+3;r.cyBox-n.cyBox<i&&(r.cyBox=n.cyBox+i)}let n=e[e.length-1].cyBox+e[e.length-1].boxH/2-A;if(n>0)for(let t of e)t.cyBox-=n;let r=k-(e[0].cyBox-e[0].boxH/2);if(r>0)for(let t of e)t.cyBox+=r};M(D.filter(e=>!e.manualClip&&!e.leftSide)),M(D.filter(e=>!e.manualClip&&e.leftSide));for(let e of D)e.manualClip||(e.cyBox=Math.max(k+e.boxH/2,e.cyBox),e.cyBox=Math.min(A-e.boxH/2,e.cyBox));let N=m+2,P=m+h-2;for(let e of D){if(e.manualClip)continue;let t=e.boxW/2;e.cxBox-t<N&&(e.cxBox=N+t),e.cxBox+t>P&&(e.cxBox=P-t)}e.save(),e.beginPath(),e.rect(m,g,h,_),e.clip();let F=n.leaderLineColor?`#${n.leaderLineColor}`:`#a6a6a6`,I=n.leaderLineWidthEmu?Math.max(.5,n.leaderLineWidthEmu/et*p):1;for(let t of D){let r=t.cxBox+(t.leftSide?t.boxW/2:-t.boxW/2),i=t.cyBox,a=r-t.rimX,o=i-t.rimY,s=Math.hypot(a,o);!t.inside&&n.showLeaderLines&&s>t.fontPx*.9&&(e.beginPath(),e.moveTo(t.rimX,t.rimY),e.lineTo(r,i),e.strokeStyle=F,e.lineWidth=I,e.stroke())}for(let t of D){t.manualClip&&(e.save(),e.beginPath(),e.rect(t.manualClip.x,t.manualClip.y,t.manualClip.w,t.manualClip.h),e.clip());let n=t.cxBox-t.boxW/2,r=t.cyBox-t.boxH/2;if(t.boxFill&&(e.fillStyle=t.boxFill,e.fillRect(n,r,t.boxW,t.boxH)),t.boxBorder&&(e.strokeStyle=t.boxBorder,e.lineWidth=t.boxBorderPx,e.strokeRect(n,r,t.boxW,t.boxH)),t.rich){e.save(),e.beginPath(),e.rect(n,r,t.boxW,t.boxH),e.clip(),$t(e,t.rich,t.cxBox,t.cyBox),e.restore(),t.manualClip&&e.restore();continue}e.font=`${t.bold?`bold `:``}${t.fontPx}px ${t.font}`,e.fillStyle=t.fontColor,e.textAlign=`center`,e.textBaseline=`middle`;let i=t.lineHeight-t.fontPx,a=t.cyBox-(t.lines.length*t.lineHeight-i)/2+t.fontPx/2;for(let n=0;n<t.lines.length;n++)e.fillText(t.lines[n],t.cxBox,a+n*t.lineHeight);t.manualClip&&e.restore()}e.restore()}function Yi(e,t,n,r){let{x:i,y:a,w:o,h:s}=n,c=Di(t),l=c.length;if(l<3)return;let u=jr(e,t,o,s,.22,r),d=ke(t,i,a,o,s,r,{titleTopPadFrac:.035,titleBottomPadFrac:.035,legendSideReserveFrac:.22,legendReserve:u,radialGapFrac:.02}),f=d.title.fontPx;Ei(e,t,i,a,o,s,a+d.title.topPad,f);let{px0:p,py0:m,pw:h,ph:g}=d.plotRect,_=d.center.cx,v=d.center.cy,y=Math.min(h,g)*.38,b=1/0,x=-1/0;for(let e of t.series)for(let t of e.values)t!=null&&(b=Math.min(b,t),x=Math.max(x,t));isFinite(b)||(b=0,x=1),x===0&&(x=1);let S=t.valAxisMinorTickMark!=null&&t.valAxisMinorTickMark!==`none`,C=t.valAxisLogBase!=null&&Number.isFinite(t.valAxisLogBase)&&t.valAxisLogBase>=2,w=t.valAxisMajorUnit??(C?null:ze(t.valMin??b,t.valMax??x,y/r)),T=Xe({dataMin:b,dataMax:x,explicitMin:t.valMin,explicitMax:t.valMax,axisLenPt:y/r,axisOrientation:`vertical`,majorUnit:w,minorUnit:t.valAxisMinorUnit,needMinor:t.valAxisMinorGridlines===!0||S,logBase:t.valAxisLogBase,reversed:qr(t)}),E=e=>ua(T.fraction(e),0,1),D=-Math.PI/2,O=e=>D+e/l*Math.PI*2,k=T.majorTicks.filter(e=>E(e)>0),A=t=>{let n=E(t)*y;e.beginPath();for(let t=0;t<l;t++){let r=O(t),i=_+Math.cos(r)*n,a=v+Math.sin(r)*n;t===0?e.moveTo(i,a):e.lineTo(i,a)}e.closePath(),e.stroke()};if(t.valAxisMinorGridlines){let n=Br(t,r);e.strokeStyle=n.color,e.lineWidth=n.width;let i=n.dash.length>0&&e.getLineDash?e.getLineDash():[];n.dash.length>0&&e.setLineDash(n.dash);for(let e of T.minorTicks)A(e);n.dash.length>0&&e.setLineDash(i)}if(!t.valAxisHidden&&Yr(t)){let n=zr(t,r);e.strokeStyle=n.color,e.lineWidth=n.width;let i=n.dash.length>0&&e.getLineDash?e.getLineDash():[];n.dash.length>0&&e.setLineDash(n.dash);for(let e of k)A(e);n.dash.length>0&&e.setLineDash(i)}e.strokeStyle=`#bbb`,e.lineWidth=.5;for(let t=0;t<l;t++){let n=O(t);e.beginPath(),e.moveTo(_,v),e.lineTo(_+Math.cos(n)*y,v+Math.sin(n)*y),e.stroke()}if(!t.valAxisHidden){let n=li(t.valAxisFontSizeHpt,s,r);e.font=`${t.valAxisFontItalic?`italic `:``}${t.valAxisFontBold?`bold `:``}${n}px ${lr(t,t.valAxisFontFace,`minor`)}`,e.fillStyle=t.valAxisFontColor?`#${t.valAxisFontColor}`:`#555`,e.textAlign=`right`,e.textBaseline=`middle`;for(let n of k){let i=v-E(n)*y,a=it(t.valAxisLineColor,t.valAxisLineWidthEmu,r);Fr(e,t.valAxisMajorTickMark,`val`,_,i,a.color,a.width,!1,t.valAxisLineHidden,`major`,r),t.valAxisTickLabelPos!==`none`&&e.fillText(Zr(t,n,!1),_-3,i)}if(S){let n=it(t.valAxisLineColor,t.valAxisLineWidthEmu,r);for(let i of T.minorTicks)Fr(e,t.valAxisMinorTickMark,`val`,_,v-E(i)*y,n.color,n.width,!1,t.valAxisLineHidden,`minor`,r)}}let j=t.catAxisFontSizeHpt==null?Math.max(8,Math.min(11,y*.2)):li(t.catAxisFontSizeHpt,s,r);e.font=`${t.catAxisFontItalic?`italic `:``}${t.catAxisFontBold?`bold `:``}${j}px ${lr(t,t.catAxisFontFace,`minor`)}`,e.fillStyle=t.catAxisFontColor?`#${t.catAxisFontColor}`:`#444`,e.textBaseline=`middle`;let M=_-h/2,N=_+h/2;if(!t.catAxisHidden&&fi(t))for(let n=0;n<l;n++){let r=O(n),i=_+Math.cos(r)*(y+12),a=v+Math.sin(r)*(y+12),o=Math.cos(r)<-.1?`right`:Math.cos(r)>.1?`left`:`center`;e.textAlign=o;let s=o===`right`?i-M:o===`left`?N-i:2*Math.min(N-i,i-M),l=bt((c[n]??``).toString(),t.catAxisFormatCode,t.date1904);e.fillText(Ot(e,l,s),i,a)}let P=t.radarStyle===`filled`,F=Math.max(2,y*.025);for(let n=0;n<t.series.length;n++){let i=t.series[n],a=ar(n,i),o=[];for(let e=0;e<l;e++){let t=i.values[e];if(t==null){o.push(null);continue}let n=E(t),r=O(e);o.push([_+Math.cos(r)*y*n,v+Math.sin(r)*y*n])}e.beginPath();let s=!1;for(let t of o){if(t==null){s=!1;continue}s?e.lineTo(t[0],t[1]):(e.moveTo(t[0],t[1]),s=!0)}let c=o.every(e=>e!=null);if(P&&c?(e.closePath(),e.fillStyle=Pn(a,.25),e.fill()):c&&e.closePath(),i.lineHidden!==!0){let t=e.getLineDash?e.getLineDash():[],n=e.lineCap,o=e.lineJoin;e.strokeStyle=i.lineColor?`#${i.lineColor}`:a,e.lineWidth=i.lineWidthEmu==null?2:rt(i.lineWidthEmu,r),e.setLineDash(fa(i.chartexStyle?.lineDash??void 0,e.lineWidth)),e.lineCap=i.chartexStyle?.lineCap===`rnd`?`round`:i.chartexStyle?.lineCap===`sq`?`square`:`butt`,e.lineJoin=i.chartexStyle?.lineJoin===`round`||i.chartexStyle?.lineJoin===`bevel`?i.chartexStyle.lineJoin:`miter`,e.stroke(),e.setLineDash(t),e.lineCap=n,e.lineJoin=o}if(!P&&i.showMarker!==!1&&i.markerSymbol!==`none`){let t=or(i.dataPointOverrides);for(let n=0;n<o.length;n++){let s=o[n];if(s==null)continue;let c=t.get(n),l=c?.markerSymbol??i.markerSymbol??`circle`;if(l===`none`)continue;let u=c?.markerSize??i.markerSize??Math.max(4,F*2/r),d=c?.markerFill??i.markerFill??a,f=c?.markerLine??i.markerLine??null,p=c?.markerLineWidthEmu??i.markerLineWidthEmu;ia(e,s[0],s[1],l,u,d,f,r,p==null?1:rt(p,r))}}}Pr(e,t,u,i,a,o,s,p,m,h,g,d.title.bandH+2,r)}function Xi(e,t,n){if(n)return t;let r=e[t];if(r==null)return null;let i=parseFloat(r);return Number.isNaN(i)?null:i}function Zi(e,t){return e.bubbleSizeRepresents===`w`?t:Math.sqrt(t)}function Qi(e,t){return t==null||!Number.isFinite(t)||t===0||t<0&&e.showNegativeBubbles!==!0?null:Math.abs(t)}function $i(e,t,n,r){return t?.markerFill??t?.color??e.dataPointColors?.[n]??e.markerFill??r}function ea(e,t,n){return{series:t,fallbackColor:ar(n,t),cats:t.categories??e.categories,pointOverrides:new Map((t.dataPointOverrides??[]).map(e=>[e.idx,e]))}}function ta(e,t,n,r,i){let a=ua(e.bubbleScale??100,0,300);if(a<=0)return 0;let o=0;for(let{series:r,cats:i,pointOverrides:a}of t)if(!(r.showMarker===!1||r.markerSymbol===`none`))for(let t=0;t<r.values.length;t++){if(r.values[t]==null||Xi(i,t,n)==null||a.get(t)?.markerSymbol===`none`)continue;let s=Qi(e,r.bubbleSizes?.[t]);s!=null&&(o=Math.max(o,Zi(e,s)))}return o<=0?0:Math.min(r,i)*a/(300+a)/o}function na(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){let g=p===`line`||p===`lineMarker`||p===`lineNoMarker`,_=p===`smooth`||p===`smoothMarker`||p===`smoothNoMarker`,v=p===`lineNoMarker`||p===`smoothNoMarker`,y=n.map(({series:e,index:n})=>ea(t,e,n)),b=f?ta(t,y,r,l,u):0;for(let{series:t,fallbackColor:n,cats:o}of y)for(let s of t.errBars??[])aa(e,t,s,o,r,i,a,n);for(let{series:t,fallbackColor:n,cats:o}of y)if((g||_)&&t.lineHidden!==!0){let s=[];for(let e=0;e<t.values.length;e++){let n=t.values[e];if(n==null)continue;let c=Xi(o,e,r);c!=null&&s.push({x:i(c),y:a(n)})}if(s.length>=2){if(e.save(),e.strokeStyle=t.color?`#${t.color}`:n,e.lineWidth=1.5,e.beginPath(),e.moveTo(s[0].x,s[0].y),_&&s.length>=3)for(let t=0;t<s.length-1;t++){let n=s[t-1]??s[t],r=s[t],i=s[t+1],a=s[t+2]??i;e.bezierCurveTo(r.x+(i.x-n.x)/6,r.y+(i.y-n.y)/6,i.x-(a.x-r.x)/6,i.y-(a.y-r.y)/6,i.x,i.y)}else for(let t=1;t<s.length;t++)e.lineTo(s[t].x,s[t].y);e.stroke(),e.restore()}}for(let{series:n,fallbackColor:o,cats:s,pointOverrides:c}of y)if(!(v||n.showMarker===!1||typeof n.markerSymbol==`string`&&n.markerSymbol===`none`))for(let l=0;l<n.values.length;l++){let u=n.values[l];if(u==null)continue;let p=Xi(s,l,r);if(p==null)continue;let m=c.get(l),h=m?.markerSymbol??n.markerSymbol??`circle`;if(h===`none`)continue;let g=m?.markerSize??n.markerSize??5;if(f){if(b<=0)continue;let e=Qi(t,n.bubbleSizes?.[l]);if(e==null)continue;g=Zi(t,e)*b/d}let _=$i(n,m,l,o),v=m?.markerLine??n.markerLine??(f?n.lineColor:null)??null,y=m?.markerLineWidthEmu??n.markerLineWidthEmu,x=m?.lineWidthEmu??n.lineWidthEmu,S=f?x:y,C=S==null?void 0:rt(S,d);ia(e,i(p),a(u),h,g,_,v,d,C)}for(let{series:n,cats:o}of y)oa(e,n,o,r,i,a,u,d,t.date1904,lr(t,t.dataLabelFontFace,`minor`),t.dataLabelPosition??`r`,{x:s,y:c,w:l,h:u},m,e=>lr(t,e,`minor`),h);for(let{series:n,fallbackColor:f,cats:p}of y)oi(e,n,f,i,a,d,n.values.map((e,t)=>Xi(p,t,r)),{chart:t,chartRect:o,plotRect:{x:s,y:c,w:l,h:u},clipLineToPlot:!0})}function ra(e,t,n,r){let{x:i,y:a,w:o,h:s}=n,c=t.series.map((e,t)=>({series:e,index:t})).filter(({series:e})=>e.useSecondaryAxis!==!0),l=t.series.map((e,t)=>({series:e,index:t})).filter(({series:e})=>e.useSecondaryAxis===!0),u=l.length>0?t.secondaryCatAxis:null,d=l.length>0?t.secondaryValAxis:null,f=(e=>{let n=[];for(let{series:r}of e){let e=r.categories??t.categories;for(let t of e){let e=parseFloat(t);Number.isFinite(e)&&n.push(e)}}return n})(t.series.map((e,t)=>({series:e,index:t}))).length===0,p=e=>{let n=[],r=[];for(let{series:i}of e){let e=i.categories??t.categories;for(let t=0;t<i.values.length;t++){let a=i.values[t];if(a==null)continue;let o=Xi(e,t,f);o!=null&&(n.push(o),r.push(a))}gi(i,`x`,t=>i.values[t]==null?null:Xi(e,t,f),e=>n.push(e)),gi(i,`y`,t=>Xi(e,t,f)==null?null:i.values[t]??null,e=>r.push(e))}if(f&&n.length===0){let t=0;for(let{series:n}of e)t=Math.max(t,n.values.length);for(let e=0;e<t;e++)n.push(e)}return{x:Ie(n),y:Ie(r)}},m=p(c.length>0?c:l),h=p(l),g=wi(e,t,o,s,r),_=g.fontPx,v=g.topPad,y=li(t.catAxisFontSizeHpt,s,r),b=li(t.valAxisFontSizeHpt,s,r),x=jr(e,t,o,s,.22,r),{legRightW:S,legLeftW:C,legTopH:w,legBottomH:T}=ye(x),E=Se(t,o,s,r),D=E.catFontPx,O=E.valFontPx,k=E.catBandH,A=E.valBandW;Ei(e,t,i,a,o,s,a+v,_);let j=d?Xe({dataMin:h.y.min,dataMax:h.y.max,explicitMin:d.min,explicitMax:d.max,axisLenPt:Math.max(1,s*.7/r),axisOrientation:`vertical`,majorUnit:d.majorUnit,minorUnit:d.minorUnit,needMinor:d.minorGridlines===!0||d.minorTickMark!=null&&d.minorTickMark!==`none`,logBase:d.logBase,reversed:d.orientation===`maxMin`}):null,M=0;if(d&&j&&!d.hidden&&d.tickLabelPos!==`none`){let n=e.font;e.font=ur(he(d.fontSizeHpt,r)??b,lr(t,d.fontFace,`minor`),d.fontBold??!1,d.fontItalic??!1);for(let n of j.majorTicks)M=Math.max(M,e.measureText($r(n,d.formatCode,t.date1904,d.displayUnits)).width);M+=Ee(b)+4,e.font=n}let N=u&&!u.hidden&&u.tickLabelPos!==`none`?(he(u.fontSizeHpt,r)??y)+Te(y)+2:0,{plotRect:{px0:P,py0:F,pw:I,ph:L}}=ke(t,i,a,o,s,r,{titleBand:g,legendSideReserveFrac:.22,legendReserve:x,pad:{t:g.bandH+w+b/2+2+N,r:S+o*.05+M,b:(t.catAxisHidden?s*.04:we(y))+k+T,l:(t.valAxisHidden?o*.04:o*.12)+A+C},honorPlotAreaManualLayout:!0});if(I<=0||L<=0)return;t.plotAreaBg&&(e.fillStyle=`#${t.plotAreaBg}`,e.fillRect(P,F,I,L));let{min:R,max:z}=m.x,{min:ee,max:B}=m.y;t.valMin!=null&&(ee=t.valMin),t.valMax!=null&&(B=t.valMax);let V=t.valAxisMinorGridlines===!0||t.valAxisMinorTickMark!=null&&t.valAxisMinorTickMark!==`none`,H=Xe({dataMin:ee,dataMax:B,explicitMin:t.valMin,explicitMax:t.valMax,axisLenPt:L/r,axisOrientation:`vertical`,majorUnit:t.valAxisMajorUnit,minorUnit:t.valAxisMinorUnit,needMinor:V,logBase:t.valAxisLogBase,reversed:qr(t)});ee=H.min,B=H.max;let U=t.catAxisMinorGridlines===!0||t.catAxisMinorTickMark!=null&&t.catAxisMinorTickMark!==`none`,te=Xe({dataMin:R,dataMax:z,explicitMin:t.catAxisMin,explicitMax:t.catAxisMax,axisLenPt:I/r,axisOrientation:`horizontal`,majorUnit:t.catAxisMajorUnit,minorUnit:t.catAxisMinorUnit,needMinor:U,logBase:t.catAxisLogBase,reversed:Jr(t)});R=te.min,z=te.max;let W=u?Xe({dataMin:h.x.min,dataMax:h.x.max,explicitMin:u.min,explicitMax:u.max,axisLenPt:I/r,axisOrientation:`horizontal`,majorUnit:u.majorUnit,minorUnit:u.minorUnit,needMinor:u.minorGridlines===!0||u.minorTickMark!=null&&u.minorTickMark!==`none`,logBase:u.logBase,reversed:u.orientation===`maxMin`}):null,ne=d?Xe({dataMin:h.y.min,dataMax:h.y.max,explicitMin:d.min,explicitMax:d.max,axisLenPt:L/r,axisOrientation:`vertical`,majorUnit:d.majorUnit,minorUnit:d.minorUnit,needMinor:d.minorGridlines===!0||d.minorTickMark!=null&&d.minorTickMark!==`none`,logBase:d.logBase,reversed:d.orientation===`maxMin`}):null,G=e=>P+te.fraction(e)*I,K=e=>F+L-H.fraction(e)*L,q=e=>P+(W?.fraction(e)??0)*I,J=e=>F+L-(ne?.fraction(e)??0)*L,Y=te.majorUnit,re=H.majorTicks,ie=H.minorTicks,ae=te.majorTicks,oe=te.minorTicks,se=F+L;if(t.catAxisCrossesAt!=null)se=ua(K(t.catAxisCrossesAt),F,F+L);else{let e=t.catAxisCrosses??`autoZero`;e===`autoZero`&&ee<0&&B>0?se=ua(K(0),F,F+L):e===`max`&&(se=F)}let ce=P;if(t.valAxisCrossesAt!=null)ce=ua(G(t.valAxisCrossesAt),P,P+I);else{let e=t.valAxisCrosses??`autoZero`;e===`autoZero`&&R<0&&z>0?ce=ua(G(0),P,P+I):e===`max`&&(ce=P+I)}let le=zr(t,r);if(!t.valAxisHidden){let n=t.valAxisFontSizeHpt==null?Math.max(8,Math.min(11,L/20)):li(t.valAxisFontSizeHpt,s,r),i=t.valAxisFontSizeHpt==null?4:Ee(n);e.font=ur(n,lr(t,t.valAxisFontFace,`minor`),t.valAxisFontBold??!1,t.valAxisFontItalic??!1);let a=t.valAxisLineColor?`#${t.valAxisLineColor}`:void 0,o=rt(t.valAxisLineWidthEmu,r),c=t.valAxisLineHidden?0:Lr(t.valAxisMajorTickMark,`major`,o,r);if(t.valAxisMinorGridlines){let n=Br(t,r);for(let t of ie)Rr(e,P,I,K(t),!1,n)}for(let n of re){let s=K(n);if(e.strokeStyle=le.color,e.lineWidth=le.width,Yr(t)){let t=le.dash.length>0&&e.getLineDash?e.getLineDash():[];le.dash.length>0&&e.setLineDash(le.dash),e.beginPath(),e.moveTo(P,s),e.lineTo(P+I,s),e.stroke(),le.dash.length>0&&e.setLineDash(t)}if(t.valAxisTickLabelPos!==`none`){e.fillStyle=t.valAxisFontColor?`#${t.valAxisFontColor}`:`#555`;let r=t.valAxisTickLabelPos??`nextTo`,a;r===`high`?(e.textAlign=`left`,a=P+I+i):r===`low`?(e.textAlign=`right`,a=P-i):(e.textAlign=`right`,a=ce-c-i),e.textBaseline=`middle`,e.fillText(Zr(t,n,!1),a,s)}Fr(e,t.valAxisMajorTickMark,`val`,ce,s,a,o,!1,t.valAxisLineHidden,`major`,r)}if(t.valAxisMinorTickMark&&t.valAxisMinorTickMark!==`none`)for(let n of ie)Fr(e,t.valAxisMinorTickMark,`val`,ce,K(n),a,o,!1,t.valAxisLineHidden,`minor`,r)}if(!t.catAxisHidden&&Ur(t)&&Y>0){let n=Wr(t,r);e.strokeStyle=n.color,e.lineWidth=n.width;let i=n.dash.length>0&&e.getLineDash?e.getLineDash():[];n.dash.length>0&&e.setLineDash(n.dash);for(let t of ae){let n=G(t);e.beginPath(),e.moveTo(n,F),e.lineTo(n,F+L),e.stroke()}n.dash.length>0&&e.setLineDash(i)}if(!t.catAxisHidden&&t.catAxisMinorGridlines&&Y>0){let n=Gr(t,r),i=n.dash.length>0&&e.getLineDash?e.getLineDash():[];e.strokeStyle=n.color,e.lineWidth=n.width,n.dash.length>0&&e.setLineDash(n.dash);for(let t of oe){let n=G(t);e.beginPath(),e.moveTo(n,F),e.lineTo(n,F+L),e.stroke()}n.dash.length>0&&e.setLineDash(i)}if(!t.catAxisHidden&&!t.catAxisLineHidden&&(e.save(),e.strokeStyle=t.catAxisLineColor?`#${t.catAxisLineColor}`:`#888`,e.lineWidth=rt(t.catAxisLineWidthEmu,r),e.lineCap=`butt`,e.beginPath(),e.moveTo(P,se),e.lineTo(P+I,se),e.stroke(),e.restore()),!t.valAxisHidden&&!t.valAxisLineHidden&&(e.save(),e.strokeStyle=t.valAxisLineColor?`#${t.valAxisLineColor}`:`#888`,e.lineWidth=rt(t.valAxisLineWidthEmu,r),e.beginPath(),e.moveTo(ce,F),e.lineTo(ce,F+L),e.stroke(),e.restore()),!t.catAxisHidden){let n=t.catAxisFontSizeHpt==null?Math.max(8,Math.min(11,L/20)):li(t.catAxisFontSizeHpt,s,r),i=t.catAxisFontSizeHpt==null?4:Te(n);e.font=ur(n,lr(t,t.catAxisFontFace,`minor`),t.catAxisFontBold??!1,t.catAxisFontItalic??!1),e.fillStyle=t.catAxisFontColor?`#${t.catAxisFontColor}`:`#555`,e.textAlign=`center`;let a=t.catAxisTickLabelPos??`nextTo`,o=rt(t.catAxisLineWidthEmu,r),c=t.catAxisLineColor?`#${t.catAxisLineColor}`:void 0,l=t.catAxisLineHidden?0:Lr(t.catAxisMajorTickMark,`major`,o,r),u=a===`low`?F+L+i:a===`high`?F-i:se+l+i;e.textBaseline=a===`high`?`bottom`:`top`;for(let n of ae){let i=G(n);a!==`none`&&e.fillText($r(n,t.catAxisFormatCode,t.date1904,t.catAxisDisplayUnits),i,u),Fr(e,t.catAxisMajorTickMark,`cat`,se,i,c,o,!1,t.catAxisLineHidden,`major`,r)}if(t.catAxisMinorTickMark&&t.catAxisMinorTickMark!==`none`)for(let n of oe)Fr(e,t.catAxisMinorTickMark,`cat`,se,G(n),c,o,!1,t.catAxisLineHidden,`minor`,r)}let ue=t.chartType===`bubble`,de=ue?`marker`:t.scatterStyle??`marker`;if(na(e,t,c,f,G,K,n,P,F,I,L,r,ue,de,{x:i,y:a,w:o,h:s},t.valAxisDisplayUnits),l.length>0&&W&&ne&&na(e,t,l,f,q,J,n,P,F,I,L,r,ue,de,{x:i,y:a,w:o,h:s},d?.displayUnits),u&&W&&!u.hidden){let n=it(u.lineColor,u.lineWidthEmu,r);u.lineHidden||(e.strokeStyle=n.color,e.lineWidth=n.width,e.beginPath(),e.moveTo(P,F),e.lineTo(P+I,F),e.stroke());let i=he(u.fontSizeHpt,r)??y;e.font=ur(i,lr(t,u.fontFace,`minor`),u.fontBold??!1,u.fontItalic??!1),e.fillStyle=u.fontColor?`#${u.fontColor}`:`#555`,e.textAlign=`center`,e.textBaseline=`bottom`;let a=u.lineHidden?0:Lr(u.majorTickMark,`major`,n.width,r);for(let o of W.majorTicks){let s=q(o);u.tickLabelPos!==`none`&&e.fillText($r(o,u.formatCode,t.date1904,u.displayUnits),s,F-a-Te(i)),Fr(e,u.majorTickMark,`cat`,F,s,n.color,n.width,!0,u.lineHidden,`major`,r)}if(u.minorTickMark&&u.minorTickMark!==`none`)for(let t of W.minorTicks)Fr(e,u.minorTickMark,`cat`,F,q(t),n.color,n.width,!0,u.lineHidden,`minor`,r)}d&&ne&&yi(e,t,d,{min:ne.min,max:ne.max,step:ne.majorUnit,majorLines:ne.majorTicks,minorTicks:ne.minorTicks,makeToY:()=>J},J,n,P,F,I,L,r,he(d.fontSizeHpt,r)??b,M,t.valAxisFontColor?`#${t.valAxisFontColor}`:`#555`,t.date1904),Pr(e,t,x,i,a,o,s,P,F,I,L,g.bandH+2,r),gr(e,t,i,a,o,s,P,F,I,L,C,T,D,O)}function ia(e,t,n,r,i,a,o,s,c=1){let l=Math.max(2,i*s),u=l/2,d=a.startsWith(`#`)?a:`#${a}`,f=o?o.startsWith(`#`)?o:`#${o}`:null;switch(e.save(),e.fillStyle=d,f&&(e.strokeStyle=f,e.lineWidth=c),r){case`square`:e.fillRect(t-u,n-u,l,l),o&&e.strokeRect(t-u,n-u,l,l);break;case`diamond`:e.beginPath(),e.moveTo(t,n-u),e.lineTo(t+u,n),e.lineTo(t,n+u),e.lineTo(t-u,n),e.closePath(),e.fill(),o&&e.stroke();break;case`triangle`:e.beginPath(),e.moveTo(t,n-u),e.lineTo(t+u,n+u),e.lineTo(t-u,n+u),e.closePath(),e.fill(),o&&e.stroke();break;case`x`:e.strokeStyle=d,e.lineWidth=Math.max(1,l*.18),e.beginPath(),e.moveTo(t-u,n-u),e.lineTo(t+u,n+u),e.moveTo(t-u,n+u),e.lineTo(t+u,n-u),e.stroke();break;case`plus`:e.strokeStyle=d,e.lineWidth=Math.max(1,l*.18),e.beginPath(),e.moveTo(t-u,n),e.lineTo(t+u,n),e.moveTo(t,n-u),e.lineTo(t,n+u),e.stroke();break;case`star`:e.beginPath();for(let r=0;r<10;r++){let i=r%2==0?u:u*.45,a=-Math.PI/2+r*Math.PI/5,o=t+Math.cos(a)*i,s=n+Math.sin(a)*i;r===0?e.moveTo(o,s):e.lineTo(o,s)}e.closePath(),e.fill(),o&&e.stroke();break;case`dot`:e.beginPath(),e.arc(t,n,Math.max(1,l*.25),0,Math.PI*2),e.fill();break;case`dash`:{let r=Math.max(1,l*.25);e.fillRect(t-u,n-r/2,l,r);break}default:e.beginPath(),e.arc(t,n,u,0,Math.PI*2),e.fill(),o&&e.stroke();break}e.restore()}function aa(e,t,n,r,i,a,o,s){e.save(),e.strokeStyle=n.color?`#${n.color}`:s,e.lineWidth=n.lineWidthEmu?Math.max(.5,n.lineWidthEmu/et):1,e.setLineDash(fa(n.dash,e.lineWidth));let c=n.barType===`plus`||n.barType===`both`,l=n.barType===`minus`||n.barType===`both`,u=n.dir===`x`,d=e.lineWidth/2;for(let s=0;s<t.values.length;s++){let f=t.values[s];if(f==null)continue;let p=Xi(r,s,i);if(p==null)continue;let m=a(p),h=o(f),g=t=>{let r=m,i=h;u?r=a(p+t):i=o(f+t),e.beginPath(),e.moveTo(m,h),e.lineTo(r,i),e.stroke(),n.noEndCap||(e.save(),e.setLineDash([]),e.beginPath(),u?(e.moveTo(r,i-d),e.lineTo(r,i+d)):(e.moveTo(r-d,i),e.lineTo(r+d,i)),e.stroke(),e.restore())};if(c){let e=n.plus[s];e!=null&&g(e)}if(l){let e=n.minus[s];e!=null&&g(-e)}}e.restore()}function oa(e,t,n,r,i,a,o,s,c=!1,l=`sans-serif`,u=`r`,d={x:-1e6,y:-1e6,w:2e6,h:2e6},f=d,p,m){let h=t.dataLabelOverrides??[],g=or(h);if(h.length===0&&!t.seriesDataLabels)return;let _=t.seriesDataLabels;for(let h=0;h<t.values.length;h++){let v=t.values[h];if(v==null)continue;let y=Xi(n,h,r);if(y==null)continue;let b=g.get(h);if(b?.deleted)continue;let x=b?.showCatName??_?.showCatName,S=b?.showSerName??_?.showSerName,C=b?.showVal??_?.showVal,w=an({customText:b?.text,showCategory:x&&!r,showSeries:S,showValue:C,category:yt(y,t.catFormatCodes?.[h]??t.catFormatCode??null,c),seriesName:t.name,sourceValue:v,valueDivisor:Qr(m),formatCode:b?.formatCode??_?.formatCode??null,date1904:c,separator:b?.separator??_?.separator});if(!w)continue;let T=b?.position??_?.position??u,E=he(b?.fontSizeHpt??_?.fontSizeHpt,s)??Math.max(9,Math.min(11,o/25)),D=b?.fontColor??_?.fontColor,O=b?.fontBold??_?.fontBold??!1,k=b?.fontFace??_?.fontFace,A=k&&p?p(k):l;sa(e,i(y),a(v),w,T,E,D,O,A,0,d,b?.manualLayout,f,b?.richRuns,s,p)}}function sa(e,t,n,r,i,a,o,s,c=`sans-serif`,l=0,u={x:-1e6,y:-1e6,w:2e6,h:2e6},d,f=u,p,m=1,h){e.save(),e.font=`${s?`bold `:``}${a}px ${c}`,la(e,r,{kind:`point`,x:t,y:n,position:i,markerGap:l},u,a,o?`#${o}`:`#333`,d,f,p&&p.length>0?{runs:p,ptToPx:m,fontFamily:c,fallbackBold:s,fontFamilyForFace:h}:void 0),e.restore()}function ca(e,t,n,r,i){if(!(!t?.text||!t.richRuns||t.richRuns.length===0))return{runs:t.richRuns,ptToPx:n,fontFamily:r,fallbackBold:i,fontFamilyForFace:t=>lr(e,t,`minor`)}}function la(e,t,n,r,i,a,o,s=r,c){if(!t||!Number.isFinite(i)||i<=0)return;if(c){let t=Qt(e,c,i,a);if(!t)return;let l=fn(n,r,{w:t.width,h:t.height},i,o,s);if(!l)return;e.save(),e.beginPath(),e.rect(l.clip.x,l.clip.y,l.clip.w,l.clip.h),e.clip(),$t(e,t,l.x,l.y,l.textAlign,l.textBaseline),e.restore();return}let l=i*1.15,u=mn(t).value.split(/\r?\n/),d=fn(n,r,{w:u.reduce((t,n)=>Math.max(t,e.measureText(n).width),0),h:Math.max(l,u.length*l)},i,o,s);if(!d)return;let f=t=>e.measureText(t).width,p=hn(t,d.maxWidth,d.maxHeight,l,f);if(p.length===0||(d=fn(n,r,{w:p.reduce((e,t)=>Math.max(e,f(t)),0),h:p.length*l},i,o,s),!d))return;e.save(),e.beginPath(),e.rect(d.clip.x,d.clip.y,d.clip.w,d.clip.h),e.clip(),e.fillStyle=a,e.textAlign=d.textAlign,e.textBaseline=d.textBaseline;let m=d.textBaseline===`middle`?d.y-(p.length-1)*l/2:d.textBaseline===`bottom`?d.y-(p.length-1)*l:d.y;for(let t=0;t<p.length;t++)e.fillText(p[t],d.x,m+t*l);e.restore()}function ua(e,t,n){return e<t?t:e>n?n:e}function da(e,t,n){if(t.length!==0)if(n&&t.length>=3)for(let n=0;n<t.length-1;n++){let r=t[n-1]??t[n],i=t[n],a=t[n+1],o=t[n+2]??a,s=i.x+(a.x-r.x)/6,c=i.y+(a.y-r.y)/6,l=a.x-(o.x-i.x)/6,u=a.y-(o.y-i.y)/6;e.bezierCurveTo(s,c,l,u,a.x,a.y)}else for(let n=1;n<t.length;n++)e.lineTo(t[n].x,t[n].y)}function fa(e,t=1){return On(e??`solid`,Number.isFinite(t)&&t>0?t:1)}function pa(e){return e.markerSymbol!=null||e.markerSize!=null||e.markerFill!=null||e.markerLine!=null||e.markerLineWidthEmu!=null||e.dataPointOverrides!=null&&e.dataPointOverrides.length>0}function ma(e,t,n,r,i,a,o,s){if(n.dir===`x`)return;let c=n.barType===`plus`||n.barType===`both`,l=n.barType===`minus`||n.barType===`both`;e.save(),e.strokeStyle=n.color?`#${n.color}`:s,e.lineWidth=n.lineWidthEmu?Math.max(.5,n.lineWidthEmu/et):1,e.setLineDash(fa(n.dash,e.lineWidth));let u=e.lineWidth/2;for(let s=0;s<r;s++){if(t.values[s]==null)continue;let r=o(s),d=i(s),f=a(r),p=t=>{let i=a(r+t);e.beginPath(),e.moveTo(d,f),e.lineTo(d,i),e.stroke(),n.noEndCap||(e.save(),e.setLineDash([]),e.beginPath(),e.moveTo(d-u,i),e.lineTo(d+u,i),e.stroke(),e.restore())};if(c){let e=n.plus[s];e!=null&&p(e)}if(l){let e=n.minus[s];e!=null&&p(-e)}}e.restore()}function ha(e,t,n,r,i,a,o,s,c,l){if(!i&&n.dir===`x`||i&&n.dir===`y`)return;let u=n.barType===`plus`||n.barType===`both`,d=n.barType===`minus`||n.barType===`both`;e.save(),e.strokeStyle=n.color?`#${n.color}`:c,e.lineWidth=n.lineWidthEmu?Math.max(.5,n.lineWidthEmu/et*l):Math.max(.5,l*.75),e.setLineDash(fa(n.dash,e.lineWidth));let f=Math.max(e.lineWidth/2,2*l);for(let c=0;c<r;c++){if(t.values[c]==null)continue;let r=s(c),l=a(c),p=o(r),m=t=>{let a=o(r+t);e.beginPath(),i?(e.moveTo(p,l),e.lineTo(a,l)):(e.moveTo(l,p),e.lineTo(l,a)),e.stroke(),n.noEndCap||(e.save(),e.setLineDash([]),e.beginPath(),i?(e.moveTo(a,l-f),e.lineTo(a,l+f)):(e.moveTo(l-f,a),e.lineTo(l+f,a)),e.stroke(),e.restore())};if(u){let e=n.plus[c];e!=null&&m(e)}if(d){let e=n.minus[c];e!=null&&m(-e)}}e.restore()}function ga(e,t,n,r,i,a,o,s,c,l,u,d=`sans-serif`,f=`t`,p={x:-1e6,y:-1e6,w:2e6,h:2e6},m=p,h,g,_,v){let y=t.dataLabelOverrides??[],b=or(y),x=t.seriesDataLabels;if(y.length===0&&!x)return!1;for(let y=0;y<r;y++){if(t.values[y]==null&&!u)continue;let r=o(y),S=t.values[y]??0,C=b.get(y);if(C?.deleted)continue;let w=C?.showCatName??x?.showCatName,T=C?.showSerName??x?.showSerName,E=C?.showVal??x?.showVal,D=C?.showPercent??x?.showPercent,O=an({customText:C?.text,showCategory:w,showSeries:T,showValue:E,showPercent:D,category:n[y]??``,seriesName:t.name,sourceValue:S,valueDivisor:Qr(v),percentRatio:h?.(y),formatCode:C?.formatCode??x?.formatCode??null,date1904:l,separator:C?.separator??x?.separator});if(!O)continue;let k=C?.position??x?.position??f,A=he(C?.fontSizeHpt??x?.fontSizeHpt,c)??Math.max(9,Math.min(11,s/25)),j=C?.fontColor??x?.fontColor,M=C?.fontBold??x?.fontBold??!1,N=C?.fontFace??x?.fontFace,P=N&&_?_(N):d;sa(e,i(y),a(r),O,k,A,j,M,P,g?.(y)??0,p,C?.manualLayout,m,C?.richRuns,c,_)}return!0}function _a(e,t){return e?.chartexFormatIdx??t}function va(e,t,n,r,i,a,o,s,c){if(!t)return null;let l=t.seriesDataLabels,u=o.get(n);if(u?.deleted||!l&&!u&&!a.visible)return null;let d=typeof s==`boolean`?s:!1,f=typeof s==`number`?s:void 0,p=!d&&(u?.showVal??l?.showVal??a.showVal),m=u?.showCatName??l?.showCatName??a.showCatName,h=u?.showSerName??l?.showSerName??a.showSerName??!1,g=u?.showPercent??l?.showPercent??a.showPercent??!1,_=u?.formatCode??l?.formatCode??e.dataLabelFormatCode??null,v=an({customText:u?.text,showCategory:m,showSeries:h,showValue:p,showPercent:g,category:r,seriesName:t.name,sourceValue:i,valueDivisor:Qr(c),percentRatio:f,formatCode:_??t.valFormatCode??null,percentFormatCode:_??`0%`,date1904:e.date1904,separator:u?.separator??l?.separator});return v?{text:v,position:u?.position??l?.position,fontColor:u?.fontColor??l?.fontColor,fontSizeHpt:u?.fontSizeHpt??l?.fontSizeHpt,fontBold:u?.fontBold??l?.fontBold,fontFace:u?.fontFace??l?.fontFace,manualLayout:u?.manualLayout}:null}function ya(e,t,n,r,i){let a=n===`fill`?t?.fillColors:t?.lineColors;return a?.length?a[((n===`fill`?t?.fillColorIndex:t?.lineColorIndex)??r)%a.length]??null:null}function ba(e,t,n,r){if(!t.length)return null;let i=e.chartexColorStyleMethod;return i===`withinLinear`||i===`acrossLinear`||i===`withinLinearReversed`||i===`acrossLinearReversed`?t[i===`withinLinear`||i===`withinLinearReversed`?0:n%t.length]??null:t[n%t.length]??null}function xa(e,t,n){return(e.chartexColorPalette?ba(e,e.chartexColorPalette,t,n):null)??e.chartexAccents?.[t%(e.chartexAccents.length||1)]??ir[t%ir.length]}function Sa(e,t,n,r){return ya(e,r,`fill`,t,n)??ya(e,e.chartexDataPointStyle,`fill`,t,n)??xa(e,t,n)}function Ca(e,t){let n=e?.fillPaints;return n?.length?n[(e?.fillColorIndex??t)%n.length]??null:null}function wa(e,t,n,r){if(!t)return;if(t.fillHidden)return t.fillNoStyle?void 0:null;let i=Ca(t,n);if(i)return i;let a=ya(e,t,`fill`,n,r);return a?{fillType:`solid`,color:a}:void 0}function Ta(e,t,n,r,i,a=e.chartexDataPointStyle){let o=r?.fillHidden?void 0:wa(e,r,t,n);if(o!==void 0)return o;if(r&&i)return{fillType:`solid`,color:i};let s=wa(e,a,t,n);return s===void 0?i?{fillType:`solid`,color:i}:{fillType:`solid`,color:xa(e,t,n)}:s}function Ea(e,t,n,r,i,a,o,s=0){return t.fillType===`solid`?t.color.startsWith(`#`)?t.color:`#${t.color}`:Ln(t,e,n,r,i,a,s)??o}function Da(e,t,n,r,i,a,o={}){let s=(t,n)=>({visible:t?.lineHidden!==!0,color:ya(e,t,`line`,r,i)??n,widthEmu:t?.lineWidthEmu??null,dash:t?.lineDash??null,cap:t?.lineCap??null,join:t?.lineJoin??null}),c=n?.chartexStyle;if((c?.lineHidden!=null||c?.lineColors?.some(Boolean)||c?.lineWidthEmu!=null||c?.lineDash!=null||c?.lineCap!=null||c?.lineJoin!=null)&&!(c?.lineHidden&&c.lineNoStyle)){let e=s(c,n?.lineColor??a);return e.widthEmu??=n?.lineWidthEmu??null,e}return n?.lineHidden!=null||n?.lineColor!=null||n?.lineWidthEmu!=null?{visible:n?.lineHidden!==!0,color:n?.lineColor??a,widthEmu:n?.lineWidthEmu??null,dash:null,cap:null,join:null}:t?.lineNoStyle&&o.linkedNoStyleFallback?s(null,a):s(t,a)}function Oa(e,t,n){return t.visible?(e.strokeStyle=t.color.startsWith(`#`)?t.color:`#${t.color}`,e.lineWidth=t.widthEmu==null?1:rt(t.widthEmu,n),e.setLineDash(fa(t.dash??void 0,e.lineWidth)),e.lineCap=t.cap===`rnd`?`round`:t.cap===`sq`?`square`:`butt`,e.lineJoin=t.join===`round`||t.join===`bevel`?t.join:`miter`,!0):!1}function ka(e,t,n,r,i,a,o,s,c={}){return Oa(e,Da(t,n,r,i,a,o,c),s)}function Aa(e,t,n,r,i,a,o,s=!1,c=!0){let l=Da(e,r,n,i,a,o,{linkedNoStyleFallback:s});return{name:t,values:[],color:o.replace(/^#/,``),lineHidden:!c||!l.visible,lineColor:c&&l.visible?l.color.replace(/^#/,``):null,lineWidthEmu:c?l.widthEmu:null,chartexStyle:{lineDash:c?l.dash:null,lineCap:c?l.cap:null,lineJoin:c?l.join:null}}}const ja=1e4,Ma=new Set([`clusteredBar`,`clusteredBarH`,`stackedBar`,`stackedBarH`,`stackedBarPct`,`stackedBarHPct`,`clusteredColumn`,`line`,`stackedLine`,`stackedLinePct`,`area`,`stackedArea`,`stackedAreaPct`,`pie`,`doughnut`,`radar`,`scatter`,`bubble`,`stock`,`surface`]);function Na(e){if(!Ma.has(e.chartType))return null;let t=0;for(let n of e.series){let r=0;for(let e of n.errBars??[])r=Math.max(r,e.plus.length,e.minus.length);let i=Math.max(1,e.categories.length,n.categories?.length??0,n.values.length,n.bubbleSizes?.length??0,n.dataPointOverrides?.length??0,n.dataLabelOverrides?.length??0,n.trendLines?.length??0,r);if(!Number.isSafeInteger(i)||i>ja-t)return ja+1;t+=i}return t}function Pa(e,t){if(!e.threeD||!t||!new Set([`pie`,`line`,`stackedLine`,`stackedLinePct`,`area`,`stackedArea`,`stackedAreaPct`,`clusteredBar`,`clusteredBarH`,`stackedBar`,`stackedBarH`,`stackedBarPct`,`stackedBarHPct`]).has(e.chartType))return null;let n=0;for(let t of e.series){let r=Math.max(1,t.values.length,t.categories?.length??0),i=t.threeDShape??e.threeD.shape??`box`,a=e.chartType===`pie`?36:e.chartType.toLowerCase().includes(`bar`)?i===`box`?4:36:e.chartType.toLowerCase().includes(`area`)?4:t.smooth===!0?25:3;if(!Number.isSafeInteger(r)||r>Math.floor(ja/a)||(n+=r*a,n>ja))return ja+1}return n}function Fa(e,t,n){return n<=ja?!1:(e.fillStyle=`#888`,e.font=`12px sans-serif`,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(`(too many data points)`,t.x+t.w/2,t.y+t.h/2),!0)}function Ia(e,t,n,r){let i=t.series[0];if(!i)return;let a=It(i.values,t.chartexHistogramBinning??{});if(a.kind===`tooManyInputPoints`){Fa(e,n,ja+1);return}ji(e,{...t,chartType:`clusteredBar`,categories:a.categories,series:[{...i,categories:void 0,values:a.counts}]},n,r,{gapPolicy:`chartex`})}function La(e,t,n,r,i){let{x:a,y:o,w:s,h:c}=n,l=t.series[0]?.values??[],u=t.categories,d=Math.max(l.length,u.length);if(d===0||Fa(e,n,d))return;let f=new Set(t.subtotalIndices),p=!1,m=(e,t)=>{let n=e+t;return Number.isFinite(n)?n:(p=!0,n<0?-Number.MAX_VALUE:Number.MAX_VALUE)},h=0,g=[],_=-1/0,v=0;for(let e=0;e<d;e++){let t=l[e],n=t!=null&&Number.isFinite(t),r=t==null||n,i=n?t:0;if(f.has(e)){let e={start:0,end:i,isSub:!0,isPos:!0,hasValue:n,paintSlot:r};g.push(e),r&&(_=Math.max(_,e.start,e.end),v=Math.min(v,e.start,e.end)),n&&(h=i)}else{let e=m(h,i),t={start:i>=0?h:e,end:i>=0?e:h,isSub:!1,isPos:i>=0,hasValue:n,paintSlot:r};g.push(t),r&&(_=Math.max(_,t.start,t.end),v=Math.min(v,t.start,t.end)),n&&(h=e)}}if(p){e.fillStyle=`#888`,e.font=`12px sans-serif`,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(`(chart values out of range)`,a+s/2,o+c/2);return}if(_<=v)return;let y=f.size===0&&g.every((e,t)=>!e.hasValue||l[t]>=0),b=!t.valAxisHidden&&t.valAxisTickLabelPos!==`none`&&!y,x=wi(e,t,s,c,r),S=Se(t,s,c,r),C=li(t.valAxisFontSizeHpt,c,r),w=li(t.catAxisFontSizeHpt,c,r),T=lr(t,t.valAxisFontFace,`minor`),E=lr(t,t.catAxisFontFace,`minor`),D=ni(t,v,_,c/r);e.save();let O=0;if(b){e.font=ur(C,T,t.valAxisFontBold??!1,t.valAxisFontItalic??!1);let n=0;for(let r of D.majorLines)n=Math.max(n,e.measureText(Zr(t,r,!1)).width);O=n+8}let k=Math.max(1,s-S.valBandW-O-s*.02)/d;e.font=ur(w,E,t.catAxisFontBold??!1,t.catAxisFontItalic??!1);let A=u.slice(0,d).map(n=>ui(e,bt(n,t.catAxisFormatCode,t.date1904),Math.max(1,k-8))),j=0;for(let e of A)e.some(Boolean)&&(j=Math.max(j,e.length));let M=t.catAxisHidden||j===0?0:j*(w+2)+4,N=t.series[0],P=or(N?.dataLabelOverrides),F=N?.chartexStyle,I=`#${N?.color??Sa(t,0,3,F)}`,L=`#${Sa(t,1,3,F)}`,R=`#${Sa(t,2,3,F)}`,z=Ta(t,0,3,F,N?.color),ee=Ta(t,1,3,F),B=Ta(t,2,3,F),V={...t,chartType:`clusteredBar`,series:[Aa(t,`Increase`,N,t.chartexDataPointStyle,0,3,I),Aa(t,`Decrease`,N,t.chartexDataPointStyle,1,3,L),Aa(t,`Total`,N,t.chartexDataPointStyle,2,3,R)]},H=jr(e,V,s,c,.22,r),{legRightW:U,legLeftW:te,legTopH:W,legBottomH:ne}=ye(H),G=ke(t,a,o,s,c,r,{titleBand:x,legendSideReserveFrac:0,legendReserve:H,pad:{t:x.bandH+W+C/2+2,r:U+s*.02,b:ne+S.catBandH+M,l:te+S.valBandW+(t.valAxisHidden?s*.02:Math.max(s*.03,O))}});Ei(e,t,a,o,s,c,o+G.title.topPad,G.title.fontPx);let{px0:K,py0:q,pw:J,ph:Y}=G.plotRect,re=ni(t,v,_,Y/r),ie=e=>q+Y-re.frac(e)*Y,ae=it(t.valAxisLineColor,t.valAxisLineWidthEmu,r),oe=it(t.catAxisLineColor,t.catAxisLineWidthEmu,r),se=zr(t,r);if(!t.valAxisHidden){e.font=ur(C,T,t.valAxisFontBold??!1,t.valAxisFontItalic??!1),e.fillStyle=t.valAxisFontColor?`#${t.valAxisFontColor}`:`#595959`,e.textAlign=`right`,e.textBaseline=`middle`;let n=Br(t,r);for(let t of re.minorLines)Rr(e,K,J,ie(t),!1,n);for(let n of re.majorLines){let i=ie(n);if(Yr(t)){e.strokeStyle=se.color,e.lineWidth=se.width;let t=se.dash.length>0&&e.getLineDash?e.getLineDash():[];se.dash.length>0&&e.setLineDash(se.dash),e.beginPath(),e.moveTo(K,i),e.lineTo(K+J,i),e.stroke(),se.dash.length>0&&e.setLineDash(t)}b&&e.fillText(Zr(t,n,!1),K-4,i),Fr(e,t.valAxisMajorTickMark,`val`,K,i,ae.color,ae.width,!1,t.valAxisLineHidden,`major`,r)}for(let n of re.minorTicks)Fr(e,t.valAxisMinorTickMark,`val`,K,ie(n),ae.color,ae.width,!1,t.valAxisLineHidden,`minor`,r)}let ce=!t.valAxisHidden&&!t.valAxisLineHidden,le=!t.catAxisHidden&&!t.catAxisLineHidden;ce&&(e.strokeStyle=ae.color,e.lineWidth=ae.width,e.beginPath(),e.moveTo(K,q),e.lineTo(K,q+Y),e.stroke()),le&&(e.strokeStyle=oe.color,e.lineWidth=oe.width,e.beginPath(),e.moveTo(K,q+Y),e.lineTo(K+J,q+Y),e.stroke());let ue=J/d,de=ue/(1+Mt(t.barGapWidth,`chartex`)/100);g.forEach((n,f)=>{let p=K+ue*f+(ue-de)/2,m=Math.min(ie(n.start),ie(n.end)),h=Math.max(ie(n.start),ie(n.end)),_=Math.max(1,h-m),v=n.isSub?B:n.isPos?z:ee,y=n.isSub?R:n.isPos?I:L;n.paintSlot&&v&&(e.fillStyle=Ea(e,v,p,m,de,_,y,i),e.fillRect(p,m,de,_));let b=n.isSub?2:+!n.isPos,x=ya(t,t.chartexDataPointStyle,`line`,b,3);if(n.paintSlot&&ka(e,t,t.chartexDataPointStyle,N,b,3,x?`#${x}`:y,r)&&e.strokeRect(p,m,de,_),n.paintSlot&&g[f+1]?.paintSlot&&f<d-1&&t.chartexConnectorLines!==!1){let i=K+ue*(f+1)+(ue-de)/2,a=n.isPos?m:h;e.save();let o=Da(t,t.chartexSeriesLineStyle,N,b,3,`#000000`,{linkedNoStyleFallback:!0});Oa(e,o,r)&&(o.widthEmu??(e.lineWidth=.75*r),e.beginPath(),e.moveTo(p+de,a),e.lineTo(i,a),e.stroke()),e.restore()}let S=n.hasValue?l[f]:0,C=va(t,N,f,u[f]??``,S,{visible:t.showDataLabels,showVal:!0,showCatName:!1},P,!n.hasValue);if(C){let n=N?.dataLabelColors?.[f]??C.fontColor??null,i=n?`#${n}`:t.dataLabelFontColor?`#${t.dataLabelFontColor}`:`#595959`,l=he(C.fontSizeHpt,r)??li(t.dataLabelFontSizeHpt,c,r),u=C.fontBold??t.dataLabelFontBold??!1,d=lr(t,C.fontFace??t.dataLabelFontFace,`minor`);e.font=`${u?`bold `:``}${l}px ${d}`,la(e,C.text,{kind:`bar`,rect:{x:p,y:m,w:de,h:_},orientation:`vertical`,negative:S<0,position:C.position??`outEnd`},{x:K,y:q,w:J,h:Y},l,i,C.manualLayout,{x:a,y:o,w:s,h:c})}}),e.textAlign=`center`,e.textBaseline=`top`,e.fillStyle=t.catAxisFontColor?`#${t.catAxisFontColor}`:`#595959`,e.font=ur(w,E,t.catAxisFontBold??!1,t.catAxisFontItalic??!1);let fe=q+Y+4;for(let n=0;n<d&&!t.catAxisHidden;n++){let t=K+ue*n+ue/2;(A[n]??[]).forEach((n,r)=>n&&e.fillText(n,t,fe+r*(w+2)))}gr(e,t,a,o,s,c,K,q,J,Y,te,ne,S.catFontPx,S.valFontPx),Pr(e,V,H,a,o,s,c,K,q,J,Y,x.bandH+2,r,[z,ee,B],i),e.restore()}function Ra(e,t,n,r,i){let a=t.series[0]?.values??[],o=Math.max(a.length,t.categories.length);if(o===0||Fa(e,n,o))return;let s=0;for(let e=0;e<o;e++)s=Math.max(s,a[e]??0);if(!(s>0))return;let{x:c,y:l,w:u,h:d}=n,f=wi(e,t,u,d,r),p=t.series[0],m=or(p?.dataLabelOverrides),h=`#${p?.color??Sa(t,0,1,p?.chartexStyle)}`,g=Ta(t,0,1,p?.chartexStyle,p?.color),_={...t,series:[Aa(t,p?.name??``,p,t.chartexDataPointStyle,0,1,h)]},v=jr(e,_,u,d,.22,r),{legRightW:y,legLeftW:b,legTopH:x,legBottomH:S}=ye(v),C=li(t.catAxisFontSizeHpt,d,r);e.save(),e.font=ur(C,lr(t,t.catAxisFontFace,`minor`),t.catAxisFontBold??!1,t.catAxisFontItalic??!1);let w=0;if(!t.catAxisHidden){for(let n=0;n<Math.min(o,t.categories.length);n++)w=Math.max(w,e.measureText(t.categories[n]).width);t.categories.length>0&&(w+=10)}let T=ke(t,c,l,u,d,r,{titleBand:f,legendSideReserveFrac:.22,legendReserve:v,pad:{t:f.bandH+x+2,r:y+u*.02,b:S+d*.02,l:b+w+u*.02}});Ei(e,t,c,l,u,d,l+T.title.topPad,T.title.fontPx);let{px0:E,py0:D,pw:O,ph:k}=T.plotRect,A=k/o,j=A/(1+Mt(t.barGapWidth,`chartex`)/100);for(let n=0;n<o;n++){let o=Math.max(0,a[n]??0),f=O*o/s,_=E+(O-f)/2,v=D+A*n+(A-j)/2;g&&(e.fillStyle=Ea(e,g,_,v,f,j,h,i),e.fillRect(_,v,f,j)),ka(e,t,t.chartexDataPointStyle,p,0,1,h,r)&&e.strokeRect(_,v,f,j);let y=t.categories[n];!t.catAxisHidden&&y!=null&&(e.fillStyle=t.catAxisFontColor?`#${t.catAxisFontColor}`:`#595959`,e.textAlign=`right`,e.textBaseline=`middle`,e.fillText(y,E-6,v+j/2));let b=va(t,p,n,y??``,o,{visible:!1,showVal:!1,showCatName:!1},m);if(b){let n=he(b.fontSizeHpt,r)??li(t.dataLabelFontSizeHpt,d,r),i=lr(t,b.fontFace??t.dataLabelFontFace,`minor`);e.font=`${b.fontBold?`bold `:``}${n}px ${i}`,la(e,b.text,{kind:`bar`,rect:{x:_,y:v,w:f,h:j},orientation:`horizontal`,negative:!1,position:b.position??`ctr`},{x:E,y:D,w:O,h:k},n,b.fontColor?`#${b.fontColor}`:`#ffffff`,b.manualLayout,{x:c,y:l,w:u,h:d})}}if(!t.catAxisHidden&&!t.catAxisLineHidden){let n=it(t.catAxisLineColor,t.catAxisLineWidthEmu,r);e.strokeStyle=n.color,e.lineWidth=n.width,e.beginPath(),e.moveTo(E,D),e.lineTo(E,D+k),e.stroke()}Pr(e,_,v,c,l,u,d,E,D,O,k,f.bandH+2,r,[g],i),e.restore()}function za(e,t,n,r){let i=t.series[0];if(!i||Fa(e,n,Math.max(t.categories.length,i.categories?.length??0,i.values.length)))return;let a=Gt(i,t.categories);if(a.points.length===0)return;let o=_a(i,0),s=Da(t,t.chartexDataPointLineStyle,i,o,1,ar(0,i),{linkedNoStyleFallback:!0});Mi(e,{...t,chartType:`line`,categories:a.categories,series:[{...a.series,showMarker:!1,lineHidden:!s.visible,lineColor:s.color.replace(/^#/,``),lineWidthEmu:s.widthEmu,chartexStyle:{lineDash:s.dash,lineCap:s.cap,lineJoin:s.join}}],catAxisHidden:!1,catAxisTickLabelPos:`none`,showLegend:!1,valMin:t.valMin??0,valMax:t.valMax??1.2,valAxisMajorUnit:t.valAxisMajorUnit??.2},n,r)}function Ba(e,t,n,r){let i=t.series[0];if(!i||Fa(e,n,Math.max(t.categories.length,i.categories?.length??0,i.values.length)))return;let a=Gt(i,t.categories);if(a.points.length===0)return;let o=t.series.find(e=>e.seriesType===`line`),s=o?.chartexFormatIdx??i.chartexFormatIdx??0,c={...o??a.series,name:o?.name||`Cumulative %`,values:a.series.values,categories:a.categories,color:o?.color??ya(t,t.chartexDataPointLineStyle,`line`,s,1)??i.lineColor??i.color,seriesType:`line`,useSecondaryAxis:!0,showMarker:!1},l={min:t.secondaryValAxis?.min??0,max:t.secondaryValAxis?.max??1,title:t.secondaryValAxis?.title??null,hidden:t.secondaryValAxis?.hidden??!1,formatCode:t.secondaryValAxis?.formatCode??`0%`,fontColor:t.secondaryValAxis?.fontColor??null,fontSizeHpt:t.secondaryValAxis?.fontSizeHpt??null,fontFace:t.secondaryValAxis?.fontFace??null,lineColor:t.secondaryValAxis?.lineColor??null,lineWidthEmu:t.secondaryValAxis?.lineWidthEmu??null,lineHidden:t.secondaryValAxis?.lineHidden??!1,majorTickMark:t.secondaryValAxis?.majorTickMark??`out`,minorTickMark:t.secondaryValAxis?.minorTickMark??null,majorUnit:t.secondaryValAxis?.majorUnit??null,minorUnit:t.secondaryValAxis?.minorUnit??null,titleFontSizeHpt:t.secondaryValAxis?.titleFontSizeHpt??null,titleFontBold:t.secondaryValAxis?.titleFontBold??null,titleFontColor:t.secondaryValAxis?.titleFontColor??null,titleFontFace:t.secondaryValAxis?.titleFontFace??null};ji(e,{...t,chartType:`clusteredBar`,categories:a.categories,series:[{...a.orderedSeries,seriesType:null,useSecondaryAxis:!1},c],secondaryValAxis:l},n,r,{gapPolicy:`chartex`,semanticLineNoStyleFallback:!0})}function Va(e,t,n,r){let i=(r??t)-(n??e);if(!(i>0)||!Number.isFinite(i))return null;let a=Le(i,7);if(!(a>0)||!Number.isFinite(a))return null;let o=e-i*.05,s=t+i*.05;e>=0&&(e===0||t>1.2*e)&&(o=0),t<=0&&(t===0||Math.abs(e)>1.2*Math.abs(t))&&(s=0);let c=n??Math.floor(o/a)*a,l=r??Math.ceil(s/a)*a;return![c,l].every(Number.isFinite)||!(l>c)?null:{min:c,max:l,majorUnit:a}}function Ha(e,t,n,r,i){let a=3*r/2,o=3*r,s=t.chartexBox;if(!s||s.categories.length===0||s.series.length===0)return;let{x:c,y:l,w:u,h:d}=n;if(Fa(e,n,Vt(s.series.map(e=>e.valuesByCategory),ja)))return;let f=()=>{e.fillStyle=`#888`,e.font=`12px sans-serif`,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(`(chart values out of range)`,c+u/2,l+d/2)},p=e=>{let t=e.max-e.min,n=t/e.step;return Number.isFinite(e.min)&&Number.isFinite(e.max)&&Number.isFinite(e.step)&&Number.isFinite(t)&&Number.isFinite(n)&&e.max>e.min&&e.step>0&&n<=1e3&&e.min+e.step>e.min},m=1/0,h=-1/0;for(let e of s.series)for(let t of e.valuesByCategory)for(let e of t)Number.isFinite(e)&&(e<m&&(m=e),e>h&&(h=e));if(!isFinite(m)||!isFinite(h))return;if(!Number.isFinite(h-m)){f();return}let g=t.valAxisMajorUnit==null?Va(m,h,t.valMin,t.valMax):null,_=g?{...t,valMin:g.min,valMax:g.max,valAxisMajorUnit:g.majorUnit}:t,v=lr(t,t.valAxisFontFace,`minor`),y=li(t.valAxisFontSizeHpt,d,r),b=Ee(y),x=Ai(r),S=qe({dataMin:m,dataMax:h,explicitMin:_.valMin,explicitMax:_.valMax,axisLenPt:d/r,majorUnit:_.valAxisMajorUnit});if(!p({min:S.min,max:S.max,step:S.majorUnit})){f();return}let C=0;if(!t.valAxisHidden){let n=e.font;e.font=ur(y,v,t.valAxisFontBold??!1,t.valAxisFontItalic??!1);let i=0;for(let n of S.majorTicks){let r=Zr(t,n,!1);i=Math.max(i,e.measureText(r).width)}e.font=n,C=i+b+Pe*r}let w=wi(e,t,u,d,r),T=li(t.catAxisFontSizeHpt,d,r),E=li(t.valAxisFontSizeHpt,d,r),D=Se(t,u,d,r),O=s.series.length,k=s.series.map((e,t)=>_a(e,t)),A=s.series.map((e,n)=>{let r=k[n],i=e.color??Sa(t,r,O,e.chartexStyle);return Aa(t,e.name,e,t.chartexDataPointStyle,r,O,i,!0)}),j={...t,series:A},M=jr(e,j,u,d,.22,r),{legRightW:N,legLeftW:P,legTopH:F,legBottomH:I}=ye(M),L=ke(t,c,l,u,d,r,{titleBand:w,legendSideReserveFrac:.22,legendReserve:M,pad:{t:w.bandH+F+E/2+2,r:N+u*.02,b:I+D.catBandH+(t.catAxisHidden?d*.02:we(T)),l:P+D.valBandW+(t.valAxisHidden?u*.02:C)}}),{px0:R,py0:z,pw:ee,ph:B}=L.plotRect,V=s.categories,H=V.length,U=ni(_,m,h,B/r);if(!p(U)){f();return}Ei(e,t,c,l,u,d,l+L.title.topPad,L.title.fontPx);let{min:te,max:W}=U,ne=W-te,G=e=>z+B*(1-(e-te)/ne),K=it(t.valAxisLineColor,t.valAxisLineWidthEmu,r),q=zr(t,r);if(e.save(),!t.valAxisHidden){if(e.font=ur(y,v,t.valAxisFontBold??!1,t.valAxisFontItalic??!1),e.textAlign=`right`,e.textBaseline=`middle`,t.valAxisMinorGridlines){let n=Br(t,r);for(let t of U.minorLines)Rr(e,R,ee,G(t),!1,n)}for(let n of U.majorLines){let i=G(n);if(t.valAxisMajorGridlines!==!1){e.strokeStyle=q.color,e.lineWidth=q.width;let t=q.dash.length>0&&e.getLineDash?e.getLineDash():[];q.dash.length>0&&e.setLineDash(q.dash),e.beginPath(),e.moveTo(R,i),e.lineTo(R+ee,i),e.stroke(),q.dash.length>0&&e.setLineDash(t)}e.fillStyle=t.valAxisFontColor?`#${t.valAxisFontColor}`:`#595959`,e.fillText(Zr(t,n,!1),R-x,i),Fr(e,t.valAxisMajorTickMark,`val`,R,i,K.color,K.width,!1,t.valAxisLineHidden,`major`,r)}for(let n of U.minorTicks)Fr(e,t.valAxisMinorTickMark,`val`,R,G(n),K.color,K.width,!1,t.valAxisLineHidden,`minor`,r);t.valAxisLineHidden||(e.strokeStyle=K.color,e.lineWidth=K.width,e.beginPath(),e.moveTo(R,z),e.lineTo(R,z+B),e.stroke())}let J=it(t.catAxisLineColor,t.catAxisLineWidthEmu,r);!t.catAxisHidden&&!t.catAxisLineHidden&&(e.strokeStyle=J.color,e.lineWidth=J.width,e.beginPath(),e.moveTo(R,z+B),e.lineTo(R+ee,z+B),e.stroke());let Y=ee/H,re=Mt(t.barGapWidth,`chartex`),ie=e=>`#${s.series[e].color??Sa(t,k[e],O,s.series[e].chartexStyle)}`,ae=e=>Ta(t,k[e],O,s.series[e].chartexStyle,s.series[e].color),oe=s.series.map(e=>e.valuesByCategory.map(t=>Bt(t,e.quartileMethod))),se=(e,t)=>{let n=Ht(R,ee,s.oneBoxPerSeries?1:H,O,s.oneBoxPerSeries?0:e,t,re);return n?{bx:n.boxX,boxW:n.boxWidth,cx:n.centerX}:{bx:R,boxW:0,cx:R}};for(let n=0;n<O;n++){let i=s.series[n];if(!i.meanLine)continue;let a=t.chartexDataPointLineStyle??t.chartexDataPointStyle,o=i.lineColor?`#${i.lineColor}`:ie(n);if(e.save(),ka(e,t,a,i,k[n],O,o,r)||i.lineColor!=null){i.lineColor&&(e.strokeStyle=o),i.lineWidthEmu&&(e.lineWidth=rt(i.lineWidthEmu,r));let t=!1;e.beginPath();for(let r=0;r<H;r++){let i=oe[n][r];if(!i){t=!1;continue}let{cx:a}=se(r,n),o=G(i.mean);t?e.lineTo(a,o):e.moveTo(a,o),t=!0}e.stroke()}e.restore()}let ce=li(t.catAxisFontSizeHpt,d,r),le=Te(ce);for(let n=0;n<H;n++){let c=R+Y*(n+.5);t.catAxisHidden||Fr(e,t.catAxisMajorTickMark,`cat`,z+B,c,J.color,J.width,!1,t.catAxisLineHidden,`major`,r);for(let c=0;c<O;c++){let l=s.series[c],u=oe[c][n];if(!u)continue;let{bx:d,boxW:f,cx:p}=se(n,c),m=ie(c),h=ae(c),g=t.chartexDataPointStyle,_=t.chartexDataPointLineStyle??g,v=t.chartexDataPointMarkerStyle??g,y=k[c],b=ya(t,g,`line`,y,O),x=l.lineColor?`#${l.lineColor}`:b?`#${b}`:m,S=l.lineWidthEmu?rt(l.lineWidthEmu,r):g?.lineWidthEmu==null?1:rt(g.lineWidthEmu,r),C=ya(t,_,`line`,y,O),w=ya(t,v,`fill`,y,O),T=Ta(t,y,O,l.chartexStyle,l.color,v),E=ya(t,v,`line`,y,O),D=(n,i)=>{let a=l.chartexStyle,o=a?.lineHidden!=null||a?.lineColors?.some(Boolean)||a?.lineWidthEmu!=null||a?.lineDash!=null||a?.lineCap!=null||a?.lineJoin!=null,s=ka(e,t,n,l,y,O,i,r),c=n?.lineNoStyle===!0&&!o&&l.lineColor==null&&l.lineWidthEmu==null;return!s&&c&&(e.strokeStyle=i,e.lineWidth=1,e.setLineDash([])),l.lineColor&&(e.strokeStyle=x),l.lineWidthEmu&&(e.lineWidth=S),s||c||l.lineColor!=null},A=G(u.q1),j=G(u.q3),M=Math.min(A,j),N=Math.max(1,Math.abs(A-j)),P=f*.4;D(_,C??x)&&(e.beginPath(),e.moveTo(p,G(u.whiskerHi)),e.lineTo(p,j),e.moveTo(p,A),e.lineTo(p,G(u.whiskerLo)),e.moveTo(p-P/2,G(u.whiskerHi)),e.lineTo(p+P/2,G(u.whiskerHi)),e.moveTo(p-P/2,G(u.whiskerLo)),e.lineTo(p+P/2,G(u.whiskerLo)),e.stroke()),h&&(e.fillStyle=Ea(e,h,d,M,f,N,m,i),e.fillRect(d,M,f,N)),D(g,x)&&e.strokeRect(d+S/2,M+S/2,f-S,N-S);let F=G(u.median);if(D(_,C??x)&&(e.beginPath(),e.moveTo(d,F),e.lineTo(d+f,F),e.stroke()),l.showNonoutliers){let n=a,o=t.chartexMarkerSymbol??`circle`;for(let t of u.inner){if(o===`none`)continue;let a=D(v,E??x),s=G(t);T&&(e.fillStyle=Ea(e,T,p-n,s-n,n*2,n*2,w?`#${w}`:m,i)),o===`circle`?(e.beginPath(),e.arc(p,s,n,0,Math.PI*2),T&&e.fill(),a&&e.stroke()):ia(e,p,s,o,3,T?w?`#${w}`:m:`transparent`,a?E?`#${E}`:x:null,r,e.lineWidth)}}if(l.meanMarker){let t=G(u.mean),n=o;D(v,E??x)&&(e.beginPath(),e.moveTo(p-n,t-n),e.lineTo(p+n,t+n),e.moveTo(p+n,t-n),e.lineTo(p-n,t+n),e.stroke())}if(l.showOutliers){let n=t.chartexMarkerSymbol??`circle`,o=a;for(let t of u.outliers){if(n===`none`)continue;let a=D(v,E??x),s=G(t);T&&(e.fillStyle=Ea(e,T,p-o,s-o,o*2,o*2,w?`#${w}`:m,i)),n===`circle`?(e.beginPath(),e.arc(p,s,o,0,Math.PI*2),T&&e.fill(),a&&e.stroke()):ia(e,p,s,n,3,T?w?`#${w}`:m:`transparent`,a?E?`#${E}`:x:null,r,e.lineWidth)}}}if(!t.catAxisHidden){e.font=`${ce}px ${lr(t,t.catAxisFontFace,`minor`)}`,e.fillStyle=t.catAxisFontColor?`#${t.catAxisFontColor}`:`#595959`,e.textAlign=`center`,e.textBaseline=`top`;let r=V[n];e.fillText(r,c,z+B+le)}}e.restore(),gr(e,t,c,l,u,d,R,z,ee,B,P,I,D.catFontPx,D.valFontPx),Pr(e,j,M,c,l,u,d,R,z,ee,B,w.bandH+2,r,s.series.map((e,t)=>ae(t)),i)}function Ua(e){if(e.length>ja)return!0;let t=0;for(let n of e){if(n.path.length>512||t>ja-n.path.length)return!0;t+=n.path.length}return!1}function Wa(e,t=!1){let n={label:``,layoutWeight:0,value:0,depth:-1,children:[],branchIndex:-1,labelIndex:-1,a0:0,a1:0},r=e.reduce((e,t)=>Number.isFinite(t.size)&&t.size>e?t.size:e,0),i=(e,t)=>e>Number.MAX_VALUE-t?Number.MAX_VALUE:e+t,a=new WeakMap;for(let o of e){let e=Number.isFinite(o.size)&&o.size>0?o.size:0,s=r>0?e/r:0,c=n;for(let n=0;n<o.path.length;n++){let r=o.path[n],l=a.get(c);l||(l=new Map,a.set(c,l));let u=t&&n===o.path.length-1,d=u?void 0:l.get(r);d||(d={label:r,layoutWeight:0,value:0,depth:n,children:[],branchIndex:n===0?c.children.length:c.branchIndex,labelIndex:-1,a0:0,a1:0},c.children.push(d),u||l.set(r,d)),d.layoutWeight+=s,d.value=i(d.value,e),c=d}}n.layoutWeight=n.children.reduce((e,t)=>e+t.layoutWeight,0),n.value=n.children.reduce((e,t)=>i(e,t.value),0);let o=0,s=[...n.children].reverse();for(;s.length>0;){let e=s.pop();e.labelIndex=o++;for(let t=e.children.length-1;t>=0;t--)s.push(e.children[t])}return n}function Ga(e){let t=[e];for(;t.length>0;){let e=t.pop(),n=0;for(let t of e.children)n+=t.layoutWeight;if(n<=0)continue;let r=e.a0;for(let i of e.children){let a=(e.a1-e.a0)*i.layoutWeight/n;i.a0=r,i.a1=r+a,r=i.a1,t.push(i)}}}function Ka(e){let t=e.depth,n=[e];for(;n.length>0;){let e=n.pop();t=Math.max(t,e.depth);for(let t=e.children.length-1;t>=0;t--)n.push(e.children[t])}return t}function qa(e,t,n,r,i){let a=t.chartexSunburst;if(!a||a.rows.length===0)return;let{x:o,y:s,w:c,h:l}=n;if(Ua(a.rows)){Fa(e,n,ja+1);return}let u=Wa(a.rows);if(u.layoutWeight<=0||u.children.length===0)return;let d=t.series[0],f=or(d?.dataLabelOverrides),p=u.children.map((e,n)=>Ta(t,n,u.children.length,d?.chartexStyle,d?.color)),m={...t,chartType:`clusteredBar`,series:u.children.map(e=>{let n=Sa(t,e.branchIndex,u.children.length,d?.chartexStyle);return Aa(t,e.label,d,t.chartexDataPointStyle,e.branchIndex,u.children.length,n,!1,!1)})},h=ke(t,o,s,c,l,r,{titleTopPadFrac:.035,titleBottomPadFrac:.035,legendSideReserveFrac:0,legendReserve:jr(e,m,c,l,.22,r),radialGapFrac:.02});Ei(e,t,o,s,c,l,s+h.title.topPad,h.title.fontPx);let{px0:g,py0:_,pw:v,ph:y}=h.plotRect,b=g+v/2,x=_+y/2,S=Math.min(v,y)*.46;u.a0=-Math.PI/2,u.a1=-Math.PI/2+Math.PI*2,Ga(u);let C=Ka(u)+1,w=S*.18,T=(S-w)/C,E=e=>`#${Sa(t,e,u.children.length,d?.chartexStyle)}`,D=e=>Ta(t,e,u.children.length,d?.chartexStyle,d?.color),O=d?.seriesDataLabels,k=lr(t,O?.fontFace??t.dataLabelFontFace,`minor`),A=he(O?.fontSizeHpt,r)??Math.max(7,Math.min(13,S*.075)),j=O?.fontColor?`#${O.fontColor}`:`#ffffff`,M=Array.from({length:C},()=>[]),N=[u];for(;N.length>0;){let e=N.pop();e.depth>=0&&M[e.depth].push(e);for(let t=e.children.length-1;t>=0;t--)N.push(e.children[t])}e.save();for(let n=0;n<C;n++){let a=w+n*T,p=a+T;for(let m of M[n]){let n=m.a1-m.a0;if(n<=1e-4)continue;e.beginPath(),e.arc(b,x,p,m.a0,m.a1),e.arc(b,x,a,m.a1,m.a0,!0),e.closePath();let h=D(m.branchIndex);h&&(e.fillStyle=Ea(e,h,b-p,x-p,p*2,p*2,E(m.branchIndex),i),e.fill()),ka(e,t,t.chartexDataPointStyle,t.series[0],m.branchIndex,u.children.length,`#ffffff`,r)&&e.stroke();let S=va(t,d,m.labelIndex,m.label,m.value,{visible:!1,showVal:!1,showCatName:!1},f);if(!S)continue;let C=S.text,w=he(S.fontSizeHpt,r)??A,O=S.fontColor?`#${S.fontColor}`:j,M=S.fontFace?lr(t,S.fontFace,`minor`):k,N=(m.a0+m.a1)/2,P=(a+p)/2,F=T-4,I=n*P;if(!S.manualLayout&&F<w*.9&&I<w*.9)continue;let L=b+Math.cos(N)*P,R=x+Math.sin(N)*P;if(e.font=`${S.fontBold?`bold `:``}${w}px ${M}`,S.manualLayout){la(e,C,{kind:`point`,x:L,y:R,position:S.position??`ctr`},{x:g,y:_,w:v,h:y},w,O,S.manualLayout,{x:o,y:s,w:c,h:l});continue}e.save(),e.translate(L,R);let z=N,ee=z*180/Math.PI%360;(ee>90||ee<-90)&&(z+=Math.PI),e.rotate(z),e.font=`${S.fontBold?`bold `:``}${w}px ${M}`,la(e,C,{kind:`point`,x:0,y:0,position:S.position??`ctr`},{x:-F/2,y:-I/2,w:F,h:I},w,O),e.restore()}}e.restore(),Pr(e,m,h.legend,o,s,c,l,g,_,v,y,h.title.bandH+2,r,p,i)}function Ja(e,t){let n=e.map((e,t)=>({node:e,index:t,value:e.layoutWeight})).filter(e=>e.value>0).sort((e,t)=>t.value-e.value||e.index-t.index),r=n.reduce((e,t)=>e+t.value,0);if(r<=0||t.w<=0||t.h<=0)return[];let i=t.w*t.h/r,a=n.map(e=>({...e,area:e.value*i})),o=[],s={...t},c=[],l=0,u=1/0,d=0,f=(e,t,n,r)=>{if(e<=0||t<=0||r<=0)return 1/0;let i=r*r;return Math.max(i*n/(e*e),e*e/(i*t))},p=(e,t)=>{if(e.length!==0)if(s.w>=s.h){let n=s.h>0?t/s.h:0,r=s.y;for(let t=0;t<e.length;t++){let i=t===e.length-1?s.y+s.h-r:e[t].area/n;o.push({node:e[t].node,rect:{x:s.x,y:r,w:n,h:i}}),r+=i}s={x:s.x+n,y:s.y,w:Math.max(0,s.w-n),h:s.h}}else{let n=s.w>0?t/s.w:0,r=s.x;for(let t=0;t<e.length;t++){let i=t===e.length-1?s.x+s.w-r:e[t].area/n;o.push({node:e[t].node,rect:{x:r,y:s.y,w:i,h:n}}),r+=i}s={x:s.x,y:s.y+n,w:s.w,h:Math.max(0,s.h-n)}}},m=0;for(;m<a.length;){let e=a[m],t=Math.min(s.w,s.h),n=l+e.area,r=Math.min(u,e.area),i=Math.max(d,e.area);c.length===0||f(n,r,i,t)<=f(l,u,d,t)?(c.push(e),l=n,u=r,d=i,m++):(p(c,l),c=[],l=0,u=1/0,d=0)}return p(c,l),o}function Ya(e,t,n,r,i){let a=t.chartexTreemap;if(!a||a.rows.length===0)return;if(Ua(a.rows)){Fa(e,n,ja+1);return}let o=Wa(a.rows,!0);if(o.layoutWeight<=0||o.children.length===0)return;let s=t.series[0],c=o.children.map(e=>Ta(t,e.branchIndex,o.children.length,s?.chartexStyle,s?.color)),l={...t,chartType:`clusteredBar`,series:o.children.map(e=>{let n=Sa(t,e.branchIndex,o.children.length,s?.chartexStyle);return Aa(t,e.label,s,t.chartexDataPointStyle,e.branchIndex,o.children.length,n,!0,!1)})},u=jr(e,l,n.w,n.h,.22,r),d=ke(t,n.x,n.y,n.w,n.h,r,{titleTopPadFrac:.035,titleBottomPadFrac:.035,legendSideReserveFrac:0,legendReserve:u,radialGapFrac:.015});Ei(e,t,n.x,n.y,n.w,n.h,n.y+d.title.topPad,d.title.fontPx);let{px0:f,py0:p,pw:m,ph:h}=d.plotRect,g={x:f,y:p,w:m,h},_=a.parentLabelLayout??`overlapping`,v=t.series[0]?.seriesDataLabels,y=lr(t,v?.fontFace??t.dataLabelFontFace,`minor`),b=he(v?.fontSizeHpt,r)??Math.max(8,Math.min(13,d.plotRect.ph*.025)),x=v?.fontColor?`#${v.fontColor}`:`#ffffff`,S=new Map((t.series[0]?.dataLabelOverrides??[]).map(e=>[e.idx,e])),C=t.chartBg?t.chartBg.startsWith(`#`)?t.chartBg:`#${t.chartBg}`:`#ffffff`,w=(a,c)=>{if(c.w<.5||c.h<.5)return;let l=`#${Sa(t,a.branchIndex,o.children.length,s?.chartexStyle)}`,u=Ta(t,a.branchIndex,o.children.length,s?.chartexStyle,s?.color),d=S.get(a.labelIndex),f=d?.fontColor?`#${d.fontColor}`:x,p=he(d?.fontSizeHpt,r)??b,m=d?.fontBold??v?.fontBold??!1;if(a.children.length>0){let r=va(t,s,a.labelIndex,a.label,a.value,{visible:_!==`none`,showVal:!1,showCatName:!0},S),o=r!=null&&(_!==`overlapping`||a.depth===0),h=p,v=r?.fontFace?lr(t,r.fontFace,`minor`):y,b=_===`banner`&&o?Math.min(c.h*.28,h+7):0;b>0&&u&&(e.fillStyle=Ea(e,u,c.x,c.y,c.w,b,l,i),e.fillRect(c.x,c.y,c.w,b));let x={x:c.x,y:c.y+b,w:c.w,h:Math.max(0,c.h-b)};for(let e of Ja(a.children,x))w(e.node,e.rect);if(o&&(r.manualLayout||c.w>h*2&&c.h>h+4)){e.font=`${m?`bold `:``}${h}px ${v}`;let t=b>0?{x:c.x,y:c.y,w:c.w,h:b}:c,i=d?.position??`inBase`;la(e,r.text,r.manualLayout?{kind:`point`,x:c.x+c.w/2,y:c.y+c.h/2,position:i}:{kind:`box`,rect:t,position:i},r.manualLayout?g:t,h,f,r.manualLayout,n)}return}u&&(e.fillStyle=Ea(e,u,c.x,c.y,c.w,c.h,l,i),e.fillRect(c.x,c.y,c.w,c.h)),ka(e,t,t.chartexDataPointStyle,t.series[0],a.branchIndex,o.children.length,C,r,{linkedNoStyleFallback:!0})&&e.strokeRect(c.x,c.y,c.w,c.h);let h=va(t,s,a.labelIndex,a.label,a.value,{visible:!1,showVal:!1,showCatName:!1},S);if(!h)return;let T=he(h.fontSizeHpt,r)??p;if(!h.manualLayout&&(c.w<=T*1.2||c.h<=T*1.2))return;let E=h.fontFace?lr(t,h.fontFace,`minor`):y;e.font=`${h.fontBold?`bold `:``}${T}px ${E}`;let D=c,O=h.position===`outEnd`?`inEnd`:h.position??`ctr`;la(e,h.text,h.manualLayout?{kind:`point`,x:c.x+c.w/2,y:c.y+c.h/2,position:O}:{kind:`box`,rect:D,position:O},h.manualLayout?g:D,T,h.fontColor?`#${h.fontColor}`:f,h.manualLayout,n)};e.save(),e.beginPath(),e.rect(f,p,m,h),e.clip();for(let e of Ja(o.children,{x:f,y:p,w:m,h}))w(e.node,e.rect);e.restore(),Pr(e,l,d.legend,n.x,n.y,n.w,n.h,f,p,m,h,d.title.bandH+2,r,c,i)}function Xa(e,t,n,r){let i=t.chartTextBoxes;if(i?.length)for(let a of i){let i=n.x+a.x*n.w,o=n.y+a.y*n.h,s=a.w*n.w,c=a.h*n.h;if(!(s>0&&c>0))continue;let l=i+(a.lIns??91440)/et*r,u=o+(a.tIns??45720)/et*r,d=i+s-(a.rIns??91440)/et*r,f=o+c-(a.bIns??45720)/et*r,p=d-l,m=f-u;if(!(p>0&&m>0))continue;let h=(e,t)=>{let n=Math.max(1,...t.map(e=>e.fontPx));return{paragraph:e,runs:t,width:t.reduce((e,t)=>e+t.width,0),height:n*1.2,baseline:n*.9}},g=a.paragraphs.flatMap(n=>{let i=n.runs.map(n=>{let i=Math.max(1,(n.fontSizeHpt??1e3)/100*r),a=`${n.bold?`bold `:``}${i}px ${lr(t,n.fontFace,`minor`)}`;return e.font=a,{run:n,text:n.text,fontPx:i,font:a,width:e.measureText(n.text).width}}),o=i.reduce((e,t)=>e+t.width,0);if(a.wrap===`none`||o<=p)return[h(n,i)];let s=[],c=[],l=0,u=()=>{c.length&&(s.push(h(n,c)),c=[],l=0)};for(let t of i){let n=t.text.match(/\s+|\S+/g)??[];for(let r of n){let n=/^\s+$/.test(r);e.font=t.font;let i=e.measureText(r).width;c.length&&l+i>p&&u(),!(n&&!c.length)&&(c.push({...t,text:r,width:i}),l+=i)}}return u(),s.length?s:[h(n,i)]}),_=g.reduce((e,t)=>e+t.height,0),v=a.verticalAnchor===`b`?f-_:a.verticalAnchor===`ctr`?u+(m-_)/2:u;e.save(),e.beginPath(),e.rect(i,o,s,c),e.clip(),e.textAlign=`left`,e.textBaseline=`alphabetic`;let y=v;for(let t of g){let n=t.paragraph.align,r=n===`ctr`?l+(p-t.width)/2:n===`r`?d-t.width:l;for(let n of t.runs)e.font=n.font,e.fillStyle=n.run.color?`#${n.run.color}`:`#000000`,e.fillText(n.text,r,y+t.baseline),r+=n.width;y+=t.height}e.restore()}}function Za(e,t,n,r=tt,i=0,a,o){e.save();try{let{x:s,y:c,w:l,h:u}=n;if(t.chartBg&&(e.fillStyle=`#${t.chartBg}`,e.fillRect(s,c,l,u)),t.chartBorderColor){e.save(),e.strokeStyle=`#${t.chartBorderColor}`,e.lineWidth=t.chartBorderWidthEmu?Math.max(.5,t.chartBorderWidthEmu/et)*r:1;let n=e.lineWidth;e.strokeRect(s+n/2,c+n/2,l-n,u-n),e.restore()}let d=t.chartexBox!=null||t.chartexSunburst!=null||t.chartexTreemap!=null||t.chartexRegionMap!=null;if(t.series.length===0&&!d){e.fillStyle=`#888`,e.font=`12px sans-serif`,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(`(no data)`,s+l/2,c+u/2),Xa(e,t,n,r);return}let f=Na(t),p=Pa(t,a);if((f!=null||p!=null)&&Fa(e,n,Math.max(f??0,p??0))){Xa(e,t,n,r);return}if(a?.render(e,t,n,r)){ti(e,t,n,r),Xa(e,t,n,r);return}if(o?.render(e,t,n,r)){Xa(e,t,n,r);return}switch(t.chartType){case`clusteredBar`:case`clusteredBarH`:case`stackedBar`:case`stackedBarH`:case`stackedBarPct`:case`stackedBarHPct`:ji(e,t,n,r);break;case`line`:case`stackedLine`:case`stackedLinePct`:Mi(e,t,n,r);break;case`area`:case`stackedArea`:case`stackedAreaPct`:Ri(e,t,n,r);break;case`pie`:Hi(e,t,n,!1,r);break;case`ofPie`:Vi(e,t,n,r);break;case`doughnut`:Hi(e,t,n,!0,r);break;case`radar`:Yi(e,t,n,r);break;case`scatter`:case`bubble`:ra(e,t,n,r);break;case`waterfall`:La(e,t,n,r,i);break;case`clusteredColumn`:ji(e,{...t,chartType:`clusteredBar`},n,r,{gapPolicy:`chartex`});break;case`histogram`:Ia(e,t,n,r);break;case`funnel`:Ra(e,t,n,r,i);break;case`paretoLine`:za(e,t,n,r);break;case`pareto`:Ba(e,t,n,r);break;case`stock`:Ni(e,t,n,r);break;case`surface`:Li(e,t,n,r);break;case`boxWhisker`:Ha(e,t,n,r,i);break;case`sunburst`:qa(e,t,n,r,i);break;case`treemap`:Ya(e,t,n,r,i);break;default:e.fillStyle=`#888`,e.font=`11px sans-serif`,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(`Chart: ${t.chartType}`,s+l/2,c+u/2)}ti(e,t,n,r),Xa(e,t,n,r)}finally{e.restore()}}function Qa(e,t,n,r,i,a){for(let o of t){let t=0,s=0;for(let c of o)switch(c.cmd){case`moveTo`:e.moveTo(n+c.x*i,r+c.y*a),t=c.x,s=c.y;break;case`lineTo`:e.lineTo(n+c.x*i,r+c.y*a),t=c.x,s=c.y;break;case`cubicBezTo`:e.bezierCurveTo(n+c.x1*i,r+c.y1*a,n+c.x2*i,r+c.y2*a,n+c.x*i,r+c.y*a),t=c.x,s=c.y;break;case`quadBezTo`:e.quadraticCurveTo(n+c.x1*i,r+c.y1*a,n+c.x*i,r+c.y*a),t=c.x,s=c.y;break;case`arcTo`:{let o=c.wr*i,l=c.hr*a;if(o<=0||l<=0)break;let u=c.stAng*Math.PI/180,d=c.swAng*Math.PI/180,f=n+t*i,p=r+s*a,m=f-o*Math.cos(u),h=p-l*Math.sin(u),g=u+d;e.ellipse(m,h,o,l,0,u,g,d<0),t=(m+o*Math.cos(g)-n)/i,s=(h+l*Math.sin(g)-r)/a;break}case`close`:e.closePath();break}}}const $a=1e-9;function eo(e){return e.cmd===`lineTo`||e.cmd===`cubicBezTo`||e.cmd===`quadBezTo`||e.cmd===`arcTo`}function to(e,t,n,r){let i=n===0?0:n,a=r===0?0:r;return{x:e,y:t,dx:i,dy:a,angle:Math.atan2(a,i)}}function no(e,t,n){switch(n.cmd){case`lineTo`:return{dx:n.x-e,dy:n.y-t};case`cubicBezTo`:{let r=n.x1-e,i=n.y1-t;return Math.abs(r)<$a&&Math.abs(i)<$a&&(r=n.x2-e,i=n.y2-t),Math.abs(r)<$a&&Math.abs(i)<$a&&(r=n.x-e,i=n.y-t),{dx:r,dy:i}}case`quadBezTo`:{let r=n.x1-e,i=n.y1-t;return Math.abs(r)<$a&&Math.abs(i)<$a&&(r=n.x-e,i=n.y-t),{dx:r,dy:i}}case`arcTo`:{let e=n.stAng*Math.PI/180,t=n.swAng<0?-1:1;return{dx:-n.wr*Math.sin(e)*t,dy:n.hr*Math.cos(e)*t}}default:return{dx:0,dy:0}}}function ro(e,t,n){switch(n.cmd){case`moveTo`:case`lineTo`:case`cubicBezTo`:case`quadBezTo`:return{x:n.x,y:n.y};case`arcTo`:{if(n.wr<=0||n.hr<=0)return{x:e,y:t};let r=n.stAng*Math.PI/180,i=r+n.swAng*Math.PI/180,a=e-n.wr*Math.cos(r),o=t-n.hr*Math.sin(r);return{x:a+n.wr*Math.cos(i),y:o+n.hr*Math.sin(i)}}default:return{x:e,y:t}}}function io(e,t,n){let{x:r,y:i}=ro(e,t,n);switch(n.cmd){case`lineTo`:return{dx:n.x-e,dy:n.y-t,x:r,y:i};case`cubicBezTo`:{let a=n.x-n.x2,o=n.y-n.y2;return Math.abs(a)<$a&&Math.abs(o)<$a&&(a=n.x-n.x1,o=n.y-n.y1),Math.abs(a)<$a&&Math.abs(o)<$a&&(a=n.x-e,o=n.y-t),{dx:a,dy:o,x:r,y:i}}case`quadBezTo`:{let a=n.x-n.x1,o=n.y-n.y1;return Math.abs(a)<$a&&Math.abs(o)<$a&&(a=n.x-e,o=n.y-t),{dx:a,dy:o,x:r,y:i}}case`arcTo`:{if(n.wr<=0||n.hr<=0)return{dx:0,dy:0,x:r,y:i};let e=n.stAng*Math.PI/180+n.swAng*Math.PI/180,t=n.swAng<0?-1:1;return{dx:-n.wr*Math.sin(e)*t,dy:n.hr*Math.cos(e)*t,x:r,y:i}}default:return{dx:0,dy:0,x:r,y:i}}}function ao(e){let t=0,n=0,r=!1;for(let i of e)i.cmd===`moveTo`&&(r=!0),{x:t,y:n}=ro(t,n,i);return r?{x:t,y:n}:null}function oo(e){if(e.some(e=>e.cmd===`close`))return!0;let t=e.find(e=>e.cmd===`moveTo`);if(!t)return!1;let n=ao(e);return!n||!e.some(eo)?!1:Math.abs(n.x-t.x)<$a&&Math.abs(n.y-t.y)<$a}function so(e){let t={start:null,end:null};if(!e||e.length===0)return t;let n=e[0];if(n&&n.length>0&&!oo(n)){let e=n.find(e=>e.cmd===`moveTo`),r=n.find(eo);if(e&&r){let n=no(e.x,e.y,r);(Math.abs(n.dx)>$a||Math.abs(n.dy)>$a)&&(t.start=to(e.x,e.y,-n.dx,-n.dy))}}let r=e[e.length-1];if(r&&r.length>0&&!oo(r)){let e=0,n=0,i=-1;for(let e=0;e<r.length;e++)eo(r[e])&&(i=e);if(i>=0){for(let t=0;t<i;t++)({x:e,y:n}=ro(e,n,r[t]));let a=io(e,n,r[i]);(Math.abs(a.dx)>$a||Math.abs(a.dy)>$a)&&(t.end=to(a.x,a.y,a.dx,a.dy))}}return t}var co={accentbordercallout1:{adj:[[`adj1`,`val 18750`],[`adj2`,`val -8333`],[`adj3`,`val 112500`],[`adj4`,`val -38333`]],gd:[[`y1`,`*/ h adj1 100000`],[`x1`,`*/ w adj2 100000`],[`y2`,`*/ h adj3 100000`],[`x2`,`*/ w adj4 100000`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`t`],[`c`],[`l`,`x1`,`b`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`y1`],[`l`,`x2`,`y2`]]}]},accentbordercallout2:{adj:[[`adj1`,`val 18750`],[`adj2`,`val -8333`],[`adj3`,`val 18750`],[`adj4`,`val -16667`],[`adj5`,`val 112500`],[`adj6`,`val -46667`]],gd:[[`y1`,`*/ h adj1 100000`],[`x1`,`*/ w adj2 100000`],[`y2`,`*/ h adj3 100000`],[`x2`,`*/ w adj4 100000`],[`y3`,`*/ h adj5 100000`],[`x3`,`*/ w adj6 100000`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`t`],[`c`],[`l`,`x1`,`b`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`y1`],[`l`,`x2`,`y2`],[`l`,`x3`,`y3`]]}]},accentbordercallout3:{adj:[[`adj1`,`val 18750`],[`adj2`,`val -8333`],[`adj3`,`val 18750`],[`adj4`,`val -16667`],[`adj5`,`val 100000`],[`adj6`,`val -16667`],[`adj7`,`val 112963`],[`adj8`,`val -8333`]],gd:[[`y1`,`*/ h adj1 100000`],[`x1`,`*/ w adj2 100000`],[`y2`,`*/ h adj3 100000`],[`x2`,`*/ w adj4 100000`],[`y3`,`*/ h adj5 100000`],[`x3`,`*/ w adj6 100000`],[`y4`,`*/ h adj7 100000`],[`x4`,`*/ w adj8 100000`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`t`],[`c`],[`l`,`x1`,`b`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`y1`],[`l`,`x2`,`y2`],[`l`,`x3`,`y3`],[`l`,`x4`,`y4`]]}]},accentcallout1:{adj:[[`adj1`,`val 18750`],[`adj2`,`val -8333`],[`adj3`,`val 112500`],[`adj4`,`val -38333`]],gd:[[`y1`,`*/ h adj1 100000`],[`x1`,`*/ w adj2 100000`],[`y2`,`*/ h adj3 100000`],[`x2`,`*/ w adj4 100000`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`t`],[`c`],[`l`,`x1`,`b`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`y1`],[`l`,`x2`,`y2`]]}]},accentcallout2:{adj:[[`adj1`,`val 18750`],[`adj2`,`val -8333`],[`adj3`,`val 18750`],[`adj4`,`val -16667`],[`adj5`,`val 112500`],[`adj6`,`val -46667`]],gd:[[`y1`,`*/ h adj1 100000`],[`x1`,`*/ w adj2 100000`],[`y2`,`*/ h adj3 100000`],[`x2`,`*/ w adj4 100000`],[`y3`,`*/ h adj5 100000`],[`x3`,`*/ w adj6 100000`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`t`],[`c`],[`l`,`x1`,`b`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`y1`],[`l`,`x2`,`y2`],[`l`,`x3`,`y3`]]}]},accentcallout3:{adj:[[`adj1`,`val 18750`],[`adj2`,`val -8333`],[`adj3`,`val 18750`],[`adj4`,`val -16667`],[`adj5`,`val 100000`],[`adj6`,`val -16667`],[`adj7`,`val 112963`],[`adj8`,`val -8333`]],gd:[[`y1`,`*/ h adj1 100000`],[`x1`,`*/ w adj2 100000`],[`y2`,`*/ h adj3 100000`],[`x2`,`*/ w adj4 100000`],[`y3`,`*/ h adj5 100000`],[`x3`,`*/ w adj6 100000`],[`y4`,`*/ h adj7 100000`],[`x4`,`*/ w adj8 100000`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`t`],[`c`],[`l`,`x1`,`b`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`y1`],[`l`,`x2`,`y2`],[`l`,`x3`,`y3`],[`l`,`x4`,`y4`]]}]},actionbuttonbackprevious:{adj:[],gd:[[`dx2`,`*/ ss 3 8`],[`g9`,`+- vc 0 dx2`],[`g10`,`+- vc dx2 0`],[`g11`,`+- hc 0 dx2`],[`g12`,`+- hc dx2 0`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`],[`m`,`g11`,`vc`],[`l`,`g12`,`g9`],[`l`,`g12`,`g10`],[`c`]]},{w:null,h:null,fill:`darken`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`g11`,`vc`],[`l`,`g12`,`g9`],[`l`,`g12`,`g10`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`g11`,`vc`],[`l`,`g12`,`g9`],[`l`,`g12`,`g10`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]},actionbuttonbeginning:{adj:[],gd:[[`dx2`,`*/ ss 3 8`],[`g9`,`+- vc 0 dx2`],[`g10`,`+- vc dx2 0`],[`g11`,`+- hc 0 dx2`],[`g12`,`+- hc dx2 0`],[`g13`,`*/ ss 3 4`],[`g14`,`*/ g13 1 8`],[`g15`,`*/ g13 1 4`],[`g16`,`+- g11 g14 0`],[`g17`,`+- g11 g15 0`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`],[`m`,`g17`,`vc`],[`l`,`g12`,`g9`],[`l`,`g12`,`g10`],[`c`],[`m`,`g16`,`g9`],[`l`,`g11`,`g9`],[`l`,`g11`,`g10`],[`l`,`g16`,`g10`],[`c`]]},{w:null,h:null,fill:`darken`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`g17`,`vc`],[`l`,`g12`,`g9`],[`l`,`g12`,`g10`],[`c`],[`m`,`g16`,`g9`],[`l`,`g11`,`g9`],[`l`,`g11`,`g10`],[`l`,`g16`,`g10`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`g17`,`vc`],[`l`,`g12`,`g9`],[`l`,`g12`,`g10`],[`c`],[`m`,`g16`,`g9`],[`l`,`g16`,`g10`],[`l`,`g11`,`g10`],[`l`,`g11`,`g9`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]},actionbuttonblank:{adj:[],gd:[],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]},actionbuttondocument:{adj:[],gd:[[`dx2`,`*/ ss 3 8`],[`g9`,`+- vc 0 dx2`],[`g10`,`+- vc dx2 0`],[`dx1`,`*/ ss 9 32`],[`g11`,`+- hc 0 dx1`],[`g12`,`+- hc dx1 0`],[`g13`,`*/ ss 3 16`],[`g14`,`+- g12 0 g13`],[`g15`,`+- g9 g13 0`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`],[`m`,`g11`,`g9`],[`l`,`g14`,`g9`],[`l`,`g12`,`g15`],[`l`,`g12`,`g10`],[`l`,`g11`,`g10`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`g11`,`g9`],[`l`,`g14`,`g9`],[`l`,`g14`,`g15`],[`l`,`g12`,`g15`],[`l`,`g12`,`g10`],[`l`,`g11`,`g10`],[`c`]]},{w:null,h:null,fill:`darken`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`g14`,`g9`],[`l`,`g14`,`g15`],[`l`,`g12`,`g15`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`g11`,`g9`],[`l`,`g14`,`g9`],[`l`,`g12`,`g15`],[`l`,`g12`,`g10`],[`l`,`g11`,`g10`],[`c`],[`m`,`g12`,`g15`],[`l`,`g14`,`g15`],[`l`,`g14`,`g9`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]},actionbuttonend:{adj:[],gd:[[`dx2`,`*/ ss 3 8`],[`g9`,`+- vc 0 dx2`],[`g10`,`+- vc dx2 0`],[`g11`,`+- hc 0 dx2`],[`g12`,`+- hc dx2 0`],[`g13`,`*/ ss 3 4`],[`g14`,`*/ g13 3 4`],[`g15`,`*/ g13 7 8`],[`g16`,`+- g11 g14 0`],[`g17`,`+- g11 g15 0`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`],[`m`,`g16`,`vc`],[`l`,`g11`,`g9`],[`l`,`g11`,`g10`],[`c`],[`m`,`g17`,`g9`],[`l`,`g12`,`g9`],[`l`,`g12`,`g10`],[`l`,`g17`,`g10`],[`c`]]},{w:null,h:null,fill:`darken`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`g16`,`vc`],[`l`,`g11`,`g9`],[`l`,`g11`,`g10`],[`c`],[`m`,`g17`,`g9`],[`l`,`g12`,`g9`],[`l`,`g12`,`g10`],[`l`,`g17`,`g10`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`g16`,`vc`],[`l`,`g11`,`g10`],[`l`,`g11`,`g9`],[`c`],[`m`,`g17`,`g9`],[`l`,`g12`,`g9`],[`l`,`g12`,`g10`],[`l`,`g17`,`g10`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]},actionbuttonforwardnext:{adj:[],gd:[[`dx2`,`*/ ss 3 8`],[`g9`,`+- vc 0 dx2`],[`g10`,`+- vc dx2 0`],[`g11`,`+- hc 0 dx2`],[`g12`,`+- hc dx2 0`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`],[`m`,`g12`,`vc`],[`l`,`g11`,`g9`],[`l`,`g11`,`g10`],[`c`]]},{w:null,h:null,fill:`darken`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`g12`,`vc`],[`l`,`g11`,`g9`],[`l`,`g11`,`g10`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`g12`,`vc`],[`l`,`g11`,`g10`],[`l`,`g11`,`g9`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]},actionbuttonhelp:{adj:[],gd:[[`dx2`,`*/ ss 3 8`],[`g9`,`+- vc 0 dx2`],[`g11`,`+- hc 0 dx2`],[`g13`,`*/ ss 3 4`],[`g14`,`*/ g13 1 7`],[`g15`,`*/ g13 3 14`],[`g16`,`*/ g13 2 7`],[`g19`,`*/ g13 3 7`],[`g20`,`*/ g13 4 7`],[`g21`,`*/ g13 17 28`],[`g23`,`*/ g13 21 28`],[`g24`,`*/ g13 11 14`],[`g27`,`+- g9 g16 0`],[`g29`,`+- g9 g21 0`],[`g30`,`+- g9 g23 0`],[`g31`,`+- g9 g24 0`],[`g33`,`+- g11 g15 0`],[`g36`,`+- g11 g19 0`],[`g37`,`+- g11 g20 0`],[`g41`,`*/ g13 1 14`],[`g42`,`*/ g13 3 28`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`],[`m`,`g33`,`g27`],[`a`,`g16`,`g16`,`cd2`,`cd2`],[`a`,`g14`,`g15`,`0`,`cd4`],[`a`,`g41`,`g42`,`3cd4`,`-5400000`],[`l`,`g37`,`g30`],[`l`,`g36`,`g30`],[`l`,`g36`,`g29`],[`a`,`g14`,`g15`,`cd2`,`cd4`],[`a`,`g41`,`g42`,`cd4`,`-5400000`],[`a`,`g14`,`g14`,`0`,`-10800000`],[`c`],[`m`,`hc`,`g31`],[`a`,`g42`,`g42`,`3cd4`,`21600000`],[`c`]]},{w:null,h:null,fill:`darken`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`g33`,`g27`],[`a`,`g16`,`g16`,`cd2`,`cd2`],[`a`,`g14`,`g15`,`0`,`cd4`],[`a`,`g41`,`g42`,`3cd4`,`-5400000`],[`l`,`g37`,`g30`],[`l`,`g36`,`g30`],[`l`,`g36`,`g29`],[`a`,`g14`,`g15`,`cd2`,`cd4`],[`a`,`g41`,`g42`,`cd4`,`-5400000`],[`a`,`g14`,`g14`,`0`,`-10800000`],[`c`],[`m`,`hc`,`g31`],[`a`,`g42`,`g42`,`3cd4`,`21600000`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`g33`,`g27`],[`a`,`g16`,`g16`,`cd2`,`cd2`],[`a`,`g14`,`g15`,`0`,`cd4`],[`a`,`g41`,`g42`,`3cd4`,`-5400000`],[`l`,`g37`,`g30`],[`l`,`g36`,`g30`],[`l`,`g36`,`g29`],[`a`,`g14`,`g15`,`cd2`,`cd4`],[`a`,`g41`,`g42`,`cd4`,`-5400000`],[`a`,`g14`,`g14`,`0`,`-10800000`],[`c`],[`m`,`hc`,`g31`],[`a`,`g42`,`g42`,`3cd4`,`21600000`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]},actionbuttonhome:{adj:[],gd:[[`dx2`,`*/ ss 3 8`],[`g9`,`+- vc 0 dx2`],[`g10`,`+- vc dx2 0`],[`g11`,`+- hc 0 dx2`],[`g12`,`+- hc dx2 0`],[`g13`,`*/ ss 3 4`],[`g14`,`*/ g13 1 16`],[`g15`,`*/ g13 1 8`],[`g16`,`*/ g13 3 16`],[`g17`,`*/ g13 5 16`],[`g18`,`*/ g13 7 16`],[`g19`,`*/ g13 9 16`],[`g20`,`*/ g13 11 16`],[`g21`,`*/ g13 3 4`],[`g22`,`*/ g13 13 16`],[`g23`,`*/ g13 7 8`],[`g24`,`+- g9 g14 0`],[`g25`,`+- g9 g16 0`],[`g26`,`+- g9 g17 0`],[`g27`,`+- g9 g21 0`],[`g28`,`+- g11 g15 0`],[`g29`,`+- g11 g18 0`],[`g30`,`+- g11 g19 0`],[`g31`,`+- g11 g20 0`],[`g32`,`+- g11 g22 0`],[`g33`,`+- g11 g23 0`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`],[`m`,`hc`,`g9`],[`l`,`g11`,`vc`],[`l`,`g28`,`vc`],[`l`,`g28`,`g10`],[`l`,`g33`,`g10`],[`l`,`g33`,`vc`],[`l`,`g12`,`vc`],[`l`,`g32`,`g26`],[`l`,`g32`,`g24`],[`l`,`g31`,`g24`],[`l`,`g31`,`g25`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`g32`,`g26`],[`l`,`g32`,`g24`],[`l`,`g31`,`g24`],[`l`,`g31`,`g25`],[`c`],[`m`,`g28`,`vc`],[`l`,`g28`,`g10`],[`l`,`g29`,`g10`],[`l`,`g29`,`g27`],[`l`,`g30`,`g27`],[`l`,`g30`,`g10`],[`l`,`g33`,`g10`],[`l`,`g33`,`vc`],[`c`]]},{w:null,h:null,fill:`darken`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`hc`,`g9`],[`l`,`g11`,`vc`],[`l`,`g12`,`vc`],[`c`],[`m`,`g29`,`g27`],[`l`,`g30`,`g27`],[`l`,`g30`,`g10`],[`l`,`g29`,`g10`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`hc`,`g9`],[`l`,`g31`,`g25`],[`l`,`g31`,`g24`],[`l`,`g32`,`g24`],[`l`,`g32`,`g26`],[`l`,`g12`,`vc`],[`l`,`g33`,`vc`],[`l`,`g33`,`g10`],[`l`,`g28`,`g10`],[`l`,`g28`,`vc`],[`l`,`g11`,`vc`],[`c`],[`m`,`g31`,`g25`],[`l`,`g32`,`g26`],[`m`,`g33`,`vc`],[`l`,`g28`,`vc`],[`m`,`g29`,`g10`],[`l`,`g29`,`g27`],[`l`,`g30`,`g27`],[`l`,`g30`,`g10`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]},actionbuttoninformation:{adj:[],gd:[[`dx2`,`*/ ss 3 8`],[`g9`,`+- vc 0 dx2`],[`g11`,`+- hc 0 dx2`],[`g13`,`*/ ss 3 4`],[`g14`,`*/ g13 1 32`],[`g17`,`*/ g13 5 16`],[`g18`,`*/ g13 3 8`],[`g19`,`*/ g13 13 32`],[`g20`,`*/ g13 19 32`],[`g22`,`*/ g13 11 16`],[`g23`,`*/ g13 13 16`],[`g24`,`*/ g13 7 8`],[`g25`,`+- g9 g14 0`],[`g28`,`+- g9 g17 0`],[`g29`,`+- g9 g18 0`],[`g30`,`+- g9 g23 0`],[`g31`,`+- g9 g24 0`],[`g32`,`+- g11 g17 0`],[`g34`,`+- g11 g19 0`],[`g35`,`+- g11 g20 0`],[`g37`,`+- g11 g22 0`],[`g38`,`*/ g13 3 32`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`],[`m`,`hc`,`g9`],[`a`,`dx2`,`dx2`,`3cd4`,`21600000`],[`c`]]},{w:null,h:null,fill:`darken`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`hc`,`g9`],[`a`,`dx2`,`dx2`,`3cd4`,`21600000`],[`c`],[`m`,`hc`,`g25`],[`a`,`g38`,`g38`,`3cd4`,`21600000`],[`m`,`g32`,`g28`],[`l`,`g32`,`g29`],[`l`,`g34`,`g29`],[`l`,`g34`,`g30`],[`l`,`g32`,`g30`],[`l`,`g32`,`g31`],[`l`,`g37`,`g31`],[`l`,`g37`,`g30`],[`l`,`g35`,`g30`],[`l`,`g35`,`g28`],[`c`]]},{w:null,h:null,fill:`lighten`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`hc`,`g25`],[`a`,`g38`,`g38`,`3cd4`,`21600000`],[`m`,`g32`,`g28`],[`l`,`g35`,`g28`],[`l`,`g35`,`g30`],[`l`,`g37`,`g30`],[`l`,`g37`,`g31`],[`l`,`g32`,`g31`],[`l`,`g32`,`g30`],[`l`,`g34`,`g30`],[`l`,`g34`,`g29`],[`l`,`g32`,`g29`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`hc`,`g9`],[`a`,`dx2`,`dx2`,`3cd4`,`21600000`],[`c`],[`m`,`hc`,`g25`],[`a`,`g38`,`g38`,`3cd4`,`21600000`],[`m`,`g32`,`g28`],[`l`,`g35`,`g28`],[`l`,`g35`,`g30`],[`l`,`g37`,`g30`],[`l`,`g37`,`g31`],[`l`,`g32`,`g31`],[`l`,`g32`,`g30`],[`l`,`g34`,`g30`],[`l`,`g34`,`g29`],[`l`,`g32`,`g29`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]},actionbuttonmovie:{adj:[],gd:[[`dx2`,`*/ ss 3 8`],[`g9`,`+- vc 0 dx2`],[`g10`,`+- vc dx2 0`],[`g11`,`+- hc 0 dx2`],[`g12`,`+- hc dx2 0`],[`g13`,`*/ ss 3 4`],[`g14`,`*/ g13 1455 21600`],[`g15`,`*/ g13 1905 21600`],[`g16`,`*/ g13 2325 21600`],[`g17`,`*/ g13 16155 21600`],[`g18`,`*/ g13 17010 21600`],[`g19`,`*/ g13 19335 21600`],[`g20`,`*/ g13 19725 21600`],[`g21`,`*/ g13 20595 21600`],[`g22`,`*/ g13 5280 21600`],[`g23`,`*/ g13 5730 21600`],[`g24`,`*/ g13 6630 21600`],[`g25`,`*/ g13 7492 21600`],[`g26`,`*/ g13 9067 21600`],[`g27`,`*/ g13 9555 21600`],[`g28`,`*/ g13 13342 21600`],[`g29`,`*/ g13 14580 21600`],[`g30`,`*/ g13 15592 21600`],[`g31`,`+- g11 g14 0`],[`g32`,`+- g11 g15 0`],[`g33`,`+- g11 g16 0`],[`g34`,`+- g11 g17 0`],[`g35`,`+- g11 g18 0`],[`g36`,`+- g11 g19 0`],[`g37`,`+- g11 g20 0`],[`g38`,`+- g11 g21 0`],[`g39`,`+- g9 g22 0`],[`g40`,`+- g9 g23 0`],[`g41`,`+- g9 g24 0`],[`g42`,`+- g9 g25 0`],[`g43`,`+- g9 g26 0`],[`g44`,`+- g9 g27 0`],[`g45`,`+- g9 g28 0`],[`g46`,`+- g9 g29 0`],[`g47`,`+- g9 g30 0`],[`g48`,`+- g9 g31 0`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`],[`m`,`g11`,`g39`],[`l`,`g11`,`g44`],[`l`,`g31`,`g44`],[`l`,`g32`,`g43`],[`l`,`g33`,`g43`],[`l`,`g33`,`g47`],[`l`,`g35`,`g47`],[`l`,`g35`,`g45`],[`l`,`g36`,`g45`],[`l`,`g38`,`g46`],[`l`,`g12`,`g46`],[`l`,`g12`,`g41`],[`l`,`g38`,`g41`],[`l`,`g37`,`g42`],[`l`,`g35`,`g42`],[`l`,`g35`,`g41`],[`l`,`g34`,`g40`],[`l`,`g32`,`g40`],[`l`,`g31`,`g39`],[`c`]]},{w:null,h:null,fill:`darken`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`g11`,`g39`],[`l`,`g11`,`g44`],[`l`,`g31`,`g44`],[`l`,`g32`,`g43`],[`l`,`g33`,`g43`],[`l`,`g33`,`g47`],[`l`,`g35`,`g47`],[`l`,`g35`,`g45`],[`l`,`g36`,`g45`],[`l`,`g38`,`g46`],[`l`,`g12`,`g46`],[`l`,`g12`,`g41`],[`l`,`g38`,`g41`],[`l`,`g37`,`g42`],[`l`,`g35`,`g42`],[`l`,`g35`,`g41`],[`l`,`g34`,`g40`],[`l`,`g32`,`g40`],[`l`,`g31`,`g39`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`g11`,`g39`],[`l`,`g31`,`g39`],[`l`,`g32`,`g40`],[`l`,`g34`,`g40`],[`l`,`g35`,`g41`],[`l`,`g35`,`g42`],[`l`,`g37`,`g42`],[`l`,`g38`,`g41`],[`l`,`g12`,`g41`],[`l`,`g12`,`g46`],[`l`,`g38`,`g46`],[`l`,`g36`,`g45`],[`l`,`g35`,`g45`],[`l`,`g35`,`g47`],[`l`,`g33`,`g47`],[`l`,`g33`,`g43`],[`l`,`g32`,`g43`],[`l`,`g31`,`g44`],[`l`,`g11`,`g44`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]},actionbuttonreturn:{adj:[],gd:[[`dx2`,`*/ ss 3 8`],[`g9`,`+- vc 0 dx2`],[`g10`,`+- vc dx2 0`],[`g11`,`+- hc 0 dx2`],[`g12`,`+- hc dx2 0`],[`g13`,`*/ ss 3 4`],[`g14`,`*/ g13 7 8`],[`g15`,`*/ g13 3 4`],[`g16`,`*/ g13 5 8`],[`g17`,`*/ g13 3 8`],[`g18`,`*/ g13 1 4`],[`g19`,`+- g9 g15 0`],[`g20`,`+- g9 g16 0`],[`g21`,`+- g9 g18 0`],[`g22`,`+- g11 g14 0`],[`g23`,`+- g11 g15 0`],[`g24`,`+- g11 g16 0`],[`g25`,`+- g11 g17 0`],[`g26`,`+- g11 g18 0`],[`g27`,`*/ g13 1 8`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`],[`m`,`g12`,`g21`],[`l`,`g23`,`g9`],[`l`,`hc`,`g21`],[`l`,`g24`,`g21`],[`l`,`g24`,`g20`],[`a`,`g27`,`g27`,`0`,`cd4`],[`l`,`g25`,`g19`],[`a`,`g27`,`g27`,`cd4`,`cd4`],[`l`,`g26`,`g21`],[`l`,`g11`,`g21`],[`l`,`g11`,`g20`],[`a`,`g17`,`g17`,`cd2`,`-5400000`],[`l`,`hc`,`g10`],[`a`,`g17`,`g17`,`cd4`,`-5400000`],[`l`,`g22`,`g21`],[`c`]]},{w:null,h:null,fill:`darken`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`g12`,`g21`],[`l`,`g23`,`g9`],[`l`,`hc`,`g21`],[`l`,`g24`,`g21`],[`l`,`g24`,`g20`],[`a`,`g27`,`g27`,`0`,`cd4`],[`l`,`g25`,`g19`],[`a`,`g27`,`g27`,`cd4`,`cd4`],[`l`,`g26`,`g21`],[`l`,`g11`,`g21`],[`l`,`g11`,`g20`],[`a`,`g17`,`g17`,`cd2`,`-5400000`],[`l`,`hc`,`g10`],[`a`,`g17`,`g17`,`cd4`,`-5400000`],[`l`,`g22`,`g21`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`g12`,`g21`],[`l`,`g22`,`g21`],[`l`,`g22`,`g20`],[`a`,`g17`,`g17`,`0`,`cd4`],[`l`,`g25`,`g10`],[`a`,`g17`,`g17`,`cd4`,`cd4`],[`l`,`g11`,`g21`],[`l`,`g26`,`g21`],[`l`,`g26`,`g20`],[`a`,`g27`,`g27`,`cd2`,`-5400000`],[`l`,`hc`,`g19`],[`a`,`g27`,`g27`,`cd4`,`-5400000`],[`l`,`g24`,`g21`],[`l`,`hc`,`g21`],[`l`,`g23`,`g9`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]},actionbuttonsound:{adj:[],gd:[[`dx2`,`*/ ss 3 8`],[`g9`,`+- vc 0 dx2`],[`g10`,`+- vc dx2 0`],[`g11`,`+- hc 0 dx2`],[`g12`,`+- hc dx2 0`],[`g13`,`*/ ss 3 4`],[`g14`,`*/ g13 1 8`],[`g15`,`*/ g13 5 16`],[`g16`,`*/ g13 5 8`],[`g17`,`*/ g13 11 16`],[`g18`,`*/ g13 3 4`],[`g19`,`*/ g13 7 8`],[`g20`,`+- g9 g14 0`],[`g21`,`+- g9 g15 0`],[`g22`,`+- g9 g17 0`],[`g23`,`+- g9 g19 0`],[`g24`,`+- g11 g15 0`],[`g25`,`+- g11 g16 0`],[`g26`,`+- g11 g18 0`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`],[`m`,`g11`,`g21`],[`l`,`g11`,`g22`],[`l`,`g24`,`g22`],[`l`,`g25`,`g10`],[`l`,`g25`,`g9`],[`l`,`g24`,`g21`],[`c`]]},{w:null,h:null,fill:`darken`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`g11`,`g21`],[`l`,`g11`,`g22`],[`l`,`g24`,`g22`],[`l`,`g25`,`g10`],[`l`,`g25`,`g9`],[`l`,`g24`,`g21`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`g11`,`g21`],[`l`,`g24`,`g21`],[`l`,`g25`,`g9`],[`l`,`g25`,`g10`],[`l`,`g24`,`g22`],[`l`,`g11`,`g22`],[`c`],[`m`,`g26`,`g21`],[`l`,`g12`,`g20`],[`m`,`g26`,`vc`],[`l`,`g12`,`vc`],[`m`,`g26`,`g22`],[`l`,`g12`,`g23`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]},arc:{adj:[[`adj1`,`val 16200000`],[`adj2`,`val 0`]],gd:[[`stAng`,`pin 0 adj1 21599999`],[`enAng`,`pin 0 adj2 21599999`],[`sw11`,`+- enAng 0 stAng`],[`sw12`,`+- sw11 21600000 0`],[`swAng`,`?: sw11 sw11 sw12`],[`wt1`,`sin wd2 stAng`],[`ht1`,`cos hd2 stAng`],[`dx1`,`cat2 wd2 ht1 wt1`],[`dy1`,`sat2 hd2 ht1 wt1`],[`wt2`,`sin wd2 enAng`],[`ht2`,`cos hd2 enAng`],[`dx2`,`cat2 wd2 ht2 wt2`],[`dy2`,`sat2 hd2 ht2 wt2`],[`x1`,`+- hc dx1 0`],[`y1`,`+- vc dy1 0`],[`x2`,`+- hc dx2 0`],[`y2`,`+- vc dy2 0`],[`sw0`,`+- 21600000 0 stAng`],[`da1`,`+- swAng 0 sw0`],[`g1`,`max x1 x2`],[`ir`,`?: da1 r g1`],[`sw1`,`+- cd4 0 stAng`],[`sw2`,`+- 27000000 0 stAng`],[`sw3`,`?: sw1 sw1 sw2`],[`da2`,`+- swAng 0 sw3`],[`g5`,`max y1 y2`],[`ib`,`?: da2 b g5`],[`sw4`,`+- cd2 0 stAng`],[`sw5`,`+- 32400000 0 stAng`],[`sw6`,`?: sw4 sw4 sw5`],[`da3`,`+- swAng 0 sw6`],[`g9`,`min x1 x2`],[`il`,`?: da3 l g9`],[`sw7`,`+- 3cd4 0 stAng`],[`sw8`,`+- 37800000 0 stAng`],[`sw9`,`?: sw7 sw7 sw8`],[`da4`,`+- swAng 0 sw9`],[`g13`,`min y1 y2`],[`it`,`?: da4 t g13`],[`cang1`,`+- stAng 0 cd4`],[`cang2`,`+- enAng cd4 0`],[`cang3`,`+/ cang1 cang2 2`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`x1`,`y1`],[`a`,`wd2`,`hd2`,`stAng`,`swAng`],[`l`,`hc`,`vc`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`y1`],[`a`,`wd2`,`hd2`,`stAng`,`swAng`]]}]},bentarrow:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 25000`],[`adj3`,`val 25000`],[`adj4`,`val 43750`]],gd:[[`a2`,`pin 0 adj2 50000`],[`maxAdj1`,`*/ a2 2 1`],[`a1`,`pin 0 adj1 maxAdj1`],[`a3`,`pin 0 adj3 50000`],[`th`,`*/ ss a1 100000`],[`aw2`,`*/ ss a2 100000`],[`th2`,`*/ th 1 2`],[`dh2`,`+- aw2 0 th2`],[`ah`,`*/ ss a3 100000`],[`bw`,`+- r 0 ah`],[`bh`,`+- b 0 dh2`],[`bs`,`min bw bh`],[`maxAdj4`,`*/ 100000 bs ss`],[`a4`,`pin 0 adj4 maxAdj4`],[`bd`,`*/ ss a4 100000`],[`bd3`,`+- bd 0 th`],[`bd2`,`max bd3 0`],[`x3`,`+- th bd2 0`],[`x4`,`+- r 0 ah`],[`y3`,`+- dh2 th 0`],[`y4`,`+- y3 dh2 0`],[`y5`,`+- dh2 bd 0`],[`y6`,`+- y3 bd2 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`b`],[`l`,`l`,`y5`],[`a`,`bd`,`bd`,`cd2`,`cd4`],[`l`,`x4`,`dh2`],[`l`,`x4`,`t`],[`l`,`r`,`aw2`],[`l`,`x4`,`y4`],[`l`,`x4`,`y3`],[`l`,`x3`,`y3`],[`a`,`bd2`,`bd2`,`3cd4`,`-5400000`],[`l`,`th`,`b`],[`c`]]}]},bentconnector2:{adj:[],gd:[],paths:[{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`]]}]},bentconnector3:{adj:[[`adj1`,`val 50000`]],gd:[[`x1`,`*/ w adj1 100000`]],paths:[{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`x1`,`t`],[`l`,`x1`,`b`],[`l`,`r`,`b`]]}]},bentconnector4:{adj:[[`adj1`,`val 50000`],[`adj2`,`val 50000`]],gd:[[`x1`,`*/ w adj1 100000`],[`x2`,`+/ x1 r 2`],[`y2`,`*/ h adj2 100000`],[`y1`,`+/ t y2 2`]],paths:[{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`x1`,`t`],[`l`,`x1`,`y2`],[`l`,`r`,`y2`],[`l`,`r`,`b`]]}]},bentconnector5:{adj:[[`adj1`,`val 50000`],[`adj2`,`val 50000`],[`adj3`,`val 50000`]],gd:[[`x1`,`*/ w adj1 100000`],[`x3`,`*/ w adj3 100000`],[`x2`,`+/ x1 x3 2`],[`y2`,`*/ h adj2 100000`],[`y1`,`+/ t y2 2`],[`y3`,`+/ b y2 2`]],paths:[{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`x1`,`t`],[`l`,`x1`,`y2`],[`l`,`x3`,`y2`],[`l`,`x3`,`b`],[`l`,`r`,`b`]]}]},bentuparrow:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 25000`],[`adj3`,`val 25000`]],gd:[[`a1`,`pin 0 adj1 50000`],[`a2`,`pin 0 adj2 50000`],[`a3`,`pin 0 adj3 50000`],[`y1`,`*/ ss a3 100000`],[`dx1`,`*/ ss a2 50000`],[`x1`,`+- r 0 dx1`],[`dx3`,`*/ ss a2 100000`],[`x3`,`+- r 0 dx3`],[`dx2`,`*/ ss a1 200000`],[`x2`,`+- x3 0 dx2`],[`x4`,`+- x3 dx2 0`],[`dy2`,`*/ ss a1 100000`],[`y2`,`+- b 0 dy2`],[`x0`,`*/ x4 1 2`],[`y3`,`+/ y2 b 2`],[`y15`,`+/ y1 b 2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`y2`],[`l`,`x2`,`y2`],[`l`,`x2`,`y1`],[`l`,`x1`,`y1`],[`l`,`x3`,`t`],[`l`,`r`,`y1`],[`l`,`x4`,`y1`],[`l`,`x4`,`b`],[`l`,`l`,`b`],[`c`]]}]},bevel:{adj:[[`adj`,`val 12500`]],gd:[[`a`,`pin 0 adj 50000`],[`x1`,`*/ ss a 100000`],[`x2`,`+- r 0 x1`],[`y2`,`+- b 0 x1`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`x1`,`x1`],[`l`,`x2`,`x1`],[`l`,`x2`,`y2`],[`l`,`x1`,`y2`],[`c`]]},{w:null,h:null,fill:`lightenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`x2`,`x1`],[`l`,`x1`,`x1`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`b`],[`l`,`x1`,`y2`],[`l`,`x2`,`y2`],[`l`,`r`,`b`],[`c`]]},{w:null,h:null,fill:`lighten`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`x1`,`x1`],[`l`,`x1`,`y2`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:`darken`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`r`,`t`],[`l`,`r`,`b`],[`l`,`x2`,`y2`],[`l`,`x2`,`x1`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`],[`m`,`x1`,`x1`],[`l`,`x2`,`x1`],[`l`,`x2`,`y2`],[`l`,`x1`,`y2`],[`c`],[`m`,`l`,`t`],[`l`,`x1`,`x1`],[`m`,`l`,`b`],[`l`,`x1`,`y2`],[`m`,`r`,`t`],[`l`,`x2`,`x1`],[`m`,`r`,`b`],[`l`,`x2`,`y2`]]}]},blockarc:{adj:[[`adj1`,`val 10800000`],[`adj2`,`val 0`],[`adj3`,`val 25000`]],gd:[[`stAng`,`pin 0 adj1 21599999`],[`istAng`,`pin 0 adj2 21599999`],[`a3`,`pin 0 adj3 50000`],[`sw11`,`+- istAng 0 stAng`],[`sw12`,`+- sw11 21600000 0`],[`swAng`,`?: sw11 sw11 sw12`],[`iswAng`,`+- 0 0 swAng`],[`wt1`,`sin wd2 stAng`],[`ht1`,`cos hd2 stAng`],[`wt3`,`sin wd2 istAng`],[`ht3`,`cos hd2 istAng`],[`dx1`,`cat2 wd2 ht1 wt1`],[`dy1`,`sat2 hd2 ht1 wt1`],[`dx3`,`cat2 wd2 ht3 wt3`],[`dy3`,`sat2 hd2 ht3 wt3`],[`x1`,`+- hc dx1 0`],[`y1`,`+- vc dy1 0`],[`x3`,`+- hc dx3 0`],[`y3`,`+- vc dy3 0`],[`dr`,`*/ ss a3 100000`],[`iwd2`,`+- wd2 0 dr`],[`ihd2`,`+- hd2 0 dr`],[`wt2`,`sin iwd2 istAng`],[`ht2`,`cos ihd2 istAng`],[`wt4`,`sin iwd2 stAng`],[`ht4`,`cos ihd2 stAng`],[`dx2`,`cat2 iwd2 ht2 wt2`],[`dy2`,`sat2 ihd2 ht2 wt2`],[`dx4`,`cat2 iwd2 ht4 wt4`],[`dy4`,`sat2 ihd2 ht4 wt4`],[`x2`,`+- hc dx2 0`],[`y2`,`+- vc dy2 0`],[`x4`,`+- hc dx4 0`],[`y4`,`+- vc dy4 0`],[`sw0`,`+- 21600000 0 stAng`],[`da1`,`+- swAng 0 sw0`],[`g1`,`max x1 x2`],[`g2`,`max x3 x4`],[`g3`,`max g1 g2`],[`ir`,`?: da1 r g3`],[`sw1`,`+- cd4 0 stAng`],[`sw2`,`+- 27000000 0 stAng`],[`sw3`,`?: sw1 sw1 sw2`],[`da2`,`+- swAng 0 sw3`],[`g5`,`max y1 y2`],[`g6`,`max y3 y4`],[`g7`,`max g5 g6`],[`ib`,`?: da2 b g7`],[`sw4`,`+- cd2 0 stAng`],[`sw5`,`+- 32400000 0 stAng`],[`sw6`,`?: sw4 sw4 sw5`],[`da3`,`+- swAng 0 sw6`],[`g9`,`min x1 x2`],[`g10`,`min x3 x4`],[`g11`,`min g9 g10`],[`il`,`?: da3 l g11`],[`sw7`,`+- 3cd4 0 stAng`],[`sw8`,`+- 37800000 0 stAng`],[`sw9`,`?: sw7 sw7 sw8`],[`da4`,`+- swAng 0 sw9`],[`g13`,`min y1 y2`],[`g14`,`min y3 y4`],[`g15`,`min g13 g14`],[`it`,`?: da4 t g15`],[`x5`,`+/ x1 x4 2`],[`y5`,`+/ y1 y4 2`],[`x6`,`+/ x3 x2 2`],[`y6`,`+/ y3 y2 2`],[`cang1`,`+- stAng 0 cd4`],[`cang2`,`+- istAng cd4 0`],[`cang3`,`+/ cang1 cang2 2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`y1`],[`a`,`wd2`,`hd2`,`stAng`,`swAng`],[`l`,`x2`,`y2`],[`a`,`iwd2`,`ihd2`,`istAng`,`iswAng`],[`c`]]}]},bordercallout1:{adj:[[`adj1`,`val 18750`],[`adj2`,`val -8333`],[`adj3`,`val 112500`],[`adj4`,`val -38333`]],gd:[[`y1`,`*/ h adj1 100000`],[`x1`,`*/ w adj2 100000`],[`y2`,`*/ h adj3 100000`],[`x2`,`*/ w adj4 100000`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`y1`],[`l`,`x2`,`y2`]]}]},bordercallout2:{adj:[[`adj1`,`val 18750`],[`adj2`,`val -8333`],[`adj3`,`val 18750`],[`adj4`,`val -16667`],[`adj5`,`val 112500`],[`adj6`,`val -46667`]],gd:[[`y1`,`*/ h adj1 100000`],[`x1`,`*/ w adj2 100000`],[`y2`,`*/ h adj3 100000`],[`x2`,`*/ w adj4 100000`],[`y3`,`*/ h adj5 100000`],[`x3`,`*/ w adj6 100000`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`y1`],[`l`,`x2`,`y2`],[`l`,`x3`,`y3`]]}]},bordercallout3:{adj:[[`adj1`,`val 18750`],[`adj2`,`val -8333`],[`adj3`,`val 18750`],[`adj4`,`val -16667`],[`adj5`,`val 100000`],[`adj6`,`val -16667`],[`adj7`,`val 112963`],[`adj8`,`val -8333`]],gd:[[`y1`,`*/ h adj1 100000`],[`x1`,`*/ w adj2 100000`],[`y2`,`*/ h adj3 100000`],[`x2`,`*/ w adj4 100000`],[`y3`,`*/ h adj5 100000`],[`x3`,`*/ w adj6 100000`],[`y4`,`*/ h adj7 100000`],[`x4`,`*/ w adj8 100000`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`y1`],[`l`,`x2`,`y2`],[`l`,`x3`,`y3`],[`l`,`x4`,`y4`]]}]},bracepair:{adj:[[`adj`,`val 8333`]],gd:[[`a`,`pin 0 adj 25000`],[`x1`,`*/ ss a 100000`],[`x2`,`*/ ss a 50000`],[`x3`,`+- r 0 x2`],[`x4`,`+- r 0 x1`],[`y2`,`+- vc 0 x1`],[`y3`,`+- vc x1 0`],[`y4`,`+- b 0 x1`],[`it`,`*/ x1 29289 100000`],[`il`,`+- x1 it 0`],[`ir`,`+- r 0 il`],[`ib`,`+- b 0 it`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`x2`,`b`],[`a`,`x1`,`x1`,`cd4`,`cd4`],[`l`,`x1`,`y3`],[`a`,`x1`,`x1`,`0`,`-5400000`],[`a`,`x1`,`x1`,`cd4`,`-5400000`],[`l`,`x1`,`x1`],[`a`,`x1`,`x1`,`cd2`,`cd4`],[`l`,`x3`,`t`],[`a`,`x1`,`x1`,`3cd4`,`cd4`],[`l`,`x4`,`y2`],[`a`,`x1`,`x1`,`cd2`,`-5400000`],[`a`,`x1`,`x1`,`3cd4`,`-5400000`],[`l`,`x4`,`y4`],[`a`,`x1`,`x1`,`0`,`cd4`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x2`,`b`],[`a`,`x1`,`x1`,`cd4`,`cd4`],[`l`,`x1`,`y3`],[`a`,`x1`,`x1`,`0`,`-5400000`],[`a`,`x1`,`x1`,`cd4`,`-5400000`],[`l`,`x1`,`x1`],[`a`,`x1`,`x1`,`cd2`,`cd4`],[`m`,`x3`,`t`],[`a`,`x1`,`x1`,`3cd4`,`cd4`],[`l`,`x4`,`y2`],[`a`,`x1`,`x1`,`cd2`,`-5400000`],[`a`,`x1`,`x1`,`3cd4`,`-5400000`],[`l`,`x4`,`y4`],[`a`,`x1`,`x1`,`0`,`cd4`]]}]},bracketpair:{adj:[[`adj`,`val 16667`]],gd:[[`a`,`pin 0 adj 50000`],[`x1`,`*/ ss a 100000`],[`x2`,`+- r 0 x1`],[`y2`,`+- b 0 x1`],[`il`,`*/ x1 29289 100000`],[`ir`,`+- r 0 il`],[`ib`,`+- b 0 il`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`x1`],[`a`,`x1`,`x1`,`cd2`,`cd4`],[`l`,`x2`,`t`],[`a`,`x1`,`x1`,`3cd4`,`cd4`],[`l`,`r`,`y2`],[`a`,`x1`,`x1`,`0`,`cd4`],[`l`,`x1`,`b`],[`a`,`x1`,`x1`,`cd4`,`cd4`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`b`],[`a`,`x1`,`x1`,`cd4`,`cd4`],[`l`,`l`,`x1`],[`a`,`x1`,`x1`,`cd2`,`cd4`],[`m`,`x2`,`t`],[`a`,`x1`,`x1`,`3cd4`,`cd4`],[`l`,`r`,`y2`],[`a`,`x1`,`x1`,`0`,`cd4`]]}]},callout1:{adj:[[`adj1`,`val 18750`],[`adj2`,`val -8333`],[`adj3`,`val 112500`],[`adj4`,`val -38333`]],gd:[[`y1`,`*/ h adj1 100000`],[`x1`,`*/ w adj2 100000`],[`y2`,`*/ h adj3 100000`],[`x2`,`*/ w adj4 100000`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`y1`],[`l`,`x2`,`y2`]]}]},callout2:{adj:[[`adj1`,`val 18750`],[`adj2`,`val -8333`],[`adj3`,`val 18750`],[`adj4`,`val -16667`],[`adj5`,`val 112500`],[`adj6`,`val -46667`]],gd:[[`y1`,`*/ h adj1 100000`],[`x1`,`*/ w adj2 100000`],[`y2`,`*/ h adj3 100000`],[`x2`,`*/ w adj4 100000`],[`y3`,`*/ h adj5 100000`],[`x3`,`*/ w adj6 100000`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`y1`],[`l`,`x2`,`y2`],[`l`,`x3`,`y3`]]}]},callout3:{adj:[[`adj1`,`val 18750`],[`adj2`,`val -8333`],[`adj3`,`val 18750`],[`adj4`,`val -16667`],[`adj5`,`val 100000`],[`adj6`,`val -16667`],[`adj7`,`val 112963`],[`adj8`,`val -8333`]],gd:[[`y1`,`*/ h adj1 100000`],[`x1`,`*/ w adj2 100000`],[`y2`,`*/ h adj3 100000`],[`x2`,`*/ w adj4 100000`],[`y3`,`*/ h adj5 100000`],[`x3`,`*/ w adj6 100000`],[`y4`,`*/ h adj7 100000`],[`x4`,`*/ w adj8 100000`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`y1`],[`l`,`x2`,`y2`],[`l`,`x3`,`y3`],[`l`,`x4`,`y4`]]}]},can:{adj:[[`adj`,`val 25000`]],gd:[[`maxAdj`,`*/ 50000 h ss`],[`a`,`pin 0 adj maxAdj`],[`y1`,`*/ ss a 200000`],[`y2`,`+- y1 y1 0`],[`y3`,`+- b 0 y1`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`y1`],[`a`,`wd2`,`y1`,`cd2`,`-10800000`],[`l`,`r`,`y3`],[`a`,`wd2`,`y1`,`0`,`cd2`],[`c`]]},{w:null,h:null,fill:`lighten`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`y1`],[`a`,`wd2`,`y1`,`cd2`,`cd2`],[`a`,`wd2`,`y1`,`0`,`cd2`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`r`,`y1`],[`a`,`wd2`,`y1`,`0`,`cd2`],[`a`,`wd2`,`y1`,`cd2`,`cd2`],[`l`,`r`,`y3`],[`a`,`wd2`,`y1`,`0`,`cd2`],[`l`,`l`,`y1`]]}]},chartplus:{adj:[],gd:[],paths:[{w:10,h:10,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`5`,`0`],[`l`,`5`,`10`],[`m`,`0`,`5`],[`l`,`10`,`5`]]},{w:10,h:10,fill:null,stroke:!1,extrusionOk:!0,cmds:[[`m`,`0`,`0`],[`l`,`0`,`10`],[`l`,`10`,`10`],[`l`,`10`,`0`],[`c`]]}]},chartstar:{adj:[],gd:[],paths:[{w:10,h:10,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`0`,`0`],[`l`,`10`,`10`],[`m`,`0`,`10`],[`l`,`10`,`0`],[`m`,`5`,`0`],[`l`,`5`,`10`]]},{w:10,h:10,fill:null,stroke:!1,extrusionOk:!0,cmds:[[`m`,`0`,`0`],[`l`,`0`,`10`],[`l`,`10`,`10`],[`l`,`10`,`0`],[`c`]]}]},chartx:{adj:[],gd:[],paths:[{w:10,h:10,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`0`,`0`],[`l`,`10`,`10`],[`m`,`0`,`10`],[`l`,`10`,`0`]]},{w:10,h:10,fill:null,stroke:!1,extrusionOk:!0,cmds:[[`m`,`0`,`0`],[`l`,`0`,`10`],[`l`,`10`,`10`],[`l`,`10`,`0`],[`c`]]}]},chevron:{adj:[[`adj`,`val 50000`]],gd:[[`maxAdj`,`*/ 100000 w ss`],[`a`,`pin 0 adj maxAdj`],[`x1`,`*/ ss a 100000`],[`x2`,`+- r 0 x1`],[`x3`,`*/ x2 1 2`],[`dx`,`+- x2 0 x1`],[`il`,`?: dx x1 l`],[`ir`,`?: dx x2 r`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`x2`,`t`],[`l`,`r`,`vc`],[`l`,`x2`,`b`],[`l`,`l`,`b`],[`l`,`x1`,`vc`],[`c`]]}]},chord:{adj:[[`adj1`,`val 2700000`],[`adj2`,`val 16200000`]],gd:[[`stAng`,`pin 0 adj1 21599999`],[`enAng`,`pin 0 adj2 21599999`],[`sw1`,`+- enAng 0 stAng`],[`sw2`,`+- sw1 21600000 0`],[`swAng`,`?: sw1 sw1 sw2`],[`wt1`,`sin wd2 stAng`],[`ht1`,`cos hd2 stAng`],[`dx1`,`cat2 wd2 ht1 wt1`],[`dy1`,`sat2 hd2 ht1 wt1`],[`wt2`,`sin wd2 enAng`],[`ht2`,`cos hd2 enAng`],[`dx2`,`cat2 wd2 ht2 wt2`],[`dy2`,`sat2 hd2 ht2 wt2`],[`x1`,`+- hc dx1 0`],[`y1`,`+- vc dy1 0`],[`x2`,`+- hc dx2 0`],[`y2`,`+- vc dy2 0`],[`x3`,`+/ x1 x2 2`],[`y3`,`+/ y1 y2 2`],[`midAng0`,`*/ swAng 1 2`],[`midAng`,`+- stAng midAng0 cd2`],[`idx`,`cos wd2 2700000`],[`idy`,`sin hd2 2700000`],[`il`,`+- hc 0 idx`],[`ir`,`+- hc idx 0`],[`it`,`+- vc 0 idy`],[`ib`,`+- vc idy 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`y1`],[`a`,`wd2`,`hd2`,`stAng`,`swAng`],[`c`]]}]},circulararrow:{adj:[[`adj1`,`val 12500`],[`adj2`,`val 1142319`],[`adj3`,`val 20457681`],[`adj4`,`val 10800000`],[`adj5`,`val 12500`]],gd:[[`a5`,`pin 0 adj5 25000`],[`maxAdj1`,`*/ a5 2 1`],[`a1`,`pin 0 adj1 maxAdj1`],[`enAng`,`pin 1 adj3 21599999`],[`stAng`,`pin 0 adj4 21599999`],[`th`,`*/ ss a1 100000`],[`thh`,`*/ ss a5 100000`],[`th2`,`*/ th 1 2`],[`rw1`,`+- wd2 th2 thh`],[`rh1`,`+- hd2 th2 thh`],[`rw2`,`+- rw1 0 th`],[`rh2`,`+- rh1 0 th`],[`rw3`,`+- rw2 th2 0`],[`rh3`,`+- rh2 th2 0`],[`wtH`,`sin rw3 enAng`],[`htH`,`cos rh3 enAng`],[`dxH`,`cat2 rw3 htH wtH`],[`dyH`,`sat2 rh3 htH wtH`],[`xH`,`+- hc dxH 0`],[`yH`,`+- vc dyH 0`],[`rI`,`min rw2 rh2`],[`u1`,`*/ dxH dxH 1`],[`u2`,`*/ dyH dyH 1`],[`u3`,`*/ rI rI 1`],[`u4`,`+- u1 0 u3`],[`u5`,`+- u2 0 u3`],[`u6`,`*/ u4 u5 u1`],[`u7`,`*/ u6 1 u2`],[`u8`,`+- 1 0 u7`],[`u9`,`sqrt u8`],[`u10`,`*/ u4 1 dxH`],[`u11`,`*/ u10 1 dyH`],[`u12`,`+/ 1 u9 u11`],[`u13`,`at2 1 u12`],[`u14`,`+- u13 21600000 0`],[`u15`,`?: u13 u13 u14`],[`u16`,`+- u15 0 enAng`],[`u17`,`+- u16 21600000 0`],[`u18`,`?: u16 u16 u17`],[`u19`,`+- u18 0 cd2`],[`u20`,`+- u18 0 21600000`],[`u21`,`?: u19 u20 u18`],[`maxAng`,`abs u21`],[`aAng`,`pin 0 adj2 maxAng`],[`ptAng`,`+- enAng aAng 0`],[`wtA`,`sin rw3 ptAng`],[`htA`,`cos rh3 ptAng`],[`dxA`,`cat2 rw3 htA wtA`],[`dyA`,`sat2 rh3 htA wtA`],[`xA`,`+- hc dxA 0`],[`yA`,`+- vc dyA 0`],[`wtE`,`sin rw1 stAng`],[`htE`,`cos rh1 stAng`],[`dxE`,`cat2 rw1 htE wtE`],[`dyE`,`sat2 rh1 htE wtE`],[`xE`,`+- hc dxE 0`],[`yE`,`+- vc dyE 0`],[`dxG`,`cos thh ptAng`],[`dyG`,`sin thh ptAng`],[`xG`,`+- xH dxG 0`],[`yG`,`+- yH dyG 0`],[`dxB`,`cos thh ptAng`],[`dyB`,`sin thh ptAng`],[`xB`,`+- xH 0 dxB 0`],[`yB`,`+- yH 0 dyB 0`],[`sx1`,`+- xB 0 hc`],[`sy1`,`+- yB 0 vc`],[`sx2`,`+- xG 0 hc`],[`sy2`,`+- yG 0 vc`],[`rO`,`min rw1 rh1`],[`x1O`,`*/ sx1 rO rw1`],[`y1O`,`*/ sy1 rO rh1`],[`x2O`,`*/ sx2 rO rw1`],[`y2O`,`*/ sy2 rO rh1`],[`dxO`,`+- x2O 0 x1O`],[`dyO`,`+- y2O 0 y1O`],[`dO`,`mod dxO dyO 0`],[`q1`,`*/ x1O y2O 1`],[`q2`,`*/ x2O y1O 1`],[`DO`,`+- q1 0 q2`],[`q3`,`*/ rO rO 1`],[`q4`,`*/ dO dO 1`],[`q5`,`*/ q3 q4 1`],[`q6`,`*/ DO DO 1`],[`q7`,`+- q5 0 q6`],[`q8`,`max q7 0`],[`sdelO`,`sqrt q8`],[`ndyO`,`*/ dyO -1 1`],[`sdyO`,`?: ndyO -1 1`],[`q9`,`*/ sdyO dxO 1`],[`q10`,`*/ q9 sdelO 1`],[`q11`,`*/ DO dyO 1`],[`dxF1`,`+/ q11 q10 q4`],[`q12`,`+- q11 0 q10`],[`dxF2`,`*/ q12 1 q4`],[`adyO`,`abs dyO`],[`q13`,`*/ adyO sdelO 1`],[`q14`,`*/ DO dxO -1`],[`dyF1`,`+/ q14 q13 q4`],[`q15`,`+- q14 0 q13`],[`dyF2`,`*/ q15 1 q4`],[`q16`,`+- x2O 0 dxF1`],[`q17`,`+- x2O 0 dxF2`],[`q18`,`+- y2O 0 dyF1`],[`q19`,`+- y2O 0 dyF2`],[`q20`,`mod q16 q18 0`],[`q21`,`mod q17 q19 0`],[`q22`,`+- q21 0 q20`],[`dxF`,`?: q22 dxF1 dxF2`],[`dyF`,`?: q22 dyF1 dyF2`],[`sdxF`,`*/ dxF rw1 rO`],[`sdyF`,`*/ dyF rh1 rO`],[`xF`,`+- hc sdxF 0`],[`yF`,`+- vc sdyF 0`],[`x1I`,`*/ sx1 rI rw2`],[`y1I`,`*/ sy1 rI rh2`],[`x2I`,`*/ sx2 rI rw2`],[`y2I`,`*/ sy2 rI rh2`],[`dxI`,`+- x2I 0 x1I`],[`dyI`,`+- y2I 0 y1I`],[`dI`,`mod dxI dyI 0`],[`v1`,`*/ x1I y2I 1`],[`v2`,`*/ x2I y1I 1`],[`DI`,`+- v1 0 v2`],[`v3`,`*/ rI rI 1`],[`v4`,`*/ dI dI 1`],[`v5`,`*/ v3 v4 1`],[`v6`,`*/ DI DI 1`],[`v7`,`+- v5 0 v6`],[`v8`,`max v7 0`],[`sdelI`,`sqrt v8`],[`v9`,`*/ sdyO dxI 1`],[`v10`,`*/ v9 sdelI 1`],[`v11`,`*/ DI dyI 1`],[`dxC1`,`+/ v11 v10 v4`],[`v12`,`+- v11 0 v10`],[`dxC2`,`*/ v12 1 v4`],[`adyI`,`abs dyI`],[`v13`,`*/ adyI sdelI 1`],[`v14`,`*/ DI dxI -1`],[`dyC1`,`+/ v14 v13 v4`],[`v15`,`+- v14 0 v13`],[`dyC2`,`*/ v15 1 v4`],[`v16`,`+- x1I 0 dxC1`],[`v17`,`+- x1I 0 dxC2`],[`v18`,`+- y1I 0 dyC1`],[`v19`,`+- y1I 0 dyC2`],[`v20`,`mod v16 v18 0`],[`v21`,`mod v17 v19 0`],[`v22`,`+- v21 0 v20`],[`dxC`,`?: v22 dxC1 dxC2`],[`dyC`,`?: v22 dyC1 dyC2`],[`sdxC`,`*/ dxC rw2 rI`],[`sdyC`,`*/ dyC rh2 rI`],[`xC`,`+- hc sdxC 0`],[`yC`,`+- vc sdyC 0`],[`ist0`,`at2 sdxC sdyC`],[`ist1`,`+- ist0 21600000 0`],[`istAng`,`?: ist0 ist0 ist1`],[`isw1`,`+- stAng 0 istAng`],[`isw2`,`+- isw1 0 21600000`],[`iswAng`,`?: isw1 isw2 isw1`],[`p1`,`+- xF 0 xC`],[`p2`,`+- yF 0 yC`],[`p3`,`mod p1 p2 0`],[`p4`,`*/ p3 1 2`],[`p5`,`+- p4 0 thh`],[`xGp`,`?: p5 xF xG`],[`yGp`,`?: p5 yF yG`],[`xBp`,`?: p5 xC xB`],[`yBp`,`?: p5 yC yB`],[`en0`,`at2 sdxF sdyF`],[`en1`,`+- en0 21600000 0`],[`en2`,`?: en0 en0 en1`],[`sw0`,`+- en2 0 stAng`],[`sw1`,`+- sw0 21600000 0`],[`swAng`,`?: sw0 sw0 sw1`],[`wtI`,`sin rw3 stAng`],[`htI`,`cos rh3 stAng`],[`dxI`,`cat2 rw3 htI wtI`],[`dyI`,`sat2 rh3 htI wtI`],[`xI`,`+- hc dxI 0`],[`yI`,`+- vc dyI 0`],[`aI`,`+- stAng 0 cd4`],[`aA`,`+- ptAng cd4 0`],[`aB`,`+- ptAng cd2 0`],[`idx`,`cos rw1 2700000`],[`idy`,`sin rh1 2700000`],[`il`,`+- hc 0 idx`],[`ir`,`+- hc idx 0`],[`it`,`+- vc 0 idy`],[`ib`,`+- vc idy 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`xE`,`yE`],[`a`,`rw1`,`rh1`,`stAng`,`swAng`],[`l`,`xGp`,`yGp`],[`l`,`xA`,`yA`],[`l`,`xBp`,`yBp`],[`l`,`xC`,`yC`],[`a`,`rw2`,`rh2`,`istAng`,`iswAng`],[`c`]]}]},cloud:{adj:[],gd:[[`il`,`*/ w 2977 21600`],[`it`,`*/ h 3262 21600`],[`ir`,`*/ w 17087 21600`],[`ib`,`*/ h 17337 21600`],[`g27`,`*/ w 67 21600`],[`g28`,`*/ h 21577 21600`],[`g29`,`*/ w 21582 21600`],[`g30`,`*/ h 1235 21600`]],paths:[{w:43200,h:43200,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`3900`,`14370`],[`a`,`6753`,`9190`,`-11429249`,`7426832`],[`a`,`5333`,`7267`,`-8646143`,`5396714`],[`a`,`4365`,`5945`,`-8748475`,`5983381`],[`a`,`4857`,`6595`,`-7859164`,`7034504`],[`a`,`5333`,`7273`,`-4722533`,`6541615`],[`a`,`6775`,`9220`,`-2776035`,`7816140`],[`a`,`5785`,`7867`,`37501`,`6842000`],[`a`,`6752`,`9215`,`1347096`,`6910353`],[`a`,`7720`,`10543`,`3974558`,`4542661`],[`a`,`4360`,`5918`,`-16496525`,`8804134`],[`a`,`4345`,`5945`,`-14809710`,`9151131`],[`c`]]},{w:43200,h:43200,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`4693`,`26177`],[`a`,`4345`,`5945`,`5204520`,`1585770`],[`m`,`6928`,`34899`],[`a`,`4360`,`5918`,`4416628`,`686848`],[`m`,`16478`,`39090`],[`a`,`6752`,`9215`,`8257449`,`844866`],[`m`,`28827`,`34751`],[`a`,`6752`,`9215`,`387196`,`959901`],[`m`,`34129`,`22954`],[`a`,`5785`,`7867`,`-4217541`,`4255042`],[`m`,`41798`,`15354`],[`a`,`5333`,`7273`,`1819082`,`1665090`],[`m`,`38324`,`5426`],[`a`,`4857`,`6595`,`-824660`,`891534`],[`m`,`29078`,`3952`],[`a`,`4857`,`6595`,`-8950887`,`1091722`],[`m`,`22141`,`4720`],[`a`,`4365`,`5945`,`-9809656`,`1061181`],[`m`,`14000`,`5192`],[`a`,`6753`,`9190`,`-4002417`,`739161`],[`m`,`4127`,`15789`],[`a`,`6753`,`9190`,`9459261`,`711490`]]}]},cloudcallout:{adj:[[`adj1`,`val -20833`],[`adj2`,`val 62500`]],gd:[[`dxPos`,`*/ w adj1 100000`],[`dyPos`,`*/ h adj2 100000`],[`xPos`,`+- hc dxPos 0`],[`yPos`,`+- vc dyPos 0`],[`ht`,`cat2 hd2 dxPos dyPos`],[`wt`,`sat2 wd2 dxPos dyPos`],[`g2`,`cat2 wd2 ht wt`],[`g3`,`sat2 hd2 ht wt`],[`g4`,`+- hc g2 0`],[`g5`,`+- vc g3 0`],[`g6`,`+- g4 0 xPos`],[`g7`,`+- g5 0 yPos`],[`g8`,`mod g6 g7 0`],[`g9`,`*/ ss 6600 21600`],[`g10`,`+- g8 0 g9`],[`g11`,`*/ g10 1 3`],[`g12`,`*/ ss 1800 21600`],[`g13`,`+- g11 g12 0`],[`g14`,`*/ g13 g6 g8`],[`g15`,`*/ g13 g7 g8`],[`g16`,`+- g14 xPos 0`],[`g17`,`+- g15 yPos 0`],[`g18`,`*/ ss 4800 21600`],[`g19`,`*/ g11 2 1`],[`g20`,`+- g18 g19 0`],[`g21`,`*/ g20 g6 g8`],[`g22`,`*/ g20 g7 g8`],[`g23`,`+- g21 xPos 0`],[`g24`,`+- g22 yPos 0`],[`g25`,`*/ ss 1200 21600`],[`g26`,`*/ ss 600 21600`],[`x23`,`+- xPos g26 0`],[`x24`,`+- g16 g25 0`],[`x25`,`+- g23 g12 0`],[`il`,`*/ w 2977 21600`],[`it`,`*/ h 3262 21600`],[`ir`,`*/ w 17087 21600`],[`ib`,`*/ h 17337 21600`],[`g27`,`*/ w 67 21600`],[`g28`,`*/ h 21577 21600`],[`g29`,`*/ w 21582 21600`],[`g30`,`*/ h 1235 21600`],[`pang`,`at2 dxPos dyPos`]],paths:[{w:43200,h:43200,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`3900`,`14370`],[`a`,`6753`,`9190`,`-11429249`,`7426832`],[`a`,`5333`,`7267`,`-8646143`,`5396714`],[`a`,`4365`,`5945`,`-8748475`,`5983381`],[`a`,`4857`,`6595`,`-7859164`,`7034504`],[`a`,`5333`,`7273`,`-4722533`,`6541615`],[`a`,`6775`,`9220`,`-2776035`,`7816140`],[`a`,`5785`,`7867`,`37501`,`6842000`],[`a`,`6752`,`9215`,`1347096`,`6910353`],[`a`,`7720`,`10543`,`3974558`,`4542661`],[`a`,`4360`,`5918`,`-16496525`,`8804134`],[`a`,`4345`,`5945`,`-14809710`,`9151131`],[`c`]]},{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x23`,`yPos`],[`a`,`g26`,`g26`,`0`,`21600000`],[`c`]]},{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x24`,`g17`],[`a`,`g25`,`g25`,`0`,`21600000`],[`c`]]},{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x25`,`g24`],[`a`,`g12`,`g12`,`0`,`21600000`],[`c`]]},{w:43200,h:43200,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`4693`,`26177`],[`a`,`4345`,`5945`,`5204520`,`1585770`],[`m`,`6928`,`34899`],[`a`,`4360`,`5918`,`4416628`,`686848`],[`m`,`16478`,`39090`],[`a`,`6752`,`9215`,`8257449`,`844866`],[`m`,`28827`,`34751`],[`a`,`6752`,`9215`,`387196`,`959901`],[`m`,`34129`,`22954`],[`a`,`5785`,`7867`,`-4217541`,`4255042`],[`m`,`41798`,`15354`],[`a`,`5333`,`7273`,`1819082`,`1665090`],[`m`,`38324`,`5426`],[`a`,`4857`,`6595`,`-824660`,`891534`],[`m`,`29078`,`3952`],[`a`,`4857`,`6595`,`-8950887`,`1091722`],[`m`,`22141`,`4720`],[`a`,`4365`,`5945`,`-9809656`,`1061181`],[`m`,`14000`,`5192`],[`a`,`6753`,`9190`,`-4002417`,`739161`],[`m`,`4127`,`15789`],[`a`,`6753`,`9190`,`9459261`,`711490`]]}]},corner:{adj:[[`adj1`,`val 50000`],[`adj2`,`val 50000`]],gd:[[`maxAdj1`,`*/ 100000 h ss`],[`maxAdj2`,`*/ 100000 w ss`],[`a1`,`pin 0 adj1 maxAdj1`],[`a2`,`pin 0 adj2 maxAdj2`],[`x1`,`*/ ss a2 100000`],[`dy1`,`*/ ss a1 100000`],[`y1`,`+- b 0 dy1`],[`cx1`,`*/ x1 1 2`],[`cy1`,`+/ y1 b 2`],[`d`,`+- w 0 h`],[`it`,`?: d y1 t`],[`ir`,`?: d r x1`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`x1`,`t`],[`l`,`x1`,`y1`],[`l`,`r`,`y1`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]},cornertabs:{adj:[],gd:[[`md`,`mod w h 0`],[`dx`,`*/ 1 md 20`],[`y1`,`+- 0 b dx`],[`x1`,`+- 0 r dx`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`dx`,`t`],[`l`,`l`,`dx`],[`c`]]},{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`y1`],[`l`,`dx`,`b`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`t`],[`l`,`r`,`t`],[`l`,`r`,`dx`],[`c`]]},{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`r`,`y1`],[`l`,`r`,`b`],[`l`,`x1`,`b`],[`c`]]}]},cube:{adj:[[`adj`,`val 25000`]],gd:[[`a`,`pin 0 adj 100000`],[`y1`,`*/ ss a 100000`],[`y4`,`+- b 0 y1`],[`y2`,`*/ y4 1 2`],[`y3`,`+/ y1 b 2`],[`x4`,`+- r 0 y1`],[`x2`,`*/ x4 1 2`],[`x3`,`+/ y1 r 2`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`y1`],[`l`,`x4`,`y1`],[`l`,`x4`,`b`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`x4`,`y1`],[`l`,`r`,`t`],[`l`,`r`,`y4`],[`l`,`x4`,`b`],[`c`]]},{w:null,h:null,fill:`lightenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`y1`],[`l`,`y1`,`t`],[`l`,`r`,`t`],[`l`,`x4`,`y1`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`l`,`y1`],[`l`,`y1`,`t`],[`l`,`r`,`t`],[`l`,`r`,`y4`],[`l`,`x4`,`b`],[`l`,`l`,`b`],[`c`],[`m`,`l`,`y1`],[`l`,`x4`,`y1`],[`l`,`r`,`t`],[`m`,`x4`,`y1`],[`l`,`x4`,`b`]]}]},curvedconnector2:{adj:[],gd:[],paths:[{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`C`,`wd2`,`t`,`r`,`hd2`,`r`,`b`]]}]},curvedconnector3:{adj:[[`adj1`,`val 50000`]],gd:[[`x2`,`*/ w adj1 100000`],[`x1`,`+/ l x2 2`],[`x3`,`+/ r x2 2`],[`y3`,`*/ h 3 4`]],paths:[{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`C`,`x1`,`t`,`x2`,`hd4`,`x2`,`vc`],[`C`,`x2`,`y3`,`x3`,`b`,`r`,`b`]]}]},curvedconnector4:{adj:[[`adj1`,`val 50000`],[`adj2`,`val 50000`]],gd:[[`x2`,`*/ w adj1 100000`],[`x1`,`+/ l x2 2`],[`x3`,`+/ r x2 2`],[`x4`,`+/ x2 x3 2`],[`x5`,`+/ x3 r 2`],[`y4`,`*/ h adj2 100000`],[`y1`,`+/ t y4 2`],[`y2`,`+/ t y1 2`],[`y3`,`+/ y1 y4 2`],[`y5`,`+/ b y4 2`]],paths:[{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`C`,`x1`,`t`,`x2`,`y2`,`x2`,`y1`],[`C`,`x2`,`y3`,`x4`,`y4`,`x3`,`y4`],[`C`,`x5`,`y4`,`r`,`y5`,`r`,`b`]]}]},curvedconnector5:{adj:[[`adj1`,`val 50000`],[`adj2`,`val 50000`],[`adj3`,`val 50000`]],gd:[[`x3`,`*/ w adj1 100000`],[`x6`,`*/ w adj3 100000`],[`x1`,`+/ x3 x6 2`],[`x2`,`+/ l x3 2`],[`x4`,`+/ x3 x1 2`],[`x5`,`+/ x6 x1 2`],[`x7`,`+/ x6 r 2`],[`y4`,`*/ h adj2 100000`],[`y1`,`+/ t y4 2`],[`y2`,`+/ t y1 2`],[`y3`,`+/ y1 y4 2`],[`y5`,`+/ b y4 2`],[`y6`,`+/ y5 y4 2`],[`y7`,`+/ y5 b 2`]],paths:[{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`C`,`x2`,`t`,`x3`,`y2`,`x3`,`y1`],[`C`,`x3`,`y3`,`x4`,`y4`,`x1`,`y4`],[`C`,`x5`,`y4`,`x6`,`y6`,`x6`,`y5`],[`C`,`x6`,`y7`,`x7`,`b`,`r`,`b`]]}]},curveddownarrow:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 50000`],[`adj3`,`val 25000`]],gd:[[`maxAdj2`,`*/ 50000 w ss`],[`a2`,`pin 0 adj2 maxAdj2`],[`a1`,`pin 0 adj1 100000`],[`th`,`*/ ss a1 100000`],[`aw`,`*/ ss a2 100000`],[`q1`,`+/ th aw 4`],[`wR`,`+- wd2 0 q1`],[`q7`,`*/ wR 2 1`],[`q8`,`*/ q7 q7 1`],[`q9`,`*/ th th 1`],[`q10`,`+- q8 0 q9`],[`q11`,`sqrt q10`],[`idy`,`*/ q11 h q7`],[`maxAdj3`,`*/ 100000 idy ss`],[`a3`,`pin 0 adj3 maxAdj3`],[`ah`,`*/ ss adj3 100000`],[`x3`,`+- wR th 0`],[`q2`,`*/ h h 1`],[`q3`,`*/ ah ah 1`],[`q4`,`+- q2 0 q3`],[`q5`,`sqrt q4`],[`dx`,`*/ q5 wR h`],[`x5`,`+- wR dx 0`],[`x7`,`+- x3 dx 0`],[`q6`,`+- aw 0 th`],[`dh`,`*/ q6 1 2`],[`x4`,`+- x5 0 dh`],[`x8`,`+- x7 dh 0`],[`aw2`,`*/ aw 1 2`],[`x6`,`+- r 0 aw2`],[`y1`,`+- b 0 ah`],[`swAng`,`at2 ah dx`],[`mswAng`,`+- 0 0 swAng`],[`iy`,`+- b 0 idy`],[`ix`,`+/ wR x3 2`],[`q12`,`*/ th 1 2`],[`dang2`,`at2 idy q12`],[`stAng`,`+- 3cd4 swAng 0`],[`stAng2`,`+- 3cd4 0 dang2`],[`swAng2`,`+- dang2 0 cd4`],[`swAng3`,`+- cd4 dang2 0`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`x6`,`b`],[`l`,`x4`,`y1`],[`l`,`x5`,`y1`],[`a`,`wR`,`h`,`stAng`,`mswAng`],[`l`,`x3`,`t`],[`a`,`wR`,`h`,`3cd4`,`swAng`],[`l`,`x8`,`y1`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`ix`,`iy`],[`a`,`wR`,`h`,`stAng2`,`swAng2`],[`l`,`l`,`b`],[`a`,`wR`,`h`,`cd2`,`swAng3`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`ix`,`iy`],[`a`,`wR`,`h`,`stAng2`,`swAng2`],[`l`,`l`,`b`],[`a`,`wR`,`h`,`cd2`,`cd4`],[`l`,`x3`,`t`],[`a`,`wR`,`h`,`3cd4`,`swAng`],[`l`,`x8`,`y1`],[`l`,`x6`,`b`],[`l`,`x4`,`y1`],[`l`,`x5`,`y1`],[`a`,`wR`,`h`,`stAng`,`mswAng`]]}]},curvedleftarrow:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 50000`],[`adj3`,`val 25000`]],gd:[[`maxAdj2`,`*/ 50000 h ss`],[`a2`,`pin 0 adj2 maxAdj2`],[`a1`,`pin 0 adj1 a2`],[`th`,`*/ ss a1 100000`],[`aw`,`*/ ss a2 100000`],[`q1`,`+/ th aw 4`],[`hR`,`+- hd2 0 q1`],[`q7`,`*/ hR 2 1`],[`q8`,`*/ q7 q7 1`],[`q9`,`*/ th th 1`],[`q10`,`+- q8 0 q9`],[`q11`,`sqrt q10`],[`idx`,`*/ q11 w q7`],[`maxAdj3`,`*/ 100000 idx ss`],[`a3`,`pin 0 adj3 maxAdj3`],[`ah`,`*/ ss a3 100000`],[`y3`,`+- hR th 0`],[`q2`,`*/ w w 1`],[`q3`,`*/ ah ah 1`],[`q4`,`+- q2 0 q3`],[`q5`,`sqrt q4`],[`dy`,`*/ q5 hR w`],[`y5`,`+- hR dy 0`],[`y7`,`+- y3 dy 0`],[`q6`,`+- aw 0 th`],[`dh`,`*/ q6 1 2`],[`y4`,`+- y5 0 dh`],[`y8`,`+- y7 dh 0`],[`aw2`,`*/ aw 1 2`],[`y6`,`+- b 0 aw2`],[`x1`,`+- l ah 0`],[`swAng`,`at2 ah dy`],[`mswAng`,`+- 0 0 swAng`],[`ix`,`+- l idx 0`],[`iy`,`+/ hR y3 2`],[`q12`,`*/ th 1 2`],[`dang2`,`at2 idx q12`],[`swAng2`,`+- dang2 0 swAng`],[`swAng3`,`+- swAng dang2 0`],[`stAng3`,`+- 0 0 dang2`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`y6`],[`l`,`x1`,`y4`],[`l`,`x1`,`y5`],[`a`,`w`,`hR`,`swAng`,`swAng2`],[`a`,`w`,`hR`,`stAng3`,`swAng3`],[`l`,`x1`,`y8`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`r`,`y3`],[`a`,`w`,`hR`,`0`,`-5400000`],[`l`,`l`,`t`],[`a`,`w`,`hR`,`3cd4`,`cd4`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`r`,`y3`],[`a`,`w`,`hR`,`0`,`-5400000`],[`l`,`l`,`t`],[`a`,`w`,`hR`,`3cd4`,`cd4`],[`l`,`r`,`y3`],[`a`,`w`,`hR`,`0`,`swAng`],[`l`,`x1`,`y8`],[`l`,`l`,`y6`],[`l`,`x1`,`y4`],[`l`,`x1`,`y5`],[`a`,`w`,`hR`,`swAng`,`swAng2`]]}]},curvedrightarrow:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 50000`],[`adj3`,`val 25000`]],gd:[[`maxAdj2`,`*/ 50000 h ss`],[`a2`,`pin 0 adj2 maxAdj2`],[`a1`,`pin 0 adj1 a2`],[`th`,`*/ ss a1 100000`],[`aw`,`*/ ss a2 100000`],[`q1`,`+/ th aw 4`],[`hR`,`+- hd2 0 q1`],[`q7`,`*/ hR 2 1`],[`q8`,`*/ q7 q7 1`],[`q9`,`*/ th th 1`],[`q10`,`+- q8 0 q9`],[`q11`,`sqrt q10`],[`idx`,`*/ q11 w q7`],[`maxAdj3`,`*/ 100000 idx ss`],[`a3`,`pin 0 adj3 maxAdj3`],[`ah`,`*/ ss a3 100000`],[`y3`,`+- hR th 0`],[`q2`,`*/ w w 1`],[`q3`,`*/ ah ah 1`],[`q4`,`+- q2 0 q3`],[`q5`,`sqrt q4`],[`dy`,`*/ q5 hR w`],[`y5`,`+- hR dy 0`],[`y7`,`+- y3 dy 0`],[`q6`,`+- aw 0 th`],[`dh`,`*/ q6 1 2`],[`y4`,`+- y5 0 dh`],[`y8`,`+- y7 dh 0`],[`aw2`,`*/ aw 1 2`],[`y6`,`+- b 0 aw2`],[`x1`,`+- r 0 ah`],[`swAng`,`at2 ah dy`],[`stAng`,`+- cd2 0 swAng`],[`mswAng`,`+- 0 0 swAng`],[`ix`,`+- r 0 idx`],[`iy`,`+/ hR y3 2`],[`q12`,`*/ th 1 2`],[`dang2`,`at2 idx q12`],[`swAng2`,`+- dang2 0 cd4`],[`swAng3`,`+- cd4 dang2 0`],[`stAng3`,`+- cd2 0 dang2`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`hR`],[`a`,`w`,`hR`,`cd2`,`mswAng`],[`l`,`x1`,`y4`],[`l`,`r`,`y6`],[`l`,`x1`,`y8`],[`l`,`x1`,`y7`],[`a`,`w`,`hR`,`stAng`,`swAng`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`r`,`th`],[`a`,`w`,`hR`,`3cd4`,`swAng2`],[`a`,`w`,`hR`,`stAng3`,`swAng3`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`l`,`hR`],[`a`,`w`,`hR`,`cd2`,`mswAng`],[`l`,`x1`,`y4`],[`l`,`r`,`y6`],[`l`,`x1`,`y8`],[`l`,`x1`,`y7`],[`a`,`w`,`hR`,`stAng`,`swAng`],[`l`,`l`,`hR`],[`a`,`w`,`hR`,`cd2`,`cd4`],[`l`,`r`,`th`],[`a`,`w`,`hR`,`3cd4`,`swAng2`]]}]},curveduparrow:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 50000`],[`adj3`,`val 25000`]],gd:[[`maxAdj2`,`*/ 50000 w ss`],[`a2`,`pin 0 adj2 maxAdj2`],[`a1`,`pin 0 adj1 100000`],[`th`,`*/ ss a1 100000`],[`aw`,`*/ ss a2 100000`],[`q1`,`+/ th aw 4`],[`wR`,`+- wd2 0 q1`],[`q7`,`*/ wR 2 1`],[`q8`,`*/ q7 q7 1`],[`q9`,`*/ th th 1`],[`q10`,`+- q8 0 q9`],[`q11`,`sqrt q10`],[`idy`,`*/ q11 h q7`],[`maxAdj3`,`*/ 100000 idy ss`],[`a3`,`pin 0 adj3 maxAdj3`],[`ah`,`*/ ss adj3 100000`],[`x3`,`+- wR th 0`],[`q2`,`*/ h h 1`],[`q3`,`*/ ah ah 1`],[`q4`,`+- q2 0 q3`],[`q5`,`sqrt q4`],[`dx`,`*/ q5 wR h`],[`x5`,`+- wR dx 0`],[`x7`,`+- x3 dx 0`],[`q6`,`+- aw 0 th`],[`dh`,`*/ q6 1 2`],[`x4`,`+- x5 0 dh`],[`x8`,`+- x7 dh 0`],[`aw2`,`*/ aw 1 2`],[`x6`,`+- r 0 aw2`],[`y1`,`+- t ah 0`],[`swAng`,`at2 ah dx`],[`mswAng`,`+- 0 0 swAng`],[`iy`,`+- t idy 0`],[`ix`,`+/ wR x3 2`],[`q12`,`*/ th 1 2`],[`dang2`,`at2 idy q12`],[`swAng2`,`+- dang2 0 swAng`],[`mswAng2`,`+- 0 0 swAng2`],[`stAng3`,`+- cd4 0 swAng`],[`swAng3`,`+- swAng dang2 0`],[`stAng2`,`+- cd4 0 dang2`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`x6`,`t`],[`l`,`x8`,`y1`],[`l`,`x7`,`y1`],[`a`,`wR`,`h`,`stAng3`,`swAng3`],[`a`,`wR`,`h`,`stAng2`,`swAng2`],[`l`,`x4`,`y1`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`wR`,`b`],[`a`,`wR`,`h`,`cd4`,`cd4`],[`l`,`th`,`t`],[`a`,`wR`,`h`,`cd2`,`-5400000`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`ix`,`iy`],[`a`,`wR`,`h`,`stAng2`,`swAng2`],[`l`,`x4`,`y1`],[`l`,`x6`,`t`],[`l`,`x8`,`y1`],[`l`,`x7`,`y1`],[`a`,`wR`,`h`,`stAng3`,`swAng`],[`l`,`wR`,`b`],[`a`,`wR`,`h`,`cd4`,`cd4`],[`l`,`th`,`t`],[`a`,`wR`,`h`,`cd2`,`-5400000`]]}]},decagon:{adj:[[`vf`,`val 105146`]],gd:[[`shd2`,`*/ hd2 vf 100000`],[`dx1`,`cos wd2 2160000`],[`dx2`,`cos wd2 4320000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- hc dx2 0`],[`x4`,`+- hc dx1 0`],[`dy1`,`sin shd2 4320000`],[`dy2`,`sin shd2 2160000`],[`y1`,`+- vc 0 dy1`],[`y2`,`+- vc 0 dy2`],[`y3`,`+- vc dy2 0`],[`y4`,`+- vc dy1 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`l`,`x1`,`y2`],[`l`,`x2`,`y1`],[`l`,`x3`,`y1`],[`l`,`x4`,`y2`],[`l`,`r`,`vc`],[`l`,`x4`,`y3`],[`l`,`x3`,`y4`],[`l`,`x2`,`y4`],[`l`,`x1`,`y3`],[`c`]]}]},diagstripe:{adj:[[`adj`,`val 50000`]],gd:[[`a`,`pin 0 adj 100000`],[`x2`,`*/ w a 100000`],[`x1`,`*/ x2 1 2`],[`x3`,`+/ x2 r 2`],[`y2`,`*/ h a 100000`],[`y1`,`*/ y2 1 2`],[`y3`,`+/ y2 b 2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`y2`],[`l`,`x2`,`t`],[`l`,`r`,`t`],[`l`,`l`,`b`],[`c`]]}]},diamond:{adj:[],gd:[[`ir`,`*/ w 3 4`],[`ib`,`*/ h 3 4`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`l`,`hc`,`t`],[`l`,`r`,`vc`],[`l`,`hc`,`b`],[`c`]]}]},dodecagon:{adj:[],gd:[[`x1`,`*/ w 2894 21600`],[`x2`,`*/ w 7906 21600`],[`x3`,`*/ w 13694 21600`],[`x4`,`*/ w 18706 21600`],[`y1`,`*/ h 2894 21600`],[`y2`,`*/ h 7906 21600`],[`y3`,`*/ h 13694 21600`],[`y4`,`*/ h 18706 21600`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`y2`],[`l`,`x1`,`y1`],[`l`,`x2`,`t`],[`l`,`x3`,`t`],[`l`,`x4`,`y1`],[`l`,`r`,`y2`],[`l`,`r`,`y3`],[`l`,`x4`,`y4`],[`l`,`x3`,`b`],[`l`,`x2`,`b`],[`l`,`x1`,`y4`],[`l`,`l`,`y3`],[`c`]]}]},donut:{adj:[[`adj`,`val 25000`]],gd:[[`a`,`pin 0 adj 50000`],[`dr`,`*/ ss a 100000`],[`iwd2`,`+- wd2 0 dr`],[`ihd2`,`+- hd2 0 dr`],[`idx`,`cos wd2 2700000`],[`idy`,`sin hd2 2700000`],[`il`,`+- hc 0 idx`],[`ir`,`+- hc idx 0`],[`it`,`+- vc 0 idy`],[`ib`,`+- vc idy 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`a`,`wd2`,`hd2`,`cd2`,`cd4`],[`a`,`wd2`,`hd2`,`3cd4`,`cd4`],[`a`,`wd2`,`hd2`,`0`,`cd4`],[`a`,`wd2`,`hd2`,`cd4`,`cd4`],[`c`],[`m`,`dr`,`vc`],[`a`,`iwd2`,`ihd2`,`cd2`,`-5400000`],[`a`,`iwd2`,`ihd2`,`cd4`,`-5400000`],[`a`,`iwd2`,`ihd2`,`0`,`-5400000`],[`a`,`iwd2`,`ihd2`,`3cd4`,`-5400000`],[`c`]]}]},doublewave:{adj:[[`adj1`,`val 6250`],[`adj2`,`val 0`]],gd:[[`a1`,`pin 0 adj1 12500`],[`a2`,`pin -10000 adj2 10000`],[`y1`,`*/ h a1 100000`],[`dy2`,`*/ y1 10 3`],[`y2`,`+- y1 0 dy2`],[`y3`,`+- y1 dy2 0`],[`y4`,`+- b 0 y1`],[`y5`,`+- y4 0 dy2`],[`y6`,`+- y4 dy2 0`],[`dx1`,`*/ w a2 100000`],[`of2`,`*/ w a2 50000`],[`x1`,`abs dx1`],[`dx2`,`?: of2 0 of2`],[`x2`,`+- l 0 dx2`],[`dx8`,`?: of2 of2 0`],[`x8`,`+- r 0 dx8`],[`dx3`,`+/ dx2 x8 6`],[`x3`,`+- x2 dx3 0`],[`dx4`,`+/ dx2 x8 3`],[`x4`,`+- x2 dx4 0`],[`x5`,`+/ x2 x8 2`],[`x6`,`+- x5 dx3 0`],[`x7`,`+/ x6 x8 2`],[`x9`,`+- l dx8 0`],[`x15`,`+- r dx2 0`],[`x10`,`+- x9 dx3 0`],[`x11`,`+- x9 dx4 0`],[`x12`,`+/ x9 x15 2`],[`x13`,`+- x12 dx3 0`],[`x14`,`+/ x13 x15 2`],[`x16`,`+- r 0 x1`],[`xAdj`,`+- hc dx1 0`],[`il`,`max x2 x9`],[`ir`,`min x8 x15`],[`it`,`*/ h a1 50000`],[`ib`,`+- b 0 it`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x2`,`y1`],[`C`,`x3`,`y2`,`x4`,`y3`,`x5`,`y1`],[`C`,`x6`,`y2`,`x7`,`y3`,`x8`,`y1`],[`l`,`x15`,`y4`],[`C`,`x14`,`y6`,`x13`,`y5`,`x12`,`y4`],[`C`,`x11`,`y6`,`x10`,`y5`,`x9`,`y4`],[`c`]]}]},downarrow:{adj:[[`adj1`,`val 50000`],[`adj2`,`val 50000`]],gd:[[`maxAdj2`,`*/ 100000 h ss`],[`a1`,`pin 0 adj1 100000`],[`a2`,`pin 0 adj2 maxAdj2`],[`dy1`,`*/ ss a2 100000`],[`y1`,`+- b 0 dy1`],[`dx1`,`*/ w a1 200000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc dx1 0`],[`dy2`,`*/ x1 dy1 wd2`],[`y2`,`+- y1 dy2 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`y1`],[`l`,`x1`,`y1`],[`l`,`x1`,`t`],[`l`,`x2`,`t`],[`l`,`x2`,`y1`],[`l`,`r`,`y1`],[`l`,`hc`,`b`],[`c`]]}]},downarrowcallout:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 25000`],[`adj3`,`val 25000`],[`adj4`,`val 64977`]],gd:[[`maxAdj2`,`*/ 50000 w ss`],[`a2`,`pin 0 adj2 maxAdj2`],[`maxAdj1`,`*/ a2 2 1`],[`a1`,`pin 0 adj1 maxAdj1`],[`maxAdj3`,`*/ 100000 h ss`],[`a3`,`pin 0 adj3 maxAdj3`],[`q2`,`*/ a3 ss h`],[`maxAdj4`,`+- 100000 0 q2`],[`a4`,`pin 0 adj4 maxAdj4`],[`dx1`,`*/ ss a2 100000`],[`dx2`,`*/ ss a1 200000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- hc dx2 0`],[`x4`,`+- hc dx1 0`],[`dy3`,`*/ ss a3 100000`],[`y3`,`+- b 0 dy3`],[`y2`,`*/ h a4 100000`],[`y1`,`*/ y2 1 2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`y2`],[`l`,`x3`,`y2`],[`l`,`x3`,`y3`],[`l`,`x4`,`y3`],[`l`,`hc`,`b`],[`l`,`x1`,`y3`],[`l`,`x2`,`y3`],[`l`,`x2`,`y2`],[`l`,`l`,`y2`],[`c`]]}]},ellipse:{adj:[],gd:[[`idx`,`cos wd2 2700000`],[`idy`,`sin hd2 2700000`],[`il`,`+- hc 0 idx`],[`ir`,`+- hc idx 0`],[`it`,`+- vc 0 idy`],[`ib`,`+- vc idy 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`a`,`wd2`,`hd2`,`cd2`,`cd4`],[`a`,`wd2`,`hd2`,`3cd4`,`cd4`],[`a`,`wd2`,`hd2`,`0`,`cd4`],[`a`,`wd2`,`hd2`,`cd4`,`cd4`],[`c`]]}]},ellipseribbon:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 50000`],[`adj3`,`val 12500`]],gd:[[`a1`,`pin 0 adj1 100000`],[`a2`,`pin 25000 adj2 75000`],[`q10`,`+- 100000 0 a1`],[`q11`,`*/ q10 1 2`],[`q12`,`+- a1 0 q11`],[`minAdj3`,`max 0 q12`],[`a3`,`pin minAdj3 adj3 a1`],[`dx2`,`*/ w a2 200000`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- x2 wd8 0`],[`x4`,`+- r 0 x3`],[`x5`,`+- r 0 x2`],[`x6`,`+- r 0 wd8`],[`dy1`,`*/ h a3 100000`],[`f1`,`*/ 4 dy1 w`],[`q1`,`*/ x3 x3 w`],[`q2`,`+- x3 0 q1`],[`y1`,`*/ f1 q2 1`],[`cx1`,`*/ x3 1 2`],[`cy1`,`*/ f1 cx1 1`],[`cx2`,`+- r 0 cx1`],[`q1`,`*/ h a1 100000`],[`dy3`,`+- q1 0 dy1`],[`q3`,`*/ x2 x2 w`],[`q4`,`+- x2 0 q3`],[`q5`,`*/ f1 q4 1`],[`y3`,`+- q5 dy3 0`],[`q6`,`+- dy1 dy3 y3`],[`q7`,`+- q6 dy1 0`],[`cy3`,`+- q7 dy3 0`],[`rh`,`+- b 0 q1`],[`q8`,`*/ dy1 14 16`],[`y2`,`+/ q8 rh 2`],[`y5`,`+- q5 rh 0`],[`y6`,`+- y3 rh 0`],[`cx4`,`*/ x2 1 2`],[`q9`,`*/ f1 cx4 1`],[`cy4`,`+- q9 rh 0`],[`cx5`,`+- r 0 cx4`],[`cy6`,`+- cy3 rh 0`],[`y7`,`+- y1 dy3 0`],[`cy7`,`+- q1 q1 y7`],[`y8`,`+- b 0 dy1`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`Q`,`cx1`,`cy1`,`x3`,`y1`],[`l`,`x2`,`y3`],[`Q`,`hc`,`cy3`,`x5`,`y3`],[`l`,`x4`,`y1`],[`Q`,`cx2`,`cy1`,`r`,`t`],[`l`,`x6`,`y2`],[`l`,`r`,`rh`],[`Q`,`cx5`,`cy4`,`x5`,`y5`],[`l`,`x5`,`y6`],[`Q`,`hc`,`cy6`,`x2`,`y6`],[`l`,`x2`,`y5`],[`Q`,`cx4`,`cy4`,`l`,`rh`],[`l`,`wd8`,`y2`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`x3`,`y7`],[`l`,`x3`,`y1`],[`l`,`x2`,`y3`],[`Q`,`hc`,`cy3`,`x5`,`y3`],[`l`,`x4`,`y1`],[`l`,`x4`,`y7`],[`Q`,`hc`,`cy7`,`x3`,`y7`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`Q`,`cx1`,`cy1`,`x3`,`y1`],[`l`,`x2`,`y3`],[`Q`,`hc`,`cy3`,`x5`,`y3`],[`l`,`x4`,`y1`],[`Q`,`cx2`,`cy1`,`r`,`t`],[`l`,`x6`,`y2`],[`l`,`r`,`rh`],[`Q`,`cx5`,`cy4`,`x5`,`y5`],[`l`,`x5`,`y6`],[`Q`,`hc`,`cy6`,`x2`,`y6`],[`l`,`x2`,`y5`],[`Q`,`cx4`,`cy4`,`l`,`rh`],[`l`,`wd8`,`y2`],[`c`],[`m`,`x2`,`y5`],[`l`,`x2`,`y3`],[`m`,`x5`,`y3`],[`l`,`x5`,`y5`],[`m`,`x3`,`y1`],[`l`,`x3`,`y7`],[`m`,`x4`,`y7`],[`l`,`x4`,`y1`]]}]},ellipseribbon2:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 50000`],[`adj3`,`val 12500`]],gd:[[`a1`,`pin 0 adj1 100000`],[`a2`,`pin 25000 adj2 75000`],[`q10`,`+- 100000 0 a1`],[`q11`,`*/ q10 1 2`],[`q12`,`+- a1 0 q11`],[`minAdj3`,`max 0 q12`],[`a3`,`pin minAdj3 adj3 a1`],[`dx2`,`*/ w a2 200000`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- x2 wd8 0`],[`x4`,`+- r 0 x3`],[`x5`,`+- r 0 x2`],[`x6`,`+- r 0 wd8`],[`dy1`,`*/ h a3 100000`],[`f1`,`*/ 4 dy1 w`],[`q1`,`*/ x3 x3 w`],[`q2`,`+- x3 0 q1`],[`u1`,`*/ f1 q2 1`],[`y1`,`+- b 0 u1`],[`cx1`,`*/ x3 1 2`],[`cu1`,`*/ f1 cx1 1`],[`cy1`,`+- b 0 cu1`],[`cx2`,`+- r 0 cx1`],[`q1`,`*/ h a1 100000`],[`dy3`,`+- q1 0 dy1`],[`q3`,`*/ x2 x2 w`],[`q4`,`+- x2 0 q3`],[`q5`,`*/ f1 q4 1`],[`u3`,`+- q5 dy3 0`],[`y3`,`+- b 0 u3`],[`q6`,`+- dy1 dy3 u3`],[`q7`,`+- q6 dy1 0`],[`cu3`,`+- q7 dy3 0`],[`cy3`,`+- b 0 cu3`],[`rh`,`+- b 0 q1`],[`q8`,`*/ dy1 14 16`],[`u2`,`+/ q8 rh 2`],[`y2`,`+- b 0 u2`],[`u5`,`+- q5 rh 0`],[`y5`,`+- b 0 u5`],[`u6`,`+- u3 rh 0`],[`y6`,`+- b 0 u6`],[`cx4`,`*/ x2 1 2`],[`q9`,`*/ f1 cx4 1`],[`cu4`,`+- q9 rh 0`],[`cy4`,`+- b 0 cu4`],[`cx5`,`+- r 0 cx4`],[`cu6`,`+- cu3 rh 0`],[`cy6`,`+- b 0 cu6`],[`u7`,`+- u1 dy3 0`],[`y7`,`+- b 0 u7`],[`cu7`,`+- q1 q1 u7`],[`cy7`,`+- b 0 cu7`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`b`],[`Q`,`cx1`,`cy1`,`x3`,`y1`],[`l`,`x2`,`y3`],[`Q`,`hc`,`cy3`,`x5`,`y3`],[`l`,`x4`,`y1`],[`Q`,`cx2`,`cy1`,`r`,`b`],[`l`,`x6`,`y2`],[`l`,`r`,`q1`],[`Q`,`cx5`,`cy4`,`x5`,`y5`],[`l`,`x5`,`y6`],[`Q`,`hc`,`cy6`,`x2`,`y6`],[`l`,`x2`,`y5`],[`Q`,`cx4`,`cy4`,`l`,`q1`],[`l`,`wd8`,`y2`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`x3`,`y7`],[`l`,`x3`,`y1`],[`l`,`x2`,`y3`],[`Q`,`hc`,`cy3`,`x5`,`y3`],[`l`,`x4`,`y1`],[`l`,`x4`,`y7`],[`Q`,`hc`,`cy7`,`x3`,`y7`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`l`,`b`],[`l`,`wd8`,`y2`],[`l`,`l`,`q1`],[`Q`,`cx4`,`cy4`,`x2`,`y5`],[`l`,`x2`,`y6`],[`Q`,`hc`,`cy6`,`x5`,`y6`],[`l`,`x5`,`y5`],[`Q`,`cx5`,`cy4`,`r`,`q1`],[`l`,`x6`,`y2`],[`l`,`r`,`b`],[`Q`,`cx2`,`cy1`,`x4`,`y1`],[`l`,`x5`,`y3`],[`Q`,`hc`,`cy3`,`x2`,`y3`],[`l`,`x3`,`y1`],[`Q`,`cx1`,`cy1`,`l`,`b`],[`c`],[`m`,`x2`,`y3`],[`l`,`x2`,`y5`],[`m`,`x5`,`y5`],[`l`,`x5`,`y3`],[`m`,`x3`,`y7`],[`l`,`x3`,`y1`],[`m`,`x4`,`y1`],[`l`,`x4`,`y7`]]}]},flowchartalternateprocess:{adj:[],gd:[[`x2`,`+- r 0 ssd6`],[`y2`,`+- b 0 ssd6`],[`il`,`*/ ssd6 29289 100000`],[`ir`,`+- r 0 il`],[`ib`,`+- b 0 il`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`ssd6`],[`a`,`ssd6`,`ssd6`,`cd2`,`cd4`],[`l`,`x2`,`t`],[`a`,`ssd6`,`ssd6`,`3cd4`,`cd4`],[`l`,`r`,`y2`],[`a`,`ssd6`,`ssd6`,`0`,`cd4`],[`l`,`ssd6`,`b`],[`a`,`ssd6`,`ssd6`,`cd4`,`cd4`],[`c`]]}]},flowchartcollate:{adj:[],gd:[[`ir`,`*/ w 3 4`],[`ib`,`*/ h 3 4`]],paths:[{w:2,h:2,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`0`],[`l`,`2`,`0`],[`l`,`1`,`1`],[`l`,`2`,`2`],[`l`,`0`,`2`],[`l`,`1`,`1`],[`c`]]}]},flowchartconnector:{adj:[],gd:[[`idx`,`cos wd2 2700000`],[`idy`,`sin hd2 2700000`],[`il`,`+- hc 0 idx`],[`ir`,`+- hc idx 0`],[`it`,`+- vc 0 idy`],[`ib`,`+- vc idy 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`a`,`wd2`,`hd2`,`cd2`,`cd4`],[`a`,`wd2`,`hd2`,`3cd4`,`cd4`],[`a`,`wd2`,`hd2`,`0`,`cd4`],[`a`,`wd2`,`hd2`,`cd4`,`cd4`],[`c`]]}]},flowchartdecision:{adj:[],gd:[[`ir`,`*/ w 3 4`],[`ib`,`*/ h 3 4`]],paths:[{w:2,h:2,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`1`],[`l`,`1`,`0`],[`l`,`2`,`1`],[`l`,`1`,`2`],[`c`]]}]},flowchartdelay:{adj:[],gd:[[`idx`,`cos wd2 2700000`],[`idy`,`sin hd2 2700000`],[`ir`,`+- hc idx 0`],[`it`,`+- vc 0 idy`],[`ib`,`+- vc idy 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`hc`,`t`],[`a`,`wd2`,`hd2`,`3cd4`,`cd2`],[`l`,`l`,`b`],[`c`]]}]},flowchartdisplay:{adj:[],gd:[[`x2`,`*/ w 5 6`]],paths:[{w:6,h:6,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`3`],[`l`,`1`,`0`],[`l`,`5`,`0`],[`a`,`1`,`3`,`3cd4`,`cd2`],[`l`,`1`,`6`],[`c`]]}]},flowchartdocument:{adj:[],gd:[[`y1`,`*/ h 17322 21600`],[`y2`,`*/ h 20172 21600`]],paths:[{w:21600,h:21600,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`0`],[`l`,`21600`,`0`],[`l`,`21600`,`17322`],[`C`,`10800`,`17322`,`10800`,`23922`,`0`,`20172`],[`c`]]}]},flowchartextract:{adj:[],gd:[[`x2`,`*/ w 3 4`]],paths:[{w:2,h:2,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`2`],[`l`,`1`,`0`],[`l`,`2`,`2`],[`c`]]}]},flowchartinputoutput:{adj:[],gd:[[`x3`,`*/ w 2 5`],[`x4`,`*/ w 3 5`],[`x5`,`*/ w 4 5`],[`x6`,`*/ w 9 10`]],paths:[{w:5,h:5,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`5`],[`l`,`1`,`0`],[`l`,`5`,`0`],[`l`,`4`,`5`],[`c`]]}]},flowchartinternalstorage:{adj:[],gd:[],paths:[{w:1,h:1,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`0`,`0`],[`l`,`1`,`0`],[`l`,`1`,`1`],[`l`,`0`,`1`],[`c`]]},{w:8,h:8,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`1`,`0`],[`l`,`1`,`8`],[`m`,`0`,`1`],[`l`,`8`,`1`]]},{w:1,h:1,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`0`],[`l`,`1`,`0`],[`l`,`1`,`1`],[`l`,`0`,`1`],[`c`]]}]},flowchartmagneticdisk:{adj:[],gd:[[`y3`,`*/ h 5 6`]],paths:[{w:6,h:6,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`0`,`1`],[`a`,`3`,`1`,`cd2`,`cd2`],[`l`,`6`,`5`],[`a`,`3`,`1`,`0`,`cd2`],[`c`]]},{w:6,h:6,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`6`,`1`],[`a`,`3`,`1`,`0`,`cd2`]]},{w:6,h:6,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`1`],[`a`,`3`,`1`,`cd2`,`cd2`],[`l`,`6`,`5`],[`a`,`3`,`1`,`0`,`cd2`],[`c`]]}]},flowchartmagneticdrum:{adj:[],gd:[[`x2`,`*/ w 2 3`]],paths:[{w:6,h:6,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`1`,`0`],[`l`,`5`,`0`],[`a`,`1`,`3`,`3cd4`,`cd2`],[`l`,`1`,`6`],[`a`,`1`,`3`,`cd4`,`cd2`],[`c`]]},{w:6,h:6,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`5`,`6`],[`a`,`1`,`3`,`cd4`,`cd2`]]},{w:6,h:6,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`1`,`0`],[`l`,`5`,`0`],[`a`,`1`,`3`,`3cd4`,`cd2`],[`l`,`1`,`6`],[`a`,`1`,`3`,`cd4`,`cd2`],[`c`]]}]},flowchartmagnetictape:{adj:[],gd:[[`idx`,`cos wd2 2700000`],[`idy`,`sin hd2 2700000`],[`il`,`+- hc 0 idx`],[`ir`,`+- hc idx 0`],[`it`,`+- vc 0 idy`],[`ib`,`+- vc idy 0`],[`ang1`,`at2 w h`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`hc`,`b`],[`a`,`wd2`,`hd2`,`cd4`,`cd4`],[`a`,`wd2`,`hd2`,`cd2`,`cd4`],[`a`,`wd2`,`hd2`,`3cd4`,`cd4`],[`a`,`wd2`,`hd2`,`0`,`ang1`],[`l`,`r`,`ib`],[`l`,`r`,`b`],[`c`]]}]},flowchartmanualinput:{adj:[],gd:[],paths:[{w:5,h:5,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`1`],[`l`,`5`,`0`],[`l`,`5`,`5`],[`l`,`0`,`5`],[`c`]]}]},flowchartmanualoperation:{adj:[],gd:[[`x3`,`*/ w 4 5`],[`x4`,`*/ w 9 10`]],paths:[{w:5,h:5,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`0`],[`l`,`5`,`0`],[`l`,`4`,`5`],[`l`,`1`,`5`],[`c`]]}]},flowchartmerge:{adj:[],gd:[[`x2`,`*/ w 3 4`]],paths:[{w:2,h:2,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`0`],[`l`,`2`,`0`],[`l`,`1`,`2`],[`c`]]}]},flowchartmultidocument:{adj:[],gd:[[`y2`,`*/ h 3675 21600`],[`y8`,`*/ h 20782 21600`],[`x3`,`*/ w 9298 21600`],[`x4`,`*/ w 12286 21600`],[`x5`,`*/ w 18595 21600`]],paths:[{w:21600,h:21600,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`0`,`20782`],[`C`,`9298`,`23542`,`9298`,`18022`,`18595`,`18022`],[`l`,`18595`,`3675`],[`l`,`0`,`3675`],[`c`],[`m`,`1532`,`3675`],[`l`,`1532`,`1815`],[`l`,`20000`,`1815`],[`l`,`20000`,`16252`],[`C`,`19298`,`16252`,`18595`,`16352`,`18595`,`16352`],[`l`,`18595`,`3675`],[`c`],[`m`,`2972`,`1815`],[`l`,`2972`,`0`],[`l`,`21600`,`0`],[`l`,`21600`,`14392`],[`C`,`20800`,`14392`,`20000`,`14467`,`20000`,`14467`],[`l`,`20000`,`1815`],[`c`]]},{w:21600,h:21600,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`0`,`3675`],[`l`,`18595`,`3675`],[`l`,`18595`,`18022`],[`C`,`9298`,`18022`,`9298`,`23542`,`0`,`20782`],[`c`],[`m`,`1532`,`3675`],[`l`,`1532`,`1815`],[`l`,`20000`,`1815`],[`l`,`20000`,`16252`],[`C`,`19298`,`16252`,`18595`,`16352`,`18595`,`16352`],[`m`,`2972`,`1815`],[`l`,`2972`,`0`],[`l`,`21600`,`0`],[`l`,`21600`,`14392`],[`C`,`20800`,`14392`,`20000`,`14467`,`20000`,`14467`]]},{w:21600,h:21600,fill:`none`,stroke:!1,extrusionOk:!0,cmds:[[`m`,`0`,`20782`],[`C`,`9298`,`23542`,`9298`,`18022`,`18595`,`18022`],[`l`,`18595`,`16352`],[`C`,`18595`,`16352`,`19298`,`16252`,`20000`,`16252`],[`l`,`20000`,`14467`],[`C`,`20000`,`14467`,`20800`,`14392`,`21600`,`14392`],[`l`,`21600`,`0`],[`l`,`2972`,`0`],[`l`,`2972`,`1815`],[`l`,`1532`,`1815`],[`l`,`1532`,`3675`],[`l`,`0`,`3675`],[`c`]]}]},flowchartofflinestorage:{adj:[],gd:[[`x4`,`*/ w 3 4`]],paths:[{w:2,h:2,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`0`,`0`],[`l`,`2`,`0`],[`l`,`1`,`2`],[`c`]]},{w:5,h:5,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`2`,`4`],[`l`,`3`,`4`]]},{w:2,h:2,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`0`],[`l`,`2`,`0`],[`l`,`1`,`2`],[`c`]]}]},flowchartoffpageconnector:{adj:[],gd:[[`y1`,`*/ h 4 5`]],paths:[{w:10,h:10,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`0`],[`l`,`10`,`0`],[`l`,`10`,`8`],[`l`,`5`,`10`],[`l`,`0`,`8`],[`c`]]}]},flowchartonlinestorage:{adj:[],gd:[[`x2`,`*/ w 5 6`]],paths:[{w:6,h:6,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`1`,`0`],[`l`,`6`,`0`],[`a`,`1`,`3`,`3cd4`,`-10800000`],[`l`,`1`,`6`],[`a`,`1`,`3`,`cd4`,`cd2`],[`c`]]}]},flowchartor:{adj:[],gd:[[`idx`,`cos wd2 2700000`],[`idy`,`sin hd2 2700000`],[`il`,`+- hc 0 idx`],[`ir`,`+- hc idx 0`],[`it`,`+- vc 0 idy`],[`ib`,`+- vc idy 0`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`vc`],[`a`,`wd2`,`hd2`,`cd2`,`cd4`],[`a`,`wd2`,`hd2`,`3cd4`,`cd4`],[`a`,`wd2`,`hd2`,`0`,`cd4`],[`a`,`wd2`,`hd2`,`cd4`,`cd4`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`hc`,`t`],[`l`,`hc`,`b`],[`m`,`l`,`vc`],[`l`,`r`,`vc`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`a`,`wd2`,`hd2`,`cd2`,`cd4`],[`a`,`wd2`,`hd2`,`3cd4`,`cd4`],[`a`,`wd2`,`hd2`,`0`,`cd4`],[`a`,`wd2`,`hd2`,`cd4`,`cd4`],[`c`]]}]},flowchartpredefinedprocess:{adj:[],gd:[[`x2`,`*/ w 7 8`]],paths:[{w:1,h:1,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`0`,`0`],[`l`,`1`,`0`],[`l`,`1`,`1`],[`l`,`0`,`1`],[`c`]]},{w:8,h:8,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`1`,`0`],[`l`,`1`,`8`],[`m`,`7`,`0`],[`l`,`7`,`8`]]},{w:1,h:1,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`0`],[`l`,`1`,`0`],[`l`,`1`,`1`],[`l`,`0`,`1`],[`c`]]}]},flowchartpreparation:{adj:[],gd:[[`x2`,`*/ w 4 5`]],paths:[{w:10,h:10,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`5`],[`l`,`2`,`0`],[`l`,`8`,`0`],[`l`,`10`,`5`],[`l`,`8`,`10`],[`l`,`2`,`10`],[`c`]]}]},flowchartprocess:{adj:[],gd:[],paths:[{w:1,h:1,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`0`],[`l`,`1`,`0`],[`l`,`1`,`1`],[`l`,`0`,`1`],[`c`]]}]},flowchartpunchedcard:{adj:[],gd:[],paths:[{w:5,h:5,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`1`],[`l`,`1`,`0`],[`l`,`5`,`0`],[`l`,`5`,`5`],[`l`,`0`,`5`],[`c`]]}]},flowchartpunchedtape:{adj:[],gd:[[`y2`,`*/ h 9 10`],[`ib`,`*/ h 4 5`]],paths:[{w:20,h:20,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`2`],[`a`,`5`,`2`,`cd2`,`-10800000`],[`a`,`5`,`2`,`cd2`,`cd2`],[`l`,`20`,`18`],[`a`,`5`,`2`,`0`,`-10800000`],[`a`,`5`,`2`,`0`,`cd2`],[`c`]]}]},flowchartsort:{adj:[],gd:[[`ir`,`*/ w 3 4`],[`ib`,`*/ h 3 4`]],paths:[{w:2,h:2,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`0`,`1`],[`l`,`1`,`0`],[`l`,`2`,`1`],[`l`,`1`,`2`],[`c`]]},{w:2,h:2,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`0`,`1`],[`l`,`2`,`1`]]},{w:2,h:2,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`0`,`1`],[`l`,`1`,`0`],[`l`,`2`,`1`],[`l`,`1`,`2`],[`c`]]}]},flowchartsummingjunction:{adj:[],gd:[[`idx`,`cos wd2 2700000`],[`idy`,`sin hd2 2700000`],[`il`,`+- hc 0 idx`],[`ir`,`+- hc idx 0`],[`it`,`+- vc 0 idy`],[`ib`,`+- vc idy 0`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`vc`],[`a`,`wd2`,`hd2`,`cd2`,`cd4`],[`a`,`wd2`,`hd2`,`3cd4`,`cd4`],[`a`,`wd2`,`hd2`,`0`,`cd4`],[`a`,`wd2`,`hd2`,`cd4`,`cd4`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`il`,`it`],[`l`,`ir`,`ib`],[`m`,`ir`,`it`],[`l`,`il`,`ib`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`a`,`wd2`,`hd2`,`cd2`,`cd4`],[`a`,`wd2`,`hd2`,`3cd4`,`cd4`],[`a`,`wd2`,`hd2`,`0`,`cd4`],[`a`,`wd2`,`hd2`,`cd4`,`cd4`],[`c`]]}]},flowchartterminator:{adj:[],gd:[[`il`,`*/ w 1018 21600`],[`ir`,`*/ w 20582 21600`],[`it`,`*/ h 3163 21600`],[`ib`,`*/ h 18437 21600`]],paths:[{w:21600,h:21600,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`3475`,`0`],[`l`,`18125`,`0`],[`a`,`3475`,`10800`,`3cd4`,`cd2`],[`l`,`3475`,`21600`],[`a`,`3475`,`10800`,`cd4`,`cd2`],[`c`]]}]},foldedcorner:{adj:[[`adj`,`val 16667`]],gd:[[`a`,`pin 0 adj 50000`],[`dy2`,`*/ ss a 100000`],[`dy1`,`*/ dy2 1 5`],[`x1`,`+- r 0 dy2`],[`x2`,`+- x1 dy1 0`],[`y2`,`+- b 0 dy2`],[`y1`,`+- y2 dy1 0`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`y2`],[`l`,`x1`,`b`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`x1`,`b`],[`l`,`x2`,`y1`],[`l`,`r`,`y2`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`b`],[`l`,`x2`,`y1`],[`l`,`r`,`y2`],[`l`,`x1`,`b`],[`l`,`l`,`b`],[`l`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`y2`]]}]},frame:{adj:[[`adj1`,`val 12500`]],gd:[[`a1`,`pin 0 adj1 50000`],[`x1`,`*/ ss a1 100000`],[`x4`,`+- r 0 x1`],[`y4`,`+- b 0 x1`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`],[`m`,`x1`,`x1`],[`l`,`x1`,`y4`],[`l`,`x4`,`y4`],[`l`,`x4`,`x1`],[`c`]]}]},funnel:{adj:[],gd:[[`d`,`*/ ss 1 20`],[`rw2`,`+- wd2 0 d`],[`rh2`,`+- hd4 0 d`],[`t1`,`cos wd2 480000`],[`t2`,`sin hd4 480000`],[`da`,`at2 t1 t2`],[`2da`,`*/ da 2 1`],[`stAng1`,`+- cd2 0 da`],[`swAng1`,`+- cd2 2da 0`],[`swAng3`,`+- cd2 0 2da`],[`rw3`,`*/ wd2 1 4`],[`rh3`,`*/ hd4 1 4`],[`ct1`,`cos hd4 stAng1`],[`st1`,`sin wd2 stAng1`],[`m1`,`mod ct1 st1 0`],[`n1`,`*/ wd2 hd4 m1`],[`dx1`,`cos n1 stAng1`],[`dy1`,`sin n1 stAng1`],[`x1`,`+- hc dx1 0`],[`y1`,`+- hd4 dy1 0`],[`ct3`,`cos rh3 da`],[`st3`,`sin rw3 da`],[`m3`,`mod ct3 st3 0`],[`n3`,`*/ rw3 rh3 m3`],[`dx3`,`cos n3 da`],[`dy3`,`sin n3 da`],[`x3`,`+- hc dx3 0`],[`vc3`,`+- b 0 rh3`],[`y2`,`+- vc3 dy3 0`],[`x2`,`+- wd2 0 rw2`],[`cd`,`*/ cd2 2 1`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`y1`],[`a`,`wd2`,`hd4`,`stAng1`,`swAng1`],[`l`,`x3`,`y2`],[`a`,`rw3`,`rh3`,`da`,`swAng3`],[`c`],[`m`,`x2`,`hd4`],[`a`,`rw2`,`rh2`,`cd2`,`-21600000`],[`c`]]}]},gear6:{adj:[[`adj1`,`val 15000`],[`adj2`,`val 3526`]],gd:[[`a1`,`pin 0 adj1 20000`],[`a2`,`pin 0 adj2 5358`],[`th`,`*/ ss a1 100000`],[`lFD`,`*/ ss a2 100000`],[`th2`,`*/ th 1 2`],[`l2`,`*/ lFD 1 2`],[`l3`,`+- th2 l2 0`],[`rh`,`+- hd2 0 th`],[`rw`,`+- wd2 0 th`],[`dr`,`+- rw 0 rh`],[`maxr`,`?: dr rh rw`],[`ha`,`at2 maxr l3`],[`aA1`,`+- 19800000 0 ha`],[`aD1`,`+- 19800000 ha 0`],[`ta11`,`cos rw aA1`],[`ta12`,`sin rh aA1`],[`bA1`,`at2 ta11 ta12`],[`cta1`,`cos rh bA1`],[`sta1`,`sin rw bA1`],[`ma1`,`mod cta1 sta1 0`],[`na1`,`*/ rw rh ma1`],[`dxa1`,`cos na1 bA1`],[`dya1`,`sin na1 bA1`],[`xA1`,`+- hc dxa1 0`],[`yA1`,`+- vc dya1 0`],[`td11`,`cos rw aD1`],[`td12`,`sin rh aD1`],[`bD1`,`at2 td11 td12`],[`ctd1`,`cos rh bD1`],[`std1`,`sin rw bD1`],[`md1`,`mod ctd1 std1 0`],[`nd1`,`*/ rw rh md1`],[`dxd1`,`cos nd1 bD1`],[`dyd1`,`sin nd1 bD1`],[`xD1`,`+- hc dxd1 0`],[`yD1`,`+- vc dyd1 0`],[`xAD1`,`+- xA1 0 xD1`],[`yAD1`,`+- yA1 0 yD1`],[`lAD1`,`mod xAD1 yAD1 0`],[`a1`,`at2 yAD1 xAD1`],[`dxF1`,`sin lFD a1`],[`dyF1`,`cos lFD a1`],[`xF1`,`+- xD1 dxF1 0`],[`yF1`,`+- yD1 dyF1 0`],[`xE1`,`+- xA1 0 dxF1`],[`yE1`,`+- yA1 0 dyF1`],[`yC1t`,`sin th a1`],[`xC1t`,`cos th a1`],[`yC1`,`+- yF1 yC1t 0`],[`xC1`,`+- xF1 0 xC1t`],[`yB1`,`+- yE1 yC1t 0`],[`xB1`,`+- xE1 0 xC1t`],[`aD6`,`+- 3cd4 ha 0`],[`td61`,`cos rw aD6`],[`td62`,`sin rh aD6`],[`bD6`,`at2 td61 td62`],[`ctd6`,`cos rh bD6`],[`std6`,`sin rw bD6`],[`md6`,`mod ctd6 std6 0`],[`nd6`,`*/ rw rh md6`],[`dxd6`,`cos nd6 bD6`],[`dyd6`,`sin nd6 bD6`],[`xD6`,`+- hc dxd6 0`],[`yD6`,`+- vc dyd6 0`],[`xA6`,`+- hc 0 dxd6`],[`xF6`,`+- xD6 0 lFD`],[`xE6`,`+- xA6 lFD 0`],[`yC6`,`+- yD6 0 th`],[`swAng1`,`+- bA1 0 bD6`],[`aA2`,`+- 1800000 0 ha`],[`aD2`,`+- 1800000 ha 0`],[`ta21`,`cos rw aA2`],[`ta22`,`sin rh aA2`],[`bA2`,`at2 ta21 ta22`],[`yA2`,`+- h 0 yD1`],[`td21`,`cos rw aD2`],[`td22`,`sin rh aD2`],[`bD2`,`at2 td21 td22`],[`yD2`,`+- h 0 yA1`],[`yC2`,`+- h 0 yB1`],[`yB2`,`+- h 0 yC1`],[`xB2`,`val xC1`],[`swAng2`,`+- bA2 0 bD1`],[`aD3`,`+- cd4 ha 0`],[`td31`,`cos rw aD3`],[`td32`,`sin rh aD3`],[`bD3`,`at2 td31 td32`],[`yD3`,`+- h 0 yD6`],[`yB3`,`+- h 0 yC6`],[`aD4`,`+- 9000000 ha 0`],[`td41`,`cos rw aD4`],[`td42`,`sin rh aD4`],[`bD4`,`at2 td41 td42`],[`xD4`,`+- w 0 xD1`],[`xC4`,`+- w 0 xC1`],[`xB4`,`+- w 0 xB1`],[`aD5`,`+- 12600000 ha 0`],[`td51`,`cos rw aD5`],[`td52`,`sin rh aD5`],[`bD5`,`at2 td51 td52`],[`xD5`,`+- w 0 xA1`],[`xC5`,`+- w 0 xB1`],[`xB5`,`+- w 0 xC1`],[`xCxn1`,`+/ xB1 xC1 2`],[`yCxn1`,`+/ yB1 yC1 2`],[`yCxn2`,`+- b 0 yCxn1`],[`xCxn4`,`+/ r 0 xCxn1`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`xA1`,`yA1`],[`l`,`xB1`,`yB1`],[`l`,`xC1`,`yC1`],[`l`,`xD1`,`yD1`],[`a`,`rw`,`rh`,`bD1`,`swAng2`],[`l`,`xC1`,`yB2`],[`l`,`xB1`,`yC2`],[`l`,`xA1`,`yD2`],[`a`,`rw`,`rh`,`bD2`,`swAng1`],[`l`,`xF6`,`yB3`],[`l`,`xE6`,`yB3`],[`l`,`xA6`,`yD3`],[`a`,`rw`,`rh`,`bD3`,`swAng1`],[`l`,`xB4`,`yC2`],[`l`,`xC4`,`yB2`],[`l`,`xD4`,`yA2`],[`a`,`rw`,`rh`,`bD4`,`swAng2`],[`l`,`xB5`,`yC1`],[`l`,`xC5`,`yB1`],[`l`,`xD5`,`yA1`],[`a`,`rw`,`rh`,`bD5`,`swAng1`],[`l`,`xE6`,`yC6`],[`l`,`xF6`,`yC6`],[`l`,`xD6`,`yD6`],[`a`,`rw`,`rh`,`bD6`,`swAng1`],[`c`]]}]},gear9:{adj:[[`adj1`,`val 10000`],[`adj2`,`val 1763`]],gd:[[`a1`,`pin 0 adj1 20000`],[`a2`,`pin 0 adj2 2679`],[`th`,`*/ ss a1 100000`],[`lFD`,`*/ ss a2 100000`],[`th2`,`*/ th 1 2`],[`l2`,`*/ lFD 1 2`],[`l3`,`+- th2 l2 0`],[`rh`,`+- hd2 0 th`],[`rw`,`+- wd2 0 th`],[`dr`,`+- rw 0 rh`],[`maxr`,`?: dr rh rw`],[`ha`,`at2 maxr l3`],[`aA1`,`+- 18600000 0 ha`],[`aD1`,`+- 18600000 ha 0`],[`ta11`,`cos rw aA1`],[`ta12`,`sin rh aA1`],[`bA1`,`at2 ta11 ta12`],[`cta1`,`cos rh bA1`],[`sta1`,`sin rw bA1`],[`ma1`,`mod cta1 sta1 0`],[`na1`,`*/ rw rh ma1`],[`dxa1`,`cos na1 bA1`],[`dya1`,`sin na1 bA1`],[`xA1`,`+- hc dxa1 0`],[`yA1`,`+- vc dya1 0`],[`td11`,`cos rw aD1`],[`td12`,`sin rh aD1`],[`bD1`,`at2 td11 td12`],[`ctd1`,`cos rh bD1`],[`std1`,`sin rw bD1`],[`md1`,`mod ctd1 std1 0`],[`nd1`,`*/ rw rh md1`],[`dxd1`,`cos nd1 bD1`],[`dyd1`,`sin nd1 bD1`],[`xD1`,`+- hc dxd1 0`],[`yD1`,`+- vc dyd1 0`],[`xAD1`,`+- xA1 0 xD1`],[`yAD1`,`+- yA1 0 yD1`],[`lAD1`,`mod xAD1 yAD1 0`],[`a1`,`at2 yAD1 xAD1`],[`dxF1`,`sin lFD a1`],[`dyF1`,`cos lFD a1`],[`xF1`,`+- xD1 dxF1 0`],[`yF1`,`+- yD1 dyF1 0`],[`xE1`,`+- xA1 0 dxF1`],[`yE1`,`+- yA1 0 dyF1`],[`yC1t`,`sin th a1`],[`xC1t`,`cos th a1`],[`yC1`,`+- yF1 yC1t 0`],[`xC1`,`+- xF1 0 xC1t`],[`yB1`,`+- yE1 yC1t 0`],[`xB1`,`+- xE1 0 xC1t`],[`aA2`,`+- 21000000 0 ha`],[`aD2`,`+- 21000000 ha 0`],[`ta21`,`cos rw aA2`],[`ta22`,`sin rh aA2`],[`bA2`,`at2 ta21 ta22`],[`cta2`,`cos rh bA2`],[`sta2`,`sin rw bA2`],[`ma2`,`mod cta2 sta2 0`],[`na2`,`*/ rw rh ma2`],[`dxa2`,`cos na2 bA2`],[`dya2`,`sin na2 bA2`],[`xA2`,`+- hc dxa2 0`],[`yA2`,`+- vc dya2 0`],[`td21`,`cos rw aD2`],[`td22`,`sin rh aD2`],[`bD2`,`at2 td21 td22`],[`ctd2`,`cos rh bD2`],[`std2`,`sin rw bD2`],[`md2`,`mod ctd2 std2 0`],[`nd2`,`*/ rw rh md2`],[`dxd2`,`cos nd2 bD2`],[`dyd2`,`sin nd2 bD2`],[`xD2`,`+- hc dxd2 0`],[`yD2`,`+- vc dyd2 0`],[`xAD2`,`+- xA2 0 xD2`],[`yAD2`,`+- yA2 0 yD2`],[`lAD2`,`mod xAD2 yAD2 0`],[`a2`,`at2 yAD2 xAD2`],[`dxF2`,`sin lFD a2`],[`dyF2`,`cos lFD a2`],[`xF2`,`+- xD2 dxF2 0`],[`yF2`,`+- yD2 dyF2 0`],[`xE2`,`+- xA2 0 dxF2`],[`yE2`,`+- yA2 0 dyF2`],[`yC2t`,`sin th a2`],[`xC2t`,`cos th a2`],[`yC2`,`+- yF2 yC2t 0`],[`xC2`,`+- xF2 0 xC2t`],[`yB2`,`+- yE2 yC2t 0`],[`xB2`,`+- xE2 0 xC2t`],[`swAng1`,`+- bA2 0 bD1`],[`aA3`,`+- 1800000 0 ha`],[`aD3`,`+- 1800000 ha 0`],[`ta31`,`cos rw aA3`],[`ta32`,`sin rh aA3`],[`bA3`,`at2 ta31 ta32`],[`cta3`,`cos rh bA3`],[`sta3`,`sin rw bA3`],[`ma3`,`mod cta3 sta3 0`],[`na3`,`*/ rw rh ma3`],[`dxa3`,`cos na3 bA3`],[`dya3`,`sin na3 bA3`],[`xA3`,`+- hc dxa3 0`],[`yA3`,`+- vc dya3 0`],[`td31`,`cos rw aD3`],[`td32`,`sin rh aD3`],[`bD3`,`at2 td31 td32`],[`ctd3`,`cos rh bD3`],[`std3`,`sin rw bD3`],[`md3`,`mod ctd3 std3 0`],[`nd3`,`*/ rw rh md3`],[`dxd3`,`cos nd3 bD3`],[`dyd3`,`sin nd3 bD3`],[`xD3`,`+- hc dxd3 0`],[`yD3`,`+- vc dyd3 0`],[`xAD3`,`+- xA3 0 xD3`],[`yAD3`,`+- yA3 0 yD3`],[`lAD3`,`mod xAD3 yAD3 0`],[`a3`,`at2 yAD3 xAD3`],[`dxF3`,`sin lFD a3`],[`dyF3`,`cos lFD a3`],[`xF3`,`+- xD3 dxF3 0`],[`yF3`,`+- yD3 dyF3 0`],[`xE3`,`+- xA3 0 dxF3`],[`yE3`,`+- yA3 0 dyF3`],[`yC3t`,`sin th a3`],[`xC3t`,`cos th a3`],[`yC3`,`+- yF3 yC3t 0`],[`xC3`,`+- xF3 0 xC3t`],[`yB3`,`+- yE3 yC3t 0`],[`xB3`,`+- xE3 0 xC3t`],[`swAng2`,`+- bA3 0 bD2`],[`aA4`,`+- 4200000 0 ha`],[`aD4`,`+- 4200000 ha 0`],[`ta41`,`cos rw aA4`],[`ta42`,`sin rh aA4`],[`bA4`,`at2 ta41 ta42`],[`cta4`,`cos rh bA4`],[`sta4`,`sin rw bA4`],[`ma4`,`mod cta4 sta4 0`],[`na4`,`*/ rw rh ma4`],[`dxa4`,`cos na4 bA4`],[`dya4`,`sin na4 bA4`],[`xA4`,`+- hc dxa4 0`],[`yA4`,`+- vc dya4 0`],[`td41`,`cos rw aD4`],[`td42`,`sin rh aD4`],[`bD4`,`at2 td41 td42`],[`ctd4`,`cos rh bD4`],[`std4`,`sin rw bD4`],[`md4`,`mod ctd4 std4 0`],[`nd4`,`*/ rw rh md4`],[`dxd4`,`cos nd4 bD4`],[`dyd4`,`sin nd4 bD4`],[`xD4`,`+- hc dxd4 0`],[`yD4`,`+- vc dyd4 0`],[`xAD4`,`+- xA4 0 xD4`],[`yAD4`,`+- yA4 0 yD4`],[`lAD4`,`mod xAD4 yAD4 0`],[`a4`,`at2 yAD4 xAD4`],[`dxF4`,`sin lFD a4`],[`dyF4`,`cos lFD a4`],[`xF4`,`+- xD4 dxF4 0`],[`yF4`,`+- yD4 dyF4 0`],[`xE4`,`+- xA4 0 dxF4`],[`yE4`,`+- yA4 0 dyF4`],[`yC4t`,`sin th a4`],[`xC4t`,`cos th a4`],[`yC4`,`+- yF4 yC4t 0`],[`xC4`,`+- xF4 0 xC4t`],[`yB4`,`+- yE4 yC4t 0`],[`xB4`,`+- xE4 0 xC4t`],[`swAng3`,`+- bA4 0 bD3`],[`aA5`,`+- 6600000 0 ha`],[`aD5`,`+- 6600000 ha 0`],[`ta51`,`cos rw aA5`],[`ta52`,`sin rh aA5`],[`bA5`,`at2 ta51 ta52`],[`td51`,`cos rw aD5`],[`td52`,`sin rh aD5`],[`bD5`,`at2 td51 td52`],[`xD5`,`+- w 0 xA4`],[`xC5`,`+- w 0 xB4`],[`xB5`,`+- w 0 xC4`],[`swAng4`,`+- bA5 0 bD4`],[`aD6`,`+- 9000000 ha 0`],[`td61`,`cos rw aD6`],[`td62`,`sin rh aD6`],[`bD6`,`at2 td61 td62`],[`xD6`,`+- w 0 xA3`],[`xC6`,`+- w 0 xB3`],[`xB6`,`+- w 0 xC3`],[`aD7`,`+- 11400000 ha 0`],[`td71`,`cos rw aD7`],[`td72`,`sin rh aD7`],[`bD7`,`at2 td71 td72`],[`xD7`,`+- w 0 xA2`],[`xC7`,`+- w 0 xB2`],[`xB7`,`+- w 0 xC2`],[`aD8`,`+- 13800000 ha 0`],[`td81`,`cos rw aD8`],[`td82`,`sin rh aD8`],[`bD8`,`at2 td81 td82`],[`xA8`,`+- w 0 xD1`],[`xD8`,`+- w 0 xA1`],[`xC8`,`+- w 0 xB1`],[`xB8`,`+- w 0 xC1`],[`aA9`,`+- 3cd4 0 ha`],[`aD9`,`+- 3cd4 ha 0`],[`td91`,`cos rw aD9`],[`td92`,`sin rh aD9`],[`bD9`,`at2 td91 td92`],[`ctd9`,`cos rh bD9`],[`std9`,`sin rw bD9`],[`md9`,`mod ctd9 std9 0`],[`nd9`,`*/ rw rh md9`],[`dxd9`,`cos nd9 bD9`],[`dyd9`,`sin nd9 bD9`],[`xD9`,`+- hc dxd9 0`],[`yD9`,`+- vc dyd9 0`],[`ta91`,`cos rw aA9`],[`ta92`,`sin rh aA9`],[`bA9`,`at2 ta91 ta92`],[`xA9`,`+- hc 0 dxd9`],[`xF9`,`+- xD9 0 lFD`],[`xE9`,`+- xA9 lFD 0`],[`yC9`,`+- yD9 0 th`],[`swAng5`,`+- bA9 0 bD8`],[`xCxn1`,`+/ xB1 xC1 2`],[`yCxn1`,`+/ yB1 yC1 2`],[`xCxn2`,`+/ xB2 xC2 2`],[`yCxn2`,`+/ yB2 yC2 2`],[`xCxn3`,`+/ xB3 xC3 2`],[`yCxn3`,`+/ yB3 yC3 2`],[`xCxn4`,`+/ xB4 xC4 2`],[`yCxn4`,`+/ yB4 yC4 2`],[`xCxn5`,`+/ r 0 xCxn4`],[`xCxn6`,`+/ r 0 xCxn3`],[`xCxn7`,`+/ r 0 xCxn2`],[`xCxn8`,`+/ r 0 xCxn1`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`xA1`,`yA1`],[`l`,`xB1`,`yB1`],[`l`,`xC1`,`yC1`],[`l`,`xD1`,`yD1`],[`a`,`rw`,`rh`,`bD1`,`swAng1`],[`l`,`xB2`,`yB2`],[`l`,`xC2`,`yC2`],[`l`,`xD2`,`yD2`],[`a`,`rw`,`rh`,`bD2`,`swAng2`],[`l`,`xB3`,`yB3`],[`l`,`xC3`,`yC3`],[`l`,`xD3`,`yD3`],[`a`,`rw`,`rh`,`bD3`,`swAng3`],[`l`,`xB4`,`yB4`],[`l`,`xC4`,`yC4`],[`l`,`xD4`,`yD4`],[`a`,`rw`,`rh`,`bD4`,`swAng4`],[`l`,`xB5`,`yC4`],[`l`,`xC5`,`yB4`],[`l`,`xD5`,`yA4`],[`a`,`rw`,`rh`,`bD5`,`swAng3`],[`l`,`xB6`,`yC3`],[`l`,`xC6`,`yB3`],[`l`,`xD6`,`yA3`],[`a`,`rw`,`rh`,`bD6`,`swAng2`],[`l`,`xB7`,`yC2`],[`l`,`xC7`,`yB2`],[`l`,`xD7`,`yA2`],[`a`,`rw`,`rh`,`bD7`,`swAng1`],[`l`,`xB8`,`yC1`],[`l`,`xC8`,`yB1`],[`l`,`xD8`,`yA1`],[`a`,`rw`,`rh`,`bD8`,`swAng5`],[`l`,`xE9`,`yC9`],[`l`,`xF9`,`yC9`],[`l`,`xD9`,`yD9`],[`a`,`rw`,`rh`,`bD9`,`swAng5`],[`c`]]}]},halfframe:{adj:[[`adj1`,`val 33333`],[`adj2`,`val 33333`]],gd:[[`maxAdj2`,`*/ 100000 w ss`],[`a2`,`pin 0 adj2 maxAdj2`],[`x1`,`*/ ss a2 100000`],[`g1`,`*/ h x1 w`],[`g2`,`+- h 0 g1`],[`maxAdj1`,`*/ 100000 g2 ss`],[`a1`,`pin 0 adj1 maxAdj1`],[`y1`,`*/ ss a1 100000`],[`dx2`,`*/ y1 w h`],[`x2`,`+- r 0 dx2`],[`dy2`,`*/ x1 h w`],[`y2`,`+- b 0 dy2`],[`cx1`,`*/ x1 1 2`],[`cy1`,`+/ y2 b 2`],[`cx2`,`+/ x2 r 2`],[`cy2`,`*/ y1 1 2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`x2`,`y1`],[`l`,`x1`,`y1`],[`l`,`x1`,`y2`],[`l`,`l`,`b`],[`c`]]}]},heart:{adj:[],gd:[[`dx1`,`*/ w 49 48`],[`dx2`,`*/ w 10 48`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- hc dx2 0`],[`x4`,`+- hc dx1 0`],[`y1`,`+- t 0 hd3`],[`il`,`*/ w 1 6`],[`ir`,`*/ w 5 6`],[`ib`,`*/ h 2 3`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`hc`,`hd4`],[`C`,`x3`,`y1`,`x4`,`hd4`,`hc`,`b`],[`C`,`x1`,`hd4`,`x2`,`y1`,`hc`,`hd4`],[`c`]]}]},heptagon:{adj:[[`hf`,`val 102572`],[`vf`,`val 105210`]],gd:[[`swd2`,`*/ wd2 hf 100000`],[`shd2`,`*/ hd2 vf 100000`],[`svc`,`*/ vc vf 100000`],[`dx1`,`*/ swd2 97493 100000`],[`dx2`,`*/ swd2 78183 100000`],[`dx3`,`*/ swd2 43388 100000`],[`dy1`,`*/ shd2 62349 100000`],[`dy2`,`*/ shd2 22252 100000`],[`dy3`,`*/ shd2 90097 100000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- hc 0 dx3`],[`x4`,`+- hc dx3 0`],[`x5`,`+- hc dx2 0`],[`x6`,`+- hc dx1 0`],[`y1`,`+- svc 0 dy1`],[`y2`,`+- svc dy2 0`],[`y3`,`+- svc dy3 0`],[`ib`,`+- b 0 y1`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`y2`],[`l`,`x2`,`y1`],[`l`,`hc`,`t`],[`l`,`x5`,`y1`],[`l`,`x6`,`y2`],[`l`,`x4`,`y3`],[`l`,`x3`,`y3`],[`c`]]}]},hexagon:{adj:[[`adj`,`val 25000`],[`vf`,`val 115470`]],gd:[[`maxAdj`,`*/ 50000 w ss`],[`a`,`pin 0 adj maxAdj`],[`shd2`,`*/ hd2 vf 100000`],[`x1`,`*/ ss a 100000`],[`x2`,`+- r 0 x1`],[`dy1`,`sin shd2 3600000`],[`y1`,`+- vc 0 dy1`],[`y2`,`+- vc dy1 0`],[`q1`,`*/ maxAdj -1 2`],[`q2`,`+- a q1 0`],[`q3`,`?: q2 4 2`],[`q4`,`?: q2 3 2`],[`q5`,`?: q2 q1 0`],[`q6`,`+/ a q5 q1`],[`q7`,`*/ q6 q4 -1`],[`q8`,`+- q3 q7 0`],[`il`,`*/ w q8 24`],[`it`,`*/ h q8 24`],[`ir`,`+- r 0 il`],[`ib`,`+- b 0 it`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`l`,`x1`,`y1`],[`l`,`x2`,`y1`],[`l`,`r`,`vc`],[`l`,`x2`,`y2`],[`l`,`x1`,`y2`],[`c`]]}]},homeplate:{adj:[[`adj`,`val 50000`]],gd:[[`maxAdj`,`*/ 100000 w ss`],[`a`,`pin 0 adj maxAdj`],[`dx1`,`*/ ss a 100000`],[`x1`,`+- r 0 dx1`],[`ir`,`+/ x1 r 2`],[`x2`,`*/ x1 1 2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`x1`,`t`],[`l`,`r`,`vc`],[`l`,`x1`,`b`],[`l`,`l`,`b`],[`c`]]}]},horizontalscroll:{adj:[[`adj`,`val 12500`]],gd:[[`a`,`pin 0 adj 25000`],[`ch`,`*/ ss a 100000`],[`ch2`,`*/ ch 1 2`],[`ch4`,`*/ ch 1 4`],[`y3`,`+- ch ch2 0`],[`y4`,`+- ch ch 0`],[`y6`,`+- b 0 ch`],[`y7`,`+- b 0 ch2`],[`y5`,`+- y6 0 ch2`],[`x3`,`+- r 0 ch`],[`x4`,`+- r 0 ch2`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`r`,`ch2`],[`a`,`ch2`,`ch2`,`0`,`cd4`],[`l`,`x4`,`ch2`],[`a`,`ch4`,`ch4`,`0`,`cd2`],[`l`,`x3`,`ch`],[`l`,`ch2`,`ch`],[`a`,`ch2`,`ch2`,`3cd4`,`-5400000`],[`l`,`l`,`y7`],[`a`,`ch2`,`ch2`,`cd2`,`-10800000`],[`l`,`ch`,`y6`],[`l`,`x4`,`y6`],[`a`,`ch2`,`ch2`,`cd4`,`-5400000`],[`c`],[`m`,`ch2`,`y4`],[`a`,`ch2`,`ch2`,`cd4`,`-5400000`],[`a`,`ch4`,`ch4`,`0`,`-10800000`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`ch2`,`y4`],[`a`,`ch2`,`ch2`,`cd4`,`-5400000`],[`a`,`ch4`,`ch4`,`0`,`-10800000`],[`c`],[`m`,`x4`,`ch`],[`a`,`ch2`,`ch2`,`cd4`,`-16200000`],[`a`,`ch4`,`ch4`,`cd2`,`-10800000`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`l`,`y3`],[`a`,`ch2`,`ch2`,`cd2`,`cd4`],[`l`,`x3`,`ch`],[`l`,`x3`,`ch2`],[`a`,`ch2`,`ch2`,`cd2`,`cd2`],[`l`,`r`,`y5`],[`a`,`ch2`,`ch2`,`0`,`cd4`],[`l`,`ch`,`y6`],[`l`,`ch`,`y7`],[`a`,`ch2`,`ch2`,`0`,`cd2`],[`c`],[`m`,`x3`,`ch`],[`l`,`x4`,`ch`],[`a`,`ch2`,`ch2`,`cd4`,`-5400000`],[`m`,`x4`,`ch`],[`l`,`x4`,`ch2`],[`a`,`ch4`,`ch4`,`0`,`cd2`],[`m`,`ch2`,`y4`],[`l`,`ch2`,`y3`],[`a`,`ch4`,`ch4`,`cd2`,`cd2`],[`a`,`ch2`,`ch2`,`0`,`cd2`],[`m`,`ch`,`y3`],[`l`,`ch`,`y6`]]}]},irregularseal1:{adj:[],gd:[[`x5`,`*/ w 4627 21600`],[`x12`,`*/ w 8485 21600`],[`x21`,`*/ w 16702 21600`],[`x24`,`*/ w 14522 21600`],[`y3`,`*/ h 6320 21600`],[`y6`,`*/ h 8615 21600`],[`y9`,`*/ h 13937 21600`],[`y18`,`*/ h 13290 21600`]],paths:[{w:21600,h:21600,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`10800`,`5800`],[`l`,`14522`,`0`],[`l`,`14155`,`5325`],[`l`,`18380`,`4457`],[`l`,`16702`,`7315`],[`l`,`21097`,`8137`],[`l`,`17607`,`10475`],[`l`,`21600`,`13290`],[`l`,`16837`,`12942`],[`l`,`18145`,`18095`],[`l`,`14020`,`14457`],[`l`,`13247`,`19737`],[`l`,`10532`,`14935`],[`l`,`8485`,`21600`],[`l`,`7715`,`15627`],[`l`,`4762`,`17617`],[`l`,`5667`,`13937`],[`l`,`135`,`14587`],[`l`,`3722`,`11775`],[`l`,`0`,`8615`],[`l`,`4627`,`7617`],[`l`,`370`,`2295`],[`l`,`7312`,`6320`],[`l`,`8352`,`2295`],[`c`]]}]},irregularseal2:{adj:[],gd:[[`x2`,`*/ w 9722 21600`],[`x5`,`*/ w 5372 21600`],[`x16`,`*/ w 11612 21600`],[`x19`,`*/ w 14640 21600`],[`y2`,`*/ h 1887 21600`],[`y3`,`*/ h 6382 21600`],[`y8`,`*/ h 12877 21600`],[`y14`,`*/ h 19712 21600`],[`y16`,`*/ h 18842 21600`],[`y17`,`*/ h 15935 21600`],[`y24`,`*/ h 6645 21600`]],paths:[{w:21600,h:21600,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`11462`,`4342`],[`l`,`14790`,`0`],[`l`,`14525`,`5777`],[`l`,`18007`,`3172`],[`l`,`16380`,`6532`],[`l`,`21600`,`6645`],[`l`,`16985`,`9402`],[`l`,`18270`,`11290`],[`l`,`16380`,`12310`],[`l`,`18877`,`15632`],[`l`,`14640`,`14350`],[`l`,`14942`,`17370`],[`l`,`12180`,`15935`],[`l`,`11612`,`18842`],[`l`,`9872`,`17370`],[`l`,`8700`,`19712`],[`l`,`7527`,`18125`],[`l`,`4917`,`21600`],[`l`,`4805`,`18240`],[`l`,`1285`,`17825`],[`l`,`3330`,`15370`],[`l`,`0`,`12877`],[`l`,`3935`,`11592`],[`l`,`1172`,`8270`],[`l`,`5372`,`7817`],[`l`,`4502`,`3625`],[`l`,`8550`,`6382`],[`l`,`9722`,`1887`],[`c`]]}]},leftarrow:{adj:[[`adj1`,`val 50000`],[`adj2`,`val 50000`]],gd:[[`maxAdj2`,`*/ 100000 w ss`],[`a1`,`pin 0 adj1 100000`],[`a2`,`pin 0 adj2 maxAdj2`],[`dx2`,`*/ ss a2 100000`],[`x2`,`+- l dx2 0`],[`dy1`,`*/ h a1 200000`],[`y1`,`+- vc 0 dy1`],[`y2`,`+- vc dy1 0`],[`dx1`,`*/ y1 dx2 hd2`],[`x1`,`+- x2 0 dx1`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`l`,`x2`,`t`],[`l`,`x2`,`y1`],[`l`,`r`,`y1`],[`l`,`r`,`y2`],[`l`,`x2`,`y2`],[`l`,`x2`,`b`],[`c`]]}]},leftarrowcallout:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 25000`],[`adj3`,`val 25000`],[`adj4`,`val 64977`]],gd:[[`maxAdj2`,`*/ 50000 h ss`],[`a2`,`pin 0 adj2 maxAdj2`],[`maxAdj1`,`*/ a2 2 1`],[`a1`,`pin 0 adj1 maxAdj1`],[`maxAdj3`,`*/ 100000 w ss`],[`a3`,`pin 0 adj3 maxAdj3`],[`q2`,`*/ a3 ss w`],[`maxAdj4`,`+- 100000 0 q2`],[`a4`,`pin 0 adj4 maxAdj4`],[`dy1`,`*/ ss a2 100000`],[`dy2`,`*/ ss a1 200000`],[`y1`,`+- vc 0 dy1`],[`y2`,`+- vc 0 dy2`],[`y3`,`+- vc dy2 0`],[`y4`,`+- vc dy1 0`],[`x1`,`*/ ss a3 100000`],[`dx2`,`*/ w a4 100000`],[`x2`,`+- r 0 dx2`],[`x3`,`+/ x2 r 2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`l`,`x1`,`y1`],[`l`,`x1`,`y2`],[`l`,`x2`,`y2`],[`l`,`x2`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`x2`,`b`],[`l`,`x2`,`y3`],[`l`,`x1`,`y3`],[`l`,`x1`,`y4`],[`c`]]}]},leftbrace:{adj:[[`adj1`,`val 8333`],[`adj2`,`val 50000`]],gd:[[`a2`,`pin 0 adj2 100000`],[`q1`,`+- 100000 0 a2`],[`q2`,`min q1 a2`],[`q3`,`*/ q2 1 2`],[`maxAdj1`,`*/ q3 h ss`],[`a1`,`pin 0 adj1 maxAdj1`],[`y1`,`*/ ss a1 100000`],[`y3`,`*/ h a2 100000`],[`y4`,`+- y3 y1 0`],[`dx1`,`cos wd2 2700000`],[`dy1`,`sin y1 2700000`],[`il`,`+- r 0 dx1`],[`it`,`+- y1 0 dy1`],[`ib`,`+- b dy1 y1`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`r`,`b`],[`a`,`wd2`,`y1`,`cd4`,`cd4`],[`l`,`hc`,`y4`],[`a`,`wd2`,`y1`,`0`,`-5400000`],[`a`,`wd2`,`y1`,`cd4`,`-5400000`],[`l`,`hc`,`y1`],[`a`,`wd2`,`y1`,`cd2`,`cd4`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`r`,`b`],[`a`,`wd2`,`y1`,`cd4`,`cd4`],[`l`,`hc`,`y4`],[`a`,`wd2`,`y1`,`0`,`-5400000`],[`a`,`wd2`,`y1`,`cd4`,`-5400000`],[`l`,`hc`,`y1`],[`a`,`wd2`,`y1`,`cd2`,`cd4`]]}]},leftbracket:{adj:[[`adj`,`val 8333`]],gd:[[`maxAdj`,`*/ 50000 h ss`],[`a`,`pin 0 adj maxAdj`],[`y1`,`*/ ss a 100000`],[`y2`,`+- b 0 y1`],[`dx1`,`cos w 2700000`],[`dy1`,`sin y1 2700000`],[`il`,`+- r 0 dx1`],[`it`,`+- y1 0 dy1`],[`ib`,`+- b dy1 y1`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`r`,`b`],[`a`,`w`,`y1`,`cd4`,`cd4`],[`l`,`l`,`y1`],[`a`,`w`,`y1`,`cd2`,`cd4`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`r`,`b`],[`a`,`w`,`y1`,`cd4`,`cd4`],[`l`,`l`,`y1`],[`a`,`w`,`y1`,`cd2`,`cd4`]]}]},leftcirculararrow:{adj:[[`adj1`,`val 12500`],[`adj2`,`val -1142319`],[`adj3`,`val 1142319`],[`adj4`,`val 10800000`],[`adj5`,`val 12500`]],gd:[[`a5`,`pin 0 adj5 25000`],[`maxAdj1`,`*/ a5 2 1`],[`a1`,`pin 0 adj1 maxAdj1`],[`enAng`,`pin 1 adj3 21599999`],[`stAng`,`pin 0 adj4 21599999`],[`th`,`*/ ss a1 100000`],[`thh`,`*/ ss a5 100000`],[`th2`,`*/ th 1 2`],[`rw1`,`+- wd2 th2 thh`],[`rh1`,`+- hd2 th2 thh`],[`rw2`,`+- rw1 0 th`],[`rh2`,`+- rh1 0 th`],[`rw3`,`+- rw2 th2 0`],[`rh3`,`+- rh2 th2 0`],[`wtH`,`sin rw3 enAng`],[`htH`,`cos rh3 enAng`],[`dxH`,`cat2 rw3 htH wtH`],[`dyH`,`sat2 rh3 htH wtH`],[`xH`,`+- hc dxH 0`],[`yH`,`+- vc dyH 0`],[`rI`,`min rw2 rh2`],[`u1`,`*/ dxH dxH 1`],[`u2`,`*/ dyH dyH 1`],[`u3`,`*/ rI rI 1`],[`u4`,`+- u1 0 u3`],[`u5`,`+- u2 0 u3`],[`u6`,`*/ u4 u5 u1`],[`u7`,`*/ u6 1 u2`],[`u8`,`+- 1 0 u7`],[`u9`,`sqrt u8`],[`u10`,`*/ u4 1 dxH`],[`u11`,`*/ u10 1 dyH`],[`u12`,`+/ 1 u9 u11`],[`u13`,`at2 1 u12`],[`u14`,`+- u13 21600000 0`],[`u15`,`?: u13 u13 u14`],[`u16`,`+- u15 0 enAng`],[`u17`,`+- u16 21600000 0`],[`u18`,`?: u16 u16 u17`],[`u19`,`+- u18 0 cd2`],[`u20`,`+- u18 0 21600000`],[`u21`,`?: u19 u20 u18`],[`u22`,`abs u21`],[`minAng`,`*/ u22 -1 1`],[`u23`,`abs adj2`],[`a2`,`*/ u23 -1 1`],[`aAng`,`pin minAng a2 0`],[`ptAng`,`+- enAng aAng 0`],[`wtA`,`sin rw3 ptAng`],[`htA`,`cos rh3 ptAng`],[`dxA`,`cat2 rw3 htA wtA`],[`dyA`,`sat2 rh3 htA wtA`],[`xA`,`+- hc dxA 0`],[`yA`,`+- vc dyA 0`],[`wtE`,`sin rw1 stAng`],[`htE`,`cos rh1 stAng`],[`dxE`,`cat2 rw1 htE wtE`],[`dyE`,`sat2 rh1 htE wtE`],[`xE`,`+- hc dxE 0`],[`yE`,`+- vc dyE 0`],[`wtD`,`sin rw2 stAng`],[`htD`,`cos rh2 stAng`],[`dxD`,`cat2 rw2 htD wtD`],[`dyD`,`sat2 rh2 htD wtD`],[`xD`,`+- hc dxD 0`],[`yD`,`+- vc dyD 0`],[`dxG`,`cos thh ptAng`],[`dyG`,`sin thh ptAng`],[`xG`,`+- xH dxG 0`],[`yG`,`+- yH dyG 0`],[`dxB`,`cos thh ptAng`],[`dyB`,`sin thh ptAng`],[`xB`,`+- xH 0 dxB 0`],[`yB`,`+- yH 0 dyB 0`],[`sx1`,`+- xB 0 hc`],[`sy1`,`+- yB 0 vc`],[`sx2`,`+- xG 0 hc`],[`sy2`,`+- yG 0 vc`],[`rO`,`min rw1 rh1`],[`x1O`,`*/ sx1 rO rw1`],[`y1O`,`*/ sy1 rO rh1`],[`x2O`,`*/ sx2 rO rw1`],[`y2O`,`*/ sy2 rO rh1`],[`dxO`,`+- x2O 0 x1O`],[`dyO`,`+- y2O 0 y1O`],[`dO`,`mod dxO dyO 0`],[`q1`,`*/ x1O y2O 1`],[`q2`,`*/ x2O y1O 1`],[`DO`,`+- q1 0 q2`],[`q3`,`*/ rO rO 1`],[`q4`,`*/ dO dO 1`],[`q5`,`*/ q3 q4 1`],[`q6`,`*/ DO DO 1`],[`q7`,`+- q5 0 q6`],[`q8`,`max q7 0`],[`sdelO`,`sqrt q8`],[`ndyO`,`*/ dyO -1 1`],[`sdyO`,`?: ndyO -1 1`],[`q9`,`*/ sdyO dxO 1`],[`q10`,`*/ q9 sdelO 1`],[`q11`,`*/ DO dyO 1`],[`dxF1`,`+/ q11 q10 q4`],[`q12`,`+- q11 0 q10`],[`dxF2`,`*/ q12 1 q4`],[`adyO`,`abs dyO`],[`q13`,`*/ adyO sdelO 1`],[`q14`,`*/ DO dxO -1`],[`dyF1`,`+/ q14 q13 q4`],[`q15`,`+- q14 0 q13`],[`dyF2`,`*/ q15 1 q4`],[`q16`,`+- x2O 0 dxF1`],[`q17`,`+- x2O 0 dxF2`],[`q18`,`+- y2O 0 dyF1`],[`q19`,`+- y2O 0 dyF2`],[`q20`,`mod q16 q18 0`],[`q21`,`mod q17 q19 0`],[`q22`,`+- q21 0 q20`],[`dxF`,`?: q22 dxF1 dxF2`],[`dyF`,`?: q22 dyF1 dyF2`],[`sdxF`,`*/ dxF rw1 rO`],[`sdyF`,`*/ dyF rh1 rO`],[`xF`,`+- hc sdxF 0`],[`yF`,`+- vc sdyF 0`],[`x1I`,`*/ sx1 rI rw2`],[`y1I`,`*/ sy1 rI rh2`],[`x2I`,`*/ sx2 rI rw2`],[`y2I`,`*/ sy2 rI rh2`],[`dxI`,`+- x2I 0 x1I`],[`dyI`,`+- y2I 0 y1I`],[`dI`,`mod dxI dyI 0`],[`v1`,`*/ x1I y2I 1`],[`v2`,`*/ x2I y1I 1`],[`DI`,`+- v1 0 v2`],[`v3`,`*/ rI rI 1`],[`v4`,`*/ dI dI 1`],[`v5`,`*/ v3 v4 1`],[`v6`,`*/ DI DI 1`],[`v7`,`+- v5 0 v6`],[`v8`,`max v7 0`],[`sdelI`,`sqrt v8`],[`v9`,`*/ sdyO dxI 1`],[`v10`,`*/ v9 sdelI 1`],[`v11`,`*/ DI dyI 1`],[`dxC1`,`+/ v11 v10 v4`],[`v12`,`+- v11 0 v10`],[`dxC2`,`*/ v12 1 v4`],[`adyI`,`abs dyI`],[`v13`,`*/ adyI sdelI 1`],[`v14`,`*/ DI dxI -1`],[`dyC1`,`+/ v14 v13 v4`],[`v15`,`+- v14 0 v13`],[`dyC2`,`*/ v15 1 v4`],[`v16`,`+- x1I 0 dxC1`],[`v17`,`+- x1I 0 dxC2`],[`v18`,`+- y1I 0 dyC1`],[`v19`,`+- y1I 0 dyC2`],[`v20`,`mod v16 v18 0`],[`v21`,`mod v17 v19 0`],[`v22`,`+- v21 0 v20`],[`dxC`,`?: v22 dxC1 dxC2`],[`dyC`,`?: v22 dyC1 dyC2`],[`sdxC`,`*/ dxC rw2 rI`],[`sdyC`,`*/ dyC rh2 rI`],[`xC`,`+- hc sdxC 0`],[`yC`,`+- vc sdyC 0`],[`ist0`,`at2 sdxC sdyC`],[`ist1`,`+- ist0 21600000 0`],[`istAng0`,`?: ist0 ist0 ist1`],[`isw1`,`+- stAng 0 istAng0`],[`isw2`,`+- isw1 21600000 0`],[`iswAng0`,`?: isw1 isw1 isw2`],[`istAng`,`+- istAng0 iswAng0 0`],[`iswAng`,`+- 0 0 iswAng0`],[`p1`,`+- xF 0 xC`],[`p2`,`+- yF 0 yC`],[`p3`,`mod p1 p2 0`],[`p4`,`*/ p3 1 2`],[`p5`,`+- p4 0 thh`],[`xGp`,`?: p5 xF xG`],[`yGp`,`?: p5 yF yG`],[`xBp`,`?: p5 xC xB`],[`yBp`,`?: p5 yC yB`],[`en0`,`at2 sdxF sdyF`],[`en1`,`+- en0 21600000 0`],[`en2`,`?: en0 en0 en1`],[`sw0`,`+- en2 0 stAng`],[`sw1`,`+- sw0 0 21600000`],[`swAng`,`?: sw0 sw1 sw0`],[`stAng0`,`+- stAng swAng 0`],[`swAng0`,`+- 0 0 swAng`],[`wtI`,`sin rw3 stAng`],[`htI`,`cos rh3 stAng`],[`dxI`,`cat2 rw3 htI wtI`],[`dyI`,`sat2 rh3 htI wtI`],[`xI`,`+- hc dxI 0`],[`yI`,`+- vc dyI 0`],[`aI`,`+- stAng cd4 0`],[`aA`,`+- ptAng 0 cd4`],[`aB`,`+- ptAng cd2 0`],[`idx`,`cos rw1 2700000`],[`idy`,`sin rh1 2700000`],[`il`,`+- hc 0 idx`],[`ir`,`+- hc idx 0`],[`it`,`+- vc 0 idy`],[`ib`,`+- vc idy 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`xE`,`yE`],[`l`,`xD`,`yD`],[`a`,`rw2`,`rh2`,`istAng`,`iswAng`],[`l`,`xBp`,`yBp`],[`l`,`xA`,`yA`],[`l`,`xGp`,`yGp`],[`l`,`xF`,`yF`],[`a`,`rw1`,`rh1`,`stAng0`,`swAng0`],[`c`]]}]},leftrightarrow:{adj:[[`adj1`,`val 50000`],[`adj2`,`val 50000`]],gd:[[`maxAdj2`,`*/ 50000 w ss`],[`a1`,`pin 0 adj1 100000`],[`a2`,`pin 0 adj2 maxAdj2`],[`x2`,`*/ ss a2 100000`],[`x3`,`+- r 0 x2`],[`dy`,`*/ h a1 200000`],[`y1`,`+- vc 0 dy`],[`y2`,`+- vc dy 0`],[`dx1`,`*/ y1 x2 hd2`],[`x1`,`+- x2 0 dx1`],[`x4`,`+- x3 dx1 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`l`,`x2`,`t`],[`l`,`x2`,`y1`],[`l`,`x3`,`y1`],[`l`,`x3`,`t`],[`l`,`r`,`vc`],[`l`,`x3`,`b`],[`l`,`x3`,`y2`],[`l`,`x2`,`y2`],[`l`,`x2`,`b`],[`c`]]}]},leftrightarrowcallout:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 25000`],[`adj3`,`val 25000`],[`adj4`,`val 48123`]],gd:[[`maxAdj2`,`*/ 50000 h ss`],[`a2`,`pin 0 adj2 maxAdj2`],[`maxAdj1`,`*/ a2 2 1`],[`a1`,`pin 0 adj1 maxAdj1`],[`maxAdj3`,`*/ 50000 w ss`],[`a3`,`pin 0 adj3 maxAdj3`],[`q2`,`*/ a3 ss wd2`],[`maxAdj4`,`+- 100000 0 q2`],[`a4`,`pin 0 adj4 maxAdj4`],[`dy1`,`*/ ss a2 100000`],[`dy2`,`*/ ss a1 200000`],[`y1`,`+- vc 0 dy1`],[`y2`,`+- vc 0 dy2`],[`y3`,`+- vc dy2 0`],[`y4`,`+- vc dy1 0`],[`x1`,`*/ ss a3 100000`],[`x4`,`+- r 0 x1`],[`dx2`,`*/ w a4 200000`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- hc dx2 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`l`,`x1`,`y1`],[`l`,`x1`,`y2`],[`l`,`x2`,`y2`],[`l`,`x2`,`t`],[`l`,`x3`,`t`],[`l`,`x3`,`y2`],[`l`,`x4`,`y2`],[`l`,`x4`,`y1`],[`l`,`r`,`vc`],[`l`,`x4`,`y4`],[`l`,`x4`,`y3`],[`l`,`x3`,`y3`],[`l`,`x3`,`b`],[`l`,`x2`,`b`],[`l`,`x2`,`y3`],[`l`,`x1`,`y3`],[`l`,`x1`,`y4`],[`c`]]}]},leftrightcirculararrow:{adj:[[`adj1`,`val 12500`],[`adj2`,`val 1142319`],[`adj3`,`val 20457681`],[`adj4`,`val 11942319`],[`adj5`,`val 12500`]],gd:[[`a5`,`pin 0 adj5 25000`],[`maxAdj1`,`*/ a5 2 1`],[`a1`,`pin 0 adj1 maxAdj1`],[`enAng`,`pin 1 adj3 21599999`],[`stAng`,`pin 0 adj4 21599999`],[`th`,`*/ ss a1 100000`],[`thh`,`*/ ss a5 100000`],[`th2`,`*/ th 1 2`],[`rw1`,`+- wd2 th2 thh`],[`rh1`,`+- hd2 th2 thh`],[`rw2`,`+- rw1 0 th`],[`rh2`,`+- rh1 0 th`],[`rw3`,`+- rw2 th2 0`],[`rh3`,`+- rh2 th2 0`],[`wtH`,`sin rw3 enAng`],[`htH`,`cos rh3 enAng`],[`dxH`,`cat2 rw3 htH wtH`],[`dyH`,`sat2 rh3 htH wtH`],[`xH`,`+- hc dxH 0`],[`yH`,`+- vc dyH 0`],[`rI`,`min rw2 rh2`],[`u1`,`*/ dxH dxH 1`],[`u2`,`*/ dyH dyH 1`],[`u3`,`*/ rI rI 1`],[`u4`,`+- u1 0 u3`],[`u5`,`+- u2 0 u3`],[`u6`,`*/ u4 u5 u1`],[`u7`,`*/ u6 1 u2`],[`u8`,`+- 1 0 u7`],[`u9`,`sqrt u8`],[`u10`,`*/ u4 1 dxH`],[`u11`,`*/ u10 1 dyH`],[`u12`,`+/ 1 u9 u11`],[`u13`,`at2 1 u12`],[`u14`,`+- u13 21600000 0`],[`u15`,`?: u13 u13 u14`],[`u16`,`+- u15 0 enAng`],[`u17`,`+- u16 21600000 0`],[`u18`,`?: u16 u16 u17`],[`u19`,`+- u18 0 cd2`],[`u20`,`+- u18 0 21600000`],[`u21`,`?: u19 u20 u18`],[`maxAng`,`abs u21`],[`aAng`,`pin 0 adj2 maxAng`],[`ptAng`,`+- enAng aAng 0`],[`wtA`,`sin rw3 ptAng`],[`htA`,`cos rh3 ptAng`],[`dxA`,`cat2 rw3 htA wtA`],[`dyA`,`sat2 rh3 htA wtA`],[`xA`,`+- hc dxA 0`],[`yA`,`+- vc dyA 0`],[`dxG`,`cos thh ptAng`],[`dyG`,`sin thh ptAng`],[`xG`,`+- xH dxG 0`],[`yG`,`+- yH dyG 0`],[`dxB`,`cos thh ptAng`],[`dyB`,`sin thh ptAng`],[`xB`,`+- xH 0 dxB 0`],[`yB`,`+- yH 0 dyB 0`],[`sx1`,`+- xB 0 hc`],[`sy1`,`+- yB 0 vc`],[`sx2`,`+- xG 0 hc`],[`sy2`,`+- yG 0 vc`],[`rO`,`min rw1 rh1`],[`x1O`,`*/ sx1 rO rw1`],[`y1O`,`*/ sy1 rO rh1`],[`x2O`,`*/ sx2 rO rw1`],[`y2O`,`*/ sy2 rO rh1`],[`dxO`,`+- x2O 0 x1O`],[`dyO`,`+- y2O 0 y1O`],[`dO`,`mod dxO dyO 0`],[`q1`,`*/ x1O y2O 1`],[`q2`,`*/ x2O y1O 1`],[`DO`,`+- q1 0 q2`],[`q3`,`*/ rO rO 1`],[`q4`,`*/ dO dO 1`],[`q5`,`*/ q3 q4 1`],[`q6`,`*/ DO DO 1`],[`q7`,`+- q5 0 q6`],[`q8`,`max q7 0`],[`sdelO`,`sqrt q8`],[`ndyO`,`*/ dyO -1 1`],[`sdyO`,`?: ndyO -1 1`],[`q9`,`*/ sdyO dxO 1`],[`q10`,`*/ q9 sdelO 1`],[`q11`,`*/ DO dyO 1`],[`dxF1`,`+/ q11 q10 q4`],[`q12`,`+- q11 0 q10`],[`dxF2`,`*/ q12 1 q4`],[`adyO`,`abs dyO`],[`q13`,`*/ adyO sdelO 1`],[`q14`,`*/ DO dxO -1`],[`dyF1`,`+/ q14 q13 q4`],[`q15`,`+- q14 0 q13`],[`dyF2`,`*/ q15 1 q4`],[`q16`,`+- x2O 0 dxF1`],[`q17`,`+- x2O 0 dxF2`],[`q18`,`+- y2O 0 dyF1`],[`q19`,`+- y2O 0 dyF2`],[`q20`,`mod q16 q18 0`],[`q21`,`mod q17 q19 0`],[`q22`,`+- q21 0 q20`],[`dxF`,`?: q22 dxF1 dxF2`],[`dyF`,`?: q22 dyF1 dyF2`],[`sdxF`,`*/ dxF rw1 rO`],[`sdyF`,`*/ dyF rh1 rO`],[`xF`,`+- hc sdxF 0`],[`yF`,`+- vc sdyF 0`],[`x1I`,`*/ sx1 rI rw2`],[`y1I`,`*/ sy1 rI rh2`],[`x2I`,`*/ sx2 rI rw2`],[`y2I`,`*/ sy2 rI rh2`],[`dxI`,`+- x2I 0 x1I`],[`dyI`,`+- y2I 0 y1I`],[`dI`,`mod dxI dyI 0`],[`v1`,`*/ x1I y2I 1`],[`v2`,`*/ x2I y1I 1`],[`DI`,`+- v1 0 v2`],[`v3`,`*/ rI rI 1`],[`v4`,`*/ dI dI 1`],[`v5`,`*/ v3 v4 1`],[`v6`,`*/ DI DI 1`],[`v7`,`+- v5 0 v6`],[`v8`,`max v7 0`],[`sdelI`,`sqrt v8`],[`v9`,`*/ sdyO dxI 1`],[`v10`,`*/ v9 sdelI 1`],[`v11`,`*/ DI dyI 1`],[`dxC1`,`+/ v11 v10 v4`],[`v12`,`+- v11 0 v10`],[`dxC2`,`*/ v12 1 v4`],[`adyI`,`abs dyI`],[`v13`,`*/ adyI sdelI 1`],[`v14`,`*/ DI dxI -1`],[`dyC1`,`+/ v14 v13 v4`],[`v15`,`+- v14 0 v13`],[`dyC2`,`*/ v15 1 v4`],[`v16`,`+- x1I 0 dxC1`],[`v17`,`+- x1I 0 dxC2`],[`v18`,`+- y1I 0 dyC1`],[`v19`,`+- y1I 0 dyC2`],[`v20`,`mod v16 v18 0`],[`v21`,`mod v17 v19 0`],[`v22`,`+- v21 0 v20`],[`dxC`,`?: v22 dxC1 dxC2`],[`dyC`,`?: v22 dyC1 dyC2`],[`sdxC`,`*/ dxC rw2 rI`],[`sdyC`,`*/ dyC rh2 rI`],[`xC`,`+- hc sdxC 0`],[`yC`,`+- vc sdyC 0`],[`wtI`,`sin rw3 stAng`],[`htI`,`cos rh3 stAng`],[`dxI`,`cat2 rw3 htI wtI`],[`dyI`,`sat2 rh3 htI wtI`],[`xI`,`+- hc dxI 0`],[`yI`,`+- vc dyI 0`],[`lptAng`,`+- stAng 0 aAng`],[`wtL`,`sin rw3 lptAng`],[`htL`,`cos rh3 lptAng`],[`dxL`,`cat2 rw3 htL wtL`],[`dyL`,`sat2 rh3 htL wtL`],[`xL`,`+- hc dxL 0`],[`yL`,`+- vc dyL 0`],[`dxK`,`cos thh lptAng`],[`dyK`,`sin thh lptAng`],[`xK`,`+- xI dxK 0`],[`yK`,`+- yI dyK 0`],[`dxJ`,`cos thh lptAng`],[`dyJ`,`sin thh lptAng`],[`xJ`,`+- xI 0 dxJ 0`],[`yJ`,`+- yI 0 dyJ 0`],[`p1`,`+- xF 0 xC`],[`p2`,`+- yF 0 yC`],[`p3`,`mod p1 p2 0`],[`p4`,`*/ p3 1 2`],[`p5`,`+- p4 0 thh`],[`xGp`,`?: p5 xF xG`],[`yGp`,`?: p5 yF yG`],[`xBp`,`?: p5 xC xB`],[`yBp`,`?: p5 yC yB`],[`en0`,`at2 sdxF sdyF`],[`en1`,`+- en0 21600000 0`],[`en2`,`?: en0 en0 en1`],[`od0`,`+- en2 0 enAng`],[`od1`,`+- od0 21600000 0`],[`od2`,`?: od0 od0 od1`],[`st0`,`+- stAng 0 od2`],[`st1`,`+- st0 21600000 0`],[`st2`,`?: st0 st0 st1`],[`sw0`,`+- en2 0 st2`],[`sw1`,`+- sw0 21600000 0`],[`swAng`,`?: sw0 sw0 sw1`],[`ist0`,`at2 sdxC sdyC`],[`ist1`,`+- ist0 21600000 0`],[`istAng`,`?: ist0 ist0 ist1`],[`id0`,`+- istAng 0 enAng`],[`id1`,`+- id0 0 21600000`],[`id2`,`?: id0 id1 id0`],[`ien0`,`+- stAng 0 id2`],[`ien1`,`+- ien0 0 21600000`],[`ien2`,`?: ien1 ien1 ien0`],[`isw1`,`+- ien2 0 istAng`],[`isw2`,`+- isw1 0 21600000`],[`iswAng`,`?: isw1 isw2 isw1`],[`wtE`,`sin rw1 st2`],[`htE`,`cos rh1 st2`],[`dxE`,`cat2 rw1 htE wtE`],[`dyE`,`sat2 rh1 htE wtE`],[`xE`,`+- hc dxE 0`],[`yE`,`+- vc dyE 0`],[`wtD`,`sin rw2 ien2`],[`htD`,`cos rh2 ien2`],[`dxD`,`cat2 rw2 htD wtD`],[`dyD`,`sat2 rh2 htD wtD`],[`xD`,`+- hc dxD 0`],[`yD`,`+- vc dyD 0`],[`xKp`,`?: p5 xE xK`],[`yKp`,`?: p5 yE yK`],[`xJp`,`?: p5 xD xJ`],[`yJp`,`?: p5 yD yJ`],[`aL`,`+- lptAng 0 cd4`],[`aA`,`+- ptAng cd4 0`],[`aB`,`+- ptAng cd2 0`],[`aJ`,`+- lptAng cd2 0`],[`idx`,`cos rw1 2700000`],[`idy`,`sin rh1 2700000`],[`il`,`+- hc 0 idx`],[`ir`,`+- hc idx 0`],[`it`,`+- vc 0 idy`],[`ib`,`+- vc idy 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`xL`,`yL`],[`l`,`xKp`,`yKp`],[`l`,`xE`,`yE`],[`a`,`rw1`,`rh1`,`st2`,`swAng`],[`l`,`xGp`,`yGp`],[`l`,`xA`,`yA`],[`l`,`xBp`,`yBp`],[`l`,`xC`,`yC`],[`a`,`rw2`,`rh2`,`istAng`,`iswAng`],[`l`,`xJp`,`yJp`],[`c`]]}]},leftrightribbon:{adj:[[`adj1`,`val 50000`],[`adj2`,`val 50000`],[`adj3`,`val 16667`]],gd:[[`a3`,`pin 0 adj3 33333`],[`maxAdj1`,`+- 100000 0 a3`],[`a1`,`pin 0 adj1 maxAdj1`],[`w1`,`+- wd2 0 wd32`],[`maxAdj2`,`*/ 100000 w1 ss`],[`a2`,`pin 0 adj2 maxAdj2`],[`x1`,`*/ ss a2 100000`],[`x4`,`+- r 0 x1`],[`dy1`,`*/ h a1 200000`],[`dy2`,`*/ h a3 -200000`],[`ly1`,`+- vc dy2 dy1`],[`ry4`,`+- vc dy1 dy2`],[`ly2`,`+- ly1 dy1 0`],[`ry3`,`+- b 0 ly2`],[`ly4`,`*/ ly2 2 1`],[`ry1`,`+- b 0 ly4`],[`ly3`,`+- ly4 0 ly1`],[`ry2`,`+- b 0 ly3`],[`hR`,`*/ a3 ss 400000`],[`x2`,`+- hc 0 wd32`],[`x3`,`+- hc wd32 0`],[`y1`,`+- ly1 hR 0`],[`y2`,`+- ry2 0 hR`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`ly2`],[`l`,`x1`,`t`],[`l`,`x1`,`ly1`],[`l`,`hc`,`ly1`],[`a`,`wd32`,`hR`,`3cd4`,`cd2`],[`a`,`wd32`,`hR`,`3cd4`,`-10800000`],[`l`,`x4`,`ry2`],[`l`,`x4`,`ry1`],[`l`,`r`,`ry3`],[`l`,`x4`,`b`],[`l`,`x4`,`ry4`],[`l`,`hc`,`ry4`],[`a`,`wd32`,`hR`,`cd4`,`cd4`],[`l`,`x2`,`ly3`],[`l`,`x1`,`ly3`],[`l`,`x1`,`ly4`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`x3`,`y1`],[`a`,`wd32`,`hR`,`0`,`cd4`],[`a`,`wd32`,`hR`,`3cd4`,`-10800000`],[`l`,`x3`,`ry2`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`l`,`ly2`],[`l`,`x1`,`t`],[`l`,`x1`,`ly1`],[`l`,`hc`,`ly1`],[`a`,`wd32`,`hR`,`3cd4`,`cd2`],[`a`,`wd32`,`hR`,`3cd4`,`-10800000`],[`l`,`x4`,`ry2`],[`l`,`x4`,`ry1`],[`l`,`r`,`ry3`],[`l`,`x4`,`b`],[`l`,`x4`,`ry4`],[`l`,`hc`,`ry4`],[`a`,`wd32`,`hR`,`cd4`,`cd4`],[`l`,`x2`,`ly3`],[`l`,`x1`,`ly3`],[`l`,`x1`,`ly4`],[`c`],[`m`,`x3`,`y1`],[`l`,`x3`,`ry2`],[`m`,`x2`,`y2`],[`l`,`x2`,`ly3`]]}]},leftrightuparrow:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 25000`],[`adj3`,`val 25000`]],gd:[[`a2`,`pin 0 adj2 50000`],[`maxAdj1`,`*/ a2 2 1`],[`a1`,`pin 0 adj1 maxAdj1`],[`q1`,`+- 100000 0 maxAdj1`],[`maxAdj3`,`*/ q1 1 2`],[`a3`,`pin 0 adj3 maxAdj3`],[`x1`,`*/ ss a3 100000`],[`dx2`,`*/ ss a2 100000`],[`x2`,`+- hc 0 dx2`],[`x5`,`+- hc dx2 0`],[`dx3`,`*/ ss a1 200000`],[`x3`,`+- hc 0 dx3`],[`x4`,`+- hc dx3 0`],[`x6`,`+- r 0 x1`],[`dy2`,`*/ ss a2 50000`],[`y2`,`+- b 0 dy2`],[`y4`,`+- b 0 dx2`],[`y3`,`+- y4 0 dx3`],[`y5`,`+- y4 dx3 0`],[`il`,`*/ dx3 x1 dx2`],[`ir`,`+- r 0 il`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`y4`],[`l`,`x1`,`y2`],[`l`,`x1`,`y3`],[`l`,`x3`,`y3`],[`l`,`x3`,`x1`],[`l`,`x2`,`x1`],[`l`,`hc`,`t`],[`l`,`x5`,`x1`],[`l`,`x4`,`x1`],[`l`,`x4`,`y3`],[`l`,`x6`,`y3`],[`l`,`x6`,`y2`],[`l`,`r`,`y4`],[`l`,`x6`,`b`],[`l`,`x6`,`y5`],[`l`,`x1`,`y5`],[`l`,`x1`,`b`],[`c`]]}]},leftuparrow:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 25000`],[`adj3`,`val 25000`]],gd:[[`a2`,`pin 0 adj2 50000`],[`maxAdj1`,`*/ a2 2 1`],[`a1`,`pin 0 adj1 maxAdj1`],[`maxAdj3`,`+- 100000 0 maxAdj1`],[`a3`,`pin 0 adj3 maxAdj3`],[`x1`,`*/ ss a3 100000`],[`dx2`,`*/ ss a2 50000`],[`x2`,`+- r 0 dx2`],[`y2`,`+- b 0 dx2`],[`dx4`,`*/ ss a2 100000`],[`x4`,`+- r 0 dx4`],[`y4`,`+- b 0 dx4`],[`dx3`,`*/ ss a1 200000`],[`x3`,`+- x4 0 dx3`],[`x5`,`+- x4 dx3 0`],[`y3`,`+- y4 0 dx3`],[`y5`,`+- y4 dx3 0`],[`il`,`*/ dx3 x1 dx4`],[`cx1`,`+/ x1 x5 2`],[`cy1`,`+/ x1 y5 2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`y4`],[`l`,`x1`,`y2`],[`l`,`x1`,`y3`],[`l`,`x3`,`y3`],[`l`,`x3`,`x1`],[`l`,`x2`,`x1`],[`l`,`x4`,`t`],[`l`,`r`,`x1`],[`l`,`x5`,`x1`],[`l`,`x5`,`y5`],[`l`,`x1`,`y5`],[`l`,`x1`,`b`],[`c`]]}]},lightningbolt:{adj:[],gd:[[`x1`,`*/ w 5022 21600`],[`x3`,`*/ w 8472 21600`],[`x4`,`*/ w 8757 21600`],[`x5`,`*/ w 10012 21600`],[`x8`,`*/ w 12860 21600`],[`x9`,`*/ w 13917 21600`],[`x11`,`*/ w 16577 21600`],[`y1`,`*/ h 3890 21600`],[`y2`,`*/ h 6080 21600`],[`y4`,`*/ h 7437 21600`],[`y6`,`*/ h 9705 21600`],[`y7`,`*/ h 12007 21600`],[`y10`,`*/ h 14277 21600`],[`y11`,`*/ h 14915 21600`]],paths:[{w:21600,h:21600,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`8472`,`0`],[`l`,`12860`,`6080`],[`l`,`11050`,`6797`],[`l`,`16577`,`12007`],[`l`,`14767`,`12877`],[`l`,`21600`,`21600`],[`l`,`10012`,`14915`],[`l`,`12222`,`13987`],[`l`,`5022`,`9705`],[`l`,`7602`,`8382`],[`l`,`0`,`3890`],[`c`]]}]},line:{adj:[],gd:[],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`b`]]}]},lineinv:{adj:[],gd:[],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`b`],[`l`,`r`,`t`]]}]},mathdivide:{adj:[[`adj1`,`val 23520`],[`adj2`,`val 5880`],[`adj3`,`val 11760`]],gd:[[`a1`,`pin 1000 adj1 36745`],[`ma1`,`+- 0 0 a1`],[`ma3h`,`+/ 73490 ma1 4`],[`ma3w`,`*/ 36745 w h`],[`maxAdj3`,`min ma3h ma3w`],[`a3`,`pin 1000 adj3 maxAdj3`],[`m4a3`,`*/ -4 a3 1`],[`maxAdj2`,`+- 73490 m4a3 a1`],[`a2`,`pin 0 adj2 maxAdj2`],[`dy1`,`*/ h a1 200000`],[`yg`,`*/ h a2 100000`],[`rad`,`*/ h a3 100000`],[`dx1`,`*/ w 73490 200000`],[`y3`,`+- vc 0 dy1`],[`y4`,`+- vc dy1 0`],[`a`,`+- yg rad 0`],[`y2`,`+- y3 0 a`],[`y1`,`+- y2 0 rad`],[`y5`,`+- b 0 y1`],[`x1`,`+- hc 0 dx1`],[`x3`,`+- hc dx1 0`],[`x2`,`+- hc 0 rad`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`hc`,`y1`],[`a`,`rad`,`rad`,`3cd4`,`21600000`],[`c`],[`m`,`hc`,`y5`],[`a`,`rad`,`rad`,`cd4`,`21600000`],[`c`],[`m`,`x1`,`y3`],[`l`,`x3`,`y3`],[`l`,`x3`,`y4`],[`l`,`x1`,`y4`],[`c`]]}]},mathequal:{adj:[[`adj1`,`val 23520`],[`adj2`,`val 11760`]],gd:[[`a1`,`pin 0 adj1 36745`],[`2a1`,`*/ a1 2 1`],[`mAdj2`,`+- 100000 0 2a1`],[`a2`,`pin 0 adj2 mAdj2`],[`dy1`,`*/ h a1 100000`],[`dy2`,`*/ h a2 200000`],[`dx1`,`*/ w 73490 200000`],[`y2`,`+- vc 0 dy2`],[`y3`,`+- vc dy2 0`],[`y1`,`+- y2 0 dy1`],[`y4`,`+- y3 dy1 0`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc dx1 0`],[`yC1`,`+/ y1 y2 2`],[`yC2`,`+/ y3 y4 2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`y1`],[`l`,`x2`,`y1`],[`l`,`x2`,`y2`],[`l`,`x1`,`y2`],[`c`],[`m`,`x1`,`y3`],[`l`,`x2`,`y3`],[`l`,`x2`,`y4`],[`l`,`x1`,`y4`],[`c`]]}]},mathminus:{adj:[[`adj1`,`val 23520`]],gd:[[`a1`,`pin 0 adj1 100000`],[`dy1`,`*/ h a1 200000`],[`dx1`,`*/ w 73490 200000`],[`y1`,`+- vc 0 dy1`],[`y2`,`+- vc dy1 0`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc dx1 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`y1`],[`l`,`x2`,`y1`],[`l`,`x2`,`y2`],[`l`,`x1`,`y2`],[`c`]]}]},mathmultiply:{adj:[[`adj1`,`val 23520`]],gd:[[`a1`,`pin 0 adj1 51965`],[`th`,`*/ ss a1 100000`],[`a`,`at2 w h`],[`sa`,`sin 1 a`],[`ca`,`cos 1 a`],[`ta`,`tan 1 a`],[`dl`,`mod w h 0`],[`rw`,`*/ dl 51965 100000`],[`lM`,`+- dl 0 rw`],[`xM`,`*/ ca lM 2`],[`yM`,`*/ sa lM 2`],[`dxAM`,`*/ sa th 2`],[`dyAM`,`*/ ca th 2`],[`xA`,`+- xM 0 dxAM`],[`yA`,`+- yM dyAM 0`],[`xB`,`+- xM dxAM 0`],[`yB`,`+- yM 0 dyAM`],[`xBC`,`+- hc 0 xB`],[`yBC`,`*/ xBC ta 1`],[`yC`,`+- yBC yB 0`],[`xD`,`+- r 0 xB`],[`xE`,`+- r 0 xA`],[`yFE`,`+- vc 0 yA`],[`xFE`,`*/ yFE 1 ta`],[`xF`,`+- xE 0 xFE`],[`xL`,`+- xA xFE 0`],[`yG`,`+- b 0 yA`],[`yH`,`+- b 0 yB`],[`yI`,`+- b 0 yC`],[`xC2`,`+- r 0 xM`],[`yC3`,`+- b 0 yM`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`xA`,`yA`],[`l`,`xB`,`yB`],[`l`,`hc`,`yC`],[`l`,`xD`,`yB`],[`l`,`xE`,`yA`],[`l`,`xF`,`vc`],[`l`,`xE`,`yG`],[`l`,`xD`,`yH`],[`l`,`hc`,`yI`],[`l`,`xB`,`yH`],[`l`,`xA`,`yG`],[`l`,`xL`,`vc`],[`c`]]}]},mathnotequal:{adj:[[`adj1`,`val 23520`],[`adj2`,`val 6600000`],[`adj3`,`val 11760`]],gd:[[`a1`,`pin 0 adj1 50000`],[`crAng`,`pin 4200000 adj2 6600000`],[`2a1`,`*/ a1 2 1`],[`maxAdj3`,`+- 100000 0 2a1`],[`a3`,`pin 0 adj3 maxAdj3`],[`dy1`,`*/ h a1 100000`],[`dy2`,`*/ h a3 200000`],[`dx1`,`*/ w 73490 200000`],[`x1`,`+- hc 0 dx1`],[`x8`,`+- hc dx1 0`],[`y2`,`+- vc 0 dy2`],[`y3`,`+- vc dy2 0`],[`y1`,`+- y2 0 dy1`],[`y4`,`+- y3 dy1 0`],[`cadj2`,`+- crAng 0 cd4`],[`xadj2`,`tan hd2 cadj2`],[`len`,`mod xadj2 hd2 0`],[`bhw`,`*/ len dy1 hd2`],[`bhw2`,`*/ bhw 1 2`],[`x7`,`+- hc xadj2 bhw2`],[`dx67`,`*/ xadj2 y1 hd2`],[`x6`,`+- x7 0 dx67`],[`dx57`,`*/ xadj2 y2 hd2`],[`x5`,`+- x7 0 dx57`],[`dx47`,`*/ xadj2 y3 hd2`],[`x4`,`+- x7 0 dx47`],[`dx37`,`*/ xadj2 y4 hd2`],[`x3`,`+- x7 0 dx37`],[`dx27`,`*/ xadj2 2 1`],[`x2`,`+- x7 0 dx27`],[`rx7`,`+- x7 bhw 0`],[`rx6`,`+- x6 bhw 0`],[`rx5`,`+- x5 bhw 0`],[`rx4`,`+- x4 bhw 0`],[`rx3`,`+- x3 bhw 0`],[`rx2`,`+- x2 bhw 0`],[`dx7`,`*/ dy1 hd2 len`],[`rxt`,`+- x7 dx7 0`],[`lxt`,`+- rx7 0 dx7`],[`rx`,`?: cadj2 rxt rx7`],[`lx`,`?: cadj2 x7 lxt`],[`dy3`,`*/ dy1 xadj2 len`],[`dy4`,`+- 0 0 dy3`],[`ry`,`?: cadj2 dy3 t`],[`ly`,`?: cadj2 t dy4`],[`dlx`,`+- w 0 rx`],[`drx`,`+- w 0 lx`],[`dly`,`+- h 0 ry`],[`dry`,`+- h 0 ly`],[`xC1`,`+/ rx lx 2`],[`xC2`,`+/ drx dlx 2`],[`yC1`,`+/ ry ly 2`],[`yC2`,`+/ y1 y2 2`],[`yC3`,`+/ y3 y4 2`],[`yC4`,`+/ dry dly 2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`y1`],[`l`,`x6`,`y1`],[`l`,`lx`,`ly`],[`l`,`rx`,`ry`],[`l`,`rx6`,`y1`],[`l`,`x8`,`y1`],[`l`,`x8`,`y2`],[`l`,`rx5`,`y2`],[`l`,`rx4`,`y3`],[`l`,`x8`,`y3`],[`l`,`x8`,`y4`],[`l`,`rx3`,`y4`],[`l`,`drx`,`dry`],[`l`,`dlx`,`dly`],[`l`,`x3`,`y4`],[`l`,`x1`,`y4`],[`l`,`x1`,`y3`],[`l`,`x4`,`y3`],[`l`,`x5`,`y2`],[`l`,`x1`,`y2`],[`c`]]}]},mathplus:{adj:[[`adj1`,`val 23520`]],gd:[[`a1`,`pin 0 adj1 73490`],[`dx1`,`*/ w 73490 200000`],[`dy1`,`*/ h 73490 200000`],[`dx2`,`*/ ss a1 200000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- hc dx2 0`],[`x4`,`+- hc dx1 0`],[`y1`,`+- vc 0 dy1`],[`y2`,`+- vc 0 dx2`],[`y3`,`+- vc dx2 0`],[`y4`,`+- vc dy1 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`y2`],[`l`,`x2`,`y2`],[`l`,`x2`,`y1`],[`l`,`x3`,`y1`],[`l`,`x3`,`y2`],[`l`,`x4`,`y2`],[`l`,`x4`,`y3`],[`l`,`x3`,`y3`],[`l`,`x3`,`y4`],[`l`,`x2`,`y4`],[`l`,`x2`,`y3`],[`l`,`x1`,`y3`],[`c`]]}]},moon:{adj:[[`adj`,`val 50000`]],gd:[[`a`,`pin 0 adj 87500`],[`g0`,`*/ ss a 100000`],[`g0w`,`*/ g0 w ss`],[`g1`,`+- ss 0 g0`],[`g2`,`*/ g0 g0 g1`],[`g3`,`*/ ss ss g1`],[`g4`,`*/ g3 2 1`],[`g5`,`+- g4 0 g2`],[`g6`,`+- g5 0 g0`],[`g6w`,`*/ g6 w ss`],[`g7`,`*/ g5 1 2`],[`g8`,`+- g7 0 g0`],[`dy1`,`*/ g8 hd2 ss`],[`g10h`,`+- vc 0 dy1`],[`g11h`,`+- vc dy1 0`],[`g12`,`*/ g0 9598 32768`],[`g12w`,`*/ g12 w ss`],[`g13`,`+- ss 0 g12`],[`q1`,`*/ ss ss 1`],[`q2`,`*/ g13 g13 1`],[`q3`,`+- q1 0 q2`],[`q4`,`sqrt q3`],[`dy4`,`*/ q4 hd2 ss`],[`g15h`,`+- vc 0 dy4`],[`g16h`,`+- vc dy4 0`],[`g17w`,`+- g6w 0 g0w`],[`g18w`,`*/ g17w 1 2`],[`dx2p`,`+- g0w g18w w`],[`dx2`,`*/ dx2p -1 1`],[`dy2`,`*/ hd2 -1 1`],[`stAng1`,`at2 dx2 dy2`],[`enAngp1`,`at2 dx2 hd2`],[`enAng1`,`+- enAngp1 0 21600000`],[`swAng1`,`+- enAng1 0 stAng1`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`r`,`b`],[`a`,`w`,`hd2`,`cd4`,`cd2`],[`a`,`g18w`,`dy1`,`stAng1`,`swAng1`],[`c`]]}]},nonisoscelestrapezoid:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 25000`]],gd:[[`maxAdj`,`*/ 50000 w ss`],[`a1`,`pin 0 adj1 maxAdj`],[`a2`,`pin 0 adj2 maxAdj`],[`x1`,`*/ ss a1 200000`],[`x2`,`*/ ss a1 100000`],[`dx3`,`*/ ss a2 100000`],[`x3`,`+- r 0 dx3`],[`x4`,`+/ r x3 2`],[`il`,`*/ wd3 a1 maxAdj`],[`adjm`,`max a1 a2`],[`it`,`*/ hd3 adjm maxAdj`],[`irt`,`*/ wd3 a2 maxAdj`],[`ir`,`+- r 0 irt`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`b`],[`l`,`x2`,`t`],[`l`,`x3`,`t`],[`l`,`r`,`b`],[`c`]]}]},nosmoking:{adj:[[`adj`,`val 18750`]],gd:[[`a`,`pin 0 adj 50000`],[`dr`,`*/ ss a 100000`],[`iwd2`,`+- wd2 0 dr`],[`ihd2`,`+- hd2 0 dr`],[`ang`,`at2 w h`],[`ct`,`cos ihd2 ang`],[`st`,`sin iwd2 ang`],[`m`,`mod ct st 0`],[`n`,`*/ iwd2 ihd2 m`],[`drd2`,`*/ dr 1 2`],[`dang`,`at2 n drd2`],[`dang2`,`*/ dang 2 1`],[`swAng`,`+- -10800000 dang2 0`],[`t3`,`at2 w h`],[`stAng1`,`+- t3 0 dang`],[`stAng2`,`+- stAng1 0 cd2`],[`ct1`,`cos ihd2 stAng1`],[`st1`,`sin iwd2 stAng1`],[`m1`,`mod ct1 st1 0`],[`n1`,`*/ iwd2 ihd2 m1`],[`dx1`,`cos n1 stAng1`],[`dy1`,`sin n1 stAng1`],[`x1`,`+- hc dx1 0`],[`y1`,`+- vc dy1 0`],[`x2`,`+- hc 0 dx1`],[`y2`,`+- vc 0 dy1`],[`idx`,`cos wd2 2700000`],[`idy`,`sin hd2 2700000`],[`il`,`+- hc 0 idx`],[`ir`,`+- hc idx 0`],[`it`,`+- vc 0 idy`],[`ib`,`+- vc idy 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`a`,`wd2`,`hd2`,`cd2`,`cd4`],[`a`,`wd2`,`hd2`,`3cd4`,`cd4`],[`a`,`wd2`,`hd2`,`0`,`cd4`],[`a`,`wd2`,`hd2`,`cd4`,`cd4`],[`c`],[`m`,`x1`,`y1`],[`a`,`iwd2`,`ihd2`,`stAng1`,`swAng`],[`c`],[`m`,`x2`,`y2`],[`a`,`iwd2`,`ihd2`,`stAng2`,`swAng`],[`c`]]}]},notchedrightarrow:{adj:[[`adj1`,`val 50000`],[`adj2`,`val 50000`]],gd:[[`maxAdj2`,`*/ 100000 w ss`],[`a1`,`pin 0 adj1 100000`],[`a2`,`pin 0 adj2 maxAdj2`],[`dx2`,`*/ ss a2 100000`],[`x2`,`+- r 0 dx2`],[`dy1`,`*/ h a1 200000`],[`y1`,`+- vc 0 dy1`],[`y2`,`+- vc dy1 0`],[`x1`,`*/ dy1 dx2 hd2`],[`x3`,`+- r 0 x1`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`y1`],[`l`,`x2`,`y1`],[`l`,`x2`,`t`],[`l`,`r`,`vc`],[`l`,`x2`,`b`],[`l`,`x2`,`y2`],[`l`,`l`,`y2`],[`l`,`x1`,`vc`],[`c`]]}]},octagon:{adj:[[`adj`,`val 29289`]],gd:[[`a`,`pin 0 adj 50000`],[`x1`,`*/ ss a 100000`],[`x2`,`+- r 0 x1`],[`y2`,`+- b 0 x1`],[`il`,`*/ x1 1 2`],[`ir`,`+- r 0 il`],[`ib`,`+- b 0 il`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`x1`],[`l`,`x1`,`t`],[`l`,`x2`,`t`],[`l`,`r`,`x1`],[`l`,`r`,`y2`],[`l`,`x2`,`b`],[`l`,`x1`,`b`],[`l`,`l`,`y2`],[`c`]]}]},parallelogram:{adj:[[`adj`,`val 25000`]],gd:[[`maxAdj`,`*/ 100000 w ss`],[`a`,`pin 0 adj maxAdj`],[`x1`,`*/ ss a 200000`],[`x2`,`*/ ss a 100000`],[`x6`,`+- r 0 x1`],[`x5`,`+- r 0 x2`],[`x3`,`*/ x5 1 2`],[`x4`,`+- r 0 x3`],[`il`,`*/ wd2 a maxAdj`],[`q1`,`*/ 5 a maxAdj`],[`q2`,`+/ 1 q1 12`],[`il`,`*/ q2 w 1`],[`it`,`*/ q2 h 1`],[`ir`,`+- r 0 il`],[`ib`,`+- b 0 it`],[`q3`,`*/ h hc x2`],[`y1`,`pin 0 q3 h`],[`y2`,`+- b 0 y1`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`b`],[`l`,`x2`,`t`],[`l`,`r`,`t`],[`l`,`x5`,`b`],[`c`]]}]},pentagon:{adj:[[`hf`,`val 105146`],[`vf`,`val 110557`]],gd:[[`swd2`,`*/ wd2 hf 100000`],[`shd2`,`*/ hd2 vf 100000`],[`svc`,`*/ vc vf 100000`],[`dx1`,`cos swd2 1080000`],[`dx2`,`cos swd2 18360000`],[`dy1`,`sin shd2 1080000`],[`dy2`,`sin shd2 18360000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- hc dx2 0`],[`x4`,`+- hc dx1 0`],[`y1`,`+- svc 0 dy1`],[`y2`,`+- svc 0 dy2`],[`it`,`*/ y1 dx2 dx1`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`y1`],[`l`,`hc`,`t`],[`l`,`x4`,`y1`],[`l`,`x3`,`y2`],[`l`,`x2`,`y2`],[`c`]]}]},pie:{adj:[[`adj1`,`val 0`],[`adj2`,`val 16200000`]],gd:[[`stAng`,`pin 0 adj1 21599999`],[`enAng`,`pin 0 adj2 21599999`],[`sw1`,`+- enAng 0 stAng`],[`sw2`,`+- sw1 21600000 0`],[`swAng`,`?: sw1 sw1 sw2`],[`wt1`,`sin wd2 stAng`],[`ht1`,`cos hd2 stAng`],[`dx1`,`cat2 wd2 ht1 wt1`],[`dy1`,`sat2 hd2 ht1 wt1`],[`x1`,`+- hc dx1 0`],[`y1`,`+- vc dy1 0`],[`wt2`,`sin wd2 enAng`],[`ht2`,`cos hd2 enAng`],[`dx2`,`cat2 wd2 ht2 wt2`],[`dy2`,`sat2 hd2 ht2 wt2`],[`x2`,`+- hc dx2 0`],[`y2`,`+- vc dy2 0`],[`idx`,`cos wd2 2700000`],[`idy`,`sin hd2 2700000`],[`il`,`+- hc 0 idx`],[`ir`,`+- hc idx 0`],[`it`,`+- vc 0 idy`],[`ib`,`+- vc idy 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`y1`],[`a`,`wd2`,`hd2`,`stAng`,`swAng`],[`l`,`hc`,`vc`],[`c`]]}]},piewedge:{adj:[],gd:[[`g1`,`cos w 13500000`],[`g2`,`sin h 13500000`],[`x1`,`+- r g1 0`],[`y1`,`+- b g2 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`b`],[`a`,`w`,`h`,`cd2`,`cd4`],[`l`,`r`,`b`],[`c`]]}]},plaque:{adj:[[`adj`,`val 16667`]],gd:[[`a`,`pin 0 adj 50000`],[`x1`,`*/ ss a 100000`],[`x2`,`+- r 0 x1`],[`y2`,`+- b 0 x1`],[`il`,`*/ x1 70711 100000`],[`ir`,`+- r 0 il`],[`ib`,`+- b 0 il`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`x1`],[`a`,`x1`,`x1`,`cd4`,`-5400000`],[`l`,`x2`,`t`],[`a`,`x1`,`x1`,`cd2`,`-5400000`],[`l`,`r`,`y2`],[`a`,`x1`,`x1`,`3cd4`,`-5400000`],[`l`,`x1`,`b`],[`a`,`x1`,`x1`,`0`,`-5400000`],[`c`]]}]},plaquetabs:{adj:[],gd:[[`md`,`mod w h 0`],[`dx`,`*/ 1 md 20`],[`y1`,`+- 0 b dx`],[`x1`,`+- 0 r dx`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`dx`,`t`],[`a`,`dx`,`dx`,`0`,`cd4`],[`c`]]},{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`y1`],[`a`,`dx`,`dx`,`3cd4`,`cd4`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`r`,`t`],[`l`,`r`,`dx`],[`a`,`dx`,`dx`,`cd4`,`cd4`],[`c`]]},{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`b`],[`a`,`dx`,`dx`,`cd2`,`cd4`],[`l`,`r`,`b`],[`c`]]}]},plus:{adj:[[`adj`,`val 25000`]],gd:[[`a`,`pin 0 adj 50000`],[`x1`,`*/ ss a 100000`],[`x2`,`+- r 0 x1`],[`y2`,`+- b 0 x1`],[`d`,`+- w 0 h`],[`il`,`?: d l x1`],[`ir`,`?: d r x2`],[`it`,`?: d x1 t`],[`ib`,`?: d y2 b`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`x1`],[`l`,`x1`,`x1`],[`l`,`x1`,`t`],[`l`,`x2`,`t`],[`l`,`x2`,`x1`],[`l`,`r`,`x1`],[`l`,`r`,`y2`],[`l`,`x2`,`y2`],[`l`,`x2`,`b`],[`l`,`x1`,`b`],[`l`,`x1`,`y2`],[`l`,`l`,`y2`],[`c`]]}]},quadarrow:{adj:[[`adj1`,`val 22500`],[`adj2`,`val 22500`],[`adj3`,`val 22500`]],gd:[[`a2`,`pin 0 adj2 50000`],[`maxAdj1`,`*/ a2 2 1`],[`a1`,`pin 0 adj1 maxAdj1`],[`q1`,`+- 100000 0 maxAdj1`],[`maxAdj3`,`*/ q1 1 2`],[`a3`,`pin 0 adj3 maxAdj3`],[`x1`,`*/ ss a3 100000`],[`dx2`,`*/ ss a2 100000`],[`x2`,`+- hc 0 dx2`],[`x5`,`+- hc dx2 0`],[`dx3`,`*/ ss a1 200000`],[`x3`,`+- hc 0 dx3`],[`x4`,`+- hc dx3 0`],[`x6`,`+- r 0 x1`],[`y2`,`+- vc 0 dx2`],[`y5`,`+- vc dx2 0`],[`y3`,`+- vc 0 dx3`],[`y4`,`+- vc dx3 0`],[`y6`,`+- b 0 x1`],[`il`,`*/ dx3 x1 dx2`],[`ir`,`+- r 0 il`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`l`,`x1`,`y2`],[`l`,`x1`,`y3`],[`l`,`x3`,`y3`],[`l`,`x3`,`x1`],[`l`,`x2`,`x1`],[`l`,`hc`,`t`],[`l`,`x5`,`x1`],[`l`,`x4`,`x1`],[`l`,`x4`,`y3`],[`l`,`x6`,`y3`],[`l`,`x6`,`y2`],[`l`,`r`,`vc`],[`l`,`x6`,`y5`],[`l`,`x6`,`y4`],[`l`,`x4`,`y4`],[`l`,`x4`,`y6`],[`l`,`x5`,`y6`],[`l`,`hc`,`b`],[`l`,`x2`,`y6`],[`l`,`x3`,`y6`],[`l`,`x3`,`y4`],[`l`,`x1`,`y4`],[`l`,`x1`,`y5`],[`c`]]}]},quadarrowcallout:{adj:[[`adj1`,`val 18515`],[`adj2`,`val 18515`],[`adj3`,`val 18515`],[`adj4`,`val 48123`]],gd:[[`a2`,`pin 0 adj2 50000`],[`maxAdj1`,`*/ a2 2 1`],[`a1`,`pin 0 adj1 maxAdj1`],[`maxAdj3`,`+- 50000 0 a2`],[`a3`,`pin 0 adj3 maxAdj3`],[`q2`,`*/ a3 2 1`],[`maxAdj4`,`+- 100000 0 q2`],[`a4`,`pin a1 adj4 maxAdj4`],[`dx2`,`*/ ss a2 100000`],[`dx3`,`*/ ss a1 200000`],[`ah`,`*/ ss a3 100000`],[`dx1`,`*/ w a4 200000`],[`dy1`,`*/ h a4 200000`],[`x8`,`+- r 0 ah`],[`x2`,`+- hc 0 dx1`],[`x7`,`+- hc dx1 0`],[`x3`,`+- hc 0 dx2`],[`x6`,`+- hc dx2 0`],[`x4`,`+- hc 0 dx3`],[`x5`,`+- hc dx3 0`],[`y8`,`+- b 0 ah`],[`y2`,`+- vc 0 dy1`],[`y7`,`+- vc dy1 0`],[`y3`,`+- vc 0 dx2`],[`y6`,`+- vc dx2 0`],[`y4`,`+- vc 0 dx3`],[`y5`,`+- vc dx3 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`l`,`ah`,`y3`],[`l`,`ah`,`y4`],[`l`,`x2`,`y4`],[`l`,`x2`,`y2`],[`l`,`x4`,`y2`],[`l`,`x4`,`ah`],[`l`,`x3`,`ah`],[`l`,`hc`,`t`],[`l`,`x6`,`ah`],[`l`,`x5`,`ah`],[`l`,`x5`,`y2`],[`l`,`x7`,`y2`],[`l`,`x7`,`y4`],[`l`,`x8`,`y4`],[`l`,`x8`,`y3`],[`l`,`r`,`vc`],[`l`,`x8`,`y6`],[`l`,`x8`,`y5`],[`l`,`x7`,`y5`],[`l`,`x7`,`y7`],[`l`,`x5`,`y7`],[`l`,`x5`,`y8`],[`l`,`x6`,`y8`],[`l`,`hc`,`b`],[`l`,`x3`,`y8`],[`l`,`x4`,`y8`],[`l`,`x4`,`y7`],[`l`,`x2`,`y7`],[`l`,`x2`,`y5`],[`l`,`ah`,`y5`],[`l`,`ah`,`y6`],[`c`]]}]},ribbon:{adj:[[`adj1`,`val 16667`],[`adj2`,`val 50000`]],gd:[[`a1`,`pin 0 adj1 33333`],[`a2`,`pin 25000 adj2 75000`],[`x10`,`+- r 0 wd8`],[`dx2`,`*/ w a2 200000`],[`x2`,`+- hc 0 dx2`],[`x9`,`+- hc dx2 0`],[`x3`,`+- x2 wd32 0`],[`x8`,`+- x9 0 wd32`],[`x5`,`+- x2 wd8 0`],[`x6`,`+- x9 0 wd8`],[`x4`,`+- x5 0 wd32`],[`x7`,`+- x6 wd32 0`],[`y1`,`*/ h a1 200000`],[`y2`,`*/ h a1 100000`],[`y4`,`+- b 0 y2`],[`y3`,`*/ y4 1 2`],[`hR`,`*/ h a1 400000`],[`y5`,`+- b 0 hR`],[`y6`,`+- y2 0 hR`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`x4`,`t`],[`a`,`wd32`,`hR`,`3cd4`,`cd2`],[`l`,`x3`,`y1`],[`a`,`wd32`,`hR`,`3cd4`,`-10800000`],[`l`,`x8`,`y2`],[`a`,`wd32`,`hR`,`cd4`,`-10800000`],[`l`,`x7`,`y1`],[`a`,`wd32`,`hR`,`cd4`,`cd2`],[`l`,`r`,`t`],[`l`,`x10`,`y3`],[`l`,`r`,`y4`],[`l`,`x9`,`y4`],[`l`,`x9`,`y5`],[`a`,`wd32`,`hR`,`0`,`cd4`],[`l`,`x3`,`b`],[`a`,`wd32`,`hR`,`cd4`,`cd4`],[`l`,`x2`,`y4`],[`l`,`l`,`y4`],[`l`,`wd8`,`y3`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`x5`,`hR`],[`a`,`wd32`,`hR`,`0`,`cd4`],[`l`,`x3`,`y1`],[`a`,`wd32`,`hR`,`3cd4`,`-10800000`],[`l`,`x5`,`y2`],[`c`],[`m`,`x6`,`hR`],[`a`,`wd32`,`hR`,`cd2`,`-5400000`],[`l`,`x8`,`y1`],[`a`,`wd32`,`hR`,`3cd4`,`cd2`],[`l`,`x6`,`y2`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`x4`,`t`],[`a`,`wd32`,`hR`,`3cd4`,`cd2`],[`l`,`x3`,`y1`],[`a`,`wd32`,`hR`,`3cd4`,`-10800000`],[`l`,`x8`,`y2`],[`a`,`wd32`,`hR`,`cd4`,`-10800000`],[`l`,`x7`,`y1`],[`a`,`wd32`,`hR`,`cd4`,`cd2`],[`l`,`r`,`t`],[`l`,`x10`,`y3`],[`l`,`r`,`y4`],[`l`,`x9`,`y4`],[`l`,`x9`,`y5`],[`a`,`wd32`,`hR`,`0`,`cd4`],[`l`,`x3`,`b`],[`a`,`wd32`,`hR`,`cd4`,`cd4`],[`l`,`x2`,`y4`],[`l`,`l`,`y4`],[`l`,`wd8`,`y3`],[`c`],[`m`,`x5`,`hR`],[`l`,`x5`,`y2`],[`m`,`x6`,`y2`],[`l`,`x6`,`hR`],[`m`,`x2`,`y4`],[`l`,`x2`,`y6`],[`m`,`x9`,`y6`],[`l`,`x9`,`y4`]]}]},ribbon2:{adj:[[`adj1`,`val 16667`],[`adj2`,`val 50000`]],gd:[[`a1`,`pin 0 adj1 33333`],[`a2`,`pin 25000 adj2 75000`],[`x10`,`+- r 0 wd8`],[`dx2`,`*/ w a2 200000`],[`x2`,`+- hc 0 dx2`],[`x9`,`+- hc dx2 0`],[`x3`,`+- x2 wd32 0`],[`x8`,`+- x9 0 wd32`],[`x5`,`+- x2 wd8 0`],[`x6`,`+- x9 0 wd8`],[`x4`,`+- x5 0 wd32`],[`x7`,`+- x6 wd32 0`],[`dy1`,`*/ h a1 200000`],[`y1`,`+- b 0 dy1`],[`dy2`,`*/ h a1 100000`],[`y2`,`+- b 0 dy2`],[`y4`,`+- t dy2 0`],[`y3`,`+/ y4 b 2`],[`hR`,`*/ h a1 400000`],[`y6`,`+- b 0 hR`],[`y7`,`+- y1 0 hR`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`b`],[`l`,`x4`,`b`],[`a`,`wd32`,`hR`,`cd4`,`-10800000`],[`l`,`x3`,`y1`],[`a`,`wd32`,`hR`,`cd4`,`cd2`],[`l`,`x8`,`y2`],[`a`,`wd32`,`hR`,`3cd4`,`cd2`],[`l`,`x7`,`y1`],[`a`,`wd32`,`hR`,`3cd4`,`-10800000`],[`l`,`r`,`b`],[`l`,`x10`,`y3`],[`l`,`r`,`y4`],[`l`,`x9`,`y4`],[`l`,`x9`,`hR`],[`a`,`wd32`,`hR`,`0`,`-5400000`],[`l`,`x3`,`t`],[`a`,`wd32`,`hR`,`3cd4`,`-5400000`],[`l`,`x2`,`y4`],[`l`,`l`,`y4`],[`l`,`wd8`,`y3`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`x5`,`y6`],[`a`,`wd32`,`hR`,`0`,`-5400000`],[`l`,`x3`,`y1`],[`a`,`wd32`,`hR`,`cd4`,`cd2`],[`l`,`x5`,`y2`],[`c`],[`m`,`x6`,`y6`],[`a`,`wd32`,`hR`,`cd2`,`cd4`],[`l`,`x8`,`y1`],[`a`,`wd32`,`hR`,`cd4`,`-10800000`],[`l`,`x6`,`y2`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`l`,`b`],[`l`,`wd8`,`y3`],[`l`,`l`,`y4`],[`l`,`x2`,`y4`],[`l`,`x2`,`hR`],[`a`,`wd32`,`hR`,`cd2`,`cd4`],[`l`,`x8`,`t`],[`a`,`wd32`,`hR`,`3cd4`,`cd4`],[`l`,`x9`,`y4`],[`l`,`x9`,`y4`],[`l`,`r`,`y4`],[`l`,`x10`,`y3`],[`l`,`r`,`b`],[`l`,`x7`,`b`],[`a`,`wd32`,`hR`,`cd4`,`cd2`],[`l`,`x8`,`y1`],[`a`,`wd32`,`hR`,`cd4`,`-10800000`],[`l`,`x3`,`y2`],[`a`,`wd32`,`hR`,`3cd4`,`-10800000`],[`l`,`x4`,`y1`],[`a`,`wd32`,`hR`,`3cd4`,`cd2`],[`c`],[`m`,`x5`,`y2`],[`l`,`x5`,`y6`],[`m`,`x6`,`y6`],[`l`,`x6`,`y2`],[`m`,`x2`,`y7`],[`l`,`x2`,`y4`],[`m`,`x9`,`y4`],[`l`,`x9`,`y7`]]}]},rightarrow:{adj:[[`adj1`,`val 50000`],[`adj2`,`val 50000`]],gd:[[`maxAdj2`,`*/ 100000 w ss`],[`a1`,`pin 0 adj1 100000`],[`a2`,`pin 0 adj2 maxAdj2`],[`dx1`,`*/ ss a2 100000`],[`x1`,`+- r 0 dx1`],[`dy1`,`*/ h a1 200000`],[`y1`,`+- vc 0 dy1`],[`y2`,`+- vc dy1 0`],[`dx2`,`*/ y1 dx1 hd2`],[`x2`,`+- x1 dx2 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`y1`],[`l`,`x1`,`y1`],[`l`,`x1`,`t`],[`l`,`r`,`vc`],[`l`,`x1`,`b`],[`l`,`x1`,`y2`],[`l`,`l`,`y2`],[`c`]]}]},rightarrowcallout:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 25000`],[`adj3`,`val 25000`],[`adj4`,`val 64977`]],gd:[[`maxAdj2`,`*/ 50000 h ss`],[`a2`,`pin 0 adj2 maxAdj2`],[`maxAdj1`,`*/ a2 2 1`],[`a1`,`pin 0 adj1 maxAdj1`],[`maxAdj3`,`*/ 100000 w ss`],[`a3`,`pin 0 adj3 maxAdj3`],[`q2`,`*/ a3 ss w`],[`maxAdj4`,`+- 100000 0 q2`],[`a4`,`pin 0 adj4 maxAdj4`],[`dy1`,`*/ ss a2 100000`],[`dy2`,`*/ ss a1 200000`],[`y1`,`+- vc 0 dy1`],[`y2`,`+- vc 0 dy2`],[`y3`,`+- vc dy2 0`],[`y4`,`+- vc dy1 0`],[`dx3`,`*/ ss a3 100000`],[`x3`,`+- r 0 dx3`],[`x2`,`*/ w a4 100000`],[`x1`,`*/ x2 1 2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`x2`,`t`],[`l`,`x2`,`y2`],[`l`,`x3`,`y2`],[`l`,`x3`,`y1`],[`l`,`r`,`vc`],[`l`,`x3`,`y4`],[`l`,`x3`,`y3`],[`l`,`x2`,`y3`],[`l`,`x2`,`b`],[`l`,`l`,`b`],[`c`]]}]},rightbrace:{adj:[[`adj1`,`val 8333`],[`adj2`,`val 50000`]],gd:[[`a2`,`pin 0 adj2 100000`],[`q1`,`+- 100000 0 a2`],[`q2`,`min q1 a2`],[`q3`,`*/ q2 1 2`],[`maxAdj1`,`*/ q3 h ss`],[`a1`,`pin 0 adj1 maxAdj1`],[`y1`,`*/ ss a1 100000`],[`y3`,`*/ h a2 100000`],[`y2`,`+- y3 0 y1`],[`y4`,`+- b 0 y1`],[`dx1`,`cos wd2 2700000`],[`dy1`,`sin y1 2700000`],[`ir`,`+- l dx1 0`],[`it`,`+- y1 0 dy1`],[`ib`,`+- b dy1 y1`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`a`,`wd2`,`y1`,`3cd4`,`cd4`],[`l`,`hc`,`y2`],[`a`,`wd2`,`y1`,`cd2`,`-5400000`],[`a`,`wd2`,`y1`,`3cd4`,`-5400000`],[`l`,`hc`,`y4`],[`a`,`wd2`,`y1`,`0`,`cd4`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`a`,`wd2`,`y1`,`3cd4`,`cd4`],[`l`,`hc`,`y2`],[`a`,`wd2`,`y1`,`cd2`,`-5400000`],[`a`,`wd2`,`y1`,`3cd4`,`-5400000`],[`l`,`hc`,`y4`],[`a`,`wd2`,`y1`,`0`,`cd4`]]}]},rightbracket:{adj:[[`adj`,`val 8333`]],gd:[[`maxAdj`,`*/ 50000 h ss`],[`a`,`pin 0 adj maxAdj`],[`y1`,`*/ ss a 100000`],[`y2`,`+- b 0 y1`],[`dx1`,`cos w 2700000`],[`dy1`,`sin y1 2700000`],[`ir`,`+- l dx1 0`],[`it`,`+- y1 0 dy1`],[`ib`,`+- b dy1 y1`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`a`,`w`,`y1`,`3cd4`,`cd4`],[`l`,`r`,`y2`],[`a`,`w`,`y1`,`0`,`cd4`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`a`,`w`,`y1`,`3cd4`,`cd4`],[`l`,`r`,`y2`],[`a`,`w`,`y1`,`0`,`cd4`]]}]},round1rect:{adj:[[`adj`,`val 16667`]],gd:[[`a`,`pin 0 adj 50000`],[`dx1`,`*/ ss a 100000`],[`x1`,`+- r 0 dx1`],[`idx`,`*/ dx1 29289 100000`],[`ir`,`+- r 0 idx`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`x1`,`t`],[`a`,`dx1`,`dx1`,`3cd4`,`cd4`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]},round2diagrect:{adj:[[`adj1`,`val 16667`],[`adj2`,`val 0`]],gd:[[`a1`,`pin 0 adj1 50000`],[`a2`,`pin 0 adj2 50000`],[`x1`,`*/ ss a1 100000`],[`y1`,`+- b 0 x1`],[`a`,`*/ ss a2 100000`],[`x2`,`+- r 0 a`],[`y2`,`+- b 0 a`],[`dx1`,`*/ x1 29289 100000`],[`dx2`,`*/ a 29289 100000`],[`d`,`+- dx1 0 dx2`],[`dx`,`?: d dx1 dx2`],[`ir`,`+- r 0 dx`],[`ib`,`+- b 0 dx`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`t`],[`l`,`x2`,`t`],[`a`,`a`,`a`,`3cd4`,`cd4`],[`l`,`r`,`y1`],[`a`,`x1`,`x1`,`0`,`cd4`],[`l`,`a`,`b`],[`a`,`a`,`a`,`cd4`,`cd4`],[`l`,`l`,`x1`],[`a`,`x1`,`x1`,`cd2`,`cd4`],[`c`]]}]},round2samerect:{adj:[[`adj1`,`val 16667`],[`adj2`,`val 0`]],gd:[[`a1`,`pin 0 adj1 50000`],[`a2`,`pin 0 adj2 50000`],[`tx1`,`*/ ss a1 100000`],[`tx2`,`+- r 0 tx1`],[`bx1`,`*/ ss a2 100000`],[`bx2`,`+- r 0 bx1`],[`by1`,`+- b 0 bx1`],[`d`,`+- tx1 0 bx1`],[`tdx`,`*/ tx1 29289 100000`],[`bdx`,`*/ bx1 29289 100000`],[`il`,`?: d tdx bdx`],[`ir`,`+- r 0 il`],[`ib`,`+- b 0 bdx`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`tx1`,`t`],[`l`,`tx2`,`t`],[`a`,`tx1`,`tx1`,`3cd4`,`cd4`],[`l`,`r`,`by1`],[`a`,`bx1`,`bx1`,`0`,`cd4`],[`l`,`bx1`,`b`],[`a`,`bx1`,`bx1`,`cd4`,`cd4`],[`l`,`l`,`tx1`],[`a`,`tx1`,`tx1`,`cd2`,`cd4`],[`c`]]}]},roundrect:{adj:[[`adj`,`val 16667`]],gd:[[`a`,`pin 0 adj 50000`],[`x1`,`*/ ss a 100000`],[`x2`,`+- r 0 x1`],[`y2`,`+- b 0 x1`],[`il`,`*/ x1 29289 100000`],[`ir`,`+- r 0 il`],[`ib`,`+- b 0 il`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`x1`],[`a`,`x1`,`x1`,`cd2`,`cd4`],[`l`,`x2`,`t`],[`a`,`x1`,`x1`,`3cd4`,`cd4`],[`l`,`r`,`y2`],[`a`,`x1`,`x1`,`0`,`cd4`],[`l`,`x1`,`b`],[`a`,`x1`,`x1`,`cd4`,`cd4`],[`c`]]}]},rttriangle:{adj:[],gd:[[`it`,`*/ h 7 12`],[`ir`,`*/ w 7 12`],[`ib`,`*/ h 11 12`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`b`],[`l`,`l`,`t`],[`l`,`r`,`b`],[`c`]]}]},smileyface:{adj:[[`adj`,`val 4653`]],gd:[[`a`,`pin -4653 adj 4653`],[`x1`,`*/ w 4969 21699`],[`x2`,`*/ w 6215 21600`],[`x3`,`*/ w 13135 21600`],[`x4`,`*/ w 16640 21600`],[`y1`,`*/ h 7570 21600`],[`y3`,`*/ h 16515 21600`],[`dy2`,`*/ h a 100000`],[`y2`,`+- y3 0 dy2`],[`y4`,`+- y3 dy2 0`],[`dy3`,`*/ h a 50000`],[`y5`,`+- y4 dy3 0`],[`idx`,`cos wd2 2700000`],[`idy`,`sin hd2 2700000`],[`il`,`+- hc 0 idx`],[`ir`,`+- hc idx 0`],[`it`,`+- vc 0 idy`],[`ib`,`+- vc idy 0`],[`wR`,`*/ w 1125 21600`],[`hR`,`*/ h 1125 21600`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`l`,`vc`],[`a`,`wd2`,`hd2`,`cd2`,`21600000`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x2`,`y1`],[`a`,`wR`,`hR`,`cd2`,`21600000`],[`m`,`x3`,`y1`],[`a`,`wR`,`hR`,`cd2`,`21600000`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`x1`,`y2`],[`Q`,`hc`,`y5`,`x4`,`y2`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`a`,`wd2`,`hd2`,`cd2`,`21600000`],[`c`]]}]},snip1rect:{adj:[[`adj`,`val 16667`]],gd:[[`a`,`pin 0 adj 50000`],[`dx1`,`*/ ss a 100000`],[`x1`,`+- r 0 dx1`],[`it`,`*/ dx1 1 2`],[`ir`,`+/ x1 r 2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`x1`,`t`],[`l`,`r`,`dx1`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]},snip2diagrect:{adj:[[`adj1`,`val 0`],[`adj2`,`val 16667`]],gd:[[`a1`,`pin 0 adj1 50000`],[`a2`,`pin 0 adj2 50000`],[`lx1`,`*/ ss a1 100000`],[`lx2`,`+- r 0 lx1`],[`ly1`,`+- b 0 lx1`],[`rx1`,`*/ ss a2 100000`],[`rx2`,`+- r 0 rx1`],[`ry1`,`+- b 0 rx1`],[`d`,`+- lx1 0 rx1`],[`dx`,`?: d lx1 rx1`],[`il`,`*/ dx 1 2`],[`ir`,`+- r 0 il`],[`ib`,`+- b 0 il`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`lx1`,`t`],[`l`,`rx2`,`t`],[`l`,`r`,`rx1`],[`l`,`r`,`ly1`],[`l`,`lx2`,`b`],[`l`,`rx1`,`b`],[`l`,`l`,`ry1`],[`l`,`l`,`lx1`],[`c`]]}]},snip2samerect:{adj:[[`adj1`,`val 16667`],[`adj2`,`val 0`]],gd:[[`a1`,`pin 0 adj1 50000`],[`a2`,`pin 0 adj2 50000`],[`tx1`,`*/ ss a1 100000`],[`tx2`,`+- r 0 tx1`],[`bx1`,`*/ ss a2 100000`],[`bx2`,`+- r 0 bx1`],[`by1`,`+- b 0 bx1`],[`d`,`+- tx1 0 bx1`],[`dx`,`?: d tx1 bx1`],[`il`,`*/ dx 1 2`],[`ir`,`+- r 0 il`],[`it`,`*/ tx1 1 2`],[`ib`,`+/ by1 b 2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`tx1`,`t`],[`l`,`tx2`,`t`],[`l`,`r`,`tx1`],[`l`,`r`,`by1`],[`l`,`bx2`,`b`],[`l`,`bx1`,`b`],[`l`,`l`,`by1`],[`l`,`l`,`tx1`],[`c`]]}]},sniproundrect:{adj:[[`adj1`,`val 16667`],[`adj2`,`val 16667`]],gd:[[`a1`,`pin 0 adj1 50000`],[`a2`,`pin 0 adj2 50000`],[`x1`,`*/ ss a1 100000`],[`dx2`,`*/ ss a2 100000`],[`x2`,`+- r 0 dx2`],[`il`,`*/ x1 29289 100000`],[`ir`,`+/ x2 r 2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`t`],[`l`,`x2`,`t`],[`l`,`r`,`dx2`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`l`,`l`,`x1`],[`a`,`x1`,`x1`,`cd2`,`cd4`],[`c`]]}]},squaretabs:{adj:[],gd:[[`md`,`mod w h 0`],[`dx`,`*/ 1 md 20`],[`y1`,`+- 0 b dx`],[`x1`,`+- 0 r dx`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`dx`,`t`],[`l`,`dx`,`dx`],[`l`,`l`,`dx`],[`c`]]},{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`y1`],[`l`,`dx`,`y1`],[`l`,`dx`,`b`],[`l`,`l`,`b`],[`c`]]},{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`t`],[`l`,`r`,`t`],[`l`,`r`,`dx`],[`l`,`x1`,`dx`],[`c`]]},{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`y1`],[`l`,`r`,`y1`],[`l`,`r`,`b`],[`l`,`x1`,`b`],[`c`]]}]},star10:{adj:[[`adj`,`val 42533`],[`hf`,`val 105146`]],gd:[[`a`,`pin 0 adj 50000`],[`swd2`,`*/ wd2 hf 100000`],[`dx1`,`*/ swd2 95106 100000`],[`dx2`,`*/ swd2 58779 100000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- hc dx2 0`],[`x4`,`+- hc dx1 0`],[`dy1`,`*/ hd2 80902 100000`],[`dy2`,`*/ hd2 30902 100000`],[`y1`,`+- vc 0 dy1`],[`y2`,`+- vc 0 dy2`],[`y3`,`+- vc dy2 0`],[`y4`,`+- vc dy1 0`],[`iwd2`,`*/ swd2 a 50000`],[`ihd2`,`*/ hd2 a 50000`],[`sdx1`,`*/ iwd2 80902 100000`],[`sdx2`,`*/ iwd2 30902 100000`],[`sdy1`,`*/ ihd2 95106 100000`],[`sdy2`,`*/ ihd2 58779 100000`],[`sx1`,`+- hc 0 iwd2`],[`sx2`,`+- hc 0 sdx1`],[`sx3`,`+- hc 0 sdx2`],[`sx4`,`+- hc sdx2 0`],[`sx5`,`+- hc sdx1 0`],[`sx6`,`+- hc iwd2 0`],[`sy1`,`+- vc 0 sdy1`],[`sy2`,`+- vc 0 sdy2`],[`sy3`,`+- vc sdy2 0`],[`sy4`,`+- vc sdy1 0`],[`yAdj`,`+- vc 0 ihd2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`y2`],[`l`,`sx2`,`sy2`],[`l`,`x2`,`y1`],[`l`,`sx3`,`sy1`],[`l`,`hc`,`t`],[`l`,`sx4`,`sy1`],[`l`,`x3`,`y1`],[`l`,`sx5`,`sy2`],[`l`,`x4`,`y2`],[`l`,`sx6`,`vc`],[`l`,`x4`,`y3`],[`l`,`sx5`,`sy3`],[`l`,`x3`,`y4`],[`l`,`sx4`,`sy4`],[`l`,`hc`,`b`],[`l`,`sx3`,`sy4`],[`l`,`x2`,`y4`],[`l`,`sx2`,`sy3`],[`l`,`x1`,`y3`],[`l`,`sx1`,`vc`],[`c`]]}]},star12:{adj:[[`adj`,`val 37500`]],gd:[[`a`,`pin 0 adj 50000`],[`dx1`,`cos wd2 1800000`],[`dy1`,`sin hd2 3600000`],[`x1`,`+- hc 0 dx1`],[`x3`,`*/ w 3 4`],[`x4`,`+- hc dx1 0`],[`y1`,`+- vc 0 dy1`],[`y3`,`*/ h 3 4`],[`y4`,`+- vc dy1 0`],[`iwd2`,`*/ wd2 a 50000`],[`ihd2`,`*/ hd2 a 50000`],[`sdx1`,`cos iwd2 900000`],[`sdx2`,`cos iwd2 2700000`],[`sdx3`,`cos iwd2 4500000`],[`sdy1`,`sin ihd2 4500000`],[`sdy2`,`sin ihd2 2700000`],[`sdy3`,`sin ihd2 900000`],[`sx1`,`+- hc 0 sdx1`],[`sx2`,`+- hc 0 sdx2`],[`sx3`,`+- hc 0 sdx3`],[`sx4`,`+- hc sdx3 0`],[`sx5`,`+- hc sdx2 0`],[`sx6`,`+- hc sdx1 0`],[`sy1`,`+- vc 0 sdy1`],[`sy2`,`+- vc 0 sdy2`],[`sy3`,`+- vc 0 sdy3`],[`sy4`,`+- vc sdy3 0`],[`sy5`,`+- vc sdy2 0`],[`sy6`,`+- vc sdy1 0`],[`yAdj`,`+- vc 0 ihd2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`l`,`sx1`,`sy3`],[`l`,`x1`,`hd4`],[`l`,`sx2`,`sy2`],[`l`,`wd4`,`y1`],[`l`,`sx3`,`sy1`],[`l`,`hc`,`t`],[`l`,`sx4`,`sy1`],[`l`,`x3`,`y1`],[`l`,`sx5`,`sy2`],[`l`,`x4`,`hd4`],[`l`,`sx6`,`sy3`],[`l`,`r`,`vc`],[`l`,`sx6`,`sy4`],[`l`,`x4`,`y3`],[`l`,`sx5`,`sy5`],[`l`,`x3`,`y4`],[`l`,`sx4`,`sy6`],[`l`,`hc`,`b`],[`l`,`sx3`,`sy6`],[`l`,`wd4`,`y4`],[`l`,`sx2`,`sy5`],[`l`,`x1`,`y3`],[`l`,`sx1`,`sy4`],[`c`]]}]},star16:{adj:[[`adj`,`val 37500`]],gd:[[`a`,`pin 0 adj 50000`],[`dx1`,`*/ wd2 92388 100000`],[`dx2`,`*/ wd2 70711 100000`],[`dx3`,`*/ wd2 38268 100000`],[`dy1`,`*/ hd2 92388 100000`],[`dy2`,`*/ hd2 70711 100000`],[`dy3`,`*/ hd2 38268 100000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- hc 0 dx3`],[`x4`,`+- hc dx3 0`],[`x5`,`+- hc dx2 0`],[`x6`,`+- hc dx1 0`],[`y1`,`+- vc 0 dy1`],[`y2`,`+- vc 0 dy2`],[`y3`,`+- vc 0 dy3`],[`y4`,`+- vc dy3 0`],[`y5`,`+- vc dy2 0`],[`y6`,`+- vc dy1 0`],[`iwd2`,`*/ wd2 a 50000`],[`ihd2`,`*/ hd2 a 50000`],[`sdx1`,`*/ iwd2 98079 100000`],[`sdx2`,`*/ iwd2 83147 100000`],[`sdx3`,`*/ iwd2 55557 100000`],[`sdx4`,`*/ iwd2 19509 100000`],[`sdy1`,`*/ ihd2 98079 100000`],[`sdy2`,`*/ ihd2 83147 100000`],[`sdy3`,`*/ ihd2 55557 100000`],[`sdy4`,`*/ ihd2 19509 100000`],[`sx1`,`+- hc 0 sdx1`],[`sx2`,`+- hc 0 sdx2`],[`sx3`,`+- hc 0 sdx3`],[`sx4`,`+- hc 0 sdx4`],[`sx5`,`+- hc sdx4 0`],[`sx6`,`+- hc sdx3 0`],[`sx7`,`+- hc sdx2 0`],[`sx8`,`+- hc sdx1 0`],[`sy1`,`+- vc 0 sdy1`],[`sy2`,`+- vc 0 sdy2`],[`sy3`,`+- vc 0 sdy3`],[`sy4`,`+- vc 0 sdy4`],[`sy5`,`+- vc sdy4 0`],[`sy6`,`+- vc sdy3 0`],[`sy7`,`+- vc sdy2 0`],[`sy8`,`+- vc sdy1 0`],[`idx`,`cos iwd2 2700000`],[`idy`,`sin ihd2 2700000`],[`il`,`+- hc 0 idx`],[`it`,`+- vc 0 idy`],[`ir`,`+- hc idx 0`],[`ib`,`+- vc idy 0`],[`yAdj`,`+- vc 0 ihd2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`l`,`sx1`,`sy4`],[`l`,`x1`,`y3`],[`l`,`sx2`,`sy3`],[`l`,`x2`,`y2`],[`l`,`sx3`,`sy2`],[`l`,`x3`,`y1`],[`l`,`sx4`,`sy1`],[`l`,`hc`,`t`],[`l`,`sx5`,`sy1`],[`l`,`x4`,`y1`],[`l`,`sx6`,`sy2`],[`l`,`x5`,`y2`],[`l`,`sx7`,`sy3`],[`l`,`x6`,`y3`],[`l`,`sx8`,`sy4`],[`l`,`r`,`vc`],[`l`,`sx8`,`sy5`],[`l`,`x6`,`y4`],[`l`,`sx7`,`sy6`],[`l`,`x5`,`y5`],[`l`,`sx6`,`sy7`],[`l`,`x4`,`y6`],[`l`,`sx5`,`sy8`],[`l`,`hc`,`b`],[`l`,`sx4`,`sy8`],[`l`,`x3`,`y6`],[`l`,`sx3`,`sy7`],[`l`,`x2`,`y5`],[`l`,`sx2`,`sy6`],[`l`,`x1`,`y4`],[`l`,`sx1`,`sy5`],[`c`]]}]},star24:{adj:[[`adj`,`val 37500`]],gd:[[`a`,`pin 0 adj 50000`],[`dx1`,`cos wd2 900000`],[`dx2`,`cos wd2 1800000`],[`dx3`,`cos wd2 2700000`],[`dx4`,`val wd4`],[`dx5`,`cos wd2 4500000`],[`dy1`,`sin hd2 4500000`],[`dy2`,`sin hd2 3600000`],[`dy3`,`sin hd2 2700000`],[`dy4`,`val hd4`],[`dy5`,`sin hd2 900000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- hc 0 dx3`],[`x4`,`+- hc 0 dx4`],[`x5`,`+- hc 0 dx5`],[`x6`,`+- hc dx5 0`],[`x7`,`+- hc dx4 0`],[`x8`,`+- hc dx3 0`],[`x9`,`+- hc dx2 0`],[`x10`,`+- hc dx1 0`],[`y1`,`+- vc 0 dy1`],[`y2`,`+- vc 0 dy2`],[`y3`,`+- vc 0 dy3`],[`y4`,`+- vc 0 dy4`],[`y5`,`+- vc 0 dy5`],[`y6`,`+- vc dy5 0`],[`y7`,`+- vc dy4 0`],[`y8`,`+- vc dy3 0`],[`y9`,`+- vc dy2 0`],[`y10`,`+- vc dy1 0`],[`iwd2`,`*/ wd2 a 50000`],[`ihd2`,`*/ hd2 a 50000`],[`sdx1`,`*/ iwd2 99144 100000`],[`sdx2`,`*/ iwd2 92388 100000`],[`sdx3`,`*/ iwd2 79335 100000`],[`sdx4`,`*/ iwd2 60876 100000`],[`sdx5`,`*/ iwd2 38268 100000`],[`sdx6`,`*/ iwd2 13053 100000`],[`sdy1`,`*/ ihd2 99144 100000`],[`sdy2`,`*/ ihd2 92388 100000`],[`sdy3`,`*/ ihd2 79335 100000`],[`sdy4`,`*/ ihd2 60876 100000`],[`sdy5`,`*/ ihd2 38268 100000`],[`sdy6`,`*/ ihd2 13053 100000`],[`sx1`,`+- hc 0 sdx1`],[`sx2`,`+- hc 0 sdx2`],[`sx3`,`+- hc 0 sdx3`],[`sx4`,`+- hc 0 sdx4`],[`sx5`,`+- hc 0 sdx5`],[`sx6`,`+- hc 0 sdx6`],[`sx7`,`+- hc sdx6 0`],[`sx8`,`+- hc sdx5 0`],[`sx9`,`+- hc sdx4 0`],[`sx10`,`+- hc sdx3 0`],[`sx11`,`+- hc sdx2 0`],[`sx12`,`+- hc sdx1 0`],[`sy1`,`+- vc 0 sdy1`],[`sy2`,`+- vc 0 sdy2`],[`sy3`,`+- vc 0 sdy3`],[`sy4`,`+- vc 0 sdy4`],[`sy5`,`+- vc 0 sdy5`],[`sy6`,`+- vc 0 sdy6`],[`sy7`,`+- vc sdy6 0`],[`sy8`,`+- vc sdy5 0`],[`sy9`,`+- vc sdy4 0`],[`sy10`,`+- vc sdy3 0`],[`sy11`,`+- vc sdy2 0`],[`sy12`,`+- vc sdy1 0`],[`idx`,`cos iwd2 2700000`],[`idy`,`sin ihd2 2700000`],[`il`,`+- hc 0 idx`],[`it`,`+- vc 0 idy`],[`ir`,`+- hc idx 0`],[`ib`,`+- vc idy 0`],[`yAdj`,`+- vc 0 ihd2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`l`,`sx1`,`sy6`],[`l`,`x1`,`y5`],[`l`,`sx2`,`sy5`],[`l`,`x2`,`y4`],[`l`,`sx3`,`sy4`],[`l`,`x3`,`y3`],[`l`,`sx4`,`sy3`],[`l`,`x4`,`y2`],[`l`,`sx5`,`sy2`],[`l`,`x5`,`y1`],[`l`,`sx6`,`sy1`],[`l`,`hc`,`t`],[`l`,`sx7`,`sy1`],[`l`,`x6`,`y1`],[`l`,`sx8`,`sy2`],[`l`,`x7`,`y2`],[`l`,`sx9`,`sy3`],[`l`,`x8`,`y3`],[`l`,`sx10`,`sy4`],[`l`,`x9`,`y4`],[`l`,`sx11`,`sy5`],[`l`,`x10`,`y5`],[`l`,`sx12`,`sy6`],[`l`,`r`,`vc`],[`l`,`sx12`,`sy7`],[`l`,`x10`,`y6`],[`l`,`sx11`,`sy8`],[`l`,`x9`,`y7`],[`l`,`sx10`,`sy9`],[`l`,`x8`,`y8`],[`l`,`sx9`,`sy10`],[`l`,`x7`,`y9`],[`l`,`sx8`,`sy11`],[`l`,`x6`,`y10`],[`l`,`sx7`,`sy12`],[`l`,`hc`,`b`],[`l`,`sx6`,`sy12`],[`l`,`x5`,`y10`],[`l`,`sx5`,`sy11`],[`l`,`x4`,`y9`],[`l`,`sx4`,`sy10`],[`l`,`x3`,`y8`],[`l`,`sx3`,`sy9`],[`l`,`x2`,`y7`],[`l`,`sx2`,`sy8`],[`l`,`x1`,`y6`],[`l`,`sx1`,`sy7`],[`c`]]}]},star32:{adj:[[`adj`,`val 37500`]],gd:[[`a`,`pin 0 adj 50000`],[`dx1`,`*/ wd2 98079 100000`],[`dx2`,`*/ wd2 92388 100000`],[`dx3`,`*/ wd2 83147 100000`],[`dx4`,`cos wd2 2700000`],[`dx5`,`*/ wd2 55557 100000`],[`dx6`,`*/ wd2 38268 100000`],[`dx7`,`*/ wd2 19509 100000`],[`dy1`,`*/ hd2 98079 100000`],[`dy2`,`*/ hd2 92388 100000`],[`dy3`,`*/ hd2 83147 100000`],[`dy4`,`sin hd2 2700000`],[`dy5`,`*/ hd2 55557 100000`],[`dy6`,`*/ hd2 38268 100000`],[`dy7`,`*/ hd2 19509 100000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- hc 0 dx3`],[`x4`,`+- hc 0 dx4`],[`x5`,`+- hc 0 dx5`],[`x6`,`+- hc 0 dx6`],[`x7`,`+- hc 0 dx7`],[`x8`,`+- hc dx7 0`],[`x9`,`+- hc dx6 0`],[`x10`,`+- hc dx5 0`],[`x11`,`+- hc dx4 0`],[`x12`,`+- hc dx3 0`],[`x13`,`+- hc dx2 0`],[`x14`,`+- hc dx1 0`],[`y1`,`+- vc 0 dy1`],[`y2`,`+- vc 0 dy2`],[`y3`,`+- vc 0 dy3`],[`y4`,`+- vc 0 dy4`],[`y5`,`+- vc 0 dy5`],[`y6`,`+- vc 0 dy6`],[`y7`,`+- vc 0 dy7`],[`y8`,`+- vc dy7 0`],[`y9`,`+- vc dy6 0`],[`y10`,`+- vc dy5 0`],[`y11`,`+- vc dy4 0`],[`y12`,`+- vc dy3 0`],[`y13`,`+- vc dy2 0`],[`y14`,`+- vc dy1 0`],[`iwd2`,`*/ wd2 a 50000`],[`ihd2`,`*/ hd2 a 50000`],[`sdx1`,`*/ iwd2 99518 100000`],[`sdx2`,`*/ iwd2 95694 100000`],[`sdx3`,`*/ iwd2 88192 100000`],[`sdx4`,`*/ iwd2 77301 100000`],[`sdx5`,`*/ iwd2 63439 100000`],[`sdx6`,`*/ iwd2 47140 100000`],[`sdx7`,`*/ iwd2 29028 100000`],[`sdx8`,`*/ iwd2 9802 100000`],[`sdy1`,`*/ ihd2 99518 100000`],[`sdy2`,`*/ ihd2 95694 100000`],[`sdy3`,`*/ ihd2 88192 100000`],[`sdy4`,`*/ ihd2 77301 100000`],[`sdy5`,`*/ ihd2 63439 100000`],[`sdy6`,`*/ ihd2 47140 100000`],[`sdy7`,`*/ ihd2 29028 100000`],[`sdy8`,`*/ ihd2 9802 100000`],[`sx1`,`+- hc 0 sdx1`],[`sx2`,`+- hc 0 sdx2`],[`sx3`,`+- hc 0 sdx3`],[`sx4`,`+- hc 0 sdx4`],[`sx5`,`+- hc 0 sdx5`],[`sx6`,`+- hc 0 sdx6`],[`sx7`,`+- hc 0 sdx7`],[`sx8`,`+- hc 0 sdx8`],[`sx9`,`+- hc sdx8 0`],[`sx10`,`+- hc sdx7 0`],[`sx11`,`+- hc sdx6 0`],[`sx12`,`+- hc sdx5 0`],[`sx13`,`+- hc sdx4 0`],[`sx14`,`+- hc sdx3 0`],[`sx15`,`+- hc sdx2 0`],[`sx16`,`+- hc sdx1 0`],[`sy1`,`+- vc 0 sdy1`],[`sy2`,`+- vc 0 sdy2`],[`sy3`,`+- vc 0 sdy3`],[`sy4`,`+- vc 0 sdy4`],[`sy5`,`+- vc 0 sdy5`],[`sy6`,`+- vc 0 sdy6`],[`sy7`,`+- vc 0 sdy7`],[`sy8`,`+- vc 0 sdy8`],[`sy9`,`+- vc sdy8 0`],[`sy10`,`+- vc sdy7 0`],[`sy11`,`+- vc sdy6 0`],[`sy12`,`+- vc sdy5 0`],[`sy13`,`+- vc sdy4 0`],[`sy14`,`+- vc sdy3 0`],[`sy15`,`+- vc sdy2 0`],[`sy16`,`+- vc sdy1 0`],[`idx`,`cos iwd2 2700000`],[`idy`,`sin ihd2 2700000`],[`il`,`+- hc 0 idx`],[`it`,`+- vc 0 idy`],[`ir`,`+- hc idx 0`],[`ib`,`+- vc idy 0`],[`yAdj`,`+- vc 0 ihd2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`l`,`sx1`,`sy8`],[`l`,`x1`,`y7`],[`l`,`sx2`,`sy7`],[`l`,`x2`,`y6`],[`l`,`sx3`,`sy6`],[`l`,`x3`,`y5`],[`l`,`sx4`,`sy5`],[`l`,`x4`,`y4`],[`l`,`sx5`,`sy4`],[`l`,`x5`,`y3`],[`l`,`sx6`,`sy3`],[`l`,`x6`,`y2`],[`l`,`sx7`,`sy2`],[`l`,`x7`,`y1`],[`l`,`sx8`,`sy1`],[`l`,`hc`,`t`],[`l`,`sx9`,`sy1`],[`l`,`x8`,`y1`],[`l`,`sx10`,`sy2`],[`l`,`x9`,`y2`],[`l`,`sx11`,`sy3`],[`l`,`x10`,`y3`],[`l`,`sx12`,`sy4`],[`l`,`x11`,`y4`],[`l`,`sx13`,`sy5`],[`l`,`x12`,`y5`],[`l`,`sx14`,`sy6`],[`l`,`x13`,`y6`],[`l`,`sx15`,`sy7`],[`l`,`x14`,`y7`],[`l`,`sx16`,`sy8`],[`l`,`r`,`vc`],[`l`,`sx16`,`sy9`],[`l`,`x14`,`y8`],[`l`,`sx15`,`sy10`],[`l`,`x13`,`y9`],[`l`,`sx14`,`sy11`],[`l`,`x12`,`y10`],[`l`,`sx13`,`sy12`],[`l`,`x11`,`y11`],[`l`,`sx12`,`sy13`],[`l`,`x10`,`y12`],[`l`,`sx11`,`sy14`],[`l`,`x9`,`y13`],[`l`,`sx10`,`sy15`],[`l`,`x8`,`y14`],[`l`,`sx9`,`sy16`],[`l`,`hc`,`b`],[`l`,`sx8`,`sy16`],[`l`,`x7`,`y14`],[`l`,`sx7`,`sy15`],[`l`,`x6`,`y13`],[`l`,`sx6`,`sy14`],[`l`,`x5`,`y12`],[`l`,`sx5`,`sy13`],[`l`,`x4`,`y11`],[`l`,`sx4`,`sy12`],[`l`,`x3`,`y10`],[`l`,`sx3`,`sy11`],[`l`,`x2`,`y9`],[`l`,`sx2`,`sy10`],[`l`,`x1`,`y8`],[`l`,`sx1`,`sy9`],[`c`]]}]},star4:{adj:[[`adj`,`val 12500`]],gd:[[`a`,`pin 0 adj 50000`],[`iwd2`,`*/ wd2 a 50000`],[`ihd2`,`*/ hd2 a 50000`],[`sdx`,`cos iwd2 2700000`],[`sdy`,`sin ihd2 2700000`],[`sx1`,`+- hc 0 sdx`],[`sx2`,`+- hc sdx 0`],[`sy1`,`+- vc 0 sdy`],[`sy2`,`+- vc sdy 0`],[`yAdj`,`+- vc 0 ihd2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`l`,`sx1`,`sy1`],[`l`,`hc`,`t`],[`l`,`sx2`,`sy1`],[`l`,`r`,`vc`],[`l`,`sx2`,`sy2`],[`l`,`hc`,`b`],[`l`,`sx1`,`sy2`],[`c`]]}]},star5:{adj:[[`adj`,`val 19098`],[`hf`,`val 105146`],[`vf`,`val 110557`]],gd:[[`a`,`pin 0 adj 50000`],[`swd2`,`*/ wd2 hf 100000`],[`shd2`,`*/ hd2 vf 100000`],[`svc`,`*/ vc vf 100000`],[`dx1`,`cos swd2 1080000`],[`dx2`,`cos swd2 18360000`],[`dy1`,`sin shd2 1080000`],[`dy2`,`sin shd2 18360000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- hc dx2 0`],[`x4`,`+- hc dx1 0`],[`y1`,`+- svc 0 dy1`],[`y2`,`+- svc 0 dy2`],[`iwd2`,`*/ swd2 a 50000`],[`ihd2`,`*/ shd2 a 50000`],[`sdx1`,`cos iwd2 20520000`],[`sdx2`,`cos iwd2 3240000`],[`sdy1`,`sin ihd2 3240000`],[`sdy2`,`sin ihd2 20520000`],[`sx1`,`+- hc 0 sdx1`],[`sx2`,`+- hc 0 sdx2`],[`sx3`,`+- hc sdx2 0`],[`sx4`,`+- hc sdx1 0`],[`sy1`,`+- svc 0 sdy1`],[`sy2`,`+- svc 0 sdy2`],[`sy3`,`+- svc ihd2 0`],[`yAdj`,`+- svc 0 ihd2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`y1`],[`l`,`sx2`,`sy1`],[`l`,`hc`,`t`],[`l`,`sx3`,`sy1`],[`l`,`x4`,`y1`],[`l`,`sx4`,`sy2`],[`l`,`x3`,`y2`],[`l`,`hc`,`sy3`],[`l`,`x2`,`y2`],[`l`,`sx1`,`sy2`],[`c`]]}]},star6:{adj:[[`adj`,`val 28868`],[`hf`,`val 115470`]],gd:[[`a`,`pin 0 adj 50000`],[`swd2`,`*/ wd2 hf 100000`],[`dx1`,`cos swd2 1800000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc dx1 0`],[`y2`,`+- vc hd4 0`],[`iwd2`,`*/ swd2 a 50000`],[`ihd2`,`*/ hd2 a 50000`],[`sdx2`,`*/ iwd2 1 2`],[`sx1`,`+- hc 0 iwd2`],[`sx2`,`+- hc 0 sdx2`],[`sx3`,`+- hc sdx2 0`],[`sx4`,`+- hc iwd2 0`],[`sdy1`,`sin ihd2 3600000`],[`sy1`,`+- vc 0 sdy1`],[`sy2`,`+- vc sdy1 0`],[`yAdj`,`+- vc 0 ihd2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`hd4`],[`l`,`sx2`,`sy1`],[`l`,`hc`,`t`],[`l`,`sx3`,`sy1`],[`l`,`x2`,`hd4`],[`l`,`sx4`,`vc`],[`l`,`x2`,`y2`],[`l`,`sx3`,`sy2`],[`l`,`hc`,`b`],[`l`,`sx2`,`sy2`],[`l`,`x1`,`y2`],[`l`,`sx1`,`vc`],[`c`]]}]},star7:{adj:[[`adj`,`val 34601`],[`hf`,`val 102572`],[`vf`,`val 105210`]],gd:[[`a`,`pin 0 adj 50000`],[`swd2`,`*/ wd2 hf 100000`],[`shd2`,`*/ hd2 vf 100000`],[`svc`,`*/ vc vf 100000`],[`dx1`,`*/ swd2 97493 100000`],[`dx2`,`*/ swd2 78183 100000`],[`dx3`,`*/ swd2 43388 100000`],[`dy1`,`*/ shd2 62349 100000`],[`dy2`,`*/ shd2 22252 100000`],[`dy3`,`*/ shd2 90097 100000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- hc 0 dx3`],[`x4`,`+- hc dx3 0`],[`x5`,`+- hc dx2 0`],[`x6`,`+- hc dx1 0`],[`y1`,`+- svc 0 dy1`],[`y2`,`+- svc dy2 0`],[`y3`,`+- svc dy3 0`],[`iwd2`,`*/ swd2 a 50000`],[`ihd2`,`*/ shd2 a 50000`],[`sdx1`,`*/ iwd2 97493 100000`],[`sdx2`,`*/ iwd2 78183 100000`],[`sdx3`,`*/ iwd2 43388 100000`],[`sx1`,`+- hc 0 sdx1`],[`sx2`,`+- hc 0 sdx2`],[`sx3`,`+- hc 0 sdx3`],[`sx4`,`+- hc sdx3 0`],[`sx5`,`+- hc sdx2 0`],[`sx6`,`+- hc sdx1 0`],[`sdy1`,`*/ ihd2 90097 100000`],[`sdy2`,`*/ ihd2 22252 100000`],[`sdy3`,`*/ ihd2 62349 100000`],[`sy1`,`+- svc 0 sdy1`],[`sy2`,`+- svc 0 sdy2`],[`sy3`,`+- svc sdy3 0`],[`sy4`,`+- svc ihd2 0`],[`yAdj`,`+- svc 0 ihd2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x1`,`y2`],[`l`,`sx1`,`sy2`],[`l`,`x2`,`y1`],[`l`,`sx3`,`sy1`],[`l`,`hc`,`t`],[`l`,`sx4`,`sy1`],[`l`,`x5`,`y1`],[`l`,`sx6`,`sy2`],[`l`,`x6`,`y2`],[`l`,`sx5`,`sy3`],[`l`,`x4`,`y3`],[`l`,`hc`,`sy4`],[`l`,`x3`,`y3`],[`l`,`sx2`,`sy3`],[`c`]]}]},star8:{adj:[[`adj`,`val 37500`]],gd:[[`a`,`pin 0 adj 50000`],[`dx1`,`cos wd2 2700000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc dx1 0`],[`dy1`,`sin hd2 2700000`],[`y1`,`+- vc 0 dy1`],[`y2`,`+- vc dy1 0`],[`iwd2`,`*/ wd2 a 50000`],[`ihd2`,`*/ hd2 a 50000`],[`sdx1`,`*/ iwd2 92388 100000`],[`sdx2`,`*/ iwd2 38268 100000`],[`sdy1`,`*/ ihd2 92388 100000`],[`sdy2`,`*/ ihd2 38268 100000`],[`sx1`,`+- hc 0 sdx1`],[`sx2`,`+- hc 0 sdx2`],[`sx3`,`+- hc sdx2 0`],[`sx4`,`+- hc sdx1 0`],[`sy1`,`+- vc 0 sdy1`],[`sy2`,`+- vc 0 sdy2`],[`sy3`,`+- vc sdy2 0`],[`sy4`,`+- vc sdy1 0`],[`yAdj`,`+- vc 0 ihd2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`l`,`sx1`,`sy2`],[`l`,`x1`,`y1`],[`l`,`sx2`,`sy1`],[`l`,`hc`,`t`],[`l`,`sx3`,`sy1`],[`l`,`x2`,`y1`],[`l`,`sx4`,`sy2`],[`l`,`r`,`vc`],[`l`,`sx4`,`sy3`],[`l`,`x2`,`y2`],[`l`,`sx3`,`sy4`],[`l`,`hc`,`b`],[`l`,`sx2`,`sy4`],[`l`,`x1`,`y2`],[`l`,`sx1`,`sy3`],[`c`]]}]},straightconnector1:{adj:[],gd:[],paths:[{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`r`,`b`]]}]},stripedrightarrow:{adj:[[`adj1`,`val 50000`],[`adj2`,`val 50000`]],gd:[[`maxAdj2`,`*/ 84375 w ss`],[`a1`,`pin 0 adj1 100000`],[`a2`,`pin 0 adj2 maxAdj2`],[`x4`,`*/ ss 5 32`],[`dx5`,`*/ ss a2 100000`],[`x5`,`+- r 0 dx5`],[`dy1`,`*/ h a1 200000`],[`y1`,`+- vc 0 dy1`],[`y2`,`+- vc dy1 0`],[`dx6`,`*/ dy1 dx5 hd2`],[`x6`,`+- r 0 dx6`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`y1`],[`l`,`ssd32`,`y1`],[`l`,`ssd32`,`y2`],[`l`,`l`,`y2`],[`c`],[`m`,`ssd16`,`y1`],[`l`,`ssd8`,`y1`],[`l`,`ssd8`,`y2`],[`l`,`ssd16`,`y2`],[`c`],[`m`,`x4`,`y1`],[`l`,`x5`,`y1`],[`l`,`x5`,`t`],[`l`,`r`,`vc`],[`l`,`x5`,`b`],[`l`,`x5`,`y2`],[`l`,`x4`,`y2`],[`c`]]}]},sun:{adj:[[`adj`,`val 25000`]],gd:[[`a`,`pin 12500 adj 46875`],[`g0`,`+- 50000 0 a`],[`g1`,`*/ g0 30274 32768`],[`g2`,`*/ g0 12540 32768`],[`g3`,`+- g1 50000 0`],[`g4`,`+- g2 50000 0`],[`g5`,`+- 50000 0 g1`],[`g6`,`+- 50000 0 g2`],[`g7`,`*/ g0 23170 32768`],[`g8`,`+- 50000 g7 0`],[`g9`,`+- 50000 0 g7`],[`g10`,`*/ g5 3 4`],[`g11`,`*/ g6 3 4`],[`g12`,`+- g10 3662 0`],[`g13`,`+- g11 3662 0`],[`g14`,`+- g11 12500 0`],[`g15`,`+- 100000 0 g10`],[`g16`,`+- 100000 0 g12`],[`g17`,`+- 100000 0 g13`],[`g18`,`+- 100000 0 g14`],[`ox1`,`*/ w 18436 21600`],[`oy1`,`*/ h 3163 21600`],[`ox2`,`*/ w 3163 21600`],[`oy2`,`*/ h 18436 21600`],[`x8`,`*/ w g8 100000`],[`x9`,`*/ w g9 100000`],[`x10`,`*/ w g10 100000`],[`x12`,`*/ w g12 100000`],[`x13`,`*/ w g13 100000`],[`x14`,`*/ w g14 100000`],[`x15`,`*/ w g15 100000`],[`x16`,`*/ w g16 100000`],[`x17`,`*/ w g17 100000`],[`x18`,`*/ w g18 100000`],[`x19`,`*/ w a 100000`],[`wR`,`*/ w g0 100000`],[`hR`,`*/ h g0 100000`],[`y8`,`*/ h g8 100000`],[`y9`,`*/ h g9 100000`],[`y10`,`*/ h g10 100000`],[`y12`,`*/ h g12 100000`],[`y13`,`*/ h g13 100000`],[`y14`,`*/ h g14 100000`],[`y15`,`*/ h g15 100000`],[`y16`,`*/ h g16 100000`],[`y17`,`*/ h g17 100000`],[`y18`,`*/ h g18 100000`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`r`,`vc`],[`l`,`x15`,`y18`],[`l`,`x15`,`y14`],[`c`],[`m`,`ox1`,`oy1`],[`l`,`x16`,`y13`],[`l`,`x17`,`y12`],[`c`],[`m`,`hc`,`t`],[`l`,`x18`,`y10`],[`l`,`x14`,`y10`],[`c`],[`m`,`ox2`,`oy1`],[`l`,`x13`,`y12`],[`l`,`x12`,`y13`],[`c`],[`m`,`l`,`vc`],[`l`,`x10`,`y14`],[`l`,`x10`,`y18`],[`c`],[`m`,`ox2`,`oy2`],[`l`,`x12`,`y17`],[`l`,`x13`,`y16`],[`c`],[`m`,`hc`,`b`],[`l`,`x14`,`y15`],[`l`,`x18`,`y15`],[`c`],[`m`,`ox1`,`oy2`],[`l`,`x17`,`y16`],[`l`,`x16`,`y17`],[`c`],[`m`,`x19`,`vc`],[`a`,`wR`,`hR`,`cd2`,`21600000`],[`c`]]}]},swoosharrow:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 16667`]],gd:[[`a1`,`pin 1 adj1 75000`],[`maxAdj2`,`*/ 70000 w ss`],[`a2`,`pin 0 adj2 maxAdj2`],[`ad1`,`*/ h a1 100000`],[`ad2`,`*/ ss a2 100000`],[`xB`,`+- r 0 ad2`],[`yB`,`+- t ssd8 0`],[`alfa`,`*/ cd4 1 14`],[`dx0`,`tan ssd8 alfa`],[`xC`,`+- xB 0 dx0`],[`dx1`,`tan ad1 alfa`],[`yF`,`+- yB ad1 0`],[`xF`,`+- xB dx1 0`],[`xE`,`+- xF dx0 0`],[`yE`,`+- yF ssd8 0`],[`dy2`,`+- yE 0 t`],[`dy22`,`*/ dy2 1 2`],[`dy3`,`*/ h 1 20`],[`yD`,`+- t dy22 dy3`],[`dy4`,`*/ hd6 1 1`],[`yP1`,`+- hd6 dy4 0`],[`xP1`,`val wd6`],[`dy5`,`*/ hd6 1 2`],[`yP2`,`+- yF dy5 0`],[`xP2`,`val wd4`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`b`],[`Q`,`xP1`,`yP1`,`xB`,`yB`],[`l`,`xC`,`t`],[`l`,`r`,`yD`],[`l`,`xE`,`yE`],[`l`,`xF`,`yF`],[`Q`,`xP2`,`yP2`,`l`,`b`],[`c`]]}]},teardrop:{adj:[[`adj`,`val 100000`]],gd:[[`a`,`pin 0 adj 200000`],[`r2`,`sqrt 2`],[`tw`,`*/ wd2 r2 1`],[`th`,`*/ hd2 r2 1`],[`sw`,`*/ tw a 100000`],[`sh`,`*/ th a 100000`],[`dx1`,`cos sw 2700000`],[`dy1`,`sin sh 2700000`],[`x1`,`+- hc dx1 0`],[`y1`,`+- vc 0 dy1`],[`x2`,`+/ hc x1 2`],[`y2`,`+/ vc y1 2`],[`idx`,`cos wd2 2700000`],[`idy`,`sin hd2 2700000`],[`il`,`+- hc 0 idx`],[`ir`,`+- hc idx 0`],[`it`,`+- vc 0 idy`],[`ib`,`+- vc idy 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`vc`],[`a`,`wd2`,`hd2`,`cd2`,`cd4`],[`Q`,`x2`,`t`,`x1`,`y1`],[`Q`,`r`,`y2`,`r`,`vc`],[`a`,`wd2`,`hd2`,`0`,`cd4`],[`a`,`wd2`,`hd2`,`cd4`,`cd4`],[`c`]]}]},trapezoid:{adj:[[`adj`,`val 25000`]],gd:[[`maxAdj`,`*/ 50000 w ss`],[`a`,`pin 0 adj maxAdj`],[`x1`,`*/ ss a 200000`],[`x2`,`*/ ss a 100000`],[`x3`,`+- r 0 x2`],[`x4`,`+- r 0 x1`],[`il`,`*/ wd3 a maxAdj`],[`it`,`*/ hd3 a maxAdj`],[`ir`,`+- r 0 il`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`b`],[`l`,`x2`,`t`],[`l`,`x3`,`t`],[`l`,`r`,`b`],[`c`]]}]},triangle:{adj:[[`adj`,`val 50000`]],gd:[[`a`,`pin 0 adj 100000`],[`x1`,`*/ w a 200000`],[`x2`,`*/ w a 100000`],[`x3`,`+- x1 wd2 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`b`],[`l`,`x2`,`t`],[`l`,`r`,`b`],[`c`]]}]},uparrowcallout:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 25000`],[`adj3`,`val 25000`],[`adj4`,`val 64977`]],gd:[[`maxAdj2`,`*/ 50000 w ss`],[`a2`,`pin 0 adj2 maxAdj2`],[`maxAdj1`,`*/ a2 2 1`],[`a1`,`pin 0 adj1 maxAdj1`],[`maxAdj3`,`*/ 100000 h ss`],[`a3`,`pin 0 adj3 maxAdj3`],[`q2`,`*/ a3 ss h`],[`maxAdj4`,`+- 100000 0 q2`],[`a4`,`pin 0 adj4 maxAdj4`],[`dx1`,`*/ ss a2 100000`],[`dx2`,`*/ ss a1 200000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- hc dx2 0`],[`x4`,`+- hc dx1 0`],[`y1`,`*/ ss a3 100000`],[`dy2`,`*/ h a4 100000`],[`y2`,`+- b 0 dy2`],[`y3`,`+/ y2 b 2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`y2`],[`l`,`x2`,`y2`],[`l`,`x2`,`y1`],[`l`,`x1`,`y1`],[`l`,`hc`,`t`],[`l`,`x4`,`y1`],[`l`,`x3`,`y1`],[`l`,`x3`,`y2`],[`l`,`r`,`y2`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]},updownarrow:{adj:[[`adj1`,`val 50000`],[`adj2`,`val 50000`]],gd:[[`maxAdj2`,`*/ 50000 h ss`],[`a1`,`pin 0 adj1 100000`],[`a2`,`pin 0 adj2 maxAdj2`],[`y2`,`*/ ss a2 100000`],[`y3`,`+- b 0 y2`],[`dx1`,`*/ w a1 200000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc dx1 0`],[`dy1`,`*/ x1 y2 wd2`],[`y1`,`+- y2 0 dy1`],[`y4`,`+- y3 dy1 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`y2`],[`l`,`hc`,`t`],[`l`,`r`,`y2`],[`l`,`x2`,`y2`],[`l`,`x2`,`y3`],[`l`,`r`,`y3`],[`l`,`hc`,`b`],[`l`,`l`,`y3`],[`l`,`x1`,`y3`],[`l`,`x1`,`y2`],[`c`]]}]},uparrow:{adj:[[`adj1`,`val 50000`],[`adj2`,`val 50000`]],gd:[[`maxAdj2`,`*/ 100000 h ss`],[`a1`,`pin 0 adj1 100000`],[`a2`,`pin 0 adj2 maxAdj2`],[`dy2`,`*/ ss a2 100000`],[`y2`,`+- t dy2 0`],[`dx1`,`*/ w a1 200000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc dx1 0`],[`dy1`,`*/ x1 dy2 wd2`],[`y1`,`+- y2 0 dy1`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`y2`],[`l`,`hc`,`t`],[`l`,`r`,`y2`],[`l`,`x2`,`y2`],[`l`,`x2`,`b`],[`l`,`x1`,`b`],[`l`,`x1`,`y2`],[`c`]]}]},updownarrowcallout:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 25000`],[`adj3`,`val 25000`],[`adj4`,`val 48123`]],gd:[[`maxAdj2`,`*/ 50000 w ss`],[`a2`,`pin 0 adj2 maxAdj2`],[`maxAdj1`,`*/ a2 2 1`],[`a1`,`pin 0 adj1 maxAdj1`],[`maxAdj3`,`*/ 50000 h ss`],[`a3`,`pin 0 adj3 maxAdj3`],[`q2`,`*/ a3 ss hd2`],[`maxAdj4`,`+- 100000 0 q2`],[`a4`,`pin 0 adj4 maxAdj4`],[`dx1`,`*/ ss a2 100000`],[`dx2`,`*/ ss a1 200000`],[`x1`,`+- hc 0 dx1`],[`x2`,`+- hc 0 dx2`],[`x3`,`+- hc dx2 0`],[`x4`,`+- hc dx1 0`],[`y1`,`*/ ss a3 100000`],[`y4`,`+- b 0 y1`],[`dy2`,`*/ h a4 200000`],[`y2`,`+- vc 0 dy2`],[`y3`,`+- vc dy2 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`y2`],[`l`,`x2`,`y2`],[`l`,`x2`,`y1`],[`l`,`x1`,`y1`],[`l`,`hc`,`t`],[`l`,`x4`,`y1`],[`l`,`x3`,`y1`],[`l`,`x3`,`y2`],[`l`,`r`,`y2`],[`l`,`r`,`y3`],[`l`,`x3`,`y3`],[`l`,`x3`,`y4`],[`l`,`x4`,`y4`],[`l`,`hc`,`b`],[`l`,`x1`,`y4`],[`l`,`x2`,`y4`],[`l`,`x2`,`y3`],[`l`,`l`,`y3`],[`c`]]}]},uturnarrow:{adj:[[`adj1`,`val 25000`],[`adj2`,`val 25000`],[`adj3`,`val 25000`],[`adj4`,`val 43750`],[`adj5`,`val 75000`]],gd:[[`a2`,`pin 0 adj2 25000`],[`maxAdj1`,`*/ a2 2 1`],[`a1`,`pin 0 adj1 maxAdj1`],[`q2`,`*/ a1 ss h`],[`q3`,`+- 100000 0 q2`],[`maxAdj3`,`*/ q3 h ss`],[`a3`,`pin 0 adj3 maxAdj3`],[`q1`,`+- a3 a1 0`],[`minAdj5`,`*/ q1 ss h`],[`a5`,`pin minAdj5 adj5 100000`],[`th`,`*/ ss a1 100000`],[`aw2`,`*/ ss a2 100000`],[`th2`,`*/ th 1 2`],[`dh2`,`+- aw2 0 th2`],[`y5`,`*/ h a5 100000`],[`ah`,`*/ ss a3 100000`],[`y4`,`+- y5 0 ah`],[`x9`,`+- r 0 dh2`],[`bw`,`*/ x9 1 2`],[`bs`,`min bw y4`],[`maxAdj4`,`*/ bs 100000 ss`],[`a4`,`pin 0 adj4 maxAdj4`],[`bd`,`*/ ss a4 100000`],[`bd3`,`+- bd 0 th`],[`bd2`,`max bd3 0`],[`x3`,`+- th bd2 0`],[`x8`,`+- r 0 aw2`],[`x6`,`+- x8 0 aw2`],[`x7`,`+- x6 dh2 0`],[`x4`,`+- x9 0 bd`],[`x5`,`+- x7 0 bd2`],[`cx`,`+/ th x7 2`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`b`],[`l`,`l`,`bd`],[`a`,`bd`,`bd`,`cd2`,`cd4`],[`l`,`x4`,`t`],[`a`,`bd`,`bd`,`3cd4`,`cd4`],[`l`,`x9`,`y4`],[`l`,`r`,`y4`],[`l`,`x8`,`y5`],[`l`,`x6`,`y4`],[`l`,`x7`,`y4`],[`l`,`x7`,`x3`],[`a`,`bd2`,`bd2`,`0`,`-5400000`],[`l`,`x3`,`th`],[`a`,`bd2`,`bd2`,`3cd4`,`-5400000`],[`l`,`th`,`b`],[`c`]]}]},verticalscroll:{adj:[[`adj`,`val 12500`]],gd:[[`a`,`pin 0 adj 25000`],[`ch`,`*/ ss a 100000`],[`ch2`,`*/ ch 1 2`],[`ch4`,`*/ ch 1 4`],[`x3`,`+- ch ch2 0`],[`x4`,`+- ch ch 0`],[`x6`,`+- r 0 ch`],[`x7`,`+- r 0 ch2`],[`x5`,`+- x6 0 ch2`],[`y3`,`+- b 0 ch`],[`y4`,`+- b 0 ch2`]],paths:[{w:null,h:null,fill:null,stroke:!1,extrusionOk:!1,cmds:[[`m`,`ch2`,`b`],[`a`,`ch2`,`ch2`,`cd4`,`-5400000`],[`l`,`ch2`,`y4`],[`a`,`ch4`,`ch4`,`cd4`,`-10800000`],[`l`,`ch`,`y3`],[`l`,`ch`,`ch2`],[`a`,`ch2`,`ch2`,`cd2`,`cd4`],[`l`,`x7`,`t`],[`a`,`ch2`,`ch2`,`3cd4`,`cd2`],[`l`,`x6`,`ch`],[`l`,`x6`,`y4`],[`a`,`ch2`,`ch2`,`0`,`cd4`],[`c`],[`m`,`x4`,`ch2`],[`a`,`ch2`,`ch2`,`0`,`cd4`],[`a`,`ch4`,`ch4`,`cd4`,`cd2`],[`c`]]},{w:null,h:null,fill:`darkenLess`,stroke:!1,extrusionOk:!1,cmds:[[`m`,`x4`,`ch2`],[`a`,`ch2`,`ch2`,`0`,`cd4`],[`a`,`ch4`,`ch4`,`cd4`,`cd2`],[`c`],[`m`,`ch`,`y4`],[`a`,`ch2`,`ch2`,`0`,`3cd4`],[`a`,`ch4`,`ch4`,`3cd4`,`cd2`],[`c`]]},{w:null,h:null,fill:`none`,stroke:!0,extrusionOk:!1,cmds:[[`m`,`ch`,`y3`],[`l`,`ch`,`ch2`],[`a`,`ch2`,`ch2`,`cd2`,`cd4`],[`l`,`x7`,`t`],[`a`,`ch2`,`ch2`,`3cd4`,`cd2`],[`l`,`x6`,`ch`],[`l`,`x6`,`y4`],[`a`,`ch2`,`ch2`,`0`,`cd4`],[`l`,`ch2`,`b`],[`a`,`ch2`,`ch2`,`cd4`,`cd2`],[`c`],[`m`,`x3`,`t`],[`a`,`ch2`,`ch2`,`3cd4`,`cd2`],[`a`,`ch4`,`ch4`,`cd4`,`cd2`],[`l`,`x4`,`ch2`],[`m`,`x6`,`ch`],[`l`,`x3`,`ch`],[`m`,`ch2`,`y3`],[`a`,`ch4`,`ch4`,`3cd4`,`cd2`],[`l`,`ch`,`y4`],[`m`,`ch2`,`b`],[`a`,`ch2`,`ch2`,`cd4`,`-5400000`],[`l`,`ch`,`y3`]]}]},wave:{adj:[[`adj1`,`val 12500`],[`adj2`,`val 0`]],gd:[[`a1`,`pin 0 adj1 20000`],[`a2`,`pin -10000 adj2 10000`],[`y1`,`*/ h a1 100000`],[`dy2`,`*/ y1 10 3`],[`y2`,`+- y1 0 dy2`],[`y3`,`+- y1 dy2 0`],[`y4`,`+- b 0 y1`],[`y5`,`+- y4 0 dy2`],[`y6`,`+- y4 dy2 0`],[`dx1`,`*/ w a2 100000`],[`of2`,`*/ w a2 50000`],[`x1`,`abs dx1`],[`dx2`,`?: of2 0 of2`],[`x2`,`+- l 0 dx2`],[`dx5`,`?: of2 of2 0`],[`x5`,`+- r 0 dx5`],[`dx3`,`+/ dx2 x5 3`],[`x3`,`+- x2 dx3 0`],[`x4`,`+/ x3 x5 2`],[`x6`,`+- l dx5 0`],[`x10`,`+- r dx2 0`],[`x7`,`+- x6 dx3 0`],[`x8`,`+/ x7 x10 2`],[`x9`,`+- r 0 x1`],[`xAdj`,`+- hc dx1 0`],[`xAdj2`,`+- hc 0 dx1`],[`il`,`max x2 x6`],[`ir`,`min x5 x10`],[`it`,`*/ h a1 50000`],[`ib`,`+- b 0 it`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`x2`,`y1`],[`C`,`x3`,`y2`,`x4`,`y3`,`x5`,`y1`],[`l`,`x10`,`y4`],[`C`,`x8`,`y6`,`x7`,`y5`,`x6`,`y4`],[`c`]]}]},wedgeellipsecallout:{adj:[[`adj1`,`val -20833`],[`adj2`,`val 62500`]],gd:[[`dxPos`,`*/ w adj1 100000`],[`dyPos`,`*/ h adj2 100000`],[`xPos`,`+- hc dxPos 0`],[`yPos`,`+- vc dyPos 0`],[`sdx`,`*/ dxPos h 1`],[`sdy`,`*/ dyPos w 1`],[`pang`,`at2 sdx sdy`],[`stAng`,`+- pang 660000 0`],[`enAng`,`+- pang 0 660000`],[`dx1`,`cos wd2 stAng`],[`dy1`,`sin hd2 stAng`],[`x1`,`+- hc dx1 0`],[`y1`,`+- vc dy1 0`],[`dx2`,`cos wd2 enAng`],[`dy2`,`sin hd2 enAng`],[`x2`,`+- hc dx2 0`],[`y2`,`+- vc dy2 0`],[`stAng1`,`at2 dx1 dy1`],[`enAng1`,`at2 dx2 dy2`],[`swAng1`,`+- enAng1 0 stAng1`],[`swAng2`,`+- swAng1 21600000 0`],[`swAng`,`?: swAng1 swAng1 swAng2`],[`idx`,`cos wd2 2700000`],[`idy`,`sin hd2 2700000`],[`il`,`+- hc 0 idx`],[`ir`,`+- hc idx 0`],[`it`,`+- vc 0 idy`],[`ib`,`+- vc idy 0`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`xPos`,`yPos`],[`l`,`x1`,`y1`],[`a`,`wd2`,`hd2`,`stAng1`,`swAng`],[`c`]]}]},wedgerectcallout:{adj:[[`adj1`,`val -20833`],[`adj2`,`val 62500`]],gd:[[`dxPos`,`*/ w adj1 100000`],[`dyPos`,`*/ h adj2 100000`],[`xPos`,`+- hc dxPos 0`],[`yPos`,`+- vc dyPos 0`],[`dx`,`+- xPos 0 hc`],[`dy`,`+- yPos 0 vc`],[`dq`,`*/ dxPos h w`],[`ady`,`abs dyPos`],[`adq`,`abs dq`],[`dz`,`+- ady 0 adq`],[`xg1`,`?: dxPos 7 2`],[`xg2`,`?: dxPos 10 5`],[`x1`,`*/ w xg1 12`],[`x2`,`*/ w xg2 12`],[`yg1`,`?: dyPos 7 2`],[`yg2`,`?: dyPos 10 5`],[`y1`,`*/ h yg1 12`],[`y2`,`*/ h yg2 12`],[`t1`,`?: dxPos l xPos`],[`xl`,`?: dz l t1`],[`t2`,`?: dyPos x1 xPos`],[`xt`,`?: dz t2 x1`],[`t3`,`?: dxPos xPos r`],[`xr`,`?: dz r t3`],[`t4`,`?: dyPos xPos x1`],[`xb`,`?: dz t4 x1`],[`t5`,`?: dxPos y1 yPos`],[`yl`,`?: dz y1 t5`],[`t6`,`?: dyPos t yPos`],[`yt`,`?: dz t6 t`],[`t7`,`?: dxPos yPos y1`],[`yr`,`?: dz y1 t7`],[`t8`,`?: dyPos yPos b`],[`yb`,`?: dz t8 b`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`t`],[`l`,`x1`,`t`],[`l`,`xt`,`yt`],[`l`,`x2`,`t`],[`l`,`r`,`t`],[`l`,`r`,`y1`],[`l`,`xr`,`yr`],[`l`,`r`,`y2`],[`l`,`r`,`b`],[`l`,`x2`,`b`],[`l`,`xb`,`yb`],[`l`,`x1`,`b`],[`l`,`l`,`b`],[`l`,`l`,`y2`],[`l`,`xl`,`yl`],[`l`,`l`,`y1`],[`c`]]}]},wedgeroundrectcallout:{adj:[[`adj1`,`val -20833`],[`adj2`,`val 62500`],[`adj3`,`val 16667`]],gd:[[`dxPos`,`*/ w adj1 100000`],[`dyPos`,`*/ h adj2 100000`],[`xPos`,`+- hc dxPos 0`],[`yPos`,`+- vc dyPos 0`],[`dq`,`*/ dxPos h w`],[`ady`,`abs dyPos`],[`adq`,`abs dq`],[`dz`,`+- ady 0 adq`],[`xg1`,`?: dxPos 7 2`],[`xg2`,`?: dxPos 10 5`],[`x1`,`*/ w xg1 12`],[`x2`,`*/ w xg2 12`],[`yg1`,`?: dyPos 7 2`],[`yg2`,`?: dyPos 10 5`],[`y1`,`*/ h yg1 12`],[`y2`,`*/ h yg2 12`],[`t1`,`?: dxPos l xPos`],[`xl`,`?: dz l t1`],[`t2`,`?: dyPos x1 xPos`],[`xt`,`?: dz t2 x1`],[`t3`,`?: dxPos xPos r`],[`xr`,`?: dz r t3`],[`t4`,`?: dyPos xPos x1`],[`xb`,`?: dz t4 x1`],[`t5`,`?: dxPos y1 yPos`],[`yl`,`?: dz y1 t5`],[`t6`,`?: dyPos t yPos`],[`yt`,`?: dz t6 t`],[`t7`,`?: dxPos yPos y1`],[`yr`,`?: dz y1 t7`],[`t8`,`?: dyPos yPos b`],[`yb`,`?: dz t8 b`],[`u1`,`*/ ss adj3 100000`],[`u2`,`+- r 0 u1`],[`v2`,`+- b 0 u1`],[`il`,`*/ u1 29289 100000`],[`ir`,`+- r 0 il`],[`ib`,`+- b 0 il`]],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!0,cmds:[[`m`,`l`,`u1`],[`a`,`u1`,`u1`,`cd2`,`cd4`],[`l`,`x1`,`t`],[`l`,`xt`,`yt`],[`l`,`x2`,`t`],[`l`,`u2`,`t`],[`a`,`u1`,`u1`,`3cd4`,`cd4`],[`l`,`r`,`y1`],[`l`,`xr`,`yr`],[`l`,`r`,`y2`],[`l`,`r`,`v2`],[`a`,`u1`,`u1`,`0`,`cd4`],[`l`,`x2`,`b`],[`l`,`xb`,`yb`],[`l`,`x1`,`b`],[`l`,`u1`,`b`],[`a`,`u1`,`u1`,`cd4`,`cd4`],[`l`,`l`,`y2`],[`l`,`xl`,`yl`],[`l`,`l`,`y1`],[`c`]]}]}};const lo=216e5,uo=Math.PI*2/lo;function fo(e){let t=e.trim().split(/\s+/);return{op:t[0],argTokens:t.slice(1)}}function po(e,t,n){let{w:r,h:i,adj:a}=e,o=Math.min(r,i),s=Math.max(r,i),c=Object.create(null);Object.assign(c,{w:r,h:i,l:0,t:0,r,b:i,hc:r/2,vc:i/2,wd2:r/2,wd3:r/3,wd4:r/4,wd5:r/5,wd6:r/6,wd8:r/8,wd10:r/10,wd12:r/12,wd16:r/16,wd32:r/32,hd2:i/2,hd3:i/3,hd4:i/4,hd5:i/5,hd6:i/6,hd8:i/8,hd10:i/10,hd12:i/12,hd16:i/16,hd32:i/32,ss:o,ssd2:o/2,ssd4:o/4,ssd6:o/6,ssd8:o/8,ssd16:o/16,ssd32:o/32,ls:s,lsd2:s/2,lsd4:s/4,lsd6:s/6,lsd8:s/8,lsd16:s/16,lsd32:s/32,cd:lo,cd2:lo/2,cd4:lo/4,cd8:lo/8,"3cd4":3*lo/4,"3cd8":3*lo/8,"5cd8":5*lo/8,"7cd8":7*lo/8}),t.forEach(([e,t],n)=>{let r=a[n];c[e]=typeof r==`number`?r:u(t),e===`adj`&&(c.adj1=c.adj),e===`adj1`&&(c.adj=c.adj1)});for(let[e,t]of n)c[e]=u(t);return{v:e=>{if(e in c)return c[e];throw Error(`preset-shape: unknown name "${e}"`)},fmla:u,resolve:l};function l(e){if(e in c)return c[e];let t=Number(e);if(Number.isFinite(t))return t;throw Error(`preset-shape: cannot resolve "${e}"`)}function u(e){let t=e.argTokens.map(l);return d(e.op,t,e)}function d(e,t,n){switch(e){case`val`:return t[0];case`*/`:return t[0]*t[1]/t[2];case`+-`:return t[0]+t[1]-t[2];case`+/`:return(t[0]+t[1])/t[2];case`?:`:return t[0]>0?t[1]:t[2];case`abs`:return Math.abs(t[0]);case`min`:return Math.min(t[0],t[1]);case`max`:return Math.max(t[0],t[1]);case`pin`:return t[1]<t[0]?t[0]:t[1]>t[2]?t[2]:t[1];case`sqrt`:return Math.sqrt(Math.max(0,t[0]));case`mod`:return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);case`sin`:return t[0]*Math.sin(t[1]*uo);case`cos`:return t[0]*Math.cos(t[1]*uo);case`tan`:return t[0]*Math.tan(t[1]*uo);case`at2`:return Math.atan2(t[1],t[0])/uo;case`cat2`:return t[0]*Math.cos(Math.atan2(t[2],t[1]));case`sat2`:return t[0]*Math.sin(Math.atan2(t[2],t[1]));default:throw Error(`preset-shape: unknown operator "${e}" in "${[n.op,...n.argTokens].join(` `)}"`)}}}const mo=Math.PI*2/216e5;function ho(e,t,n,r,i,a,o){let s=t.w==null?1:a/t.w,c=t.h==null?1:o/t.h,l=e=>r+e*s,u=e=>i+e*c,d=0,f=0;for(let r of t.cmds)switch(r[0]){case`m`:{let t=l(n.resolve(r[1])),i=u(n.resolve(r[2]));e.moveTo(t,i),d=t,f=i;break}case`l`:{let t=l(n.resolve(r[1])),i=u(n.resolve(r[2]));e.lineTo(t,i),d=t,f=i;break}case`C`:{let t=l(n.resolve(r[1])),i=u(n.resolve(r[2])),a=l(n.resolve(r[3])),o=u(n.resolve(r[4])),s=l(n.resolve(r[5])),c=u(n.resolve(r[6]));e.bezierCurveTo(t,i,a,o,s,c),d=s,f=c;break}case`Q`:{let t=l(n.resolve(r[1])),i=u(n.resolve(r[2])),a=l(n.resolve(r[3])),o=u(n.resolve(r[4]));e.quadraticCurveTo(t,i,a,o),d=a,f=o;break}case`a`:{let t=n.resolve(r[1]),i=n.resolve(r[2]),a=t*s,o=i*c,l=n.resolve(r[3])*mo,u=n.resolve(r[4])*mo,p=Math.PI*2,m=e=>Math.atan2(t*Math.sin(e),i*Math.cos(e)),h=m(l),g=Math.trunc(u/p),_=u-g*p,v=m(l+_)-h;_>0&&v<0?v+=p:_<0&&v>0&&(v-=p);let y=h+v+g*p,b=d-a*Math.cos(h),x=f-o*Math.sin(h);Math.abs(a)>1e-6&&Math.abs(o)>1e-6&&(e.ellipse(b,x,Math.abs(a),Math.abs(o),0,h,y,u<0),d=b+a*Math.cos(y),f=x+o*Math.sin(y));break}case`c`:e.closePath();break}}const go=co,_o=new WeakMap;function vo(e){let t=_o.get(e);return t||(t={adj:e.adj.map(([e,t])=>[e,fo(t)]),gd:e.gd.map(([e,t])=>[e,fo(t)])},_o.set(e,t)),t}function yo(e,t,n,r){let i=vo(e);return po({w:t,h:n,adj:r},i.adj,i.gd)}function bo(e){return e.toLowerCase()in go}function xo(e,t,n,r,i,a,o=[]){let s=go[t.toLowerCase()];if(!s)return!1;let c=yo(s,i,a,o);for(let t of s.paths)ho(e,t,c,n,r,i,a);return!0}function So(e,t,n,r,i,a,o=[]){let s=go[t.toLowerCase()];if(!s)return!1;let c=yo(s,i,a,o);for(let t of s.paths)t.fill!==`none`&&ho(e,t,c,n,r,i,a);return!0}const Co={wedgeroundrectcallout:`roundrect`,wedgeellipsecallout:`ellipse`,wedgerectcallout:null},wo={adj:[],gd:[],paths:[{w:null,h:null,fill:null,stroke:!0,extrusionOk:!1,cmds:[[`m`,`l`,`t`],[`l`,`r`,`t`],[`l`,`r`,`b`],[`l`,`l`,`b`],[`c`]]}]};function To(e,t,n){let r=e[n];if(typeof r==`number`)return r;let i=t.adj[n];return i&&Number(i[1].replace(/^val\s+/,``))||0}function Eo(e,t,n,r){let i=go[e];if(!i)return null;if(e in Co){let a=To(r,i,0),o=To(r,i,1),s=t/2+t*a/1e5,c=n/2+n*o/1e5;if(s>=0&&s<=t&&c>=0&&c<=n){let t=Co[e];t===`roundrect`?(i=go.roundrect,r=[To(r,go[e],2)]):t&&go[t]?(i=go[t],r=[]):(i=wo,r=[])}}return{def:i,adj:r}}function Do(e,t,n,r,i,a,o,s,c,l,u){let d=Eo(t.toLowerCase(),i,a,o);if(!d)return!1;let{def:f}=d;o=d.adj;let p=yo(f,i,a,o),m=!1,h=f.paths.length-1;for(let t=0;t<f.paths.length;t++){let o=f.paths[t];e.beginPath(),ho(e,o,p,n,r,i,a);let d=o.fill;if(d!==`none`&&s!=null){e.save(),e.fillStyle=s,e.fill();let t=ko(d);t&&(e.fillStyle=t,e.fill()),e.restore(),m||=(l(),!0)}if(o.stroke&&c){let e=t===h&&(o.fill===`none`||o.fill==null);u?.skipTrailingStroke&&e||c()}}return!0}function Oo(e,t,n,r,i,a){let o=go[e.toLowerCase()];if(!o||o.paths.length===0)return null;let s=o.paths[o.paths.length-1],c=yo(o,r,i,a),l=s.w==null?1:r/s.w,u=s.h==null?1:i/s.h,d=e=>t+e*l,f=e=>n+e*u,p=0,m=0,h=0,g=0,_=0,v=0,y=!1,b=0,x=0,S=[];for(let e of s.cmds)switch(e[0]){case`m`:h=d(c.resolve(e[1])),g=f(c.resolve(e[2])),p=h,m=g,S.push({x:h,y:g});break;case`l`:{let t=d(c.resolve(e[1])),n=f(c.resolve(e[2]));y||=(_=t-h,v=n-g,!0),b=t-h,x=n-g,h=t,g=n,S.push({x:h,y:g});break}case`C`:{let t=d(c.resolve(e[1])),n=f(c.resolve(e[2])),r=d(c.resolve(e[3])),i=f(c.resolve(e[4])),a=d(c.resolve(e[5])),o=f(c.resolve(e[6]));y||=(_=t-h,v=n-g,!0),b=a-r,x=o-i,h=a,g=o,S.push({x:h,y:g});break}}let C=Math.atan2(v,_)+Math.PI;return{start:{x:p,y:m,angle:C},end:{x:h,y:g,angle:Math.atan2(x,b)},vertices:S}}function ko(e){switch(e){case`lighten`:return`rgba(255,255,255,0.30)`;case`lightenLess`:return`rgba(255,255,255,0.15)`;case`darken`:return`rgba(0,0,0,0.30)`;case`darkenLess`:return`rgba(0,0,0,0.15)`;default:return null}}function Ao(e,t,n,r,i,a,o,s=-Math.PI/2){let c=a*2;for(let l=0;l<c;l++){let c=s+l*Math.PI/a,u=l%2==0?1:o,d=t+r*u*Math.cos(c),f=n+i*u*Math.sin(c);l===0?e.moveTo(d,f):e.lineTo(d,f)}e.closePath()}function jo(e,t,n,r,i,a,o=-Math.PI/2){for(let s=0;s<a;s++){let c=o+s*2*Math.PI/a,l=t+r*Math.cos(c),u=n+i*Math.sin(c);s===0?e.moveTo(l,u):e.lineTo(l,u)}e.closePath()}function Mo(e,t,n,r,i,a,o){let s=e=>Math.atan2(r*Math.sin(e),i*Math.cos(e)),c=s(a),l=s(a+o),u=t-r*Math.cos(c),d=n-i*Math.sin(c);return e.ellipse(u,d,Math.abs(r),Math.abs(i),0,c,l,o<0),{x:u+r*Math.cos(l),y:d+i*Math.sin(l)}}const No={oval:`ellipse`,rtriangle:`rttriangle`,roundrectangle:`roundrect`,flowchartsumingjunction:`flowchartsummingjunction`},Po=new Set(`ellipse.rttriangle.triangle.diamond.trapezoid.roundrect.snip1rect.frame.irregularseal1.irregularseal2.star4.star8.star12.star16.star24.star32.line.straightconnector1.callout1.bordercallout1.leftuparrow.quadarrowcallout.mathequal.mathplus.mathminus.flowchartdecision.flowchartmanualinput.flowchartconnector.flowchartinputoutput.flowchartmerge.flowchartextract.flowchartpreparation.flowchartcollate`.split(`.`)),Fo=new Set([`accentcallout1`,`accentbordercallout1`,`flowchartpredefinedprocess`,`flowchartsort`,`flowchartinternalstorage`,`flowchartsummingjunction`]),Io=new Set([`round2samerect`,`round2diagrect`,`dodecagon`,`star10`]);function Lo(e,t,n,r,i,a,o=null,s=null,c=null,l=null){let u=n+i/2,d=r+a/2;{let u=t.toLowerCase(),d=No[u]??u;if((Po.has(d)||Fo.has(d)||Io.has(d))&&xo(e,d,n,r,i,a,[o,s,c,l]))return}switch(t.toLowerCase()){case`parallelogram`:{let t=i*Math.min(.5,(o??25e3)/1e5);e.moveTo(n+t,r),e.lineTo(n+i,r),e.lineTo(n+i-t,r+a),e.lineTo(n,r+a),e.closePath();break}case`pentagon`:jo(e,u,d,i/2,a/2,5);break;case`hexagon`:jo(e,u,d,i/2,a/2,6,0);break;case`heptagon`:jo(e,u,d,i/2,a/2,7);break;case`octagon`:jo(e,u,d,i/2,a/2,8,-Math.PI/8);break;case`decagon`:jo(e,u,d,i/2,a/2,10);break;case`star5`:case`star`:Ao(e,u,d,i/2,a/2,5,(o??19098)/5e4);break;case`star6`:Ao(e,u,d,i/2,a/2,6,(o??28868)/5e4,0);break;case`star7`:Ao(e,u,d,i/2,a/2,7,(o??34142)/5e4);break;case`rightarrow`:{let t=a*Math.min(1,(o??5e4)/1e5),c=i*Math.min(1,(s??5e4)/1e5),l=r+(a-t)/2;e.moveTo(n,l),e.lineTo(n+i-c,l),e.lineTo(n+i-c,r),e.lineTo(n+i,d),e.lineTo(n+i-c,r+a),e.lineTo(n+i-c,l+t),e.lineTo(n,l+t),e.closePath();break}case`leftarrow`:{let t=a*Math.min(1,(o??5e4)/1e5),c=i*Math.min(1,(s??5e4)/1e5),l=r+(a-t)/2;e.moveTo(n+i,l),e.lineTo(n+c,l),e.lineTo(n+c,r),e.lineTo(n,d),e.lineTo(n+c,r+a),e.lineTo(n+c,l+t),e.lineTo(n+i,l+t),e.closePath();break}case`uparrow`:{let t=i*Math.min(1,(o??5e4)/1e5),c=a*Math.min(1,(s??5e4)/1e5),l=n+(i-t)/2;e.moveTo(u,r),e.lineTo(n+i,r+c),e.lineTo(l+t,r+c),e.lineTo(l+t,r+a),e.lineTo(l,r+a),e.lineTo(l,r+c),e.lineTo(n,r+c),e.closePath();break}case`downarrow`:{let t=i*Math.min(1,(o??5e4)/1e5),c=a*Math.min(1,(s??5e4)/1e5),l=n+(i-t)/2;e.moveTo(u,r+a),e.lineTo(n+i,r+a-c),e.lineTo(l+t,r+a-c),e.lineTo(l+t,r),e.lineTo(l,r),e.lineTo(l,r+a-c),e.lineTo(n,r+a-c),e.closePath();break}case`leftrightarrow`:{let t=a*Math.min(1,(o??5e4)/1e5),c=i*Math.min(.5,(s??25e3)/1e5),l=r+(a-t)/2;e.moveTo(n,d),e.lineTo(n+c,r),e.lineTo(n+c,l),e.lineTo(n+i-c,l),e.lineTo(n+i-c,r),e.lineTo(n+i,d),e.lineTo(n+i-c,r+a),e.lineTo(n+i-c,l+t),e.lineTo(n+c,l+t),e.lineTo(n+c,r+a),e.closePath();break}case`updownarrow`:{let t=i*Math.min(1,(o??5e4)/1e5),c=a*Math.min(.5,(s??25e3)/1e5),l=n+(i-t)/2;e.moveTo(u,r),e.lineTo(n+i,r+c),e.lineTo(l+t,r+c),e.lineTo(l+t,r+a-c),e.lineTo(n+i,r+a-c),e.lineTo(u,r+a),e.lineTo(n,r+a-c),e.lineTo(l,r+a-c),e.lineTo(l,r+c),e.lineTo(n,r+c),e.closePath();break}case`notchedrightarrow`:{let t=a*Math.min(1,(o??5e4)/1e5),c=i*Math.min(1,(s??35e3)/1e5),l=r+(a-t)/2,u=c*.43;e.moveTo(n,l),e.lineTo(n+i-c,l),e.lineTo(n+i-c,r),e.lineTo(n+i,d),e.lineTo(n+i-c,r+a),e.lineTo(n+i-c,l+t),e.lineTo(n,l+t),e.lineTo(n+u,d),e.closePath();break}case`chevron`:{let t=i*Math.min(1,Math.max(0,(o??5e4)/1e5));e.moveTo(n,r),e.lineTo(n+t,r),e.lineTo(n+i,d),e.lineTo(n+t,r+a),e.lineTo(n,r+a),t>0&&e.lineTo(n+t,d),e.closePath();break}case`homeplate`:{let t=a*.4;e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a-t),e.lineTo(u,r+a),e.lineTo(n,r+a-t),e.closePath();break}case`leftbracket`:{let t=Math.min(a*Math.min(5e4,Math.max(0,o??8333))/1e5,a/2);e.moveTo(n+i,r),e.quadraticCurveTo(n,r,n,r+t),a-2*t>.5&&e.lineTo(n,r+a-t),e.quadraticCurveTo(n,r+a,n+i,r+a);break}case`rightbracket`:{let t=Math.min(a*Math.min(5e4,Math.max(0,o??8333))/1e5,a/2);e.moveTo(n,r),e.quadraticCurveTo(n+i,r,n+i,r+t),a-2*t>.5&&e.lineTo(n+i,r+a-t),e.quadraticCurveTo(n+i,r+a,n,r+a);break}case`leftbrace`:{let t=d,o=i*.45;e.moveTo(n+i,r),e.bezierCurveTo(n+i-o,r,n+i-o,t-a*.08,n,t),e.bezierCurveTo(n+i-o,t+a*.08,n+i-o,r+a,n+i,r+a);break}case`rightbrace`:{let t=d,o=i*.45;e.moveTo(n,r),e.bezierCurveTo(n+o,r,n+o,t-a*.08,n+i,t),e.bezierCurveTo(n+o,t+a*.08,n+o,r+a,n,r+a);break}case`wedgerectcallout`:{e.rect(n,r,i,a*.8);let t=n+i*.2,o=r+a;e.moveTo(n+i*.1,r+a*.8),e.lineTo(t,o),e.lineTo(n+i*.3,r+a*.8),e.closePath();break}case`wedgeellipsecallout`:{let t=(o??-2e4)/1e5*i,n=(s??12e4)/1e5*a,r=u+t,c=d+n;e.ellipse(u,d,i/2,a/2,0,0,Math.PI*2);let l=Math.atan2(n,t),f=Math.PI/10,p=i/2,m=a/2,h=u+p*Math.cos(l-f),g=d+m*Math.sin(l-f),_=u+p*Math.cos(l+f),v=d+m*Math.sin(l+f);e.moveTo(h,g),e.lineTo(r,c),e.lineTo(_,v),e.closePath();break}case`cloudcallout`:{let t=Math.min(i,a)*.22,n=[[u-i*.25,r+a*.35],[u-i*.1,r+a*.15],[u+i*.1,r+a*.1],[u+i*.28,r+a*.2],[u+i*.35,r+a*.4]];e.moveTo(n[0][0]-t,n[0][1]);for(let[r,i]of n)e.arc(r,i,t,Math.PI,0);e.arc(u,r+a*.65,i*.45,0,Math.PI),e.closePath();let c=u+(o??-2e4)/1e5*i,l=d+(s??12e4)/1e5*a;e.moveTo(u+i*.05,r+a*.8),e.arc(c,l,Math.min(i,a)*.07,0,Math.PI*2);break}case`bentconnector2`:case`bentconnector3`:case`bentconnector4`:case`bentconnector5`:case`curvedconnector2`:case`curvedconnector3`:case`curvedconnector4`:case`curvedconnector5`:e.moveTo(n,r),e.lineTo(n+i,r+a);break;case`heart`:e.moveTo(u,r+a*.32),e.bezierCurveTo(u,r,n+i*.05,r,n,r+a*.3),e.bezierCurveTo(n,r+a*.68,u-i*.05,r+a*.78,u,r+a),e.bezierCurveTo(u+i*.05,r+a*.78,n+i,r+a*.68,n+i,r+a*.3),e.bezierCurveTo(n+i-i*.05,r,u,r,u,r+a*.32);break;case`donut`:{let t=i/2,n=a/2,r=Math.min(t,n)*(o??25e3)/1e5,s=t-r,c=n-r;e.ellipse(u,d,t,n,0,0,Math.PI*2,!1),e.moveTo(u+s,d),e.ellipse(u,d,s,c,0,0,Math.PI*2,!0);break}case`nosmoking`:case`nosmokingsign`:{let t=(o??18750)/1e5,n=i/2,r=a/2,s=n*(1-2*t),c=r*(1-2*t);e.ellipse(u,d,n,r,0,0,Math.PI*2,!1),e.moveTo(u+s,d),e.ellipse(u,d,s,c,0,0,Math.PI*2,!0),e.moveTo(u+s,d),e.ellipse(u,d,s,c,0,0,Math.PI/2,!1),e.lineTo(u-s,d),e.ellipse(u,d,s,c,0,Math.PI,3*Math.PI/2,!1),e.closePath();break}case`pie`:{let t=(o??0)/216e5*Math.PI*2,n=(s??162e5)/216e5*Math.PI*2;e.moveTo(u,d),e.arc(u,d,Math.min(i,a)/2,t,n),e.closePath();break}case`cloud`:{let t=a*.28;e.arc(n+i*.25,r+a*.55,t,Math.PI,Math.PI*1.8),e.arc(n+i*.45,r+a*.35,t*1.1,Math.PI*1.3,Math.PI*1.9),e.arc(n+i*.65,r+a*.4,t,Math.PI*1.5,Math.PI*2),e.arc(n+i*.8,r+a*.6,t*.9,Math.PI*1.6,Math.PI*.1),e.arc(n+i*.55,r+a*.75,t,0,Math.PI*.7),e.arc(n+i*.25,r+a*.7,t*.9,0,Math.PI),e.closePath();break}case`funnel`:e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(u+i*.15,r+a),e.lineTo(u-i*.15,r+a),e.closePath();break;case`smileyface`:{e.ellipse(u,d,i/2,a/2,0,0,Math.PI*2),e.closePath();let t=i*.05,n=a*.05,r=d-a*.12;e.moveTo(u-i*.2+t,r),e.ellipse(u-i*.2,r,t,n,0,0,Math.PI*2),e.moveTo(u+i*.2+t,r),e.ellipse(u+i*.2,r,t,n,0,0,Math.PI*2),e.moveTo(u-i*.25,d+a*.05),e.quadraticCurveTo(u,d+a*.3,u+i*.25,d+a*.05);break}case`document`:case`foldedcorner`:{let t=Math.min(i,a)*.15;e.moveTo(n,r),e.lineTo(n+i-t,r),e.lineTo(n+i,r+t),e.lineTo(n+i,r+a),e.lineTo(n,r+a),e.closePath(),e.moveTo(n+i-t,r),e.lineTo(n+i-t,r+t),e.lineTo(n+i,r+t);break}case`snip2samerect`:{let t=Math.min(i,a)*Math.min(5e4,Math.max(0,o??16667))/1e5;e.moveTo(n,r),e.lineTo(n+i-t,r),e.lineTo(n+i,r+t),e.lineTo(n+i,r+a),e.lineTo(n+t,r+a),e.lineTo(n,r+a-t),e.closePath();break}case`snip2diagrect`:{let t=Math.min(i,a)*Math.min(5e4,Math.max(0,o??16667))/1e5;e.moveTo(n+t,r),e.lineTo(n+i-t,r),e.lineTo(n+i,r+t),e.lineTo(n+i,r+a-t),e.lineTo(n+i-t,r+a),e.lineTo(n+t,r+a),e.lineTo(n,r+a-t),e.lineTo(n,r+t),e.closePath();break}case`sniproundrect`:{let t=Math.min(i,a)*Math.min(5e4,Math.max(0,o??16667))/1e5;e.moveTo(n+t,r),e.lineTo(n+i-t,r),e.lineTo(n+i,r+t),e.lineTo(n+i,r+a),e.lineTo(n,r+a),e.quadraticCurveTo(n,r,n+t,r),e.closePath();break}case`round1rect`:{let t=Math.min(i,a)*Math.min(5e4,Math.max(0,o??16667))/1e5;e.moveTo(n+t,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a),e.lineTo(n,r+a),e.lineTo(n,r+t),e.quadraticCurveTo(n,r,n+t,r),e.closePath();break}case`plaque`:{let t=Math.min(i,a)*.25;e.moveTo(n+t,r),e.lineTo(n+i-t,r),e.quadraticCurveTo(n+i,r,n+i,r+t),e.lineTo(n+i,r+a-t),e.quadraticCurveTo(n+i,r+a,n+i-t,r+a),e.lineTo(n+t,r+a),e.quadraticCurveTo(n,r+a,n,r+a-t),e.lineTo(n,r+t),e.quadraticCurveTo(n,r,n+t,r),e.closePath();break}case`can`:{let t=a*.1;e.ellipse(u,r+t,i/2,t,0,0,Math.PI*2),e.moveTo(n,r+t),e.lineTo(n,r+a-t),e.ellipse(u,r+a-t,i/2,t,0,Math.PI,2*Math.PI),e.lineTo(n+i,r+t);break}case`cube`:{let t=Math.min(i,a)*.2;e.moveTo(n+t,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a-t),e.lineTo(n+i-t,r+a),e.lineTo(n,r+a),e.lineTo(n,r+t),e.closePath(),e.moveTo(n+t,r),e.lineTo(n+t,r+t),e.lineTo(n+i-t,r+t),e.moveTo(n+t,r+t),e.lineTo(n,r+t);break}case`bevel`:{let t=Math.min(i,a)*.1;e.rect(n,r,i,a),e.moveTo(n,r),e.lineTo(n+t,r+t),e.lineTo(n+i-t,r+t),e.lineTo(n+i,r),e.moveTo(n+i-t,r+t),e.lineTo(n+i-t,r+a-t),e.lineTo(n+i,r+a),e.moveTo(n+i-t,r+a-t),e.lineTo(n+t,r+a-t),e.lineTo(n,r+a),e.moveTo(n+t,r+a-t),e.lineTo(n+t,r+t);break}case`halfframe`:{let t=Math.min(i,a)*.25;e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(n+i,r+t),e.lineTo(n+t,r+t),e.lineTo(n+t,r+a),e.lineTo(n,r+a),e.closePath();break}case`corner`:{let t=Math.min(i,a)*.25;e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(n+i,r+t),e.lineTo(n+t,r+t),e.lineTo(n+t,r+a),e.lineTo(n,r+a),e.closePath();break}case`flowchartalternateprocess`:case`flowchartprocess`:{let t=Math.min(i,a)*Math.min(5e4,Math.max(0,o??16667))/1e5;e.roundRect(n,r,i,a,[{x:t,y:t}]);break}case`flowchartterminator`:{let t=Math.min(i,a)/2;e.roundRect(n,r,i,a,[{x:t,y:t}]);break}case`flowchartdocument`:{let t=a*.1;e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a-t),e.bezierCurveTo(n+i*.75,r+a,n+i*.25,r+a-t*2,n,r+a-t),e.closePath();break}case`moon`:e.arc(u,d,Math.min(i,a)/2,-Math.PI/2,Math.PI/2),e.arc(u-i*.2,d,Math.min(i,a)/2,Math.PI/2,-Math.PI/2,!0),e.closePath();break;case`arc`:{let t=216e5,n=(o??162e5)/t*Math.PI*2,r=(s??54e5)/t*Math.PI*2;e.ellipse(u,d,i/2,a/2,0,n,n+r,r<0);break}case`mathmultiply`:{let t=Math.min(i,a)*Math.min(51965,Math.max(0,o??23520))/1e5,s=Math.atan2(a,i),c=Math.sin(s),l=Math.cos(s),u=t/2*c,d=t/2*l;e.moveTo(n+u,r-d),e.lineTo(n-u,r+d),e.lineTo(n+i-u,r+a+d),e.lineTo(n+i+u,r+a-d),e.closePath(),e.moveTo(n+i-u,r-d),e.lineTo(n+i+u,r+d),e.lineTo(n+u,r+a+d),e.lineTo(n-u,r+a-d),e.closePath();break}case`mathdivide`:{let t=Math.min(36745,Math.max(1e3,o??23520)),n=(73490+-t)/4,l=36745*i/a,f=Math.min(Math.min(n,l),Math.max(1e3,c??11760)),p=73490+4*f-t,m=Math.min(p,Math.max(0,s??5880)),h=a*t/2e5,g=a*m/1e5,_=a*f/1e5,v=i*73490/2e5,y=d-h,b=d+h,x=y-(g+_)-_,S=r+a-x,C=u-v,w=u+v;e.rect(C,y,w-C,b-y),e.moveTo(u+_,x+_),e.arc(u,x+_,_,0,Math.PI*2),e.moveTo(u+_,S-_),e.arc(u,S-_,_,0,Math.PI*2);break}case`quadarrow`:{let t=i*(o??23e3)/1e5,c=i*(s??3e4)/1e5,l=n+(i-t)/2,f=r+(a-t)/2;e.moveTo(u,r),e.lineTo(n+i-c,r+c),e.lineTo(n+i-c,f),e.lineTo(l+t,f),e.lineTo(l+t,r+c),e.lineTo(n+c,r+c),e.lineTo(n+i,d),e.lineTo(n+i-c,r+a-c),e.lineTo(l+t,r+a-c),e.lineTo(l+t,f+t),e.lineTo(n+i-c,f+t),e.lineTo(n+i-c,r+a-c),e.lineTo(u,r+a),e.lineTo(n+c,r+a-c),e.lineTo(n+c,f+t),e.lineTo(l,f+t),e.lineTo(l,r+a-c),e.lineTo(n,d),e.lineTo(n+c,r+c),e.lineTo(l,r+c),e.lineTo(l,f),e.lineTo(n+c,f),e.closePath();break}case`wave`:{let t=a*(o??12500)/1e5,s=r+t,c=r+a-t;e.moveTo(n,s),e.bezierCurveTo(n+i*.25,r,n+i*.25,r+t*2,n+i*.5,s),e.bezierCurveTo(n+i*.75,r+t*2,n+i*.75,r,n+i,s),e.lineTo(n+i,c),e.bezierCurveTo(n+i*.75,r+a,n+i*.75,r+a-t*2,n+i*.5,c),e.bezierCurveTo(n+i*.25,r+a-t*2,n+i*.25,r+a,n,c),e.closePath();break}case`doublewave`:{let t=a*(o??6250)/1e5,s=r+t,c=r+a-t;e.moveTo(n,s),e.bezierCurveTo(n+i*.25,r,n+i*.25,r+t*2,n+i*.5,s),e.bezierCurveTo(n+i*.75,r+t*2,n+i*.75,r,n+i,s),e.lineTo(n+i,c),e.bezierCurveTo(n+i*.75,r+a,n+i*.75,r+a-t*2,n+i*.5,c),e.bezierCurveTo(n+i*.25,r+a-t*2,n+i*.25,r+a,n,c),e.closePath();break}case`sun`:{let t=Math.min(i,a)/2,n=t*((o??25e3)/1e5+.5),r=Math.min(n,t*.9),s=Math.PI/16;for(let n=0;n<8;n++){let i=n/8*Math.PI*2;e.moveTo(u+r*Math.cos(i-s),d+r*Math.sin(i-s)),e.lineTo(u+t*Math.cos(i),d+t*Math.sin(i)),e.lineTo(u+r*Math.cos(i+s),d+r*Math.sin(i+s)),e.closePath()}e.moveTo(u+r,d),e.arc(u,d,r,0,Math.PI*2);break}case`lightningbolt`:e.moveTo(u+i*.1,r),e.lineTo(n,d-a*.05),e.lineTo(u+i*.05,d-a*.05),e.lineTo(u-i*.1,r+a),e.lineTo(n+i,d+a*.05),e.lineTo(u-i*.05,d+a*.05),e.closePath();break;case`bracketpair`:{let t=a*Math.min(5e4,Math.max(0,o??8333))/1e5;e.moveTo(n+i*.4,r),e.quadraticCurveTo(n,r,n,r+t),a-2*t>0&&e.lineTo(n,r+a-t),e.quadraticCurveTo(n,r+a,n+i*.4,r+a),e.moveTo(n+i*.6,r),e.quadraticCurveTo(n+i,r,n+i,r+t),a-2*t>0&&e.lineTo(n+i,r+a-t),e.quadraticCurveTo(n+i,r+a,n+i*.6,r+a);break}case`bracepair`:{let t=i*.2;e.moveTo(n+i*.4,r),e.bezierCurveTo(n+i*.4-t,r,n+i*.4-t,d-a*.08,n,d),e.bezierCurveTo(n+i*.4-t,d+a*.08,n+i*.4-t,r+a,n+i*.4,r+a),e.moveTo(n+i*.6,r),e.bezierCurveTo(n+i*.6+t,r,n+i*.6+t,d-a*.08,n+i,d),e.bezierCurveTo(n+i*.6+t,d+a*.08,n+i*.6+t,r+a,n+i*.6,r+a);break}case`chord`:{let t=(o??27e5)/216e5*Math.PI*2,n=(s??162e5)/216e5*Math.PI*2;e.ellipse(u,d,i/2,a/2,0,t,n),e.closePath();break}case`blockarc`:{let t=Math.min(i,a)/2,n=o??108e5,r=s??0,l=t*(1-(c??25e3)/1e5),f=n/216e5*Math.PI*2,p=r/216e5*Math.PI*2;e.arc(u,d,t,f,p,!1),e.arc(u,d,l,p,f,!0),e.closePath();break}case`teardrop`:{let t=Math.min(i,a)*.4,o=n+t,s=r+a-t;e.arc(o,s,t,0,Math.PI*2*.75),e.bezierCurveTo(o-t*.1,s-t,n+i-t,r+t,n+i,r),e.bezierCurveTo(n+i-t*.2,r+t*.5,o+t,s-t*1.1,o+t,s),e.closePath();break}case`diagstripe`:{let t=a*(o??5e4)/1e5*i/a;e.moveTo(n+t,r),e.lineTo(n+i,r),e.lineTo(n+i-t,r+a),e.lineTo(n,r+a),e.closePath();break}case`wedgeroundrectcallout`:{let t=Math.min(i,a)*.1;e.roundRect(n,r,i,a*.85,t),e.moveTo(n+i*.1,r+a*.85),e.lineTo(n+i*.2,r+a),e.lineTo(n+i*.3,r+a*.85),e.closePath();break}case`rightarrowcallout`:{let t=a*(o??5e4)/1e5,c=i*(s??5e4)/1e5,l=r+(a-t)/2;e.rect(n,l,c,t),e.moveTo(n+c,r),e.lineTo(n+i,d),e.lineTo(n+c,r+a),e.closePath();break}case`leftarrowcallout`:{let t=a*(o??5e4)/1e5,c=i*(s??5e4)/1e5,l=r+(a-t)/2;e.rect(n+i-c,l,c,t),e.moveTo(n+i-c,r),e.lineTo(n,d),e.lineTo(n+i-c,r+a),e.closePath();break}case`uparrowcallout`:{let t=i*(o??5e4)/1e5,c=a*(s??5e4)/1e5,l=n+(i-t)/2;e.rect(l,r+c,t,a-c),e.moveTo(n,r+c),e.lineTo(u,r),e.lineTo(n+i,r+c),e.closePath();break}case`downarrowcallout`:{let t=i*(o??5e4)/1e5,c=a*(s??5e4)/1e5,l=n+(i-t)/2;e.rect(l,r,t,a-c),e.moveTo(n,r+a-c),e.lineTo(u,r+a),e.lineTo(n+i,r+a-c),e.closePath();break}case`leftrightarrowcallout`:{let t=a*(o??5e4)/1e5,c=i*(s??25e3)/1e5,l=r+(a-t)/2;e.rect(n+c,l,i-2*c,t),e.moveTo(n+c,r),e.lineTo(n,d),e.lineTo(n+c,r+a),e.closePath(),e.moveTo(n+i-c,r),e.lineTo(n+i,d),e.lineTo(n+i-c,r+a),e.closePath();break}case`leftrightuparrow`:{let t=i*(o??25e3)/1e5,c=a*(s??3e4)/1e5,l=n+(i-t)/2;e.moveTo(u,r),e.lineTo(n+i,r+c),e.lineTo(l+t,r+c),e.lineTo(l+t,r+a),e.lineTo(l,r+a),e.lineTo(l,r+c),e.lineTo(n,r+c),e.closePath();break}case`uturnarrow`:{let t=i*(o??25e3)/1e5,s=(i-t)/2,c=Math.max(0,s-t),l=n+t+s,u=r+t+s,d=t*2,f=r+a-t*2.5;e.moveTo(n,r+a),e.lineTo(n,u),e.arc(l,u,s,Math.PI,0),e.lineTo(n+i,f),e.lineTo(n+i+(d-t)/2,f),e.lineTo(l+t/2,r+a),e.lineTo(n+i-(d-t)/2-t,f),e.lineTo(n+i-t,f),e.lineTo(n+i-t,u),e.arc(l,u,c,0,Math.PI,!0),e.lineTo(n+t,r+a),e.closePath();break}case`bentarrow`:case`bentuparrow`:{let t=Math.min(i,a)*.25;e.moveTo(n,d-t/2),e.lineTo(n+i-t*2,d-t/2),e.lineTo(n+i-t*2,r+t),e.lineTo(n+i,d),e.lineTo(n+i-t*2,r+a-t),e.lineTo(n+i-t*2,d+t/2),e.lineTo(n,d+t/2),e.closePath();break}case`plus`:{let t=Math.min(i,a)*(o??25e3)/1e5;e.rect(u-t,r,2*t,a),e.rect(n,d-t,i,2*t);break}case`mathnotequal`:{let t=Math.min(5e4,Math.max(0,o??23520)),n=Math.min(66e5,Math.max(42e5,s??66e5)),l=Math.min(1e5-2*t,Math.max(0,c??11760)),f=a*t/1e5,p=a*l/2e5,m=i*73490/2e5,h=a/2,g=(n/6e4-90)*Math.PI/180,_=h*Math.tan(g),v=Math.hypot(_,h)*f/h;e.rect(u-m,d-p-f,2*m,f),e.rect(u-m,d+p,2*m,f),e.moveTo(u+_-v/2,r),e.lineTo(u+_+v/2,r),e.lineTo(u-_+v/2,r+a),e.lineTo(u-_-v/2,r+a),e.closePath();break}case`flowchartdelay`:{let t=a/2;e.moveTo(n,r),e.lineTo(n+i-t,r),e.arc(n+i-t,d,t,-Math.PI/2,Math.PI/2),e.lineTo(n,r+a),e.closePath();break}case`flowchartdisplay`:{let t=i*.2,o=i*.15;e.moveTo(n+t,r),e.lineTo(n+i-o,r),e.arc(n+i-o,d,a/2,-Math.PI/2,Math.PI/2),e.lineTo(n+t,r+a),e.lineTo(n,d),e.closePath();break}case`flowchartpunchedcard`:{let t=i*.2;e.moveTo(n+t,r),e.lineTo(n+i,r),e.lineTo(n+i-t,r+a),e.lineTo(n,r+a),e.closePath();break}case`flowchartoffpageconnector`:{let t=a*.3;e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a-t),e.lineTo(u,r+a),e.lineTo(n,r+a-t),e.closePath();break}case`flowchartonlinestorage`:case`flowchartmanuallabel`:case`flowchartpuncheddisk`:e.rect(n,r,i,a);break;case`horizontalscroll`:{let t=Math.min(i,a)*.15;e.roundRect(n+t,r,i-t,a,t),e.moveTo(n+t,r+t*2),e.arc(n+t,r+t,t,Math.PI/2,Math.PI*2.5);break}case`verticalscroll`:{let t=Math.min(i,a)*.15;e.roundRect(n,r+t,i,a-t,t),e.moveTo(n+t*2,r+t),e.arc(n+t,r+t,t,0,Math.PI*2);break}case`ribbon`:{let t=Math.min(33333,Math.max(0,o??16667)),c=i*Math.min(75e3,Math.max(25e3,s??5e4))/2e5,l=i/8,u=i/32,d=i/2-c,f=i/2+c,p=d+u,m=f-u,h=d+l,g=f-l,_=h-u,v=g+u,y=i-l,b=a*t/2e5,x=a*t/1e5,S=a-x,C=S/2;e.moveTo(n,r),e.lineTo(n+_,r),e.lineTo(n+p,r+b),e.lineTo(n+m,r+x),e.lineTo(n+v,r+b),e.lineTo(n+i,r),e.lineTo(n+y,r+C),e.lineTo(n+i,r+S),e.lineTo(n+f,r+S),e.lineTo(n+f,r+a),e.lineTo(n+p,r+a),e.lineTo(n+d,r+S),e.lineTo(n,r+S),e.lineTo(n+l,r+C),e.closePath();break}case`ribbon2`:{let t=Math.min(33333,Math.max(0,o??16667)),c=i*Math.min(75e3,Math.max(25e3,s??5e4))/2e5,l=i/8,u=i/32,d=i/2-c,f=i/2+c,p=d+u,m=f-u,h=d+l,g=f-l,_=h-u,v=g+u,y=i-l,b=a*t/2e5,x=a*t/1e5,S=a-b,C=a-x,w=x,T=(w+a)/2;e.moveTo(n,r+a),e.lineTo(n+_,r+a),e.lineTo(n+p,r+S),e.lineTo(n+m,r+C),e.lineTo(n+v,r+S),e.lineTo(n+i,r+a),e.lineTo(n+y,r+T),e.lineTo(n+i,r+w),e.lineTo(n+f,r+w),e.lineTo(n+f,r),e.lineTo(n+p,r),e.lineTo(n+d,r+w),e.lineTo(n,r+w),e.lineTo(n+l,r+T),e.closePath();break}case`ellipseribbon`:{let t=Math.min(1e5,Math.max(0,o??25e3)),l=Math.min(75e3,Math.max(25e3,s??5e4)),u=Math.max(0,t-(1e5-t)/2),d=Math.min(t,Math.max(u,c??12500)),f=i/8,p=i*l/2e5,m=i/2-p,h=m+f,g=i-h,_=i-m,v=i-f,y=a*d/1e5,b=4*y/i,x=b*(h-h*h/i),S=h/2,C=b*S,w=i-S,T=a*t/1e5,E=T-y,D=b*(m-m*m/i),O=D+E,k=y+E-O+y+E,A=a-T,j=(y*14/16+A)/2,M=D+A,N=O+A,P=m/2,F=b*P+A,I=i-P,L=k+A;e.moveTo(n,r),e.quadraticCurveTo(n+S,r+C,n+h,r+x),e.lineTo(n+m,r+O),e.quadraticCurveTo(n+i/2,r+k,n+_,r+O),e.lineTo(n+g,r+x),e.quadraticCurveTo(n+w,r+C,n+i,r),e.lineTo(n+v,r+j),e.lineTo(n+i,r+A),e.quadraticCurveTo(n+I,r+F,n+_,r+M),e.lineTo(n+_,r+N),e.quadraticCurveTo(n+i/2,r+L,n+m,r+N),e.lineTo(n+m,r+M),e.quadraticCurveTo(n+P,r+F,n,r+A),e.lineTo(n+f,r+j),e.closePath();break}case`ellipseribbon2`:{let t=Math.min(1e5,Math.max(0,o??25e3)),l=Math.min(75e3,Math.max(25e3,s??5e4)),u=Math.max(0,t-(1e5-t)/2),d=Math.min(t,Math.max(u,c??12500)),f=i/8,p=i*l/2e5,m=i/2-p,h=m+f,g=i-h,_=i-m,v=i-f,y=a*d/1e5,b=4*y/i,x=a-b*(h-h*h/i),S=h/2,C=a-b*S,w=i-S,T=a*t/1e5,E=T-y,D=b*(m-m*m/i),O=D+E,k=a-O,A=y+E-O+y+E,j=a-A,M=a-T,N=a-(y*14/16+M)/2,P=a-(D+M),F=a-(O+M),I=m/2,L=a-(b*I+M),R=i-I,z=a-(A+M);e.moveTo(n,r+a),e.quadraticCurveTo(n+S,r+C,n+h,r+x),e.lineTo(n+m,r+k),e.quadraticCurveTo(n+i/2,r+j,n+_,r+k),e.lineTo(n+g,r+x),e.quadraticCurveTo(n+w,r+C,n+i,r+a),e.lineTo(n+v,r+N),e.lineTo(n+i,r+T),e.quadraticCurveTo(n+R,r+L,n+_,r+P),e.lineTo(n+_,r+F),e.quadraticCurveTo(n+i/2,r+z,n+m,r+F),e.lineTo(n+m,r+P),e.quadraticCurveTo(n+I,r+L,n,r+T),e.lineTo(n+f,r+N),e.closePath();break}case`circulararrow`:{let t=(s??0)/6e4*Math.PI/180,n=(o??162e5)/6e4*Math.PI/180,r=(c??5e4)/1e5,l=Math.min(i,a)/2,f=l*(1-r),p=(l+f)/2,m=l-f,h=t+n;e.arc(u,d,l,t,h,!1),e.arc(u,d,f,h,t,!0),e.closePath();let g=Math.sin(h),_=-Math.cos(h),v=m*1.5,y=u+p*Math.cos(h)+v*g,b=d+p*Math.sin(h)+v*_;e.moveTo(y,b),e.lineTo(u+l*Math.cos(h),d+l*Math.sin(h)),e.lineTo(u+f*Math.cos(h),d+f*Math.sin(h)),e.closePath();break}case`curvedrightarrow`:{let t=Math.min(i,a),l=a/2,u=5e4*a/t,d=Math.min(u,Math.max(0,s??5e4)),f=t*Math.min(d,Math.max(0,o??25e3))/1e5,p=t*d/1e5,m=l-(f+p)/4,h=(2*m)**2-f**2,g=1e5*(Math.sqrt(Math.max(0,h))*i/(2*m))/t,_=t*Math.min(g,Math.max(0,c??25e3))/1e5,v=Math.sqrt(Math.max(0,i*i-_*_))*m/i,y=m+f,b=m+v,x=y+v,S=(p-f)/2,C=b-S,w=x+S,T=a-p/2,E=i-_,D=Math.atan2(_,v),O=-D,k=Math.PI-D;e.moveTo(n,r+m),Mo(e,n,r+m,i,m,Math.PI,O),e.lineTo(n+E,r+C),e.lineTo(n+i,r+T),e.lineTo(n+E,r+w),e.lineTo(n+E,r+x),Mo(e,n+E,r+x,i,m,k,D),e.closePath();break}case`curvedleftarrow`:{let t=Math.min(i,a),l=a/2,u=5e4*a/t,d=Math.min(u,Math.max(0,s??5e4)),f=t*Math.min(d,Math.max(0,o??25e3))/1e5,p=t*d/1e5,m=l-(f+p)/4,h=(2*m)**2-f**2,g=Math.sqrt(Math.max(0,h))*i/(2*m),_=1e5*g/t,v=t*Math.min(_,Math.max(0,c??25e3))/1e5,y=Math.sqrt(Math.max(0,i*i-v*v))*m/i,b=m+f,x=m+y,S=b+y,C=(p-f)/2,w=x-C,T=S+C,E=a-p/2,D=v,O=Math.atan2(v,y),k=f/2,A=Math.atan2(k,g),j=A-O,M=O-A,N=-A;e.moveTo(n,r+E),e.lineTo(n+D,r+w),e.lineTo(n+D,r+x);let P=Mo(e,n+D,r+x,i,m,O,j);Mo(e,P.x,P.y,i,m,N,M),e.lineTo(n+D,r+T),e.closePath();break}case`curveduparrow`:{let t=Math.min(i,a),l=i/2,u=5e4*i/t,d=Math.min(u,Math.max(0,s??5e4)),f=t*Math.min(1e5,Math.max(0,o??25e3))/1e5,p=t*d/1e5,m=l-(f+p)/4,h=(2*m)**2-f**2,g=Math.sqrt(Math.max(0,h))*a/(2*m),_=1e5*g/t,v=t*Math.min(_,Math.max(0,c??25e3))/1e5,y=Math.sqrt(Math.max(0,a*a-v*v))*m/a,b=m+f,x=m+y,S=b+y,C=(p-f)/2,w=x-C,T=S+C,E=i-p/2,D=v,O=Math.atan2(v,y),k=f/2,A=Math.atan2(k,g),j=A-O,M=O-A,N=Math.PI/2-O,P=Math.PI/2-A;e.moveTo(n+E,r),e.lineTo(n+T,r+D),e.lineTo(n+S,r+D);let F=Mo(e,n+S,r+D,m,a,N,M);Mo(e,F.x,F.y,m,a,P,j),e.lineTo(n+w,r+D),e.closePath();break}case`curveddownarrow`:{let t=Math.min(i,a),l=i/2,u=5e4*i/t,d=Math.min(u,Math.max(0,s??5e4)),f=t*Math.min(1e5,Math.max(0,o??25e3))/1e5,p=t*d/1e5,m=l-(f+p)/4,h=(2*m)**2-f**2,g=Math.sqrt(Math.max(0,h))*a/(2*m),_=1e5*g/t,v=t*Math.min(_,Math.max(0,c??25e3))/1e5,y=Math.sqrt(Math.max(0,a*a-v*v))*m/a,b=m+f,x=m+y,S=b+y,C=(p-f)/2,w=x-C,T=S+C,E=i-p/2,D=a-v,O=Math.atan2(v,y),k=f/2,A=Math.atan2(k,g),j=3*Math.PI/2+O;3*Math.PI/2-A,A-Math.PI/2,Math.PI/2-A,e.moveTo(n+E,r+a),e.lineTo(n+w,r+D),e.lineTo(n+x,r+D),Mo(e,n+x,r+D,m,a,j,-O),e.lineTo(n+b,r),Mo(e,n+b,r,m,a,3*Math.PI/2,O),e.lineTo(n+T,r+D),e.closePath();break}case`stripedrightarrow`:{let t=Math.min(i,a),c=t/32,l=t/16,u=t/8,f=t*(o??5e4)/1e5,p=i*(s??5e4)/1e5,m=d-f/2,h=d+f/2,g=n+i-p;e.rect(n,m,c,f),e.rect(n+l,m,l,f),e.rect(n+u,m,u,f),e.moveTo(g,m),e.lineTo(g,r),e.lineTo(n+i,d),e.lineTo(g,r+a),e.lineTo(g,h),e.lineTo(n+u*2,h),e.lineTo(n+u*2,m),e.closePath();break}case`flowchartmagneticdisk`:{let t=a*.15;e.moveTo(n,r+t),e.ellipse(u,r+t,i/2,t,0,Math.PI,0),e.lineTo(n+i,r+a-t),e.ellipse(u,r+a-t,i/2,t,0,0,Math.PI),e.lineTo(n,r+t),e.closePath(),e.moveTo(n+i,r+t),e.ellipse(u,r+t,i/2,t,0,0,Math.PI);break}case`flowchartmagneticdrum`:{let t=i*.15;e.moveTo(n+t,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a),e.lineTo(n+t,r+a),e.ellipse(n+t,d,t,a/2,0,Math.PI/2,-Math.PI/2,!0),e.closePath(),e.moveTo(n+i,r),e.ellipse(n+i,d,t,a/2,0,-Math.PI/2,Math.PI/2);break}case`flowchartmagnetictape`:{let t=Math.min(i,a)/2,n=u+t*.5;e.moveTo(u,r+a),e.arc(u,d,t,Math.PI/2,Math.PI/2+Math.PI*2*.875),e.lineTo(n,d+t*.5),e.lineTo(n,r+a),e.closePath();break}case`flowchartpunchedtape`:{let t=a*.12;e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a-t),e.bezierCurveTo(n+i*.75,r+a,n+i*.25,r+a-t*2,n,r+a-t),e.closePath(),e.moveTo(n,r+t),e.bezierCurveTo(n+i*.25,r,n+i*.75,r+t*2,n+i,r+t);break}case`flowchartmanualoperation`:{let t=i*.15;e.moveTo(n+t,r),e.lineTo(n+i-t,r),e.lineTo(n+i,r+a),e.lineTo(n,r+a),e.closePath();break}case`flowchartmultidocument`:{let t=a*.1,o=i*.04;e.rect(n+o*2,r-a*.08,i-o*2,a*.1),e.rect(n+o,r-a*.04,i-o,a*.06),e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a-t),e.bezierCurveTo(n+i*.75,r+a,n+i*.25,r+a-t*2,n,r+a-t),e.closePath();break}case`rttriangle`:e.moveTo(n,r),e.lineTo(n,r+a),e.lineTo(n+i,r+a),e.closePath();break;default:e.rect(n,r,i,a);break}}function Ro(e,t,n){let r=Math.max(.5,t.width*n),i=e.w===`sm`?4:e.w===`lg`?8:6,a=e.len===`sm`?4:e.len===`lg`?8:6;return{lw:r,halfW:r*i/2,len:r*a}}const zo=new Set([`triangle`,`stealth`,`diamond`,`oval`]);function Bo(e,t,n){return zo.has(e.type)?Ro(e,t,n).len:0}function Vo(e,t,n){if(n<=0)return{x:e.x,y:e.y};let r=t.x-e.x,i=t.y-e.y,a=Math.hypot(r,i);if(a<1e-9)return{x:e.x,y:e.y};let o=Math.min(n,a)/a;return{x:e.x+r*o,y:e.y+i*o}}function Ho(e,t,n,r,i,a,o,s){if(i.type===`none`)return;let{lw:c,halfW:l,len:u}=Ro(i,a,o),d=s??Pn(a.color);switch(e.save(),e.translate(t,n),e.rotate(r),e.fillStyle=d,e.strokeStyle=d,e.lineWidth=c,e.setLineDash([]),e.beginPath(),i.type){case`triangle`:case`stealth`:e.moveTo(0,0),e.lineTo(-u,-l),e.lineTo(-u,l),e.closePath(),e.fill();break;case`arrow`:e.lineCap=`round`,e.lineJoin=`round`,e.moveTo(-u,-l),e.lineTo(0,0),e.lineTo(-u,l),e.stroke();break;case`diamond`:e.moveTo(0,0),e.lineTo(-u/2,-l),e.lineTo(-u,0),e.lineTo(-u/2,l),e.closePath(),e.fill();break;case`oval`:e.ellipse(-u/2,0,u/2,l,0,0,Math.PI*2),e.fill();break}e.restore()}function Uo(e,t,n){let{x:r,y:i,w:a,h:o}=t.rect,{rotationDeg:s,flipH:c,flipV:l}=t.transform;e.save();try{(s!==0||c||l)&&(e.translate(r+a/2,i+o/2),s!==0&&e.rotate(s*Math.PI/180),e.scale(c?-1:1,l?-1:1),e.translate(-(r+a/2),-(i+o/2))),n()}finally{e.restore()}}function Wo(e,t){let{x:n,y:r,w:i,h:a}=t.rect;if(e.beginPath(),t.geometry.kind===`preset`){let o=[...t.geometry.adjustments];So(e,t.geometry.name,n,r,i,a,o)||Lo(e,t.geometry.name,n,r,i,a,o[0],o[1],o[2],o[3])}else Qa(e,t.geometry.subpaths,n,r,i,a);e.clip()}const Go=new Set([`line`,`straightconnector1`,`bentconnector2`,`bentconnector3`,`bentconnector4`,`bentconnector5`,`curvedconnector2`,`curvedconnector3`,`curvedconnector4`,`curvedconnector5`]),Ko=new Set([`callout1`,`callout2`,`callout3`,`bordercallout1`,`bordercallout2`,`bordercallout3`,`accentcallout1`,`accentcallout2`,`accentcallout3`,`accentbordercallout1`,`accentbordercallout2`,`accentbordercallout3`]);function qo(e){return Ko.has(e)||e===`line`||e===`straightconnector1`||e.startsWith(`bentconnector`)}function Jo(e,t,n,r,i){if(Bn(e,t,n),t.fill){let n=Ln(t.fill,e,r.x,r.y,r.w,r.h,i);n&&(e.strokeStyle=n)}}function Yo(e,t,n,r){let i=t.stroke;if(!i||!Go.has(n)&&!Ko.has(n))return;let{x:a,y:o,w:s,h:c}=t.rect,l=i.fill?Ln(i.fill,e,a,o,s,c,t.transform.rotationDeg)??void 0:void 0,u=Oo(n,a,o,s,c,[...t.geometry.kind===`preset`?t.geometry.adjustments:[]]);if(u){if(qo(n)&&u.vertices.length>=2&&(i.headEnd||i.tailEnd)){let n=u.vertices.map(e=>({x:e.x,y:e.y}));i.tailEnd&&(n[n.length-1]=Vo(n[n.length-1],n[n.length-2],Bo(i.tailEnd,i,r))),i.headEnd&&(n[0]=Vo(n[0],n[1],Bo(i.headEnd,i,r))),Jo(e,i,r,t.rect,t.transform.rotationDeg),e.beginPath(),e.moveTo(n[0].x,n[0].y);for(let t=1;t<n.length;t++)e.lineTo(n[t].x,n[t].y);e.stroke()}i.tailEnd&&Ho(e,u.end.x,u.end.y,u.end.angle,i.tailEnd,i,r,l),i.headEnd&&Ho(e,u.start.x,u.start.y,u.start.angle,i.headEnd,i,r,l)}}function Xo(e,t,n){if(t.geometry.kind!==`custom`)return;let r=t.stroke;if(!r||!r.headEnd&&!r.tailEnd)return;let i=so(t.geometry.subpaths),{x:a,y:o,w:s,h:c}=t.rect,l=r.fill?Ln(r.fill,e,a,o,s,c,t.transform.rotationDeg)??void 0:void 0;i.start&&r.headEnd&&Ho(e,a+i.start.x*s,o+i.start.y*c,Math.atan2(i.start.dy*c,i.start.dx*s),r.headEnd,r,n,l),i.end&&r.tailEnd&&Ho(e,a+i.end.x*s,o+i.end.y*c,Math.atan2(i.end.dy*c,i.end.dx*s),r.tailEnd,r,n,l)}function Zo(e,t,n){let{x:r,y:i,w:a,h:o}=t.rect;Uo(e,t,()=>{let s=Ln(t.fill,e,r,i,a,o,t.transform.rotationDeg),c=t.stroke,l=c?()=>{Jo(e,c,n,t.rect,t.transform.rotationDeg),e.stroke()}:null;if(t.geometry.kind===`preset`){let u=t.geometry.name.toLowerCase(),d=[...t.geometry.adjustments],f=qo(u)&&!!(c?.headEnd||c?.tailEnd);bo(u)&&Do(e,u,r,i,a,o,d,s,l,()=>{},f?{skipTrailingStroke:!0}:void 0)||(e.beginPath(),Lo(e,u,r,i,a,o,d[0],d[1],d[2],d[3]),s&&u!==`arc`&&(e.fillStyle=s,u===`donut`||u===`smileyface`||u===`frame`?e.fill(`evenodd`):e.fill()),l&&l()),Yo(e,t,u,n)}else e.beginPath(),Qa(e,t.geometry.subpaths,r,i,a,o),s&&(e.fillStyle=s,e.fill()),l&&l(),Xo(e,t,n)})}const Qo=1<<25,$o=Qo*4;var es=class e extends RangeError{code=`ooxml-decoded-image-limit`;constructor(t,n,r){super(`OOXML decoded image limit exceeded: ${t} ${r} > ${n}`),this.metric=t,this.limit=n,this.observed=r,this.name=`OoxmlDecodedImageLimitError`,Object.setPrototypeOf(this,e.prototype)}};const ts=32767;function ns(e,t,n,r,i){if(n<40||t+40>e.byteLength)return null;let a=e.getUint32(t,!0);if(a<40)return null;let o=e.getInt32(t+4,!0),s=e.getInt32(t+8,!0),c=e.getUint16(t+14,!0);if(e.getUint32(t+16,!0)!==0)return null;let l=s<0,u=Math.abs(o),d=Math.abs(s);if(u<=0||d<=0||u>ts||d>ts||u*d>33554432)return null;let f=new Uint8ClampedArray(u*d*4),p=u*c+31>>5<<2>>>0;if(r+p*d>r+i+p&&r+p*d>e.byteLength)return null;let m=null;if(c<=8){let n=e.getUint32(t+32,!0);n===0&&(n=1<<c);let r=t+a;m=[];for(let t=0;t<n;t++){let n=r+t*4;if(n+4>e.byteLength)break;let i=e.getUint8(n),a=e.getUint8(n+1),o=e.getUint8(n+2);m.push(o<<16|a<<8|i)}}let h=(e,t,n,r,i,a)=>{let o=(e*u+t)*4;f[o]=n,f[o+1]=r,f[o+2]=i,f[o+3]=a},g=!1;for(let t=0;t<d;t++){let n=l?t:d-1-t,i=t,a=r+n*p;if(a+p>e.byteLength)break;if(c===32)for(let t=0;t<u;t++){let n=a+t*4,r=e.getUint8(n),o=e.getUint8(n+1),s=e.getUint8(n+2),c=e.getUint8(n+3);c!==0&&(g=!0),h(i,t,s,o,r,c)}else if(c===24){for(let t=0;t<u;t++){let n=a+t*3;h(i,t,e.getUint8(n+2),e.getUint8(n+1),e.getUint8(n),255)}g=!0}else if(c===8&&m){for(let t=0;t<u;t++){let n=e.getUint8(a+t),r=m[n]??0;h(i,t,r>>16&255,r>>8&255,r&255,255)}g=!0}else if(c===4&&m){for(let t=0;t<u;t++){let n=e.getUint8(a+(t>>1)),r=t&1?n&15:n>>4&15,o=m[r]??0;h(i,t,o>>16&255,o>>8&255,o&255,255)}g=!0}else if(c===1&&m){for(let t=0;t<u;t++){let n=e.getUint8(a+(t>>3))>>7-(t&7)&1,r=m[n]??0;h(i,t,r>>16&255,r>>8&255,r&255,255)}g=!0}else return null}if(c===32&&!g)for(let e=3;e<f.length;e+=4)f[e]=255;return{width:u,height:d,data:f}}function rs(e,t,n){if(n<40||t+40>e.byteLength)return null;let r=e.getUint32(t,!0);if(r<40)return null;let i=e.getUint16(t+14,!0),a=0;if(i<=8){let n=e.getUint32(t+32,!0);n===0&&(n=1<<i),a=n}else a=e.getUint32(t+32,!0);let o=r+a*4,s=t+o,c=n-o;return c<=0?null:ns(e,t,o,s,c)}function is(e,t,n,r,i,a){try{let o=xn(t.width,t.height);if(!o)return!1;let s=o.getContext(`2d`);if(!s)return!1;let c=s.createImageData(t.width,t.height);c.data.set(t.data),s.putImageData(c,0,0);let l=Math.min(n,i),u=Math.min(r,a),d=Math.abs(i-n),f=Math.abs(a-r);return e.drawImage(o,l,u,d,f),!0}catch{return!1}}const as={HEADER:1,POLYBEZIER:2,POLYGON:3,POLYLINE:4,POLYBEZIERTO:5,POLYLINETO:6,POLYPOLYLINE:7,POLYPOLYGON:8,SETWINDOWEXTEX:9,SETWINDOWORGEX:10,SETVIEWPORTEXTEX:11,SETVIEWPORTORGEX:12,EOF:14,SETMAPMODE:17,SETPOLYFILLMODE:19,SETBKMODE:18,SETTEXTALIGN:22,SETTEXTCOLOR:24,MOVETOEX:27,SCALEVIEWPORTEXTEX:31,SCALEWINDOWEXTEX:32,SAVEDC:33,RESTOREDC:34,SETWORLDTRANSFORM:35,MODIFYWORLDTRANSFORM:36,SELECTOBJECT:37,CREATEPEN:38,CREATEBRUSHINDIRECT:39,DELETEOBJECT:40,ELLIPSE:42,RECTANGLE:43,LINETO:54,BEGINPATH:59,ENDPATH:60,CLOSEFIGURE:61,SELECTCLIPPATH:67,EXTCREATEFONTINDIRECTW:82,EXTTEXTOUTW:84,POLYBEZIER16:85,POLYGON16:86,POLYLINE16:87,POLYBEZIERTO16:88,POLYLINETO16:89,POLYPOLYLINE16:90,POLYPOLYGON16:91,CREATEMONOBRUSH:93,CREATEDIBPATTERNBRUSHPT:94,EXTCREATEPEN:95,BITBLT:76,STRETCHDIBITS:81},os={WHITE_BRUSH:2147483648,LTGRAY_BRUSH:2147483649,GRAY_BRUSH:2147483650,DKGRAY_BRUSH:2147483651,BLACK_BRUSH:2147483652,NULL_BRUSH:2147483653,WHITE_PEN:2147483654,BLACK_PEN:2147483655,NULL_PEN:2147483656,DC_BRUSH:2147483666,DC_PEN:2147483662},ss={TEXT:1,LOMETRIC:2,HIMETRIC:3,LOENGLISH:4,HIENGLISH:5,TWIPS:6,ISOTROPIC:7,ANISOTROPIC:8},cs=()=>({m11:1,m12:0,m21:0,m22:1,dx:0,dy:0});function ls(e,t){return{m11:e.m11*t.m11+e.m21*t.m12,m12:e.m12*t.m11+e.m22*t.m12,m21:e.m11*t.m21+e.m21*t.m22,m22:e.m12*t.m21+e.m22*t.m22,dx:e.m11*t.dx+e.m21*t.dy+e.dx,dy:e.m12*t.dx+e.m22*t.dy+e.dy}}var us=class{p;constructor(e,t,n){this.dv=e,this.end=n,this.p=t}get pos(){return this.p}set pos(e){this.p=e}get remaining(){return this.end-this.p}i16(){let e=this.dv.getInt16(this.p,!0);return this.p+=2,e}i32(){let e=this.dv.getInt32(this.p,!0);return this.p+=4,e}u32(){let e=this.dv.getUint32(this.p,!0);return this.p+=4,e}f32(){let e=this.dv.getFloat32(this.p,!0);return this.p+=4,e}xform(){return{m11:this.f32(),m12:this.f32(),m21:this.f32(),m22:this.f32(),dx:this.f32(),dy:this.f32()}}skip(e){this.p+=e}};function ds(e,t,n){return e.wt.m11*t+e.wt.m21*n+e.wt.dx}function fs(e,t,n){return e.wt.m12*t+e.wt.m22*n+e.wt.dy}function ps(e){return e.winExtX===0?1:e.vpExtX/e.winExtX}function ms(e){return e.winExtY===0?1:e.vpExtY/e.winExtY}function hs(e){return Math.min(Math.abs(ps(e)),Math.abs(ms(e)))}function gs(e){return e.mapMode===ss.ISOTROPIC?ps(e)<0?-hs(e):hs(e):ps(e)}function _s(e){return e.mapMode===ss.ISOTROPIC?ms(e)<0?-hs(e):hs(e):ms(e)}function vs(e,t){return(t-e.winOrgX)*gs(e)+e.vpOrgX}function ys(e,t){return(t-e.winOrgY)*_s(e)+e.vpOrgY}function bs(e,t,n){let r=vs(e,ds(e,t,n)),i=ys(e,fs(e,t,n));return[(r-e.left)*e.W/e.boundsW,(i-e.top)*e.H/e.boundsH]}function xs(e){return(Math.hypot(e.wt.m11,e.wt.m12)+Math.hypot(e.wt.m21,e.wt.m22))/2}function Ss(e){return(Math.abs(gs(e))+Math.abs(_s(e)))/2}function Cs(e){return(e.W/e.boundsW+e.H/e.boundsH)/2}function ws(e){return Math.hypot(e.wt.m21,e.wt.m22)}function Ts(e){return e.H/e.boundsH}function Es(e,t){let n=t*xs(e)*Ss(e)*Cs(e);return Math.max(.75,n)}function Ds(e,t){if(e.mapMode=t,t===ss.TEXT){e.winOrgX=0,e.winOrgY=0,e.vpOrgX=0,e.vpOrgY=0,e.winExtX=1,e.winExtY=1,e.vpExtX=1,e.vpExtY=1;return}if(t===ss.ANISOTROPIC||t===ss.ISOTROPIC||e.devPxPerMmX<=0||e.devPxPerMmY<=0)return;let n=25.4,r=t===ss.LOMETRIC?.1:t===ss.HIMETRIC?.01:t===ss.LOENGLISH?.01*n:t===ss.HIENGLISH?.001*n:t===ss.TWIPS?n/1440:0;r<=0||(e.winOrgX=0,e.winOrgY=0,e.vpOrgX=0,e.vpOrgY=0,e.winExtX=1,e.winExtY=1,e.vpExtX=r*e.devPxPerMmX,e.vpExtY=-(r*e.devPxPerMmY))}const Os={[os.WHITE_BRUSH]:{kind:`brush`,fill:`#ffffff`},[os.LTGRAY_BRUSH]:{kind:`brush`,fill:`#c0c0c0`},[os.GRAY_BRUSH]:{kind:`brush`,fill:`#808080`},[os.DKGRAY_BRUSH]:{kind:`brush`,fill:`#404040`},[os.BLACK_BRUSH]:{kind:`brush`,fill:`#000000`},[os.NULL_BRUSH]:{kind:`brush`,fill:null}},ks={[os.WHITE_PEN]:{kind:`pen`,stroke:`#ffffff`,width:1},[os.BLACK_PEN]:{kind:`pen`,stroke:`#000000`,width:1},[os.NULL_PEN]:{kind:`pen`,stroke:null,width:1},[os.DC_PEN]:{kind:`pen`,stroke:`#000000`,width:1}};function As(e,t){let n=Os[t];if(n){e.curBrush=n;return}let r=ks[t];if(r){e.curPen=r;return}t===os.DC_BRUSH&&(e.curBrush=e.curBrush??{kind:`brush`,fill:`#000000`})}function js(e){let t=0,n=0,r=0,i=0;for(let a=0;a<e.data.length;a+=4)e.data[a+3]!==0&&(t+=e.data[a],n+=e.data[a+1],r+=e.data[a+2],i++);if(i===0)return`#808080`;let a=e=>Math.round(e/i).toString(16).padStart(2,`0`);return`#${a(t)}${a(n)}${a(r)}`}const Ms=e=>[e.i16(),e.i16()],Ns=e=>[e.i32(),e.i32()];function Ps(e,t,n){t.skip(16);let r=t.u32();if(r<2||r>1048576||!e.curPen||e.curPen.stroke==null)return;let{ctx:i}=e;i.beginPath();let a=0,o=0;for(let s=0;s<r&&!(t.remaining<4);s++){let[r,c]=n(t),[l,u]=bs(e,r,c);s===0?i.moveTo(l,u):i.lineTo(l,u),a=r,o=c}i.strokeStyle=e.curPen.stroke,i.lineWidth=Es(e,e.curPen.width),i.stroke(),e.drew=!0,e.curX=a,e.curY=o}function Fs(e,t,n){t.skip(16);let r=t.u32();if(r<1||r>1048576)return;let{ctx:i}=e,a=e.curPen!=null&&e.curPen.stroke!=null;if(a){i.beginPath();let[t,n]=bs(e,e.curX,e.curY);i.moveTo(t,n)}for(let o=0;o<r&&!(t.remaining<4);o++){let[r,o]=n(t);if(a){let[t,n]=bs(e,r,o);i.lineTo(t,n)}e.curX=r,e.curY=o}a&&e.curPen&&(i.strokeStyle=e.curPen.stroke,i.lineWidth=Es(e,e.curPen.width),i.stroke(),e.drew=!0)}function Is(e,t,n){t.skip(16);let r=t.u32();if(r<2||r>1048576)return;let{ctx:i}=e;e.inPath||i.beginPath();let a=!1;for(let o=0;o<r&&!(t.remaining<4);o++){let[r,o]=n(t),[s,c]=bs(e,r,o);a?i.lineTo(s,c):(i.moveTo(s,c),a=!0)}a&&(i.closePath(),!e.inPath&&(e.curBrush&&e.curBrush.fill!=null&&(i.fillStyle=e.curBrush.fill,i.fill(e.fillRule),e.drew=!0),e.curPen&&e.curPen.stroke!=null&&(i.strokeStyle=e.curPen.stroke,i.lineWidth=Es(e,e.curPen.width),i.stroke(),e.drew=!0)))}function Ls(e,t,n,r){t.skip(16);let i=t.u32();if(i<1||i>1048576)return;let a=[];for(let e=0;e<i&&!(t.remaining<4);e++)a.push(n(t));if(a.length<(r?3:4)){a.length&&(e.curX=a[a.length-1][0],e.curY=a[a.length-1][1]);return}let o=e.curPen!=null&&e.curPen.stroke!=null,{ctx:s}=e;if(o){s.beginPath();let t=r?bs(e,e.curX,e.curY):bs(e,a[0][0],a[0][1]);s.moveTo(t[0],t[1])}let c=+!r;for(;c+2<a.length+ +!!r;c+=3){let t=a[c],n=a[c+1],r=a[c+2];if(!t||!n||!r)break;if(o){let i=bs(e,t[0],t[1]),a=bs(e,n[0],n[1]),o=bs(e,r[0],r[1]);s.bezierCurveTo(i[0],i[1],a[0],a[1],o[0],o[1])}e.curX=r[0],e.curY=r[1]}o&&e.curPen&&(s.strokeStyle=e.curPen.stroke,s.lineWidth=Es(e,e.curPen.width),s.stroke(),e.drew=!0)}function Rs(e,t,n,r){t.skip(16);let i=t.u32(),a=t.u32();if(i<=0||i>65536||a<=0||a>2097152)return;let o=[];for(let e=0;e<i;e++){if(t.remaining<4)return;o.push(t.u32())}let{ctx:s}=e;e.inPath||s.beginPath();let c=!1;for(let i of o){if(i<2){for(let e=0;e<i&&t.remaining>=4;e++)n(t);continue}for(let r=0;r<i&&!(t.remaining<4);r++){let[i,a]=n(t),[o,c]=bs(e,i,a);r===0?s.moveTo(o,c):s.lineTo(o,c)}r&&s.closePath(),c=!0}!c||e.inPath||(r&&e.curBrush&&e.curBrush.fill!=null&&(s.fillStyle=e.curBrush.fill,s.fill(e.fillRule),e.drew=!0),e.curPen&&e.curPen.stroke!=null&&(s.strokeStyle=e.curPen.stroke,s.lineWidth=Es(e,e.curPen.width),s.stroke(),e.drew=!0))}function zs(e,t,n,r,i){let{ctx:a}=e,o=bs(e,t,n),s=bs(e,r,n),c=bs(e,r,i),l=bs(e,t,i);e.inPath||a.beginPath(),a.moveTo(o[0],o[1]),a.lineTo(s[0],s[1]),a.lineTo(c[0],c[1]),a.lineTo(l[0],l[1]),a.closePath(),!e.inPath&&(e.curBrush&&e.curBrush.fill!=null&&(a.fillStyle=e.curBrush.fill,a.fill(e.fillRule),e.drew=!0),e.curPen&&e.curPen.stroke!=null&&(a.strokeStyle=e.curPen.stroke,a.lineWidth=Es(e,e.curPen.width),a.stroke(),e.drew=!0))}function Bs(e){let t=e.u32(),n=e.u32(),r=e.i32();e.i32();let i=e.u32();return[t,{kind:`pen`,stroke:(n&255)==5?null:pc(i),width:Math.abs(r)}]}function Vs(e){let t=e.u32();e.skip(16);let n=e.u32(),r=e.u32();e.u32();let i=e.u32();return[t,{kind:`pen`,stroke:(n&255)==5?null:pc(i),width:Math.abs(r)}]}function Hs(e){let t=e.u32(),n=e.u32(),r=e.u32();return e.u32(),[t,{kind:`brush`,fill:n===1?null:pc(r)}]}function Us(e,t,n){let r=e.u32();e.u32();let i=e.u32(),a=e.u32(),o=e.u32(),s=e.u32(),c=`#808080`;try{let e=ns(t,n+i,a,n+o,s);e&&(c=js(e))}catch{}return[r,{kind:`brush`,fill:c}]}function Ws(e,t,n){let r=e.u32(),i=n+12,a=t.getInt32(i,!0),o=t.getInt32(i+8,!0),s=t.getInt32(i+16,!0),c=t.getUint8(i+20),l=``;for(let e=0;e<32;e++){let n=i+28+e*2;if(n+2>t.byteLength)break;let r=t.getUint16(n,!0);if(r===0)break;l+=String.fromCharCode(r)}return[r,{kind:`font`,height:Math.abs(a),weight:s,italic:c!==0,face:l,escapement:o}]}function Gs(e,t,n,r){t.skip(16),t.u32(),t.f32(),t.f32();let i=t.i32(),a=t.i32(),o=t.u32(),s=t.u32();if(t.u32(),o<=0||o>65536)return;let c=``;for(let e=0;e<o;e++){let t=r+s+e*2;if(t+2>n.byteLength)break;c+=String.fromCharCode(n.getUint16(t,!0))}if(c.length===0)return;let l=e.curFont,u=Math.abs(l?.height??0)*ws(e)*Math.abs(_s(e))*Ts(e);if(!Number.isFinite(u)||u<1)return;let{ctx:d}=e,[f,p]=bs(e,i,a);d.fillStyle=e.textColor;let m=l&&l.weight>=700?`bold `:``;d.font=`${l?.italic?`italic `:``}${m}${u}px ${l?.face||`sans-serif`}`;let h=e.textAlign&6;d.textAlign=h===2?`right`:h===6?`center`:`left`,d.textBaseline=(e.textAlign&24)==24?`alphabetic`:`top`;let g=l?.escapement??0;try{if(g!==0){d.save();try{d.translate(f,p),d.rotate(-g/10*(Math.PI/180)),d.fillText(c,0,0)}finally{d.restore()}}else d.fillText(c,f,p);e.drew=!0}catch{}}function Ks(e,t,n,r,i,a,o,s,c,l,u){if(i===0||o===0)return;let d=ns(t,n+r,i,n+a,o);if(!d)return;let[f,p]=bs(e,s,c),[m,h]=bs(e,l,u);is(e.ctx,d,f,p,m,h)&&(e.drew=!0)}function qs(e,t,n,r){t.skip(16);let i=t.i32(),a=t.i32(),o=t.i32(),s=t.i32();t.u32(),t.i32(),t.i32(),t.skip(24),t.u32(),t.u32(),Ks(e,n,r,t.u32(),t.u32(),t.u32(),t.u32(),i,a,i+o,a+s)}function Js(e,t,n,r){t.skip(16);let i=t.i32(),a=t.i32();t.i32(),t.i32(),t.i32(),t.i32();let o=t.u32(),s=t.u32(),c=t.u32(),l=t.u32();t.u32(),t.u32();let u=t.i32(),d=t.i32();Ks(e,n,r,o,s,c,l,i,a,i+u,a+d)}function Ys(e,t,n,r){if(!dc(e)||n<=0||r<=0)return!1;let i=new DataView(e.buffer,e.byteOffset,e.byteLength),a={ctx:t,W:n,H:r,left:0,top:0,boundsW:n,boundsH:r,wt:cs(),mapMode:ss.TEXT,winOrgX:0,winOrgY:0,winExtX:1,winExtY:1,vpOrgX:0,vpOrgY:0,vpExtX:1,vpExtY:1,devPxPerMmX:0,devPxPerMmY:0,objects:new Map,curPen:null,curBrush:null,curFont:null,textColor:`#000000`,bkMode:1,textAlign:0,fillRule:`nonzero`,curX:0,curY:0,stack:[],drew:!1,inPath:!1},o=0;for(;o+8<=e.length;){let n=i.getUint32(o,!0),r=i.getUint32(o+4,!0);if(r<8||r&3)break;let s=o+r;if(s>e.length||n===as.EOF)break;let c=new us(i,o+8,s);try{switch(n){case as.HEADER:{let e=i.getInt32(o+8,!0),t=i.getInt32(o+12,!0),n=i.getInt32(o+16,!0),r=i.getInt32(o+20,!0);if(a.left=e,a.top=t,a.boundsW=Math.max(1,n-e),a.boundsH=Math.max(1,r-t),s>=o+88){let e=i.getInt32(o+24,!0),t=i.getInt32(o+28,!0),n=i.getInt32(o+32,!0),r=i.getInt32(o+36,!0),s=i.getInt32(o+72,!0),c=i.getInt32(o+76,!0),l=i.getInt32(o+80,!0),u=i.getInt32(o+84,!0),d=n-e,f=r-t;if(d>0&&f>0&&s>0&&c>0&&l>0&&u>0){let n=s/(l*100),r=c/(u*100);a.left=e*n,a.top=t*r,a.boundsW=Math.max(1,d*n),a.boundsH=Math.max(1,f*r),a.devPxPerMmX=s/l,a.devPxPerMmY=c/u}}break}case as.SETWORLDTRANSFORM:a.wt=c.xform();break;case as.MODIFYWORLDTRANSFORM:{let e=c.xform(),t=c.u32();t===1?a.wt=cs():t===2?a.wt=ls(e,a.wt):t===3?a.wt=ls(a.wt,e):t===4&&(a.wt=e);break}case as.SETMAPMODE:Ds(a,c.u32());break;case as.SETWINDOWORGEX:a.winOrgX=c.i32(),a.winOrgY=c.i32();break;case as.SETWINDOWEXTEX:{let e=c.i32(),t=c.i32();e!==0&&(a.winExtX=e),t!==0&&(a.winExtY=t);break}case as.SETVIEWPORTORGEX:a.vpOrgX=c.i32(),a.vpOrgY=c.i32();break;case as.SETVIEWPORTEXTEX:{let e=c.i32(),t=c.i32();e!==0&&(a.vpExtX=e),t!==0&&(a.vpExtY=t);break}case as.SCALEWINDOWEXTEX:{let e=c.i32(),t=c.i32(),n=c.i32(),r=c.i32();t!==0&&(a.winExtX=a.winExtX*e/t),r!==0&&(a.winExtY=a.winExtY*n/r);break}case as.SCALEVIEWPORTEXTEX:{let e=c.i32(),t=c.i32(),n=c.i32(),r=c.i32();t!==0&&(a.vpExtX=a.vpExtX*e/t),r!==0&&(a.vpExtY=a.vpExtY*n/r);break}case as.SAVEDC:a.ctx.save(),a.stack.push({wt:{...a.wt},mapMode:a.mapMode,winOrgX:a.winOrgX,winOrgY:a.winOrgY,winExtX:a.winExtX,winExtY:a.winExtY,vpOrgX:a.vpOrgX,vpOrgY:a.vpOrgY,vpExtX:a.vpExtX,vpExtY:a.vpExtY,curPen:a.curPen,curBrush:a.curBrush,curFont:a.curFont,textColor:a.textColor,bkMode:a.bkMode,textAlign:a.textAlign,fillRule:a.fillRule,curX:a.curX,curY:a.curY});break;case as.RESTOREDC:{let e=c.i32(),t=Math.min(Math.abs(e)||1,a.stack.length),n;for(let e=0;e<t;e++)n=a.stack.pop(),a.ctx.restore();n&&(a.wt=n.wt,a.mapMode=n.mapMode,a.winOrgX=n.winOrgX,a.winOrgY=n.winOrgY,a.winExtX=n.winExtX,a.winExtY=n.winExtY,a.vpOrgX=n.vpOrgX,a.vpOrgY=n.vpOrgY,a.vpExtX=n.vpExtX,a.vpExtY=n.vpExtY,a.curPen=n.curPen,a.curBrush=n.curBrush,a.curFont=n.curFont,a.textColor=n.textColor,a.bkMode=n.bkMode,a.textAlign=n.textAlign,a.fillRule=n.fillRule,a.curX=n.curX,a.curY=n.curY);break}case as.BEGINPATH:a.ctx.beginPath(),a.inPath=!0;break;case as.CLOSEFIGURE:a.inPath&&a.ctx.closePath();break;case as.ENDPATH:a.inPath=!1;break;case as.SELECTCLIPPATH:try{a.ctx.clip(a.fillRule)}catch{}break;case as.SELECTOBJECT:{let e=c.u32();if(e&2147483648)As(a,e>>>0);else{let t=a.objects.get(e);t?.kind===`pen`?a.curPen=t:t?.kind===`brush`?a.curBrush=t:t?.kind===`font`&&(a.curFont=t)}break}case as.DELETEOBJECT:{let e=c.u32(),t=a.objects.get(e);t&&(t===a.curPen&&(a.curPen=null),t===a.curBrush&&(a.curBrush=null),t===a.curFont&&(a.curFont=null),a.objects.delete(e));break}case as.CREATEPEN:{let[e,t]=Bs(c);a.objects.set(e,t);break}case as.EXTCREATEPEN:{let[e,t]=Vs(c);a.objects.set(e,t);break}case as.CREATEBRUSHINDIRECT:{let[e,t]=Hs(c);a.objects.set(e,t);break}case as.CREATEMONOBRUSH:case as.CREATEDIBPATTERNBRUSHPT:{let[e,t]=Us(c,i,o);a.objects.set(e,t);break}case as.EXTCREATEFONTINDIRECTW:{let[e,t]=Ws(c,i,o);a.objects.set(e,t);break}case as.POLYLINE16:Ps(a,c,Ms);break;case as.POLYLINE:Ps(a,c,Ns);break;case as.POLYLINETO16:Fs(a,c,Ms);break;case as.POLYLINETO:Fs(a,c,Ns);break;case as.POLYGON16:Is(a,c,Ms);break;case as.POLYGON:Is(a,c,Ns);break;case as.POLYBEZIER16:Ls(a,c,Ms,!1);break;case as.POLYBEZIER:Ls(a,c,Ns,!1);break;case as.POLYBEZIERTO16:Ls(a,c,Ms,!0);break;case as.POLYBEZIERTO:Ls(a,c,Ns,!0);break;case as.POLYPOLYGON16:Rs(a,c,Ms,!0);break;case as.POLYPOLYGON:Rs(a,c,Ns,!0);break;case as.POLYPOLYLINE16:Rs(a,c,Ms,!1);break;case as.POLYPOLYLINE:Rs(a,c,Ns,!1);break;case as.MOVETOEX:a.curX=c.i32(),a.curY=c.i32();break;case as.LINETO:{let e=c.i32(),n=c.i32();if(a.curPen&&a.curPen.stroke!=null){let[r,i]=bs(a,a.curX,a.curY),[o,s]=bs(a,e,n);t.beginPath(),t.moveTo(r,i),t.lineTo(o,s),t.strokeStyle=a.curPen.stroke,t.lineWidth=Es(a,a.curPen.width),t.stroke(),a.drew=!0}a.curX=e,a.curY=n;break}case as.RECTANGLE:zs(a,c.i32(),c.i32(),c.i32(),c.i32());break;case as.ELLIPSE:{let e=c.i32(),n=c.i32(),r=c.i32(),i=c.i32(),[o,s]=[(e+r)/2,(n+i)/2],[l,u]=bs(a,o,s),[d]=bs(a,r,s),[,f]=bs(a,o,i),p=Math.abs(d-l),m=Math.abs(f-u);t.beginPath(),t.ellipse(l,u,p,m,0,0,Math.PI*2),a.curBrush&&a.curBrush.fill!=null&&(t.fillStyle=a.curBrush.fill,t.fill(a.fillRule),a.drew=!0),a.curPen&&a.curPen.stroke!=null&&(t.strokeStyle=a.curPen.stroke,t.lineWidth=Es(a,a.curPen.width),t.stroke(),a.drew=!0);break}case as.SETPOLYFILLMODE:a.fillRule=c.u32()===1?`evenodd`:`nonzero`;break;case as.SETTEXTCOLOR:a.textColor=pc(c.u32());break;case as.SETTEXTALIGN:a.textAlign=c.u32();break;case as.SETBKMODE:a.bkMode=c.u32();break;case as.EXTTEXTOUTW:Gs(a,c,i,o);break;case as.BITBLT:qs(a,c,i,o);break;case as.STRETCHDIBITS:Js(a,c,i,o);break;default:break}}catch{}o=s}return a.drew}async function Xs(e,t,n){if(!dc(e)||t<=0||n<=0)return null;let r=xn(t,n);if(!r)return null;let i=r.getContext(`2d`);return!i||(i.lineJoin=`round`,i.lineCap=`round`,!Ys(e,i,t,n))?null:createImageBitmap(r)}function Zs(e,t){return e[t]<<8|e[t+1]}function Qs(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function $s(e,t){return e[t]|e[t+1]<<8}function ec(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24|0}function tc(e){let t=e.length;return t>=24&&e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71&&e[4]===13&&e[5]===10&&e[6]===26&&e[7]===10?e[12]===73&&e[13]===72&&e[14]===68&&e[15]===82?{width:Qs(e,16),height:Qs(e,20)}:null:t>=10&&e[0]===71&&e[1]===73&&e[2]===70&&e[3]===56&&(e[4]===55||e[4]===57)&&e[5]===97?{width:$s(e,6),height:$s(e,8)}:t>=26&&e[0]===66&&e[1]===77?nc(e,14)===12?{width:$s(e,18),height:$s(e,20)}:{width:Math.abs(ec(e,18)),height:Math.abs(ec(e,22))}:t>=16&&e[0]===82&&e[1]===73&&e[2]===70&&e[3]===70&&e[8]===87&&e[9]===69&&e[10]===66&&e[11]===80?rc(e):t>=4&&e[0]===255&&e[1]===216?ic(e):null}function nc(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function rc(e){let t=e.length,n=e[12],r=e[13],i=e[14],a=e[15];if(n===86&&r===80&&i===56&&a===32)return t<30?null:{width:$s(e,26)&16383,height:$s(e,28)&16383};if(n===86&&r===80&&i===56&&a===76){if(t<25||e[20]!==47)return null;let n=nc(e,21);return{width:(n&16383)+1,height:(n>>>14&16383)+1}}return n===86&&r===80&&i===56&&a===88?t<30?null:{width:(e[24]|e[25]<<8|e[26]<<16)+1,height:(e[27]|e[28]<<8|e[29]<<16)+1}:null}function ic(e){let t=e.length,n=2;for(;n+1<t;){if(e[n]!==255){n+=1;continue}let r=e[n+1];if(r===255){n+=1;continue}if(r===216||r===1||r>=208&&r<=215){n+=2;continue}if(r===217||n+3>=t)return null;let i=Zs(e,n+2);if(r>=192&&r<=207&&r!==196&&r!==200&&r!==204){if(n+8>=t)return null;let r=Zs(e,n+5);return{width:Zs(e,n+7),height:r}}if(i<2)return null;n+=2+i}return null}function ac(e){let{width:t,height:n}=e;return!Number.isFinite(t)||!Number.isFinite(n)||t<=0||n<=0||t>32767||n>32767?!0:t*n>Qo}function oc(e){let t=e.close;typeof t==`function`&&t.call(e)}const sc={EOF:0,SETBKMODE:258,SETTEXTALIGN:302,SETTEXTCOLOR:521,SETPOLYFILLMODE:262,SETWINDOWORG:523,SETWINDOWEXT:524,SELECTOBJECT:301,DELETEOBJECT:496,TEXTOUT:1313,POLYGON:804,POLYLINE:805,POLYPOLYGON:1336,RECTANGLE:1051,CREATEPENINDIRECT:762,CREATEFONTINDIRECT:763,CREATEBRUSHINDIRECT:764,DIBBITBLT:2368,DIBSTRETCHBLT:2881,STRETCHDIBITS:3907},cc=2596720087;function lc(e,t){if(e.length<t+18)return!1;let n=e[t]|e[t+1]<<8,r=e[t+2]|e[t+3]<<8;return(n===1||n===2)&&r===9}function uc(e){return e.length<4?!1:(e[0]|e[1]<<8|e[2]<<16|e[3]<<24)>>>0===cc?!0:lc(e,0)}function dc(e){if(e.length<44)return!1;let t=new DataView(e.buffer,e.byteOffset,e.byteLength);return t.getUint32(0,!0)===1&&t.getUint32(40,!0)===1179469088}function fc(e){return e===`image/wmf`||e===`image/emf`}function pc(e){let t=e&255,n=e>>>8&255,r=e>>>16&255,i=e=>e.toString(16).padStart(2,`0`);return`#${i(t)}${i(n)}${i(r)}`}function mc(e,t){for(let n=0;n<e.length;n++)if(e[n]==null){e[n]=t;return}e.push(t)}var hc=class{p=0;constructor(e,t,n){this.b=e,this.end=n,this.p=t}get remaining(){return this.end-this.p}i16(){let e=this.u16();return e>=32768?e-65536:e}u16(){let e=this.b[this.p]|this.b[this.p+1]<<8;return this.p+=2,e}u8(){return this.b[this.p++]}u32(){let e=(this.b[this.p]|this.b[this.p+1]<<8|this.b[this.p+2]<<16|this.b[this.p+3]<<24)>>>0;return this.p+=4,e}bytes(e){let t=Math.min(this.p+Math.max(0,e),this.end),n=this.b.subarray(this.p,t);return this.p=t,n}skip(e){this.p=Math.min(this.p+Math.max(0,e),this.end)}};function gc(e,t){return(t-e.orgX)*(e.W/e.extX)}function _c(e,t){return(t-e.orgY)*(e.H/e.extY)}function vc(e,t){let n=t*Math.abs(e.W/e.extX);return n>=1?n:1}const yc=.001;function bc(e,t,n){return Math.abs(e-t)<=yc||Math.abs(e-n)<=yc}function xc(e,t,n){let r=[],i=n?t.length:t.length-1;for(let n=0;n<i;n++){let i=t[n],a=t[(n+1)%t.length],o=Math.abs(i[0]-a[0])<=yc&&bc(i[0],0,e.W)&&bc(a[0],0,e.W),s=Math.abs(i[1]-a[1])<=yc&&bc(i[1],0,e.H)&&bc(a[1],0,e.H);o||s||r.push([i,a])}return r}function Sc(e,t,n){if(!e.curPen||e.curPen.stroke==null||t.length<2)return;let{ctx:r}=e;if(r.strokeStyle=e.curPen.stroke,r.lineWidth=vc(e,e.curPen.width),!e.suppressBoundaryFrame){r.beginPath(),r.moveTo(t[0][0],t[0][1]);for(let e=1;e<t.length;e++)r.lineTo(t[e][0],t[e][1]);n&&r.closePath(),r.stroke(),e.drew=!0;return}let i=xc(e,t,n);if(i.length===0)return;r.beginPath();let a=null;for(let[e,t]of i)(!a||a[0]!==e[0]||a[1]!==e[1])&&r.moveTo(e[0],e[1]),r.lineTo(t[0],t[1]),a=t;r.stroke(),e.drew=!0}function Cc(e,t,n){let r=[];for(let i=0;i<n&&!(t.remaining<4);i++){let n=t.i16(),i=t.i16();r.push([gc(e,n),_c(e,i)])}return r}function wc(e,t){t.length<2||!e.curPen||e.curPen.stroke==null||Sc(e,t,!1)}function Tc(e,t){if(t.length<2)return;let{ctx:n}=e;if(e.curBrush&&e.curBrush.fill!=null){n.beginPath(),n.moveTo(t[0][0],t[0][1]);for(let e=1;e<t.length;e++)n.lineTo(t[e][0],t[e][1]);n.closePath(),n.fillStyle=e.curBrush.fill,n.fill(e.fillRule),e.drew=!0}Sc(e,t,!0)}function Ec(e,t){let n=t.u16();if(n<=0||n>65536)return;let r=[];for(let e=0;e<n;e++){if(t.remaining<2)return;r.push(t.u16())}let{ctx:i}=e;i.beginPath();let a=!1;for(let n of r){if(n<2){for(let e=0;e<n&&t.remaining>=4;e++)t.i16(),t.i16();continue}let r=Cc(e,t,n);if(!(r.length<2)){i.moveTo(r[0][0],r[0][1]);for(let e=1;e<r.length;e++)i.lineTo(r[e][0],r[e][1]);i.closePath(),a=!0}}a&&(e.curBrush&&e.curBrush.fill!=null&&(i.fillStyle=e.curBrush.fill,i.fill(e.fillRule),e.drew=!0),e.curPen&&e.curPen.stroke!=null&&(i.strokeStyle=e.curPen.stroke,i.lineWidth=vc(e,e.curPen.width),i.stroke(),e.drew=!0))}function Dc(e){let t=e.u16(),n=e.i16();e.i16();let r=e.u32();return{kind:`pen`,stroke:(t&255)==5?null:pc(r),width:Math.abs(n)}}function Oc(e){let t=e.u16(),n=e.u32();return e.u16(),{kind:`brush`,fill:t===1?null:pc(n)}}function kc(e){let t=e.indexOf(0),n=t>=0?e.subarray(0,t):e;if(n.length===0)return``;try{return new TextDecoder(`shift_jis`).decode(n)}catch{return String.fromCharCode(...n)}}function Ac(e){let t=Math.abs(e.i16());e.i16(),e.i16(),e.i16();let n=e.i16(),r=e.u8()!==0;return e.u8(),e.u8(),e.u8(),e.u8(),e.u8(),e.u8(),e.u8(),{kind:`font`,height:t,weight:n,italic:r,face:kc(e.bytes(Math.min(32,e.remaining)))}}function jc(e,t,n,r){if(t.length===0)return;let i=e.curFont,a=i?.height||12,o=Math.abs(_c(e,e.orgY+a)-_c(e,e.orgY));if(!Number.isFinite(o)||o<1)return;let{ctx:s}=e;try{s.fillStyle=e.textColor;let a=i&&i.weight>=700?`bold `:``;s.font=`${i?.italic?`italic `:``}${a}${o}px ${i?.face||`sans-serif`}`;let c=e.textAlign&6;s.textAlign=c===2?`right`:c===6?`center`:`left`,s.textBaseline=(e.textAlign&24)==24?`alphabetic`:`top`,s.fillText(t,gc(e,n),_c(e,r)),e.drew=!0}catch{}}function Mc(e,t,n,r,i=!1){if(!uc(e))return!1;let a=0;(e.length>=4?(e[0]|e[1]<<8|e[2]<<16|e[3]<<24)>>>0:0)===cc&&(a=22);let o=a+18;if(o>e.length)return!1;let s={ctx:t,W:n,H:r,orgX:0,orgY:0,extX:n||1,extY:r||1,haveExt:!1,objects:[],curPen:null,curBrush:null,curFont:null,textColor:`#000000`,textAlign:0,fillRule:`nonzero`,drew:!1,suppressBoundaryFrame:i},c=new DataView(e.buffer,e.byteOffset,e.byteLength);for(;o+6<=e.length;){let t=c.getUint32(o,!0),n=c.getUint16(o+4,!0);if(t<3)break;let r=t*2,i=o+r;if(i>e.length||n===sc.EOF)break;let a=o+6,l=new hc(e,a,i);switch(n){case sc.SETWINDOWORG:s.orgY=l.i16(),s.orgX=l.i16();break;case sc.SETWINDOWEXT:{let e=l.i16(),t=l.i16();s.extY=e||1,s.extX=t||1,s.haveExt=!0;break}case sc.SETPOLYFILLMODE:s.fillRule=l.u16()===1?`evenodd`:`nonzero`;break;case sc.SETTEXTCOLOR:s.textColor=pc(l.u32());break;case sc.SETTEXTALIGN:s.textAlign=l.u16();break;case sc.CREATEPENINDIRECT:mc(s.objects,Dc(l));break;case sc.CREATEBRUSHINDIRECT:mc(s.objects,Oc(l));break;case sc.CREATEFONTINDIRECT:mc(s.objects,Ac(l));break;case sc.SELECTOBJECT:{let e=l.u16(),t=s.objects[e];t?.kind===`pen`?s.curPen=t:t?.kind===`brush`?s.curBrush=t:t?.kind===`font`&&(s.curFont=t);break}case sc.DELETEOBJECT:{let e=l.u16(),t=s.objects[e];t&&(t===s.curPen&&(s.curPen=null),t===s.curBrush&&(s.curBrush=null),t===s.curFont&&(s.curFont=null),s.objects[e]=null);break}case sc.POLYLINE:wc(s,Cc(s,l,l.i16()));break;case sc.POLYGON:Tc(s,Cc(s,l,l.i16()));break;case sc.POLYPOLYGON:Ec(s,l);break;case sc.RECTANGLE:{let e=l.i16(),t=l.i16(),n=l.i16(),r=l.i16();Tc(s,[[gc(s,r),_c(s,n)],[gc(s,t),_c(s,n)],[gc(s,t),_c(s,e)],[gc(s,r),_c(s,e)]]);break}case sc.TEXTOUT:{let e=l.u16(),t=kc(l.bytes(e));e%2!=0&&l.skip(1);let n=l.i16();jc(s,t,l.i16(),n);break}case sc.STRETCHDIBITS:{l.u32(),l.i16(),l.i16(),l.i16(),l.i16(),l.u16();let e=l.i16(),t=l.i16(),n=l.i16(),r=l.i16(),o=a+22,u=rs(c,o,i-o);if(u){let i=gc(s,r),a=_c(s,n),o=gc(s,r+t),c=_c(s,n+e);is(s.ctx,u,i,a,o,c)&&(s.drew=!0)}break}case sc.DIBSTRETCHBLT:case sc.DIBBITBLT:case sc.SETBKMODE:break;default:break}o=i}return s.drew}function Nc(e,t){let n=e>0?e:300,r=t>0?t:300,i=e=>Math.max(1,Math.min(2e3,Math.round(e)));return{w:i(n*2),h:i(r*2)}}async function Pc(e,t,n,r=!1){if(!uc(e)||t<=0||n<=0)return null;let i=xn(t,n);if(!i)return null;let a=i.getContext(`2d`);return!a||(a.lineJoin=`round`,a.lineCap=`round`,!Mc(e,a,t,n,r))?null:createImageBitmap(i)}async function Fc(e,t={}){let{widthPt:n=0,heightPt:r=0,suppressBoundaryFrame:i=!1}=t,a=new Uint8Array(await e.slice(0,64*1024).arrayBuffer());if(uc(a)){let{w:t,h:a}=Nc(n,r);return Ic(await Pc(new Uint8Array(await e.arrayBuffer()),t,a,i))}if(dc(a)){let{w:t,h:i}=Nc(n,r);return Ic(await Xs(new Uint8Array(await e.arrayBuffer()),t,i))}let o=tc(a);if(o&&ac(o))throw new es(`image-pixels`,Qo,o.width*o.height);return Ic(await createImageBitmap(e))}function Ic(e){if(!e)return null;let t=Number(e.width),n=Number(e.height);if(!ac({width:t,height:n}))return e;let r=t*n;throw oc(e),new es(`image-pixels`,Qo,Number.isSafeInteger(r)&&r>=0?r:2**53-1)}const Lc=new WeakMap;async function Rc(e,t){let n=Lc.get(e);n||(n={active:0,waiters:[]},Lc.set(e,n)),n.active>=2||n.waiters.length>0?await new Promise(e=>n.waiters.push(e)):n.active++;try{return await Promise.resolve(),await t()}finally{let t=n.waiters.shift();t?t():(n.active--,n.active===0&&Lc.delete(e))}}const zc=new WeakMap;function Bc(e){let t=zc.get(e);return t||(t={entries:new Map,retainedBytes:0},zc.set(e,t)),t}const Vc=new WeakMap,Hc=new WeakSet;function Uc(e){!e||Hc.has(e)||(Hc.add(e),oc(e))}function Wc(e){Uc(e)}function Gc(e){let t=Vc.get(e);t||(t={count:0,deferred:[],activeBytes:0,activeBitmaps:new WeakSet},Vc.set(e,t));let n=t;n.count++;let r=!1;return()=>{if(!r&&(r=!0,n.count--,!(n.count>0))){for(let e of n.deferred)e.then(e=>Uc(e)).catch(()=>{});n.deferred=[],n.activeBytes=0,n.activeBitmaps=new WeakSet,Vc.delete(e)}}}function Kc(e){if(!e)return 0;let t=Number(e.width),n=Number(e.height);return Number.isSafeInteger(t)&&t>0&&Number.isSafeInteger(n)&&n>0?t*n*4:0}function qc(e,t){if(!t)return;let n=Vc.get(e);if(!n||n.count===0||n.activeBitmaps.has(t))return;let r=n.activeBytes+Kc(t);if(r>134217728)throw new es(`active-decoded-bytes`,$o,r);n.activeBitmaps.add(t),n.activeBytes=r}function Jc(e,t,n){let r=[...t.entries].find(([e])=>e!==n);if(!r)return!1;let[i,a]=r;return t.entries.delete(i),t.retainedBytes-=a.weight,Yc(e,a.ownedPromise),!0}function Yc(e,t){let n=Vc.get(e);if(n&&n.count>0){n.deferred.push(t);return}t.then(e=>Uc(e)).catch(()=>{})}function Xc(e,t,n){let r=Bc(t),i=r.entries,a=i.get(e);if(a)return i.delete(e),i.set(e,a),a.promise.then(e=>(qc(t,e),e));let o=Rc(t,n),s=o.then(({bitmap:e,owned:t})=>t?e:null),c=o.then(({bitmap:e,owned:n})=>{try{return qc(t,e),e}catch(t){throw n&&Uc(e),t}}),l={promise:c,ownedPromise:s,weight:0};for(o.then(({bitmap:n,owned:a})=>{if(i.get(e)===l){if(l.bitmap=n,!a){i.delete(e);return}for(l.weight=Kc(n),r.retainedBytes+=l.weight;r.retainedBytes>$o&&Jc(t,r,e););}}).catch(()=>{}),c.catch(()=>{i.get(e)===l&&(i.delete(e),r.retainedBytes-=l.weight,Yc(t,s))}),i.set(e,l);i.size>256&&Jc(t,r,e););return c}const Zc=`base`;`${Zc}`;function Qc(e,t,n,r){return Xc(`${e}:${t}`,n,r)}function $c(e,t,n,r){return Qc(`derived:${e}`,t,n,r)}function el(e,t,n,r={}){let{widthPt:i=0,heightPt:a=0,suppressBoundaryFrame:o=!1}=r;return Qc(Zc,e,n,async()=>({bitmap:await Fc(await n(e,t),{widthPt:i,heightPt:a,suppressBoundaryFrame:o}),owned:!0}))}function tl(e){let t=zc.get(e);if(t){for(let n of t.entries.values())Yc(e,n.ownedPromise);t.entries.clear(),t.retainedBytes=0,zc.delete(e)}}const nl=new WeakMap;function rl(e){let t=nl.get(e);return t||(t={imgs:new Map},nl.set(e,t)),t}function il(e,t){if(typeof Image>`u`)return el(e,`image/svg+xml`,t).then(t=>{if(!t)throw Error(`svg decode failed: ${e}`);return t});let n=rl(t),r=n.imgs.get(e);if(r)return n.imgs.delete(e),n.imgs.set(e,r),r.promise;let i={};if(i.promise=Rc(t,async()=>{if(n.imgs.get(e)!==i)throw Error(`SVG decode was superseded before it started`);let r=await t(e,`image/svg+xml`),a=URL.createObjectURL(r);try{let t=new Image;return await new Promise((n,r)=>{t.onload=()=>{typeof t.decode==`function`?t.decode().then(n).catch(n):n()},t.onerror=()=>r(Error(`svg load failed: ${e}`)),t.src=a}),t}finally{URL.revokeObjectURL(a)}}),i.promise.catch(()=>{n.imgs.get(e)===i&&n.imgs.delete(e)}),n.imgs.set(e,i),n.imgs.size>256){let e=n.imgs.keys().next().value;n.imgs.delete(e)}return i.promise}function al(e){let t=nl.get(e);t&&(t.imgs.clear(),nl.delete(e))}function ol(e){let t=e;return{w:t.naturalWidth||(typeof t.width==`number`?t.width:0)||0,h:t.naturalHeight||(typeof t.height==`number`?t.height:0)||0}}function sl(e,t){if(!t||!(t.l||t.t||t.r||t.b))return null;let{w:n,h:r}=ol(e);if(n<=0||r<=0)return null;let i=e=>Math.max(0,Math.min(1,e)),a=i(t.l)*n,o=i(t.t)*r;return{sx:a,sy:o,sw:Math.max(1,n-a-i(t.r)*n),sh:Math.max(1,r-o-i(t.b)*r)}}function cl(e,t,n,r,i,a,o){let s=sl(t,n);s?e.drawImage(t,s.sx,s.sy,s.sw,s.sh,r,i,a,o):e.drawImage(t,r,i,a,o)}function ll(e,t,n,r){if(!t||!fc(e))return{widthPt:n,heightPt:r};let i=Math.max(.01,1-t.l-t.r),a=Math.max(.01,1-t.t-t.b);return{widthPt:n/i,heightPt:r/a}}function ul(e){return/^[0-9a-fA-F]{6}$/.test(e)?[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]:null}function dl(e,t,n){return(.299*e+.587*t+.114*n)/255}function fl(e,t,n){let r=ul(t),i=ul(n);if(!r||!i)return e;let[a,o,s]=r,[c,l,u]=i,d=e.data;for(let e=0;e<d.length;e+=4){if(d[e+3]===0)continue;let t=dl(d[e],d[e+1],d[e+2]);d[e]=Math.round(a+(c-a)*t),d[e+1]=Math.round(o+(l-o)*t),d[e+2]=Math.round(s+(u-s)*t)}return e}const pl=(e,t)=>typeof OffscreenCanvas>`u`?null:new OffscreenCanvas(e,t);async function ml(e,t,n){let{width:r,height:i}=n;if(r<=0||i<=0||typeof createImageBitmap>`u`)return e;let a=(n.offscreenFactory??pl)(r,i);if(!a)return e;let o=a.getContext(`2d`);if(!o)return e;o.drawImage(e,0,0);let s;try{s=o.getImageData(0,0,r,i)}catch{return e}return fl(s,t.clr1,t.clr2),o.putImageData(s,0,0),createImageBitmap(a)}function hl(e){return e.svgImagePath!=null&&e.srcRect==null}function gl(e){if(e.protocol!==`ooxml-worker-renderer-module/v1`)throw TypeError(`Unsupported worker renderer protocol: ${String(e.protocol)}`);if(e.builtin!==`math`&&e.builtin!==`threeD`&&e.builtin!==`regionMap`)throw TypeError(`Unsupported built-in worker renderer: ${String(e.builtin)}`);if(e.builtin===`math`&&typeof e.engineAssetUrl!=`string`)throw TypeError(`Math worker renderer requires an engine asset URL`);return e}const _l={"&":`&`,"<":`<`,">":`>`,'"':`"`},vl=e=>e.replace(/[&<>"]/g,e=>_l[e]);function yl(e,t=`roman`){if(t===`double-struck`||t===`monospace`)return t;if(t===`fraktur`)return e===`bold`||e===`boldItalic`?`bold-fraktur`:`fraktur`;if(t===`script`)return e===`bold`||e===`boldItalic`?`bold-script`:`script`;if(t===`sans-serif`)switch(e){case`roman`:return`sans-serif`;case`italic`:return`sans-serif-italic`;case`bold`:return`bold-sans-serif`;case`boldItalic`:return`sans-serif-bold-italic`}switch(e){case`roman`:return`normal`;case`bold`:return`bold`;case`boldItalic`:return`bold-italic`;case`italic`:return null}}const bl=new Set([...`⏞⏟⎴⎵︷︸⏜⏝{}[]()¯_‾`]);function xl(e,t,n){let r=yl(t,n),i=r?` mathvariant="${r}"`:``,a=``,o=``,s=()=>{o&&=(a+=`<mn${i}>${vl(o)}</mn>`,``)};for(let t of e){if(t===` `){s();continue}if(t>=`0`&&t<=`9`){o+=t;continue}s(),`+−±∓×÷·∗⋅∘∙*/`.includes(t)||`=≠<>≤≥≈≡∼≅≃→←↔⇒∈∉⊂⊆⊃⊇∝≪≫⊥≔`.includes(t)||`,;`.includes(t)?a+=`<mo>${vl(t)}</mo>`:`([{⟨⌈⌊`.includes(t)||`)]}⟩⌉⌋`.includes(t)?a+=`<mo fence="true" stretchy="false">${vl(t)}</mo>`:a+=`<mi${i}>${vl(t)}</mi>`}return s(),a}function Sl(e){return e.map(wl).join(``)}function Cl(e){return`<mrow>${Sl(e)}</mrow>`}function wl(e){switch(e.kind){case`run`:return xl(e.text,e.style,e.__script);case`group`:return Cl(e.items);case`fraction`:return`<mfrac${e.bar===!1?` linethickness="0"`:``}>${Cl(e.num)}${Cl(e.den)}</mfrac>`;case`sup`:return`<msup>${Cl(e.base)}${Cl(e.sup??[])}</msup>`;case`sub`:return`<msub>${Cl(e.base)}${Cl(e.sub??[])}</msub>`;case`subSup`:return`<msubsup>${Cl(e.base)}${Cl(e.sub??[])}${Cl(e.sup??[])}</msubsup>`;case`nary`:return Nl(e);case`delimiter`:return Pl(e);case`radical`:return e.index&&e.index.length?`<mroot>${Cl(e.radicand)}${Cl(e.index)}</mroot>`:`<msqrt>${Sl(e.radicand)}</msqrt>`;case`limit`:return Al(e);case`array`:return jl(e);case`groupChr`:{let t=Cl(e.base),n=bl.has(e.char),r=e.pos===`top`?`mover`:`munder`,i=`<mo stretchy="${n}">${vl(e.char)}</mo>`;return n?`<${r}>${t}${i}</${r}>`:`<${r} accent="true">${t}${i}</${r}>`}case`bar`:{let t=Cl(e.base),n=`<mo stretchy="true">―</mo>`;return e.pos===`bot`?`<munder>${t}${n}</munder>`:`<mover>${t}${n}</mover>`}case`accent`:return kl(e);case`func`:return`<mrow>${Cl(e.name)}<mo>⁡</mo>${Cl(e.arg)}</mrow>`;case`phant`:return Tl(e);case`sPre`:return`<mmultiscripts>${Cl(e.base)}<mprescripts/>${Cl(e.sub)}${Cl(e.sup)}</mmultiscripts>`;case`box`:return Cl(e.base);case`borderBox`:return El(e)}}function Tl(e){let t=e.show?Sl(e.base):`<mphantom>${Sl(e.base)}</mphantom>`,n=[];return e.zeroWid&&n.push(`width="0"`),e.zeroAsc&&n.push(`height="0"`),e.zeroDesc&&n.push(`depth="0"`),n.length?`<mpadded ${n.join(` `)}>${t}</mpadded>`:`<mrow>${t}</mrow>`}function El(e){let t=[],n=!e.hideTop,r=!e.hideBot,i=!e.hideLeft,a=!e.hideRight;n&&r&&i&&a?t.push(`box`):(n&&t.push(`top`),r&&t.push(`bottom`),i&&t.push(`left`),a&&t.push(`right`)),e.strikeH&&t.push(`horizontalstrike`),e.strikeV&&t.push(`verticalstrike`),e.strikeBltr&&t.push(`updiagonalstrike`),e.strikeTlbr&&t.push(`downdiagonalstrike`);let o=Sl(e.base);return t.length?`<menclose notation="${t.join(` `)}">${o}</menclose>`:`<mrow>${o}</mrow>`}const Dl={"̀":"`","́":`´`,"̂":`^`,"̃":`~`,"̆":`˘`,"̇":`˙`,"̈":`¨`,"̌":`ˇ`,"⃗":`→`,"⃖":`←`},Ol=new Set([`̅`,`̄`,`¯`,`‾`,`̲`,`̳`]);function kl(e){let t=Cl(e.base);if(Ol.has(e.char))return`<mover>${t}<mo stretchy="true">―</mo></mover>`;let n=Dl[e.char]??e.char;return`<mover accent="true">${t}<mo stretchy="${n===`→`||n===`←`?`true`:`false`}">${vl(n)}</mo></mover>`}function Al(e){let t=Cl(e.base),n=e.lower&&e.lower.length?Cl(e.lower):null,r=e.upper&&e.upper.length?Cl(e.upper):null;return n&&r?`<munderover>${t}${n}${r}</munderover>`:n?`<munder>${t}${n}</munder>`:r?`<mover>${t}${r}</mover>`:t}function jl(e){let t=Math.max(1,...e.rows.map(e=>e.length)),n;n=e.align===`eq`?Array.from({length:t},(e,t)=>t%2==0?`right`:`left`).join(` `):e.align===`left`?`left`:`center`;let r=e.rows.map(e=>`<mtr>${e.map(e=>`<mtd>${Sl(e)}</mtd>`).join(``)}</mtr>`).join(``);return`<mtable columnalign="${n}" rowspacing="0.2em" columnspacing="0.3em">${r}</mtable>`}const Ml=new Set([...`∫∬∭∮∯∰∱∲∳⨌⨍⨎⨏⨐⨑⨒⨓⨔⨕⨖⨗`]);function Nl(e){let t=e.limLoc===`subSup`?!0:e.limLoc===`undOvr`?!1:Ml.has(e.op),n=`<mo largeop="true">${vl(e.op)}</mo>`,r=e.sub??[],i=e.sup??[],a;return a=t?r.length&&i.length?`<msubsup>${n}${Cl(r)}${Cl(i)}</msubsup>`:r.length?`<msub>${n}${Cl(r)}</msub>`:i.length?`<msup>${n}${Cl(i)}</msup>`:n:r.length&&i.length?`<munderover>${n}${Cl(r)}${Cl(i)}</munderover>`:r.length?`<munder>${n}${Cl(r)}</munder>`:i.length?`<mover>${n}${Cl(i)}</mover>`:n,`<mrow>${a}${Sl(e.body)}</mrow>`}function Pl(e){let t=e=>`<mo fence="true" stretchy="true">${vl(e)}</mo>`,n=e.items.map(e=>Cl(e)).join(`<mo separator="true">,</mo>`);return`<mrow>${t(e.begChar)}${n}${t(e.endChar)}</mrow>`}function Fl(e,t){return`<math xmlns="http://www.w3.org/1998/Math/MathML" display="${t?`block`:`inline`}">${Sl(e)}</math>`}function Il(e){let t=/viewBox="([-\d.]+) ([-\d.]+) ([-\d.]+) ([-\d.]+)"/.exec(e);if(!t)return{widthEm:0,ascentEm:0,descentEm:0};let n=parseFloat(t[2]),r=parseFloat(t[3]),i=parseFloat(t[4]);return{widthEm:r/Rl,ascentEm:Math.max(0,-n/Rl),descentEm:Math.max(0,(n+i)/Rl)}}function Ll(e,t){return e.replace(/currentColor/g,t)}var Rl,zl=t((()=>{Rl=1e3}));const Bl=32767;function Vl(e,t){let n=Number.isFinite(e)&&e>0?Math.max(1,Math.round(e)):1,r=Number.isFinite(t)&&t>0?Math.max(1,Math.round(t)):1,i=Math.min(1,Bl/n,Bl/r),a=n*r,o=a>16777216?Math.sqrt(16777216/a):1,s=Math.min(i,o);return s>=1?{width:n,height:r,scale:1,clamped:!1}:{width:Math.max(1,Math.floor(n*s)),height:Math.max(1,Math.floor(r*s)),scale:s,clamped:!0}}zl();function Hl(e,t,n){let r=Math.max(1,Math.round(t*256)),i=Math.max(1,Math.round(n*256));return e.replace(/<svg([^>]*?)>/,(e,t)=>`<svg${t.replace(/\s(?:width|height)="[^"]*"/g,``)} width="${r}" height="${i}">`)}function Ul(e,t){return RegExp(`(?:^|\\s)${t}="([^"]*)"`).exec(e)?.[1]}function Wl(e,t,n=0){let r=Number.parseFloat(Ul(e,t)??``);return Number.isFinite(r)?r:n}function Gl(e){let t=new Map;for(let n of[`fill`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`,`fill-rule`,`opacity`]){let r=Ul(e,n);r!==void 0&&t.set(n,r)}let n=Ul(e,`style`);if(n)for(let e of n.split(`;`)){let n=e.indexOf(`:`);if(n<0)continue;let r=e.slice(0,n).trim(),i=e.slice(n+1).trim();r&&i&&t.set(r,i)}return t}function Kl(e,t,n){let r=Gl(t),i={...n},a=r.get(`fill`);a===`none`?i.fill=!1:a&&(i.fill=!0,e.fillStyle=a);let o=r.get(`stroke`);o===`none`?i.stroke=!1:o&&(i.stroke=!0,e.strokeStyle=o);let s=Number.parseFloat(r.get(`stroke-width`)??``);Number.isFinite(s)&&(e.lineWidth=s);let c=r.get(`stroke-linecap`);(c===`butt`||c===`round`||c===`square`)&&(e.lineCap=c);let l=r.get(`stroke-linejoin`);(l===`bevel`||l===`round`||l===`miter`)&&(e.lineJoin=l);let u=r.get(`fill-rule`);(u===`evenodd`||u===`nonzero`)&&(i.fillRule=u);let d=Number.parseFloat(r.get(`opacity`)??``);return Number.isFinite(d)&&(e.globalAlpha*=Math.max(0,Math.min(1,d))),i}function ql(e,t){if(!t)return;let n=/([a-zA-Z]+)\(([^)]*)\)/g;for(let r=n.exec(t);r;r=n.exec(t)){let t=r[2].trim().split(/[\s,]+/).filter(Boolean).map(Number);if(!t.some(e=>!Number.isFinite(e)))switch(r[1]){case`matrix`:t.length>=6&&e.transform(...t.slice(0,6));break;case`translate`:e.translate(t[0]??0,t[1]??0);break;case`scale`:{let n=t[0]??1;e.scale(n,t[1]??n);break}case`rotate`:{let n=(t[0]??0)*Math.PI/180;t.length>=3?(e.translate(t[1],t[2]),e.rotate(n),e.translate(-t[1],-t[2])):e.rotate(n);break}}}}function Jl(e,t,n){n.fill&&e.fill(t,n.fillRule),n.stroke&&e.lineWidth>0&&e.stroke(t)}function Yl(e,t,n,r){let i=Ul(t.slice(0,t.indexOf(`>`)+1),`viewBox`)?.trim().split(/[\s,]+/).map(Number);if(!i||i.length!==4||i.some(e=>!Number.isFinite(e)))throw TypeError(`MathJax SVG must contain a finite viewBox`);let[a,o,s,c]=i;if(!(s>0)||!(c>0))throw TypeError(`MathJax SVG viewBox must have positive dimensions`);e.save(),e.setTransform(n/s,0,0,r/c,-a*n/s,-o*r/c),e.fillStyle=`#000000`,e.strokeStyle=`#000000`,e.lineWidth=1;let l={fill:!0,stroke:!1,fillRule:`nonzero`},u=[],d=/<\/?([A-Za-z][\w:-]*)([^>]*)>/g;for(let n=d.exec(t);n;n=d.exec(t)){let[t,r,i=``]=n,a=r.toLowerCase(),o=t.startsWith(`</`);if(a===`svg`)continue;if(o){a===`g`&&(e.restore(),l=u.pop()??l);continue}if(a===`g`){u.push(l),e.save(),l=Kl(e,i,l),ql(e,Ul(i,`transform`));continue}if(a!==`path`&&a!==`rect`&&a!==`line`)continue;e.save();let s=Kl(e,i,l);ql(e,Ul(i,`transform`));let c=a===`path`?new Path2D(Ul(i,`d`)??``):new Path2D;a===`rect`?c.rect(Wl(i,`x`),Wl(i,`y`),Wl(i,`width`),Wl(i,`height`)):a===`line`&&(c.moveTo(Wl(i,`x1`),Wl(i,`y1`)),c.lineTo(Wl(i,`x2`),Wl(i,`y2`))),Jl(e,c,s),e.restore()}e.restore()}async function Xl(e,t){let{width:n,height:r}=Vl(e.widthEm*256,(e.ascentEm+e.descentEm)*256),i=xn(n,r),a=i?.getContext(`2d`);if(!i||!a||typeof Path2D>`u`)throw Error(`Math SVG rasterization requires Canvas 2D and Path2D support`);Yl(a,Hl(Ll(e.svg,t),e.widthEm,e.ascentEm+e.descentEm),n,r);let o=i,s=n,c=r,l=64/256,u=Math.max(1,Math.round(n*l)),d=Math.max(1,Math.round(r*l));for(;s>u||c>d;){let e=Math.max(u,Math.ceil(s/2)),t=Math.max(d,Math.ceil(c/2)),n=xn(e,t),r=n?.getContext(`2d`);if(!n||!r)break;r.imageSmoothingEnabled=!0,r.imageSmoothingQuality=`high`,r.drawImage(o,0,0,e,t),o=n,s=e,c=t}return{source:o,widthPx:s,heightPx:c}}function Zl(e){return typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement}function Ql(e=1){return typeof window<`u`&&window.devicePixelRatio||e}function $l(e,t,n){let r=Math.round(t*n)%2==1?.5:0,i=e*n;return(Math.round(i-r)+r)/n-e}function eu(e,t){let n=Math.max(1,Math.round(e*t/3)),r=Math.max(1,Math.round(e*t/3));return{railDev:n,gapDev:r,spanDev:2*n+r}}function tu(e){if(!e.startsWith(`data:`))return null;let t=e.indexOf(`,`);if(t===-1)return null;let n=atob(e.slice(t+1)),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r.buffer}var nu=class{state=`uninitialized`;generationValue=0;readiness;poisonListeners=new Set;constructor(e,t,n){this.initialize=e,this.reinitialize=t,this.normalizeFailure=n}get generation(){return this.generationValue}get poisoned(){return this.state===`poisoned`}onPoison(e){return this.poisonListeners.add(e),()=>this.poisonListeners.delete(e)}async ensureReady(){if(this.state!==`ready`){if(!this.readiness){let e=this.state===`uninitialized`?this.initialize:this.reinitialize;this.readiness=Promise.resolve().then(e).then(()=>{this.generationValue+=1,this.state=`ready`,this.readiness=void 0},e=>{throw this.readiness=void 0,e})}await this.readiness}}run(e){try{return e()}catch(e){let t=this.normalizeFailure(e);throw t?(this.poison(t),t):e}}tryRunReady(e){if(this.state!==`ready`)return{current:!1};let t=this.generationValue,n=this.run(e);return this.state!==`ready`||t!==this.generationValue?{current:!1}:{current:!0,generation:t,value:n}}poison(e){this.state=`poisoned`,this.readiness=void 0;for(let t of this.poisonListeners)t(e)}assertCurrent(e){if(this.state!==`ready`||e!==this.generationValue)throw Error(`WASM archive session belongs to a discarded runtime generation`)}},ru=class e extends Error{code=`parser-crashed`;constructor(t){super(t),this.name=`WasmTrapError`,Object.setPrototypeOf(this,e.prototype)}};function iu(e){let t=globalThis.WebAssembly?.RuntimeError;return t&&e instanceof t||e instanceof RangeError?!0:e instanceof Error?e.name===`RuntimeError`||e.name===`CompileError`||e.name===`LinkError`||e.name===`InternalError`||e.name===`OOMError`:!1}function au(e){try{if((typeof e!=`object`||!e)&&typeof e!=`function`)return;let t=Reflect.get(e,`__destroy_into_raw`);typeof t==`function`&&Reflect.apply(t,e,[])}catch{}}function ou(e,t){return e({module_or_path:t})}var su=class{runtime;wasmInput=null;currentArchive=null;constructor(e,t={}){this.init=e,this.options=t,this.runtime=new nu(()=>this.invokeConfigured(this.init),()=>this.invokeConfigured(this.options.reinit??this.init),cu),this.runtime.onPoison(()=>this.dropPoisonedArchive())}setWasmInput(e){this.wasmInput=e,this.runtime.ensureReady().catch(()=>void 0)}setWasmUrl(e){this.setWasmInput(e)}get archive(){return this.currentArchive}setArchive(e){this.freeArchive(),this.currentArchive=e}disposeArchive(){this.freeArchive()}get poisoned(){return this.runtime.poisoned}async ensureReady(){await this.runtime.ensureReady()}run(e){return this.runtime.run(e)}poison(){this.runtime.poison(new ru(`WASM parser was recycled`))}invokeConfigured(e){return this.wasmInput===null?Promise.reject(Error(`WasmParserHost: setWasmInput was never called`)):ou(e,this.wasmInput)}freeArchive(){this.currentArchive!==null&&this.options.freeArchive&&this.options.freeArchive(this.currentArchive),this.currentArchive=null}dropPoisonedArchive(){let e=this.currentArchive;this.currentArchive=null,au(e)}};function cu(e){return iu(e)?new ru(`WASM parser trapped and was recycled: ${e instanceof Error?e.message:String(e)}`):null}function lu(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>0}function uu(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return lu(t.requiredBytes)&&lu(t.offeredBytes)&&t.requiredBytes>t.offeredBytes}var du=class e extends RangeError{code=`ooxml-insufficient-credit`;requiredBytes;offeredBytes;constructor(t){super(`Pull unit requires ${t.requiredBytes} bytes but credit is ${t.offeredBytes}`),this.name=`PullSessionInsufficientCreditError`,this.requiredBytes=t.requiredBytes,this.offeredBytes=t.offeredBytes,Object.setPrototypeOf(this,e.prototype)}};function fu(e){if(e instanceof du)return e;let t=e instanceof Error?e.message:String(e);if(!t.startsWith(`OOXML_INSUFFICIENT_CREDIT:`))return;let n;try{n=JSON.parse(t.slice(26))}catch{return}if(!n||typeof n!=`object`||Array.isArray(n))return;let r=n;if(!(r.code!==`ooxml-insufficient-credit`||!uu(r)))return new du(r)}function pu(e,t,n){let r=fu(e);if(!(!r||r.offeredBytes!==t||r.requiredBytes>n))return r}function mu(e,t,n){if(hu(e))return e.offeredBytes===t&&e.requiredBytes<=n?e.requiredBytes:void 0}function hu(e){return e instanceof du||!!e&&typeof e==`object`&&e.code===`ooxml-insufficient-credit`&&uu(e)}const gu=`OOXML_RESOURCE_LIMIT:`;function _u(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function vu(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return _u(t.archiveEntryCount)&&_u(t.declaredInflatedBytes)&&(t.largestInflatedEntryBytes===void 0||_u(t.largestInflatedEntryBytes))&&_u(t.distinctInflatedBytes)&&_u(t.operationInflatedBytes)}function yu(e){let t;try{t=JSON.parse(new TextDecoder().decode(e))}catch{throw TypeError(`OOXML resource usage checkpoint is not valid JSON`)}if(!vu(t))throw TypeError(`OOXML resource usage checkpoint is invalid`);return t}function bu(e){return e===`docx`||e===`xlsx`||e===`pptx`}function xu(e){return e===`container`||e===`decompression`||e===`parsing`||e===`serialization`||e===`layout`||e===`rendering`||e===`worker`}function Su(e,t){return typeof e==`string`&&e.length>0&&e.length<=t&&!/[\u0000-\u001f\u007f]/u.test(e)}function Cu(e){return Su(e,128)&&/^[a-z0-9][a-z0-9-]*$/u.test(e)}function wu(e){return!Su(e,4096)||e.startsWith(`/`)||e.startsWith(`\\`)||e.includes(`\\`)||e.includes(`?`)||e.includes(`#`)||e.includes(`://`)||/^[a-z]:/iu.test(e)?!1:e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`)}const Tu=new Map([[`archive-entry:declared-inflated-bytes`,{stage:`container`,part:`required`}],[`archive-entry:actual-inflated-bytes`,{stage:`decompression`,part:`required`}],[`archive:entry-count`,{stage:`container`,part:`forbidden`}],[`archive:central-directory-bytes`,{stage:`container`,part:`forbidden`,configurable:!1}],[`archive:distinct-inflated-bytes`,{stage:`decompression`,part:`required`}],[`xml-event:bytes`,{stage:`parsing`,part:`optional`,configurable:!1}],[`xml-context:bytes`,{stage:`parsing`,part:`optional`,configurable:!1}],[`xml-tree:depth`,{stage:`parsing`,part:`optional`,configurable:!1}],[`worksheet-row:projected-bytes`,{stage:`parsing`,part:`optional`,configurable:!1}],[`worksheet-shell:projected-bytes`,{stage:`parsing`,part:`optional`,configurable:!1}]]),Eu=new Set([...Tu.keys()].map(e=>e.slice(0,e.indexOf(`:`)))),Du=new Set([...Tu.keys()].map(e=>e.slice(e.indexOf(`:`)+1)));function Ou(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return!bu(t.format)||!Su(t.operation,256)||!Cu(t.resource)||!Cu(t.metric)||!_u(t.limit)||!_u(t.observed)||typeof t.configurable!=`boolean`||!vu(t.usage)?!1:!(`part`in t)||wu(t.part)}function ku(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;if(!xu(t.stage)||!Ou(t.violation))return!1;let n=t.violation,r=Tu.get(`${n.resource}:${n.metric}`);return r?t.stage!==r.stage||r.configurable===!1&&n.configurable!==!1?!1:r.part===`required`?n.part!==void 0:r.part===`forbidden`?n.part===void 0:!0:!(Eu.has(n.resource)&&Du.has(n.metric))}function Au(e){return{archiveEntryCount:e.archiveEntryCount,declaredInflatedBytes:e.declaredInflatedBytes,...e.largestInflatedEntryBytes===void 0?{}:{largestInflatedEntryBytes:e.largestInflatedEntryBytes},distinctInflatedBytes:e.distinctInflatedBytes,operationInflatedBytes:e.operationInflatedBytes}}function ju(e){if(!ku(e))return;let t=e.violation,n={stage:e.stage,violation:{format:t.format,operation:t.operation,resource:t.resource,metric:t.metric,...t.part===void 0?{}:{part:t.part},limit:t.limit,observed:t.observed,configurable:t.configurable,usage:Au(t.usage)}};return ku(n)?n:void 0}function Mu(e){let t=e.violation;return`OOXML resource limit exceeded${t.part?` for ${t.part}`:``}: ${t.metric} ${t.observed} > ${t.limit}`}function Nu(e){let t=e instanceof Error?e.message:String(e);if(!t.startsWith(gu))return;let n;try{n=JSON.parse(t.slice(21))}catch{return}if(!n||typeof n!=`object`)return;let r=n;if(!(r.code!==`ooxml-resource-limit`||!ku(r.details)))return new D(Mu(r.details),r.details)}function Pu(e){if(e instanceof es)return{message:e.message,errorName:e.name,code:e.code,decodedImage:{metric:e.metric,limit:e.limit,observed:e.observed}};let t=fu(e);if(t)return{message:t.message,errorName:t.name,code:t.code,insufficientCredit:{requiredBytes:t.requiredBytes,offeredBytes:t.offeredBytes}};let n=e instanceof E||e instanceof D?e:Nu(e);if(n instanceof D){let e=ju(n.details);return e?{message:typeof n.message==`string`?n.message:Mu(e),errorName:`OoxmlResourceLimitError`,code:`ooxml-resource-limit`,resourceLimit:e}:{message:`Invalid OOXML resource-limit error payload`,errorName:`Error`}}if(n instanceof E)return{message:typeof n.message==`string`?n.message:String(n.message),errorName:Su(n.name,128)?n.name:`OoxmlError`,...Cu(n.code)?{code:n.code}:{}};let r=e instanceof Error?e.message:String(e);if(typeof r==`string`&&r.startsWith(gu))return{message:`Invalid OOXML resource-limit payload`,errorName:`Error`};let i=e instanceof Error?e:Error(r),a=i;return{message:typeof i.message==`string`?i.message:String(i.message),errorName:Su(i.name,128)?i.name:`Error`,...typeof a.code==`string`?{code:a.code}:{}}}function Fu(e){try{return Pu(e)}catch{return{message:`Worker operation failed with an unreadable error`,errorName:`Error`}}}const Iu=new Set([`encrypted`,`invalid-password`,`unsupported-encryption`,`legacy-binary-format`,`not-ooxml`]);function Lu(e){if(e.code===`ooxml-decoded-image-limit`&&e.decodedImage&&(e.decodedImage.metric===`image-pixels`||e.decodedImage.metric===`active-decoded-bytes`)&&_u(e.decodedImage.limit)&&_u(e.decodedImage.observed)&&e.decodedImage.observed>e.decodedImage.limit)return new es(e.decodedImage.metric,e.decodedImage.limit,e.decodedImage.observed);if(e.code===`ooxml-insufficient-credit`&&uu(e.insufficientCredit))return new du(e.insufficientCredit);if(e.code===`ooxml-resource-limit`&&ku(e.resourceLimit))return new D(e.message,e.resourceLimit);if(e.code&&Iu.has(e.code))return new E(e.code,e.message);let t=e.errorName===`TypeError`?TypeError(e.message):e.errorName===`RangeError`?RangeError(e.message):Error(e.message);return e.errorName&&(t.name=e.errorName),e.code!==void 0&&Object.assign(t,{code:e.code}),t}function Ru(e){return e.byteOffset===0&&e.byteLength===e.buffer.byteLength&&e.buffer instanceof ArrayBuffer?e.buffer:e.slice().buffer}var zu=n({loadMathJaxFromResolvedAsset:()=>Uu,mathMLToSvgFromResolvedAsset:()=>Wu});function Bu(e){return new Promise((t,n)=>{let r=document.createElement(`script`);r.src=e,r.async=!0,r.onload=()=>t(),r.onerror=()=>n(Error(`Failed to load math engine from ${e}`)),document.head.appendChild(r)})}async function Vu(e){await import(e)}function Hu(e){return Gu||(Gu=(async()=>{let t=globalThis.__ooxmlStix2;if(t)return t;let n=new URL(e).href;typeof document>`u`?await Vu(n):await Bu(n);let r=globalThis.__ooxmlStix2;if(!r)throw Error(`Math engine failed to initialize`);return r})(),Gu)}async function Uu(e){await Hu(e)}async function Wu(e,t){let n=(await Hu(t)).mathml2svg(e);return{svg:n,...Il(n)}}var Gu,Ku=t((()=>{zl(),Gu=null}));function qu(e){switch(e){case`cylinder`:case`cone`:case`coneToMax`:case`pyramid`:case`pyramidToMax`:return e;default:return`box`}}function Ju(e,t){if(t.length<3)return null;let n=e[t[0]];for(let r=1;r+1<t.length;r++)for(let i=r+1;i<t.length;i++){let a=e[t[r]],o=e[t[i]],s={x:a.x-n.x,y:a.y-n.y,depth:a.depth-n.depth},c={x:o.x-n.x,y:o.y-n.y,depth:o.depth-n.depth},l={x:s.y*c.depth-s.depth*c.y,y:s.depth*c.x-s.x*c.depth,depth:s.x*c.y-s.y*c.x},u=Math.hypot(l.x,l.y,l.depth);if(u>2**-52)return{x:l.x/u,y:l.y/u,depth:l.depth/u}}return null}function Yu(e,t){let n=e.reduce((t,n)=>({x:t.x+n.x/e.length,y:t.y+n.y/e.length,depth:t.depth+n.depth/e.length}),{x:0,y:0,depth:0});return t.map(t=>{let r=Ju(e,t.indices);if(!r)return t;let i=t.indices.reduce((n,r)=>({x:n.x+e[r].x/t.indices.length,y:n.y+e[r].y/t.indices.length,depth:n.depth+e[r].depth/t.indices.length}),{x:0,y:0,depth:0}),a={x:i.x-n.x,y:i.y-n.y,depth:i.depth-n.depth};return r.x*a.x+r.y*a.y+r.depth*a.depth>=0?t:{...t,indices:[...t.indices].reverse()}})}function Xu(e){let{horizontal:t,crossStart:n,crossSize:r,baseCoord:i,endCoord:a,nearDepth:o,farDepth:s}=e;if(![n,r,i,a,o,s].every(Number.isFinite)||r<=0||i===a||o===s)return null;let c=qu(e.shape),l=c===`cylinder`||c===`cone`||c===`coneToMax`,u=c!==`box`&&c!==`cylinder`,d=c===`coneToMax`||c===`pyramidToMax`,f=l?Math.max(8,Math.min(64,Math.trunc(e.roundSegments??32))):4,p=ed(e.baseScale??(d?e.toMaxBaseScale??1:1)),m=ed(e.endScale??(u?d?e.toMaxEndScale??0:0:1));if(p===0&&m===0)return null;let h=n+r/2,g=r/2,_=(o+s)/2,v=Math.abs(s-o)/2,y=[],b=(e,n)=>{if(n===0){let n=y.length;return y.push(t?{x:e,y:h,depth:_}:{x:h,y:e,depth:_}),[n]}let r=[];for(let i=0;i<f;i++){let a=l?i/f*Math.PI*2:Math.PI/4+i/f*Math.PI*2,o=l?1:Math.SQRT2,s=h+Math.cos(a)*g*n*o,c=_+Math.sin(a)*v*n*o;r.push(y.length),y.push(t?{x:e,y:s,depth:c}:{x:s,y:e,depth:c})}return r},x=b(i,p),S=b(a,m),C=l,w=[];x.length>1&&e.omitBaseCap!==!0&&w.push({indices:x,role:`baseCap`,smoothSurface:C}),S.length>1&&e.omitEndCap!==!0&&w.push({indices:S,role:`endCap`,smoothSurface:C});let T=[],E=Math.max(x.length,S.length);for(let e=0;e<E;e++){let t=(e+1)%E,n=x.length===1?x[0]:x[e],r=x.length===1?x[0]:x[t],i=S.length===1?S[0]:S[e],a=S.length===1?S[0]:S[t],o=x.length===1?[n,a,i]:S.length===1?[n,r,i]:[n,r,a,i];w.push({indices:o,role:`side`,smoothSurface:C,segmentIndex:e,baseRimEdge:x.length>1?[n,r]:void 0,endRimEdge:S.length>1?[i,a]:void 0}),T.push([n,i])}return{shape:c,vertices:y,faces:Yu(y,w),silhouetteEdges:T}}function Zu(e){let{x0:t,x1:n,lower0:r,lower1:i,upper0:a,upper1:o,nearDepth:s,farDepth:c,capStart:l,capEnd:u}=e;if(![t,n,r,i,a,o,s,c].every(Number.isFinite)||t===n||s===c)return null;n<t&&([t,n]=[n,t],[r,i]=[i,r],[a,o]=[o,a],[l,u]=[u,l]);let d=Math.min(s,c),f=Math.max(s,c),p=Math.min(r,a),m=Math.min(i,o),h=Math.max(r,a),g=Math.max(i,o);if(Math.max(h-p,g-m)<1e-9)return null;let _=[{x:t,y:p,depth:d},{x:n,y:m,depth:d},{x:n,y:g,depth:d},{x:t,y:h,depth:d},{x:t,y:p,depth:f},{x:n,y:m,depth:f},{x:n,y:g,depth:f},{x:t,y:h,depth:f}];return{shape:`areaStrip`,vertices:_,faces:Yu(_,[{indices:[0,3,2,1],role:`side`,smoothSurface:!1},{indices:[4,5,6,7],role:`side`,smoothSurface:!1},{indices:[0,4,7,3],role:`baseCap`,smoothSurface:!1},{indices:[1,2,6,5],role:`endCap`,smoothSurface:!1},{indices:[0,1,5,4],role:`side`,smoothSurface:!1},{indices:[3,7,6,2],role:`side`,smoothSurface:!1}].filter(e=>(e.role!==`baseCap`||l)&&(e.role!==`endCap`||u))),silhouetteEdges:[]}}function Qu(e){let t=e.upper0-e.lower0,n=e.upper1-e.lower1;if(Number.isFinite(t)&&Number.isFinite(n)&&t*n<0){let r=t/(t-n),i=e.x0+(e.x1-e.x0)*r,a=e.lower0+(e.lower1-e.lower0)*r;return[Zu({...e,x1:i,lower1:a,upper1:a,capEnd:!1}),Zu({...e,x0:i,lower0:a,upper0:a,capStart:!1})].filter(e=>e!=null)}let r=Zu(e);return r?[r]:[]}function $u(e){let{centerX:t,centerY:n,centerDepth:r,radius:i,modelDepth:a,thickness:o,startAngle:s,endAngle:c}=e;if(![t,n,r,i,a,o,s,c].every(Number.isFinite)||!(i>0)||!(a>0)||!(o>0)||!(c>s))return null;let l=Math.min(Math.PI*2,c-s),u=l>=Math.PI*2-1e-9,d=Math.max(2,Math.min(128,Math.trunc(e.segments??Math.ceil(32*l/(Math.PI*2))))),f=n-o/2,p=n+o/2,m=[{x:t,y:f,depth:r},{x:t,y:p,depth:r}],h=[],g=[],_=u?d:d+1;for(let e=0;e<_;e++){let n=s+l*e/d,o=t+Math.cos(n)*i,c=r+Math.sin(n)*i/a;h.push(m.length),m.push({x:o,y:f,depth:c}),g.push(m.length),m.push({x:o,y:p,depth:c})}let v=u?[{indices:[...h],role:`baseCap`,smoothSurface:!0},{indices:[...g],role:`endCap`,smoothSurface:!0}]:[{indices:[0,...h],role:`baseCap`,smoothSurface:!0},{indices:[1,...g],role:`endCap`,smoothSurface:!0},{indices:[0,1,g[0],h[0]],role:`baseCap`,smoothSurface:!1},{indices:[0,h.at(-1),g.at(-1),1],role:`endCap`,smoothSurface:!1}];for(let e=0;e<d;e++){let t=u?(e+1)%d:e+1;v.push({indices:[h[e],g[e],g[t],h[t]],role:`side`,smoothSurface:!0,segmentIndex:e,baseRimEdge:[h[e],h[t]],endRimEdge:[g[e],g[t]]})}return{shape:`pieSector`,vertices:m,faces:Yu(m,v),silhouetteEdges:h.slice(0,u?void 0:-1).map((e,t)=>[e,g[t]])}}var ed,td=t((()=>{ed=e=>Math.max(0,Math.min(1,e))}));function nd(e,t){if(![e,t].every(Number.isFinite))return null;let n=t-e;if(n===0)return e>=0&&e<=1?{startT:0,endT:1}:null;let r=-e/n,i=(1-e)/n,a=Math.max(0,Math.min(r,i)),o=Math.min(1,Math.max(r,i));return a<=o?{startT:a,endT:o}:null}function rd(e,t,n,r){if(![e,t,n,r].every(Number.isFinite))return[];let i=[0,1],a=(e,t)=>{let n=t-e;if(n!==0)for(let t of[0,1]){let r=(t-e)/n;r>0&&r<1&&Number.isFinite(r)&&i.push(r)}};a(e,t),a(n,r),i.sort((e,t)=>e-t);let o=i.filter((e,t)=>t===0||Math.abs(e-i[t-1])>1e-12),s=(e,t,n)=>e+(t-e)*n,c=e=>Math.max(0,Math.min(1,e)),l=[];for(let i=0;i+1<o.length;i++){let a=o[i],u=o[i+1],d=(a+u)/2,f=c(s(e,t,d)),p=c(s(n,r,d));Math.abs(p-f)<=1e-12||l.push({startT:a,endT:u,lowerStart:c(s(e,t,a)),lowerEnd:c(s(e,t,u)),upperStart:c(s(n,r,a)),upperEnd:c(s(n,r,u))})}return l}function id(e,t,n,r){let i=[],a=e=>{i.length>=12||i.some(t=>Math.hypot(t.x-e.x,t.y-e.y)<1e-7)||i.push(e)},o={x:(Math.max(n.minX,r.minX)+Math.min(n.maxX,r.maxX))/2,y:(Math.max(n.minY,r.minY)+Math.min(n.maxY,r.maxY))/2};cd(e,o)&&cd(t,o)&&a(o);for(let n of e)cd(t,n)&&a(n);for(let n of t)cd(e,n)&&a(n);for(let n=0;n<e.length&&i.length<12;n++)for(let r=0;r<t.length&&i.length<12;r++){let i=ld(e[n],e[(n+1)%e.length],t[r],t[(r+1)%t.length]);i&&a(i)}return i}function ad(e,t){let n=e.cameraDepths;if(!n||n.length!==e.points.length||e.points.length<3)return e.cameraDepth;let r=e.cameraWeights?.length===e.points.length?e.cameraWeights:e.points.map(()=>1),i=e.points[0];for(let a=1;a+1<e.points.length;a++){let o=e.points[a],s=e.points[a+1],c=(o.y-s.y)*(i.x-s.x)+(s.x-o.x)*(i.y-s.y);if(Math.abs(c)<1e-12)continue;let l=((o.y-s.y)*(t.x-s.x)+(s.x-o.x)*(t.y-s.y))/c,u=((s.y-i.y)*(t.x-s.x)+(i.x-s.x)*(t.y-s.y))/c,d=1-l-u;if(Math.min(l,u,d)<-1e-7)continue;let f=l*r[0]+u*r[a]+d*r[a+1];if(Math.abs(f)>2**-52)return(l*n[0]*r[0]+u*n[a]*r[a]+d*n[a+1]*r[a+1])/f}return e.cameraDepth}function od(e){if(e.length<2)return[...e];let t=[...e.keys()].sort((t,n)=>e[t].cameraDepth-e[n].cameraDepth||t-n),n=e.map(e=>sd(e.points)),r=[...e.keys()].sort((e,t)=>n[e].minX-n[t].minX||e-t),i=e.map(()=>new Set),a=e.map(()=>0),o=[],s=0;for(let c of r){for(let e=o.length-1;e>=0;e--)n[o[e]].maxX<n[c].minX-1e-9&&o.splice(e,1);for(let r of o){if(++s>2e5)return t.map(t=>e[t]);if(n[r].maxY<n[c].minY-1e-9||n[c].maxY<n[r].minY-1e-9)continue;let o=id(e[r].points,e[c].points,n[r],n[c]),l=0;for(let t of o){let n=ad(e[r],t)-ad(e[c],t),i=1e-8*Math.max(1,Math.abs(e[r].cameraDepth),Math.abs(e[c].cameraDepth));if(Math.abs(n)<=i)continue;let a=n<0?-1:1;if(l!==0&&l!==a){l=0;break}l=a}if(l===0)continue;let u=l<0?r:c,d=l<0?c:r;i[u].has(d)||(i[u].add(d),a[d]++)}o.push(c)}let c=new Set(e.keys()),l=[];for(;c.size;){let n=t.find(e=>c.has(e)&&a[e]===0);if(n??=t.find(e=>c.has(e)),n==null)break;c.delete(n),l.push(e[n]);for(let e of i[n])a[e]--}return l}var sd,cd,ld,ud=t((()=>{sd=e=>({minX:Math.min(...e.map(e=>e.x)),maxX:Math.max(...e.map(e=>e.x)),minY:Math.min(...e.map(e=>e.y)),maxY:Math.max(...e.map(e=>e.y))}),cd=(e,t)=>{let n=!1;for(let r=0,i=e.length-1;r<e.length;i=r++){let a=e[r],o=e[i],s=(a.x-t.x)*(o.y-t.y)-(a.y-t.y)*(o.x-t.x),c=Math.max(1,Math.abs(a.x),Math.abs(a.y),Math.abs(o.x),Math.abs(o.y));if(Math.abs(s)<=c*1e-9&&t.x>=Math.min(a.x,o.x)-1e-9&&t.x<=Math.max(a.x,o.x)+1e-9&&t.y>=Math.min(a.y,o.y)-1e-9&&t.y<=Math.max(a.y,o.y)+1e-9)return!0;a.y>t.y!=o.y>t.y&&t.x<(o.x-a.x)*(t.y-a.y)/(o.y-a.y)+a.x&&(n=!n)}return n},ld=(e,t,n,r)=>{let i={x:t.x-e.x,y:t.y-e.y},a={x:r.x-n.x,y:r.y-n.y},o=i.x*a.y-i.y*a.x;if(Math.abs(o)<1e-12)return null;let s={x:n.x-e.x,y:n.y-e.y},c=(s.x*a.y-s.y*a.x)/o,l=(s.x*i.y-s.y*i.x)/o;return c<-1e-9||c>1.000000001||l<-1e-9||l>1.000000001?null:{x:e.x+i.x*c,y:e.y+i.y*c}}}));function dd(e,t,n=0){let r=t.filter(e=>Number.isFinite(e)&&e>md);if(r.length===0)return e.length>=2?[[...e]]:[];r.length%2==1&&r.push(...r);let i=[],a=0,o=r[0],s=!0,c=r.reduce((e,t)=>e+t,0),l=c>md&&Number.isFinite(n)?(n%c+c)%c:0;for(;l>md;){let e=Math.min(l,o);l-=e,o-=e,o<=md&&(a=(a+1)%r.length,o=r[a],s=a%2==0)}let u=null;for(let t=0;t+1<e.length;t++){let n=e[t],c=e[t+1],l=Math.hypot(c.x-n.x,c.y-n.y);if(!(l>md))continue;let d=0;for(;d<l-md;){let e=Math.min(o,l-d),t=gd(n,c,d/l),f=gd(n,c,(d+e)/l);if(s&&(u??=[],(u.length===0||!_d(u.at(-1),t))&&u.push(t),u.push(f)),d+=e,o-=e,o<=md){if(s&&u&&u.length>=2){if(i.length>=1e4)return null;i.push(u)}u=null,a=(a+1)%r.length,o=r[a],s=a%2==0}}}if(s&&u&&u.length>=2){if(i.length>=1e4)return null;i.push(u)}if(i.length>1&&_d(e[0],e.at(-1))&&_d(i[0][0],e[0])&&_d(i.at(-1).at(-1),e.at(-1))){let e=i.shift(),t=i.pop();i.unshift([...t,...e.slice(1)])}return i}function fd(e,t,n){let r=Number.isFinite(n.width)?Math.max(0,n.width):0;if(!(r>md)||t.length<3)return null;let i=r/2;if((n.lineJoin??`miter`)===`round`)return yd(e,i,`join`);let a=[];for(let n of t){let t=n.x-e.x,r=n.y-e.y,o=Math.hypot(t,r);if(!(o>md))continue;let s=-r/o*i,c=t/o*i;a.push({...e,x:e.x+s,y:e.y+c},{...e,x:e.x-s,y:e.y-c})}if(a.length<3)return null;a.sort((e,t)=>e.x-t.x||e.y-t.y);let o=(e,t,n)=>(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),s=[];for(let e of a){for(;s.length>=2&&o(s.at(-2),s.at(-1),e)<=md;)s.pop();s.push(e)}let c=[];for(let e of[...a].reverse()){for(;c.length>=2&&o(c.at(-2),c.at(-1),e)<=md;)c.pop();c.push(e)}let l=[...s.slice(0,-1),...c.slice(0,-1)];return l.length>=3?vd(`join`,l):null}function pd(e,t){let n=Number.isFinite(t.width)?Math.max(0,t.width):0;if(!(n>md)||e.length<2)return[];let r=n/2,i=t.lineCap??`butt`,a=t.lineJoin??`miter`,o=Math.max(1,t.miterLimit??10),s=[],c=dd(e,t.dash??[],t.dashOffset);if(c==null)return null;let l=e=>s.length>=1e4?!1:(s.push(e),!0);for(let n=0;n<c.length;n++){let s=c[n],u=s.length>2&&_d(s[0],s.at(-1)),d=n===0&&_d(s[0],e[0])?t.startCap??i:i,f=n+1===c.length&&_d(s.at(-1),e.at(-1))?t.endCap??i:i,p=[];for(let e=0;e+1<s.length;e++){let t=s[e],n=s[e+1],r=Math.hypot(n.x-t.x,n.y-t.y);p.push(r>md?{x:(n.x-t.x)/r,y:(n.y-t.y)/r}:null)}for(let e=0;e+1<s.length;e++){let n=p[e];if(!n)continue;let i={x:-n.y*r,y:n.x*r},a=e===0,o=e+2===s.length,c=Math.min(.5,r/2),m=u||!a||t.overlapStart===!0,h=u||!o||t.overlapEnd===!0,g=!u&&a&&d===`square`?r:m?c:0,_=!u&&o&&f===`square`?r:h?c:0,v={...s[e],x:s[e].x-n.x*g,y:s[e].y-n.y*g},y={...s[e+1],x:s[e+1].x+n.x*_,y:s[e+1].y+n.y*_};if(!l(vd(`segment`,[{...v,x:v.x+i.x,y:v.y+i.y},{...y,x:y.x+i.x,y:y.y+i.y},{...y,x:y.x-i.x,y:y.y-i.y},{...v,x:v.x-i.x,y:v.y-i.y}])))return null}if(!u&&d===`round`&&!l(yd(s[0],r,`cap`))||!u&&f===`round`&&!l(yd(s.at(-1),r,`cap`)))return null;let m=(e,t,n)=>{if(!t||!n)return!0;let i=t.x*n.y-t.y*n.x;if(Math.abs(i)<=md)return!0;if(a===`round`)return l(yd(e,r,`join`));let s=i>0?-1:1,c={...e,x:e.x+-t.y*r*s,y:e.y+t.x*r*s},u={...e,x:e.x+-n.y*r*s,y:e.y+n.x*r*s};if(a===`miter`){let i=bd(c,t,u,n);if(i&&Math.hypot(i.x-e.x,i.y-e.y)<=r*o)return!!l(vd(`join`,[c,{...e,...i},u]))}return l(vd(`join`,[c,e,u]))};for(let e=1;e+1<s.length;e++)if(!m(s[e],p[e-1],p[e]))return null;if(u&&!m(s[0],p.at(-1)??null,p[0]??null))return null}return s}var md,hd,gd,_d,vd,yd,bd,xd=t((()=>{md=1e-9,hd=1e4,gd=(e,t,n)=>({x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n,cameraDepth:e.cameraDepth+(t.cameraDepth-e.cameraDepth)*n,cameraWeight:(e.cameraWeight??1)+((t.cameraWeight??1)-(e.cameraWeight??1))*n}),_d=(e,t)=>Math.hypot(e.x-t.x,e.y-t.y)<=md,vd=(e,t)=>({kind:e,points:t.map(({x:e,y:t})=>({x:e,y:t})),cameraDepths:t.map(e=>e.cameraDepth),cameraWeights:t.map(e=>e.cameraWeight??1),cameraDepth:t.reduce((e,t)=>e+t.cameraDepth,0)/t.length}),yd=(e,t,n)=>{let r=[];for(let n=0;n<12;n++){let i=Math.PI*2*n/12;r.push({...e,x:e.x+Math.cos(i)*t,y:e.y+Math.sin(i)*t})}return vd(n,r)},bd=(e,t,n,r)=>{let i=t.x*r.y-t.y*r.x;if(Math.abs(i)<=md)return null;let a={x:n.x-e.x,y:n.y-e.y},o=(a.x*r.y-a.y*r.x)/i;return{x:e.x+t.x*o,y:e.y+t.y*o}}}));function Sd(e){let t=[...e].reverse();return Od(e,t)<=0?e:t}function Cd(e){let t=Ed(e[0],e.at(-1))?e.slice(0,-1):[...e];if(t.length===0)return[];let n=0;for(let e=1;e<t.length;e++)Dd(t[e],t[n])<0&&(n=e);let r=t.map((e,r)=>t[(n+r)%t.length]),i=t.map((e,r)=>t[(n-r+t.length)%t.length]),a=Od(r,i)<=0?r:i;return[...a,a[0]]}function wd(e){let t=[],n=e=>{let n=t.find(t=>Ed(t.point,e));if(n)return Dd(e,n.point)<0&&(n.point=e),n;let r={point:e,edges:[],order:-1};return t.push(r),r},r=[];for(let[t,i]of e){if(Ed(t,i))continue;let e=n(t),a=n(i);e!==a&&r.push([e,a])}t.sort((e,t)=>Dd(e.point,t.point)),t.forEach((e,t)=>{e.order=t});let i=[],a=new Set;for(let[e,t]of r){let n=e.order<t.order?e:t,r=e.order<t.order?t:e,o=`${n.order}:${r.order}`;a.has(o)||(a.add(o),i.push({first:n,second:r,key:o}))}i.sort((e,t)=>e.key.localeCompare(t.key)),i.forEach((e,t)=>{e.first.edges.push(t),e.second.edges.push(t)});for(let e of t)e.edges.sort((e,t)=>e-t);let o=new Set,s=(e,t)=>{let n=[e.point],r=e,a=t;for(;!o.has(a);){o.add(a);let e=i[a],t=e.first===r?e.second:e.first;if(n.push(t.point),t.edges.length!==2)break;let s=t.edges.find(e=>!o.has(e));if(s===void 0)break;r=t,a=s}return n},c=[];for(let e of t)if(e.edges.length!==2)for(let t of e.edges)o.has(t)||c.push(Sd(s(e,t)));for(let e=0;e<i.length;e++){if(o.has(e))continue;let t=i[e],n=t.first.order<=t.second.order?t.first:t.second;c.push(Cd(s(n,e)))}let l=t.filter(e=>e.edges.length>2).map(e=>({point:e.point,neighbours:e.edges.map(t=>{let n=i[t];return n.first===e?n.second.point:n.first.point}).sort(Dd)}));return{paths:c.sort(Od),junctions:l}}var Td,Ed,Dd,Od,kd=t((()=>{Td=1e-9,Ed=(e,t)=>Math.hypot(e.x-t.x,e.y-t.y,e.depth-t.depth)<=Td,Dd=(e,t)=>e.x-t.x||e.y-t.y||e.depth-t.depth,Od=(e,t)=>{let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let n=Dd(e[r],t[r]);if(n!==0)return n}return e.length-t.length}})),Ad=n({THREE_D_IMPLEMENTATION_MARKER:()=>vf,THREE_D_ROUND_MESH_FACE_WEIGHT:()=>xf,bucketThreeDStackItems:()=>Md,renderSimpleThreeDChart:()=>_f,threeDMeshOutlineWidthPx:()=>jd,threeDPieSliceAngles:()=>tf,threeDWallGeometry:()=>nf});function jd(e,t){let n=Number.isFinite(t)&&t>0?t/tt:1,r=Number.isFinite(e)&&e>=0?e/et:0;return Math.max(.25,r)*n}function Md(e,t){let n=Number.isSafeInteger(t)&&t>0?t:0,r=Array.from({length:n},()=>[]);for(let t of e){let e=t.categoryIndex;Number.isSafeInteger(e)&&e>=0&&e<n&&r[e].push(t)}return r}function Nd(e,t){if(t?.lineHidden!=null||t?.lineColor!=null||t?.lineWidthEmu!=null||t?.lineDash!=null)return t.lineHidden!==!0;let n=e.chartexStyle;return(e.lineHidden!=null||e.lineColor!=null||e.lineWidthEmu!=null||n?.lineHidden!=null||n?.lineNoStyle!=null||n?.lineColors!=null||n?.lineWidthEmu!=null||n?.lineDash!=null||n?.lineCap!=null||n?.lineJoin!=null)&&e.lineHidden!==!0&&n?.lineHidden!==!0}function Pd(e,t){let n=e.cameraNormal(t);if(!n)return 1;let r={x:-.2,y:.25,z:1},i=Math.hypot(r.x,r.y,r.z),a=Math.max(0,(n.x*r.x+n.y*r.y+n.z*r.z)/i);return Math.max(.78,Math.min(1,.78+.24*a))}function Fd(e,t){if(t.length){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(let n=1;n<t.length;n++)e.lineTo(t[n].x,t[n].y);e.closePath()}}function Id(e,t,n,r){Tf(n)||(Fd(e,t),e.fillStyle=n,e.fill(),r>0&&(Fd(e,t),e.fillStyle=`rgba(0,0,0,${r})`,e.fill()))}function Ld(e,t,n,r,i,a,o,s,c,l,u,d){return Qu({x0:t,x1:n,lower0:r,lower1:i,upper0:a,upper1:o,nearDepth:s,farDepth:c,capStart:u,capEnd:d}).flatMap(t=>zd(e,t,l).map(e=>({...e,outline:!1,outlineSegments:void 0})))}function Rd(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m=!1,h=!1,g,_){if(![r,i,a,o,s,c,l,u].every(Number.isFinite)||a<=0||o<=0||s===c)return[];let v=Xu({shape:t,horizontal:n,crossStart:n?i:r,crossSize:n?o:a,baseCoord:s,endCoord:c,nearDepth:l,farDepth:u,baseScale:f,endScale:p,omitBaseCap:m,omitEndCap:h});return v?zd(e,v,d,g,_):[]}function zd(e,t,n,r,i,a=!1){if(i?.exceeded)return[];let o=t.faces.map(r=>{let i=r.indices.map(e=>t.vertices[e]),a=e.cameraFacing(i);if(!a)return{meshFace:r,facing:a,face:null};let o=i.map(t=>e.project(t.x,t.y,t.depth)),s=o.reduce((e,t,n)=>{let r=o[(n+1)%o.length];return e+t.x*r.y-t.y*r.x},0);return!Number.isFinite(s)||Math.abs(s)<1e-7?{meshFace:r,facing:a,face:null}:{meshFace:r,facing:a,face:{points:o,color:Un(n,Pd(e,i)),shade:0,cameraDepth:i.reduce((t,n)=>t+e.cameraDepth(n.x,n.y,n.depth),0)/i.length,cameraDepths:i.map(t=>e.cameraDepth(t.x,t.y,t.depth)),cameraWeights:i.map(t=>e.cameraProjectionWeight(t.x,t.y,t.depth)),outline:!1}}}),s=a?[]:o.map(e=>e.face).filter(e=>e!=null);if(i){if(s.length>i.remaining)return i.exceeded=!0,[];i.remaining-=s.length}let c=new Map,l=(e,t)=>{if(e===t)return;let n=e<t?`${e}:${t}`:`${t}:${e}`;c.has(n)||c.set(n,[e,t])};for(let e of o){if(!e.facing||!e.face)continue;let{indices:t,smoothSurface:n,role:r}=e.meshFace;if(!(n&&r===`side`))for(let e=0;e<t.length;e++)l(t[e],t[(e+1)%t.length])}let u=o.filter(e=>e.meshFace.role===`side`).sort((e,t)=>(e.meshFace.segmentIndex??0)-(t.meshFace.segmentIndex??0));if(t.silhouetteEdges.length===u.length&&u.length>0)for(let e=0;e<u.length;e++){let n=u[(e+u.length-1)%u.length],r=u[e];if(n.facing===r.facing||!(r.facing?r.face:n.face))continue;let[i,a]=t.silhouetteEdges[e];l(i,a)}let d=o.some(e=>e.meshFace.role===`baseCap`&&e.facing&&e.face!=null),f=o.some(e=>e.meshFace.role===`endCap`&&e.facing&&e.face!=null);for(let e of u){if(!e.facing||!e.face)continue;let t=[d?void 0:e.meshFace.baseRimEdge,f?void 0:e.meshFace.endRimEdge].filter(e=>e!=null);for(let[e,n]of t)l(e,n)}let p=wd([...c.values()].map(([e,n])=>[t.vertices[e],t.vertices[n]]));if(!r)return s;let m=(e,t)=>Math.hypot(e.x-t.x,e.y-t.y,e.depth-t.depth)<=1e-9,h=e=>p.junctions.some(t=>m(t.point,e));for(let t of p.paths){let n=t.map(t=>e.project(t.x,t.y,t.depth)),a=t.map(t=>e.cameraDepth(t.x,t.y,t.depth)),o=t.map(t=>e.cameraProjectionWeight(t.x,t.y,t.depth)),c=pd(n.map((e,t)=>({...e,cameraDepth:a[t],cameraWeight:o[t]})),{width:r.width,dash:r.dash,lineCap:r.cap,startCap:h(t[0])?`butt`:r.cap,endCap:h(t.at(-1))?`butt`:r.cap,overlapStart:h(t[0]),overlapEnd:h(t.at(-1)),lineJoin:r.join});if(!c||i&&c.length>i.remaining)return i&&(i.exceeded=!0),[];i&&(i.remaining-=c.length),s.push(...c.map(e=>{let t=1e-6*Math.max(1,Math.abs(e.cameraDepth));return{points:e.points,color:r.color,shade:0,cameraDepth:e.cameraDepth+t,cameraDepths:e.cameraDepths?.map(e=>e+t),cameraWeights:e.cameraWeights,outline:!1}}))}for(let t of p.junctions){let n=fd({...e.project(t.point.x,t.point.y,t.point.depth),cameraDepth:e.cameraDepth(t.point.x,t.point.y,t.point.depth),cameraWeight:e.cameraProjectionWeight(t.point.x,t.point.y,t.point.depth)},t.neighbours.map(t=>({...e.project(t.x,t.y,t.depth),cameraDepth:e.cameraDepth(t.x,t.y,t.depth),cameraWeight:e.cameraProjectionWeight(t.x,t.y,t.depth)})),{width:r.width,lineJoin:r.join});if(!n)continue;if(i&&i.remaining<1)return i.exceeded=!0,[];i&&--i.remaining;let a=1e-6*Math.max(1,Math.abs(n.cameraDepth));s.push({points:n.points,color:r.color,shade:0,cameraDepth:n.cameraDepth+a,cameraDepths:n.cameraDepths?.map(e=>e+a),cameraWeights:n.cameraWeights,outline:!1})}return s}function Bd(e,t,n,r,i,a,o){if(!t.length||o.exceeded)return[];let s=[...t].sort((e,t)=>e.start-t.start),c=n-i/2,l=n+i/2,u=s[0],d=e.cameraDepth(u.centerX,c,u.centerDepth)>=e.cameraDepth(u.centerX,l,u.centerDepth)?c:l,f=d===c?l:c,p=(t,n,i)=>({x:t.centerX+Math.cos(n)*r,y:i,depth:t.centerDepth+Math.sin(n)*r/e.modelDepth}),m=e=>({x:e.centerX,y:d,depth:e.centerDepth}),h=[],g=(t,n=!1)=>{if(t.length<2||o.exceeded)return;let r=t[0],i=t.at(-1),s=Math.hypot(r.x-i.x,r.y-i.y,r.depth-i.depth)<=1e-9,c=pd((n&&!s?[...t,r]:[...t]).map(t=>({...e.project(t.x,t.y,t.depth),cameraDepth:e.cameraDepth(t.x,t.y,t.depth),cameraWeight:e.cameraProjectionWeight(t.x,t.y,t.depth)})),{width:a.width,dash:a.dash,lineCap:a.cap,startCap:`butt`,endCap:`butt`,lineJoin:a.join});if(!c||c.length>o.remaining){o.exceeded=!0;return}o.remaining-=c.length;for(let e of c){let t=1e-6*Math.max(1,Math.abs(e.cameraDepth));h.push({points:e.points,color:a.color,shade:0,cameraDepth:e.cameraDepth+t,cameraDepths:e.cameraDepths?.map(e=>e+t),cameraWeights:e.cameraWeights,outline:!1})}},_=[],v=[],y=[],b=new Set,x=e=>{let t=Math.PI*2,n=(e%t+t)%t;return(n<1e-8||t-n<1e-8?0:n).toFixed(8)},S=new Map;for(let t of s){S.set(x(t.start),{slice:t,angle:t.start}),S.set(x(t.end),{slice:t,angle:t.end});for(let n=0;n<=t.segments;n++){let r=t.start+(t.end-t.start)*n/t.segments,i=p(t,r,d);if((!_.length||Math.hypot(_.at(-1).x-i.x,_.at(-1).y-i.y,_.at(-1).depth-i.depth)>1e-9)&&_.push(i),n===t.segments)continue;let a=t.start+(t.end-t.start)*(n+1)/t.segments,o=p(t,r,c),s=p(t,r,l),u=p(t,a,l),m=p(t,a,c);if(e.cameraFacing([o,s,u,m])){let e=p(t,r,f),n=p(t,a,f);y.length||y.push(e),y.push(n),b.add(x(r)),b.add(x(a))}else y.length&&(v.push(y),y=[])}}if(y.length&&v.push(y),v.length>1){let e=v[0],t=v.at(-1),n=e[0],r=t.at(-1);Math.hypot(n.x-r.x,n.y-r.y,n.depth-r.depth)<=1e-9&&(v[0]=[...t,...e.slice(1)],v.pop())}g(_,!0);let C=new Map;for(let{slice:e,angle:t}of S.values())g([m(e),p(e,t,d)]),b.has(x(t))&&C.set(x(t),{slice:e,angle:t});for(let t of v){g(t);for(let n of[t[0],t.at(-1)]){let t=Math.atan2((n.depth-u.centerDepth)*e.modelDepth,n.x-u.centerX);C.set(x(t),{slice:u,angle:t})}}for(let{slice:e,angle:t}of C.values())g([p(e,t,d),p(e,t,f)]);return h}function Vd(e,t){Id(e,t.points,t.color,t.shade),t.outline&&(e.strokeStyle=t.outlineColor??`rgba(0,0,0,0.42)`,e.lineWidth=t.outlineWidth??.75,e.setLineDash(On(t.outlineDash??`solid`,e.lineWidth)),e.lineCap=t.outlineCap??`butt`,e.lineJoin=t.outlineJoin??`miter`,t.outline&&(Fd(e,t.points),e.stroke()),e.setLineDash([]))}function Hd(e,t,n){t.points.length<3||Tf(n)||(Fd(e,t.points),e.fillStyle=n,e.fill())}function Ud(e,t){e.fillStyle=`#888`,e.font=`12px sans-serif`,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(`(too many data points)`,t.x+t.w/2,t.y+t.h/2)}function Wd(e){let t=e.catAxisLabelRotation;return t==null?null:!Number.isFinite(t)||Math.abs(t)>54e5?0:t/6e4*Math.PI/180}function Gd(e,t,n,r,i,a=1,o=6){if(i||r===0){e.textAlign=i?`right`:`center`,e.textBaseline=i?`middle`:a<0?`bottom`:`top`,e.fillText(t,n.x+(i?-o:0),n.y+(i?0:a*o));return}e.save(),e.translate(n.x,n.y+a*o),e.rotate(r),e.textAlign=a<0?`left`:`right`,e.textBaseline=`middle`,e.fillText(t,0,0),e.restore()}function Kd(e,t,n,r,i,a,o){if(!(r>0)||!Number.isFinite(t.x)||!Number.isFinite(t.y))return;let s=r/2;switch(e.beginPath(),n){case`square`:e.rect(t.x-s,t.y-s,r,r);break;case`diamond`:e.moveTo(t.x,t.y-s),e.lineTo(t.x+s,t.y),e.lineTo(t.x,t.y+s),e.lineTo(t.x-s,t.y),e.closePath();break;case`triangle`:e.moveTo(t.x,t.y-s),e.lineTo(t.x+s,t.y+s),e.lineTo(t.x-s,t.y+s),e.closePath();break;case`x`:case`plus`:case`dash`:{if(n===`dash`){e.moveTo(t.x-s,t.y),e.lineTo(t.x+s,t.y),e.strokeStyle=a,e.lineWidth=o,e.stroke();return}let r=n===`x`;e.moveTo(t.x-s,t.y+(r?-s:0)),e.lineTo(t.x+s,t.y+(r?s:0)),e.moveTo(t.x+(r?-s:0),t.y+s),e.lineTo(t.x+(r?s:0),t.y-s),e.strokeStyle=a,e.lineWidth=o,e.stroke();return}case`star`:for(let n=0;n<10;n++){let r=-Math.PI/2+n*Math.PI/5,i=n%2==0?s:s*.4,a=t.x+Math.cos(r)*i,o=t.y+Math.sin(r)*i;n?e.lineTo(a,o):e.moveTo(a,o)}e.closePath();break;case`dot`:e.arc(t.x,t.y,Math.max(1,s*.35),0,Math.PI*2);break;case`picture`:return;default:e.arc(t.x,t.y,s,0,Math.PI*2);break}i!==`transparent`&&(e.fillStyle=i,e.fill()),e.strokeStyle=a,e.lineWidth=o,e.stroke()}function qd(e,t,n,r,i,a,o,s,c,l=0,u,d,f=`t`,p=o,m=!0,h){let g=d;if(g?.deleted)return;let _=n.seriesDataLabels,v=g?.showVal??_?.showVal??t.showDataLabels,y=g?.showCatName??_?.showCatName??!1,b=g?.showSerName??_?.showSerName??!1,x=g?.showPercent??_?.showPercent??!1,S=g?.text,C=an({customText:S,showCategory:y,showSeries:b,showValue:v,showPercent:x,category:n.categories?.[i]??t.categories[i]??`${i+1}`,seriesName:n.name||`Series ${r+1}`,sourceValue:a,valueDivisor:h?.divisor,percentRatio:u!=null&&Number.isFinite(u)?u:void 0,formatCode:g?.formatCode??_?.formatCode??t.dataLabelFormatCode??n.valFormatCode,percentFormatCode:g?.formatCode??_?.formatCode??t.dataLabelFormatCode??`0%`,date1904:t.date1904,separator:g?.separator??_?.separator});if(!C)return;let w=he(g?.fontSizeHpt??_?.fontSizeHpt??t.dataLabelFontSizeHpt,c)??9*c,T=g?.fontBold??_?.fontBold??t.dataLabelFontBold??!1,E=wf(t,g?.fontFace??_?.fontFace??t.dataLabelFontFace);e.font=`${T?`bold `:``}${w}px ${E}`;let D=`#${g?.fontColor??_?.fontColor??n.labelColor??t.dataLabelFontColor??`111111`}`,O=S&&g?.richRuns?.length?Qt(e,{runs:g.richRuns,ptToPx:c,fontFamily:E,fallbackBold:T,fontFamilyForFace:e=>wf(t,e)},w,D):null,k=O?[]:hn(C,Math.max(w,s.w*.45),Math.max(w*1.2,s.h*.35),w*1.2,t=>e.measureText(t).width);if(!O&&!k.length)return;let A=O?.width??Math.max(...k.map(t=>e.measureText(t).width)),j=O?.height??k.length*w*1.2,M=fn({kind:`point`,x:o.x,y:o.y,position:g?.position??_?.position??t.dataLabelPosition??f,markerGap:l},s,{w:A,h:j},w,g?.manualLayout,s);if(!M)return;let N=g?.labelBox??_?.labelBox;if(_?.showLeaderLines&&m&&(e.beginPath(),e.moveTo(p.x,p.y),e.lineTo(Math.max(M.rect.x,Math.min(p.x,M.rect.x+M.rect.w)),Math.max(M.rect.y,Math.min(p.y,M.rect.y+M.rect.h))),e.strokeStyle=`#${_.leaderLineColor??`808080`}`,e.lineWidth=_.leaderLineWidthEmu==null?.75*c:Math.max(.25,_.leaderLineWidthEmu/et*c),e.stroke()),N&&(N.fill&&(e.fillStyle=`#${N.fill}`,e.fillRect(M.rect.x,M.rect.y,M.rect.w,M.rect.h)),N.borderColor&&(e.strokeStyle=`#${N.borderColor}`,e.lineWidth=N.borderWidthEmu==null?.75*c:Math.max(.25,N.borderWidthEmu/et*c),e.strokeRect(M.rect.x,M.rect.y,M.rect.w,M.rect.h))),e.save(),e.beginPath(),e.rect(M.clip.x,M.clip.y,M.clip.w,M.clip.h),e.clip(),O){$t(e,O,M.x,M.y,M.textAlign,M.textBaseline),e.restore();return}e.fillStyle=D,e.textAlign=M.textAlign,e.textBaseline=`middle`;let P=w*1.2,F=M.y-(k.length-1)*P/2;k.forEach((t,n)=>e.fillText(t,M.x,F+n*P)),e.restore()}function Jd(e,t,n){if(n?.deleted)return!1;if(n?.text)return!0;let r=t.seriesDataLabels;return(n?.showVal??r?.showVal??e.showDataLabels)||(n?.showCatName??r?.showCatName??!1)||(n?.showSerName??r?.showSerName??!1)||(n?.showPercent??r?.showPercent??!1)}function Yd(e,t,n,r,i){let a=Ce(t,n.h,r);if(t.title){e.font=`${t.titleFontBold===!1?``:`bold `}${a.fontPx}px ${Cf(t.titleFontFace)}`,e.fillStyle=t.titleFontColor?`#${t.titleFontColor}`:`#111111`,e.textAlign=`center`,e.textBaseline=`top`;let r=e.measureText(t.title).width,i={x:n.x+(n.w-r)/2,y:n.y+a.topPad,w:r,h:Math.max(1,a.fontPx)},o=t.titleManualLayout?Oe({...t.titleManualLayout,w:void 0,h:void 0},n,i):null;e.fillText(t.title,o?o.x+o.w/2:n.x+n.w/2,o?.y??i.y)}let o=he(t.legendFontSizeHpt,r)??9*r;e.save(),e.font=`${t.legendFontBold?`bold `:``}${o}px ${Cf(t.legendFontFace)}`;let s=t.chartType===`pie`?t.series[0]?.categories?.length?t.series[0].categories:t.categories:t.series.map((e,t)=>e.name||`Series ${t+1}`),c=ve(t,n.w,n.h,.23,{itemWidths:s.map(t=>7*r+4+e.measureText(t).width),rowHeight:Math.max(o*1.45,12),itemGap:12,horizontalPadding:8,verticalPadding:4});e.restore();let l=ye(c),u=Se(t,n.w,n.h,r),d=i===`horizontal`?t.catAxisTitle?u.catFontPx+X(n.w)+4:0:i===`vertical`?u.valBandW:0,f=i===`horizontal`?t.valAxisTitle?u.valFontPx+X(n.h)+4:0:i===`vertical`?u.catBandH:0,p=ke(t,n.x,n.y,n.w,n.h,r,{titleBand:a,legendSideReserveFrac:.23,legendReserve:c,pad:{t:a.bandH+l.legTopH+n.h*.04,r:l.legRightW+n.w*.05,b:l.legBottomH+n.h*.19+f,l:l.legLeftW+n.w*.13+d},honorPlotAreaManualLayout:!0,manualOuterInsets:{t:a.bandH,r:l.legRightW,b:l.legBottomH+f,l:l.legLeftW+d}}),m={x:p.plotRect.px0,y:p.plotRect.py0,w:Math.max(1,p.plotRect.pw),h:Math.max(1,p.plotRect.ph)},h=c?c.side===`r`?{x:n.x+n.w-c.reserveW,y:m.y,w:c.reserveW,h:m.h}:c.side===`l`?{x:n.x,y:m.y,w:c.reserveW,h:m.h}:c.side===`t`?{x:n.x+4,y:n.y+a.bandH,w:Math.max(1,n.w-8),h:c.reserveH}:{x:n.x+4,y:n.y+n.h-c.reserveH,w:Math.max(1,n.w-8),h:c.reserveH}:null;return{plot:m,legend:(h&&t.legendManualLayout?Oe(t.legendManualLayout,n,h):null)??h}}function Xd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.save(),e.font=`${l?`italic `:``}${c?`bold `:``}${a}px ${o}`,e.fillStyle=s?`#${s}`:`#555`;let m=f?t:Ot(e,t,p),h=xe(i,u,d),g=r;if(f){let t=e.measureText(m).width,i=Math.abs(Math.cos(h)),o=Math.abs(Math.sin(h)),s={x:r.x-(t*i+a*o)/2,y:r.y-(t*o+a*i)/2,w:t*i+a*o,h:t*o+a*i},c=Oe({...f,w:void 0,h:void 0},n,s);c&&(g={x:c.x+c.w/2,y:c.y+c.h/2})}e.translate(g.x,g.y),h&&e.rotate(h),e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(m,0,0),e.restore()}function Zd(e,t,n,r,i,a){if(t.valAxisTitle){let o=be(t.valAxisTitleFontSizeHpt,a),s=i?`horizontal`:`left`;Xd(e,t.valAxisTitle,n,i?{x:r.x+r.w/2,y:r.y+r.h+X(n.h)+o/2}:{x:r.x-X(n.w)-o/2,y:r.y+r.h/2},s,o,wf(t,t.valAxisTitleFontFace,`major`),t.valAxisTitleFontColor,t.valAxisTitleFontBold??!0,t.valAxisTitleFontItalic??!1,t.valAxisTitleRotation,t.valAxisTitleVerticalMode,t.valAxisTitleManualLayout,i?r.w:r.h)}if(t.catAxisTitle){let o=be(t.catAxisTitleFontSizeHpt,a),s=i?`left`:`horizontal`;Xd(e,t.catAxisTitle,n,i?{x:r.x-X(n.w)-o/2,y:r.y+r.h/2}:{x:r.x+r.w/2,y:r.y+r.h+X(n.h)+o/2},s,o,wf(t,t.catAxisTitleFontFace,`major`),t.catAxisTitleFontColor,t.catAxisTitleFontBold??!0,t.catAxisTitleFontItalic??!1,t.catAxisTitleRotation,t.catAxisTitleVerticalMode,t.catAxisTitleManualLayout,i?r.h:r.w)}}function Qd(e,t,n,r,i,a,o,s,c,l){let u=t.threeD?.seriesAxis;if(!u||u.hidden||t.threeD?.barGrouping!==`standard`||t.series.length===0)return;let d=pf(t,r,i,a,o,s,c),f=nf(r),p=c===`vertical`?f.seriesAxisX:d.axisX,m=c===`horizontal`?f.floorY===r.front.y?r.front.y+r.front.h:r.front.y:f.floorY,h=r.project(p,m,r.topology.nearDepth),g=r.project(p,m,r.topology.farDepth),_=Math.hypot(g.x-h.x,g.y-h.y);if(!(_>1e-6))return;let v={x:(g.x-h.x)/_,y:(g.y-h.y)/_},y={x:-v.y,y:v.x},b=r.project(r.front.x+r.front.w/2,r.front.y+r.front.h/2,.5),x={x:(h.x+g.x)/2,y:(h.y+g.y)/2};(x.x-b.x)*y.x+(x.y-b.y)*y.y<0&&(y={x:-y.x,y:-y.y}),(u.tickLabelPos===`low`&&y.y<0||u.tickLabelPos===`high`&&y.y>0)&&(y={x:-y.x,y:-y.y}),u.lineHidden||(af(e,rf(u.lineColor,u.lineWidthEmu,null,l,`898989`,1)),e.beginPath(),e.moveTo(h.x,h.y),e.lineTo(g.x,g.y),e.stroke());let S=Math.max(1,Math.floor(u.tickMarkSkip??1)),C=Math.max(1,Math.floor(u.tickLabelSkip??1)),w=u.majorTickMark??`out`,T=he(u.fontSizeHpt,l)??9*l;e.font=`${u.fontItalic?`italic `:``}${u.fontBold?`bold `:``}${T}px ${wf(t,u.fontFace)}`,e.fillStyle=u.fontColor?`#${u.fontColor}`:`#595959`,e.textAlign=Math.abs(y.x)<.2?`center`:y.x<0?`right`:`left`,e.textBaseline=Math.abs(y.y)<.2?`middle`:y.y<0?`bottom`:`top`;for(let n=0;n<t.series.length;n++){let i=r.seriesDepth(n,t.series.length,!1),a=u.orientation===`maxMin`?1-i:i,o=r.project(p,m,a);if(!u.lineHidden&&n%S===0&&w!==`none`){let t=6*l,n=w===`cross`?t/2:w===`out`?t:0,r=w===`cross`?t/2:w===`in`?t:0;e.beginPath(),e.moveTo(o.x+y.x*n,o.y+y.y*n),e.lineTo(o.x-y.x*r,o.y-y.y*r),e.stroke()}u.tickLabelPos!==`none`&&n%C===0&&e.fillText(t.series[n].name||`Series ${n+1}`,o.x+y.x*(6*l+3),o.y+y.y*(6*l+3))}if(e.setLineDash([]),u.title){let i=be(u.titleFontSizeHpt,l);Xd(e,u.title,n,{x:x.x+y.x*(T+i+12),y:x.y+y.y*(T+i+12)},`horizontal`,i,wf(t,u.titleFontFace,`major`),u.titleFontColor,u.titleFontBold??!0,u.titleFontItalic??!1,u.titleRotation,u.titleVerticalMode,u.titleManualLayout,Math.max(r.front.w,r.front.h))}}function $d(e,t,n,r,i=!1){if(!n)return;cn(e,t,n,r);let a=new Map(t.series[0]?.dataPointOverrides?.map(e=>[e.idx,e])??[]),o=i?(t.series[0]?.categories?.length?t.series[0].categories:t.categories).map((e,n)=>{let r=t.series[0]?.dataPointColors?.[n];return{label:e,color:r===`00000000`?`transparent`:r?`#${r}`:Sf(n),series:t.series[0],point:a.get(n)}}):t.series.map((e,t)=>({label:e.name||`Series ${t+1}`,color:Sf(t,e),series:e,point:void 0})),s=he(t.legendFontSizeHpt,r)??9*r;e.font=`${t.legendFontBold?`bold `:``}${s}px ${Cf(t.legendFontFace)}`,e.textAlign=`left`,e.textBaseline=`middle`;let c=Math.max(s*1.45,12),l=Math.min(7*r,c*.7);if(t.legendPos===`t`||t.legendPos===`b`||t.legendManualLayout!=null&&n.w>=n.h){let a=o.map(t=>l+4+e.measureText(t.label).width),s=me(a,Math.max(1,n.w-8),12).slice(0,Math.max(0,Math.floor((n.h-4+1e-6)/c))),u=n.y+2+c/2;for(let d of s){let s=d.map(e=>Math.min(n.w,a[e])),f=s.reduce((e,t)=>e+t,0)+Math.max(0,d.length-1)*12,p=n.x+Math.max(4,(n.w-f)/2);for(let n=0;n<d.length;n++){let a=o[d[n]],c=Math.max(0,s[n]-l-4);if(!i&&t.chartType.toLowerCase().includes(`line`)&&a.series?.lineHidden!==!0){let t=a.series?.lineWidthEmu==null?Math.max(1,2*r):Math.max(.5,a.series.lineWidthEmu/et*r);e.beginPath(),e.moveTo(p,u),e.lineTo(p+l,u),e.strokeStyle=a.series?.lineColor?`#${a.series.lineColor}`:Un(a.color,.7),e.lineWidth=t,e.setLineDash(On(a.series?.chartexStyle?.lineDash??`solid`,t)),e.stroke(),e.setLineDash([])}else{a.color!==`transparent`&&(e.fillStyle=a.color,e.fillRect(p,u-l/2,l,l));let t=a.point?.lineHidden??a.series?.lineHidden,n=a.point?.lineColor??a.series?.lineColor;t!==!0&&n&&(e.strokeStyle=`#${n}`,e.lineWidth=(a.point?.lineWidthEmu??a.series?.lineWidthEmu)==null?.75*r:Math.max(.25,(a.point?.lineWidthEmu??a.series?.lineWidthEmu??0)/et*r),e.setLineDash(On(a.point?.lineDash??a.series?.chartexStyle?.lineDash??`solid`,e.lineWidth)),e.strokeRect(p,u-l/2,l,l),e.setLineDash([]))}e.fillStyle=t.legendFontColor?`#${t.legendFontColor}`:`#595959`,e.fillText(Ot(e,a.label,c),p+l+4,u),p+=s[n]+12}u+=c}return}let u=n.y;for(let a=0;a<o.length;a++){let d=o[a],f=n.x+8+l,p=Math.max(0,n.x+n.w-4-f),m=Math.max(s*1.2,10),h=hn(d.label,p,m*(i?1:2),m,t=>e.measureText(t).width);if(h.length===0)continue;let g=Math.max(c,h.length*m+2);if(u+g>n.y+n.h+1e-6)break;let _=u+g/2;if(!i&&t.chartType.toLowerCase().includes(`line`)){let t=d.series?.lineWidthEmu==null?Math.max(1,2*r):Math.max(.5,d.series.lineWidthEmu/et*r);d.series?.lineHidden!==!0&&(e.beginPath(),e.moveTo(n.x+4,_),e.lineTo(n.x+4+l,_),e.strokeStyle=d.series?.lineColor?`#${d.series.lineColor}`:Un(d.color,.7),e.lineWidth=t,e.setLineDash(On(d.series?.chartexStyle?.lineDash??`solid`,t)),e.stroke(),e.setLineDash([]))}else{d.color!==`transparent`&&(e.fillStyle=d.color,e.fillRect(n.x+4,_-l/2,l,l));let t=d.point?.lineHidden??d.series?.lineHidden,i=d.point?.lineColor??d.series?.lineColor;t!==!0&&i&&(e.strokeStyle=`#${i}`,e.lineWidth=(d.point?.lineWidthEmu??d.series?.lineWidthEmu)==null?.75*r:Math.max(.25,(d.point?.lineWidthEmu??d.series?.lineWidthEmu??0)/et*r),e.setLineDash(On(d.point?.lineDash??d.series?.chartexStyle?.lineDash??`solid`,e.lineWidth)),e.strokeRect(n.x+4,_-l/2,l,l),e.setLineDash([]))}e.fillStyle=t.legendFontColor?`#${t.legendFontColor}`:`#595959`;let v=_-(h.length-1)*m/2;h.forEach((t,n)=>e.fillText(t,f,v+n*m)),u+=g}}function ef(e,t,n,r,i,a){let o=i?100:1,s=e.valAxisMinorTickMark??`none`;return Xe({dataMin:t,dataMax:n,explicitMin:e.valMin==null?i?t:null:e.valMin*o,explicitMax:e.valMax==null?i?n:null:e.valMax*o,majorUnit:e.valAxisMajorUnit==null?null:e.valAxisMajorUnit*o,minorUnit:e.valAxisMinorUnit==null?null:e.valAxisMinorUnit*o,axisLenPt:r,axisOrientation:a,logBase:e.valAxisLogBase,reversed:e.valAxisOrientation===`maxMin`,needMinor:e.valAxisMinorGridlines===!0||s!==`none`})}function tf(e,t,n){let r=e!=null&&Number.isFinite(e)?(e%360+360)%360:0,i=Number.isFinite(t)?Math.max(0,Math.min(1,t)):0,a=Number.isFinite(n)?Math.max(0,Math.min(1-i,n)):0,o=Math.PI/2-(r*Math.PI/180+i*Math.PI*2),s=o-a*Math.PI*2;return{start:Math.min(o,s),end:Math.max(o,s),middle:(o+s)/2,leading:o}}function nf(e){let{front:t}=e,n=t.x,r=t.x+t.w,i=e.topology.farX===`min`?n:r,a=i===n?r:n,o=e.topology.axisY===`min`?t.y:t.y+t.h,s=o===t.y?t.y+t.h:t.y,{nearDepth:c,farDepth:l}=e.topology,u=e.project(n,o,c),d=e.project(r,o,c),f=e.project(r,o,l),p=e.project(n,o,l),m=e.project(n,s,l),h=e.project(r,s,l),g=e.project(i,o,c),_=e.project(i,o,l),v=e.project(i,s,l),y=e.project(i,s,c);return{floor:[u,d,f,p],sideWall:[g,_,v,y],backWall:[p,f,h,m],sideX:i,seriesAxisX:a,floorY:o,oppositeFloorY:s,nearDepth:c,farDepth:l}}function rf(e,t,n,r,i=`A6A6A6`,a=.75){let o=t!=null&&Number.isFinite(t)&&t>=0?Math.max(.25,t/et*r):a*r;return{color:`#${e??i}`,width:o,dash:On(n??`solid`,o)}}function af(e,t){e.strokeStyle=t.color,e.lineWidth=t.width,e.setLineDash(t.dash)}function of(e,t,n,r,i,a,o,s,c){let{front:l}=n,u=l.x,d=l.x+l.w,f=nf(n),{sideX:p,floorY:m,oppositeFloorY:h,nearDepth:g,farDepth:_}=f,v=(t,n)=>{n?.fillHidden===!0||!n?.fillColor||Id(e,t,`#${n.fillColor}`,0)};v(f.floor,t.threeD?.floor),v(f.sideWall,t.threeD?.sideWall),v(f.backWall,t.threeD?.backWall);let y=(t,a)=>{af(e,a);for(let a of t)if(i===`horizontal`){let t=l.x+r.fraction(a)*l.w,i=n.project(t,m,_),o=n.project(t,h,_);e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(o.x,o.y),e.stroke()}else{let t=l.y+l.h-r.fraction(a)*l.h,i=n.project(p,t,g),o=n.project(p,t,_),s=n.project(p===u?d:u,t,_);e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(o.x,o.y),e.stroke(),e.beginPath(),e.moveTo(o.x,o.y),e.lineTo(s.x,s.y),e.stroke()}};t.valAxisMinorGridlines===!0&&y(r.minorTicks,rf(t.valAxisMinorGridlineColor,t.valAxisMinorGridlineWidthEmu,t.valAxisMinorGridlineDash,c,`D9D9D9`,.5)),t.valAxisMajorGridlines!==!1&&y(r.majorTicks,rf(t.valAxisGridlineColor,t.valAxisGridlineWidthEmu,t.valAxisGridlineDash,c,`898989`,1)),af(e,rf(null,null,null,c,`898989`,1));for(let t=0;t<a;t++)if(i===`vertical`){let r=l.x+jt(t,a,o,s)*l.w,i=n.project(r,m,g),c=n.project(r,m,_);e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(c.x,c.y),e.stroke()}else{let r=l.y+jt(t,a,o,s)*l.h,i=n.project(p,r,g),c=n.project(p,r,_);e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(c.x,c.y),e.stroke()}let b=(t,n)=>{if(!(n?.lineHidden===!0||t.length<2)){af(e,rf(n?.lineColor,n?.lineWidthEmu,n?.lineDash,c,`898989`,1)),e.beginPath(),e.moveTo(t[0].x,t[0].y);for(let n=1;n<t.length;n++)e.lineTo(t[n].x,t[n].y);e.lineTo(t[0].x,t[0].y),e.closePath(),e.stroke()}};b(f.floor,t.threeD?.floor),b(f.sideWall,t.threeD?.sideWall),b(f.backWall,t.threeD?.backWall),e.setLineDash([])}function sf(e,t,n,r,i,a,o,s,c){let l=pf(t,n,r,i,a,o,c),u=c===`vertical`?!t.catAxisHidden&&!t.catAxisLineHidden:!t.valAxisHidden&&!t.valAxisLineHidden,d=c===`vertical`?!t.valAxisHidden&&!t.valAxisLineHidden:!t.catAxisHidden&&!t.catAxisLineHidden;u&&(af(e,rf(c===`vertical`?t.catAxisLineColor:t.valAxisLineColor,c===`vertical`?t.catAxisLineWidthEmu:t.valAxisLineWidthEmu,null,s,`898989`,1)),e.beginPath(),e.moveTo(l.horizontalStart.x,l.horizontalStart.y),e.lineTo(l.horizontalEnd.x,l.horizontalEnd.y),e.stroke()),d&&(af(e,rf(c===`vertical`?t.valAxisLineColor:t.catAxisLineColor,c===`vertical`?t.valAxisLineWidthEmu:t.catAxisLineWidthEmu,null,s,`898989`,1)),e.beginPath(),e.moveTo(l.verticalStart.x,l.verticalStart.y),e.lineTo(l.verticalEnd.x,l.verticalEnd.y),e.stroke()),e.setLineDash([])}function cf(e,t,n,r){let i={x:(e.x+t.x)/2,y:(e.y+t.y)/2};return r===`horizontal`?{x:i.x<=n.x?-1:1,y:0}:{x:0,y:i.y<=n.y?-1:1}}function lf(e,t,n,r,i,a,o,s,c){if(!t||t===`none`)return;let l=cf(r,i,a,o),u=uf(s,c),d=t===`cross`?u/2:u,f=t===`out`||t===`cross`?d:0,p=t===`in`||t===`cross`?d:0;e.beginPath(),e.moveTo(n.x+l.x*f,n.y+l.y*f),e.lineTo(n.x-l.x*p,n.y-l.y*p),e.stroke()}function uf(e,t){return(e===`minor`?4:6)*t}function df(e,t,n){if(e!==`out`&&e!==`cross`)return 0;let r=uf(t,n);return e===`cross`?r/2:r}function ff(e,t,n,r){if(t)return r;let i=df(e,`major`,n);return Math.max(r,i+3*n)}function pf(e,t,n,r,i,a,o){let{front:s}=t,c=e=>Math.max(0,Math.min(1,e)),l=t.topology.axisX===`min`?s.x:s.x+s.w,u=t.topology.axisY===`min`?s.y:s.y+s.h,d=()=>{if(e.catAxisCrossesAt!=null&&Number.isFinite(e.catAxisCrossesAt)){let t=e.chartType.endsWith(`Pct`)?e.catAxisCrossesAt*100:e.catAxisCrossesAt;return c(n.fraction(t))}let t=e.catAxisCrosses??`autoZero`;return c(t===`min`?n.fraction(n.min):t===`max`?n.fraction(n.max):n.fraction(0))},f=()=>{let t=e.valAxisCrossesAt;if(t!=null&&Number.isFinite(t))return jt(t-1,r,i,a);let n=e.valAxisCrosses;if(n!==`min`&&n!==`max`)return null;let o=+(n===`max`);return a?1-o:o},p=d(),m=f(),h=o===`horizontal`?s.x+p*s.w:m==null?l:s.x+m*s.w,g=o===`vertical`?s.y+s.h-p*s.h:m==null?u:s.y+m*s.h,_=t.topology.nearDepth;return{axisX:h,axisY:g,depth:_,horizontalStart:t.project(s.x,g,_),horizontalEnd:t.project(s.x+s.w,g,_),verticalStart:t.project(h,s.y+s.h,_),verticalEnd:t.project(h,s.y,_)}}function mf(e,t,n,r,i,a,o,s,c){let{front:l}=n,u=pf(t,n,r,i,a,o,s),{axisX:d,axisY:f,depth:p}=u,m=n.project(l.x+l.w/2,l.y+l.h/2,p),h=t.valAxisMinorTickMark??`none`;if(!t.valAxisHidden&&!t.valAxisLineHidden){af(e,rf(t.valAxisLineColor,t.valAxisLineWidthEmu,null,c,`898989`,1));let i=e=>s===`horizontal`?n.project(l.x+r.fraction(e)*l.w,f,p):n.project(d,l.y+l.h-r.fraction(e)*l.h,p),a=s===`horizontal`?u.horizontalStart:u.verticalStart,o=s===`horizontal`?u.horizontalEnd:u.verticalEnd;for(let n of r.majorTicks)lf(e,t.valAxisMajorTickMark,i(n),a,o,m,s===`vertical`?`horizontal`:`vertical`,`major`,c);for(let t of r.minorTicks)lf(e,h,i(t),a,o,m,s===`vertical`?`horizontal`:`vertical`,`minor`,c)}if(!t.catAxisHidden&&!t.catAxisLineHidden){af(e,rf(t.catAxisLineColor,t.catAxisLineWidthEmu,null,c,`898989`,1));let r=s===`vertical`?u.horizontalStart:u.verticalStart,h=s===`vertical`?u.horizontalEnd:u.verticalEnd,g=Math.max(1,Math.floor(t.catAxisTickMarkSkip??1));for(let u=0;u<i;u+=g){let g=jt(u,i,a,o),_=s===`vertical`?n.project(l.x+g*l.w,f,p):n.project(d,l.y+g*l.h,p);lf(e,t.catAxisMajorTickMark,_,r,h,m,s===`vertical`?`vertical`:`horizontal`,`major`,c)}let _=t.catAxisMinorUnit;if(t.catAxisMinorTickMark&&t.catAxisMinorTickMark!==`none`&&_!=null&&Number.isFinite(_)&&_>0){let u=t.catAxisMajorUnit!=null&&Number.isFinite(t.catAxisMajorUnit)&&t.catAxisMajorUnit>0?t.catAxisMajorUnit:g,v=Math.min(512,Math.ceil(i/_));for(let g=1;g<v;g++){let v=g*_;if(!(v<i))break;if(Math.abs(v/u-Math.round(v/u))<1e-9)continue;let y=jt(v,i,a,o),b=s===`vertical`?n.project(l.x+y*l.w,f,p):n.project(d,l.y+y*l.h,p);lf(e,t.catAxisMinorTickMark,b,r,h,m,s===`vertical`?`vertical`:`horizontal`,`minor`,c)}}}e.setLineDash([])}function hf(e,t,n,r){if(!t.threeD)return!1;let i=t.chartType===`clusteredBar`||t.chartType===`clusteredBarH`||t.chartType.startsWith(`stackedBar`),a=t.chartType.endsWith(`H`)||t.chartType.includes(`BarH`),o=t.chartType.startsWith(`stacked`),s=i&&!o&&t.threeD.barGrouping===`standard`,{plot:c,legend:l}=Yd(e,t,n,r,a?`horizontal`:`vertical`),u=$n(t.threeD,c,{sceneDepthScale:i?s?.65:.1:.4,perspectiveTangentGain:s?1:2});if(!u)return!0;let d=t.chartType.endsWith(`Pct`),f=t.series.find(e=>(e.categories?.length??0)>0)?.categories??t.categories,p=Math.max(1,f.length,...t.series.map(e=>e.values.length)),m=t.catAxisOrientation===`maxMin`,h=t.catAxisCrossBetween===`between`,g=t.dispBlanksAs??`gap`,_=t.valAxisLogBase!=null&&Number.isFinite(t.valAxisLogBase)&&t.valAxisLogBase>=2,v=(e,n)=>{let r=t.series[e]?.values[n];return r!=null&&Number.isFinite(r)&&(!_||r>0)||r==null&&(o||g===`zero`)},y=(e,n)=>{let r=t.series[e]?.values[n]??0;if(!Number.isFinite(r))return 0;if(!d)return r;let i=0;for(let e of t.series){let t=e.values[n];t!=null&&Number.isFinite(t)&&(i=Math.max(i,Math.abs(t)))}if(!(i>0))return 0;let a=0;for(let e of t.series){let t=e.values[n];t!=null&&Number.isFinite(t)&&(a+=Math.abs(t)/i)}return a>0?r/i/a*100:0},b=(e,t)=>{let n=e+t;return Number.isFinite(n)?n:t<0?-Number.MAX_VALUE:Number.MAX_VALUE},x=0,S=0;if(o){for(let e=0;e<p;e++){let n=0,r=0;for(let i=0;i<t.series.length;i++){let t=y(i,e);t>=0?n=b(n,t):r=b(r,t)}x=Math.min(x,r),S=Math.max(S,n)}d&&(x=x<0?-100:0,S=S>0?100:0,x===0&&S===0&&(S=1))}else{let e=Ie(t.series.flatMap(e=>e.values).filter(e=>e!=null&&Number.isFinite(e)&&(!_||e>0)),_?{min:1,max:10}:{min:0,max:1});x=_?e.min:Math.min(0,e.min),S=_?e.max:Math.max(0,e.max)}let C=ef(t,x,S,(a?u.front.w:u.front.h)/r,d,a?`horizontal`:`vertical`),w=e=>Number.isFinite(e)?Math.max(C.min,Math.min(C.max,e)):C.min;of(e,t,u,C,a?`horizontal`:`vertical`,p,h,m,r);let{front:T}=u,E=Math.max(1,t.series.length),D=[],O=t.series.map(e=>new Map(e.dataPointOverrides?.map(e=>[e.idx,e])??[])),k=t.series.map(e=>new Map(e.dataLabelOverrides?.map(e=>[e.idx,e])??[]));if(i){let i=u.prismInterval(0,1,!0),c=[],l=Array(p).fill(0),f=Array(p).fill(0),h=(a?T.h:T.w)/p,g=t.barGapWidth!=null&&Number.isFinite(t.barGapWidth)&&t.barGapWidth>=0?t.barGapWidth:150;for(let e=0;e<t.series.length;e++){let n=t.series[e],x=s?u.prismInterval(e,E,!1):i,S=Xn(h,g,s?0:e,s?1:E,o||s);for(let i=0;i<p;i++){if(!v(e,i))continue;let s=y(e,i),u=O[e].get(i),g=u?.fillHidden===!0?`transparent`:u?.color??n.dataPointColors?.[i],E=g===`00000000`?`transparent`:g?`#${g}`:n.color===`00000000`?`transparent`:Sf(e,n),D=Nd(n,u),k=u?.lineColor??n.lineColor,A=u?.lineWidthEmu??n.lineWidthEmu,j=u?.lineDash??n.chartexStyle?.lineDash??`solid`,M=n.chartexStyle?.lineCap===`rnd`?`round`:n.chartexStyle?.lineCap===`sq`?`square`:`butt`,N=n.chartexStyle?.lineJoin===`round`||n.chartexStyle?.lineJoin===`bevel`?n.chartexStyle.lineJoin:`miter`,P=o?s>=0?l[i]:f[i]:0,F=b(P,s);o&&(s>=0?l[i]=F:f[i]=F);let I=w(P),L=w(F),R=n.threeDShape??t.threeD.shape??`box`,z=R===`cone`||R===`pyramid`,ee=R===`coneToMax`||R===`pyramidToMax`,B=e=>{if(!z)return 1;let t=_&&!(P>0)?C.min:P,n=C.fraction(t),r=C.fraction(F),i=C.fraction(e),a=r-n;return a===0||!Number.isFinite(a)||!Number.isFinite(i-n)?+(e===t):Math.max(0,Math.min(1,1-(i-n)/a))},V=e=>{if(!ee)return 1;let t=F>=P?C.max:C.min,n=_?C.min:0,r=C.fraction(t),i=C.fraction(n),a=C.fraction(e),o=Math.abs(r-i);return!(o>0)||![r,i,a].every(Number.isFinite)?Zn(e,C.min,C.max):Math.max(0,Math.min(1,Math.abs(r-a)/o))},H=ee?V(I):B(I),U=ee?V(L):B(L);if(a){let t=T.x+C.fraction(I)*T.w,n=T.x+C.fraction(L)*T.w,a=m?p-1-i:i,o=T.y+a*h+S.offset;c.push({x:Math.min(t,n),y:o,width:Math.abs(n-t),height:S.size,nearDepth:x.near,farDepth:x.far,categoryIndex:i,seriesIndex:e,color:E,shape:R,baseCoord:t,endCoord:n,baseScale:H,endScale:U,omitBaseCap:!1,omitEndCap:!1,outline:D,outlineColor:k?`#${k}`:`rgba(0,0,0,0.42)`,outlineWidth:A==null?.75*r/tt:jd(A,r),outlineDash:j,outlineCap:M,outlineJoin:N,labelValue:d?s/100:s})}else{let t=T.y+T.h-C.fraction(I)*T.h,n=T.y+T.h-C.fraction(L)*T.h,a=m?p-1-i:i,o=T.x+a*h+S.offset;c.push({x:o,y:Math.min(t,n),width:S.size,height:Math.abs(n-t),nearDepth:x.near,farDepth:x.far,categoryIndex:i,seriesIndex:e,color:E,shape:R,baseCoord:t,endCoord:n,baseScale:H,endScale:U,omitBaseCap:!1,omitEndCap:!1,outline:D,outlineColor:k?`#${k}`:`rgba(0,0,0,0.42)`,outlineWidth:A==null?.75*r/tt:jd(A,r),outlineDash:j,outlineCap:M,outlineJoin:N,labelValue:d?s/100:s})}}}if(o){let e=Md(c,p);for(let t=0;t<p;t++){let n=e[t];for(let e of[-1,1]){let t=n.filter(t=>Math.sign(t.labelValue)===e&&!Tf(t.color)&&Math.abs(t.endCoord-t.baseCoord)>1e-9).sort((e,t)=>e.seriesIndex-t.seriesIndex);for(let e=0;e+1<t.length;e++){let n=t[e],r=t[e+1],i=1e-8*Math.max(1,Math.abs(n.endCoord),Math.abs(r.baseCoord));n.shape!==r.shape||Math.abs(n.endCoord-r.baseCoord)>i||Math.abs(n.endScale-r.baseScale)>1e-9||n.nearDepth!==r.nearDepth||n.farDepth!==r.farDepth||(n.omitEndCap=!0,r.omitBaseCap=!0)}}let r=n.find(e=>e.labelValue>0&&!Tf(e.color)),i=n.find(e=>e.labelValue<0&&!Tf(e.color));if(r&&i){let e=1e-8*Math.max(1,Math.abs(r.baseCoord),Math.abs(i.baseCoord));r.shape===i.shape&&Math.abs(r.baseCoord-i.baseCoord)<=e&&Math.abs(r.baseScale-i.baseScale)<=1e-9&&r.nearDepth===i.nearDepth&&r.farDepth===i.farDepth&&(r.omitBaseCap=!0,i.omitBaseCap=!0)}}}let x={remaining:hd,exceeded:!1},S=c.flatMap(e=>Rd(u,e.shape,a,e.x,e.y,e.width,e.height,e.baseCoord,e.endCoord,e.nearDepth,e.farDepth,e.color,e.baseScale,e.endScale,e.omitBaseCap,e.omitEndCap,e.outline&&e.outlineColor?{color:e.outlineColor,width:e.outlineWidth,dash:On(e.outlineDash,e.outlineWidth),cap:e.outlineCap,join:e.outlineJoin}:void 0,x));if(x.exceeded)return Ud(e,n),!0;for(let t of od(S))Vd(e,t);for(let i of c){let o=t.series[i.seriesIndex],s=a?u.project(i.endCoord,i.y+i.height/2,(i.nearDepth+i.farDepth)/2):u.project(i.x+i.width/2,i.endCoord,(i.nearDepth+i.farDepth)/2),c=k[i.seriesIndex].get(i.categoryIndex);Jd(t,o,c)&&D.push(()=>qd(e,t,o,i.seriesIndex,i.categoryIndex,i.labelValue,s,n,r,0,void 0,c,`t`,s,!0,t.valAxisDisplayUnits))}}else{let i=t.series.map(()=>Array(p).fill(0)),a=t.series.map(()=>Array(p).fill(0));if(o){let e=Array(p).fill(0),n=Array(p).fill(0);for(let r=0;r<t.series.length;r++)for(let t=0;t<p;t++){let o=y(r,t),s=o>=0?e[t]:n[t];i[r][t]=s,a[r][t]=b(s,o),o>=0?e[t]=b(e[t],o):n[t]=b(n[t],o)}}let s=e=>{let t=u.seriesDepth(e,E,o),n=0,r=0;for(let i=0;i<p;i++){if(!v(e,i))continue;let s=o?a[e][i]:y(e,i),c=T.x+jt(i,p,h,m)*T.w,l=T.y+T.h-C.fraction(w(s))*T.h;n+=u.cameraDepth(c,l,t),r++}return r>0?n/r:-1/0},c=t.series.map((e,t)=>t).sort((e,t)=>s(e)-s(t)||t-e),l=[],f=[],_=!1;for(let s of c){if(_)break;let c=t.series[s],b=Sf(s,c),x=o?u.prismInterval(0,1,!0):u.prismInterval(s,E,!1),S=T.x+T.w/2,w=T.y+T.h/2,A=u.cameraDepth(S,w,x.near)>=u.cameraDepth(S,w,x.far)?x.near:x.far,j=[],M=[],N=[],P=[],F=[],I=[],L=[],R=[],z=[],ee=[];for(let e=0;e<p;e++){if(!v(s,e)){j.push(null),M.push(null),N.push(null),P.push(null),F.push(null),I.push(null),L.push(null),R.push(null),z.push(null),ee.push(null);continue}let n=o?a[s][e]:y(s,e),r=o?i[s][e]:0,c=T.x+jt(e,p,h,m)*T.w,l=C.fraction(n),d=C.fraction(r),f=Number.isFinite(d)?d:r<=C.min?0:1,g=Number.isFinite(l)&&l>=0&&l<=1,_=Number.isFinite(l)?Math.max(0,Math.min(1,l)):n<=C.min?0:1,b=T.y+T.h-_*T.h,x=T.y+T.h-Math.max(0,Math.min(1,f))*T.h;j.push(t.chartType.toLowerCase().includes(`area`)||g?u.project(c,b,A):null),M.push(u.project(c,x,A)),N.push(g?u.cameraDepth(c,b,A):null),P.push(u.cameraDepth(c,x,A)),F.push(n),I.push(c),L.push(b),R.push(x),z.push(l),ee.push(f)}let B=[],V=null;for(let e=0;e<j.length;e++){let t=j[e],n=M[e];if(!t||!n){g===`gap`&&(V&&B.push(V),V=null);continue}V??={upper:[],lower:[],upperDepths:[],lowerDepths:[],indices:[],sceneXs:[],upperYs:[],lowerYs:[],upperFractions:[],lowerFractions:[]},V.upper.push(t),V.lower.push(n),V.upperDepths.push(N[e]??0),V.lowerDepths.push(P[e]??0),V.indices.push(e),V.sceneXs.push(I[e]??0),V.upperYs.push(L[e]??0),V.lowerYs.push(R[e]??0),V.upperFractions.push(z[e]??0),V.lowerFractions.push(ee[e]??0)}V&&B.push(V);let H=[];if(t.chartType.toLowerCase().includes(`area`))for(let t of B){let n=null;for(let r=0;r+1<t.upper.length;r++){let i=rd(t.lowerFractions[r],t.lowerFractions[r+1],t.upperFractions[r],t.upperFractions[r+1]);for(let a=0;a<i.length;a++){let o=i[a],s=t.sceneXs[r]+(t.sceneXs[r+1]-t.sceneXs[r])*o.startT,c=t.sceneXs[r]+(t.sceneXs[r+1]-t.sceneXs[r])*o.endT,d=T.y+T.h-o.lowerStart*T.h,f=T.y+T.h-o.lowerEnd*T.h,p=T.y+T.h-o.upperStart*T.h,m=T.y+T.h-o.upperEnd*T.h,h={...u.project(s,p,A),cameraDepth:u.cameraDepth(s,p,A),cameraWeight:u.cameraProjectionWeight(s,p,A)},g={...u.project(c,m,A),cameraDepth:u.cameraDepth(c,m,A),cameraWeight:u.cameraProjectionWeight(c,m,A)};n!=null&&Math.hypot(n.at(-1).x-h.x,n.at(-1).y-h.y)<=1e-8?n.push(g):(n&&n.length>=2&&H.push(n),n=[h,g]);let v=Ld(u,s,c,d,f,p,m,x.near,x.far,b,r===0&&a===0&&o.startT===0,r+2===t.upper.length&&a+1===i.length&&o.endT===1);for(let t of v){if(l.length>=1e4){_=!0;break}l.push({points:t.points,cameraDepth:t.cameraDepth,cameraDepths:t.cameraDepths,cameraWeights:t.cameraWeights,layer:0,paint:()=>Vd(e,t)})}if(_)break}if(_)break}if(n&&n.length>=2&&H.push(n),_)break}let U=[];if(!t.chartType.toLowerCase().includes(`area`)){let e=[],t=null;for(let n=0;n<p;n++){let r=F[n],i=r==null?NaN:C.fraction(r);if(r==null||!Number.isFinite(i)){g===`gap`&&t&&(e.push(t),t=null);continue}t??=[],t.push({x:T.x+jt(n,p,h,m)*T.w,fraction:i})}t&&e.push(t);let n=e=>{let t=Math.max(0,Math.min(1,e.fraction)),n=T.y+T.h-t*T.h;return{...u.project(e.x,n,A),cameraDepth:u.cameraDepth(e.x,n,A),cameraWeight:u.cameraProjectionWeight(e.x,n,A)}},r=e=>{e&&e.path.length>=2&&U.push(e)};for(let t of e){if(t.length<2)continue;let e=[t[0]];for(let n=0;n+1<t.length;n++){let r=t[n-1]??t[n],i=t[n],a=t[n+1],o=t[n+2]??a;if(c.smooth!==!0||t.length<3){e.push(a);continue}let s={x:i.x+(a.x-r.x)/6,fraction:i.fraction+(a.fraction-r.fraction)/6},l={x:a.x-(o.x-i.x)/6,fraction:a.fraction-(o.fraction-i.fraction)/6};for(let t=1;t<=12;t++){let n=t/12,r=1-n;e.push({x:r*r*r*i.x+3*r*r*n*s.x+3*r*n*n*l.x+n*n*n*a.x,fraction:r*r*r*i.fraction+3*r*r*n*s.fraction+3*r*n*n*l.fraction+n*n*n*a.fraction})}}let i=null,a=0;for(let t=0;t+1<e.length;t++){let o=e[t],s=e[t+1],c=e=>u.project(e.x,T.y+T.h-e.fraction*T.h,A),l=c(o),d=c(s),f=Math.hypot(d.x-l.x,d.y-l.y),p=Number.isFinite(f)?f:Math.hypot(s.x-o.x,(s.fraction-o.fraction)*T.h),m=nd(o.fraction,s.fraction);if(!m||m.endT-m.startT<=1e-12){r(i),i=null,a+=p;continue}let h=e=>({x:o.x+(s.x-o.x)*e,fraction:o.fraction+(s.fraction-o.fraction)*e}),g=c(h(m.startT)),_=Math.hypot(g.x-l.x,g.y-l.y),v=n(h(m.startT)),y=n(h(m.endT));i!=null&&Math.hypot(i.path.at(-1).x-v.x,i.path.at(-1).y-v.y)<=1e-8?(i.path.push(y),i.endClipped=t+1<e.length-1||m.endT<1):(r(i),i={path:[v,y],startClipped:t>0||m.startT>0,endClipped:t+1<e.length-1||m.endT<1,dashOffset:a+(Number.isFinite(_)?_:p*m.startT)}),a+=p}r(i)}}let te=t.chartType.toLowerCase().includes(`area`),W=c.lineHidden!=null||c.lineColor!=null||c.lineWidthEmu!=null||c.chartexStyle?.lineHidden!=null||c.chartexStyle?.lineColors?.some(Boolean)||c.chartexStyle?.lineWidthEmu!=null||c.chartexStyle?.lineDash!=null||c.chartexStyle?.lineCap!=null||c.chartexStyle?.lineJoin!=null;if(c.lineHidden!==!0&&(!te||W)){let t=c.lineColor?`#${c.lineColor}`:Un(b,.7),n=c.lineWidthEmu?Math.max(.5,c.lineWidthEmu/et)*r:te?.75*r:Math.max(1,2*r),i=On(c.chartexStyle?.lineDash??`solid`,n),a=c.chartexStyle?.lineCap===`rnd`?`round`:c.chartexStyle?.lineCap===`sq`?`square`:`butt`,o=c.chartexStyle?.lineJoin===`round`||c.chartexStyle?.lineJoin===`bevel`?c.chartexStyle.lineJoin:`miter`,s=(r,s,c=s,u=0)=>{let d=pd(r,{width:n,dash:i,dashOffset:u,lineCap:a,startCap:s,endCap:c,lineJoin:o});if(d==null){_=!0;return}if(l.length+d.length>1e4){_=!0;return}for(let n of d)l.push({points:n.points,cameraDepth:n.cameraDepth,cameraDepths:n.cameraDepths,cameraWeights:n.cameraWeights,layer:1,paint:()=>Hd(e,n,t)})};if(te)for(let e of H)s(e,a);else for(let e of U)s(e.path,e.startClipped?`butt`:a,e.endClipped?`butt`:a,e.dashOffset)}let ne=c.dataPointOverrides?.some(e=>e.markerSymbol!=null&&e.markerSymbol!==`none`)===!0;if(t.chartType.toLowerCase().includes(`line`)&&(c.showMarker===!0||ne))for(let t=0;t<j.length;t++){let n=j[t];if(!n)continue;let i=O[s].get(t),a=i?.markerSymbol??(c.showMarker===!0?c.markerSymbol??`circle`:`none`);if(a===`none`)continue;let o=i?.markerSize??c.markerSize??5,l=i?.markerFill??c.markerFill??c.color??yf[s%yf.length],u=i?.markerLine??c.markerLine??c.lineColor??c.color??yf[s%yf.length],d=(i?.markerLineWidthEmu??c.markerLineWidthEmu)==null?Math.max(.75,c.lineWidthEmu==null?r:c.lineWidthEmu/et*r):Math.max(.25,(i?.markerLineWidthEmu??c.markerLineWidthEmu??0)/et*r);f.push(()=>Kd(e,n,a,Math.max(2,o)*r,l===`00000000`?`transparent`:`#${l}`,`#${u}`,d))}for(let i=0;i<j.length;i++){let a=j[i];if(!a)continue;let o=y(s,i),l=O[s].get(i),u=l?.markerSize??c.markerSize??5,f=k[s].get(i);Jd(t,c,f)&&D.push(()=>qd(e,t,c,s,i,d?o/100:o,a,n,r,c.showMarker===!0||l?.markerSymbol!=null?u*r/2:0,void 0,f,`t`,a,!0,t.valAxisDisplayUnits))}}if(_)return Ud(e,n),!0;for(let e of od(l))e.paint();for(let e of f)e()}sf(e,t,u,C,p,h,m,r,a?`horizontal`:`vertical`),mf(e,t,u,C,p,h,m,a?`horizontal`:`vertical`,r),Qd(e,t,n,u,C,p,h,m,a?`horizontal`:`vertical`,r);let A=pf(t,u,C,p,h,m,a?`horizontal`:`vertical`),j=(e,t)=>{if(t!==`low`&&t!==`high`)return A;let n=u.topology.nearDepth,r=A.axisX,i=A.axisY;if(e===`value`===a){let e=T.y,r=T.y+T.h,a=u.project(T.x+T.w/2,e,n),o=u.project(T.x+T.w/2,r,n),s=a.y>=o.y?e:r;i=t===`low`?s:s===e?r:e}else{let e=T.x,i=T.x+T.w,a=u.project(e,T.y+T.h/2,n),o=u.project(i,T.y+T.h/2,n),s=a.x<=o.x?e:i;r=t===`low`?s:s===e?i:e}return{axisX:r,axisY:i,depth:n,horizontalStart:u.project(T.x,i,n),horizontalEnd:u.project(T.x+T.w,i,n),verticalStart:u.project(r,T.y+T.h,n),verticalEnd:u.project(r,T.y,n)}},M=j(`value`,t.valAxisTickLabelPos),N=j(`category`,t.catAxisTickLabelPos),P=he(t.valAxisFontSizeHpt,r)??9*r;if(e.font=`${t.valAxisFontItalic?`italic `:``}${t.valAxisFontBold?`bold `:``}${P}px ${Cf(t.valAxisFontFace)}`,e.fillStyle=t.valAxisFontColor?`#${t.valAxisFontColor}`:`#595959`,e.textAlign=a?`center`:`right`,e.textBaseline=a?`top`:`middle`,!t.valAxisHidden&&t.valAxisTickLabelPos!==`none`){let{axisX:n,axisY:i,depth:o}=M,s=u.project(T.x+T.w/2,T.y+T.h/2,o),c=cf(a?M.horizontalStart:M.verticalStart,a?M.horizontalEnd:M.verticalEnd,s,a?`vertical`:`horizontal`);e.textAlign=Math.abs(c.x)<.2?`center`:c.x<0?`right`:`left`,e.textBaseline=Math.abs(c.y)<.2?`middle`:c.y<0?`bottom`:`top`;let l=ff(t.valAxisMajorTickMark,t.valAxisLineHidden,r,5),f=t.valAxisDisplayUnits?.divisor;for(let r of C.majorTicks){let s=a?u.project(T.x+C.fraction(r)*T.w,i,o):u.project(n,T.y+T.h-C.fraction(r)*T.h,o);e.fillText(yt(d?r/100:f!=null&&Number.isFinite(f)&&f>0?r/f:r,d?t.valAxisFormatCode??`0%`:t.valAxisFormatCode,t.date1904),s.x+c.x*l,s.y+c.y*l)}}let F=he(t.catAxisFontSizeHpt,r)??9*r;if(e.font=`${t.catAxisFontItalic?`italic `:``}${t.catAxisFontBold?`bold `:``}${F}px ${Cf(t.catAxisFontFace)}`,e.fillStyle=t.catAxisFontColor?`#${t.catAxisFontColor}`:`#595959`,!t.catAxisHidden&&t.catAxisTickLabelPos!==`none`){let n=ff(t.catAxisMajorTickMark,t.catAxisLineHidden,r,6),i=Array.from({length:p},(e,n)=>bt(String(f[n]??n+1),t.catAxisFormatCode,t.date1904)),o=Wd(t);if(o==null&&(o=0,!a&&p>1)){let t=1/0,n=null,r=N.axisY;for(let e=0;e<p;e++){let i=jt(e,p,h,m),a=u.project(T.x+i*T.w,r,u.topology.nearDepth);n&&(t=Math.min(t,Math.hypot(a.x-n.x,a.y-n.y))),n=a}Math.max(0,...i.map(t=>e.measureText(t).width))>t*.9&&(o=-Math.PI/4)}let s=Math.max(1,Math.floor(t.catAxisTickLabelSkip??1));for(let t=0;t<p;t+=s){let r=jt(t,p,h,m),{axisX:s,axisY:c,depth:l}=N,d=a?u.project(s,T.y+jt(t,p,h,m)*T.h,l):u.project(T.x+r*T.w,c,l);if(a){let r=u.project(s,T.y+T.h/2,l),a=u.project(T.x+T.w/2,T.y+T.h/2,l),o=r.x<=a.x;e.textAlign=o?`right`:`left`,e.textBaseline=`middle`,e.fillText(i[t],d.x+(o?-n:n),d.y)}else{let r=u.project(T.x+T.w/2,T.y+T.h/2,l),s=cf(N.horizontalStart,N.horizontalEnd,r,`vertical`);Gd(e,i[t],d,o,a,s.y<0?-1:1,n)}}}Zd(e,t,n,c,a,r);for(let e of D)e();return $d(e,t,l,r),!0}function gf(e,t,n,r){if(!t.threeD||t.chartType!==`pie`)return!1;let i=t.series[0];if(!i)return!0;let a=i.values.flatMap((e,t)=>e!=null&&Number.isFinite(e)?[{index:t,value:Math.abs(e)}]:[]),o=0;for(let e of a)o=Math.max(o,e.value);if(!(o>0))return!0;let s=a.reduce((e,t)=>e+t.value/o,0);if(!(s>0)||!Number.isFinite(s))return!0;let{plot:c,legend:l}=Yd(e,t,n,r,`radial`),u=$n({...t.threeD,rotationY:t.threeD.rotationY??0,depthPercent:100},c,{sceneDepthScale:1,sceneHeightScale:.15});if(!u)return!0;let d=new Map(i.dataPointOverrides?.map(e=>[e.idx,e])??[]),f=0;for(let e of d.values())e.explosion!=null&&Number.isFinite(e.explosion)&&(f=Math.max(f,Math.max(0,Math.min(100,e.explosion))/100));let{scene:p}=u,m=Math.min(p.w*.45/(1+f),u.modelDepth*.45/(1+f),p.h/.45);if(!(m>0))return!0;let h=p.x+p.w/2,g=p.y+p.h/2,_=.5,v=m*.3,y=0,b=[],x=new Map(i.dataLabelOverrides?.map(e=>[e.idx,e])??[]),S=Math.max(48,Math.min(128,Math.ceil(Math.PI*2*m/4)));for(let e of a){let n=e.value/o/s,r=tf(t.firstSliceAngle,y,n),a=d.get(e.index),c=a?.fillHidden===!0?`00000000`:a?.color??i.dataPointColors?.[e.index]??i.color,l=r.middle,f=a?.explosion!=null&&Number.isFinite(a.explosion)?Math.max(0,Math.min(100,a.explosion))/100:0,p=h+Math.cos(l)*m*f,x=_+Math.sin(l)*m*f/u.modelDepth,C=Math.max(2,Math.ceil(S*n)),w=$u({centerX:p,centerY:g,centerDepth:x,radius:m,modelDepth:u.modelDepth,thickness:v,startAngle:r.start,endAngle:r.end,segments:C});if(!w){y+=n;continue}b.push({index:e.index,start:r.start,end:r.end,color:c===`00000000`?`transparent`:c?`#${c}`:Sf(e.index),value:e.value,percentValue:n,centerX:p,centerDepth:x,segments:C,mesh:w,lineHidden:a?.lineHidden??i.lineHidden??!1,lineColor:a?.lineColor??i.lineColor??null,lineWidthEmu:a?.lineWidthEmu??i.lineWidthEmu??null,lineDash:a?.lineDash??i.chartexStyle?.lineDash??`solid`,lineCap:i.chartexStyle?.lineCap===`rnd`?`round`:i.chartexStyle?.lineCap===`sq`?`square`:`butt`,lineJoin:i.chartexStyle?.lineJoin===`round`||i.chartexStyle?.lineJoin===`bevel`?i.chartexStyle.lineJoin:`miter`}),y+=n}u=Qn(u,b.flatMap(e=>e.mesh.vertices),c,.08);let C=[],w={remaining:hd,exceeded:!1},T=e=>{let t=e.lineWidthEmu==null?.75*r:Math.max(.25,e.lineWidthEmu/et*r);return!e.lineHidden&&e.lineColor?{color:`#${e.lineColor}`,width:t,dash:On(e.lineDash,t),cap:e.lineCap,join:e.lineJoin}:void 0},E=b.flatMap(e=>zd(u,e.mesh,e.color,void 0,w)),D=[],O=b.map(T),k=O[0],A=e=>e==null?null:[e.color,e.width,e.dash.join(`,`),e.cap,e.join].join(`|`),j=k!=null&&O.every(e=>A(e)===A(k))&&b.every(e=>Math.abs(e.centerX-h)<1e-9&&Math.abs(e.centerDepth-_)<1e-9);if(j)D.push(...Bd(u,b,g,m,v,k,w));else for(let e=0;e<b.length;e++){let t=O[e];t&&D.push(...zd(u,b[e].mesh,`transparent`,t,w,!0))}if(w.exceeded)return Ud(e,n),!0;if(j){for(let t of od(E))Vd(e,t);for(let t of od(D))Vd(e,t)}else for(let t of od([...E,...D]))Vd(e,t);for(let n of b){let a=(n.start+n.end)/2,o=x.get(n.index);if(Jd(t,i,o)){let s=i.seriesDataLabels,l=he(o?.fontSizeHpt??s?.fontSizeHpt??t.dataLabelFontSizeHpt,r)??9*r;e.font=`${o?.fontBold??s?.fontBold??t.dataLabelFontBold?`bold `:``}${l}px ${wf(t,o?.fontFace??s?.fontFace??t.dataLabelFontFace)}`;let d=an({customText:o?.text,showCategory:o?.showCatName??s?.showCatName??!1,showSeries:o?.showSerName??s?.showSerName??!1,showValue:o?.showVal??s?.showVal??t.showDataLabels,showPercent:o?.showPercent??s?.showPercent??!1,category:i.categories?.[n.index]??t.categories[n.index]??`${n.index+1}`,seriesName:i.name||`Series 1`,sourceValue:n.value,percentRatio:n.percentValue,formatCode:o?.formatCode??s?.formatCode??t.dataLabelFormatCode??i.valFormatCode,separator:o?.separator??s?.separator,date1904:t.date1904}),f=wf(t,o?.fontFace??s?.fontFace??t.dataLabelFontFace),p=o?.text&&o.richRuns?.length?Qt(e,{runs:o.richRuns,ptToPx:r,fontFamily:f,fallbackBold:o.fontBold??s?.fontBold??t.dataLabelFontBold??!1,fontFamilyForFace:e=>wf(t,e)},l,`#${o.fontColor??s?.fontColor??i.labelColor??t.dataLabelFontColor??`111111`}`):null,h=o?.position??s?.position??t.dataLabelPosition,_=g-v/2,y=g+v/2,b=u.cameraDepth(n.centerX,_,n.centerDepth)>=u.cameraDepth(n.centerX,y,n.centerDepth)?_:y,x=0,S=null;for(let e=0;e<=12;e++){let t=n.start+(n.end-n.start)*e/12,r=u.project(n.centerX+Math.cos(t)*m*.64,b,n.centerDepth+Math.sin(t)*m*.64/u.modelDepth);S&&(x+=Math.hypot(r.x-S.x,r.y-S.y)),S=r}let w=(h==null||h===`bestFit`)&&(n.percentValue===0||x<(p?.width??e.measureText(d).width))||h===`outEnd`,T=m*(w?1.12:.64),E=u.project(n.centerX+Math.cos(a)*T,b,n.centerDepth+Math.sin(a)*T/u.modelDepth),D=u.project(n.centerX+Math.cos(a)*m,b,n.centerDepth+Math.sin(a)*m/u.modelDepth);C.push(()=>qd(e,t,i,0,n.index,n.value,E,c,r,0,n.percentValue,o,`ctr`,D,w))}}for(let e of C)e();let M=i.categories?.length?i.categories:t.categories,N=Array.from({length:M.length},(e,t)=>{let n=d.get(t),r=n?.fillHidden===!0?`00000000`:n?.color??i.dataPointColors?.[t]??i.color;return r===`00000000`?`00000000`:Un(r?`#${r}`:Sf(t),.8).replace(/^#/,``)});return $d(e,{...t,categories:M,series:[{...i,categories:M,dataPointColors:N}]},l,r,!0),!0}function _f(e,t,n,r){return t.threeD?gf(e,t,n,r)?!0:bf.has(t.chartType)?hf(e,t,n,r):!1:!1}var vf,yf,bf,xf,Sf,Cf,wf,Tf,Ef=t((()=>{nt(),Mn(),$e(),Dt(),Fe(),At(),yn(),rn(),on(),nr(),Yn(),Nt(),td(),ud(),xd(),kd(),ln(),vf=`ooxml-three-d-mesh-implementation-v1`,yf=[`4472C4`,`ED7D31`,`70AD47`,`A5A5A5`,`FFC000`,`5B9BD5`],bf=new Set([`line`,`stackedLine`,`stackedLinePct`,`area`,`stackedArea`,`stackedAreaPct`,`clusteredBar`,`clusteredBarH`,`stackedBar`,`stackedBarH`,`stackedBarPct`,`stackedBarHPct`]),xf=36,Sf=(e,t)=>`#${t?.color??yf[e%yf.length]}`,Cf=e=>`"${e&&!e.startsWith(`+`)?e.replace(/["\\]/g,``):`Arial`}"`,wf=(e,t,n=`minor`)=>Cf((t?.startsWith(`+mj-`)?e.themeMajorFontLatin:t?.startsWith(`+mn-`)?e.themeMinorFontLatin:t)??(n===`major`?e.themeMajorFontLatin:e.themeMinorFontLatin)),Tf=e=>e===`transparent`||e===`#00000000`||e===`rgba(0,0,0,0)`})),Df,Of=t((()=>{Df=[{n:`Fiji`,a2:`FJ`,a3:`FJI`,p:`FJ`,l:[177.98,-17.83],g:[[[[180,-16.07],[180,-16.56],[179.36,-16.8],[178.73,-17.01],[178.6,-16.64],[179.1,-16.43],[179.41,-16.38],[180,-16.07]]],[[[178.13,-17.5],[178.37,-17.34],[178.72,-17.63],[178.55,-18.15],[177.93,-18.29],[177.38,-18.16],[177.29,-17.72],[177.67,-17.38],[178.13,-17.5]]],[[[-179.79,-16.02],[-179.92,-16.5],[-180,-16.56],[-180,-16.07],[-179.79,-16.02]]]]},{n:`Tanzania`,a2:`TZ`,a3:`TZA`,p:`TZ`,l:[34.96,-6.05],g:[[[[33.9,-.95],[34.07,-1.06],[37.7,-3.1],[37.77,-3.68],[39.2,-4.68],[38.74,-5.91],[38.8,-6.48],[39.44,-6.84],[39.47,-7.1],[39.19,-7.7],[39.25,-8.01],[39.19,-8.49],[39.54,-9.11],[39.95,-10.1],[40.32,-10.32],[39.52,-10.9],[38.43,-11.29],[37.83,-11.27],[37.47,-11.57],[36.78,-11.59],[36.51,-11.72],[35.31,-11.44],[34.56,-11.52],[34.28,-10.16],[33.94,-9.69],[33.74,-9.42],[32.76,-9.23],[32.19,-8.93],[31.56,-8.76],[31.16,-8.59],[30.74,-8.34],[30.2,-7.08],[29.62,-6.52],[29.42,-5.94],[29.52,-5.42],[29.34,-4.5],[29.75,-4.45],[30.12,-4.09],[30.51,-3.57],[30.75,-3.36],[30.74,-3.03],[30.53,-2.81],[30.47,-2.41],[30.76,-2.29],[30.82,-1.7],[30.42,-1.13],[30.77,-1.01],[31.87,-1.03],[33.9,-.95]]]]},{n:`Western Sahara`,a2:`EH`,a3:`ESH`,p:`WS`,l:[-12.63,23.97],g:[[[[-8.67,27.66],[-8.67,27.59],[-8.68,27.4],[-8.69,25.88],[-11.97,25.93],[-11.94,23.37],[-12.87,23.28],[-13.12,22.77],[-12.93,21.33],[-16.85,21.33],[-17.06,21],[-17.02,21.42],[-17,21.42],[-14.75,21.5],[-14.63,21.86],[-14.22,22.31],[-13.89,23.69],[-12.5,24.77],[-12.03,26.03],[-11.72,26.1],[-11.39,26.88],[-10.55,26.99],[-10.19,26.86],[-9.74,26.86],[-9.41,27.09],[-8.79,27.12],[-8.82,27.66],[-8.67,27.66]]]]},{n:`Canada`,a2:`CA`,a3:`CAN`,p:`CA`,l:[-101.91,60.32],g:[[[[-122.84,49],[-122.97,49],[-124.91,49.98],[-125.62,50.42],[-127.44,50.83],[-127.99,51.72],[-127.85,52.33],[-129.13,52.76],[-129.31,53.56],[-130.51,54.29],[-130.54,54.8],[-129.98,55.29],[-130.01,55.92],[-131.71,56.55],[-132.73,57.69],[-133.36,58.41],[-134.27,58.86],[-134.94,59.27],[-135.48,59.79],[-136.48,59.46],[-137.45,58.91],[-138.34,59.56],[-139.04,60],[-140.01,60.28],[-141,60.31],[-140.99,66],[-140.99,69.71],[-139.12,69.47],[-137.55,68.99],[-136.5,68.9],[-135.63,69.32],[-134.41,69.63],[-132.93,69.51],[-131.43,69.94],[-129.79,70.19],[-129.11,69.78],[-128.36,70.01],[-128.14,70.48],[-127.45,70.38],[-125.76,69.48],[-124.42,70.16],[-124.29,69.4],[-123.06,69.56],[-122.68,69.86],[-121.47,69.8],[-119.94,69.38],[-117.6,69.01],[-116.23,68.84],[-115.25,68.91],[-113.9,68.4],[-115.3,67.9],[-113.5,67.69],[-110.8,67.81],[-109.95,67.98],[-108.88,67.38],[-107.79,67.89],[-108.81,68.31],[-108.17,68.65],[-106.95,68.7],[-106.15,68.8],[-105.34,68.56],[-104.34,68.02],[-103.22,68.1],[-101.45,67.65],[-99.9,67.81],[-98.44,67.78],[-98.56,68.4],[-97.67,68.58],[-96.12,68.24],[-96.13,67.29],[-95.49,68.09],[-94.68,68.06],[-94.23,69.07],[-95.3,69.69],[-96.47,70.09],[-96.39,71.19],[-95.21,71.92],[-93.89,71.76],[-92.88,71.32],[-91.52,70.19],[-92.41,69.7],[-90.55,69.5],[-90.55,68.47],[-89.22,69.26],[-88.02,68.62],[-88.32,67.87],[-87.35,67.2],[-86.31,67.92],[-85.58,68.78],[-85.52,69.88],[-84.1,69.81],[-82.62,69.66],[-81.28,69.16],[-81.22,68.67],[-81.96,68.13],[-81.26,67.6],[-81.39,67.11],[-83.34,66.41],[-84.74,66.26],[-85.77,66.56],[-86.07,66.06],[-87.03,65.21],[-87.32,64.78],[-88.48,64.1],[-89.91,64.03],[-90.7,63.61],[-90.77,62.96],[-91.93,62.84],[-93.16,62.02],[-94.24,60.9],[-94.63,60.11],[-94.68,58.95],[-93.22,58.78],[-92.76,57.85],[-92.3,57.09],[-90.9,57.28],[-89.04,56.85],[-88.04,56.47],[-87.32,56],[-86.07,55.72],[-85.01,55.3],[-83.36,55.24],[-82.27,55.15],[-82.44,54.28],[-82.13,53.28],[-81.4,52.16],[-79.91,51.21],[-79.14,51.53],[-78.6,52.56],[-79.12,54.14],[-79.83,54.67],[-78.23,55.14],[-77.1,55.84],[-76.54,56.53],[-76.62,57.2],[-77.3,58.05],[-78.52,58.8],[-77.34,59.85],[-77.77,60.76],[-78.11,62.32],[-77.41,62.55],[-75.7,62.28],[-74.67,62.18],[-73.84,62.44],[-72.91,62.11],[-71.68,61.53],[-71.37,61.14],[-69.59,61.06],[-69.62,60.22],[-69.29,58.96],[-68.37,58.8],[-67.65,58.21],[-66.2,58.77],[-65.25,59.87],[-64.58,60.34],[-63.8,59.44],[-62.5,58.17],[-61.4,56.97],[-61.8,56.34],[-60.47,55.78],[-59.57,55.2],[-57.98,54.95],[-57.33,54.63],[-56.94,53.78],[-56.16,53.65],[-55.76,53.27],[-55.68,52.15],[-56.41,51.77],[-57.13,51.42],[-58.77,51.06],[-60.03,50.24],[-61.72,50.08],[-63.86,50.29],[-65.36,50.3],[-66.4,50.23],[-67.24,49.51],[-68.51,49.07],[-69.95,47.74],[-71.1,46.82],[-70.26,46.99],[-68.65,48.3],[-66.55,49.13],[-65.06,49.23],[-64.17,48.74],[-65.12,48.07],[-64.8,46.99],[-64.47,46.24],[-63.17,45.74],[-61.52,45.88],[-60.52,47.01],[-60.45,46.28],[-59.8,45.92],[-61.04,45.27],[-63.25,44.67],[-64.25,44.27],[-65.36,43.55],[-66.12,43.62],[-66.16,44.47],[-64.43,45.29],[-66.03,45.26],[-67.14,45.14],[-67.79,45.7],[-67.79,47.07],[-68.23,47.35],[-68.9,47.19],[-69.24,47.45],[-70,46.69],[-70.31,45.92],[-70.66,45.46],[-71.08,45.31],[-71.4,45.26],[-71.51,45.01],[-73.35,45.01],[-74.87,45],[-75.32,44.82],[-76.37,44.1],[-76.5,44.02],[-76.82,43.63],[-77.74,43.63],[-78.72,43.63],[-79.17,43.47],[-79.01,43.27],[-78.92,42.97],[-78.94,42.86],[-80.25,42.37],[-81.28,42.21],[-82.44,41.68],[-82.69,41.68],[-83.03,41.83],[-83.14,41.98],[-83.12,42.08],[-82.9,42.43],[-82.43,42.98],[-82.14,43.57],[-82.34,44.44],[-82.55,45.35],[-83.59,45.82],[-83.47,45.99],[-83.62,46.12],[-83.89,46.12],[-84.09,46.28],[-84.14,46.51],[-84.34,46.41],[-84.6,46.44],[-84.54,46.54],[-84.78,46.64],[-84.88,46.9],[-85.65,47.22],[-86.46,47.55],[-87.44,47.94],[-88.38,48.3],[-89.27,48.02],[-89.6,48.01],[-90.83,48.27],[-91.64,48.14],[-92.61,48.45],[-93.63,48.61],[-94.33,48.67],[-94.64,48.84],[-94.82,49.39],[-95.16,49.38],[-95.16,49],[-97.23,49],[-100.65,49],[-104.05,49],[-107.05,49],[-110.05,49],[-113,49],[-116.05,49],[-117.03,49],[-120,49],[-122.84,49]]],[[[-83.99,62.45],[-83.25,62.91],[-81.88,62.9],[-81.9,62.71],[-83.07,62.16],[-83.77,62.18],[-83.99,62.45]]],[[[-79.78,72.8],[-80.88,73.33],[-80.83,73.69],[-80.35,73.76],[-78.06,73.65],[-76.34,73.1],[-76.25,72.83],[-77.31,72.86],[-78.39,72.88],[-79.49,72.74],[-79.78,72.8]]],[[[-80.32,62.09],[-79.93,62.39],[-79.52,62.36],[-79.27,62.16],[-79.66,61.63],[-80.1,61.72],[-80.36,62.02],[-80.32,62.09]]],[[[-93.61,74.98],[-94.16,74.59],[-95.61,74.67],[-96.82,74.93],[-96.29,75.38],[-94.85,75.65],[-93.98,75.3],[-93.61,74.98]]],[[[-93.84,77.52],[-94.3,77.49],[-96.17,77.56],[-96.44,77.83],[-94.42,77.82],[-93.72,77.63],[-93.84,77.52]]],[[[-96.75,78.77],[-95.56,78.42],[-95.83,78.06],[-97.31,77.85],[-98.12,78.08],[-98.55,78.46],[-98.63,78.87],[-97.34,78.83],[-96.75,78.77]]],[[[-88.15,74.39],[-89.76,74.52],[-92.42,74.84],[-92.77,75.39],[-92.89,75.88],[-93.89,76.32],[-95.96,76.44],[-97.12,76.75],[-96.75,77.16],[-94.68,77.1],[-93.57,76.78],[-91.61,76.78],[-90.74,76.45],[-90.97,76.07],[-89.82,75.85],[-89.19,75.61],[-87.84,75.57],[-86.38,75.48],[-84.79,75.7],[-82.75,75.78],[-81.13,75.71],[-80.06,75.34],[-79.83,74.92],[-80.46,74.66],[-81.95,74.44],[-83.23,74.56],[-86.1,74.41],[-88.15,74.39]]],[[[-111.26,78.15],[-109.85,78],[-110.19,77.7],[-112.05,77.41],[-113.53,77.73],[-112.72,78.05],[-111.26,78.15]]],[[[-110.96,78.8],[-109.66,78.6],[-110.88,78.41],[-112.54,78.41],[-112.53,78.55],[-111.5,78.85],[-110.96,78.8]]],[[[-55.6,51.32],[-56.13,50.69],[-56.8,49.81],[-56.14,50.15],[-55.47,49.94],[-55.82,49.59],[-54.94,49.31],[-54.47,49.56],[-53.48,49.25],[-53.79,48.52],[-53.09,48.69],[-52.96,48.16],[-52.65,47.54],[-53.07,46.66],[-53.52,46.62],[-54.18,46.81],[-53.96,47.63],[-54.24,47.75],[-55.4,46.88],[-56,46.92],[-55.29,47.39],[-56.25,47.63],[-57.33,47.57],[-59.27,47.6],[-59.42,47.9],[-58.8,48.25],[-59.23,48.52],[-58.39,49.13],[-57.36,50.72],[-56.74,51.29],[-55.87,51.63],[-55.41,51.59],[-55.6,51.32]]],[[[-83.88,65.11],[-82.79,64.77],[-81.64,64.46],[-81.55,63.98],[-80.82,64.06],[-80.1,63.73],[-80.99,63.41],[-82.55,63.65],[-83.11,64.1],[-84.1,63.57],[-85.52,63.05],[-85.87,63.64],[-87.22,63.54],[-86.35,64.04],[-86.22,64.82],[-85.88,65.74],[-85.16,65.66],[-84.98,65.22],[-84.46,65.37],[-83.88,65.11]]],[[[-78.77,72.35],[-77.82,72.75],[-75.61,72.24],[-74.23,71.77],[-74.1,71.33],[-72.24,71.56],[-71.2,70.92],[-68.79,70.53],[-67.91,70.12],[-66.97,69.19],[-68.81,68.72],[-66.45,68.07],[-64.86,67.85],[-63.42,66.93],[-61.85,66.86],[-62.16,66.16],[-63.92,65],[-65.15,65.43],[-66.72,66.39],[-68.02,66.26],[-68.14,65.69],[-67.09,65.11],[-65.73,64.65],[-65.32,64.38],[-64.67,63.39],[-65.01,62.67],[-66.28,62.95],[-68.78,63.75],[-67.37,62.88],[-66.33,62.28],[-66.17,61.93],[-68.88,62.33],[-71.02,62.91],[-72.24,63.4],[-71.89,63.68],[-73.38,64.19],[-74.83,64.68],[-74.82,64.39],[-77.71,64.23],[-78.56,64.57],[-77.9,65.31],[-76.02,65.33],[-73.96,65.45],[-74.29,65.81],[-73.94,66.31],[-72.65,67.28],[-72.93,67.73],[-73.31,68.07],[-74.84,68.55],[-76.87,68.89],[-76.23,69.15],[-77.29,69.77],[-78.17,69.83],[-78.96,70.17],[-79.49,69.87],[-81.31,69.74],[-84.94,69.97],[-87.06,70.26],[-88.68,70.41],[-89.51,70.76],[-88.47,71.22],[-89.89,71.22],[-90.21,72.24],[-89.44,73.13],[-88.41,73.54],[-85.83,73.8],[-86.56,73.16],[-85.77,72.53],[-84.85,73.34],[-82.32,73.75],[-80.6,72.72],[-80.75,72.06],[-78.77,72.35]]],[[[-94.5,74.13],[-92.42,74.1],[-90.51,73.86],[-92,72.97],[-93.2,72.77],[-94.27,72.02],[-95.41,72.06],[-96.03,72.94],[-96.02,73.44],[-95.5,73.86],[-94.5,74.13]]],[[[-122.85,76.12],[-121.16,76.86],[-119.1,77.51],[-117.57,77.5],[-116.2,77.65],[-116.34,76.88],[-117.11,76.53],[-118.04,76.48],[-119.9,76.05],[-121.5,75.9],[-122.85,76.12]]],[[[-132.71,54.04],[-131.75,54.12],[-132.05,52.98],[-131.18,52.18],[-131.58,52.18],[-132.18,52.64],[-132.55,53.1],[-133.05,53.41],[-133.24,53.85],[-133.18,54.17],[-132.71,54.04]]],[[[-105.49,79.3],[-103.53,79.17],[-100.83,78.8],[-100.06,78.32],[-99.67,77.91],[-101.3,78.02],[-102.95,78.34],[-105.18,78.38],[-104.21,78.68],[-105.42,78.92],[-105.49,79.3]]],[[[-123.51,48.51],[-124.01,48.37],[-125.66,48.83],[-125.95,49.18],[-126.85,49.53],[-127.03,49.81],[-128.06,49.99],[-128.44,50.54],[-128.36,50.77],[-127.31,50.55],[-126.7,50.4],[-125.76,50.3],[-125.42,49.95],[-124.92,49.48],[-123.92,49.06],[-123.51,48.51]]],[[[-121.54,74.45],[-120.11,74.24],[-117.56,74.19],[-116.58,73.9],[-115.51,73.48],[-116.77,73.22],[-119.22,72.52],[-120.46,71.82],[-120.46,71.38],[-123.09,70.9],[-123.62,71.34],[-125.93,71.87],[-125.5,72.29],[-124.81,73.02],[-123.94,73.68],[-124.92,74.29],[-121.54,74.45]]],[[[-107.82,75.85],[-106.93,76.01],[-105.88,75.97],[-105.7,75.48],[-106.31,75.01],[-109.7,74.85],[-112.22,74.42],[-113.74,74.39],[-113.87,74.72],[-111.79,75.16],[-116.31,75.04],[-117.71,75.22],[-116.35,76.2],[-115.4,76.48],[-112.59,76.14],[-110.81,75.55],[-109.07,75.47],[-110.5,76.43],[-109.58,76.79],[-108.55,76.68],[-108.21,76.2],[-107.82,75.85]]],[[[-106.52,73.08],[-105.4,72.67],[-104.77,71.7],[-104.46,70.99],[-102.79,70.5],[-100.98,70.02],[-101.09,69.58],[-102.73,69.5],[-102.09,69.12],[-102.43,68.75],[-104.24,68.91],[-105.96,69.18],[-107.12,69.12],[-109,68.78],[-111.53,68.63],[-113.31,68.54],[-113.85,69.01],[-115.22,69.28],[-116.11,69.17],[-117.34,69.96],[-116.67,70.07],[-115.13,70.24],[-113.72,70.19],[-112.42,70.37],[-114.35,70.6],[-116.49,70.52],[-117.9,70.54],[-118.43,70.91],[-116.11,71.31],[-117.66,71.3],[-119.4,71.56],[-118.56,72.31],[-117.87,72.71],[-115.19,73.31],[-114.17,73.12],[-114.67,72.65],[-112.44,72.96],[-111.05,72.45],[-109.92,72.96],[-109.01,72.63],[-108.19,71.65],[-107.69,72.07],[-108.4,73.09],[-107.52,73.24],[-106.52,73.08]]],[[[-100.44,72.71],[-101.54,73.36],[-100.36,73.84],[-99.16,73.63],[-97.38,73.76],[-97.12,73.47],[-98.05,72.99],[-96.54,72.56],[-96.72,71.66],[-98.36,71.27],[-99.32,71.36],[-100.01,71.74],[-102.5,72.51],[-102.48,72.83],[-100.44,72.71]]],[[[-106.6,73.6],[-105.26,73.64],[-104.5,73.42],[-105.38,72.76],[-106.94,73.46],[-106.6,73.6]]],[[[-98.5,76.72],[-97.74,76.26],[-97.7,75.74],[-98.16,75],[-99.81,74.9],[-100.88,75.06],[-100.86,75.64],[-102.5,75.56],[-102.57,76.34],[-101.49,76.31],[-99.98,76.65],[-98.58,76.59],[-98.5,76.72]]],[[[-96.02,80.6],[-95.32,80.91],[-94.3,80.98],[-94.74,81.21],[-92.41,81.26],[-91.13,80.72],[-89.45,80.51],[-87.81,80.32],[-87.02,79.66],[-85.81,79.34],[-87.19,79.04],[-89.04,78.29],[-90.8,78.22],[-92.88,78.34],[-93.95,78.75],[-93.94,79.11],[-93.15,79.38],[-94.97,79.37],[-96.08,79.71],[-96.71,80.16],[-96.02,80.6]]],[[[-91.59,81.89],[-90.1,82.09],[-88.93,82.12],[-86.97,82.28],[-85.5,82.65],[-84.26,82.6],[-83.18,82.32],[-82.42,82.86],[-81.1,83.02],[-79.31,83.13],[-76.25,83.17],[-75.72,83.06],[-72.83,83.23],[-70.67,83.17],[-68.5,83.11],[-65.83,83.03],[-63.68,82.9],[-61.85,82.63],[-61.89,82.36],[-64.33,81.93],[-66.75,81.73],[-67.66,81.5],[-65.48,81.51],[-67.84,80.9],[-69.47,80.62],[-71.18,79.8],[-73.24,79.63],[-73.88,79.43],[-76.91,79.32],[-75.53,79.2],[-76.22,79.02],[-75.39,78.53],[-76.34,78.18],[-77.89,77.9],[-78.36,77.51],[-79.76,77.21],[-79.62,76.98],[-77.91,77.02],[-77.89,76.78],[-80.56,76.18],[-83.17,76.45],[-86.11,76.3],[-87.6,76.42],[-89.49,76.47],[-89.62,76.95],[-87.77,77.18],[-88.26,77.9],[-87.65,77.97],[-84.98,77.54],[-86.34,78.18],[-87.96,78.37],[-87.15,78.76],[-85.38,79],[-85.09,79.35],[-86.51,79.74],[-86.93,80.25],[-84.2,80.21],[-83.41,80.1],[-81.85,80.46],[-84.1,80.58],[-87.6,80.52],[-89.37,80.86],[-90.2,81.26],[-91.37,81.55],[-91.59,81.89]]],[[[-75.22,67.44],[-75.87,67.15],[-76.99,67.1],[-77.24,67.59],[-76.81,68.15],[-75.9,68.29],[-75.11,68.01],[-75.1,67.58],[-75.22,67.44]]],[[[-96.26,69.49],[-95.65,69.11],[-96.27,68.76],[-97.62,69.06],[-98.43,68.95],[-99.8,69.4],[-98.92,69.71],[-98.22,70.14],[-97.16,69.86],[-96.56,69.68],[-96.26,69.49]]],[[[-64.52,49.87],[-64.17,49.96],[-62.86,49.71],[-61.84,49.29],[-61.81,49.11],[-62.29,49.09],[-63.59,49.4],[-64.52,49.87]]],[[[-64.01,47.04],[-63.66,46.55],[-62.94,46.42],[-62.01,46.44],[-62.5,46.03],[-62.87,45.97],[-64.14,46.39],[-64.39,46.73],[-64.01,47.04]]]]},{n:`United States`,a2:`US`,a3:`USA`,p:`US`,l:[-97.48,39.54],g:[[[[-122.84,49],[-120,49],[-117.03,49],[-116.05,49],[-113,49],[-110.05,49],[-107.05,49],[-104.05,49],[-100.65,49],[-97.23,49],[-95.16,49],[-95.16,49.38],[-94.82,49.39],[-94.64,48.84],[-94.33,48.67],[-93.63,48.61],[-92.61,48.45],[-91.64,48.14],[-90.83,48.27],[-89.6,48.01],[-89.27,48.02],[-88.38,48.3],[-87.44,47.94],[-86.46,47.55],[-85.65,47.22],[-84.88,46.9],[-84.78,46.64],[-84.54,46.54],[-84.6,46.44],[-84.34,46.41],[-84.14,46.51],[-84.09,46.28],[-83.89,46.12],[-83.62,46.12],[-83.47,45.99],[-83.59,45.82],[-82.55,45.35],[-82.34,44.44],[-82.14,43.57],[-82.43,42.98],[-82.9,42.43],[-83.12,42.08],[-83.14,41.98],[-83.03,41.83],[-82.69,41.68],[-82.44,41.68],[-81.28,42.21],[-80.25,42.37],[-78.94,42.86],[-78.92,42.97],[-79.01,43.27],[-79.17,43.47],[-78.72,43.63],[-77.74,43.63],[-76.82,43.63],[-76.5,44.02],[-76.37,44.1],[-75.32,44.82],[-74.87,45],[-73.35,45.01],[-71.51,45.01],[-71.4,45.26],[-71.08,45.31],[-70.66,45.46],[-70.31,45.92],[-70,46.69],[-69.24,47.45],[-68.9,47.19],[-68.23,47.35],[-67.79,47.07],[-67.79,45.7],[-67.14,45.14],[-66.96,44.81],[-68.03,44.33],[-69.06,43.98],[-70.12,43.68],[-70.65,43.09],[-70.81,42.87],[-70.82,42.34],[-70.49,41.81],[-70.08,41.78],[-70.18,42.15],[-69.88,41.92],[-69.97,41.64],[-70.64,41.48],[-71.12,41.49],[-71.86,41.32],[-72.29,41.27],[-72.88,41.22],[-73.71,40.93],[-72.24,41.12],[-71.94,40.93],[-73.34,40.63],[-73.98,40.63],[-73.95,40.75],[-74.26,40.47],[-73.96,40.43],[-74.18,39.71],[-74.91,38.94],[-74.98,39.2],[-75.2,39.25],[-75.53,39.5],[-75.32,38.96],[-75.07,38.78],[-75.06,38.4],[-75.38,38.02],[-75.94,37.22],[-76.03,37.26],[-75.72,37.94],[-76.23,38.32],[-76.35,39.15],[-76.54,38.72],[-76.33,38.08],[-76.99,38.24],[-76.3,37.92],[-76.26,36.97],[-75.97,36.9],[-75.87,36.55],[-75.73,35.55],[-76.36,34.81],[-77.4,34.51],[-78.05,33.93],[-78.55,33.86],[-79.06,33.49],[-79.2,33.16],[-80.3,32.51],[-80.86,32.03],[-81.34,31.44],[-81.49,30.73],[-81.31,30.04],[-80.98,29.18],[-80.54,28.47],[-80.53,28.04],[-80.06,26.88],[-80.09,26.21],[-80.13,25.82],[-80.38,25.21],[-80.68,25.08],[-81.17,25.2],[-81.33,25.64],[-81.71,25.87],[-82.24,26.73],[-82.71,27.5],[-82.86,27.89],[-82.65,28.55],[-82.93,29.1],[-83.71,29.94],[-84.1,30.09],[-85.11,29.64],[-85.29,29.69],[-85.77,30.15],[-86.4,30.4],[-87.53,30.27],[-88.42,30.38],[-89.18,30.32],[-89.59,30.16],[-89.41,29.89],[-89.43,29.49],[-89.22,29.29],[-89.41,29.16],[-89.78,29.31],[-90.15,29.12],[-90.88,29.15],[-91.63,29.68],[-92.5,29.55],[-93.23,29.78],[-93.85,29.71],[-94.69,29.48],[-95.6,28.74],[-96.59,28.31],[-97.14,27.83],[-97.37,27.38],[-97.38,26.69],[-97.33,26.21],[-97.14,25.87],[-97.53,25.84],[-98.24,26.06],[-99.02,26.37],[-99.3,26.84],[-99.52,27.54],[-100.11,28.11],[-100.46,28.7],[-100.96,29.38],[-101.66,29.78],[-102.48,29.76],[-103.11,28.97],[-103.94,29.27],[-104.46,29.57],[-104.71,30.12],[-105.04,30.64],[-105.63,31.08],[-106.14,31.4],[-106.51,31.75],[-108.24,31.75],[-108.24,31.34],[-109.03,31.34],[-111.02,31.33],[-113.3,32.04],[-114.81,32.53],[-114.72,32.72],[-115.99,32.61],[-117.13,32.54],[-117.3,33.05],[-117.94,33.62],[-118.41,33.74],[-118.52,34.03],[-119.08,34.08],[-119.44,34.35],[-120.37,34.45],[-120.62,34.61],[-120.74,35.16],[-121.71,36.16],[-122.55,37.55],[-122.51,37.78],[-122.95,38.11],[-123.73,38.95],[-123.87,39.77],[-124.4,40.31],[-124.18,41.14],[-124.21,42],[-124.53,42.77],[-124.14,43.71],[-124.02,44.62],[-123.9,45.52],[-124.08,46.86],[-124.4,47.72],[-124.69,48.18],[-124.57,48.38],[-123.12,48.04],[-122.59,47.1],[-122.34,47.36],[-122.5,48.18],[-122.84,49]]],[[[-155.4,20.08],[-155.22,19.99],[-155.06,19.86],[-154.81,19.51],[-154.83,19.45],[-155.22,19.24],[-155.54,19.08],[-155.69,18.92],[-155.94,19.06],[-155.91,19.34],[-156.07,19.7],[-156.02,19.81],[-155.85,19.98],[-155.92,20.17],[-155.86,20.27],[-155.79,20.25],[-155.4,20.08]]],[[[-156,20.76],[-156.08,20.64],[-156.41,20.57],[-156.59,20.78],[-156.7,20.86],[-156.71,20.93],[-156.61,21.01],[-156.26,20.92],[-156,20.76]]],[[[-156.76,21.18],[-156.79,21.07],[-157.33,21.1],[-157.25,21.22],[-156.76,21.18]]],[[[-158.03,21.72],[-157.94,21.65],[-157.65,21.32],[-157.71,21.26],[-157.78,21.28],[-158.13,21.31],[-158.25,21.54],[-158.29,21.58],[-158.03,21.72]]],[[[-159.37,22.21],[-159.35,21.98],[-159.46,21.88],[-159.8,22.07],[-159.75,22.14],[-159.6,22.24],[-159.37,22.21]]],[[[-166.47,60.38],[-165.67,60.29],[-165.58,59.91],[-166.19,59.75],[-166.85,59.94],[-167.46,60.21],[-166.47,60.38]]],[[[-153.23,57.97],[-152.56,57.9],[-152.14,57.59],[-153.01,57.12],[-154.01,56.73],[-154.52,56.99],[-154.67,57.46],[-153.76,57.82],[-153.23,57.97]]],[[[-140.99,69.71],[-140.99,66],[-141,60.31],[-140.01,60.28],[-139.04,60],[-138.34,59.56],[-137.45,58.91],[-136.48,59.46],[-135.48,59.79],[-134.94,59.27],[-134.27,58.86],[-133.36,58.41],[-132.73,57.69],[-131.71,56.55],[-130.01,55.92],[-129.98,55.29],[-130.54,54.8],[-131.09,55.18],[-131.97,55.5],[-132.25,56.37],[-133.54,57.18],[-134.08,58.12],[-135.04,58.19],[-136.63,58.21],[-137.8,58.5],[-139.87,59.54],[-140.83,59.73],[-142.57,60.08],[-143.96,60],[-145.93,60.46],[-147.11,60.88],[-148.22,60.67],[-148.02,59.98],[-148.57,59.91],[-149.73,59.71],[-150.61,59.37],[-151.72,59.16],[-151.86,59.74],[-151.41,60.73],[-150.35,61.03],[-150.62,61.28],[-151.9,60.73],[-152.58,60.06],[-154.02,59.35],[-153.29,58.86],[-154.23,58.15],[-155.31,57.73],[-156.31,57.42],[-156.56,56.98],[-158.12,56.46],[-158.43,55.99],[-159.6,55.57],[-160.29,55.64],[-161.22,55.36],[-162.24,55.02],[-163.07,54.69],[-164.79,54.4],[-164.94,54.57],[-163.85,55.04],[-162.87,55.35],[-161.8,55.89],[-160.56,56.01],[-160.07,56.42],[-158.68,57.02],[-158.46,57.22],[-157.72,57.57],[-157.55,58.33],[-157.04,58.92],[-158.19,58.62],[-158.52,58.79],[-159.06,58.42],[-159.71,58.93],[-159.98,58.57],[-160.36,59.07],[-161.36,58.67],[-161.97,58.67],[-162.05,59.27],[-161.87,59.63],[-162.52,59.99],[-163.82,59.8],[-164.66,60.27],[-165.35,60.51],[-165.35,61.07],[-166.12,61.5],[-165.73,62.07],[-164.92,62.63],[-164.56,63.15],[-163.75,63.22],[-163.07,63.06],[-162.26,63.54],[-161.53,63.46],[-160.77,63.77],[-160.96,64.22],[-161.52,64.4],[-160.78,64.79],[-161.39,64.78],[-162.45,64.56],[-162.76,64.34],[-163.55,64.56],[-164.96,64.45],[-166.43,64.69],[-166.85,65.09],[-168.11,65.67],[-166.71,66.09],[-164.47,66.58],[-163.65,66.58],[-163.79,66.08],[-161.68,66.12],[-162.49,66.74],[-163.72,67.12],[-164.43,67.62],[-165.39,68.04],[-166.76,68.36],[-166.2,68.88],[-164.43,68.92],[-163.17,69.37],[-162.93,69.86],[-161.91,70.33],[-160.93,70.45],[-159.04,70.89],[-158.12,70.82],[-156.58,71.36],[-155.07,71.15],[-154.34,70.7],[-153.9,70.89],[-152.21,70.83],[-152.27,70.6],[-150.74,70.43],[-149.72,70.53],[-147.61,70.21],[-145.69,70.12],[-144.92,69.99],[-143.59,70.15],[-142.07,69.85],[-140.99,69.71]]],[[[-171.73,63.78],[-171.11,63.59],[-170.49,63.69],[-169.68,63.43],[-168.69,63.3],[-168.77,63.19],[-169.53,62.98],[-170.29,63.19],[-170.67,63.38],[-171.55,63.32],[-171.79,63.41],[-171.73,63.78]]]]},{n:`Kazakhstan`,a2:`KZ`,a3:`KAZ`,p:`KZ`,l:[68.69,49.05],g:[[[[87.36,49.21],[86.6,48.55],[85.77,48.46],[85.72,47.45],[85.16,47],[83.18,47.33],[82.46,45.54],[81.95,45.32],[79.97,44.92],[80.87,43.18],[80.18,42.92],[80.26,42.35],[79.64,42.5],[79.14,42.86],[77.66,42.96],[76,42.99],[75.64,42.88],[74.21,43.3],[73.65,43.09],[73.49,42.5],[71.84,42.85],[71.19,42.7],[70.96,42.27],[70.39,42.08],[69.07,41.38],[68.63,40.67],[68.26,40.66],[67.99,41.14],[66.71,41.17],[66.51,41.99],[66.02,41.99],[66.1,43],[64.9,43.73],[63.19,43.65],[62.01,43.5],[61.06,44.41],[60.24,44.78],[58.69,45.5],[58.5,45.59],[55.93,45],[55.97,41.31],[55.46,41.26],[54.76,42.04],[54.08,42.32],[52.94,42.12],[52.5,41.78],[52.45,42.03],[52.69,42.44],[52.5,42.79],[51.34,43.13],[50.89,44.03],[50.34,44.28],[50.31,44.61],[51.28,44.51],[51.32,45.25],[52.17,45.41],[53.04,45.26],[53.22,46.23],[53.04,46.85],[52.04,46.8],[51.19,47.05],[50.03,46.61],[49.1,46.4],[48.59,46.56],[48.69,47.08],[48.06,47.74],[47.32,47.72],[46.47,48.39],[47.04,49.15],[46.75,49.36],[47.55,50.45],[48.58,49.87],[48.7,50.61],[50.77,51.69],[52.33,51.72],[54.53,51.03],[55.72,50.62],[56.78,51.04],[58.36,51.06],[59.64,50.55],[59.93,50.84],[61.34,50.8],[61.59,51.27],[59.97,51.96],[60.93,52.45],[60.74,52.72],[61.7,52.98],[60.98,53.66],[61.44,54.01],[65.18,54.35],[65.67,54.6],[68.17,54.97],[69.07,55.39],[70.87,55.17],[71.18,54.13],[72.22,54.38],[73.51,54.04],[73.43,53.49],[74.38,53.55],[76.89,54.49],[76.53,54.18],[77.8,53.4],[80.04,50.86],[80.57,51.39],[81.95,50.81],[83.38,51.07],[83.94,50.89],[84.42,50.31],[85.12,50.12],[85.54,49.69],[86.83,49.83],[87.36,49.21]]]]},{n:`Uzbekistan`,a2:`UZ`,a3:`UZB`,p:`UZ`,l:[64.01,41.69],g:[[[[55.97,41.31],[55.93,45],[58.5,45.59],[58.69,45.5],[60.24,44.78],[61.06,44.41],[62.01,43.5],[63.19,43.65],[64.9,43.73],[66.1,43],[66.02,41.99],[66.51,41.99],[66.71,41.17],[67.99,41.14],[68.26,40.66],[68.63,40.67],[69.07,41.38],[70.39,42.08],[70.96,42.27],[71.26,42.17],[70.42,41.52],[71.16,41.14],[71.87,41.39],[73.06,40.87],[71.77,40.15],[71.01,40.24],[70.6,40.22],[70.46,40.5],[70.67,40.96],[69.33,40.73],[69.01,40.09],[68.54,39.53],[67.7,39.58],[67.44,39.14],[68.18,38.9],[68.39,38.16],[67.83,37.14],[67.08,37.36],[66.52,37.36],[66.55,37.97],[65.22,38.4],[64.17,38.89],[63.52,39.36],[62.37,40.05],[61.88,41.08],[61.55,41.27],[60.47,41.22],[60.08,41.43],[59.98,42.22],[58.63,42.75],[57.79,42.17],[56.93,41.83],[57.1,41.32],[55.97,41.31]]]]},{n:`Papua New Guinea`,a2:`PG`,a3:`PNG`,p:`PG`,l:[143.91,-5.7],g:[[[[141,-2.6],[142.74,-3.29],[144.58,-3.86],[145.27,-4.37],[145.83,-4.88],[145.98,-5.47],[147.65,-6.08],[147.89,-6.61],[146.97,-6.72],[147.19,-7.39],[148.08,-8.04],[148.73,-9.1],[149.31,-9.07],[149.27,-9.51],[150.04,-9.68],[149.74,-9.87],[150.8,-10.29],[150.69,-10.58],[150.03,-10.65],[149.78,-10.39],[148.92,-10.28],[147.91,-10.13],[147.14,-9.49],[146.57,-8.94],[146.05,-8.07],[144.74,-7.63],[143.9,-7.92],[143.29,-8.25],[143.41,-8.98],[142.63,-9.33],[142.07,-9.16],[141.03,-9.12],[141.02,-5.86],[141,-2.6]]],[[[152.64,-3.66],[153.02,-3.98],[153.14,-4.5],[152.83,-4.77],[152.64,-4.18],[152.41,-3.79],[151.95,-3.46],[151.38,-3.04],[150.66,-2.74],[150.94,-2.5],[151.48,-2.78],[151.82,-3],[152.24,-3.24],[152.64,-3.66]]],[[[151.3,-5.84],[150.75,-6.08],[150.24,-6.32],[149.71,-6.32],[148.89,-6.03],[148.32,-5.75],[148.4,-5.44],[149.3,-5.58],[149.85,-5.51],[150,-5.03],[150.14,-5],[150.24,-5.53],[150.81,-5.46],[151.09,-5.11],[151.65,-4.76],[151.54,-4.17],[152.14,-4.15],[152.34,-4.31],[152.32,-4.87],[151.98,-5.48],[151.46,-5.56],[151.3,-5.84]]],[[[154.76,-5.34],[155.06,-5.57],[155.55,-6.2],[156.02,-6.54],[155.88,-6.82],[155.6,-6.92],[155.17,-6.54],[154.73,-5.9],[154.51,-5.14],[154.65,-5.04],[154.76,-5.34]]]]},{n:`Indonesia`,a2:`ID`,a3:`IDN`,p:`INDO`,l:[101.89,-.95],g:[[[[141,-2.6],[141.02,-5.86],[141.03,-9.12],[140.14,-8.3],[139.13,-8.1],[138.88,-8.38],[137.61,-8.41],[138.04,-7.6],[138.67,-7.32],[138.41,-6.23],[137.93,-5.39],[135.99,-4.55],[135.16,-4.46],[133.66,-3.54],[133.37,-4.02],[132.98,-4.11],[132.76,-3.75],[132.75,-3.31],[131.99,-2.82],[133.07,-2.46],[133.78,-2.48],[133.7,-2.21],[132.23,-2.21],[131.84,-1.62],[130.94,-1.43],[130.52,-.94],[131.87,-.7],[132.38,-.37],[133.99,-.78],[134.14,-1.15],[134.42,-2.77],[135.46,-3.37],[136.29,-2.31],[137.44,-1.7],[138.33,-1.7],[139.18,-2.05],[139.93,-2.41],[141,-2.6]]],[[[124.97,-8.89],[125.07,-9.09],[125.09,-9.39],[124.44,-10.14],[123.58,-10.36],[123.46,-10.24],[123.55,-9.9],[123.98,-9.29],[124.97,-8.89]]],[[[134.21,-6.9],[134.11,-6.14],[134.29,-5.78],[134.5,-5.45],[134.73,-5.74],[134.72,-6.21],[134.21,-6.9]]],[[[117.88,4.14],[117.31,3.23],[118.05,2.29],[117.88,1.83],[119,.9],[117.81,.78],[117.48,.1],[117.52,-.8],[116.56,-1.49],[116.53,-2.48],[116.15,-4.01],[116,-3.66],[114.86,-4.11],[114.47,-3.5],[113.76,-3.44],[113.26,-3.12],[112.07,-3.48],[111.7,-2.99],[111.05,-3.05],[110.22,-2.93],[110.07,-1.59],[109.57,-1.31],[109.09,-.46],[108.95,.42],[109.07,1.34],[109.66,2.01],[109.83,1.34],[110.51,.77],[111.16,.98],[111.8,.9],[112.38,1.41],[112.86,1.5],[113.81,1.22],[114.62,1.43],[115.13,2.82],[115.52,3.17],[115.87,4.31],[117.02,4.31],[117.88,4.14]]],[[[129.37,-2.8],[130.47,-3.09],[130.83,-3.86],[129.99,-3.45],[129.16,-3.36],[128.59,-3.43],[127.9,-3.39],[128.14,-2.84],[129.37,-2.8]]],[[[126.87,-3.79],[126.18,-3.61],[125.99,-3.18],[127,-3.13],[127.25,-3.46],[126.87,-3.79]]],[[[127.93,2.17],[128,1.63],[128.59,1.54],[128.69,1.13],[128.64,.26],[128.12,.36],[127.97,-.25],[128.38,-.78],[128.1,-.9],[127.7,-.27],[127.4,1.01],[127.6,1.81],[127.93,2.17]]],[[[122.93,.88],[124.08,.92],[125.07,1.64],[125.24,1.42],[124.44,.43],[123.69,.24],[122.72,.43],[121.06,.38],[120.18,.24],[120.04,-.52],[120.94,-1.41],[121.48,-.96],[123.34,-.62],[123.26,-1.08],[122.82,-.93],[122.39,-1.52],[121.51,-1.9],[122.45,-3.19],[122.27,-3.53],[123.17,-4.68],[123.16,-5.34],[122.63,-5.63],[122.24,-5.28],[122.72,-4.46],[121.74,-4.85],[121.49,-4.57],[121.62,-4.19],[120.9,-3.6],[120.97,-2.63],[120.31,-2.93],[120.39,-4.1],[120.43,-5.53],[119.8,-5.67],[119.37,-5.38],[119.65,-4.46],[119.5,-3.49],[119.08,-3.49],[118.77,-2.8],[119.18,-2.15],[119.32,-1.35],[119.83,.15],[120.04,.57],[120.89,1.31],[121.67,1.01],[122.93,.88]]],[[[120.3,-10.26],[118.97,-9.56],[119.9,-9.36],[120.43,-9.67],[120.78,-9.97],[120.72,-10.24],[120.3,-10.26]]],[[[121.34,-8.54],[122.01,-8.46],[122.9,-8.09],[122.76,-8.65],[121.25,-8.93],[119.92,-8.81],[119.92,-8.44],[120.72,-8.24],[121.34,-8.54]]],[[[118.26,-8.36],[118.88,-8.28],[119.13,-8.71],[117.97,-8.91],[117.28,-9.04],[116.74,-9.03],[117.08,-8.46],[117.63,-8.45],[117.9,-8.1],[118.26,-8.36]]],[[[108.49,-6.42],[108.62,-6.78],[110.54,-6.88],[110.76,-6.47],[112.61,-6.95],[112.98,-7.59],[114.48,-7.78],[115.71,-8.37],[114.56,-8.75],[113.46,-8.35],[112.56,-8.38],[111.52,-8.3],[110.59,-8.12],[109.43,-7.74],[108.69,-7.64],[108.28,-7.77],[106.45,-7.35],[106.28,-6.92],[105.37,-6.85],[106.05,-5.9],[107.27,-5.95],[108.07,-6.35],[108.49,-6.42]]],[[[104.37,-1.08],[104.54,-1.78],[104.89,-2.34],[105.62,-2.43],[106.11,-3.06],[105.86,-4.31],[105.82,-5.85],[104.71,-5.87],[103.87,-5.04],[102.58,-4.22],[102.16,-3.61],[101.4,-2.8],[100.9,-2.05],[100.14,-.65],[99.26,.18],[98.97,1.04],[98.6,1.82],[97.7,2.45],[97.18,3.31],[96.42,3.87],[95.38,4.97],[95.29,5.48],[95.94,5.44],[97.48,5.25],[98.37,4.27],[99.14,3.59],[99.69,3.17],[100.64,2.1],[101.66,2.08],[102.5,1.4],[103.08,.56],[103.84,.1],[103.44,-.71],[104.01,-1.06],[104.37,-1.08]]]]},{n:`Argentina`,a2:`AR`,a3:`ARG`,p:`AR`,l:[-64.17,-33.5],g:[[[[-68.63,-52.64],[-68.25,-53.1],[-67.75,-53.85],[-66.45,-54.45],[-65.05,-54.7],[-65.5,-55.2],[-66.45,-55.25],[-66.96,-54.9],[-67.56,-54.87],[-68.63,-54.87],[-68.63,-52.64]]],[[[-57.63,-30.22],[-57.87,-31.02],[-58.14,-32.04],[-58.13,-33.04],[-58.35,-33.26],[-58.43,-33.91],[-58.5,-34.43],[-57.23,-35.29],[-57.36,-35.98],[-56.74,-36.41],[-56.79,-36.9],[-57.75,-38.18],[-59.23,-38.72],[-61.24,-38.93],[-62.34,-38.83],[-62.13,-39.42],[-62.33,-40.17],[-62.15,-40.68],[-62.75,-41.03],[-63.77,-41.17],[-64.73,-40.8],[-65.12,-41.06],[-64.98,-42.06],[-64.3,-42.36],[-63.76,-42.04],[-63.46,-42.56],[-64.38,-42.87],[-65.18,-43.5],[-65.33,-44.5],[-65.57,-45.04],[-66.51,-45.04],[-67.29,-45.55],[-67.58,-46.3],[-66.6,-47.03],[-65.64,-47.24],[-65.99,-48.13],[-67.17,-48.7],[-67.82,-49.87],[-68.73,-50.26],[-69.14,-50.73],[-68.82,-51.77],[-68.15,-52.35],[-68.57,-52.3],[-69.5,-52.14],[-71.91,-52.01],[-72.33,-51.43],[-72.31,-50.68],[-72.98,-50.74],[-73.33,-50.38],[-73.42,-49.32],[-72.65,-48.88],[-72.33,-48.24],[-72.45,-47.74],[-71.92,-46.88],[-71.55,-45.56],[-71.66,-44.97],[-71.22,-44.78],[-71.33,-44.41],[-71.79,-44.21],[-71.46,-43.79],[-71.92,-43.41],[-72.15,-42.25],[-71.75,-42.05],[-71.92,-40.83],[-71.68,-39.81],[-71.41,-38.92],[-70.81,-38.55],[-71.12,-37.58],[-71.12,-36.66],[-70.36,-36.01],[-70.39,-35.17],[-69.82,-34.19],[-69.81,-33.27],[-70.07,-33.09],[-70.54,-31.37],[-69.92,-30.34],[-70.01,-29.37],[-69.66,-28.46],[-69,-27.52],[-68.3,-26.9],[-68.59,-26.51],[-68.39,-26.19],[-68.42,-24.52],[-67.33,-24.03],[-66.99,-22.99],[-67.11,-22.74],[-66.27,-21.83],[-64.96,-22.08],[-64.38,-22.8],[-63.99,-21.99],[-62.85,-22.03],[-62.69,-22.25],[-60.85,-23.88],[-60.03,-24.03],[-58.81,-24.77],[-57.78,-25.16],[-57.63,-25.6],[-58.62,-27.12],[-57.61,-27.4],[-56.49,-27.55],[-55.7,-27.39],[-54.79,-26.62],[-54.63,-25.74],[-54.13,-25.55],[-53.63,-26.12],[-53.65,-26.92],[-54.49,-27.47],[-55.16,-27.88],[-56.29,-28.85],[-57.63,-30.22]]]]},{n:`Chile`,a2:`CL`,a3:`CHL`,p:`CL`,l:[-72.32,-38.15],g:[[[[-68.63,-52.64],[-68.63,-54.87],[-67.56,-54.87],[-66.96,-54.9],[-67.29,-55.3],[-68.15,-55.61],[-68.64,-55.58],[-69.23,-55.5],[-69.96,-55.2],[-71.01,-55.05],[-72.26,-54.5],[-73.29,-53.96],[-74.66,-52.84],[-73.84,-53.05],[-72.43,-53.72],[-71.11,-54.07],[-70.59,-53.62],[-70.27,-52.93],[-69.35,-52.52],[-68.63,-52.64]]],[[[-69.59,-17.58],[-69.1,-18.26],[-68.97,-18.98],[-68.44,-19.41],[-68.76,-20.37],[-68.22,-21.49],[-67.83,-22.87],[-67.11,-22.74],[-66.99,-22.99],[-67.33,-24.03],[-68.42,-24.52],[-68.39,-26.19],[-68.59,-26.51],[-68.3,-26.9],[-69,-27.52],[-69.66,-28.46],[-70.01,-29.37],[-69.92,-30.34],[-70.54,-31.37],[-70.07,-33.09],[-69.81,-33.27],[-69.82,-34.19],[-70.39,-35.17],[-70.36,-36.01],[-71.12,-36.66],[-71.12,-37.58],[-70.81,-38.55],[-71.41,-38.92],[-71.68,-39.81],[-71.92,-40.83],[-71.75,-42.05],[-72.15,-42.25],[-71.92,-43.41],[-71.46,-43.79],[-71.79,-44.21],[-71.33,-44.41],[-71.22,-44.78],[-71.66,-44.97],[-71.55,-45.56],[-71.92,-46.88],[-72.45,-47.74],[-72.33,-48.24],[-72.65,-48.88],[-73.42,-49.32],[-73.33,-50.38],[-72.98,-50.74],[-72.31,-50.68],[-72.33,-51.43],[-71.91,-52.01],[-69.5,-52.14],[-68.57,-52.3],[-69.46,-52.29],[-69.94,-52.54],[-70.85,-52.9],[-71.01,-53.83],[-71.43,-53.86],[-72.56,-53.53],[-73.7,-52.84],[-74.95,-52.26],[-75.26,-51.63],[-74.98,-51.04],[-75.48,-50.38],[-75.61,-48.67],[-75.18,-47.71],[-74.13,-46.94],[-75.64,-46.65],[-74.69,-45.76],[-74.35,-44.1],[-73.24,-44.45],[-72.72,-42.38],[-73.39,-42.12],[-73.7,-43.37],[-74.33,-43.22],[-74.02,-41.79],[-73.68,-39.94],[-73.22,-39.26],[-73.51,-38.28],[-73.59,-37.16],[-73.17,-37.12],[-72.55,-35.51],[-71.86,-33.91],[-71.44,-32.42],[-71.67,-30.92],[-71.37,-30.1],[-71.49,-28.86],[-70.91,-27.64],[-70.72,-25.71],[-70.4,-23.63],[-70.09,-21.39],[-70.16,-19.76],[-70.37,-18.35],[-69.86,-18.09],[-69.59,-17.58]]]]},{n:`Democratic Republic of the Congo`,a2:`CD`,a3:`COD`,p:`DRC`,l:[23.46,-1.86],g:[[[[29.34,-4.5],[29.52,-5.42],[29.42,-5.94],[29.62,-6.52],[30.2,-7.08],[30.74,-8.34],[30.35,-8.24],[29,-8.41],[28.73,-8.53],[28.45,-9.16],[28.67,-9.61],[28.5,-10.79],[28.37,-11.79],[28.64,-11.97],[29.34,-12.36],[29.62,-12.18],[29.7,-13.26],[28.93,-13.25],[28.52,-12.7],[28.16,-12.27],[27.39,-12.13],[27.16,-11.61],[26.55,-11.92],[25.75,-11.78],[25.42,-11.33],[24.78,-11.24],[24.31,-11.26],[24.26,-10.95],[23.91,-10.93],[23.46,-10.87],[22.84,-11.02],[22.4,-10.99],[22.16,-11.08],[22.21,-9.89],[21.88,-9.52],[21.8,-8.91],[21.95,-8.31],[21.75,-7.92],[21.73,-7.29],[20.51,-7.3],[20.6,-6.94],[20.09,-6.94],[20.04,-7.12],[19.42,-7.16],[19.17,-7.74],[19.02,-7.99],[18.46,-7.85],[18.13,-7.99],[17.47,-8.07],[17.09,-7.55],[16.86,-7.22],[16.57,-6.62],[16.33,-5.88],[13.38,-5.86],[13.02,-5.98],[12.74,-5.97],[12.32,-6.1],[12.18,-5.79],[12.44,-5.68],[12.47,-5.25],[12.63,-4.99],[13,-4.78],[13.26,-4.88],[13.6,-4.5],[14.14,-4.51],[14.21,-4.79],[14.58,-4.97],[15.17,-4.34],[15.75,-3.86],[16.01,-3.54],[15.97,-2.71],[16.41,-1.74],[16.87,-1.23],[17.52,-.74],[17.64,-.42],[17.66,-.06],[17.83,.29],[17.77,.86],[17.9,1.74],[18.09,2.37],[18.39,2.9],[18.45,3.5],[18.54,4.2],[18.93,4.71],[19.47,5.03],[20.29,4.69],[20.93,4.32],[21.66,4.22],[22.41,4.03],[22.7,4.63],[22.84,4.71],[23.3,4.61],[24.41,5.11],[24.81,4.9],[25.13,4.93],[25.28,5.17],[25.65,5.26],[26.4,5.15],[27.04,5.13],[27.37,5.23],[27.98,4.41],[28.43,4.29],[28.7,4.46],[29.16,4.39],[29.72,4.6],[29.95,4.17],[30.83,3.51],[30.77,2.34],[31.17,2.2],[30.85,1.85],[30.47,1.58],[30.09,1.06],[29.88,.6],[29.82,-.21],[29.59,-.59],[29.58,-1.34],[29.29,-1.62],[29.25,-2.22],[29.12,-2.29],[29.02,-2.84],[29.28,-3.29],[29.34,-4.5]]]]},{n:`Somalia`,a2:`SO`,a3:`SOM`,p:`SO`,l:[45.19,3.57],g:[[[[41.59,-1.68],[40.99,-.86],[40.98,2.78],[41.86,3.92],[42.13,4.23],[42.77,4.25],[43.66,4.96],[44.96,5],[47.79,8],[48.49,8.84],[48.94,9.45],[48.94,9.97],[48.94,10.98],[48.94,11.39],[48.95,11.41],[49.27,11.43],[49.73,11.58],[50.26,11.68],[50.73,12.02],[51.11,12.02],[51.13,11.75],[51.04,11.17],[51.05,10.64],[50.83,10.28],[50.55,9.2],[50.07,8.08],[49.45,6.8],[48.59,5.34],[47.74,4.22],[46.56,2.86],[45.56,2.05],[44.07,1.05],[43.14,.29],[42.04,-.92],[41.81,-1.45],[41.59,-1.68]]]]},{n:`Kenya`,a2:`KE`,a3:`KEN`,p:`KE`,l:[37.91,.55],g:[[[[39.2,-4.68],[37.77,-3.68],[37.7,-3.1],[34.07,-1.06],[33.9,-.95],[33.89,.11],[34.18,.52],[34.67,1.18],[35.04,1.91],[34.6,3.05],[34.48,3.56],[34.01,4.25],[34.62,4.85],[35.3,5.51],[35.82,5.34],[35.82,4.78],[36.16,4.45],[36.86,4.45],[38.12,3.6],[38.44,3.59],[38.67,3.62],[38.89,3.5],[39.56,3.42],[39.85,3.84],[40.77,4.26],[41.17,3.92],[41.86,3.92],[40.98,2.78],[40.99,-.86],[41.59,-1.68],[40.88,-2.08],[40.64,-2.5],[40.26,-2.57],[40.12,-3.28],[39.8,-3.68],[39.6,-4.35],[39.2,-4.68]]]]},{n:`Sudan`,a2:`SD`,a3:`SDN`,p:`SD`,l:[29.26,16.33],g:[[[[24.57,8.23],[23.81,8.67],[23.46,8.95],[23.39,9.27],[23.56,9.68],[23.55,10.09],[22.98,10.71],[22.86,11.14],[22.88,11.38],[22.51,11.68],[22.5,12.26],[22.29,12.65],[21.94,12.59],[22.04,12.96],[22.3,13.37],[22.18,13.79],[22.51,14.09],[22.3,14.33],[22.57,14.94],[23.02,15.68],[23.89,15.61],[23.84,19.58],[23.85,20],[25,20],[25,22],[29.02,22],[32.9,22],[36.87,22],[37.19,21.02],[36.97,20.84],[37.11,19.81],[37.48,18.61],[37.86,18.37],[38.41,18],[37.9,17.43],[37.17,17.26],[36.85,16.96],[36.75,16.29],[36.32,14.82],[36.43,14.42],[36.27,13.56],[35.86,12.58],[35.26,12.08],[34.83,11.32],[34.73,10.91],[34.26,10.63],[33.96,9.58],[33.97,8.68],[33.96,9.46],[33.82,9.48],[33.84,9.98],[33.72,10.33],[33.21,10.72],[33.09,11.44],[33.21,12.18],[32.74,12.25],[32.67,12.02],[32.07,11.97],[32.31,11.68],[32.4,11.08],[31.85,10.53],[31.35,9.81],[30.84,9.71],[30,10.29],[29.62,10.08],[29.52,9.79],[29,9.6],[28.97,9.4],[27.97,9.4],[27.83,9.6],[27.11,9.64],[26.75,9.47],[26.48,9.55],[25.96,10.14],[25.79,10.41],[25.07,10.27],[24.79,9.81],[24.54,8.92],[24.19,8.73],[23.89,8.62],[24.57,8.23]]]]},{n:`Chad`,a2:`TD`,a3:`TCD`,p:`TD`,l:[18.65,15.14],g:[[[[23.84,19.58],[23.89,15.61],[23.02,15.68],[22.57,14.94],[22.3,14.33],[22.51,14.09],[22.18,13.79],[22.3,13.37],[22.04,12.96],[21.94,12.59],[22.29,12.65],[22.5,12.26],[22.51,11.68],[22.88,11.38],[22.86,11.14],[22.23,10.97],[21.72,10.57],[21,9.48],[20.06,9.01],[19.09,9.07],[18.81,8.98],[18.91,8.63],[18.39,8.28],[17.96,7.89],[16.71,7.51],[16.46,7.73],[16.29,7.75],[16.11,7.5],[15.28,7.42],[15.44,7.69],[15.12,8.38],[14.98,8.8],[14.54,8.97],[13.95,9.55],[14.17,10.02],[14.63,9.92],[14.91,9.99],[15.47,9.98],[14.92,10.89],[14.96,11.56],[14.89,12.22],[14.5,12.86],[14.6,13.33],[13.95,13.35],[13.96,14],[13.54,14.37],[13.97,15.68],[15.25,16.63],[15.3,17.93],[15.69,19.96],[15.9,20.39],[15.49,20.73],[15.47,21.05],[15.1,21.31],[14.85,22.86],[15.86,23.41],[19.85,21.5],[23.84,19.58]]]]},{n:`Haiti`,a2:`HT`,a3:`HTI`,p:`HT`,l:[-72.22,19.26],g:[[[[-71.71,19.71],[-71.62,19.17],[-71.7,18.79],[-71.95,18.62],[-71.69,18.32],[-71.71,18.04],[-72.37,18.21],[-72.84,18.15],[-73.45,18.22],[-73.92,18.03],[-74.46,18.34],[-74.37,18.66],[-73.45,18.53],[-72.69,18.45],[-72.33,18.67],[-72.79,19.1],[-72.78,19.48],[-73.42,19.64],[-73.19,19.92],[-72.58,19.87],[-71.71,19.71]]]]},{n:`Dominican Republic`,a2:`DO`,a3:`DOM`,p:`DO`,l:[-70.65,19.1],g:[[[[-71.71,18.04],[-71.69,18.32],[-71.95,18.62],[-71.7,18.79],[-71.62,19.17],[-71.71,19.71],[-71.59,19.88],[-70.81,19.88],[-70.21,19.62],[-69.95,19.65],[-69.77,19.29],[-69.22,19.31],[-69.25,19.02],[-68.81,18.98],[-68.32,18.61],[-68.69,18.21],[-69.16,18.42],[-69.62,18.38],[-69.95,18.43],[-70.13,18.25],[-70.52,18.18],[-70.67,18.43],[-71,18.28],[-71.4,17.6],[-71.66,17.76],[-71.71,18.04]]]]},{n:`Russian Federation`,a2:`RU`,a3:`RUS`,p:`RUS`,l:[44.69,58.25],g:[[[[178.73,71.1],[180,71.52],[180,70.83],[178.9,70.78],[178.73,71.1]]],[[[49.1,46.4],[48.65,45.81],[47.68,45.64],[46.68,44.61],[47.59,43.66],[47.49,42.99],[48.58,41.81],[47.99,41.41],[47.82,41.15],[47.37,41.22],[46.69,41.83],[46.4,41.86],[45.78,42.09],[45.47,42.5],[44.54,42.71],[43.93,42.55],[43.76,42.74],[42.39,43.22],[40.92,43.38],[40.08,43.55],[39.96,43.43],[38.68,44.28],[37.54,44.66],[36.68,45.24],[37.4,45.4],[38.23,46.24],[37.67,46.64],[39.15,47.04],[39.12,47.26],[38.22,47.1],[38.26,47.55],[38.77,47.83],[39.74,47.9],[39.9,48.23],[39.67,48.78],[40.08,49.31],[40.07,49.6],[38.59,49.93],[38.01,49.92],[37.39,50.38],[36.63,50.23],[35.36,50.58],[35.38,50.77],[35.02,51.21],[34.22,51.26],[34.14,51.57],[34.39,51.77],[33.75,52.34],[32.72,52.24],[32.41,52.29],[32.16,52.06],[31.79,52.1],[31.54,52.74],[31.31,53.07],[31.5,53.17],[32.3,53.13],[32.69,53.35],[32.41,53.62],[31.73,53.79],[31.79,53.97],[31.38,54.16],[30.76,54.81],[30.97,55.08],[30.87,55.55],[29.9,55.79],[29.37,55.67],[29.23,55.92],[28.18,56.17],[27.86,56.76],[27.77,57.24],[27.29,57.47],[27.72,57.79],[27.42,58.72],[28.13,59.3],[27.98,59.48],[29.12,60.03],[28.07,60.5],[30.21,61.78],[31.14,62.36],[31.52,62.87],[30.04,63.55],[30.44,64.2],[29.54,64.95],[30.22,65.81],[29.05,66.94],[29.98,67.7],[28.45,68.36],[28.59,69.06],[29.4,69.16],[31.1,69.56],[32.13,69.91],[33.78,69.3],[36.51,69.06],[40.29,67.93],[41.06,67.46],[41.13,66.79],[40.02,66.27],[38.38,66],[33.92,66.76],[33.18,66.63],[34.81,65.9],[34.88,65.44],[34.94,64.41],[36.23,64.11],[37.01,63.85],[37.14,64.33],[36.54,64.76],[37.18,65.14],[39.59,64.52],[40.44,64.76],[39.76,65.5],[42.09,66.48],[43.02,66.42],[43.95,66.07],[44.53,66.76],[43.7,67.35],[44.19,67.95],[43.45,68.57],[46.25,68.25],[46.82,67.69],[45.56,67.57],[45.56,67.01],[46.35,66.67],[47.89,66.88],[48.14,67.52],[50.23,68],[53.72,68.86],[54.47,68.81],[53.49,68.2],[54.73,68.1],[55.44,68.44],[57.32,68.47],[58.8,68.88],[59.94,68.28],[61.08,68.94],[60.03,69.52],[60.55,69.85],[63.5,69.55],[64.89,69.23],[68.51,68.09],[69.18,68.62],[68.16,69.14],[68.14,69.36],[66.93,69.45],[67.26,69.93],[66.72,70.71],[66.69,71.03],[68.54,71.93],[69.2,72.84],[69.94,73.04],[72.59,72.78],[72.8,72.22],[71.85,71.41],[72.47,71.09],[72.79,70.39],[72.56,69.02],[73.67,68.41],[73.24,67.74],[71.28,66.32],[72.42,66.17],[72.82,66.53],[73.92,66.79],[74.19,67.28],[75.05,67.76],[74.47,68.33],[74.94,68.99],[73.84,69.07],[73.6,69.63],[74.4,70.63],[73.1,71.45],[74.89,72.12],[74.66,72.83],[75.16,72.85],[75.68,72.3],[75.29,71.34],[76.36,71.15],[75.9,71.87],[77.58,72.27],[79.65,72.32],[81.5,71.75],[80.61,72.58],[80.51,73.65],[82.25,73.85],[84.66,73.81],[86.82,73.94],[86.01,74.46],[87.17,75.12],[88.32,75.14],[90.26,75.64],[92.9,75.77],[93.23,76.05],[95.86,76.14],[96.68,75.92],[98.92,76.45],[100.76,76.43],[101.04,76.86],[101.99,77.29],[104.35,77.7],[106.07,77.37],[104.71,77.13],[106.97,76.97],[107.24,76.48],[108.15,76.72],[111.08,76.71],[113.33,76.22],[114.13,75.85],[113.89,75.33],[112.78,75.03],[110.15,74.48],[109.4,74.18],[110.64,74.04],[112.12,73.79],[113.02,73.98],[113.53,73.34],[113.97,73.59],[115.57,73.75],[118.78,73.59],[119.02,73.12],[123.2,72.97],[123.26,73.74],[125.38,73.56],[126.98,73.57],[128.59,73.04],[129.05,72.4],[128.46,71.98],[129.72,71.19],[131.29,70.79],[132.25,71.84],[133.86,71.39],[135.56,71.66],[137.5,71.35],[138.23,71.63],[139.87,71.49],[139.15,72.42],[140.47,72.85],[149.5,72.2],[150.35,71.61],[152.97,70.84],[157.01,71.03],[159,70.87],[159.83,70.45],[159.71,69.72],[160.94,69.44],[162.28,69.64],[164.05,69.67],[165.94,69.47],[167.84,69.58],[169.58,68.69],[170.82,69.01],[170.01,69.65],[170.45,70.1],[173.64,69.82],[175.72,69.88],[178.6,69.4],[180,68.96],[180,64.98],[179.99,64.97],[178.71,64.53],[177.41,64.61],[178.31,64.08],[178.91,63.25],[179.37,62.98],[179.49,62.57],[179.23,62.3],[177.36,62.52],[174.57,61.77],[173.68,61.65],[172.15,60.95],[170.7,60.34],[170.33,59.88],[168.9,60.57],[166.29,59.79],[165.84,60.16],[164.88,59.73],[163.54,59.87],[163.22,59.21],[162.02,58.24],[162.05,57.84],[163.19,57.62],[163.06,56.16],[162.13,56.12],[161.7,55.29],[162.12,54.86],[160.37,54.34],[160.02,53.2],[158.53,52.96],[158.23,51.94],[156.79,51.01],[156.42,51.7],[155.99,53.16],[155.43,55.38],[155.91,56.77],[156.76,57.36],[156.81,57.83],[158.36,58.06],[160.15,59.31],[161.87,60.34],[163.67,61.14],[164.47,62.55],[163.26,62.47],[162.66,61.64],[160.12,60.54],[159.3,61.77],[156.72,61.43],[154.22,59.76],[155.04,59.14],[152.81,58.88],[151.27,58.78],[151.34,59.5],[149.78,59.66],[148.54,59.16],[145.49,59.34],[142.2,59.04],[138.96,57.09],[135.13,54.73],[136.7,54.6],[137.19,53.98],[138.16,53.76],[138.8,54.25],[139.9,54.19],[141.35,53.09],[141.38,52.24],[140.6,51.24],[140.51,50.05],[140.06,48.45],[138.55,47],[138.22,46.31],[136.86,45.14],[135.52,43.99],[134.87,43.4],[133.54,42.81],[132.91,42.8],[132.28,43.28],[130.94,42.55],[130.78,42.22],[130.64,42.4],[130.63,42.9],[131.14,42.93],[131.29,44.11],[131.03,44.97],[131.88,45.32],[133.1,45.14],[133.77,46.12],[134.11,47.21],[134.5,47.58],[135.03,48.48],[133.37,48.18],[132.51,47.79],[130.99,47.79],[130.58,48.73],[129.4,49.44],[127.66,49.76],[127.29,50.74],[126.94,51.35],[126.56,51.78],[125.95,52.79],[125.07,53.16],[123.57,53.46],[122.25,53.43],[121,53.25],[120.18,52.75],[120.73,52.52],[120.74,51.96],[120.18,51.64],[119.28,50.58],[119.29,50.14],[117.88,49.51],[116.68,49.89],[115.49,49.81],[114.96,50.14],[114.36,50.25],[112.9,49.54],[111.58,49.38],[110.66,49.13],[109.4,49.29],[108.48,49.28],[107.87,49.79],[106.89,50.27],[105.89,50.41],[104.62,50.28],[103.68,50.09],[102.26,50.51],[102.07,51.26],[100.89,51.52],[99.98,51.63],[98.86,52.05],[97.83,51.01],[98.23,50.42],[97.26,49.73],[95.81,49.98],[94.82,50.01],[94.15,50.48],[93.1,50.5],[92.23,50.8],[90.71,50.33],[88.81,49.47],[87.75,49.3],[87.36,49.21],[86.83,49.83],[85.54,49.69],[85.12,50.12],[84.42,50.31],[83.94,50.89],[83.38,51.07],[81.95,50.81],[80.57,51.39],[80.04,50.86],[77.8,53.4],[76.53,54.18],[76.89,54.49],[74.38,53.55],[73.43,53.49],[73.51,54.04],[72.22,54.38],[71.18,54.13],[70.87,55.17],[69.07,55.39],[68.17,54.97],[65.67,54.6],[65.18,54.35],[61.44,54.01],[60.98,53.66],[61.7,52.98],[60.74,52.72],[60.93,52.45],[59.97,51.96],[61.59,51.27],[61.34,50.8],[59.93,50.84],[59.64,50.55],[58.36,51.06],[56.78,51.04],[55.72,50.62],[54.53,51.03],[52.33,51.72],[50.77,51.69],[48.7,50.61],[48.58,49.87],[47.55,50.45],[46.75,49.36],[47.04,49.15],[46.47,48.39],[47.32,47.72],[48.06,47.74],[48.69,47.08],[48.59,46.56],[49.1,46.4]]],[[[93.78,81.02],[95.94,81.25],[97.88,80.75],[100.19,79.78],[99.94,78.88],[97.76,78.76],[94.97,79.04],[93.31,79.43],[92.55,80.14],[91.18,80.34],[93.78,81.02]]],[[[102.84,79.28],[105.37,78.71],[105.08,78.31],[99.44,77.92],[101.26,79.23],[102.09,79.35],[102.84,79.28]]],[[[138.83,76.14],[141.47,76.09],[145.09,75.56],[144.3,74.82],[140.61,74.85],[138.96,74.61],[136.97,75.26],[137.51,75.95],[138.83,76.14]]],[[[148.22,75.35],[150.73,75.08],[149.58,74.69],[147.98,74.78],[146.12,75.17],[146.36,75.5],[148.22,75.35]]],[[[139.86,73.37],[140.81,73.77],[142.06,73.86],[143.48,73.48],[143.6,73.21],[142.09,73.21],[140.04,73.32],[139.86,73.37]]],[[[44.85,80.59],[46.8,80.77],[48.32,80.78],[48.52,80.51],[49.1,80.75],[50.04,80.92],[51.52,80.7],[51.14,80.55],[49.79,80.42],[48.89,80.34],[48.75,80.18],[47.59,80.01],[46.5,80.25],[47.07,80.56],[44.85,80.59]]],[[[22.73,54.33],[20.89,54.31],[19.66,54.43],[19.89,54.87],[21.27,55.19],[22.32,55.02],[22.76,54.86],[22.65,54.58],[22.73,54.33]]],[[[53.51,73.75],[55.9,74.63],[55.63,75.08],[57.87,75.61],[61.17,76.25],[64.5,76.44],[66.21,76.81],[68.16,76.94],[68.85,76.54],[68.18,76.23],[64.64,75.74],[61.58,75.26],[58.48,74.31],[56.99,73.33],[55.42,72.37],[55.62,71.54],[57.54,70.72],[56.94,70.63],[53.68,70.76],[53.41,71.21],[51.6,71.47],[51.46,72.01],[52.48,72.23],[52.44,72.77],[54.43,73.63],[53.51,73.75]]],[[[142.91,53.7],[143.26,52.74],[143.24,51.76],[143.65,50.75],[144.65,48.98],[143.17,49.31],[142.56,47.86],[143.53,46.84],[143.51,46.14],[142.75,46.74],[142.09,45.97],[141.91,46.81],[142.02,47.78],[141.9,48.86],[142.14,49.62],[142.18,50.95],[141.59,51.94],[141.68,53.3],[142.61,53.76],[142.21,54.23],[142.65,54.37],[142.91,53.7]]],[[[-174.93,67.21],[-175.01,66.58],[-174.34,66.34],[-174.57,67.06],[-171.86,66.91],[-169.9,65.98],[-170.89,65.54],[-172.53,65.44],[-172.55,64.46],[-172.96,64.25],[-173.89,64.28],[-174.65,64.63],[-175.98,64.92],[-176.21,65.36],[-177.22,65.52],[-178.36,65.39],[-178.9,65.74],[-178.69,66.11],[-179.88,65.87],[-179.43,65.4],[-180,64.98],[-180,68.96],[-177.55,68.2],[-174.93,67.21]]],[[[-178.69,70.89],[-180,70.83],[-180,71.52],[-179.87,71.56],[-179.02,71.56],[-177.58,71.27],[-177.66,71.13],[-178.69,70.89]]],[[[33.44,45.97],[33.7,46.22],[34.41,46.01],[34.73,45.97],[34.86,45.77],[35.01,45.74],[35.02,45.65],[35.51,45.41],[36.53,45.47],[36.33,45.11],[35.24,44.94],[33.88,44.36],[33.33,44.56],[33.55,45.03],[32.45,45.33],[32.63,45.52],[33.59,45.85],[33.44,45.97]]]]},{n:`Bahamas`,a2:`BS`,a3:`BHS`,p:`BS`,l:[-77.15,26.4],g:[[[[-78.98,26.79],[-78.51,26.87],[-77.85,26.84],[-77.82,26.58],[-78.91,26.42],[-78.98,26.79]]],[[[-77.79,27.04],[-77,26.59],[-77.17,25.88],[-77.36,26.01],[-77.34,26.53],[-77.79,26.93],[-77.79,27.04]]],[[[-78.19,25.21],[-77.89,25.17],[-77.54,24.34],[-77.53,23.76],[-77.78,23.71],[-78.03,24.29],[-78.41,24.58],[-78.19,25.21]]]]},{n:`Falkland Islands / Malvinas`,a2:`FK`,a3:`FLK`,p:`FK`,l:[-58.74,-51.61],g:[[[[-61.2,-51.85],[-60,-51.25],[-59.15,-51.5],[-58.55,-51.1],[-57.75,-51.55],[-58.05,-51.9],[-59.4,-52.2],[-59.85,-51.85],[-60.7,-52.3],[-61.2,-51.85]]]]},{n:`Norway`,a2:``,a3:`NOR`,p:`N`,l:[9.68,61.36],g:[[[[15.14,79.67],[15.52,80.02],[16.99,80.05],[18.25,79.7],[21.54,78.96],[19.03,78.56],[18.47,77.83],[17.59,77.64],[17.12,76.81],[15.91,76.77],[13.76,77.38],[14.67,77.74],[13.17,78.02],[11.22,78.87],[10.44,79.65],[13.17,80.01],[13.72,79.66],[15.14,79.67]]],[[[31.1,69.56],[29.4,69.16],[28.59,69.06],[29.02,69.77],[27.73,70.16],[26.18,69.83],[25.69,69.09],[24.74,68.65],[23.66,68.89],[22.36,68.84],[21.24,69.37],[20.65,69.11],[20.03,69.07],[19.88,68.41],[17.99,68.57],[17.73,68.01],[16.77,68.01],[16.11,67.3],[15.11,66.19],[13.56,64.79],[13.92,64.45],[13.57,64.05],[12.58,64.07],[11.93,63.13],[11.99,61.8],[12.63,61.29],[12.3,60.12],[11.47,59.43],[11.03,58.86],[10.36,59.47],[8.38,58.31],[7.05,58.08],[5.67,58.59],[5.31,59.66],[4.99,61.97],[5.91,62.61],[8.55,63.45],[10.53,64.49],[12.36,65.88],[14.76,67.81],[16.44,68.56],[19.18,69.82],[21.38,70.26],[23.02,70.2],[24.55,71.03],[26.37,70.99],[28.17,71.19],[31.29,70.45],[30.01,70.19],[31.1,69.56]]],[[[27.41,80.06],[25.92,79.52],[23.02,79.4],[20.08,79.57],[19.9,79.84],[18.46,79.86],[17.37,80.32],[20.46,80.6],[21.91,80.36],[22.92,80.66],[25.45,80.41],[27.41,80.06]]],[[[24.72,77.85],[22.49,77.44],[20.73,77.68],[21.42,77.94],[20.81,78.25],[22.88,78.45],[23.28,78.08],[24.72,77.85]]]]},{n:`Greenland`,a2:`GL`,a3:`GRL`,p:`GL`,l:[-39.34,74.32],g:[[[[-46.76,82.63],[-43.41,83.23],[-39.9,83.18],[-38.62,83.55],[-35.09,83.65],[-27.1,83.52],[-20.85,82.73],[-22.69,82.34],[-26.52,82.3],[-31.9,82.2],[-31.4,82.02],[-27.86,82.13],[-24.84,81.79],[-22.9,82.09],[-22.07,81.73],[-23.17,81.15],[-20.62,81.52],[-15.77,81.91],[-12.77,81.72],[-12.21,81.29],[-16.29,80.58],[-16.85,80.35],[-20.05,80.18],[-17.73,80.13],[-18.9,79.4],[-19.7,78.75],[-19.67,77.64],[-18.47,76.99],[-20.04,76.94],[-21.68,76.63],[-19.83,76.1],[-19.6,75.25],[-20.67,75.16],[-19.37,74.3],[-21.59,74.22],[-20.43,73.82],[-20.76,73.46],[-22.17,73.31],[-23.57,73.31],[-22.31,72.63],[-22.3,72.18],[-24.28,72.6],[-24.79,72.33],[-23.44,72.08],[-22.13,71.47],[-21.75,70.66],[-23.54,70.47],[-24.31,70.86],[-25.54,71.43],[-25.2,70.75],[-26.36,70.23],[-23.73,70.18],[-22.35,70.13],[-25.03,69.26],[-27.75,68.47],[-30.67,68.13],[-31.78,68.12],[-32.81,67.74],[-34.2,66.68],[-36.35,65.98],[-37.04,65.94],[-38.38,65.69],[-39.81,65.46],[-40.67,64.84],[-40.68,64.14],[-41.19,63.48],[-42.82,62.68],[-42.42,61.9],[-42.87,61.07],[-43.38,60.1],[-44.79,60.04],[-46.26,60.85],[-48.26,60.86],[-49.23,61.41],[-49.9,62.38],[-51.63,63.63],[-52.14,64.28],[-52.28,65.18],[-53.66,66.1],[-53.3,66.84],[-53.97,67.19],[-52.98,68.36],[-51.48,68.73],[-51.08,69.15],[-50.87,69.93],[-52.01,69.57],[-52.56,69.43],[-53.46,69.28],[-54.68,69.61],[-54.75,70.29],[-54.36,70.82],[-53.43,70.84],[-51.39,70.57],[-53.11,71.2],[-54,71.55],[-55,71.41],[-55.83,71.65],[-54.72,72.59],[-55.33,72.96],[-56.12,73.65],[-57.32,74.71],[-58.6,75.1],[-58.59,75.52],[-61.27,76.1],[-63.39,76.18],[-66.06,76.13],[-68.5,76.06],[-69.66,76.38],[-71.4,77.01],[-68.78,77.32],[-66.76,77.38],[-71.04,77.64],[-73.3,78.04],[-73.16,78.43],[-69.37,78.91],[-65.71,79.39],[-65.32,79.76],[-68.02,80.12],[-67.15,80.52],[-63.69,81.21],[-62.23,81.32],[-62.65,81.77],[-60.28,82.03],[-57.21,82.19],[-54.13,82.2],[-53.04,81.89],[-50.39,82.44],[-48,82.06],[-46.6,81.99],[-44.52,81.66],[-46.9,82.2],[-46.76,82.63]]]]},{n:`French Southern and Antarctic Lands`,a2:`TF`,a3:`ATF`,p:`TF`,l:[69.12,-49.3],g:[[[[68.94,-48.62],[69.58,-48.94],[70.53,-49.06],[70.56,-49.25],[70.28,-49.71],[68.75,-49.77],[68.72,-49.24],[68.87,-48.83],[68.94,-48.62]]]]},{n:`Timor-Leste`,a2:`TL`,a3:`TLS`,p:`TL`,l:[125.85,-8.8],g:[[[[124.97,-8.89],[125.09,-8.66],[125.95,-8.43],[126.64,-8.4],[126.96,-8.27],[127.34,-8.4],[126.97,-8.67],[125.93,-9.11],[125.09,-9.39],[125.07,-9.09],[124.97,-8.89]]]]},{n:`South Africa`,a2:`ZA`,a3:`ZAF`,p:`ZA`,l:[23.67,-29.71],g:[[[[16.34,-28.58],[16.82,-28.08],[17.22,-28.36],[17.39,-28.78],[17.84,-28.86],[18.46,-29.05],[19,-28.97],[19.89,-28.46],[19.9,-24.77],[20.17,-24.92],[20.76,-25.87],[20.67,-26.48],[20.89,-26.83],[21.61,-26.73],[22.11,-26.28],[22.58,-25.98],[22.82,-25.5],[23.31,-25.27],[23.73,-25.39],[24.21,-25.67],[25.03,-25.72],[25.66,-25.49],[25.77,-25.17],[25.94,-24.7],[26.49,-24.62],[26.79,-24.24],[27.12,-23.57],[28.02,-22.83],[29.43,-22.09],[29.84,-22.1],[30.32,-22.27],[30.66,-22.15],[31.19,-22.25],[31.67,-23.66],[31.93,-24.37],[31.75,-25.48],[31.84,-25.84],[31.33,-25.66],[31.04,-25.73],[30.95,-26.02],[30.68,-26.4],[30.69,-26.74],[31.28,-27.29],[31.87,-27.18],[32.07,-26.73],[32.83,-26.74],[32.58,-27.47],[32.46,-28.3],[32.2,-28.75],[31.52,-29.26],[31.33,-29.4],[30.9,-29.91],[30.62,-30.42],[30.06,-31.14],[28.93,-32.17],[28.22,-32.77],[27.46,-33.23],[26.42,-33.61],[25.91,-33.67],[25.78,-33.94],[25.17,-33.8],[24.68,-33.99],[23.59,-33.79],[22.99,-33.92],[22.57,-33.86],[21.54,-34.26],[20.69,-34.42],[20.07,-34.8],[19.62,-34.82],[19.19,-34.46],[18.86,-34.44],[18.42,-34],[18.38,-34.14],[18.24,-33.87],[18.25,-33.28],[17.93,-32.61],[18.25,-32.43],[18.22,-31.66],[17.57,-30.73],[17.06,-29.88],[16.34,-28.58]],[[28.98,-28.96],[28.54,-28.65],[28.07,-28.85],[27.53,-29.24],[27,-29.88],[27.75,-30.65],[28.11,-30.55],[28.29,-30.23],[28.85,-30.07],[29.02,-29.74],[29.33,-29.26],[28.98,-28.96]]]]},{n:`Lesotho`,a2:`LS`,a3:`LSO`,p:`LS`,l:[28.25,-29.48],g:[[[[28.98,-28.96],[29.33,-29.26],[29.02,-29.74],[28.85,-30.07],[28.29,-30.23],[28.11,-30.55],[27.75,-30.65],[27,-29.88],[27.53,-29.24],[28.07,-28.85],[28.54,-28.65],[28.98,-28.96]]]]},{n:`Mexico`,a2:`MX`,a3:`MEX`,p:`MX`,l:[-102.29,23.92],g:[[[[-117.13,32.54],[-115.99,32.61],[-114.72,32.72],[-114.81,32.53],[-113.3,32.04],[-111.02,31.33],[-109.03,31.34],[-108.24,31.34],[-108.24,31.75],[-106.51,31.75],[-106.14,31.4],[-105.63,31.08],[-105.04,30.64],[-104.71,30.12],[-104.46,29.57],[-103.94,29.27],[-103.11,28.97],[-102.48,29.76],[-101.66,29.78],[-100.96,29.38],[-100.46,28.7],[-100.11,28.11],[-99.52,27.54],[-99.3,26.84],[-99.02,26.37],[-98.24,26.06],[-97.53,25.84],[-97.14,25.87],[-97.53,24.99],[-97.7,24.27],[-97.78,22.93],[-97.87,22.44],[-97.7,21.9],[-97.39,21.41],[-97.19,20.64],[-96.53,19.89],[-96.29,19.32],[-95.9,18.83],[-94.84,18.56],[-94.43,18.14],[-93.55,18.42],[-92.79,18.52],[-92.04,18.7],[-91.41,18.88],[-90.77,19.28],[-90.53,19.87],[-90.45,20.71],[-90.28,21],[-89.6,21.26],[-88.54,21.49],[-87.66,21.46],[-87.05,21.54],[-86.81,21.33],[-86.85,20.85],[-87.38,20.26],[-87.62,19.65],[-87.44,19.47],[-87.59,19.04],[-87.84,18.26],[-88.09,18.52],[-88.3,18.5],[-88.49,18.49],[-88.85,17.88],[-89.03,18],[-89.15,17.96],[-89.14,17.81],[-90.07,17.82],[-91,17.82],[-91,17.25],[-91.45,17.25],[-91.08,16.92],[-90.71,16.69],[-90.6,16.47],[-90.44,16.41],[-90.46,16.07],[-91.75,16.07],[-92.23,15.25],[-92.09,15.06],[-92.2,14.83],[-92.23,14.54],[-93.36,15.62],[-93.88,15.94],[-94.69,16.2],[-95.25,16.13],[-96.05,15.75],[-96.56,15.65],[-97.26,15.92],[-98.01,16.11],[-98.95,16.57],[-99.7,16.71],[-100.83,17.17],[-101.67,17.65],[-101.92,17.92],[-102.48,17.98],[-103.5,18.29],[-103.92,18.75],[-104.99,19.32],[-105.49,19.95],[-105.73,20.43],[-105.4,20.53],[-105.5,20.82],[-105.27,21.08],[-105.27,21.42],[-105.6,21.87],[-105.69,22.27],[-106.03,22.77],[-106.91,23.77],[-107.92,24.55],[-108.4,25.17],[-109.26,25.58],[-109.44,25.82],[-109.29,26.44],[-109.8,26.68],[-110.39,27.16],[-110.64,27.86],[-111.18,27.94],[-111.76,28.47],[-112.23,28.95],[-112.27,29.27],[-112.81,30.02],[-113.16,30.79],[-113.15,31.17],[-113.87,31.57],[-114.21,31.52],[-114.78,31.8],[-114.94,31.39],[-114.77,30.91],[-114.67,30.16],[-114.33,29.75],[-113.59,29.06],[-113.42,28.83],[-113.27,28.75],[-113.14,28.41],[-112.96,28.43],[-112.76,27.78],[-112.46,27.53],[-112.24,27.17],[-111.62,26.66],[-111.28,25.73],[-110.99,25.29],[-110.71,24.83],[-110.66,24.3],[-110.17,24.27],[-109.77,23.81],[-109.41,23.36],[-109.43,23.19],[-109.85,22.82],[-110.03,22.82],[-110.3,23.43],[-110.95,24],[-111.67,24.48],[-112.18,24.74],[-112.15,25.47],[-112.3,26.01],[-112.78,26.32],[-113.46,26.77],[-113.6,26.64],[-113.85,26.9],[-114.47,27.14],[-115.06,27.72],[-114.98,27.8],[-114.57,27.74],[-114.2,28.12],[-114.16,28.57],[-114.93,29.28],[-115.52,29.56],[-115.89,30.18],[-116.26,30.84],[-116.72,31.64],[-117.13,32.54]]]]},{n:`Uruguay`,a2:`UY`,a3:`URY`,p:`UY`,l:[-55.97,-32.96],g:[[[[-57.63,-30.22],[-56.98,-30.11],[-55.97,-30.88],[-55.6,-30.85],[-54.57,-31.49],[-53.79,-32.05],[-53.21,-32.73],[-53.65,-33.2],[-53.37,-33.77],[-53.81,-34.4],[-54.94,-34.95],[-55.67,-34.75],[-56.22,-34.86],[-57.14,-34.43],[-57.82,-34.46],[-58.43,-33.91],[-58.35,-33.26],[-58.13,-33.04],[-58.14,-32.04],[-57.87,-31.02],[-57.63,-30.22]]]]},{n:`Brazil`,a2:`BR`,a3:`BRA`,p:`BR`,l:[-49.56,-12.1],g:[[[[-53.37,-33.77],[-53.65,-33.2],[-53.21,-32.73],[-53.79,-32.05],[-54.57,-31.49],[-55.6,-30.85],[-55.97,-30.88],[-56.98,-30.11],[-57.63,-30.22],[-56.29,-28.85],[-55.16,-27.88],[-54.49,-27.47],[-53.65,-26.92],[-53.63,-26.12],[-54.13,-25.55],[-54.63,-25.74],[-54.43,-25.16],[-54.29,-24.57],[-54.29,-24.02],[-54.65,-23.84],[-55.03,-24],[-55.4,-23.96],[-55.52,-23.57],[-55.61,-22.66],[-55.8,-22.36],[-56.47,-22.09],[-56.88,-22.28],[-57.94,-22.09],[-57.87,-20.73],[-58.17,-20.18],[-57.85,-19.97],[-57.95,-19.4],[-57.68,-18.96],[-57.5,-18.17],[-57.73,-17.55],[-58.28,-17.27],[-58.39,-16.88],[-58.24,-16.3],[-60.16,-16.26],[-60.54,-15.09],[-60.25,-15.08],[-60.26,-14.65],[-60.46,-14.35],[-60.5,-13.78],[-61.08,-13.48],[-61.71,-13.49],[-62.13,-13.2],[-62.8,-13],[-63.2,-12.63],[-64.32,-12.46],[-65.4,-11.57],[-65.32,-10.9],[-65.44,-10.51],[-65.34,-9.76],[-66.65,-9.93],[-67.17,-10.31],[-68.05,-10.71],[-68.27,-11.01],[-68.79,-11.04],[-69.53,-10.95],[-70.09,-11.12],[-70.55,-11.01],[-70.48,-9.49],[-71.3,-10.08],[-72.18,-10.05],[-72.56,-9.52],[-73.23,-9.46],[-73.02,-9.03],[-73.57,-8.42],[-73.99,-7.52],[-73.72,-7.34],[-73.72,-6.92],[-73.12,-6.63],[-73.22,-6.09],[-72.96,-5.74],[-72.89,-5.27],[-71.75,-4.59],[-70.93,-4.4],[-70.79,-4.25],[-69.89,-4.3],[-69.44,-1.56],[-69.42,-1.12],[-69.58,-.55],[-70.02,-.19],[-70.02,.54],[-69.45,.71],[-69.25,.6],[-69.22,.99],[-69.8,1.09],[-69.82,1.71],[-67.87,1.69],[-67.54,2.04],[-67.26,1.72],[-67.07,1.13],[-66.88,1.25],[-66.33,.72],[-65.55,.79],[-65.35,1.1],[-64.61,1.33],[-64.2,1.49],[-64.08,1.92],[-63.37,2.2],[-63.42,2.41],[-64.27,2.5],[-64.41,3.13],[-64.37,3.8],[-64.82,4.06],[-64.63,4.15],[-63.89,4.02],[-63.09,3.77],[-62.8,4.01],[-62.09,4.16],[-60.97,4.54],[-60.6,4.92],[-60.73,5.2],[-60.21,5.24],[-59.98,5.01],[-60.11,4.57],[-59.77,4.42],[-59.54,3.96],[-59.82,3.61],[-59.97,2.76],[-59.72,2.25],[-59.65,1.79],[-59.03,1.32],[-58.54,1.27],[-58.43,1.46],[-58.11,1.51],[-57.66,1.68],[-57.34,1.95],[-56.78,1.86],[-56.54,1.9],[-56,1.82],[-55.91,2.02],[-56.07,2.22],[-55.97,2.51],[-55.57,2.42],[-55.1,2.52],[-54.52,2.31],[-54.09,2.11],[-53.78,2.38],[-53.55,2.33],[-53.42,2.05],[-52.94,2.12],[-52.56,2.5],[-52.25,3.24],[-51.66,4.16],[-51.32,4.2],[-51.07,3.65],[-50.51,1.9],[-49.97,1.74],[-49.95,1.05],[-50.7,.22],[-50.39,-.08],[-48.62,-.24],[-48.58,-1.24],[-47.82,-.58],[-46.57,-.94],[-44.91,-1.55],[-44.42,-2.14],[-44.58,-2.69],[-43.42,-2.38],[-41.47,-2.91],[-39.98,-2.87],[-38.5,-3.7],[-37.22,-4.82],[-36.45,-5.11],[-35.6,-5.15],[-35.24,-5.46],[-34.9,-6.74],[-34.73,-7.34],[-35.13,-9],[-35.64,-9.65],[-37.05,-11.04],[-37.68,-12.17],[-38.42,-13.04],[-38.67,-13.06],[-38.95,-13.79],[-38.88,-15.67],[-39.16,-17.21],[-39.27,-17.87],[-39.58,-18.26],[-39.76,-19.6],[-40.77,-20.9],[-40.94,-21.94],[-41.75,-22.37],[-41.99,-22.97],[-43.07,-22.97],[-44.65,-23.35],[-45.35,-23.8],[-46.47,-24.09],[-47.65,-24.89],[-48.5,-25.88],[-48.64,-26.62],[-48.47,-27.18],[-48.66,-28.19],[-48.89,-28.67],[-49.59,-29.22],[-50.7,-30.98],[-51.58,-31.78],[-52.26,-32.25],[-52.71,-33.2],[-53.37,-33.77]]]]},{n:`Bolivia`,a2:`BO`,a3:`BOL`,p:`BO`,l:[-64.59,-16.67],g:[[[[-69.53,-10.95],[-68.79,-11.04],[-68.27,-11.01],[-68.05,-10.71],[-67.17,-10.31],[-66.65,-9.93],[-65.34,-9.76],[-65.44,-10.51],[-65.32,-10.9],[-65.4,-11.57],[-64.32,-12.46],[-63.2,-12.63],[-62.8,-13],[-62.13,-13.2],[-61.71,-13.49],[-61.08,-13.48],[-60.5,-13.78],[-60.46,-14.35],[-60.26,-14.65],[-60.25,-15.08],[-60.54,-15.09],[-60.16,-16.26],[-58.24,-16.3],[-58.39,-16.88],[-58.28,-17.27],[-57.73,-17.55],[-57.5,-18.17],[-57.68,-18.96],[-57.95,-19.4],[-57.85,-19.97],[-58.17,-20.18],[-58.18,-19.87],[-59.12,-19.36],[-60.04,-19.34],[-61.79,-19.63],[-62.27,-20.51],[-62.29,-21.05],[-62.69,-22.25],[-62.85,-22.03],[-63.99,-21.99],[-64.38,-22.8],[-64.96,-22.08],[-66.27,-21.83],[-67.11,-22.74],[-67.83,-22.87],[-68.22,-21.49],[-68.76,-20.37],[-68.44,-19.41],[-68.97,-18.98],[-69.1,-18.26],[-69.59,-17.58],[-68.96,-16.5],[-69.39,-15.66],[-69.16,-15.32],[-69.34,-14.95],[-68.95,-14.45],[-68.93,-13.6],[-68.88,-12.9],[-68.67,-12.56],[-69.53,-10.95]]]]},{n:`Peru`,a2:`PE`,a3:`PER`,p:`PE`,l:[-72.9,-12.98],g:[[[[-69.89,-4.3],[-70.79,-4.25],[-70.93,-4.4],[-71.75,-4.59],[-72.89,-5.27],[-72.96,-5.74],[-73.22,-6.09],[-73.12,-6.63],[-73.72,-6.92],[-73.72,-7.34],[-73.99,-7.52],[-73.57,-8.42],[-73.02,-9.03],[-73.23,-9.46],[-72.56,-9.52],[-72.18,-10.05],[-71.3,-10.08],[-70.48,-9.49],[-70.55,-11.01],[-70.09,-11.12],[-69.53,-10.95],[-68.67,-12.56],[-68.88,-12.9],[-68.93,-13.6],[-68.95,-14.45],[-69.34,-14.95],[-69.16,-15.32],[-69.39,-15.66],[-68.96,-16.5],[-69.59,-17.58],[-69.86,-18.09],[-70.37,-18.35],[-71.38,-17.77],[-71.46,-17.36],[-73.44,-16.36],[-75.24,-15.27],[-76.01,-14.65],[-76.42,-13.82],[-76.26,-13.54],[-77.11,-12.22],[-78.09,-10.38],[-79.04,-8.39],[-79.45,-7.93],[-79.76,-7.19],[-80.54,-6.54],[-81.25,-6.14],[-80.93,-5.69],[-81.41,-4.74],[-81.1,-4.04],[-80.3,-3.4],[-80.18,-3.82],[-80.47,-4.06],[-80.44,-4.43],[-80.03,-4.35],[-79.62,-4.45],[-79.21,-4.96],[-78.64,-4.55],[-78.45,-3.87],[-77.84,-3],[-76.64,-2.61],[-75.54,-1.56],[-75.23,-.91],[-75.37,-.15],[-75.11,-.06],[-74.44,-.53],[-74.12,-1],[-73.66,-1.26],[-73.07,-2.31],[-72.33,-2.43],[-71.77,-2.17],[-71.41,-2.34],[-70.81,-2.26],[-70.05,-2.73],[-70.69,-3.74],[-70.39,-3.77],[-69.89,-4.3]]]]},{n:`Colombia`,a2:`CO`,a3:`COL`,p:`CO`,l:[-73.17,3.37],g:[[[[-66.88,1.25],[-67.07,1.13],[-67.26,1.72],[-67.54,2.04],[-67.87,1.69],[-69.82,1.71],[-69.8,1.09],[-69.22,.99],[-69.25,.6],[-69.45,.71],[-70.02,.54],[-70.02,-.19],[-69.58,-.55],[-69.42,-1.12],[-69.44,-1.56],[-69.89,-4.3],[-70.39,-3.77],[-70.69,-3.74],[-70.05,-2.73],[-70.81,-2.26],[-71.41,-2.34],[-71.77,-2.17],[-72.33,-2.43],[-73.07,-2.31],[-73.66,-1.26],[-74.12,-1],[-74.44,-.53],[-75.11,-.06],[-75.37,-.15],[-75.8,.08],[-76.29,.42],[-76.58,.26],[-77.42,.4],[-77.67,.83],[-77.86,.81],[-78.86,1.38],[-78.99,1.69],[-78.62,1.77],[-78.66,2.27],[-78.43,2.63],[-77.93,2.7],[-77.51,3.33],[-77.13,3.85],[-77.5,4.09],[-77.31,4.67],[-77.53,5.58],[-77.32,5.85],[-77.48,6.69],[-77.88,7.22],[-77.75,7.71],[-77.43,7.64],[-77.24,7.94],[-77.47,8.52],[-77.35,8.67],[-76.84,8.64],[-76.09,9.34],[-75.67,9.44],[-75.66,9.77],[-75.48,10.62],[-74.91,11.08],[-74.28,11.1],[-74.2,11.31],[-73.41,11.23],[-72.63,11.73],[-72.24,11.96],[-71.75,12.44],[-71.4,12.38],[-71.14,12.11],[-71.33,11.78],[-71.97,11.61],[-72.23,11.11],[-72.61,10.82],[-72.91,10.45],[-73.03,9.74],[-73.3,9.15],[-72.79,9.09],[-72.66,8.63],[-72.44,8.41],[-72.36,8],[-72.48,7.63],[-72.44,7.42],[-72.2,7.34],[-71.96,6.99],[-70.67,7.09],[-70.09,6.96],[-69.39,6.1],[-68.99,6.21],[-68.27,6.15],[-67.7,6.27],[-67.34,6.1],[-67.52,5.56],[-67.74,5.22],[-67.82,4.5],[-67.62,3.84],[-67.34,3.54],[-67.3,3.32],[-67.81,2.82],[-67.45,2.6],[-67.18,2.25],[-66.88,1.25]]]]},{n:`Panama`,a2:`PA`,a3:`PAN`,p:`PA`,l:[-80.35,8.72],g:[[[[-77.35,8.67],[-77.47,8.52],[-77.24,7.94],[-77.43,7.64],[-77.75,7.71],[-77.88,7.22],[-78.21,7.51],[-78.43,8.05],[-78.18,8.32],[-78.44,8.39],[-78.62,8.72],[-79.12,9],[-79.56,8.93],[-79.76,8.58],[-80.16,8.33],[-80.38,8.3],[-80.48,8.09],[-80,7.55],[-80.28,7.42],[-80.42,7.27],[-80.89,7.22],[-81.06,7.82],[-81.19,7.65],[-81.52,7.71],[-81.72,8.11],[-82.13,8.18],[-82.39,8.29],[-82.82,8.29],[-82.85,8.07],[-82.97,8.23],[-82.91,8.42],[-82.83,8.63],[-82.87,8.81],[-82.72,8.93],[-82.93,9.07],[-82.93,9.48],[-82.55,9.57],[-82.19,9.21],[-82.21,9],[-81.81,8.95],[-81.71,9.03],[-81.44,8.79],[-80.95,8.86],[-80.52,9.11],[-79.91,9.31],[-79.57,9.61],[-79.02,9.55],[-79.06,9.45],[-78.5,9.42],[-78.06,9.25],[-77.73,8.95],[-77.35,8.67]]]]},{n:`Costa Rica`,a2:`CR`,a3:`CRI`,p:`CR`,l:[-84.08,10.07],g:[[[[-82.55,9.57],[-82.93,9.48],[-82.93,9.07],[-82.72,8.93],[-82.87,8.81],[-82.83,8.63],[-82.91,8.42],[-82.97,8.23],[-83.51,8.45],[-83.71,8.66],[-83.6,8.83],[-83.63,9.05],[-83.91,9.29],[-84.3,9.49],[-84.65,9.62],[-84.71,9.91],[-84.98,10.09],[-84.91,9.8],[-85.11,9.56],[-85.34,9.83],[-85.66,9.93],[-85.8,10.13],[-85.79,10.44],[-85.66,10.75],[-85.94,10.9],[-85.71,11.09],[-85.56,11.22],[-84.9,10.95],[-84.67,11.08],[-84.36,11],[-84.19,10.79],[-83.9,10.73],[-83.66,10.94],[-83.4,10.4],[-83.02,9.99],[-82.55,9.57]]]]},{n:`Nicaragua`,a2:`NI`,a3:`NIC`,p:`NI`,l:[-85.07,12.67],g:[[[[-83.66,10.94],[-83.9,10.73],[-84.19,10.79],[-84.36,11],[-84.67,11.08],[-84.9,10.95],[-85.56,11.22],[-85.71,11.09],[-86.06,11.4],[-86.53,11.81],[-86.75,12.14],[-87.17,12.46],[-87.67,12.91],[-87.56,13.06],[-87.39,12.91],[-87.32,12.98],[-87.01,13.03],[-86.88,13.25],[-86.73,13.26],[-86.76,13.75],[-86.52,13.78],[-86.31,13.77],[-86.1,14.04],[-85.8,13.84],[-85.7,13.96],[-85.51,14.08],[-85.17,14.35],[-85.15,14.56],[-85.05,14.55],[-84.92,14.79],[-84.82,14.82],[-84.65,14.67],[-84.45,14.62],[-84.23,14.75],[-83.98,14.75],[-83.63,14.88],[-83.49,15.02],[-83.15,15],[-83.23,14.9],[-83.28,14.68],[-83.18,14.31],[-83.41,13.97],[-83.52,13.57],[-83.55,13.13],[-83.5,12.87],[-83.47,12.42],[-83.63,12.32],[-83.72,11.89],[-83.65,11.63],[-83.86,11.37],[-83.81,11.1],[-83.66,10.94]]]]},{n:`Honduras`,a2:`HN`,a3:`HND`,p:`HN`,l:[-86.89,14.79],g:[[[[-83.15,15],[-83.49,15.02],[-83.63,14.88],[-83.98,14.75],[-84.23,14.75],[-84.45,14.62],[-84.65,14.67],[-84.82,14.82],[-84.92,14.79],[-85.05,14.55],[-85.15,14.56],[-85.17,14.35],[-85.51,14.08],[-85.7,13.96],[-85.8,13.84],[-86.1,14.04],[-86.31,13.77],[-86.52,13.78],[-86.76,13.75],[-86.73,13.26],[-86.88,13.25],[-87.01,13.03],[-87.32,12.98],[-87.49,13.3],[-87.79,13.38],[-87.72,13.79],[-87.86,13.89],[-88.07,13.96],[-88.5,13.85],[-88.54,13.98],[-88.84,14.14],[-89.06,14.34],[-89.35,14.42],[-89.15,14.68],[-89.23,14.87],[-89.15,15.07],[-88.68,15.35],[-88.23,15.73],[-88.12,15.69],[-87.9,15.86],[-87.62,15.88],[-87.52,15.8],[-87.37,15.85],[-86.9,15.76],[-86.44,15.78],[-86.12,15.89],[-86,16.01],[-85.68,15.95],[-85.44,15.89],[-85.18,15.91],[-84.98,16],[-84.53,15.86],[-84.37,15.84],[-84.06,15.65],[-83.77,15.42],[-83.41,15.27],[-83.15,15]]]]},{n:`El Salvador`,a2:`SV`,a3:`SLV`,p:`SV`,l:[-88.89,13.69],g:[[[[-89.35,14.42],[-89.06,14.34],[-88.84,14.14],[-88.54,13.98],[-88.5,13.85],[-88.07,13.96],[-87.86,13.89],[-87.72,13.79],[-87.79,13.38],[-87.9,13.15],[-88.48,13.16],[-88.84,13.26],[-89.26,13.46],[-89.81,13.52],[-90.1,13.74],[-90.06,13.88],[-89.72,14.13],[-89.53,14.24],[-89.59,14.36],[-89.35,14.42]]]]},{n:`Guatemala`,a2:`GT`,a3:`GTM`,p:`GT`,l:[-90.5,14.98],g:[[[[-92.23,14.54],[-92.2,14.83],[-92.09,15.06],[-92.23,15.25],[-91.75,16.07],[-90.46,16.07],[-90.44,16.41],[-90.6,16.47],[-90.71,16.69],[-91.08,16.92],[-91.45,17.25],[-91,17.25],[-91,17.82],[-90.07,17.82],[-89.14,17.81],[-89.15,17.02],[-89.23,15.89],[-88.93,15.89],[-88.6,15.71],[-88.52,15.86],[-88.23,15.73],[-88.68,15.35],[-89.15,15.07],[-89.23,14.87],[-89.15,14.68],[-89.35,14.42],[-89.59,14.36],[-89.53,14.24],[-89.72,14.13],[-90.06,13.88],[-90.1,13.74],[-90.61,13.91],[-91.23,13.93],[-91.69,14.13],[-92.23,14.54]]]]},{n:`Belize`,a2:`BZ`,a3:`BLZ`,p:`BZ`,l:[-88.71,17.2],g:[[[[-89.14,17.81],[-89.15,17.96],[-89.03,18],[-88.85,17.88],[-88.49,18.49],[-88.3,18.5],[-88.3,18.35],[-88.11,18.35],[-88.12,18.08],[-88.29,17.64],[-88.2,17.49],[-88.3,17.13],[-88.24,17.04],[-88.36,16.53],[-88.55,16.27],[-88.73,16.23],[-88.93,15.89],[-89.23,15.89],[-89.15,17.02],[-89.14,17.81]]]]},{n:`Venezuela`,a2:`VE`,a3:`VEN`,p:`VE`,l:[-64.6,7.18],g:[[[[-60.73,5.2],[-60.6,4.92],[-60.97,4.54],[-62.09,4.16],[-62.8,4.01],[-63.09,3.77],[-63.89,4.02],[-64.63,4.15],[-64.82,4.06],[-64.37,3.8],[-64.41,3.13],[-64.27,2.5],[-63.42,2.41],[-63.37,2.2],[-64.08,1.92],[-64.2,1.49],[-64.61,1.33],[-65.35,1.1],[-65.55,.79],[-66.33,.72],[-66.88,1.25],[-67.18,2.25],[-67.45,2.6],[-67.81,2.82],[-67.3,3.32],[-67.34,3.54],[-67.62,3.84],[-67.82,4.5],[-67.74,5.22],[-67.52,5.56],[-67.34,6.1],[-67.7,6.27],[-68.27,6.15],[-68.99,6.21],[-69.39,6.1],[-70.09,6.96],[-70.67,7.09],[-71.96,6.99],[-72.2,7.34],[-72.44,7.42],[-72.48,7.63],[-72.36,8],[-72.44,8.41],[-72.66,8.63],[-72.79,9.09],[-73.3,9.15],[-73.03,9.74],[-72.91,10.45],[-72.61,10.82],[-72.23,11.11],[-71.97,11.61],[-71.33,11.78],[-71.36,11.54],[-71.95,11.42],[-71.62,10.97],[-71.63,10.45],[-72.07,9.87],[-71.7,9.07],[-71.26,9.14],[-71.04,9.86],[-71.35,10.21],[-71.4,10.97],[-70.16,11.38],[-70.29,11.85],[-69.94,12.16],[-69.58,11.46],[-68.88,11.44],[-68.23,10.89],[-68.19,10.55],[-67.3,10.55],[-66.23,10.65],[-65.66,10.2],[-64.89,10.08],[-64.33,10.39],[-64.32,10.64],[-63.08,10.7],[-61.88,10.72],[-62.73,10.42],[-62.39,9.95],[-61.59,9.87],[-60.83,9.38],[-60.67,8.58],[-60.15,8.6],[-59.76,8.37],[-60.55,7.78],[-60.64,7.42],[-60.3,7.04],[-60.54,6.86],[-61.16,6.7],[-61.14,6.23],[-61.41,5.96],[-60.73,5.2]]]]},{n:`Guyana`,a2:`GY`,a3:`GUY`,p:`GY`,l:[-58.94,5.12],g:[[[[-56.54,1.9],[-56.78,1.86],[-57.34,1.95],[-57.66,1.68],[-58.11,1.51],[-58.43,1.46],[-58.54,1.27],[-59.03,1.32],[-59.65,1.79],[-59.72,2.25],[-59.97,2.76],[-59.82,3.61],[-59.54,3.96],[-59.77,4.42],[-60.11,4.57],[-59.98,5.01],[-60.21,5.24],[-60.73,5.2],[-61.41,5.96],[-61.14,6.23],[-61.16,6.7],[-60.54,6.86],[-60.3,7.04],[-60.64,7.42],[-60.55,7.78],[-59.76,8.37],[-59.1,8],[-58.48,7.35],[-58.45,6.83],[-58.08,6.81],[-57.54,6.32],[-57.15,5.97],[-57.31,5.07],[-57.91,4.81],[-57.86,4.58],[-58.04,4.06],[-57.6,3.33],[-57.28,3.33],[-57.15,2.77],[-56.54,1.9]]]]},{n:`Suriname`,a2:`SR`,a3:`SUR`,p:`SR`,l:[-55.91,4.14],g:[[[[-54.52,2.31],[-55.1,2.52],[-55.57,2.42],[-55.97,2.51],[-56.07,2.22],[-55.91,2.02],[-56,1.82],[-56.54,1.9],[-57.15,2.77],[-57.28,3.33],[-57.6,3.33],[-58.04,4.06],[-57.86,4.58],[-57.91,4.81],[-57.31,5.07],[-57.15,5.97],[-55.95,5.77],[-55.84,5.95],[-55.03,6.03],[-53.96,5.76],[-54.48,4.9],[-54.4,4.21],[-54.01,3.62],[-54.18,3.19],[-54.27,2.73],[-54.52,2.31]]]]},{n:`France`,a2:``,a3:`FRA`,p:`F`,l:[2.55,46.7],g:[[[[-51.66,4.16],[-52.25,3.24],[-52.56,2.5],[-52.94,2.12],[-53.42,2.05],[-53.55,2.33],[-53.78,2.38],[-54.09,2.11],[-54.52,2.31],[-54.27,2.73],[-54.18,3.19],[-54.01,3.62],[-54.4,4.21],[-54.48,4.9],[-53.96,5.76],[-53.62,5.65],[-52.88,5.41],[-51.82,4.57],[-51.66,4.16]]],[[[6.19,49.46],[6.66,49.2],[8.1,49.02],[7.59,48.33],[7.47,47.62],[7.19,47.45],[6.74,47.54],[6.77,47.29],[6.04,46.73],[6.02,46.27],[6.5,46.43],[6.84,45.99],[6.8,45.71],[7.1,45.33],[6.75,45.03],[7.01,44.25],[7.55,44.13],[7.44,43.69],[6.53,43.13],[4.56,43.4],[3.1,43.08],[2.99,42.47],[1.83,42.34],[.7,42.8],[.34,42.58],[-1.5,43.03],[-1.9,43.42],[-1.38,44.02],[-1.19,46.01],[-2.23,47.06],[-2.96,47.57],[-4.49,47.95],[-4.59,48.68],[-3.3,48.9],[-1.62,48.64],[-1.93,49.78],[-.99,49.35],[1.34,50.13],[1.64,50.95],[2.51,51.15],[2.66,50.8],[3.12,50.78],[3.59,50.38],[4.29,49.91],[4.8,49.99],[5.67,49.53],[5.9,49.44],[6.19,49.46]]],[[[8.75,42.63],[9.39,43.01],[9.56,42.15],[9.23,41.38],[8.78,41.58],[8.54,42.26],[8.75,42.63]]]]},{n:`Ecuador`,a2:`EC`,a3:`ECU`,p:`EC`,l:[-78.19,-1.26],g:[[[[-75.37,-.15],[-75.23,-.91],[-75.54,-1.56],[-76.64,-2.61],[-77.84,-3],[-78.45,-3.87],[-78.64,-4.55],[-79.21,-4.96],[-79.62,-4.45],[-80.03,-4.35],[-80.44,-4.43],[-80.47,-4.06],[-80.18,-3.82],[-80.3,-3.4],[-79.77,-2.66],[-79.99,-2.22],[-80.37,-2.69],[-80.97,-2.25],[-80.76,-1.97],[-80.93,-1.06],[-80.58,-.91],[-80.4,-.28],[-80.02,.36],[-80.09,.77],[-79.54,.98],[-78.86,1.38],[-77.86,.81],[-77.67,.83],[-77.42,.4],[-76.58,.26],[-76.29,.42],[-75.8,.08],[-75.37,-.15]]]]},{n:`Puerto Rico`,a2:`PR`,a3:`PRI`,p:`PR`,l:[-66.48,18.23],g:[[[[-66.28,18.51],[-65.77,18.43],[-65.59,18.23],[-65.85,17.98],[-66.6,17.98],[-67.18,17.95],[-67.24,18.37],[-67.1,18.52],[-66.28,18.51]]]]},{n:`Jamaica`,a2:`JM`,a3:`JAM`,p:`J`,l:[-77.32,18.14],g:[[[[-77.57,18.49],[-76.9,18.4],[-76.37,18.16],[-76.2,17.89],[-76.9,17.87],[-77.21,17.7],[-77.77,17.86],[-78.34,18.23],[-78.22,18.45],[-77.8,18.52],[-77.57,18.49]]]]},{n:`Cuba`,a2:`CU`,a3:`CUB`,p:`CU`,l:[-77.98,21.33],g:[[[[-82.27,23.19],[-81.4,23.12],[-80.62,23.11],[-79.68,22.77],[-79.28,22.4],[-78.35,22.51],[-77.99,22.28],[-77.15,21.66],[-76.52,21.21],[-76.19,21.22],[-75.6,21.02],[-75.67,20.74],[-74.93,20.69],[-74.18,20.28],[-74.3,20.05],[-74.96,19.92],[-75.63,19.87],[-76.32,19.95],[-77.76,19.86],[-77.09,20.41],[-77.49,20.67],[-78.14,20.74],[-78.48,21.03],[-78.72,21.6],[-79.28,21.56],[-80.22,21.83],[-80.52,22.04],[-81.82,22.19],[-82.17,22.39],[-81.8,22.64],[-82.78,22.69],[-83.49,22.17],[-83.91,22.15],[-84.05,21.91],[-84.55,21.8],[-84.97,21.9],[-84.45,22.2],[-84.23,22.57],[-83.78,22.79],[-83.27,22.98],[-82.51,23.08],[-82.27,23.19]]]]},{n:`Zimbabwe`,a2:`ZW`,a3:`ZWE`,p:`ZW`,l:[29.93,-18.91],g:[[[[31.19,-22.25],[30.66,-22.15],[30.32,-22.27],[29.84,-22.1],[29.43,-22.09],[28.79,-21.64],[28.02,-21.49],[27.73,-20.85],[27.72,-20.5],[27.3,-20.39],[26.16,-19.29],[25.85,-18.71],[25.65,-18.54],[25.26,-17.74],[26.38,-17.85],[26.71,-17.96],[27.04,-17.94],[27.6,-17.29],[28.47,-16.47],[28.83,-16.39],[28.95,-16.04],[29.52,-15.64],[30.27,-15.51],[30.34,-15.88],[31.17,-15.86],[31.64,-16.07],[31.85,-16.32],[32.33,-16.39],[32.85,-16.71],[32.85,-17.98],[32.65,-18.67],[32.61,-19.42],[32.77,-19.72],[32.66,-20.3],[32.51,-20.4],[32.24,-21.12],[31.19,-22.25]]]]},{n:`Botswana`,a2:`BW`,a3:`BWA`,p:`BW`,l:[24.18,-22.1],g:[[[[29.43,-22.09],[28.02,-22.83],[27.12,-23.57],[26.79,-24.24],[26.49,-24.62],[25.94,-24.7],[25.77,-25.17],[25.66,-25.49],[25.03,-25.72],[24.21,-25.67],[23.73,-25.39],[23.31,-25.27],[22.82,-25.5],[22.58,-25.98],[22.11,-26.28],[21.61,-26.73],[20.89,-26.83],[20.67,-26.48],[20.76,-25.87],[20.17,-24.92],[19.9,-24.77],[19.9,-21.85],[20.88,-21.81],[20.91,-18.25],[21.66,-18.22],[23.2,-17.87],[23.58,-18.28],[24.22,-17.89],[24.52,-17.89],[25.08,-17.66],[25.26,-17.74],[25.65,-18.54],[25.85,-18.71],[26.16,-19.29],[27.3,-20.39],[27.72,-20.5],[27.73,-20.85],[28.02,-21.49],[28.79,-21.64],[29.43,-22.09]]]]},{n:`Namibia`,a2:`NA`,a3:`NAM`,p:`NA`,l:[17.11,-20.58],g:[[[[19.9,-24.77],[19.89,-28.46],[19,-28.97],[18.46,-29.05],[17.84,-28.86],[17.39,-28.78],[17.22,-28.36],[16.82,-28.08],[16.34,-28.58],[15.6,-27.82],[15.21,-27.09],[14.99,-26.12],[14.74,-25.39],[14.41,-23.85],[14.39,-22.66],[14.26,-22.11],[13.87,-21.7],[13.35,-20.87],[12.83,-19.67],[12.61,-19.05],[11.79,-18.07],[11.73,-17.3],[12.22,-17.11],[12.81,-16.94],[13.46,-16.97],[14.06,-17.42],[14.21,-17.35],[18.26,-17.31],[18.96,-17.79],[21.38,-17.93],[23.22,-17.52],[24.03,-17.3],[24.68,-17.35],[25.08,-17.58],[25.08,-17.66],[24.52,-17.89],[24.22,-17.89],[23.58,-18.28],[23.2,-17.87],[21.66,-18.22],[20.91,-18.25],[20.88,-21.81],[19.9,-21.85],[19.9,-24.77]]]]},{n:`Senegal`,a2:`SN`,a3:`SEN`,p:`SN`,l:[-14.78,15.14],g:[[[[-16.71,13.59],[-17.13,14.37],[-17.63,14.73],[-17.19,14.92],[-16.7,15.62],[-16.46,16.14],[-16.12,16.46],[-15.62,16.37],[-15.14,16.59],[-14.58,16.6],[-14.1,16.3],[-13.44,16.04],[-12.83,15.3],[-12.17,14.62],[-12.12,13.99],[-11.93,13.42],[-11.55,13.14],[-11.47,12.75],[-11.51,12.44],[-11.66,12.39],[-12.2,12.47],[-12.28,12.35],[-12.5,12.33],[-13.22,12.58],[-13.7,12.59],[-15.55,12.63],[-15.82,12.52],[-16.15,12.55],[-16.68,12.38],[-16.84,13.15],[-15.93,13.13],[-15.69,13.27],[-15.51,13.28],[-15.14,13.51],[-14.71,13.3],[-14.28,13.28],[-13.84,13.51],[-14.05,13.79],[-14.38,13.63],[-14.69,13.63],[-15.08,13.88],[-15.4,13.86],[-15.62,13.62],[-16.71,13.59]]]]},{n:`Mali`,a2:`ML`,a3:`MLI`,p:`ML`,l:[-2.04,18.69],g:[[[[-11.51,12.44],[-11.47,12.75],[-11.55,13.14],[-11.93,13.42],[-12.12,13.99],[-12.17,14.62],[-11.83,14.8],[-11.67,15.39],[-11.35,15.41],[-10.65,15.13],[-10.09,15.33],[-9.7,15.26],[-9.55,15.49],[-5.54,15.5],[-5.32,16.2],[-5.49,16.33],[-5.97,20.64],[-6.45,24.96],[-4.92,24.97],[-1.55,22.79],[1.82,20.61],[2.06,20.14],[2.68,19.86],[3.15,19.69],[3.16,19.06],[4.27,19.16],[4.27,16.85],[3.72,16.18],[3.64,15.57],[2.75,15.41],[1.39,15.32],[1.02,14.97],[.37,14.93],[-.27,14.92],[-.52,15.12],[-1.07,14.97],[-2,14.56],[-2.19,14.25],[-2.97,13.8],[-3.1,13.54],[-3.52,13.34],[-4.01,13.47],[-4.28,13.23],[-4.43,12.54],[-5.22,11.71],[-5.2,11.38],[-5.47,10.95],[-5.4,10.37],[-5.82,10.22],[-6.05,10.1],[-6.21,10.52],[-6.49,10.41],[-6.67,10.43],[-6.85,10.14],[-7.62,10.15],[-7.9,10.3],[-8.03,10.21],[-8.34,10.49],[-8.28,10.79],[-8.41,10.91],[-8.62,10.81],[-8.58,11.14],[-8.38,11.39],[-8.79,11.81],[-8.91,12.09],[-9.13,12.31],[-9.33,12.33],[-9.57,12.19],[-9.89,12.06],[-10.17,11.84],[-10.59,11.92],[-10.87,12.18],[-11.04,12.21],[-11.3,12.08],[-11.46,12.08],[-11.51,12.44]]]]},{n:`Mauritania`,a2:`MR`,a3:`MRT`,p:`MR`,l:[-9.74,19.59],g:[[[[-17.06,21],[-16.85,21.33],[-12.93,21.33],[-13.12,22.77],[-12.87,23.28],[-11.94,23.37],[-11.97,25.93],[-8.69,25.88],[-8.68,27.4],[-4.92,24.97],[-6.45,24.96],[-5.97,20.64],[-5.49,16.33],[-5.32,16.2],[-5.54,15.5],[-9.55,15.49],[-9.7,15.26],[-10.09,15.33],[-10.65,15.13],[-11.35,15.41],[-11.67,15.39],[-11.83,14.8],[-12.17,14.62],[-12.83,15.3],[-13.44,16.04],[-14.1,16.3],[-14.58,16.6],[-15.14,16.59],[-15.62,16.37],[-16.12,16.46],[-16.46,16.14],[-16.55,16.67],[-16.27,17.17],[-16.15,18.11],[-16.26,19.1],[-16.38,19.59],[-16.28,20.09],[-16.54,20.57],[-17.06,21]]]]},{n:`Benin`,a2:`BJ`,a3:`BEN`,p:`BJ`,l:[2.35,10.32],g:[[[[2.69,6.26],[1.87,6.14],[1.62,6.83],[1.66,9.13],[1.46,9.33],[1.43,9.83],[1.08,10.18],[.77,10.47],[.9,11],[1.24,11.11],[1.45,11.55],[1.94,11.64],[2.15,11.94],[2.49,12.23],[2.85,12.24],[3.61,11.66],[3.57,11.33],[3.8,10.73],[3.6,10.33],[3.71,10.06],[3.22,9.44],[2.91,9.14],[2.72,8.51],[2.75,7.87],[2.69,6.26]]]]},{n:`Niger`,a2:`NE`,a3:`NER`,p:`NE`,l:[9.5,17.45],g:[[[[14.85,22.86],[15.1,21.31],[15.47,21.05],[15.49,20.73],[15.9,20.39],[15.69,19.96],[15.3,17.93],[15.25,16.63],[13.97,15.68],[13.54,14.37],[13.96,14],[13.95,13.35],[14.6,13.33],[14.5,12.86],[14.21,12.8],[14.18,12.48],[14,12.46],[13.32,13.56],[13.08,13.6],[12.3,13.04],[11.53,13.33],[10.99,13.39],[10.7,13.25],[10.11,13.28],[9.52,12.85],[9.01,12.83],[7.8,13.34],[7.33,13.1],[6.82,13.12],[6.45,13.49],[5.44,13.87],[4.37,13.75],[4.11,13.53],[3.97,12.96],[3.68,12.55],[3.61,11.66],[2.85,12.24],[2.49,12.23],[2.15,11.94],[2.18,12.63],[1.02,12.85],[.99,13.34],[.43,13.99],[.3,14.44],[.37,14.93],[1.02,14.97],[1.39,15.32],[2.75,15.41],[3.64,15.57],[3.72,16.18],[4.27,16.85],[4.27,19.16],[5.68,19.6],[8.57,21.57],[12,23.47],[13.58,23.04],[14.14,22.49],[14.85,22.86]]]]},{n:`Nigeria`,a2:`NG`,a3:`NGA`,p:`NG`,l:[7.5,9.44],g:[[[[2.69,6.26],[2.75,7.87],[2.72,8.51],[2.91,9.14],[3.22,9.44],[3.71,10.06],[3.6,10.33],[3.8,10.73],[3.57,11.33],[3.61,11.66],[3.68,12.55],[3.97,12.96],[4.11,13.53],[4.37,13.75],[5.44,13.87],[6.45,13.49],[6.82,13.12],[7.33,13.1],[7.8,13.34],[9.01,12.83],[9.52,12.85],[10.11,13.28],[10.7,13.25],[10.99,13.39],[11.53,13.33],[12.3,13.04],[13.08,13.6],[13.32,13.56],[14,12.46],[14.18,12.48],[14.58,12.09],[14.47,11.9],[14.42,11.57],[13.57,10.8],[13.31,10.16],[13.17,9.64],[12.96,9.42],[12.75,8.72],[12.22,8.31],[12.06,7.8],[11.84,7.4],[11.75,6.98],[11.06,6.64],[10.5,7.06],[10.12,7.04],[9.52,6.45],[9.23,6.44],[8.76,5.48],[8.5,4.77],[7.46,4.41],[7.08,4.46],[6.7,4.24],[5.9,4.26],[5.36,4.89],[5.03,5.61],[4.33,6.27],[3.57,6.26],[2.69,6.26]]]]},{n:`Cameroon`,a2:`CM`,a3:`CMR`,p:`CM`,l:[12.47,4.59],g:[[[[14.5,12.86],[14.89,12.22],[14.96,11.56],[14.92,10.89],[15.47,9.98],[14.91,9.99],[14.63,9.92],[14.17,10.02],[13.95,9.55],[14.54,8.97],[14.98,8.8],[15.12,8.38],[15.44,7.69],[15.28,7.42],[14.78,6.41],[14.54,6.23],[14.46,5.45],[14.56,5.03],[14.48,4.73],[14.95,4.21],[15.04,3.85],[15.41,3.34],[15.86,3.01],[15.91,2.56],[16.01,2.27],[15.94,1.73],[15.15,1.96],[14.34,2.23],[13.08,2.27],[12.95,2.32],[12.36,2.19],[11.75,2.33],[11.28,2.26],[9.65,2.28],[9.8,3.07],[9.4,3.73],[8.95,3.9],[8.74,4.35],[8.49,4.5],[8.5,4.77],[8.76,5.48],[9.23,6.44],[9.52,6.45],[10.12,7.04],[10.5,7.06],[11.06,6.64],[11.75,6.98],[11.84,7.4],[12.06,7.8],[12.22,8.31],[12.75,8.72],[12.96,9.42],[13.17,9.64],[13.31,10.16],[13.57,10.8],[14.42,11.57],[14.47,11.9],[14.58,12.09],[14.18,12.48],[14.21,12.8],[14.5,12.86]]]]},{n:`Togo`,a2:`TG`,a3:`TGO`,p:`TG`,l:[1.06,8.81],g:[[[[.9,11],[.77,10.47],[1.08,10.18],[1.43,9.83],[1.46,9.33],[1.66,9.13],[1.62,6.83],[1.87,6.14],[1.06,5.93],[.84,6.28],[.57,6.91],[.49,7.41],[.71,8.31],[.46,8.68],[.37,9.47],[.37,10.19],[-.05,10.71],[.02,11.02],[.9,11]]]]},{n:`Ghana`,a2:`GH`,a3:`GHA`,p:`GH`,l:[-1.04,7.72],g:[[[[.02,11.02],[-.05,10.71],[.37,10.19],[.37,9.47],[.46,8.68],[.71,8.31],[.49,7.41],[.57,6.91],[.84,6.28],[1.06,5.93],[-.51,5.34],[-1.06,5],[-1.96,4.71],[-2.86,4.99],[-2.81,5.39],[-3.24,6.25],[-2.98,7.38],[-2.56,8.22],[-2.83,9.64],[-2.96,10.4],[-2.94,10.96],[-1.2,11.01],[-.76,10.94],[-.44,11.1],[.02,11.02]]]]},{n:`Côte d'Ivoire`,a2:`CI`,a3:`CIV`,p:`CI`,l:[-5.57,7.49],g:[[[[-8.03,10.21],[-7.9,10.3],[-7.62,10.15],[-6.85,10.14],[-6.67,10.43],[-6.49,10.41],[-6.21,10.52],[-6.05,10.1],[-5.82,10.22],[-5.4,10.37],[-4.95,10.15],[-4.78,9.82],[-4.33,9.61],[-3.98,9.86],[-3.51,9.9],[-2.83,9.64],[-2.56,8.22],[-2.98,7.38],[-3.24,6.25],[-2.81,5.39],[-2.86,4.99],[-3.31,4.98],[-4.01,5.18],[-4.65,5.17],[-5.83,4.99],[-6.53,4.71],[-7.52,4.34],[-7.71,4.36],[-7.64,5.19],[-7.54,5.31],[-7.57,5.71],[-7.99,6.13],[-8.31,6.19],[-8.6,6.47],[-8.39,6.91],[-8.49,7.4],[-8.44,7.69],[-8.28,7.69],[-8.22,8.12],[-8.3,8.32],[-8.2,8.46],[-7.83,8.58],[-8.08,9.38],[-8.31,9.79],[-8.23,10.13],[-8.03,10.21]]]]},{n:`Guinea`,a2:`GN`,a3:`GIN`,p:`GN`,l:[-10.02,10.62],g:[[[[-13.7,12.59],[-13.22,12.58],[-12.5,12.33],[-12.28,12.35],[-12.2,12.47],[-11.66,12.39],[-11.51,12.44],[-11.46,12.08],[-11.3,12.08],[-11.04,12.21],[-10.87,12.18],[-10.59,11.92],[-10.17,11.84],[-9.89,12.06],[-9.57,12.19],[-9.33,12.33],[-9.13,12.31],[-8.91,12.09],[-8.79,11.81],[-8.38,11.39],[-8.58,11.14],[-8.62,10.81],[-8.41,10.91],[-8.28,10.79],[-8.34,10.49],[-8.03,10.21],[-8.23,10.13],[-8.31,9.79],[-8.08,9.38],[-7.83,8.58],[-8.2,8.46],[-8.3,8.32],[-8.22,8.12],[-8.28,7.69],[-8.44,7.69],[-8.72,7.71],[-8.93,7.31],[-9.21,7.31],[-9.4,7.53],[-9.34,7.93],[-9.76,8.54],[-10.02,8.43],[-10.23,8.41],[-10.51,8.35],[-10.49,8.72],[-10.65,8.98],[-10.62,9.27],[-10.84,9.69],[-11.12,10.05],[-11.92,10.05],[-12.15,9.86],[-12.43,9.84],[-12.6,9.62],[-12.71,9.34],[-13.25,8.9],[-13.69,9.49],[-14.07,9.89],[-14.33,10.02],[-14.58,10.21],[-14.69,10.66],[-14.84,10.88],[-15.13,11.04],[-14.69,11.53],[-14.38,11.51],[-14.12,11.68],[-13.9,11.68],[-13.74,11.81],[-13.83,12.14],[-13.72,12.25],[-13.7,12.59]]]]},{n:`Guinea-Bissau`,a2:`GW`,a3:`GNB`,p:`GW`,l:[-14.52,12.16],g:[[[[-16.68,12.38],[-16.15,12.55],[-15.82,12.52],[-15.55,12.63],[-13.7,12.59],[-13.72,12.25],[-13.83,12.14],[-13.74,11.81],[-13.9,11.68],[-14.12,11.68],[-14.38,11.51],[-14.69,11.53],[-15.13,11.04],[-15.66,11.46],[-16.09,11.52],[-16.31,11.81],[-16.31,11.96],[-16.61,12.17],[-16.68,12.38]]]]},{n:`Liberia`,a2:`LR`,a3:`LBR`,p:`LR`,l:[-9.46,6.45],g:[[[[-8.44,7.69],[-8.49,7.4],[-8.39,6.91],[-8.6,6.47],[-8.31,6.19],[-7.99,6.13],[-7.57,5.71],[-7.54,5.31],[-7.64,5.19],[-7.71,4.36],[-7.97,4.36],[-9,4.83],[-9.91,5.59],[-10.77,6.14],[-11.44,6.79],[-11.2,7.11],[-11.15,7.4],[-10.7,7.94],[-10.23,8.41],[-10.02,8.43],[-9.76,8.54],[-9.34,7.93],[-9.4,7.53],[-9.21,7.31],[-8.93,7.31],[-8.72,7.71],[-8.44,7.69]]]]},{n:`Sierra Leone`,a2:`SL`,a3:`SLE`,p:`SL`,l:[-11.76,8.62],g:[[[[-13.25,8.9],[-12.71,9.34],[-12.6,9.62],[-12.43,9.84],[-12.15,9.86],[-11.92,10.05],[-11.12,10.05],[-10.84,9.69],[-10.62,9.27],[-10.65,8.98],[-10.49,8.72],[-10.51,8.35],[-10.23,8.41],[-10.7,7.94],[-11.15,7.4],[-11.2,7.11],[-11.44,6.79],[-11.71,6.86],[-12.43,7.26],[-12.95,7.8],[-13.12,8.16],[-13.25,8.9]]]]},{n:`Burkina Faso`,a2:`BF`,a3:`BFA`,p:`BF`,l:[-1.36,12.67],g:[[[[-5.4,10.37],[-5.47,10.95],[-5.2,11.38],[-5.22,11.71],[-4.43,12.54],[-4.28,13.23],[-4.01,13.47],[-3.52,13.34],[-3.1,13.54],[-2.97,13.8],[-2.19,14.25],[-2,14.56],[-1.07,14.97],[-.52,15.12],[-.27,14.92],[.37,14.93],[.3,14.44],[.43,13.99],[.99,13.34],[1.02,12.85],[2.18,12.63],[2.15,11.94],[1.94,11.64],[1.45,11.55],[1.24,11.11],[.9,11],[.02,11.02],[-.44,11.1],[-.76,10.94],[-1.2,11.01],[-2.94,10.96],[-2.96,10.4],[-2.83,9.64],[-3.51,9.9],[-3.98,9.86],[-4.33,9.61],[-4.78,9.82],[-4.95,10.15],[-5.4,10.37]]]]},{n:`Central African Republic`,a2:`CF`,a3:`CAF`,p:`CF`,l:[20.91,6.99],g:[[[[27.37,5.23],[27.04,5.13],[26.4,5.15],[25.65,5.26],[25.28,5.17],[25.13,4.93],[24.81,4.9],[24.41,5.11],[23.3,4.61],[22.84,4.71],[22.7,4.63],[22.41,4.03],[21.66,4.22],[20.93,4.32],[20.29,4.69],[19.47,5.03],[18.93,4.71],[18.54,4.2],[18.45,3.5],[17.81,3.56],[17.13,3.73],[16.54,3.2],[16.01,2.27],[15.91,2.56],[15.86,3.01],[15.41,3.34],[15.04,3.85],[14.95,4.21],[14.48,4.73],[14.56,5.03],[14.46,5.45],[14.54,6.23],[14.78,6.41],[15.28,7.42],[16.11,7.5],[16.29,7.75],[16.46,7.73],[16.71,7.51],[17.96,7.89],[18.39,8.28],[18.91,8.63],[18.81,8.98],[19.09,9.07],[20.06,9.01],[21,9.48],[21.72,10.57],[22.23,10.97],[22.86,11.14],[22.98,10.71],[23.55,10.09],[23.56,9.68],[23.39,9.27],[23.46,8.95],[23.81,8.67],[24.57,8.23],[25.11,7.83],[25.12,7.5],[25.8,6.98],[26.21,6.55],[26.47,5.95],[27.21,5.55],[27.37,5.23]]]]},{n:`Republic of the Congo`,a2:`CG`,a3:`COG`,p:`CG`,l:[15.9,.14],g:[[[[18.45,3.5],[18.39,2.9],[18.09,2.37],[17.9,1.74],[17.77,.86],[17.83,.29],[17.66,-.06],[17.64,-.42],[17.52,-.74],[16.87,-1.23],[16.41,-1.74],[15.97,-2.71],[16.01,-3.54],[15.75,-3.86],[15.17,-4.34],[14.58,-4.97],[14.21,-4.79],[14.14,-4.51],[13.6,-4.5],[13.26,-4.88],[13,-4.78],[12.62,-4.44],[12.32,-4.61],[11.91,-5.04],[11.09,-3.98],[11.86,-3.43],[11.48,-2.77],[11.82,-2.51],[12.5,-2.39],[12.58,-1.95],[13.11,-2.43],[13.99,-2.47],[14.3,-2],[14.43,-1.33],[14.32,-.55],[13.84,.04],[14.28,1.2],[14.03,1.4],[13.28,1.31],[13,1.83],[13.08,2.27],[14.34,2.23],[15.15,1.96],[15.94,1.73],[16.01,2.27],[16.54,3.2],[17.13,3.73],[17.81,3.56],[18.45,3.5]]]]},{n:`Gabon`,a2:`GA`,a3:`GAB`,p:`GA`,l:[11.84,-.44],g:[[[[11.28,2.26],[11.75,2.33],[12.36,2.19],[12.95,2.32],[13.08,2.27],[13,1.83],[13.28,1.31],[14.03,1.4],[14.28,1.2],[13.84,.04],[14.32,-.55],[14.43,-1.33],[14.3,-2],[13.99,-2.47],[13.11,-2.43],[12.58,-1.95],[12.5,-2.39],[11.82,-2.51],[11.48,-2.77],[11.86,-3.43],[11.09,-3.98],[10.07,-2.97],[9.41,-2.14],[8.8,-1.11],[8.83,-.78],[9.05,-.46],[9.29,.27],[9.49,1.01],[9.83,1.07],[11.29,1.06],[11.28,2.26]]]]},{n:`Equatorial Guinea`,a2:`GQ`,a3:`GNQ`,p:`GQ`,l:[8.99,2.33],g:[[[[9.65,2.28],[11.28,2.26],[11.29,1.06],[9.83,1.07],[9.49,1.01],[9.31,1.16],[9.65,2.28]]]]},{n:`Zambia`,a2:`ZM`,a3:`ZMB`,p:`ZM`,l:[26.4,-14.66],g:[[[[30.74,-8.34],[31.16,-8.59],[31.56,-8.76],[32.19,-8.93],[32.76,-9.23],[33.23,-9.68],[33.49,-10.53],[33.32,-10.8],[33.11,-11.61],[33.31,-12.44],[32.99,-12.78],[32.69,-13.71],[33.21,-13.97],[30.18,-14.8],[30.27,-15.51],[29.52,-15.64],[28.95,-16.04],[28.83,-16.39],[28.47,-16.47],[27.6,-17.29],[27.04,-17.94],[26.71,-17.96],[26.38,-17.85],[25.26,-17.74],[25.08,-17.66],[25.08,-17.58],[24.68,-17.35],[24.03,-17.3],[23.22,-17.52],[22.56,-16.9],[21.89,-16.08],[21.93,-12.9],[24.02,-12.91],[23.93,-12.57],[24.08,-12.19],[23.9,-11.72],[24.02,-11.24],[23.91,-10.93],[24.26,-10.95],[24.31,-11.26],[24.78,-11.24],[25.42,-11.33],[25.75,-11.78],[26.55,-11.92],[27.16,-11.61],[27.39,-12.13],[28.16,-12.27],[28.52,-12.7],[28.93,-13.25],[29.7,-13.26],[29.62,-12.18],[29.34,-12.36],[28.64,-11.97],[28.37,-11.79],[28.5,-10.79],[28.67,-9.61],[28.45,-9.16],[28.73,-8.53],[29,-8.41],[30.35,-8.24],[30.74,-8.34]]]]},{n:`Malawi`,a2:`MW`,a3:`MWI`,p:`MW`,l:[33.61,-13.39],g:[[[[32.76,-9.23],[33.74,-9.42],[33.94,-9.69],[34.28,-10.16],[34.56,-11.52],[34.28,-12.28],[34.56,-13.58],[34.91,-13.57],[35.27,-13.89],[35.69,-14.61],[35.77,-15.9],[35.34,-16.11],[35.03,-16.8],[34.38,-16.18],[34.31,-15.48],[34.52,-15.01],[34.46,-14.61],[34.06,-14.36],[33.79,-14.45],[33.21,-13.97],[32.69,-13.71],[32.99,-12.78],[33.31,-12.44],[33.11,-11.61],[33.32,-10.8],[33.49,-10.53],[33.23,-9.68],[32.76,-9.23]]]]},{n:`Mozambique`,a2:`MZ`,a3:`MOZ`,p:`MZ`,l:[37.84,-13.94],g:[[[[34.56,-11.52],[35.31,-11.44],[36.51,-11.72],[36.78,-11.59],[37.47,-11.57],[37.83,-11.27],[38.43,-11.29],[39.52,-10.9],[40.32,-10.32],[40.48,-10.77],[40.44,-11.76],[40.56,-12.64],[40.6,-14.2],[40.78,-14.69],[40.48,-15.41],[40.09,-16.1],[39.45,-16.72],[38.54,-17.1],[37.41,-17.59],[36.28,-18.66],[35.9,-18.84],[35.2,-19.55],[34.79,-19.78],[34.7,-20.5],[35.18,-21.25],[35.37,-21.84],[35.39,-22.14],[35.56,-22.09],[35.53,-23.07],[35.37,-23.54],[35.61,-23.71],[35.46,-24.12],[35.04,-24.48],[34.22,-24.82],[33.01,-25.36],[32.57,-25.73],[32.66,-26.15],[32.92,-26.22],[32.83,-26.74],[32.07,-26.73],[31.99,-26.29],[31.84,-25.84],[31.75,-25.48],[31.93,-24.37],[31.67,-23.66],[31.19,-22.25],[32.24,-21.12],[32.51,-20.4],[32.66,-20.3],[32.77,-19.72],[32.61,-19.42],[32.65,-18.67],[32.85,-17.98],[32.85,-16.71],[32.33,-16.39],[31.85,-16.32],[31.64,-16.07],[31.17,-15.86],[30.34,-15.88],[30.27,-15.51],[30.18,-14.8],[33.21,-13.97],[33.79,-14.45],[34.06,-14.36],[34.46,-14.61],[34.52,-15.01],[34.31,-15.48],[34.38,-16.18],[35.03,-16.8],[35.34,-16.11],[35.77,-15.9],[35.69,-14.61],[35.27,-13.89],[34.91,-13.57],[34.56,-13.58],[34.28,-12.28],[34.56,-11.52]]]]},{n:`Kingdom of eSwatini`,a2:`SZ`,a3:`SWZ`,p:`ES`,l:[31.47,-26.53],g:[[[[32.07,-26.73],[31.87,-27.18],[31.28,-27.29],[30.69,-26.74],[30.68,-26.4],[30.95,-26.02],[31.04,-25.73],[31.33,-25.66],[31.84,-25.84],[31.99,-26.29],[32.07,-26.73]]]]},{n:`Angola`,a2:`AO`,a3:`AGO`,p:`AO`,l:[17.98,-12.18],g:[[[[13,-4.78],[12.63,-4.99],[12.47,-5.25],[12.44,-5.68],[12.18,-5.79],[11.91,-5.04],[12.32,-4.61],[12.62,-4.44],[13,-4.78]]],[[[12.32,-6.1],[12.74,-5.97],[13.02,-5.98],[13.38,-5.86],[16.33,-5.88],[16.57,-6.62],[16.86,-7.22],[17.09,-7.55],[17.47,-8.07],[18.13,-7.99],[18.46,-7.85],[19.02,-7.99],[19.17,-7.74],[19.42,-7.16],[20.04,-7.12],[20.09,-6.94],[20.6,-6.94],[20.51,-7.3],[21.73,-7.29],[21.75,-7.92],[21.95,-8.31],[21.8,-8.91],[21.88,-9.52],[22.21,-9.89],[22.16,-11.08],[22.4,-10.99],[22.84,-11.02],[23.46,-10.87],[23.91,-10.93],[24.02,-11.24],[23.9,-11.72],[24.08,-12.19],[23.93,-12.57],[24.02,-12.91],[21.93,-12.9],[21.89,-16.08],[22.56,-16.9],[23.22,-17.52],[21.38,-17.93],[18.96,-17.79],[18.26,-17.31],[14.21,-17.35],[14.06,-17.42],[13.46,-16.97],[12.81,-16.94],[12.22,-17.11],[11.73,-17.3],[11.64,-16.67],[11.78,-15.79],[12.12,-14.88],[12.18,-14.45],[12.5,-13.55],[12.74,-13.14],[13.31,-12.48],[13.63,-12.04],[13.74,-11.3],[13.69,-10.73],[13.39,-10.37],[13.12,-9.77],[12.88,-9.17],[12.93,-8.96],[13.24,-8.56],[12.93,-7.6],[12.73,-6.93],[12.23,-6.29],[12.32,-6.1]]]]},{n:`Burundi`,a2:`BI`,a3:`BDI`,p:`BI`,l:[29.92,-3.33],g:[[[[30.47,-2.41],[30.53,-2.81],[30.74,-3.03],[30.75,-3.36],[30.51,-3.57],[30.12,-4.09],[29.75,-4.45],[29.34,-4.5],[29.28,-3.29],[29.02,-2.84],[29.63,-2.92],[29.94,-2.35],[30.47,-2.41]]]]},{n:`Israel`,a2:`IL`,a3:`ISR`,p:`IS`,l:[34.85,30.91],g:[[[[35.72,32.71],[35.55,32.39],[35.18,32.53],[34.97,31.87],[35.23,31.75],[34.97,31.62],[34.93,31.35],[35.4,31.49],[35.42,31.1],[34.92,29.5],[34.82,29.76],[34.27,31.22],[34.56,31.55],[34.49,31.61],[34.75,32.07],[34.96,32.83],[35.1,33.08],[35.13,33.09],[35.46,33.09],[35.55,33.26],[35.82,33.28],[35.84,32.87],[35.7,32.72],[35.72,32.71]]]]},{n:`Lebanon`,a2:`LB`,a3:`LBN`,p:`LB`,l:[35.99,34.13],g:[[[[35.82,33.28],[35.55,33.26],[35.46,33.09],[35.13,33.09],[35.48,33.91],[35.98,34.61],[36,34.64],[36.45,34.59],[36.61,34.2],[36.07,33.82],[35.82,33.28]]]]},{n:`Madagascar`,a2:`MG`,a3:`MDG`,p:`MG`,l:[46.7,-18.63],g:[[[[49.54,-12.47],[49.81,-12.9],[50.06,-13.56],[50.22,-14.76],[50.48,-15.23],[50.38,-15.71],[50.2,-16],[49.86,-15.41],[49.67,-15.71],[49.86,-16.45],[49.77,-16.88],[49.5,-17.11],[49.44,-17.95],[49.04,-19.12],[48.55,-20.5],[47.93,-22.39],[47.55,-23.78],[47.1,-24.94],[46.28,-25.18],[45.41,-25.6],[44.83,-25.35],[44.04,-24.99],[43.76,-24.46],[43.7,-23.57],[43.35,-22.78],[43.25,-22.06],[43.43,-21.34],[43.89,-21.16],[43.9,-20.83],[44.37,-20.07],[44.46,-19.44],[44.23,-18.96],[44.04,-18.33],[43.96,-17.41],[44.31,-16.85],[44.45,-16.22],[44.94,-16.18],[45.5,-15.97],[45.87,-15.79],[46.31,-15.78],[46.88,-15.21],[47.71,-14.59],[48.01,-14.09],[47.87,-13.66],[48.29,-13.78],[48.85,-13.09],[48.86,-12.49],[49.19,-12.04],[49.54,-12.47]]]]},{n:`Palestine`,a2:`PS`,a3:`PSE`,p:`PAL`,l:[35.29,32.05],g:[[[[35.4,31.49],[34.93,31.35],[34.97,31.62],[35.23,31.75],[34.97,31.87],[35.18,32.53],[35.55,32.39],[35.55,31.78],[35.4,31.49]]]]},{n:`The Gambia`,a2:`GM`,a3:`GMB`,p:`GM`,l:[-15,13.64],g:[[[[-16.71,13.59],[-15.62,13.62],[-15.4,13.86],[-15.08,13.88],[-14.69,13.63],[-14.38,13.63],[-14.05,13.79],[-13.84,13.51],[-14.28,13.28],[-14.71,13.3],[-15.14,13.51],[-15.51,13.28],[-15.69,13.27],[-15.93,13.13],[-16.84,13.15],[-16.71,13.59]]]]},{n:`Tunisia`,a2:`TN`,a3:`TUN`,p:`TN`,l:[9.01,33.69],g:[[[[9.48,30.31],[9.06,32.1],[8.44,32.51],[8.43,32.75],[7.61,33.34],[7.52,34.1],[8.14,34.66],[8.38,35.48],[8.22,36.43],[8.42,36.95],[9.51,37.35],[10.21,37.23],[10.18,36.72],[11.03,37.09],[11.1,36.9],[10.6,36.41],[10.59,35.95],[10.94,35.7],[10.81,34.83],[10.15,34.33],[10.34,33.79],[10.86,33.77],[11.11,33.29],[11.49,33.14],[11.43,32.37],[10.94,32.08],[10.64,31.76],[9.95,31.38],[10.06,30.96],[9.97,30.54],[9.48,30.31]]]]},{n:`Algeria`,a2:`DZ`,a3:`DZA`,p:`DZ`,l:[2.81,27.4],g:[[[[-8.68,27.4],[-8.67,27.59],[-8.67,27.66],[-8.67,28.84],[-7.06,29.58],[-6.06,29.73],[-5.24,30],[-4.86,30.5],[-3.69,30.9],[-3.65,31.64],[-3.07,31.72],[-2.62,32.09],[-1.31,32.26],[-1.12,32.65],[-1.39,32.86],[-1.73,33.92],[-1.79,34.53],[-2.17,35.17],[-1.21,35.71],[-.13,35.89],[.5,36.3],[1.47,36.61],[3.16,36.78],[4.82,36.87],[5.32,36.72],[6.26,37.11],[7.33,37.12],[7.74,36.89],[8.42,36.95],[8.22,36.43],[8.38,35.48],[8.14,34.66],[7.52,34.1],[7.61,33.34],[8.43,32.75],[8.44,32.51],[9.06,32.1],[9.48,30.31],[9.81,29.42],[9.86,28.96],[9.68,28.14],[9.76,27.69],[9.63,27.14],[9.72,26.51],[9.32,26.09],[9.91,25.37],[9.95,24.94],[10.3,24.38],[10.77,24.56],[11.56,24.1],[12,23.47],[8.57,21.57],[5.68,19.6],[4.27,19.16],[3.16,19.06],[3.15,19.69],[2.68,19.86],[2.06,20.14],[1.82,20.61],[-1.55,22.79],[-4.92,24.97],[-8.68,27.4]]]]},{n:`Jordan`,a2:`JO`,a3:`JOR`,p:`J`,l:[36.38,30.81],g:[[[[35.55,32.39],[35.72,32.71],[36.83,32.31],[38.79,33.38],[39.2,32.16],[39,32.01],[37,31.51],[38,30.51],[37.67,30.34],[37.5,30],[36.74,29.87],[36.5,29.51],[36.07,29.2],[34.96,29.36],[34.92,29.5],[35.42,31.1],[35.4,31.49],[35.55,31.78],[35.55,32.39]]]]},{n:`United Arab Emirates`,a2:`AE`,a3:`ARE`,p:`AE`,l:[54.55,23.47],g:[[[[51.58,24.25],[51.76,24.29],[51.79,24.02],[52.58,24.18],[53.4,24.15],[54.01,24.12],[54.69,24.8],[55.44,25.44],[56.07,26.06],[56.26,25.71],[56.4,24.92],[55.89,24.92],[55.8,24.27],[55.98,24.13],[55.53,23.93],[55.53,23.52],[55.23,23.11],[55.21,22.71],[55.01,22.5],[52,23],[51.62,24.01],[51.58,24.25]]]]},{n:`Qatar`,a2:`QA`,a3:`QAT`,p:`QA`,l:[51.14,25.24],g:[[[[50.81,24.75],[50.74,25.48],[51.01,26.01],[51.29,26.11],[51.59,25.8],[51.61,25.22],[51.39,24.63],[51.11,24.56],[50.81,24.75]]]]},{n:`Kuwait`,a2:`KW`,a3:`KWT`,p:`KW`,l:[47.31,29.41],g:[[[[47.97,29.98],[48.18,29.53],[48.09,29.31],[48.42,28.55],[47.71,28.53],[47.46,29],[46.57,29.1],[47.3,30.06],[47.97,29.98]]]]},{n:`Iraq`,a2:`IQ`,a3:`IRQ`,p:`IRQ`,l:[43.26,33.09],g:[[[[39.2,32.16],[38.79,33.38],[41.01,34.42],[41.38,35.63],[41.29,36.36],[41.84,36.61],[42.35,37.23],[42.78,37.39],[43.94,37.26],[44.29,37],[44.77,37.17],[45.42,35.98],[46.08,35.68],[46.15,35.09],[45.65,34.75],[45.42,33.97],[46.11,33.02],[47.33,32.47],[47.85,31.71],[47.69,30.98],[48,30.99],[48.01,30.45],[48.57,29.93],[47.97,29.98],[47.3,30.06],[46.57,29.1],[44.71,29.18],[41.89,31.19],[40.4,31.89],[39.2,32.16]]]]},{n:`Oman`,a2:`OM`,a3:`OMN`,p:`OM`,l:[57.34,22.12],g:[[[[55.21,22.71],[55.23,23.11],[55.53,23.52],[55.53,23.93],[55.98,24.13],[55.8,24.27],[55.89,24.92],[56.4,24.92],[56.85,24.24],[57.4,23.88],[58.14,23.75],[58.73,23.57],[59.18,22.99],[59.45,22.66],[59.81,22.53],[59.81,22.31],[59.44,21.71],[59.28,21.43],[58.86,21.11],[58.49,20.43],[58.03,20.48],[57.83,20.24],[57.67,19.74],[57.79,19.07],[57.69,18.94],[57.23,18.95],[56.61,18.57],[56.51,18.09],[56.28,17.88],[55.66,17.88],[55.27,17.63],[55.27,17.23],[54.79,16.95],[54.24,17.04],[53.57,16.71],[53.11,16.65],[52.78,17.35],[52,19],[55,20],[55.67,22],[55.21,22.71]]],[[[56.26,25.71],[56.07,26.06],[56.36,26.4],[56.49,26.31],[56.39,25.9],[56.26,25.71]]]]},{n:`Vanuatu`,a2:`VU`,a3:`VUT`,p:`VU`,l:[166.91,-15.37],g:[[[[167.22,-15.89],[167.84,-16.47],[167.52,-16.6],[167.18,-16.16],[167.22,-15.89]]],[[[166.79,-15.67],[166.65,-15.39],[166.63,-14.63],[167.11,-14.93],[167.27,-15.74],[167,-15.61],[166.79,-15.67]]]]},{n:`Cambodia`,a2:`KH`,a3:`KHM`,p:`KH`,l:[104.5,12.65],g:[[[[102.58,12.19],[102.35,13.39],[102.99,14.23],[104.28,14.42],[105.22,14.27],[106.04,13.88],[106.5,14.57],[107.38,14.2],[107.61,13.54],[107.49,12.34],[105.81,11.57],[106.25,10.96],[105.2,10.89],[104.33,10.49],[103.5,10.63],[103.09,11.15],[102.58,12.19]]]]},{n:`Thailand`,a2:`TH`,a3:`THA`,p:`TH`,l:[101.07,15.46],g:[[[[105.22,14.27],[104.28,14.42],[102.99,14.23],[102.35,13.39],[102.58,12.19],[101.69,12.65],[100.83,12.63],[100.98,13.41],[100.1,13.41],[100.02,12.31],[99.48,10.85],[99.15,9.96],[99.22,9.24],[99.87,9.21],[100.28,8.3],[100.46,7.43],[101.02,6.86],[101.62,6.74],[102.14,6.22],[101.81,5.81],[101.15,5.69],[101.08,6.2],[100.26,6.64],[100.09,6.46],[99.69,6.85],[99.52,7.34],[98.99,7.91],[98.5,8.38],[98.34,7.79],[98.15,8.35],[98.26,8.97],[98.55,9.93],[99.04,10.96],[99.59,11.89],[99.2,12.8],[99.21,13.27],[99.1,13.83],[98.43,14.62],[98.19,15.12],[98.54,15.31],[98.9,16.18],[98.49,16.84],[97.86,17.57],[97.38,18.45],[97.8,18.63],[98.25,19.71],[98.96,19.75],[99.54,20.19],[100.12,20.42],[100.55,20.11],[100.61,19.51],[101.28,19.46],[101.04,18.41],[101.06,17.51],[102.11,18.11],[102.41,17.93],[103,17.96],[103.2,18.31],[103.96,18.24],[104.72,17.43],[104.78,16.44],[105.59,15.57],[105.54,14.72],[105.22,14.27]]]]},{n:`Lao PDR`,a2:`LA`,a3:`LAO`,p:`LA`,l:[102.53,19.43],g:[[[[107.38,14.2],[106.5,14.57],[106.04,13.88],[105.22,14.27],[105.54,14.72],[105.59,15.57],[104.78,16.44],[104.72,17.43],[103.96,18.24],[103.2,18.31],[103,17.96],[102.41,17.93],[102.11,18.11],[101.06,17.51],[101.04,18.41],[101.28,19.46],[100.61,19.51],[100.55,20.11],[100.12,20.42],[100.33,20.79],[101.18,21.44],[101.27,21.2],[101.8,21.17],[101.65,22.32],[102.17,22.46],[102.75,21.68],[103.2,20.77],[104.44,20.76],[104.82,19.89],[104.18,19.62],[103.9,19.27],[105.09,18.67],[105.93,17.49],[106.56,16.6],[107.31,15.91],[107.56,15.2],[107.38,14.2]]]]},{n:`Myanmar`,a2:`MM`,a3:`MMR`,p:`MM`,l:[95.8,21.57],g:[[[[100.12,20.42],[99.54,20.19],[98.96,19.75],[98.25,19.71],[97.8,18.63],[97.38,18.45],[97.86,17.57],[98.49,16.84],[98.9,16.18],[98.54,15.31],[98.19,15.12],[98.43,14.62],[99.1,13.83],[99.21,13.27],[99.2,12.8],[99.59,11.89],[99.04,10.96],[98.55,9.93],[98.46,10.68],[98.76,11.44],[98.43,12.03],[98.51,13.12],[98.1,13.64],[97.78,14.84],[97.6,16.1],[97.16,16.93],[96.51,16.43],[95.37,15.71],[94.81,15.8],[94.19,16.04],[94.53,17.28],[94.32,18.21],[93.54,19.37],[93.66,19.73],[93.08,19.86],[92.37,20.67],[92.3,21.48],[92.65,21.32],[92.67,22.04],[93.17,22.28],[93.06,22.7],[93.29,23.04],[93.33,24.08],[94.11,23.85],[94.55,24.68],[94.6,25.16],[95.16,26],[95.12,26.57],[96.42,27.26],[97.13,27.08],[97.05,27.7],[97.4,27.88],[97.33,28.26],[97.91,28.34],[98.25,27.75],[98.68,27.51],[98.71,26.74],[98.67,25.92],[97.72,25.08],[97.6,23.9],[98.66,24.06],[98.9,23.14],[99.53,22.95],[99.24,22.12],[99.98,21.74],[100.42,21.56],[101.15,21.85],[101.18,21.44],[100.33,20.79],[100.12,20.42]]]]},{n:`Vietnam`,a2:`VN`,a3:`VNM`,p:`VN`,l:[105.39,21.72],g:[[[[104.33,10.49],[105.2,10.89],[106.25,10.96],[105.81,11.57],[107.49,12.34],[107.61,13.54],[107.38,14.2],[107.56,15.2],[107.31,15.91],[106.56,16.6],[105.93,17.49],[105.09,18.67],[103.9,19.27],[104.18,19.62],[104.82,19.89],[104.44,20.76],[103.2,20.77],[102.75,21.68],[102.17,22.46],[102.71,22.71],[103.5,22.7],[104.48,22.82],[105.33,23.35],[105.81,22.98],[106.73,22.79],[106.57,22.22],[107.04,21.81],[108.05,21.55],[106.72,20.7],[105.88,19.75],[105.66,19.06],[106.43,18],[107.36,16.7],[108.27,16.08],[108.88,15.28],[109.34,13.43],[109.2,11.67],[108.37,11.01],[107.22,10.36],[106.41,9.53],[105.16,8.6],[104.8,9.24],[105.08,9.92],[104.33,10.49]]]]},{n:`Dem. Rep. Korea`,a2:`KP`,a3:`PRK`,p:`KP`,l:[126.44,39.89],g:[[[[130.64,42.4],[130.78,42.22],[130.4,42.28],[129.97,41.94],[129.67,41.6],[129.71,40.88],[129.19,40.66],[129.01,40.49],[128.63,40.19],[127.97,40.03],[127.53,39.76],[127.5,39.32],[127.39,39.21],[127.78,39.05],[128.35,38.61],[128.21,38.37],[127.78,38.3],[127.07,38.26],[126.68,37.8],[126.24,37.84],[126.17,37.75],[125.69,37.94],[125.57,37.75],[125.28,37.67],[125.24,37.86],[124.98,37.95],[124.71,38.11],[124.99,38.55],[125.22,38.67],[125.13,38.85],[125.39,39.39],[125.32,39.55],[124.74,39.66],[124.27,39.93],[125.08,40.57],[126.18,41.11],[126.87,41.82],[127.34,41.5],[128.21,41.47],[128.05,41.99],[129.6,42.42],[129.99,42.99],[130.64,42.4]]]]},{n:`Republic of Korea`,a2:`KR`,a3:`KOR`,p:`KR`,l:[128.13,36.38],g:[[[[126.17,37.75],[126.24,37.84],[126.68,37.8],[127.07,38.26],[127.78,38.3],[128.21,38.37],[128.35,38.61],[129.21,37.43],[129.46,36.78],[129.47,35.63],[129.09,35.08],[128.19,34.89],[127.39,34.48],[126.49,34.39],[126.37,34.93],[126.56,35.68],[126.12,36.73],[126.86,36.89],[126.17,37.75]]]]},{n:`Mongolia`,a2:`MN`,a3:`MNG`,p:`MN`,l:[104.15,46],g:[[[[87.75,49.3],[88.81,49.47],[90.71,50.33],[92.23,50.8],[93.1,50.5],[94.15,50.48],[94.82,50.01],[95.81,49.98],[97.26,49.73],[98.23,50.42],[97.83,51.01],[98.86,52.05],[99.98,51.63],[100.89,51.52],[102.07,51.26],[102.26,50.51],[103.68,50.09],[104.62,50.28],[105.89,50.41],[106.89,50.27],[107.87,49.79],[108.48,49.28],[109.4,49.29],[110.66,49.13],[111.58,49.38],[112.9,49.54],[114.36,50.25],[114.96,50.14],[115.49,49.81],[116.68,49.89],[116.19,49.13],[115.49,48.14],[115.74,47.73],[116.31,47.85],[117.3,47.7],[118.06,48.07],[118.87,47.75],[119.77,47.05],[119.66,46.69],[118.87,46.81],[117.42,46.67],[116.72,46.39],[115.99,45.73],[114.46,45.34],[113.46,44.81],[112.44,45.01],[111.87,45.1],[111.35,44.46],[111.67,44.07],[111.83,43.74],[111.13,43.41],[110.41,42.87],[109.24,42.52],[107.74,42.48],[106.13,42.13],[104.96,41.6],[104.52,41.91],[103.31,41.91],[101.83,42.51],[100.85,42.66],[99.52,42.52],[97.45,42.75],[96.35,42.73],[95.76,43.32],[95.31,44.24],[94.69,44.35],[93.48,44.98],[92.13,45.12],[90.95,45.29],[90.59,45.72],[90.97,46.89],[90.28,47.69],[88.85,48.07],[88.01,48.6],[87.75,49.3]]]]},{n:`India`,a2:`IN`,a3:`IND`,p:`IND`,l:[79.36,22.69],g:[[[[97.33,28.26],[97.4,27.88],[97.05,27.7],[97.13,27.08],[96.42,27.26],[95.12,26.57],[95.16,26],[94.6,25.16],[94.55,24.68],[94.11,23.85],[93.33,24.08],[93.29,23.04],[93.06,22.7],[93.17,22.28],[92.67,22.04],[92.15,23.63],[91.87,23.62],[91.71,22.99],[91.16,23.5],[91.47,24.07],[91.92,24.13],[92.38,24.98],[91.8,25.15],[90.87,25.13],[89.92,25.27],[89.83,25.97],[89.36,26.01],[88.56,26.45],[88.21,25.77],[88.93,25.24],[88.31,24.87],[88.08,24.5],[88.7,24.23],[88.53,23.63],[88.88,22.88],[89.03,22.06],[88.89,21.69],[88.21,21.7],[86.98,21.5],[87.03,20.74],[86.5,20.15],[85.06,19.48],[83.94,18.3],[83.19,17.67],[82.19,17.02],[82.19,16.56],[81.69,16.31],[80.79,15.95],[80.32,15.9],[80.03,15.14],[80.23,13.84],[80.29,13.01],[79.86,12.06],[79.86,10.36],[79.34,10.31],[78.89,9.55],[79.19,9.22],[78.28,8.93],[77.94,8.25],[77.54,7.97],[76.59,8.9],[76.13,10.3],[75.75,11.31],[75.4,11.78],[74.86,12.74],[74.62,13.99],[74.44,14.62],[73.53,15.99],[73.12,17.93],[72.82,19.21],[72.82,20.42],[72.63,21.36],[71.18,20.76],[70.47,20.88],[69.16,22.09],[69.64,22.45],[69.35,22.84],[68.18,23.69],[68.84,24.36],[71.04,24.36],[70.84,25.22],[70.28,25.72],[70.17,26.49],[69.51,26.94],[70.62,27.99],[71.78,27.91],[72.82,28.96],[73.45,29.98],[74.42,30.98],[74.41,31.69],[75.26,32.27],[74.45,32.76],[74.1,33.44],[73.75,34.32],[74.24,34.75],[75.76,34.5],[76.87,34.65],[77.84,35.49],[78.91,34.32],[78.81,33.51],[79.21,32.99],[79.18,32.48],[78.46,32.62],[78.74,31.52],[79.72,30.88],[81.11,30.18],[80.48,29.73],[80.09,28.79],[81.06,28.42],[82,27.93],[83.3,27.36],[84.68,27.23],[85.25,26.73],[86.02,26.63],[87.23,26.4],[88.06,26.41],[88.17,26.81],[88.04,27.45],[88.12,27.88],[88.73,28.09],[88.81,27.3],[88.84,27.1],[89.74,26.72],[90.37,26.88],[91.22,26.81],[92.03,26.84],[92.1,27.45],[91.7,27.77],[92.5,27.9],[93.41,28.64],[94.57,29.28],[95.4,29.03],[96.12,29.45],[96.59,28.83],[96.25,28.41],[97.33,28.26]]]]},{n:`Bangladesh`,a2:`BD`,a3:`BGD`,p:`BD`,l:[89.68,24.21],g:[[[[92.67,22.04],[92.65,21.32],[92.3,21.48],[92.37,20.67],[92.08,21.19],[92.03,21.7],[91.83,22.18],[91.42,22.77],[90.5,22.81],[90.59,22.39],[90.27,21.84],[89.85,22.04],[89.7,21.86],[89.42,21.97],[89.03,22.06],[88.88,22.88],[88.53,23.63],[88.7,24.23],[88.08,24.5],[88.31,24.87],[88.93,25.24],[88.21,25.77],[88.56,26.45],[89.36,26.01],[89.83,25.97],[89.92,25.27],[90.87,25.13],[91.8,25.15],[92.38,24.98],[91.92,24.13],[91.47,24.07],[91.16,23.5],[91.71,22.99],[91.87,23.62],[92.15,23.63],[92.67,22.04]]]]},{n:`Bhutan`,a2:`BT`,a3:`BTN`,p:`BT`,l:[90.04,27.54],g:[[[[91.7,27.77],[92.1,27.45],[92.03,26.84],[91.22,26.81],[90.37,26.88],[89.74,26.72],[88.84,27.1],[88.81,27.3],[89.48,28.04],[90.02,28.3],[90.73,28.06],[91.26,28.04],[91.7,27.77]]]]},{n:`Nepal`,a2:`NP`,a3:`NPL`,p:`NP`,l:[83.64,28.3],g:[[[[88.12,27.88],[88.04,27.45],[88.17,26.81],[88.06,26.41],[87.23,26.4],[86.02,26.63],[85.25,26.73],[84.68,27.23],[83.3,27.36],[82,27.93],[81.06,28.42],[80.09,28.79],[80.48,29.73],[81.11,30.18],[81.53,30.42],[82.33,30.12],[83.34,29.46],[83.9,29.32],[84.23,28.84],[85.01,28.64],[85.82,28.2],[86.95,27.97],[88.12,27.88]]]]},{n:`Pakistan`,a2:`PK`,a3:`PAK`,p:`PK`,l:[68.55,29.33],g:[[[[77.84,35.49],[76.87,34.65],[75.76,34.5],[74.24,34.75],[73.75,34.32],[74.1,33.44],[74.45,32.76],[75.26,32.27],[74.41,31.69],[74.42,30.98],[73.45,29.98],[72.82,28.96],[71.78,27.91],[70.62,27.99],[69.51,26.94],[70.17,26.49],[70.28,25.72],[70.84,25.22],[71.04,24.36],[68.84,24.36],[68.18,23.69],[67.44,23.94],[67.15,24.66],[66.37,25.43],[64.53,25.24],[62.91,25.22],[61.5,25.08],[61.87,26.24],[63.32,26.76],[63.23,27.22],[62.76,27.38],[62.73,28.26],[61.77,28.7],[61.37,29.3],[60.87,29.83],[62.55,29.32],[63.55,29.47],[64.15,29.34],[64.35,29.56],[65.05,29.47],[66.35,29.89],[66.38,30.74],[66.94,31.3],[67.68,31.3],[67.79,31.58],[68.56,31.71],[68.93,31.62],[69.32,31.9],[69.26,32.5],[69.69,33.11],[70.32,33.36],[69.93,34.02],[70.88,33.99],[71.16,34.35],[71.12,34.73],[71.61,35.15],[71.5,35.65],[71.26,36.07],[71.85,36.51],[72.92,36.72],[74.07,36.84],[74.58,37.02],[75.16,37.13],[75.9,36.67],[76.19,35.9],[77.84,35.49]]]]},{n:`Afghanistan`,a2:`AF`,a3:`AFG`,p:`AF`,l:[66.5,34.16],g:[[[[66.52,37.36],[67.08,37.36],[67.83,37.14],[68.14,37.02],[68.86,37.34],[69.2,37.15],[69.52,37.61],[70.12,37.59],[70.27,37.74],[70.38,38.14],[70.81,38.49],[71.35,38.26],[71.24,37.95],[71.54,37.91],[71.45,37.07],[71.84,36.74],[72.19,36.95],[72.64,37.05],[73.26,37.5],[73.95,37.42],[74.98,37.42],[75.16,37.13],[74.58,37.02],[74.07,36.84],[72.92,36.72],[71.85,36.51],[71.26,36.07],[71.5,35.65],[71.61,35.15],[71.12,34.73],[71.16,34.35],[70.88,33.99],[69.93,34.02],[70.32,33.36],[69.69,33.11],[69.26,32.5],[69.32,31.9],[68.93,31.62],[68.56,31.71],[67.79,31.58],[67.68,31.3],[66.94,31.3],[66.38,30.74],[66.35,29.89],[65.05,29.47],[64.35,29.56],[64.15,29.34],[63.55,29.47],[62.55,29.32],[60.87,29.83],[61.78,30.74],[61.7,31.38],[60.94,31.55],[60.86,32.18],[60.54,32.98],[60.96,33.53],[60.53,33.68],[60.8,34.4],[61.21,35.65],[62.23,35.27],[62.98,35.4],[63.19,35.86],[63.98,36.01],[64.55,36.31],[64.75,37.11],[65.59,37.31],[65.75,37.66],[66.22,37.39],[66.52,37.36]]]]},{n:`Tajikistan`,a2:`TJ`,a3:`TJK`,p:`TJ`,l:[72.59,38.2],g:[[[[67.83,37.14],[68.39,38.16],[68.18,38.9],[67.44,39.14],[67.7,39.58],[68.54,39.53],[69.01,40.09],[69.33,40.73],[70.67,40.96],[70.46,40.5],[70.6,40.22],[71.01,40.24],[70.65,39.94],[69.56,40.1],[69.46,39.53],[70.55,39.6],[71.78,39.28],[73.68,39.43],[73.93,38.51],[74.26,38.61],[74.86,38.38],[74.83,37.99],[74.98,37.42],[73.95,37.42],[73.26,37.5],[72.64,37.05],[72.19,36.95],[71.84,36.74],[71.45,37.07],[71.54,37.91],[71.24,37.95],[71.35,38.26],[70.81,38.49],[70.38,38.14],[70.27,37.74],[70.12,37.59],[69.52,37.61],[69.2,37.15],[68.86,37.34],[68.14,37.02],[67.83,37.14]]]]},{n:`Kyrgyzstan`,a2:`KG`,a3:`KGZ`,p:`KG`,l:[74.53,41.67],g:[[[[70.96,42.27],[71.19,42.7],[71.84,42.85],[73.49,42.5],[73.65,43.09],[74.21,43.3],[75.64,42.88],[76,42.99],[77.66,42.96],[79.14,42.86],[79.64,42.5],[80.26,42.35],[80.12,42.12],[78.54,41.58],[78.19,41.19],[76.9,41.07],[76.53,40.43],[75.47,40.56],[74.78,40.37],[73.82,39.89],[73.96,39.66],[73.68,39.43],[71.78,39.28],[70.55,39.6],[69.46,39.53],[69.56,40.1],[70.65,39.94],[71.01,40.24],[71.77,40.15],[73.06,40.87],[71.87,41.39],[71.16,41.14],[70.42,41.52],[71.26,42.17],[70.96,42.27]]]]},{n:`Turkmenistan`,a2:`TM`,a3:`TKM`,p:`TM`,l:[58.68,39.86],g:[[[[52.5,41.78],[52.94,42.12],[54.08,42.32],[54.76,42.04],[55.46,41.26],[55.97,41.31],[57.1,41.32],[56.93,41.83],[57.79,42.17],[58.63,42.75],[59.98,42.22],[60.08,41.43],[60.47,41.22],[61.55,41.27],[61.88,41.08],[62.37,40.05],[63.52,39.36],[64.17,38.89],[65.22,38.4],[66.55,37.97],[66.52,37.36],[66.22,37.39],[65.75,37.66],[65.59,37.31],[64.75,37.11],[64.55,36.31],[63.98,36.01],[63.19,35.86],[62.98,35.4],[62.23,35.27],[61.21,35.65],[61.12,36.49],[60.38,36.53],[59.23,37.41],[58.44,37.52],[57.33,38.03],[56.62,38.12],[56.18,37.94],[55.51,37.96],[54.8,37.39],[53.92,37.2],[53.74,37.91],[53.88,38.95],[53.1,39.29],[53.36,39.98],[52.69,40.03],[52.92,40.88],[53.86,40.63],[54.74,40.95],[54.01,41.55],[53.72,42.12],[52.92,41.87],[52.81,41.14],[52.5,41.78]]]]},{n:`Iran`,a2:`IR`,a3:`IRN`,p:`IRN`,l:[54.93,32.17],g:[[[[48.57,29.93],[48.01,30.45],[48,30.99],[47.69,30.98],[47.85,31.71],[47.33,32.47],[46.11,33.02],[45.42,33.97],[45.65,34.75],[46.15,35.09],[46.08,35.68],[45.42,35.98],[44.77,37.17],[44.23,37.97],[44.42,38.28],[44.11,39.43],[44.79,39.71],[44.95,39.34],[45.46,38.87],[46.14,38.74],[46.51,38.77],[47.69,39.51],[48.06,39.58],[48.36,39.29],[48.01,38.79],[48.63,38.27],[48.88,38.32],[49.2,37.58],[50.15,37.37],[50.84,36.87],[52.26,36.7],[53.83,36.97],[53.92,37.2],[54.8,37.39],[55.51,37.96],[56.18,37.94],[56.62,38.12],[57.33,38.03],[58.44,37.52],[59.23,37.41],[60.38,36.53],[61.12,36.49],[61.21,35.65],[60.8,34.4],[60.53,33.68],[60.96,33.53],[60.54,32.98],[60.86,32.18],[60.94,31.55],[61.7,31.38],[61.78,30.74],[60.87,29.83],[61.37,29.3],[61.77,28.7],[62.73,28.26],[62.76,27.38],[63.23,27.22],[63.32,26.76],[61.87,26.24],[61.5,25.08],[59.62,25.38],[58.53,25.61],[57.4,25.74],[56.97,26.97],[56.49,27.14],[55.72,26.96],[54.72,26.48],[53.49,26.81],[52.48,27.58],[51.52,27.87],[50.85,28.81],[50.12,30.15],[49.58,29.99],[48.94,30.32],[48.57,29.93]]]]},{n:`Syria`,a2:`SY`,a3:`SYR`,p:`SYR`,l:[38.28,35.01],g:[[[[35.72,32.71],[35.7,32.72],[35.84,32.87],[35.82,33.28],[36.07,33.82],[36.61,34.2],[36.45,34.59],[36,34.64],[35.91,35.41],[36.15,35.82],[36.42,36.04],[36.69,36.26],[36.74,36.82],[37.07,36.62],[38.17,36.9],[38.7,36.71],[39.52,36.72],[40.67,37.09],[41.21,37.07],[42.35,37.23],[41.84,36.61],[41.29,36.36],[41.38,35.63],[41.01,34.42],[38.79,33.38],[36.83,32.31],[35.72,32.71]]]]},{n:`Armenia`,a2:`AM`,a3:`ARM`,p:`ARM`,l:[44.8,40.46],g:[[[[46.51,38.77],[46.14,38.74],[45.74,39.32],[45.74,39.47],[45.3,39.47],[45,39.74],[44.79,39.71],[44.4,40.01],[43.66,40.25],[43.75,40.74],[43.58,41.09],[44.97,41.25],[45.18,40.99],[45.56,40.81],[45.36,40.56],[45.89,40.22],[45.61,39.9],[46.03,39.63],[46.48,39.46],[46.51,38.77]]]]},{n:`Sweden`,a2:`SE`,a3:`SWE`,p:`S`,l:[19.02,65.86],g:[[[[11.03,58.86],[11.47,59.43],[12.3,60.12],[12.63,61.29],[11.99,61.8],[11.93,63.13],[12.58,64.07],[13.57,64.05],[13.92,64.45],[13.56,64.79],[15.11,66.19],[16.11,67.3],[16.77,68.01],[17.73,68.01],[17.99,68.57],[19.88,68.41],[20.03,69.07],[20.65,69.11],[21.98,68.62],[23.54,67.94],[23.57,66.4],[23.9,66.01],[22.18,65.72],[21.21,65.03],[21.37,64.41],[19.78,63.61],[17.85,62.75],[17.12,61.34],[17.83,60.64],[18.79,60.08],[17.87,58.95],[16.83,58.72],[16.45,57.04],[15.88,56.1],[14.67,56.2],[14.1,55.41],[12.94,55.36],[12.63,56.31],[11.79,57.44],[11.03,58.86]]]]},{n:`Belarus`,a2:`BY`,a3:`BLR`,p:`BY`,l:[28.42,53.82],g:[[[[28.18,56.17],[29.23,55.92],[29.37,55.67],[29.9,55.79],[30.87,55.55],[30.97,55.08],[30.76,54.81],[31.38,54.16],[31.79,53.97],[31.73,53.79],[32.41,53.62],[32.69,53.35],[32.3,53.13],[31.5,53.17],[31.31,53.07],[31.54,52.74],[31.79,52.1],[30.93,52.04],[30.62,51.82],[30.56,51.32],[30.16,51.42],[29.25,51.37],[28.99,51.6],[28.62,51.43],[28.24,51.57],[27.45,51.59],[26.34,51.83],[25.33,51.91],[24.55,51.89],[24.01,51.62],[23.53,51.58],[23.51,52.02],[23.2,52.49],[23.8,52.69],[23.8,53.09],[23.53,53.47],[23.48,53.91],[24.45,53.91],[25.54,54.28],[25.77,54.85],[26.59,55.17],[26.49,55.62],[27.1,55.78],[28.18,56.17]]]]},{n:`Ukraine`,a2:`UA`,a3:`UKR`,p:`UA`,l:[32.14,49.72],g:[[[[31.79,52.1],[32.16,52.06],[32.41,52.29],[32.72,52.24],[33.75,52.34],[34.39,51.77],[34.14,51.57],[34.22,51.26],[35.02,51.21],[35.38,50.77],[35.36,50.58],[36.63,50.23],[37.39,50.38],[38.01,49.92],[38.59,49.93],[40.07,49.6],[40.08,49.31],[39.67,48.78],[39.9,48.23],[39.74,47.9],[38.77,47.83],[38.26,47.55],[38.22,47.1],[37.43,47.02],[36.76,46.7],[35.82,46.65],[34.96,46.27],[35.01,45.74],[34.86,45.77],[34.73,45.97],[34.41,46.01],[33.7,46.22],[33.44,45.97],[33.3,46.08],[31.74,46.33],[31.68,46.71],[30.75,46.58],[30.38,46.03],[29.6,45.29],[29.15,45.46],[28.68,45.3],[28.23,45.49],[28.49,45.6],[28.66,45.94],[28.93,46.26],[28.86,46.44],[29.07,46.52],[29.17,46.38],[29.76,46.35],[30.02,46.42],[29.84,46.53],[29.91,46.67],[29.56,46.93],[29.42,47.35],[29.05,47.51],[29.12,47.85],[28.67,48.12],[28.26,48.16],[27.52,48.47],[26.86,48.37],[26.62,48.22],[26.2,48.22],[25.95,47.99],[25.21,47.89],[24.87,47.74],[24.4,47.98],[23.76,47.99],[23.14,48.1],[22.71,47.88],[22.64,48.15],[22.09,48.42],[22.28,48.83],[22.56,49.09],[22.78,49.03],[22.52,49.48],[23.43,50.31],[23.92,50.42],[24.03,50.71],[23.53,51.58],[24.01,51.62],[24.55,51.89],[25.33,51.91],[26.34,51.83],[27.45,51.59],[28.24,51.57],[28.62,51.43],[28.99,51.6],[29.25,51.37],[30.16,51.42],[30.56,51.32],[30.62,51.82],[30.93,52.04],[31.79,52.1]]]]},{n:`Poland`,a2:`PL`,a3:`POL`,p:`PL`,l:[19.49,51.99],g:[[[[23.48,53.91],[23.53,53.47],[23.8,53.09],[23.8,52.69],[23.2,52.49],[23.51,52.02],[23.53,51.58],[24.03,50.71],[23.92,50.42],[23.43,50.31],[22.52,49.48],[22.78,49.03],[22.56,49.09],[21.61,49.47],[20.89,49.33],[20.42,49.43],[19.83,49.22],[19.32,49.57],[18.91,49.44],[18.85,49.5],[18.39,49.99],[17.65,50.05],[17.55,50.36],[16.87,50.47],[16.72,50.22],[16.18,50.42],[16.24,50.7],[15.49,50.78],[15.02,51.11],[14.61,51.75],[14.69,52.09],[14.44,52.62],[14.07,52.98],[14.35,53.25],[14.12,53.76],[14.8,54.05],[16.36,54.51],[17.62,54.85],[18.62,54.68],[18.7,54.44],[19.66,54.43],[20.89,54.31],[22.73,54.33],[23.24,54.22],[23.48,53.91]]]]},{n:`Austria`,a2:`AT`,a3:`AUT`,p:`A`,l:[14.13,47.52],g:[[[[16.98,48.12],[16.9,47.71],[16.34,47.71],[16.53,47.5],[16.2,46.85],[16.01,46.68],[15.14,46.66],[14.63,46.43],[13.81,46.51],[12.38,46.77],[12.15,47.12],[11.16,46.94],[11.05,46.75],[10.44,46.89],[9.93,46.92],[9.48,47.1],[9.63,47.35],[9.59,47.53],[9.9,47.58],[10.4,47.3],[10.54,47.57],[11.43,47.52],[12.14,47.7],[12.62,47.67],[12.93,47.47],[13.03,47.64],[12.88,48.29],[13.24,48.42],[13.6,48.88],[14.34,48.56],[14.9,48.96],[15.25,49.04],[16.03,48.73],[16.5,48.79],[16.96,48.6],[16.88,48.47],[16.98,48.12]]]]},{n:`Hungary`,a2:`HU`,a3:`HUN`,p:`HU`,l:[19.45,47.09],g:[[[[22.09,48.42],[22.64,48.15],[22.71,47.88],[22.1,47.67],[21.63,46.99],[21.02,46.32],[20.22,46.13],[19.6,46.17],[18.83,45.91],[18.46,45.76],[17.63,45.95],[16.88,46.38],[16.56,46.5],[16.37,46.84],[16.2,46.85],[16.53,47.5],[16.34,47.71],[16.9,47.71],[16.98,48.12],[17.49,47.87],[17.86,47.76],[18.7,47.88],[18.78,48.08],[19.17,48.11],[19.66,48.27],[19.77,48.2],[20.24,48.33],[20.47,48.56],[20.8,48.62],[21.87,48.32],[22.09,48.42]]]]},{n:`Moldova`,a2:`MD`,a3:`MDA`,p:`MD`,l:[28.49,47.43],g:[[[[26.62,48.22],[26.86,48.37],[27.52,48.47],[28.26,48.16],[28.67,48.12],[29.12,47.85],[29.05,47.51],[29.42,47.35],[29.56,46.93],[29.91,46.67],[29.84,46.53],[30.02,46.42],[29.76,46.35],[29.17,46.38],[29.07,46.52],[28.86,46.44],[28.93,46.26],[28.66,45.94],[28.49,45.6],[28.23,45.49],[28.05,45.94],[28.16,46.37],[28.13,46.81],[27.55,47.41],[27.23,47.83],[26.92,48.12],[26.62,48.22]]]]},{n:`Romania`,a2:`RO`,a3:`ROU`,p:`RO`,l:[24.97,45.73],g:[[[[28.23,45.49],[28.68,45.3],[29.15,45.46],[29.6,45.29],[29.63,45.04],[29.14,44.82],[28.84,44.91],[28.56,43.71],[27.97,43.81],[27.24,44.18],[26.07,43.94],[25.57,43.69],[24.1,43.74],[23.33,43.9],[22.94,43.82],[22.66,44.23],[22.47,44.41],[22.71,44.58],[22.46,44.7],[22.15,44.48],[21.56,44.77],[21.48,45.18],[20.87,45.42],[20.76,45.73],[20.22,46.13],[21.02,46.32],[21.63,46.99],[22.1,47.67],[22.71,47.88],[23.14,48.1],[23.76,47.99],[24.4,47.98],[24.87,47.74],[25.21,47.89],[25.95,47.99],[26.2,48.22],[26.62,48.22],[26.92,48.12],[27.23,47.83],[27.55,47.41],[28.13,46.81],[28.16,46.37],[28.05,45.94],[28.23,45.49]]]]},{n:`Lithuania`,a2:`LT`,a3:`LTU`,p:`LT`,l:[24.09,55.1],g:[[[[26.49,55.62],[26.59,55.17],[25.77,54.85],[25.54,54.28],[24.45,53.91],[23.48,53.91],[23.24,54.22],[22.73,54.33],[22.65,54.58],[22.76,54.86],[22.32,55.02],[21.27,55.19],[21.06,56.03],[22.2,56.34],[23.88,56.27],[24.86,56.37],[25,56.16],[25.53,56.1],[26.49,55.62]]]]},{n:`Latvia`,a2:`LV`,a3:`LVA`,p:`LV`,l:[25.46,57.07],g:[[[[27.29,57.47],[27.77,57.24],[27.86,56.76],[28.18,56.17],[27.1,55.78],[26.49,55.62],[25.53,56.1],[25,56.16],[24.86,56.37],[23.88,56.27],[22.2,56.34],[21.06,56.03],[21.09,56.78],[21.58,57.41],[22.52,57.75],[23.32,57.01],[24.12,57.03],[24.31,57.79],[25.16,57.97],[25.6,57.85],[26.46,57.48],[27.29,57.47]]]]},{n:`Estonia`,a2:`EE`,a3:`EST`,p:`EST`,l:[25.87,58.72],g:[[[[27.98,59.48],[28.13,59.3],[27.42,58.72],[27.72,57.79],[27.29,57.47],[26.46,57.48],[25.6,57.85],[25.16,57.97],[24.31,57.79],[24.43,58.38],[24.06,58.26],[23.43,58.61],[23.34,59.19],[24.6,59.47],[25.86,59.61],[26.95,59.45],[27.98,59.48]]]]},{n:`Germany`,a2:`DE`,a3:`DEU`,p:`D`,l:[9.68,50.96],g:[[[[14.12,53.76],[14.35,53.25],[14.07,52.98],[14.44,52.62],[14.69,52.09],[14.61,51.75],[15.02,51.11],[14.57,51],[14.31,51.12],[14.06,50.93],[13.34,50.73],[12.97,50.48],[12.24,50.27],[12.42,49.97],[12.52,49.55],[13.03,49.31],[13.6,48.88],[13.24,48.42],[12.88,48.29],[13.03,47.64],[12.93,47.47],[12.62,47.67],[12.14,47.7],[11.43,47.52],[10.54,47.57],[10.4,47.3],[9.9,47.58],[9.59,47.53],[8.52,47.83],[8.32,47.61],[7.47,47.62],[7.59,48.33],[8.1,49.02],[6.66,49.2],[6.19,49.46],[6.24,49.9],[6.04,50.13],[6.16,50.8],[5.99,51.85],[6.59,51.85],[6.84,52.23],[7.09,53.14],[6.91,53.48],[7.1,53.69],[7.94,53.75],[8.12,53.53],[8.8,54.02],[8.57,54.4],[8.53,54.96],[9.28,54.83],[9.92,54.98],[9.94,54.6],[10.95,54.36],[10.94,54.01],[11.96,54.2],[12.52,54.47],[13.65,54.08],[14.12,53.76]]]]},{n:`Bulgaria`,a2:`BG`,a3:`BGR`,p:`BG`,l:[25.16,42.51],g:[[[[22.66,44.23],[22.94,43.82],[23.33,43.9],[24.1,43.74],[25.57,43.69],[26.07,43.94],[27.24,44.18],[27.97,43.81],[28.56,43.71],[28.04,43.29],[27.67,42.58],[28,42.01],[27.14,42.14],[26.12,41.83],[26.11,41.33],[25.2,41.23],[24.49,41.58],[23.69,41.31],[22.95,41.34],[22.88,42],[22.38,42.32],[22.55,42.46],[22.44,42.58],[22.6,42.9],[22.99,43.21],[22.5,43.64],[22.41,44.01],[22.66,44.23]]]]},{n:`Greece`,a2:`GR`,a3:`GRC`,p:`GR`,l:[21.73,39.49],g:[[[[26.29,35.3],[26.16,35],[24.72,34.92],[24.74,35.08],[23.51,35.28],[23.7,35.71],[24.25,35.37],[25.03,35.42],[25.77,35.35],[25.75,35.18],[26.29,35.3]]],[[[22.95,41.34],[23.69,41.31],[24.49,41.58],[25.2,41.23],[26.11,41.33],[26.12,41.83],[26.6,41.56],[26.29,40.94],[26.06,40.82],[25.45,40.85],[24.93,40.95],[23.71,40.69],[24.41,40.12],[23.9,39.96],[23.34,39.96],[22.81,40.48],[22.63,40.26],[22.85,39.66],[23.35,39.19],[22.97,38.97],[23.53,38.51],[24.03,38.22],[24.04,37.66],[23.12,37.92],[23.41,37.41],[22.77,37.31],[23.15,36.42],[22.49,36.41],[21.67,36.84],[21.3,37.64],[21.12,38.31],[20.73,38.77],[20.22,39.34],[20.15,39.62],[20.62,40.11],[20.67,40.44],[21,40.58],[21.02,40.84],[21.67,40.93],[22.06,41.15],[22.6,41.13],[22.76,41.3],[22.95,41.34]]]]},{n:`Turkey`,a2:`TR`,a3:`TUR`,p:`TR`,l:[34.51,39.35],g:[[[[44.77,37.17],[44.29,37],[43.94,37.26],[42.78,37.39],[42.35,37.23],[41.21,37.07],[40.67,37.09],[39.52,36.72],[38.7,36.71],[38.17,36.9],[37.07,36.62],[36.74,36.82],[36.69,36.26],[36.42,36.04],[36.15,35.82],[35.78,36.27],[36.16,36.65],[35.55,36.57],[34.71,36.8],[34.03,36.22],[32.51,36.11],[31.7,36.64],[30.62,36.68],[30.39,36.26],[29.7,36.14],[28.73,36.68],[27.64,36.66],[27.05,37.65],[26.32,38.21],[26.8,38.99],[26.17,39.46],[27.28,40.42],[28.82,40.46],[29.24,41.22],[31.15,41.09],[32.35,41.74],[33.51,42.02],[35.17,42.04],[36.91,41.34],[38.35,40.95],[39.51,41.1],[40.37,41.01],[41.55,41.54],[42.62,41.58],[43.58,41.09],[43.75,40.74],[43.66,40.25],[44.4,40.01],[44.79,39.71],[44.11,39.43],[44.42,38.28],[44.23,37.97],[44.77,37.17]]],[[[26.12,41.83],[27.14,42.14],[28,42.01],[28.12,41.62],[28.99,41.3],[28.81,41.05],[27.62,41],[27.19,40.69],[26.36,40.15],[26.04,40.62],[26.06,40.82],[26.29,40.94],[26.6,41.56],[26.12,41.83]]]]},{n:`Albania`,a2:`AL`,a3:`ALB`,p:`AL`,l:[20.11,40.65],g:[[[[21.02,40.84],[21,40.58],[20.67,40.44],[20.62,40.11],[20.15,39.62],[19.98,39.69],[19.96,39.92],[19.41,40.25],[19.32,40.73],[19.4,41.41],[19.54,41.72],[19.37,41.88],[19.3,42.2],[19.74,42.69],[19.8,42.5],[20.07,42.59],[20.28,42.32],[20.52,42.22],[20.59,41.86],[20.46,41.52],[20.61,41.09],[21.02,40.84]]]]},{n:`Croatia`,a2:`HR`,a3:`HRV`,p:`HR`,l:[16.37,45.81],g:[[[[16.56,46.5],[16.88,46.38],[17.63,45.95],[18.46,45.76],[18.83,45.91],[19.07,45.52],[19.39,45.24],[19.01,44.86],[18.55,45.08],[17.86,45.07],[17,45.23],[16.53,45.21],[16.32,45],[15.96,45.23],[15.75,44.82],[16.24,44.35],[16.46,44.04],[16.92,43.67],[17.3,43.45],[17.67,43.03],[18.56,42.65],[18.45,42.48],[17.51,42.85],[16.93,43.21],[16.02,43.51],[15.17,44.24],[15.38,44.32],[14.92,44.74],[14.9,45.08],[14.26,45.23],[13.95,44.8],[13.66,45.14],[13.68,45.48],[13.72,45.5],[14.41,45.47],[14.6,45.63],[14.94,45.47],[15.33,45.45],[15.32,45.73],[15.67,45.83],[15.77,46.24],[16.56,46.5]]]]},{n:`Switzerland`,a2:`CH`,a3:`CHE`,p:`CH`,l:[7.46,46.72],g:[[[[9.59,47.53],[9.63,47.35],[9.48,47.1],[9.93,46.92],[10.44,46.89],[10.36,46.48],[9.92,46.31],[9.18,46.44],[8.97,46.04],[8.49,46.01],[8.32,46.16],[7.76,45.82],[7.27,45.78],[6.84,45.99],[6.5,46.43],[6.02,46.27],[6.04,46.73],[6.77,47.29],[6.74,47.54],[7.19,47.45],[7.47,47.62],[8.32,47.61],[8.52,47.83],[9.59,47.53]]]]},{n:`Luxembourg`,a2:`LU`,a3:`LUX`,p:`L`,l:[6.08,49.73],g:[[[[6.04,50.13],[6.24,49.9],[6.19,49.46],[5.9,49.44],[5.67,49.53],[5.78,50.09],[6.04,50.13]]]]},{n:`Belgium`,a2:`BE`,a3:`BEL`,p:`B`,l:[4.8,50.79],g:[[[[6.16,50.8],[6.04,50.13],[5.78,50.09],[5.67,49.53],[4.8,49.99],[4.29,49.91],[3.59,50.38],[3.12,50.78],[2.66,50.8],[2.51,51.15],[3.31,51.35],[3.32,51.35],[3.31,51.35],[4.05,51.27],[4.97,51.48],[5.61,51.04],[6.16,50.8]]]]},{n:`Netherlands`,a2:`NL`,a3:`NLD`,p:`NL`,l:[5.61,52.42],g:[[[[6.91,53.48],[7.09,53.14],[6.84,52.23],[6.59,51.85],[5.99,51.85],[6.16,50.8],[5.61,51.04],[4.97,51.48],[4.05,51.27],[3.31,51.35],[3.32,51.35],[3.83,51.62],[4.71,53.09],[6.07,53.51],[6.91,53.48]]]]},{n:`Portugal`,a2:`PT`,a3:`PRT`,p:`P`,l:[-8.27,39.61],g:[[[[-9.03,41.88],[-8.67,42.13],[-8.26,42.28],[-8.01,41.79],[-7.42,41.79],[-7.25,41.92],[-6.67,41.88],[-6.39,41.38],[-6.85,41.11],[-6.86,40.33],[-7.03,40.18],[-7.07,39.71],[-7.5,39.63],[-7.1,39.03],[-7.37,38.37],[-7.03,38.08],[-7.17,37.8],[-7.54,37.43],[-7.45,37.1],[-7.86,36.84],[-8.38,36.98],[-8.9,36.87],[-8.75,37.65],[-8.84,38.27],[-9.29,38.36],[-9.53,38.74],[-9.45,39.39],[-9.05,39.76],[-8.98,40.16],[-8.77,40.76],[-8.79,41.18],[-8.99,41.54],[-9.03,41.88]]]]},{n:`Spain`,a2:`ES`,a3:`ESP`,p:`E`,l:[-3.46,40.09],g:[[[[-7.45,37.1],[-7.54,37.43],[-7.17,37.8],[-7.03,38.08],[-7.37,38.37],[-7.1,39.03],[-7.5,39.63],[-7.07,39.71],[-7.03,40.18],[-6.86,40.33],[-6.85,41.11],[-6.39,41.38],[-6.67,41.88],[-7.25,41.92],[-7.42,41.79],[-8.01,41.79],[-8.26,42.28],[-8.67,42.13],[-9.03,41.88],[-8.98,42.59],[-9.39,43.03],[-7.98,43.75],[-6.75,43.57],[-5.41,43.57],[-4.35,43.4],[-3.52,43.46],[-1.9,43.42],[-1.5,43.03],[.34,42.58],[.7,42.8],[1.83,42.34],[2.99,42.47],[3.04,41.89],[2.09,41.23],[.81,41.01],[.72,40.68],[.11,40.12],[-.28,39.31],[.11,38.74],[-.47,38.29],[-.68,37.64],[-1.44,37.44],[-2.15,36.67],[-3.42,36.66],[-4.37,36.68],[-5,36.32],[-5.38,35.95],[-5.87,36.03],[-6.24,36.37],[-6.52,36.94],[-7.45,37.1]]]]},{n:`Ireland`,a2:`IE`,a3:`IRL`,p:`IRL`,l:[-7.8,53.08],g:[[[[-6.2,53.87],[-6.03,53.15],[-6.79,52.26],[-8.56,51.67],[-9.98,51.82],[-9.17,52.86],[-9.69,53.88],[-8.33,54.66],[-7.57,55.13],[-7.37,54.6],[-7.57,54.06],[-6.95,54.07],[-6.2,53.87]]]]},{n:`New Caledonia`,a2:`NC`,a3:`NCL`,p:`NC`,l:[165.08,-21.06],g:[[[[165.78,-21.08],[166.6,-21.7],[167.12,-22.16],[166.74,-22.4],[166.19,-22.13],[165.47,-21.68],[164.83,-21.15],[164.17,-20.44],[164.03,-20.11],[164.46,-20.12],[165.02,-20.46],[165.46,-20.8],[165.78,-21.08]]]]},{n:`Solomon Islands`,a2:`SB`,a3:`SLB`,p:`SB`,l:[159.17,-8.03],g:[[[[162.12,-10.48],[162.4,-10.83],[161.7,-10.82],[161.32,-10.2],[161.92,-10.45],[162.12,-10.48]]],[[[161.68,-9.6],[161.53,-9.78],[160.79,-8.92],[160.58,-8.32],[160.92,-8.32],[161.28,-9.12],[161.68,-9.6]]],[[[160.85,-9.87],[160.46,-9.9],[159.85,-9.79],[159.64,-9.64],[159.7,-9.24],[160.36,-9.4],[160.69,-9.61],[160.85,-9.87]]],[[[159.64,-8.02],[159.88,-8.34],[159.92,-8.54],[159.13,-8.11],[158.59,-7.75],[158.21,-7.42],[158.36,-7.32],[158.82,-7.56],[159.64,-8.02]]],[[[157.14,-7.02],[157.54,-7.35],[157.34,-7.4],[156.9,-7.18],[156.49,-6.77],[156.54,-6.6],[157.14,-7.02]]]]},{n:`New Zealand`,a2:`NZ`,a3:`NZL`,p:`NZ`,l:[172.79,-39.76],g:[[[[176.89,-40.07],[176.51,-40.6],[176.01,-41.29],[175.24,-41.69],[175.07,-41.43],[174.65,-41.28],[175.23,-40.46],[174.9,-39.91],[173.82,-39.51],[173.85,-39.15],[174.57,-38.8],[174.74,-38.03],[174.7,-37.38],[174.29,-36.71],[174.32,-36.53],[173.84,-36.12],[173.05,-35.24],[172.64,-34.53],[173.01,-34.45],[173.55,-35.01],[174.33,-35.27],[174.61,-36.16],[175.34,-37.21],[175.36,-36.53],[175.81,-36.8],[175.96,-37.56],[176.76,-37.88],[177.44,-37.96],[178.01,-37.58],[178.52,-37.7],[178.27,-38.58],[177.97,-39.17],[177.21,-39.15],[176.94,-39.45],[177.03,-39.88],[176.89,-40.07]]],[[[169.67,-43.56],[170.52,-43.03],[171.13,-42.51],[171.57,-41.77],[171.95,-41.51],[172.1,-40.96],[172.8,-40.49],[173.02,-40.92],[173.25,-41.33],[173.96,-40.93],[174.25,-41.35],[174.25,-41.77],[173.88,-42.23],[173.22,-42.97],[172.71,-43.37],[173.08,-43.85],[172.31,-43.87],[171.45,-44.24],[171.19,-44.9],[170.62,-45.91],[169.83,-46.36],[169.33,-46.64],[168.41,-46.62],[167.76,-46.29],[166.68,-46.22],[166.51,-45.85],[167.05,-45.11],[168.3,-44.12],[168.95,-43.94],[169.67,-43.56]]]]},{n:`Australia`,a2:`AU`,a3:`AUS`,p:`AU`,l:[134.05,-24.13],g:[[[[147.69,-40.81],[148.29,-40.88],[148.36,-42.06],[148.02,-42.41],[147.91,-43.21],[147.56,-42.94],[146.87,-43.63],[146.66,-43.58],[146.05,-43.55],[145.43,-42.69],[145.3,-42.03],[144.72,-41.16],[144.74,-40.7],[145.4,-40.79],[146.36,-41.14],[146.91,-41],[147.69,-40.81]]],[[[126.15,-32.22],[125.09,-32.73],[124.22,-32.96],[124.03,-33.48],[123.66,-33.89],[122.81,-33.91],[122.18,-34],[121.3,-33.82],[120.58,-33.93],[119.89,-33.98],[119.3,-34.51],[119.01,-34.46],[118.51,-34.75],[118.02,-35.06],[117.3,-35.03],[116.63,-35.03],[115.56,-34.39],[115.03,-34.2],[115.05,-33.62],[115.55,-33.49],[115.71,-33.26],[115.68,-32.9],[115.8,-32.21],[115.69,-31.61],[115.16,-30.6],[115,-30.03],[115.04,-29.46],[114.64,-28.81],[114.62,-28.52],[114.17,-28.12],[114.05,-27.33],[113.48,-26.54],[113.34,-26.12],[113.78,-26.55],[113.44,-25.62],[113.94,-25.91],[114.23,-26.3],[114.22,-25.79],[113.72,-25],[113.63,-24.68],[113.39,-24.38],[113.5,-23.81],[113.71,-23.56],[113.84,-23.06],[113.74,-22.48],[114.15,-21.76],[114.23,-22.52],[114.65,-21.83],[115.46,-21.5],[115.95,-21.07],[116.71,-20.7],[117.17,-20.62],[117.44,-20.75],[118.23,-20.37],[118.84,-20.26],[118.99,-20.04],[119.25,-19.95],[119.81,-19.98],[120.86,-19.68],[121.4,-19.24],[121.66,-18.71],[122.24,-18.2],[122.29,-17.8],[122.31,-17.25],[123.01,-16.41],[123.43,-17.27],[123.86,-17.07],[123.5,-16.6],[123.82,-16.11],[124.26,-16.33],[124.38,-15.57],[124.93,-15.08],[125.17,-14.68],[125.67,-14.51],[125.69,-14.23],[126.13,-14.35],[126.14,-14.1],[126.58,-13.95],[127.07,-13.82],[127.8,-14.28],[128.36,-14.87],[128.99,-14.88],[129.62,-14.97],[129.41,-14.42],[129.89,-13.62],[130.34,-13.36],[130.18,-13.11],[130.62,-12.54],[131.22,-12.18],[131.74,-12.3],[132.58,-12.11],[132.56,-11.6],[131.82,-11.27],[132.36,-11.13],[133.02,-11.38],[133.55,-11.79],[134.39,-12.04],[134.68,-11.94],[135.3,-12.25],[135.88,-11.96],[136.26,-12.05],[136.49,-11.86],[136.95,-12.35],[136.69,-12.89],[136.31,-13.29],[135.96,-13.32],[136.08,-13.72],[135.78,-14.22],[135.43,-14.72],[135.5,-15],[136.3,-15.55],[137.07,-15.87],[137.58,-16.22],[138.3,-16.81],[138.59,-16.81],[139.11,-17.06],[139.26,-17.37],[140.22,-17.71],[140.88,-17.37],[141.07,-16.83],[141.27,-16.39],[141.4,-15.84],[141.7,-15.04],[141.56,-14.56],[141.64,-14.27],[141.52,-13.7],[141.65,-12.94],[141.84,-12.74],[141.69,-12.41],[141.93,-11.88],[142.12,-11.33],[142.14,-11.04],[142.52,-10.67],[142.8,-11.16],[142.87,-11.78],[143.12,-11.91],[143.16,-12.33],[143.52,-12.83],[143.6,-13.4],[143.56,-13.76],[143.92,-14.55],[144.56,-14.17],[144.89,-14.59],[145.37,-14.98],[145.27,-15.43],[145.49,-16.29],[145.64,-16.78],[145.89,-16.91],[146.16,-17.76],[146.06,-18.28],[146.39,-18.96],[147.47,-19.48],[148.18,-19.96],[148.85,-20.39],[148.72,-20.63],[149.29,-21.26],[149.68,-22.34],[150.08,-22.12],[150.48,-22.56],[150.73,-22.4],[150.9,-23.46],[151.61,-24.08],[152.07,-24.46],[152.86,-25.27],[153.14,-26.07],[153.16,-26.64],[153.09,-27.26],[153.57,-28.11],[153.51,-29],[153.34,-29.46],[153.07,-30.35],[153.09,-30.92],[152.89,-31.64],[152.45,-32.55],[151.71,-33.04],[151.34,-33.82],[151.01,-34.31],[150.71,-35.17],[150.33,-35.67],[150.08,-36.42],[149.95,-37.11],[150,-37.43],[149.42,-37.77],[148.3,-37.81],[147.38,-38.22],[146.92,-38.61],[146.32,-39.04],[145.49,-38.59],[144.88,-38.42],[145.03,-37.9],[144.49,-38.09],[143.61,-38.81],[142.75,-38.54],[142.18,-38.38],[141.61,-38.31],[140.64,-38.02],[139.99,-37.4],[139.81,-36.64],[139.57,-36.14],[139.08,-35.73],[138.12,-35.61],[138.45,-35.13],[138.21,-34.38],[137.72,-35.08],[136.83,-35.26],[137.35,-34.71],[137.5,-34.13],[137.89,-33.64],[137.81,-32.9],[137,-33.75],[136.37,-34.09],[135.99,-34.89],[135.21,-34.48],[135.24,-33.95],[134.61,-33.22],[134.09,-32.85],[134.27,-32.62],[132.99,-32.01],[132.29,-31.98],[131.33,-31.5],[129.54,-31.59],[128.24,-31.95],[127.1,-32.28],[126.15,-32.22]]]]},{n:`Sri Lanka`,a2:`LK`,a3:`LKA`,p:`LK`,l:[80.7,7.58],g:[[[[81.79,7.52],[81.64,6.48],[81.22,6.2],[80.35,5.97],[79.87,6.76],[79.7,8.2],[80.15,9.82],[80.84,9.27],[81.3,8.56],[81.79,7.52]]]]},{n:`China`,a2:`CN`,a3:`CHN`,p:`CN`,l:[106.34,32.5],g:[[[[109.48,18.2],[108.66,18.51],[108.63,19.37],[109.12,19.82],[110.21,20.1],[110.79,20.08],[111.01,19.7],[110.57,19.26],[110.34,18.68],[109.48,18.2]]],[[[80.26,42.35],[80.18,42.92],[80.87,43.18],[79.97,44.92],[81.95,45.32],[82.46,45.54],[83.18,47.33],[85.16,47],[85.72,47.45],[85.77,48.46],[86.6,48.55],[87.36,49.21],[87.75,49.3],[88.01,48.6],[88.85,48.07],[90.28,47.69],[90.97,46.89],[90.59,45.72],[90.95,45.29],[92.13,45.12],[93.48,44.98],[94.69,44.35],[95.31,44.24],[95.76,43.32],[96.35,42.73],[97.45,42.75],[99.52,42.52],[100.85,42.66],[101.83,42.51],[103.31,41.91],[104.52,41.91],[104.96,41.6],[106.13,42.13],[107.74,42.48],[109.24,42.52],[110.41,42.87],[111.13,43.41],[111.83,43.74],[111.67,44.07],[111.35,44.46],[111.87,45.1],[112.44,45.01],[113.46,44.81],[114.46,45.34],[115.99,45.73],[116.72,46.39],[117.42,46.67],[118.87,46.81],[119.66,46.69],[119.77,47.05],[118.87,47.75],[118.06,48.07],[117.3,47.7],[116.31,47.85],[115.74,47.73],[115.49,48.14],[116.19,49.13],[116.68,49.89],[117.88,49.51],[119.29,50.14],[119.28,50.58],[120.18,51.64],[120.74,51.96],[120.73,52.52],[120.18,52.75],[121,53.25],[122.25,53.43],[123.57,53.46],[125.07,53.16],[125.95,52.79],[126.56,51.78],[126.94,51.35],[127.29,50.74],[127.66,49.76],[129.4,49.44],[130.58,48.73],[130.99,47.79],[132.51,47.79],[133.37,48.18],[135.03,48.48],[134.5,47.58],[134.11,47.21],[133.77,46.12],[133.1,45.14],[131.88,45.32],[131.03,44.97],[131.29,44.11],[131.14,42.93],[130.63,42.9],[130.64,42.4],[129.99,42.99],[129.6,42.42],[128.05,41.99],[128.21,41.47],[127.34,41.5],[126.87,41.82],[126.18,41.11],[125.08,40.57],[124.27,39.93],[122.87,39.64],[122.13,39.17],[121.05,38.9],[121.59,39.36],[121.38,39.75],[122.17,40.42],[121.64,40.95],[120.77,40.59],[119.64,39.9],[119.02,39.25],[118.04,39.2],[117.53,38.74],[118.06,38.06],[118.88,37.9],[118.91,37.45],[119.7,37.16],[120.82,37.87],[121.71,37.48],[122.36,37.45],[122.52,36.93],[121.1,36.65],[120.64,36.11],[119.66,35.61],[119.15,34.91],[120.23,34.36],[120.62,33.38],[121.23,32.46],[121.91,31.69],[121.89,30.95],[121.26,30.68],[121.5,30.14],[122.09,29.83],[121.94,29.02],[121.68,28.23],[121.13,28.14],[120.4,27.05],[119.59,25.74],[118.66,24.55],[117.28,23.62],[115.89,22.78],[114.76,22.67],[114.15,22.22],[113.81,22.55],[113.24,22.05],[111.84,21.55],[110.79,21.4],[110.44,20.34],[109.89,20.28],[109.63,21.01],[109.86,21.4],[108.52,21.72],[108.05,21.55],[107.04,21.81],[106.57,22.22],[106.73,22.79],[105.81,22.98],[105.33,23.35],[104.48,22.82],[103.5,22.7],[102.71,22.71],[102.17,22.46],[101.65,22.32],[101.8,21.17],[101.27,21.2],[101.18,21.44],[101.15,21.85],[100.42,21.56],[99.98,21.74],[99.24,22.12],[99.53,22.95],[98.9,23.14],[98.66,24.06],[97.6,23.9],[97.72,25.08],[98.67,25.92],[98.71,26.74],[98.68,27.51],[98.25,27.75],[97.91,28.34],[97.33,28.26],[96.25,28.41],[96.59,28.83],[96.12,29.45],[95.4,29.03],[94.57,29.28],[93.41,28.64],[92.5,27.9],[91.7,27.77],[91.26,28.04],[90.73,28.06],[90.02,28.3],[89.48,28.04],[88.81,27.3],[88.73,28.09],[88.12,27.88],[86.95,27.97],[85.82,28.2],[85.01,28.64],[84.23,28.84],[83.9,29.32],[83.34,29.46],[82.33,30.12],[81.53,30.42],[81.11,30.18],[79.72,30.88],[78.74,31.52],[78.46,32.62],[79.18,32.48],[79.21,32.99],[78.81,33.51],[78.91,34.32],[77.84,35.49],[76.19,35.9],[75.9,36.67],[75.16,37.13],[74.98,37.42],[74.83,37.99],[74.86,38.38],[74.26,38.61],[73.93,38.51],[73.68,39.43],[73.96,39.66],[73.82,39.89],[74.78,40.37],[75.47,40.56],[76.53,40.43],[76.9,41.07],[78.19,41.19],[78.54,41.58],[80.12,42.12],[80.26,42.35]]]]},{n:`Taiwan`,a2:`CN-TW`,a3:`TWN`,p:`TW`,l:[120.87,23.65],g:[[[[121.78,24.39],[121.18,22.79],[120.75,21.97],[120.22,22.81],[120.11,23.56],[120.69,24.54],[121.5,25.3],[121.95,25],[121.78,24.39]]]]},{n:`Italy`,a2:`IT`,a3:`ITA`,p:`I`,l:[11.08,44.73],g:[[[[10.44,46.89],[11.05,46.75],[11.16,46.94],[12.15,47.12],[12.38,46.77],[13.81,46.51],[13.7,46.02],[13.94,45.59],[13.14,45.74],[12.33,45.38],[12.38,44.89],[12.26,44.6],[12.59,44.09],[13.53,43.59],[14.03,42.76],[15.14,41.96],[15.93,41.96],[16.17,41.74],[15.89,41.54],[16.79,41.18],[17.52,40.88],[18.38,40.36],[18.48,40.17],[18.29,39.81],[17.74,40.28],[16.87,40.44],[16.45,39.8],[17.17,39.42],[17.05,38.9],[16.64,38.84],[16.1,37.99],[15.68,37.91],[15.69,38.21],[15.89,38.75],[16.11,38.96],[15.72,39.54],[15.41,40.05],[15,40.17],[14.7,40.6],[14.06,40.79],[13.63,41.19],[12.89,41.25],[12.11,41.7],[11.19,42.36],[10.51,42.93],[10.2,43.92],[9.7,44.04],[8.89,44.37],[8.43,44.23],[7.85,43.77],[7.44,43.69],[7.55,44.13],[7.01,44.25],[6.75,45.03],[7.1,45.33],[6.8,45.71],[6.84,45.99],[7.27,45.78],[7.76,45.82],[8.32,46.16],[8.49,46.01],[8.97,46.04],[9.18,46.44],[9.92,46.31],[10.36,46.48],[10.44,46.89]]],[[[14.76,38.14],[15.52,38.23],[15.16,37.44],[15.31,37.13],[15.1,36.62],[14.34,37],[13.83,37.1],[12.43,37.61],[12.57,38.13],[13.74,38.03],[14.76,38.14]]],[[[8.71,40.9],[9.21,41.21],[9.81,40.5],[9.67,39.18],[9.21,39.24],[8.81,38.91],[8.43,39.17],[8.39,40.38],[8.16,40.95],[8.71,40.9]]]]},{n:`Denmark`,a2:`DK`,a3:`DNK`,p:`DK`,l:[9.02,55.97],g:[[[[9.92,54.98],[9.28,54.83],[8.53,54.96],[8.12,55.52],[8.09,56.54],[8.26,56.81],[8.54,57.11],[9.42,57.17],[9.78,57.45],[10.58,57.73],[10.55,57.22],[10.25,56.89],[10.37,56.61],[10.91,56.46],[10.67,56.08],[10.37,56.19],[9.65,55.47],[9.92,54.98]]],[[[12.37,56.11],[12.69,55.61],[12.09,54.8],[11.04,55.36],[10.9,55.78],[12.37,56.11]]]]},{n:`United Kingdom`,a2:`GB`,a3:`GBR`,p:`GB`,l:[-2.12,54.4],g:[[[[-6.2,53.87],[-6.95,54.07],[-7.57,54.06],[-7.37,54.6],[-7.57,55.13],[-6.73,55.17],[-5.66,54.55],[-6.2,53.87]]],[[[-3.09,53.4],[-2.95,53.99],[-3.61,54.6],[-3.63,54.62],[-4.84,54.79],[-5.08,55.06],[-4.72,55.51],[-5.05,55.78],[-5.59,55.31],[-5.64,56.28],[-6.15,56.79],[-5.79,57.82],[-5.01,58.63],[-4.21,58.55],[-3.01,58.64],[-4.07,57.55],[-3.06,57.69],[-1.96,57.68],[-2.22,56.87],[-3.12,55.97],[-2.09,55.91],[-2.01,55.8],[-1.11,54.62],[-.43,54.46],[.18,53.33],[.47,52.93],[1.68,52.74],[1.56,52.1],[1.05,51.81],[1.45,51.29],[.55,50.77],[-.79,50.77],[-2.49,50.5],[-2.96,50.7],[-3.62,50.23],[-4.54,50.34],[-5.25,49.96],[-5.78,50.16],[-4.31,51.21],[-3.41,51.43],[-3.42,51.43],[-4.98,51.59],[-5.27,51.99],[-4.22,52.3],[-4.77,52.84],[-4.58,53.5],[-3.09,53.4]]]]},{n:`Iceland`,a2:`IS`,a3:`ISL`,p:`IS`,l:[-18.67,64.78],g:[[[[-14.51,66.46],[-14.74,65.81],[-13.61,65.13],[-14.91,64.36],[-17.79,63.68],[-18.66,63.5],[-19.97,63.64],[-22.76,63.96],[-21.78,64.4],[-23.96,64.89],[-22.18,65.08],[-22.23,65.38],[-24.33,65.61],[-23.65,66.26],[-22.13,66.41],[-20.58,65.73],[-19.06,66.28],[-17.8,65.99],[-16.17,66.53],[-14.51,66.46]]]]},{n:`Azerbaijan`,a2:`AZ`,a3:`AZE`,p:`AZ`,l:[47.21,40.4],g:[[[[46.4,41.86],[46.69,41.83],[47.37,41.22],[47.82,41.15],[47.99,41.41],[48.58,41.81],[49.11,41.28],[49.62,40.57],[50.08,40.53],[50.39,40.26],[49.57,40.18],[49.4,39.4],[49.22,39.05],[48.86,38.82],[48.88,38.32],[48.63,38.27],[48.01,38.79],[48.36,39.29],[48.06,39.58],[47.69,39.51],[46.51,38.77],[46.48,39.46],[46.03,39.63],[45.61,39.9],[45.89,40.22],[45.36,40.56],[45.56,40.81],[45.18,40.99],[44.97,41.25],[45.22,41.41],[45.96,41.12],[46.5,41.06],[46.64,41.18],[46.15,41.72],[46.4,41.86]]],[[[46.14,38.74],[45.46,38.87],[44.95,39.34],[44.79,39.71],[45,39.74],[45.3,39.47],[45.74,39.47],[45.74,39.32],[46.14,38.74]]]]},{n:`Georgia`,a2:`GE`,a3:`GEO`,p:`GE`,l:[43.74,41.87],g:[[[[39.96,43.43],[40.08,43.55],[40.92,43.38],[42.39,43.22],[43.76,42.74],[43.93,42.55],[44.54,42.71],[45.47,42.5],[45.78,42.09],[46.4,41.86],[46.15,41.72],[46.64,41.18],[46.5,41.06],[45.96,41.12],[45.22,41.41],[44.97,41.25],[43.58,41.09],[42.62,41.58],[41.55,41.54],[41.7,41.96],[41.45,42.65],[40.88,43.01],[40.32,43.13],[39.96,43.43]]]]},{n:`Philippines`,a2:`PH`,a3:`PHL`,p:`PH`,l:[122.47,11.2],g:[[[[120.83,12.7],[120.32,13.47],[121.18,13.43],[121.53,13.07],[121.26,12.21],[120.83,12.7]]],[[[122.59,9.98],[122.84,10.26],[122.95,10.88],[123.5,10.94],[123.34,10.27],[124.08,11.23],[123.98,10.28],[123.62,9.95],[123.31,9.32],[123,9.02],[122.38,9.71],[122.59,9.98]]],[[[126.38,8.41],[126.48,7.75],[126.54,7.19],[126.2,6.27],[125.83,7.29],[125.36,6.79],[125.68,6.05],[125.4,5.58],[124.22,6.16],[123.94,6.89],[124.24,7.36],[123.61,7.83],[123.3,7.42],[122.83,7.46],[122.09,6.9],[121.92,7.19],[122.31,8.03],[122.94,8.32],[123.49,8.69],[123.84,8.24],[124.6,8.51],[124.76,8.96],[125.47,8.99],[125.41,9.76],[126.22,9.29],[126.31,8.78],[126.38,8.41]]],[[[118.5,9.32],[117.17,8.37],[117.66,9.07],[118.39,9.68],[118.99,10.38],[119.51,11.37],[119.69,10.55],[119.03,10],[118.5,9.32]]],[[[122.34,18.22],[122.17,17.81],[122.52,17.09],[122.25,16.26],[121.66,15.93],[121.51,15.12],[121.73,14.33],[122.26,14.22],[122.7,14.34],[123.95,13.78],[123.86,13.24],[124.18,13],[124.08,12.54],[123.3,13.03],[122.93,13.55],[122.67,13.19],[122.03,13.78],[121.13,13.64],[120.63,13.86],[120.68,14.27],[120.99,14.53],[120.69,14.76],[120.56,14.4],[120.07,14.97],[119.92,15.41],[119.88,16.36],[120.29,16.03],[120.39,17.6],[120.72,18.51],[121.32,18.5],[121.94,18.22],[122.25,18.48],[122.34,18.22]]],[[[122.04,11.42],[121.88,11.89],[122.48,11.58],[123.12,11.58],[123.1,11.17],[122.64,10.74],[122,10.44],[121.97,10.91],[122.04,11.42]]],[[[125.5,12.16],[125.78,11.05],[125.01,11.31],[125.03,10.98],[125.28,10.36],[124.8,10.13],[124.76,10.84],[124.46,10.89],[124.3,11.5],[124.89,11.42],[124.88,11.79],[124.27,12.56],[125.23,12.54],[125.5,12.16]]]]},{n:`Malaysia`,a2:`MY`,a3:`MYS`,p:`MY`,l:[113.84,2.53],g:[[[[100.09,6.46],[100.26,6.64],[101.08,6.2],[101.15,5.69],[101.81,5.81],[102.14,6.22],[102.37,6.13],[102.96,5.52],[103.38,4.86],[103.44,4.18],[103.33,3.73],[103.43,3.38],[103.5,2.79],[103.85,2.52],[104.25,1.63],[104.23,1.29],[103.52,1.23],[102.57,1.97],[101.39,2.76],[101.27,3.27],[100.7,3.94],[100.56,4.77],[100.2,5.31],[100.31,6.04],[100.09,6.46]]],[[[117.88,4.14],[117.02,4.31],[115.87,4.31],[115.52,3.17],[115.13,2.82],[114.62,1.43],[113.81,1.22],[112.86,1.5],[112.38,1.41],[111.8,.9],[111.16,.98],[110.51,.77],[109.83,1.34],[109.66,2.01],[110.4,1.66],[111.17,1.85],[111.37,2.7],[111.8,2.89],[113,3.1],[113.71,3.89],[114.2,4.53],[114.66,4.01],[114.87,4.35],[115.35,4.32],[115.41,4.96],[115.45,5.45],[116.22,6.14],[116.73,6.92],[117.13,6.93],[117.64,6.42],[117.69,5.99],[118.35,5.71],[119.18,5.41],[119.11,5.02],[118.44,4.97],[118.62,4.48],[117.88,4.14]]]]},{n:`Brunei Darussalam`,a2:`BN`,a3:`BRN`,p:`BN`,l:[114.55,4.45],g:[[[[115.45,5.45],[115.41,4.96],[115.35,4.32],[114.87,4.35],[114.66,4.01],[114.2,4.53],[114.6,4.9],[115.45,5.45]]]]},{n:`Slovenia`,a2:`SI`,a3:`SVN`,p:`SLO`,l:[14.92,46.06],g:[[[[13.81,46.51],[14.63,46.43],[15.14,46.66],[16.01,46.68],[16.2,46.85],[16.37,46.84],[16.56,46.5],[15.77,46.24],[15.67,45.83],[15.32,45.73],[15.33,45.45],[14.94,45.47],[14.6,45.63],[14.41,45.47],[13.72,45.5],[13.94,45.59],[13.7,46.02],[13.81,46.51]]]]},{n:`Finland`,a2:`FI`,a3:`FIN`,p:`FIN`,l:[27.28,63.25],g:[[[[28.59,69.06],[28.45,68.36],[29.98,67.7],[29.05,66.94],[30.22,65.81],[29.54,64.95],[30.44,64.2],[30.04,63.55],[31.52,62.87],[31.14,62.36],[30.21,61.78],[28.07,60.5],[26.26,60.42],[24.5,60.06],[22.87,59.85],[22.29,60.39],[21.32,60.72],[21.54,61.71],[21.06,62.61],[21.54,63.19],[22.44,63.82],[24.73,64.9],[25.4,65.11],[25.29,65.53],[23.9,66.01],[23.57,66.4],[23.54,67.94],[21.98,68.62],[20.65,69.11],[21.24,69.37],[22.36,68.84],[23.66,68.89],[24.74,68.65],[25.69,69.09],[26.18,69.83],[27.73,70.16],[29.02,69.77],[28.59,69.06]]]]},{n:`Slovakia`,a2:`SK`,a3:`SVK`,p:`SK`,l:[19.05,48.73],g:[[[[22.56,49.09],[22.28,48.83],[22.09,48.42],[21.87,48.32],[20.8,48.62],[20.47,48.56],[20.24,48.33],[19.77,48.2],[19.66,48.27],[19.17,48.11],[18.78,48.08],[18.7,47.88],[17.86,47.76],[17.49,47.87],[16.98,48.12],[16.88,48.47],[16.96,48.6],[17.1,48.82],[17.55,48.8],[17.89,48.9],[17.91,49],[18.1,49.04],[18.17,49.27],[18.4,49.32],[18.55,49.5],[18.85,49.5],[18.91,49.44],[19.32,49.57],[19.83,49.22],[20.42,49.43],[20.89,49.33],[21.61,49.47],[22.56,49.09]]]]},{n:`Czech Republic`,a2:`CZ`,a3:`CZE`,p:`CZ`,l:[15.38,49.88],g:[[[[15.02,51.11],[15.49,50.78],[16.24,50.7],[16.18,50.42],[16.72,50.22],[16.87,50.47],[17.55,50.36],[17.65,50.05],[18.39,49.99],[18.85,49.5],[18.55,49.5],[18.4,49.32],[18.17,49.27],[18.1,49.04],[17.91,49],[17.89,48.9],[17.55,48.8],[17.1,48.82],[16.96,48.6],[16.5,48.79],[16.03,48.73],[15.25,49.04],[14.9,48.96],[14.34,48.56],[13.6,48.88],[13.03,49.31],[12.52,49.55],[12.42,49.97],[12.24,50.27],[12.97,50.48],[13.34,50.73],[14.06,50.93],[14.31,51.12],[14.57,51],[15.02,51.11]]]]},{n:`Eritrea`,a2:`ER`,a3:`ERI`,p:`ER`,l:[38.29,15.79],g:[[[[36.43,14.42],[36.32,14.82],[36.75,16.29],[36.85,16.96],[37.17,17.26],[37.9,17.43],[38.41,18],[38.99,16.84],[39.27,15.92],[39.81,15.44],[41.18,14.49],[41.73,13.92],[42.28,13.34],[42.59,13],[43.08,12.7],[42.78,12.46],[42.35,12.54],[42.01,12.87],[41.6,13.45],[41.16,13.77],[40.9,14.12],[40.03,14.52],[39.34,14.53],[39.1,14.74],[38.51,14.51],[37.91,14.96],[37.59,14.21],[36.43,14.42]]]]},{n:`Japan`,a2:`JP`,a3:`JPN`,p:`J`,l:[138.44,36.14],g:[[[[141.88,39.18],[140.96,38.17],[140.98,37.14],[140.6,36.34],[140.77,35.84],[140.25,35.14],[138.98,34.67],[137.22,34.61],[135.79,33.46],[135.12,33.85],[135.08,34.6],[133.34,34.38],[132.16,33.9],[130.99,33.89],[132,33.15],[131.33,31.45],[130.69,31.03],[130.2,31.42],[130.45,32.32],[129.81,32.61],[129.41,33.3],[130.35,33.6],[130.88,34.23],[131.88,34.75],[132.62,35.43],[134.61,35.73],[135.68,35.53],[136.72,37.3],[137.39,36.83],[138.86,37.83],[139.43,38.22],[140.05,39.44],[139.88,40.56],[140.31,41.2],[141.37,41.38],[141.91,39.99],[141.88,39.18]]],[[[144.61,43.96],[145.32,44.38],[145.54,43.26],[144.06,42.99],[143.18,42],[141.61,42.68],[141.07,41.58],[139.96,41.57],[139.82,42.56],[140.31,43.33],[141.38,43.39],[141.67,44.77],[141.97,45.55],[143.14,44.51],[143.91,44.17],[144.61,43.96]]],[[[132.37,33.46],[132.92,34.06],[133.49,33.94],[133.9,34.36],[134.64,34.15],[134.77,33.81],[134.2,33.2],[133.79,33.52],[133.28,33.29],[133.01,32.7],[132.36,32.99],[132.37,33.46]]]]},{n:`Paraguay`,a2:`PY`,a3:`PRY`,p:`PY`,l:[-60.15,-21.67],g:[[[[-58.17,-20.18],[-57.87,-20.73],[-57.94,-22.09],[-56.88,-22.28],[-56.47,-22.09],[-55.8,-22.36],[-55.61,-22.66],[-55.52,-23.57],[-55.4,-23.96],[-55.03,-24],[-54.65,-23.84],[-54.29,-24.02],[-54.29,-24.57],[-54.43,-25.16],[-54.63,-25.74],[-54.79,-26.62],[-55.7,-27.39],[-56.49,-27.55],[-57.61,-27.4],[-58.62,-27.12],[-57.63,-25.6],[-57.78,-25.16],[-58.81,-24.77],[-60.03,-24.03],[-60.85,-23.88],[-62.69,-22.25],[-62.29,-21.05],[-62.27,-20.51],[-61.79,-19.63],[-60.04,-19.34],[-59.12,-19.36],[-58.18,-19.87],[-58.17,-20.18]]]]},{n:`Yemen`,a2:`YE`,a3:`YEM`,p:`YE`,l:[45.87,15.33],g:[[[[52,19],[52.78,17.35],[53.11,16.65],[52.39,16.38],[52.19,15.94],[52.17,15.6],[51.17,15.18],[49.57,14.71],[48.68,14],[48.24,13.95],[47.94,14.01],[47.35,13.59],[46.72,13.4],[45.88,13.35],[45.63,13.29],[45.41,13.03],[45.14,12.95],[44.99,12.7],[44.49,12.72],[44.18,12.59],[43.48,12.64],[43.22,13.22],[43.25,13.77],[43.09,14.06],[42.89,14.8],[42.6,15.21],[42.81,15.26],[42.7,15.72],[42.82,15.91],[42.78,16.35],[43.22,16.67],[43.12,17.09],[43.38,17.58],[43.79,17.32],[44.06,17.41],[45.22,17.43],[45.4,17.33],[46.37,17.23],[46.75,17.28],[47,16.95],[47.47,17.12],[48.18,18.17],[49.12,18.62],[52,19]]]]},{n:`Saudi Arabia`,a2:`SA`,a3:`SAU`,p:`SA`,l:[44.7,23.81],g:[[[[34.96,29.36],[36.07,29.2],[36.5,29.51],[36.74,29.87],[37.5,30],[37.67,30.34],[38,30.51],[37,31.51],[39,32.01],[39.2,32.16],[40.4,31.89],[41.89,31.19],[44.71,29.18],[46.57,29.1],[47.46,29],[47.71,28.53],[48.42,28.55],[48.81,27.69],[49.3,27.46],[49.47,27.11],[50.15,26.69],[50.21,26.28],[50.11,25.94],[50.24,25.61],[50.53,25.33],[50.66,25],[50.81,24.75],[51.11,24.56],[51.39,24.63],[51.58,24.25],[51.62,24.01],[52,23],[55.01,22.5],[55.21,22.71],[55.67,22],[55,20],[52,19],[49.12,18.62],[48.18,18.17],[47.47,17.12],[47,16.95],[46.75,17.28],[46.37,17.23],[45.4,17.33],[45.22,17.43],[44.06,17.41],[43.79,17.32],[43.38,17.58],[43.12,17.09],[43.22,16.67],[42.78,16.35],[42.65,16.77],[42.35,17.08],[42.27,17.47],[41.75,17.83],[41.22,18.67],[40.94,19.49],[40.25,20.17],[39.8,20.34],[39.14,21.29],[39.02,21.99],[39.07,22.58],[38.49,23.69],[38.02,24.08],[37.48,24.29],[37.15,24.86],[37.21,25.08],[36.93,25.6],[36.64,25.83],[36.25,26.57],[35.64,27.38],[35.13,28.06],[34.63,28.06],[34.79,28.61],[34.83,28.96],[34.96,29.36]]]]},{n:`Antarctica`,a2:`AQ`,a3:`ATA`,p:`AQ`,l:[35.89,-79.84],g:[[[[-48.66,-78.05],[-48.15,-78.05],[-46.66,-77.83],[-45.15,-78.05],[-43.92,-78.48],[-43.49,-79.09],[-43.37,-79.52],[-43.33,-80.03],[-44.88,-80.34],[-46.51,-80.59],[-48.39,-80.83],[-50.48,-81.03],[-52.85,-80.97],[-54.16,-80.63],[-53.99,-80.22],[-51.85,-79.95],[-50.99,-79.61],[-50.36,-79.18],[-49.91,-78.81],[-49.31,-78.46],[-48.66,-78.05]]],[[[-66.29,-80.26],[-64.04,-80.29],[-61.88,-80.39],[-61.14,-79.98],[-60.61,-79.63],[-59.57,-80.04],[-59.87,-80.55],[-60.16,-81],[-62.26,-80.86],[-64.49,-80.92],[-65.74,-80.59],[-65.74,-80.55],[-66.29,-80.26]]],[[[-73.92,-71.27],[-73.23,-71.15],[-72.07,-71.19],[-71.78,-70.68],[-71.72,-70.31],[-71.74,-69.51],[-71.17,-69.04],[-70.25,-68.88],[-69.72,-69.25],[-69.49,-69.62],[-69.06,-70.07],[-68.73,-70.51],[-68.45,-70.96],[-68.33,-71.41],[-68.51,-71.8],[-68.78,-72.17],[-69.96,-72.31],[-71.08,-72.5],[-72.39,-72.48],[-71.9,-72.09],[-73.07,-72.23],[-74.19,-72.37],[-74.95,-72.07],[-75.01,-71.66],[-73.92,-71.27]]],[[[-102.33,-71.89],[-101.7,-71.72],[-100.43,-71.85],[-98.98,-71.93],[-97.88,-72.07],[-96.79,-71.95],[-96.2,-72.52],[-96.98,-72.44],[-98.2,-72.48],[-99.43,-72.44],[-100.78,-72.5],[-101.8,-72.31],[-102.33,-71.89]]],[[[-122.62,-73.66],[-122.41,-73.32],[-121.21,-73.5],[-119.92,-73.66],[-118.72,-73.48],[-119.29,-73.83],[-120.23,-74.09],[-121.62,-74.01],[-122.62,-73.66]]],[[[-127.28,-73.46],[-126.56,-73.25],[-125.56,-73.48],[-124.03,-73.87],[-124.62,-73.83],[-125.91,-73.74],[-127.28,-73.46]]],[[[-163.71,-78.6],[-163.11,-78.22],[-161.25,-78.38],[-160.25,-78.69],[-159.48,-79.05],[-159.21,-79.5],[-161.13,-79.63],[-162.44,-79.28],[-163.03,-78.93],[-163.07,-78.87],[-163.71,-78.6]]],[[[180,-84.71],[180,-90],[-180,-90],[-180,-84.71],[-179.94,-84.72],[-179.06,-84.14],[-177.26,-84.45],[-177.14,-84.42],[-176.08,-84.1],[-175.95,-84.11],[-175.83,-84.12],[-174.38,-84.53],[-173.12,-84.12],[-172.89,-84.06],[-169.95,-83.88],[-169,-84.12],[-168.53,-84.24],[-167.02,-84.57],[-164.18,-84.83],[-161.93,-85.14],[-158.07,-85.37],[-155.19,-85.1],[-150.94,-85.3],[-148.53,-85.61],[-145.89,-85.32],[-143.11,-85.04],[-142.89,-84.57],[-146.83,-84.53],[-150.06,-84.3],[-150.9,-83.9],[-153.59,-83.69],[-153.41,-83.24],[-153.04,-82.83],[-152.67,-82.45],[-152.86,-82.04],[-154.53,-81.77],[-155.29,-81.42],[-156.84,-81.1],[-154.41,-81.16],[-152.1,-81],[-150.65,-81.34],[-148.87,-81.04],[-147.22,-80.67],[-146.42,-80.34],[-146.77,-79.93],[-148.06,-79.65],[-149.53,-79.36],[-151.59,-79.3],[-153.39,-79.16],[-155.33,-79.06],[-155.98,-78.69],[-157.27,-78.38],[-158.05,-78.03],[-158.37,-76.89],[-157.88,-76.99],[-156.97,-77.3],[-155.33,-77.2],[-153.74,-77.07],[-152.92,-77.5],[-151.33,-77.4],[-150,-77.18],[-148.75,-76.91],[-147.61,-76.58],[-146.1,-76.48],[-146.14,-76.11],[-146.5,-75.73],[-146.2,-75.38],[-144.91,-75.2],[-144.32,-75.54],[-142.79,-75.34],[-141.64,-75.09],[-140.21,-75.07],[-138.86,-74.97],[-137.51,-74.73],[-136.43,-74.52],[-135.21,-74.3],[-134.43,-74.36],[-133.75,-74.44],[-132.26,-74.3],[-130.93,-74.48],[-129.55,-74.46],[-128.24,-74.32],[-126.89,-74.42],[-125.4,-74.52],[-124.01,-74.48],[-122.56,-74.5],[-121.07,-74.52],[-119.7,-74.48],[-118.68,-74.19],[-117.47,-74.03],[-116.22,-74.24],[-115.02,-74.07],[-113.94,-73.71],[-113.3,-74.03],[-112.95,-74.38],[-112.3,-74.71],[-111.26,-74.42],[-110.07,-74.79],[-108.71,-74.91],[-107.56,-75.18],[-106.15,-75.13],[-104.88,-74.95],[-103.37,-74.99],[-102.02,-75.13],[-100.65,-75.3],[-100.12,-74.87],[-100.76,-74.54],[-101.25,-74.19],[-102.55,-74.11],[-103.11,-73.73],[-103.33,-73.36],[-103.68,-72.62],[-102.92,-72.75],[-101.61,-72.81],[-100.31,-72.75],[-99.14,-72.91],[-98.12,-73.21],[-97.69,-73.56],[-96.34,-73.62],[-95.04,-73.48],[-93.67,-73.28],[-92.44,-73.17],[-91.42,-73.4],[-90.09,-73.32],[-89.23,-72.56],[-88.42,-73.01],[-87.27,-73.19],[-86.01,-73.09],[-85.19,-73.48],[-83.88,-73.52],[-82.67,-73.64],[-81.47,-73.85],[-80.69,-73.48],[-80.3,-73.13],[-79.3,-73.52],[-77.93,-73.42],[-76.91,-73.64],[-76.22,-73.97],[-74.89,-73.87],[-73.85,-73.66],[-72.83,-73.4],[-71.62,-73.26],[-70.21,-73.15],[-68.94,-73.01],[-67.96,-72.79],[-67.37,-72.48],[-67.13,-72.05],[-67.25,-71.64],[-67.56,-71.25],[-67.92,-70.85],[-68.23,-70.46],[-68.49,-70.11],[-68.54,-69.72],[-68.45,-69.33],[-67.98,-68.95],[-67.58,-68.54],[-67.43,-68.15],[-67.62,-67.72],[-67.74,-67.33],[-67.25,-66.88],[-66.7,-66.58],[-66.06,-66.21],[-65.37,-65.9],[-64.57,-65.6],[-64.18,-65.17],[-63.63,-64.9],[-63,-64.64],[-62.04,-64.58],[-61.41,-64.27],[-60.71,-64.07],[-59.89,-63.96],[-59.16,-63.7],[-58.59,-63.39],[-57.81,-63.27],[-57.22,-63.53],[-57.6,-63.86],[-58.61,-64.15],[-59.05,-64.37],[-59.79,-64.21],[-60.61,-64.31],[-61.3,-64.54],[-62.02,-64.8],[-62.51,-65.09],[-62.65,-65.48],[-62.59,-65.86],[-62.12,-66.19],[-62.81,-66.43],[-63.75,-66.5],[-64.29,-66.84],[-64.88,-67.15],[-65.51,-67.58],[-65.67,-67.95],[-65.31,-68.37],[-64.78,-68.68],[-63.96,-68.91],[-63.2,-69.23],[-62.79,-69.62],[-62.57,-69.99],[-62.28,-70.38],[-61.81,-70.72],[-61.51,-71.09],[-61.38,-72.01],[-61.08,-72.38],[-61,-72.77],[-60.69,-73.17],[-60.83,-73.7],[-61.38,-74.11],[-61.96,-74.44],[-63.3,-74.58],[-63.75,-74.93],[-64.35,-75.26],[-65.86,-75.64],[-67.19,-75.79],[-68.45,-76.01],[-69.8,-76.22],[-70.6,-76.63],[-72.21,-76.67],[-73.97,-76.63],[-75.56,-76.71],[-77.24,-76.71],[-76.93,-77.1],[-75.4,-77.28],[-74.28,-77.56],[-73.66,-77.91],[-74.77,-78.22],[-76.5,-78.12],[-77.93,-78.38],[-77.98,-78.79],[-78.02,-79.18],[-76.85,-79.51],[-76.63,-79.89],[-75.36,-80.26],[-73.24,-80.42],[-71.44,-80.69],[-70.01,-81],[-68.19,-81.32],[-65.7,-81.47],[-63.26,-81.75],[-61.55,-82.04],[-59.69,-82.38],[-58.71,-82.85],[-58.22,-83.22],[-57.01,-82.87],[-55.36,-82.57],[-53.62,-82.26],[-51.54,-82],[-49.76,-81.73],[-47.27,-81.71],[-44.83,-81.85],[-42.81,-82.08],[-42.16,-81.65],[-40.77,-81.36],[-38.24,-81.34],[-36.27,-81.12],[-34.39,-80.91],[-32.31,-80.77],[-30.1,-80.59],[-28.55,-80.34],[-29.25,-79.99],[-29.69,-79.63],[-29.69,-79.26],[-31.62,-79.3],[-33.68,-79.46],[-35.64,-79.46],[-35.91,-79.08],[-35.78,-78.34],[-35.33,-78.12],[-33.9,-77.89],[-32.21,-77.65],[-31,-77.36],[-29.78,-77.07],[-28.88,-76.67],[-27.51,-76.5],[-26.16,-76.36],[-25.47,-76.28],[-23.93,-76.24],[-22.46,-76.11],[-21.22,-75.91],[-20.01,-75.67],[-18.91,-75.44],[-17.52,-75.13],[-16.64,-74.79],[-15.7,-74.5],[-15.41,-74.11],[-16.47,-73.87],[-16.11,-73.46],[-15.45,-73.15],[-14.41,-72.95],[-13.31,-72.72],[-12.29,-72.4],[-11.51,-72.01],[-11.02,-71.54],[-10.3,-71.27],[-9.1,-71.32],[-8.61,-71.66],[-7.42,-71.7],[-7.38,-71.32],[-6.87,-70.93],[-5.79,-71.03],[-5.54,-71.4],[-4.34,-71.46],[-3.05,-71.29],[-1.8,-71.17],[-.66,-71.23],[-.23,-71.64],[.87,-71.3],[1.89,-71.13],[3.02,-70.99],[4.14,-70.85],[5.16,-70.62],[6.27,-70.46],[7.14,-70.25],[7.74,-69.89],[8.49,-70.15],[9.53,-70.01],[10.25,-70.48],[10.82,-70.83],[11.95,-70.64],[12.4,-70.25],[13.42,-69.97],[14.73,-70.03],[15.13,-70.4],[15.95,-70.03],[17.03,-69.91],[18.2,-69.87],[19.26,-69.89],[20.38,-70.01],[21.45,-70.07],[21.92,-70.4],[22.57,-70.7],[23.67,-70.52],[24.84,-70.48],[25.98,-70.48],[27.09,-70.46],[28.09,-70.32],[29.15,-70.21],[30.03,-69.93],[30.97,-69.76],[31.99,-69.66],[32.75,-69.38],[33.3,-68.84],[33.87,-68.5],[34.91,-68.66],[35.3,-69.01],[36.16,-69.25],[37.2,-69.17],[37.91,-69.52],[38.65,-69.78],[39.67,-69.54],[40.02,-69.11],[40.92,-68.93],[41.96,-68.6],[42.94,-68.46],[44.11,-68.27],[44.9,-68.05],[45.72,-67.82],[46.5,-67.6],[47.44,-67.72],[48.34,-67.37],[48.99,-67.09],[49.93,-67.11],[50.75,-66.88],[50.95,-66.52],[51.79,-66.25],[52.61,-66.05],[53.61,-65.9],[54.53,-65.82],[55.41,-65.88],[56.36,-65.97],[57.16,-66.25],[57.26,-66.68],[58.14,-67.01],[58.74,-67.29],[59.94,-67.41],[60.61,-67.68],[61.43,-67.95],[62.39,-68.01],[63.19,-67.82],[64.05,-67.41],[64.99,-67.62],[65.97,-67.74],[66.91,-67.86],[67.89,-67.93],[68.89,-67.93],[69.71,-68.97],[69.67,-69.23],[69.56,-69.68],[68.6,-69.93],[67.81,-70.31],[67.95,-70.7],[69.07,-70.68],[68.93,-71.07],[68.42,-71.44],[67.95,-71.85],[68.71,-72.17],[69.87,-72.26],[71.02,-72.09],[71.57,-71.7],[71.91,-71.32],[72.45,-71.01],[73.08,-70.72],[73.34,-70.36],[73.86,-69.87],[74.49,-69.78],[75.63,-69.74],[76.63,-69.62],[77.64,-69.46],[78.13,-69.07],[78.43,-68.7],[79.11,-68.33],[80.09,-68.07],[80.94,-67.88],[81.48,-67.54],[82.05,-67.37],[82.78,-67.21],[83.78,-67.31],[84.68,-67.21],[85.66,-67.09],[86.75,-67.15],[87.48,-66.88],[87.99,-66.21],[88.36,-66.48],[88.83,-66.95],[89.67,-67.15],[90.63,-67.23],[91.59,-67.11],[92.61,-67.19],[93.55,-67.21],[94.18,-67.11],[95.02,-67.17],[95.78,-67.39],[96.68,-67.25],[97.76,-67.25],[98.68,-67.11],[99.72,-67.25],[100.38,-66.92],[100.89,-66.58],[101.58,-66.31],[102.83,-65.56],[103.48,-65.7],[104.24,-65.97],[104.91,-66.33],[106.18,-66.93],[107.16,-66.95],[108.08,-66.95],[109.16,-66.84],[110.24,-66.7],[111.06,-66.43],[111.74,-66.13],[112.86,-66.09],[113.6,-65.88],[114.39,-66.07],[114.9,-66.39],[115.6,-66.7],[116.7,-66.66],[117.38,-66.92],[118.58,-67.17],[119.83,-67.27],[120.87,-67.19],[121.65,-66.88],[122.32,-66.56],[123.22,-66.48],[124.12,-66.62],[125.16,-66.72],[126.1,-66.56],[127,-66.56],[127.88,-66.66],[128.8,-66.76],[129.7,-66.58],[130.78,-66.43],[131.8,-66.39],[132.94,-66.39],[133.86,-66.29],[134.76,-66.21],[135.03,-65.72],[135.07,-65.31],[135.7,-65.58],[135.87,-66.03],[136.21,-66.45],[136.62,-66.78],[137.46,-66.95],[138.6,-66.9],[139.91,-66.88],[140.81,-66.82],[142.12,-66.82],[143.06,-66.8],[144.37,-66.84],[145.49,-66.92],[146.2,-67.23],[146,-67.6],[146.65,-67.9],[147.72,-68.13],[148.84,-68.39],[150.13,-68.56],[151.48,-68.72],[152.5,-68.87],[153.64,-68.89],[154.28,-68.56],[155.17,-68.84],[155.93,-69.15],[156.81,-69.38],[158.03,-69.48],[159.18,-69.6],[159.67,-69.99],[160.81,-70.23],[161.57,-70.58],[162.69,-70.74],[163.84,-70.72],[164.92,-70.78],[166.11,-70.76],[167.31,-70.83],[168.43,-70.97],[169.46,-71.21],[170.5,-71.4],[171.21,-71.7],[171.09,-72.09],[170.56,-72.44],[170.11,-72.89],[169.76,-73.24],[169.29,-73.66],[167.98,-73.81],[167.39,-74.17],[166.09,-74.38],[165.64,-74.77],[164.96,-75.15],[164.23,-75.46],[163.82,-75.87],[163.57,-76.24],[163.47,-76.69],[163.49,-77.07],[164.06,-77.46],[164.27,-77.83],[164.74,-78.18],[166.6,-78.32],[167,-78.75],[165.19,-78.91],[163.67,-79.12],[161.77,-79.16],[160.92,-79.73],[160.75,-80.2],[160.32,-80.57],[159.79,-80.95],[161.12,-81.28],[161.63,-81.69],[162.49,-82.06],[163.71,-82.4],[165.1,-82.71],[166.6,-83.02],[168.9,-83.34],[169.4,-83.83],[172.28,-84.04],[172.48,-84.12],[173.22,-84.41],[175.99,-84.16],[178.28,-84.47],[180,-84.71]]]]},{n:`Northern Cyprus`,a2:``,a3:`CYN`,p:`CN`,l:[33.69,35.22],g:[[[[32.73,35.14],[32.8,35.15],[32.95,35.39],[33.67,35.37],[34.58,35.67],[33.9,35.25],[33.97,35.06],[33.87,35.09],[33.68,35.02],[33.53,35.04],[33.48,35],[33.46,35.1],[33.38,35.16],[33.19,35.17],[32.92,35.09],[32.73,35.14]]]]},{n:`Cyprus`,a2:`CY`,a3:`CYP`,p:`CY`,l:[33.08,34.91],g:[[[[32.73,35.14],[32.92,35.09],[33.19,35.17],[33.38,35.16],[33.46,35.1],[33.48,35],[33.53,35.04],[33.68,35.02],[33.87,35.09],[33.97,35.06],[34,34.98],[32.98,34.57],[32.49,34.7],[32.26,35.1],[32.73,35.14]]]]},{n:`Morocco`,a2:`MA`,a3:`MAR`,p:`MA`,l:[-7.19,31.65],g:[[[[-2.17,35.17],[-1.79,34.53],[-1.73,33.92],[-1.39,32.86],[-1.12,32.65],[-1.31,32.26],[-2.62,32.09],[-3.07,31.72],[-3.65,31.64],[-3.69,30.9],[-4.86,30.5],[-5.24,30],[-6.06,29.73],[-7.06,29.58],[-8.67,28.84],[-8.67,27.66],[-8.82,27.66],[-8.79,27.12],[-9.41,27.09],[-9.74,26.86],[-10.19,26.86],[-10.55,26.99],[-11.39,26.88],[-11.72,26.1],[-12.03,26.03],[-12.5,24.77],[-13.89,23.69],[-14.22,22.31],[-14.63,21.86],[-14.75,21.5],[-17,21.42],[-17.02,21.42],[-16.97,21.89],[-16.59,22.16],[-16.26,22.68],[-16.33,23.02],[-15.98,23.72],[-15.43,24.36],[-15.09,24.52],[-14.82,25.1],[-14.8,25.64],[-14.44,26.25],[-13.77,26.62],[-13.14,27.64],[-13.12,27.65],[-12.62,28.04],[-11.69,28.15],[-10.9,28.83],[-10.4,29.1],[-9.56,29.93],[-9.81,31.18],[-9.43,32.04],[-9.3,32.56],[-8.66,33.24],[-7.65,33.7],[-6.91,34.11],[-6.24,35.15],[-5.93,35.76],[-5.19,35.76],[-4.59,35.33],[-3.64,35.4],[-2.6,35.18],[-2.17,35.17]]]]},{n:`Egypt`,a2:`EG`,a3:`EGY`,p:`EG`,l:[29.45,26.19],g:[[[[36.87,22],[32.9,22],[29.02,22],[25,22],[25,25.68],[25,29.24],[24.7,30.04],[24.96,30.66],[24.8,31.09],[25.16,31.57],[26.5,31.59],[27.46,31.32],[28.45,31.03],[28.91,30.87],[29.68,31.19],[30.1,31.47],[30.98,31.56],[31.69,31.43],[31.96,30.93],[32.19,31.26],[32.99,31.02],[33.77,30.97],[34.27,31.22],[34.82,29.76],[34.92,29.5],[34.64,29.1],[34.43,28.34],[34.15,27.82],[33.92,27.65],[33.59,27.97],[33.14,28.42],[32.42,29.85],[32.32,29.76],[32.73,28.71],[33.35,27.7],[34.1,26.14],[34.47,25.6],[34.8,25.03],[35.69,23.93],[35.49,23.75],[35.53,23.1],[36.69,22.2],[36.87,22]]]]},{n:`Libya`,a2:`LY`,a3:`LBY`,p:`LY`,l:[18.01,26.64],g:[[[[25,22],[25,20],[23.85,20],[23.84,19.58],[19.85,21.5],[15.86,23.41],[14.85,22.86],[14.14,22.49],[13.58,23.04],[12,23.47],[11.56,24.1],[10.77,24.56],[10.3,24.38],[9.95,24.94],[9.91,25.37],[9.32,26.09],[9.72,26.51],[9.63,27.14],[9.76,27.69],[9.68,28.14],[9.86,28.96],[9.81,29.42],[9.48,30.31],[9.97,30.54],[10.06,30.96],[9.95,31.38],[10.64,31.76],[10.94,32.08],[11.43,32.37],[11.49,33.14],[12.66,32.79],[13.08,32.88],[13.92,32.71],[15.25,32.27],[15.71,31.38],[16.61,31.18],[18.02,30.76],[19.09,30.27],[19.57,30.53],[20.05,30.99],[19.82,31.75],[20.13,32.24],[20.85,32.71],[21.54,32.84],[22.9,32.64],[23.24,32.19],[23.61,32.19],[23.93,32.02],[24.92,31.9],[25.16,31.57],[24.8,31.09],[24.96,30.66],[24.7,30.04],[25,29.24],[25,25.68],[25,22]]]]},{n:`Ethiopia`,a2:`ET`,a3:`ETH`,p:`ET`,l:[39.09,8.03],g:[[[[47.79,8],[44.96,5],[43.66,4.96],[42.77,4.25],[42.13,4.23],[41.86,3.92],[41.17,3.92],[40.77,4.26],[39.85,3.84],[39.56,3.42],[38.89,3.5],[38.67,3.62],[38.44,3.59],[38.12,3.6],[36.86,4.45],[36.16,4.45],[35.82,4.78],[35.82,5.34],[35.3,5.51],[34.71,6.59],[34.25,6.83],[34.08,7.23],[33.57,7.71],[32.95,7.78],[33.29,8.35],[33.83,8.38],[33.97,8.68],[33.96,9.58],[34.26,10.63],[34.73,10.91],[34.83,11.32],[35.26,12.08],[35.86,12.58],[36.27,13.56],[36.43,14.42],[37.59,14.21],[37.91,14.96],[38.51,14.51],[39.1,14.74],[39.34,14.53],[40.03,14.52],[40.9,14.12],[41.16,13.77],[41.6,13.45],[42.01,12.87],[42.35,12.54],[42,12.1],[41.66,11.63],[41.74,11.36],[41.76,11.05],[42.31,11.03],[42.55,11.11],[42.78,10.93],[42.56,10.57],[42.93,10.02],[43.3,9.54],[43.68,9.18],[46.95,8],[47.79,8]]]]},{n:`Djibouti`,a2:`DJ`,a3:`DJI`,p:`DJ`,l:[42.5,11.98],g:[[[[42.35,12.54],[42.78,12.46],[43.08,12.7],[43.32,12.39],[43.29,11.97],[42.72,11.74],[43.15,11.46],[42.78,10.93],[42.55,11.11],[42.31,11.03],[41.76,11.05],[41.74,11.36],[41.66,11.63],[42,12.1],[42.35,12.54]]]]},{n:`Somaliland`,a2:``,a3:`SOL`,p:`SL`,l:[46.73,9.44],g:[[[[48.95,11.41],[48.94,11.39],[48.94,10.98],[48.94,9.97],[48.94,9.45],[48.49,8.84],[47.79,8],[46.95,8],[43.68,9.18],[43.3,9.54],[42.93,10.02],[42.56,10.57],[42.78,10.93],[43.15,11.46],[43.47,11.28],[43.67,10.86],[44.12,10.45],[44.61,10.44],[45.56,10.7],[46.65,10.82],[47.53,11.13],[48.02,11.19],[48.38,11.38],[48.95,11.41]]]]},{n:`Uganda`,a2:`UG`,a3:`UGA`,p:`UG`,l:[32.95,1.97],g:[[[[33.9,-.95],[31.87,-1.03],[30.77,-1.01],[30.42,-1.13],[29.82,-1.44],[29.58,-1.34],[29.59,-.59],[29.82,-.21],[29.88,.6],[30.09,1.06],[30.47,1.58],[30.85,1.85],[31.17,2.2],[30.77,2.34],[30.83,3.51],[31.25,3.78],[31.88,3.56],[32.69,3.79],[33.39,3.79],[34.01,4.25],[34.48,3.56],[34.6,3.05],[35.04,1.91],[34.67,1.18],[34.18,.52],[33.89,.11],[33.9,-.95]]]]},{n:`Rwanda`,a2:`RW`,a3:`RWA`,p:`RW`,l:[30.1,-1.9],g:[[[[30.42,-1.13],[30.82,-1.7],[30.76,-2.29],[30.47,-2.41],[29.94,-2.35],[29.63,-2.92],[29.02,-2.84],[29.12,-2.29],[29.25,-2.22],[29.29,-1.62],[29.58,-1.34],[29.82,-1.44],[30.42,-1.13]]]]},{n:`Bosnia and Herzegovina`,a2:`BA`,a3:`BIH`,p:`BiH`,l:[18.07,44.09],g:[[[[18.56,42.65],[17.67,43.03],[17.3,43.45],[16.92,43.67],[16.46,44.04],[16.24,44.35],[15.75,44.82],[15.96,45.23],[16.32,45],[16.53,45.21],[17,45.23],[17.86,45.07],[18.55,45.08],[19.01,44.86],[19.37,44.86],[19.12,44.42],[19.6,44.04],[19.45,43.57],[19.22,43.52],[19.03,43.43],[18.71,43.2],[18.56,42.65]]]]},{n:`North Macedonia`,a2:`MK`,a3:`MKD`,p:`NM`,l:[21.56,41.56],g:[[[[22.38,42.32],[22.88,42],[22.95,41.34],[22.76,41.3],[22.6,41.13],[22.06,41.15],[21.67,40.93],[21.02,40.84],[20.61,41.09],[20.46,41.52],[20.59,41.86],[20.72,41.85],[20.76,42.05],[21.35,42.21],[21.58,42.25],[21.92,42.3],[22.38,42.32]]]]},{n:`Serbia`,a2:`RS`,a3:`SRB`,p:`RS`,l:[20.79,44.19],g:[[[[18.83,45.91],[19.6,46.17],[20.22,46.13],[20.76,45.73],[20.87,45.42],[21.48,45.18],[21.56,44.77],[22.15,44.48],[22.46,44.7],[22.71,44.58],[22.47,44.41],[22.66,44.23],[22.41,44.01],[22.5,43.64],[22.99,43.21],[22.6,42.9],[22.44,42.58],[22.55,42.46],[22.38,42.32],[21.92,42.3],[21.58,42.25],[21.54,42.32],[21.66,42.44],[21.78,42.68],[21.63,42.68],[21.44,42.86],[21.27,42.91],[21.14,43.07],[20.96,43.13],[20.81,43.27],[20.64,43.22],[20.5,42.88],[20.26,42.81],[20.34,42.9],[19.96,43.11],[19.63,43.21],[19.48,43.35],[19.22,43.52],[19.45,43.57],[19.6,44.04],[19.12,44.42],[19.37,44.86],[19.01,44.86],[19.39,45.24],[19.07,45.52],[18.83,45.91]]]]},{n:`Montenegro`,a2:`ME`,a3:`MNE`,p:`ME`,l:[19.14,42.8],g:[[[[20.07,42.59],[19.8,42.5],[19.74,42.69],[19.3,42.2],[19.37,41.88],[19.16,41.96],[18.88,42.28],[18.45,42.48],[18.56,42.65],[18.71,43.2],[19.03,43.43],[19.22,43.52],[19.48,43.35],[19.63,43.21],[19.96,43.11],[20.34,42.9],[20.26,42.81],[20.07,42.59]]]]},{n:`Kosovo`,a2:``,a3:`KOS`,p:`KO`,l:[20.86,42.59],g:[[[[20.59,41.86],[20.52,42.22],[20.28,42.32],[20.07,42.59],[20.26,42.81],[20.5,42.88],[20.64,43.22],[20.81,43.27],[20.96,43.13],[21.14,43.07],[21.27,42.91],[21.44,42.86],[21.63,42.68],[21.78,42.68],[21.66,42.44],[21.54,42.32],[21.58,42.25],[21.35,42.21],[20.76,42.05],[20.72,41.85],[20.59,41.86]]]]},{n:`Trinidad and Tobago`,a2:`TT`,a3:`TTO`,p:`TT`,l:[-60.92,11],g:[[[[-61.68,10.76],[-61.1,10.89],[-60.89,10.86],[-60.93,10.11],[-61.77,10],[-61.95,10.09],[-61.66,10.37],[-61.68,10.76]]]]},{n:`South Sudan`,a2:`SS`,a3:`SSD`,p:`SS`,l:[30.39,7.23],g:[[[[30.83,3.51],[29.95,4.17],[29.72,4.6],[29.16,4.39],[28.7,4.46],[28.43,4.29],[27.98,4.41],[27.37,5.23],[27.21,5.55],[26.47,5.95],[26.21,6.55],[25.8,6.98],[25.12,7.5],[25.11,7.83],[24.57,8.23],[23.89,8.62],[24.19,8.73],[24.54,8.92],[24.79,9.81],[25.07,10.27],[25.79,10.41],[25.96,10.14],[26.48,9.55],[26.75,9.47],[27.11,9.64],[27.83,9.6],[27.97,9.4],[28.97,9.4],[29,9.6],[29.52,9.79],[29.62,10.08],[30,10.29],[30.84,9.71],[31.35,9.81],[31.85,10.53],[32.4,11.08],[32.31,11.68],[32.07,11.97],[32.67,12.02],[32.74,12.25],[33.21,12.18],[33.09,11.44],[33.21,10.72],[33.72,10.33],[33.84,9.98],[33.82,9.48],[33.96,9.46],[33.97,8.68],[33.83,8.38],[33.29,8.35],[32.95,7.78],[33.57,7.71],[34.08,7.23],[34.25,6.83],[34.71,6.59],[35.3,5.51],[34.62,4.85],[34.01,4.25],[33.39,3.79],[32.69,3.79],[31.88,3.56],[31.25,3.78],[30.83,3.51]]]]}]})),kf=n({REGION_MAP_IMPLEMENTATION_MARKER:()=>Jf,projectRegionMapPoint:()=>Af,regionMapColorScale:()=>Hf,renderRegionMapChart:()=>qf,resolveRegionMapFeature:()=>Mf});function Af(e,t){let n=t===`mercator`||t===`miller`||t===`albers`||t===`robinson`?t:`robinson`,r=Zf(Math.max(-180,Math.min(180,e[0]))),i=Math.max(-89.999,Math.min(89.999,e[1])),a=Zf(i);if(n===`mercator`){let e=Zf(Math.max(-85,Math.min(85,i)));return{x:r,y:-Math.log(Math.tan(Math.PI/4+e/2))}}if(n===`miller`)return{x:r,y:-1.25*Math.log(Math.tan(Math.PI/4+.4*a))};if(n===`albers`){let e=Zf(20),t=Zf(50),n=.5*(Math.sin(e)+Math.sin(t)),i=Math.cos(e)**2+2*n*Math.sin(e),o=Math.sqrt(i)/n,s=Math.sqrt(Math.max(0,i-2*n*Math.sin(a)))/n,c=n*r;return{x:s*Math.sin(c),y:o-s*Math.cos(c)}}let o=Math.abs(i),s=Math.min(17,Math.floor(o/5)),c=Math.min(1,(o-s*5)/5),l=e=>e[s]+(e[s+1]-e[s])*c;return{x:.8487*r*l(Yf),y:-1.3523*Math.sign(i)*l(Xf)}}function jf(e){return e.normalize(`NFKD`).replace(/[\u0300-\u036f]/g,``).toLowerCase().replace(/[^a-z0-9]+/g,``)}function Mf(e,t){let n=e=>$f.get(e)??ep.get(e)??tp.get(e)??np.get(e),r=t?n(jf(t)):void 0;if(r)return r;let i=jf(e);return n(i)??(rp[i]?n(jf(rp[i])):void 0)}function Nf(e,t){let n=(e??``).replace(/^#/,``).slice(0,6);return/^[0-9a-f]{6}$/i.test(n)?[0,2,4].map(e=>Number.parseInt(n.slice(e,e+2),16)):Nf(t,`000000`)}function Pf(e){return`#${e.map(e=>Math.round(Math.max(0,Math.min(255,e))).toString(16).padStart(2,`0`)).join(``).toUpperCase()}`}function Ff(e,t,n){return Pf(e.map((e,r)=>e+(t[r]-e)*Math.max(0,Math.min(1,n))))}function If([e,t,n]){let r=e/255,i=t/255,a=n/255,o=Math.max(r,i,a),s=Math.min(r,i,a),c=(o+s)/2,l=o-s;if(l===0)return[0,0,c];let u=l/(1-Math.abs(2*c-1));return[((o===r?(i-a)/l%6:o===i?(a-r)/l+2:(r-i)/l+4)*60+360)%360,u,c]}function Lf(e,t,n){let r=(1-Math.abs(2*n-1))*t,i=(e%360+360)%360/60,a=r*(1-Math.abs(i%2-1)),[o,s,c]=i<1?[r,a,0]:i<2?[a,r,0]:i<3?[0,r,a]:i<4?[0,a,r]:i<5?[a,0,r]:[r,0,a],l=n-r/2;return[o+l,s+l,c+l].map(e=>e*255)}function Rf(e){let[t,n,r]=If(Nf(e,`4472C4`));return{min:Pf(Lf(t,n,r*.2+.8)),max:Pf(Lf(t,n,r*.75))}}function zf(e,t,n){let r=Math.max(0,Math.min(1,n)),i=e+(t-e)*r;if(Number.isFinite(i))return i;let a=Math.max(Math.abs(e),Math.abs(t));return!(a>0)||!Number.isFinite(a)?0:(e/a*(1-r)+t/a*r)*a}function Bf(e,t,n){if(t===n)return .5;let r=(e-t)/(n-t);if(Number.isFinite(r))return r;let i=Math.max(Math.abs(e),Math.abs(t),Math.abs(n));return!(i>0)||!Number.isFinite(i)?.5:(e/i-t/i)/(n/i-t/i)}function Vf(e,t,n,r){return!e||e.kind===`extremeValue`?t:e.kind===`percent`&&Number.isFinite(e.value)?zf(n,r,e.value/100):e.kind===`number`&&Number.isFinite(e.value)?e.value:t}function Hf(e,t,n){let r=1/0,i=-1/0;for(let t of e)Number.isFinite(t)&&(r=Math.min(r,t),i=Math.max(i,t));(!Number.isFinite(r)||!Number.isFinite(i))&&(r=0,i=1);let a=Rf(n),o=Pf(Nf(t?.minColor,a.min)),s=t?.stopCount===3&&t.midColor?Pf(Nf(t.midColor,`5B9BD5`)):void 0,c=Pf(Nf(t?.maxColor,a.max)),l=Vf(t?.minPosition,r,r,i),u=Vf(t?.maxPosition,i,r,i),d=Vf(t?.midPosition,(l+u)/2,r,i),f=Math.min(l,u),p=Math.max(l,u);return{min:r,max:i,minColor:o,midColor:s,maxColor:c,color(e){return s?e<=d?Ff(Nf(o,o),Nf(s,s),Bf(e,f,d)):Ff(Nf(s,s),Nf(c,c),Bf(e,d,p)):Ff(Nf(o,o),Nf(c,c),Bf(e,f,p))}}}function Uf(e){let t=new Map;for(let n=0;n<e.rows.length;n++){let r=e.rows[n];if(!Number.isFinite(r.value))continue;let i=Mf(r.label,r.entityId);if(!i)continue;let a=t.get(i)??0,o=r.value,s=a+o,c=Number.isFinite(s)?s:a>0&&o>0?Number.MAX_VALUE:a<0&&o<0?-Number.MAX_VALUE:0;t.set(i,c)}return t}function Wf(e,t,n,r,i){if(!t.title&&!t.titlePresent)return;let a=t.titleFontFace||t.themeMajorFontLatin||`sans-serif`;e.font=`${t.titleFontBold??!0?`bold `:``}${r}px ${JSON.stringify(a)}`,e.fillStyle=t.titleFontColor?`#${t.titleFontColor}`:`#333333`,e.textAlign=`center`,e.textBaseline=`top`,e.fillText(t.title??``,n.x+n.w/2,n.y+i)}function Gf(e,t,n,r,i,a,o,s){let c=t.series[0]?.name??``,l=Math.max(8,(t.legendFontSizeHpt??900)/100*s);e.font=`${t.legendFontBold?`bold `:``}${l}px ${JSON.stringify(t.legendFontFace||t.themeMinorFontLatin||`sans-serif`)}`,e.fillStyle=t.legendFontColor?`#${t.legendFontColor}`:`#595959`,e.textAlign=`center`,e.textBaseline=`top`,c&&e.fillText(c,r+a/2,i);let u=Math.min(a*.58,240),d=Math.max(6,Math.min(12,o*.25)),f=r+(a-u)/2,p=i+(c?l+2:0),m=e.createLinearGradient(f,0,f+u,0);m.addColorStop(0,n.minColor),n.midColor&&m.addColorStop(.5,n.midColor),m.addColorStop(1,n.maxColor),e.fillStyle=m,e.fillRect(f,p,u,d),e.fillStyle=t.legendFontColor?`#${t.legendFontColor}`:`#595959`,e.textBaseline=`top`,e.textAlign=`left`;let h=t.series[0]?.valFormatCode??null;e.fillText(yt(n.min,h,t.date1904),f,p+d+2),e.textAlign=`right`,e.fillText(yt(n.max,h,t.date1904),f+u,p+d+2)}function Kf(e,t,n,r){e.fillStyle=`#666666`,e.font=`${Math.max(9,9*n)}px sans-serif`,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(r,t.x+t.w/2,t.y+t.h/2)}function qf(e,t,n,r){if(t.chartType!==`regionMap`||!t.chartexRegionMap)return!1;let i=t.chartexRegionMap;if(i.rows.length>Qf)return Kf(e,n,r,`(chart values exceed rendering limit)`),!0;if(i.geography?.cachePresent)return Kf(e,n,r,`(region map cache is unavailable offline)`),!0;let a=i.geography?.viewedRegionType;if(a!=null&&a!==`world`)return Kf(e,n,r,`(region map detail is unavailable offline)`),!0;let o=Uf(i),s=Hf([...o.values()],i.colors,t.chartexAccents?.[0]),c=_e(t,n.h,r,.02,.015);Wf(e,t,n,c.fontPx,c.topPad);let l=t.showLegend?Math.max(32,n.h*.16):0,u=n.w*.03,d=n.h*.035,f={x:n.x+u,y:n.y+c.bandH+l,w:Math.max(1,n.w-u*2),h:Math.max(1,n.h-c.bandH-l-d)};t.showLegend&&Gf(e,t,s,n.x,n.y+c.bandH,n.w,l,r);let p=i.geography?.projectionType,m=1/0,h=1/0,g=-1/0,_=-1/0;for(let e of Df)for(let t of e.g)for(let e of t)for(let t of e){let e=Af(t,p);m=Math.min(m,e.x),g=Math.max(g,e.x),h=Math.min(h,e.y),_=Math.max(_,e.y)}let v=Math.min(f.w/Math.max(Number.MIN_VALUE,g-m),f.h/Math.max(Number.MIN_VALUE,_-h)),y=f.x+(f.w-(g-m)*v)/2-m*v,b=f.y+(f.h-(_-h)*v)/2-h*v,x=e=>{let t=Af(e,p);return{x:y+t.x*v,y:b+t.y*v}},S=new Map;e.lineWidth=Math.max(.35,.55*r),e.strokeStyle=`#FFFFFF`;for(let t of Df){e.beginPath();let n={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};for(let r of t.g)for(let t of r){let r;for(let i=0;i<t.length;i++){let a=t[i],o=x(a);n.minX=Math.min(n.minX,o.x),n.maxX=Math.max(n.maxX,o.x),n.minY=Math.min(n.minY,o.y),n.maxY=Math.max(n.maxY,o.y),i===0||r&&Math.abs(a[0]-r[0])>180?e.moveTo(o.x,o.y):e.lineTo(o.x,o.y),r=a}e.closePath()}e.fillStyle=o.has(t)?s.color(o.get(t)):`#E0E0E0`,e.fill(`evenodd`),e.stroke(),S.set(t,n)}if(i.regionLabelLayout&&i.regionLabelLayout!==`none`){e.font=`${Math.max(7,(t.dataLabelFontSizeHpt??800)/100*r)}px ${JSON.stringify(t.dataLabelFontFace||t.themeMinorFontLatin||`sans-serif`)}`,e.fillStyle=t.dataLabelFontColor?`#${t.dataLabelFontColor}`:`#404040`,e.textAlign=`center`,e.textBaseline=`middle`;for(let t of i.rows){let n=Mf(t.label,t.entityId),r=n?S.get(n):void 0;if(!n||!r||!t.label)continue;let a=x(n.l),o=e.measureText(t.label).width<=Math.max(0,r.maxX-r.minX-4);(i.regionLabelLayout===`showAll`||o)&&e.fillText(t.label,a.x,a.y)}}return i.geography?.attribution&&(e.font=`${Math.max(7,7*r)}px sans-serif`,e.fillStyle=`#777777`,e.textAlign=`right`,e.textBaseline=`bottom`,e.fillText(i.geography.attribution,n.x+n.w-4,n.y+n.h-2)),!0}var Jf,Yf,Xf,Zf,Qf,$f,ep,tp,np,rp,ip=t((()=>{Fe(),Dt(),Of(),Jf=`ooxml-region-map-natural-earth-v1`,Yf=[1,.9986,.9954,.99,.9822,.973,.96,.9427,.9216,.8962,.8679,.835,.7986,.7597,.7186,.6732,.6213,.5722,.5322],Xf=[0,.062,.124,.186,.248,.31,.372,.434,.4958,.5571,.6176,.6769,.7346,.7903,.8435,.8936,.9394,.9761,1],Zf=e=>e*Math.PI/180,Qf=1e4,$f=new Map,ep=new Map,tp=new Map,np=new Map;for(let e of Df)if($f.set(jf(e.n),e),e.a2&&ep.set(jf(e.a2),e),e.a3&&tp.set(jf(e.a3),e),e.p){let t=jf(e.p);np.has(t)||np.set(t,e)}rp={unitedstatesofamerica:`United States`,usa:`United States`,uk:`United Kingdom`,russia:`Russian Federation`,southkorea:`Republic of Korea`,northkorea:`Dem. Rep. Korea`,czechia:`Czech Republic`,ivorycoast:`Côte d'Ivoire`,drcongo:`Democratic Republic of the Congo`,congodemocraticrepublic:`Democratic Republic of the Congo`}}));async function ap(e){return gl(e),op(e)}async function op(e){switch(e.builtin){case`math`:{let t=await Promise.resolve().then(()=>(Ku(),zu));return Object.freeze({loadMathJax:()=>t.loadMathJaxFromResolvedAsset(e.engineAssetUrl),mathMLToSvg:n=>t.mathMLToSvgFromResolvedAsset(n,e.engineAssetUrl)})}case`threeD`:{let e=await Promise.resolve().then(()=>(Ef(),Ad));return Object.freeze({render:e.renderSimpleThreeDChart})}case`regionMap`:{let e=await Promise.resolve().then(()=>(ip(),kf));return Object.freeze({render:e.renderRegionMapChart})}}}function sp(e,t,n){if(typeof t!=`object`||!t)throw TypeError(`Worker ${e} renderer export must be an object`);let r=t;for(let t of n)if(typeof r[t]!=`function`)throw TypeError(`Worker ${e} renderer must implement ${t}()`);return t}async function cp(e){let[t,n,r]=await Promise.all([e?.math?ap(e.math):void 0,e?.threeD?ap(e.threeD):void 0,e?.regionMap?ap(e.regionMap):void 0]);return Object.freeze({...t?{math:sp(`math`,t,[`loadMathJax`,`mathMLToSvg`])}:{},...n?{threeD:sp(`threeD`,n,[`render`])}:{},...r?{regionMap:sp(`regionMap`,r,[`render`])}:{}})}Object.freeze({maxArchiveEntryBytes:134217728,maxTotalInflatedBytes:268435456,maxArchiveEntries:4096});function lp(e){return[e.maxArchiveEntryBytes===null?0n:BigInt(e.maxArchiveEntryBytes),e.maxTotalInflatedBytes===null?0n:BigInt(e.maxTotalInflatedBytes),e.maxArchiveEntries===null?0n:BigInt(e.maxArchiveEntries)]}const up=`ooxml-pull-v1`;function dp(e,t){if(!Number.isSafeInteger(e)||e<=0)throw RangeError(`${t} must be a positive safe integer`)}function fp(e){if(!(typeof e==`string`&&e.length>0||typeof e==`number`&&Number.isSafeInteger(e)&&e>0))throw RangeError(`session id must be a non-empty string or positive safe integer`)}var pp=class{bridge;options;sequence=0;pulling=!1;outstanding=!1;ending=!1;completed=!1;lifecyclePromise;usage;orphanedRequestIds=new Set;transferDisposers=new Set;constructor(e,t){fp(t.sessionId),dp(t.operationId,`operation id`),dp(t.generation,`generation`),dp(t.maxByteCredit,`max byte credit`),t.cancelGraceMs!==void 0&&dp(t.cancelGraceMs,`cancel grace`),this.bridge=e,this.options=t}async pull(e,t){if(this.validateCredit(e),this.ending||this.completed)throw Error(`pull session is closed`);if(this.pulling)throw Error(`a pull request is already in flight`);if(this.outstanding)throw Error(`acknowledge the current chunk before the next pull`);this.pulling=!0;let n=this.sequence;try{let r=await this.request(t=>({protocol:up,kind:`pull`,...this.identity(),requestId:t,sequence:n,byteCredit:e}),t);if(this.validateResponseIdentity(r),r.usage&&(this.usage=r.usage),r.kind===`error`)throw Lu(r.error);if(r.kind!==`chunk`)throw Error(`expected chunk response, received ${r.kind}`);if(this.ending)throw this.disposePayload(r.payload),Error(`pull session is closed`);try{this.validateChunk(r,n,e)}catch(e){throw this.disposePayload(r.payload),e}return this.outstanding=!0,this.makeChunk(r)}catch(e){throw!hu(e)&&!this.ending&&!this.completed&&this.cancel(`protocol-error`).catch(()=>void 0),e}finally{this.pulling=!1}}cancel(e=`closed`,t){return this.lifecyclePromise?this.lifecyclePromise:(this.ending=!0,this.disposeAllTransferred(),this.lifecyclePromise=this.lifecycleControl(this.control(`cancel`,t,t=>({protocol:up,kind:`cancel`,...this.identity(),requestId:t,reason:e}))),this.lifecyclePromise)}close(e){return this.lifecyclePromise?this.lifecyclePromise:(this.ending=!0,this.disposeAllTransferred(),this.lifecyclePromise=this.lifecycleControl(this.control(`close`,e,e=>({protocol:up,kind:`close`,...this.identity(),requestId:e}))),this.lifecyclePromise)}get usageCheckpoint(){return this.usage}makeChunk(e){let t=!1,n,r,i=()=>{t||(t=!0,this.transferDisposers.delete(i),this.disposePayload(e.payload))};return this.transferDisposers.add(i),{done:e.done,sequence:e.sequence,byteLength:e.byteLength,payload:e.payload,leaseId:e.leaseId,usage:e.usage,disposeTransferred:i,ack:t=>n||(this.ending?Promise.resolve():(n=this.control(`ack`,t,t=>({protocol:up,kind:`ack`,...this.identity(),requestId:t,sequence:e.sequence})).then(()=>{this.outstanding=!1,this.sequence++,e.done&&(this.completed=!0)}).catch(e=>{throw this.ending||this.cancel(`request-error`).catch(()=>void 0),e}),n)),release:t=>r||(e.leaseId===void 0||this.ending?Promise.resolve():(r=this.control(`release`,t,t=>({protocol:up,kind:`release`,...this.identity(),requestId:t,leaseId:e.leaseId})).catch(e=>{throw this.ending||this.cancel(`request-error`).catch(()=>void 0),e}),r))}}async control(e,t,n){let r=await this.request(n,t,e!==`cancel`&&e!==`close`);if(this.validateResponseIdentity(r),r.usage&&(this.usage=r.usage),r.kind===`error`){if(r.error.code===`ooxml-stale-lifecycle`&&(e===`cancel`||e===`close`)){this.forgetLifecycleOrphans();return}throw Lu(r.error)}if(r.kind!==`accepted`||r.command!==e)throw Error(`expected ${e} acceptance`);(e===`cancel`||e===`close`)&&this.forgetLifecycleOrphans()}request(e,t,n=!0){return this.bridge.request(e,void 0,{timeoutMs:n?t?.timeoutMs??this.options.timeoutMs:!1,signal:t?.signal,onOrphanedResponse:e=>{e.kind===`chunk`&&this.disposePayload(e.payload)},onCancel:(e,n)=>{this.orphanedRequestIds.add(e);try{t?.onCancel?.(e,n)}finally{!this.ending&&!this.completed&&this.cancel(n).catch(()=>void 0)}}})}identity(){return{sessionId:this.options.sessionId,operationId:this.options.operationId,generation:this.options.generation}}validateResponseIdentity(e){if(e.protocol!==`ooxml-pull-v1`||e.sessionId!==this.options.sessionId||e.operationId!==this.options.operationId||e.generation!==this.options.generation)throw e.kind===`chunk`&&this.disposePayload(e.payload),Error(`stale or mismatched pull session response`)}validateCredit(e){if(dp(e,`byte credit`),e>this.options.maxByteCredit)throw RangeError(`byte credit exceeds session maximum ${this.options.maxByteCredit}`)}validateChunk(e,t,n){if(e.sequence!==t)throw Error(`pull response sequence mismatch`);if(!Number.isSafeInteger(e.byteLength)||e.byteLength<0)throw RangeError(`chunk byte length must be a non-negative safe integer`);if(e.byteLength>n)throw RangeError(`chunk exceeds byte credit`);e.leaseId!==void 0&&dp(e.leaseId,`lease id`)}disposeAllTransferred(){for(let e of[...this.transferDisposers])e()}lifecycleControl(e){let t=this.options.cancelGraceMs??1e3,n,r=new Promise((e,r)=>{n=setTimeout(()=>{this.bridge.terminate(),r(Error(`worker did not accept lifecycle command within ${t}ms`))},t)});return Promise.race([e,r]).catch(e=>{throw this.bridge.terminate(),e}).finally(()=>{n!==void 0&&clearTimeout(n)})}forgetLifecycleOrphans(){this.bridge.forgetOrphaned(this.orphanedRequestIds),this.orphanedRequestIds.clear()}disposePayload(e){try{this.options.disposeTransferred?.(e)}catch{}}},mp=class{owner;queue=Promise.resolve();leases=new Map;retainedBytes=0;retainedCount=0;maxRetainedBytes;maxRetainedCount;cleanups=new Set;pendingFatalCleanups=[];poisonRunning=!1;fatal;constructor(e){this.maxRetainedBytes=e?.maxRetainedBytes??64*1024*1024,this.maxRetainedCount=e?.maxRetainedCount??256,dp(this.maxRetainedBytes,`max retained lease bytes`),dp(this.maxRetainedCount,`max retained lease count`)}enqueue(e){let t=this.queue.then(e,e);return this.queue=t.then(()=>void 0,()=>void 0),t}acquire(e){return this.owner===void 0?(this.owner=e,!0):this.owner===e}release(e){this.owner===e&&(this.owner=void 0)}retainLease(e,t,n){if(!Number.isSafeInteger(n)||n<0)throw RangeError(`retained lease bytes are invalid`);let r=this.leases.get(e)??new Map;if(r.has(t))throw Error(`driver returned a duplicate lease id`);if(this.retainedCount+1>this.maxRetainedCount)throw RangeError(`retained lease count exceeds limit`);if(this.retainedBytes+n>this.maxRetainedBytes)throw RangeError(`retained lease bytes exceed limit`);r.set(t,n),this.leases.set(e,r),this.retainedCount++,this.retainedBytes+=n}releaseLease(e,t){let n=this.leases.get(e),r=n?.get(t);r!==void 0&&(n?.delete(t),n?.size===0&&this.leases.delete(e),this.retainedCount--,this.retainedBytes-=r)}registerCleanup(e){return this.fatal?(this.poisonRunning?this.pendingFatalCleanups.push(e):this.enqueue(e).catch(()=>void 0),()=>void 0):(this.cleanups.add(e),()=>this.cleanups.delete(e))}get fatalError(){return this.fatal}get registeredHostCount(){return this.cleanups.size}async poison(e){if(this.fatal??=e,this.poisonRunning)return this.fatal;this.poisonRunning=!0,this.pendingFatalCleanups.push(...this.cleanups);try{let e;for(;(e=this.pendingFatalCleanups.shift())!==void 0;)await e().catch(()=>void 0)}finally{this.poisonRunning=!1}return this.fatal}},hp=class{options;coordinator;coordinatorOwner=Symbol(`pull-session-host`);unregisterCleanup;sequence=0;unacked;leases=new Map;activeDriverLeases=new Set;nextWireLeaseId;cancelRequested=!1;cancelComplete=!1;closeRequested=!1;closeComplete=!1;driverCancelComplete=!1;driverCloseComplete=!1;completed=!1;constructor(e){fp(e.sessionId),dp(e.operationId,`operation id`),dp(e.generation,`generation`),dp(e.maxByteCredit,`max byte credit`),e.wireLeaseIdStart!==void 0&&dp(e.wireLeaseIdStart,`wire lease id start`),this.options=e,this.coordinator=e.coordinator,this.nextWireLeaseId=e.wireLeaseIdStart??1,this.unregisterCleanup=this.coordinator.registerCleanup(()=>this.forceFatalCleanup())}dispatch(e,t){return this.coordinator.enqueue(async()=>{let n=await this.execute(e);try{t(n.response,n.transfer)}catch(e){throw await this.rollbackFailedPost(n),e}})}async rollbackFailedPost(e){let t=e.response;if(t.kind===`chunk`){let n=t.leaseId===void 0?void 0:this.leases.get(t.leaseId);try{await this.options.driver.disposeInvalidChunk?.({payload:t.payload,byteLength:t.byteLength,done:t.done,leaseId:n?.driverLeaseId,retainedBytes:n?.retainedBytes,transfer:e.transfer})}catch{}}this.unacked=void 0,this.coordinator.release(this.coordinatorOwner);for(let[e,t]of[...this.leases])try{await this.options.driver.releaseLease?.(t.driverLeaseId)}catch{}finally{this.leases.delete(e),this.activeDriverLeases.delete(t.driverLeaseId),this.coordinator.releaseLease(this.coordinatorOwner,e)}if(this.cancelRequested=!0,!this.driverCancelComplete)try{await this.options.driver.cancel?.(),this.driverCancelComplete=!0}catch{}this.unregisterCleanup()}async execute(e){try{if(this.isStaleLifecycle(e)){let t=e.kind===`cancel`?`cancel`:`close`;return this.sameOperationIdentity(e)?{response:this.accepted(e,t,!0)}:{response:this.errorResponse(e,{message:`stale lifecycle targets another session or operation`,errorName:`PullSessionProtocolError`,code:`ooxml-stale-lifecycle`})}}this.validateCommandIdentity(e);let t=this.coordinator.fatalError;if(t)return e.kind===`pull`?{response:this.errorResponse(e,t)}:(e.kind===`cancel`?await this.cancel():e.kind===`close`?await this.close():e.kind===`release`&&await this.release(e.leaseId),{response:this.accepted(e,e.kind)});switch(e.kind){case`pull`:return await this.pull(e);case`ack`:return await this.ack(e.sequence),{response:this.accepted(e,`ack`)};case`release`:return await this.release(e.leaseId),{response:this.accepted(e,`release`)};case`cancel`:return await this.cancel(),{response:this.accepted(e,`cancel`)};case`close`:return await this.close(),{response:this.accepted(e,`close`)}}}catch(t){let n=Fu(t);return n.code===`ooxml-resource-limit`&&(n=await this.coordinator.poison(n)),{response:this.errorResponse(e,n)}}}async pull(e){if(this.closeRequested||this.cancelRequested||this.completed)throw Error(`pull session is closed`);if(this.unacked)throw Error(`previous chunk is not acknowledged`);if(!Number.isSafeInteger(e.sequence)||e.sequence<0||e.sequence!==this.sequence)throw Error(`pull command sequence mismatch`);if(this.validateHostCredit(e.byteCredit),!this.coordinator.acquire(this.coordinatorOwner))throw Error(`another operation has an unacknowledged package chunk`);let t;try{t=await this.options.driver.pull(e.byteCredit)}catch(e){throw this.coordinator.release(this.coordinatorOwner),e}let n=!1,r=!1,i,a;try{let o=this.options.driver.measureChunk(t),s=this.arrayBufferTransferBytes(t.transfer);if(o<s)throw RangeError(`measured chunk bytes are below ArrayBuffer transfer bytes`);if(a=Math.max(o,s),t.leaseId!==void 0){if(dp(t.leaseId,`lease id`),t.retainedBytes===void 0)throw Error(`retained lease bytes are required`);if(this.activeDriverLeases.has(t.leaseId))throw r=!0,Error(`driver returned an active duplicate lease id`);i=this.allocateWireLeaseId(),this.coordinator.retainLease(this.coordinatorOwner,i,t.retainedBytes),this.leases.set(i,{driverLeaseId:t.leaseId,retainedBytes:t.retainedBytes}),this.activeDriverLeases.add(t.leaseId),n=!0}else if(t.retainedBytes!==void 0)throw Error(`retained lease bytes require a lease id`);if(!Number.isSafeInteger(a)||a<0)throw RangeError(`host chunk byte length must be a non-negative safe integer`);if(a>e.byteCredit)throw RangeError(`host chunk exceeds byte credit`)}catch(e){let a;try{await this.options.driver.disposeInvalidChunk?.(t)}catch(e){a=e}if(n&&i!==void 0)try{await this.release(i)}catch(e){a??=e}else if(t.leaseId!==void 0&&!r)try{await this.options.driver.releaseLease?.(t.leaseId)}catch(e){a??=e}if(r)try{await this.cancel()}catch(e){a??=e}throw this.coordinator.release(this.coordinatorOwner),a||e}return this.unacked={sequence:this.sequence,done:t.done},{response:{kind:`chunk`,protocol:up,...this.identity(),requestId:e.requestId,sequence:this.sequence,byteLength:a,done:t.done,payload:t.payload,leaseId:i,usage:this.resourceUsage()},transfer:t.transfer}}async ack(e){if(!Number.isSafeInteger(e)||e<0)throw RangeError(`invalid ack sequence`);if(e<this.sequence)return;if(!this.unacked||e!==this.sequence)throw Error(`ack sequence mismatch`);let t=this.unacked.done;await this.options.driver.acknowledge?.(e),this.unacked=void 0,this.coordinator.release(this.coordinatorOwner),this.sequence++,t&&(this.completed=!0,this.maybeUnregisterCompleted())}async release(e){dp(e,`wire lease id`);let t=this.leases.get(e);t&&(await this.options.driver.releaseLease?.(t.driverLeaseId),this.leases.delete(e),this.activeDriverLeases.delete(t.driverLeaseId),this.coordinator.releaseLease(this.coordinatorOwner,e),this.maybeUnregisterCompleted())}async cancel(){if(this.cancelComplete)return;this.cancelRequested=!0,this.unacked=void 0,this.coordinator.release(this.coordinatorOwner);let e;try{await this.releaseAllLeases()}catch(t){e=t}if(!this.driverCancelComplete)try{await this.options.driver.cancel?.(),this.driverCancelComplete=!0}catch(t){e??=t}if(e)throw e;this.cancelComplete=!0,this.unregisterCleanup()}async close(){if(this.closeComplete)return;this.closeRequested=!0,this.unacked=void 0,this.coordinator.release(this.coordinatorOwner);let e;try{await this.releaseAllLeases()}catch(t){e=t}if(!this.driverCloseComplete)try{await this.options.driver.close?.(),this.driverCloseComplete=!0}catch(t){e??=t}if(e)throw e;this.closeComplete=!0,this.unregisterCleanup()}async releaseAllLeases(){let e;for(let t of[...this.leases.keys()])try{await this.release(t)}catch(t){e??=t}if(e)throw e}validateCommandIdentity(e){if(e.protocol!==`ooxml-pull-v1`||e.sessionId!==this.options.sessionId||e.operationId!==this.options.operationId||e.generation!==this.options.generation||!Number.isSafeInteger(e.requestId)||e.requestId<=0)throw Error(`stale or mismatched pull session command`)}validateHostCredit(e){if(dp(e,`byte credit`),e>this.options.maxByteCredit)throw RangeError(`byte credit exceeds host maximum`)}accepted(e,t,n=!1){return{kind:`accepted`,protocol:up,...n?{sessionId:e.sessionId,operationId:e.operationId,generation:e.generation}:this.identity(),requestId:e.requestId,command:t,usage:this.resourceUsage()}}identity(){return{sessionId:this.options.sessionId,operationId:this.options.operationId,generation:this.options.generation}}isStaleLifecycle(e){return(e.kind===`cancel`||e.kind===`close`)&&e.protocol===`ooxml-pull-v1`&&Number.isSafeInteger(e.requestId)&&e.requestId>0&&Number.isSafeInteger(e.generation)&&e.generation>0&&e.generation<this.options.generation}sameOperationIdentity(e){return e.sessionId===this.options.sessionId&&e.operationId===this.options.operationId}errorResponse(e,t){return{kind:`error`,protocol:up,sessionId:e.sessionId,operationId:e.operationId,generation:e.generation,requestId:e.requestId,error:t,usage:this.errorResourceUsage()}}async forceFatalCleanup(){this.cancelRequested=!0,this.unacked=void 0,this.coordinator.release(this.coordinatorOwner);let e;for(let t of[...this.leases.keys()])try{await this.release(t)}catch(t){e??=t}if(!this.driverCancelComplete)try{await this.options.driver.cancel?.(),this.driverCancelComplete=!0}catch(t){e??=t}if(e)throw e;this.unregisterCleanup()}allocateWireLeaseId(){if(!Number.isSafeInteger(this.nextWireLeaseId)||this.nextWireLeaseId<=0)throw RangeError(`wire lease id space exhausted`);return this.nextWireLeaseId++}arrayBufferTransferBytes(e){let t=0;for(let n of e??[])if(n instanceof ArrayBuffer&&(t+=n.byteLength,!Number.isSafeInteger(t)))throw RangeError(`ArrayBuffer transfer bytes overflow`);return t}maybeUnregisterCompleted(){this.completed&&this.leases.size===0&&this.unregisterCleanup()}resourceUsage(){return this.options.driver.resourceUsage?.()}errorResourceUsage(){try{return this.resourceUsage()}catch{return}}};const gp=[`L`,`R`,`AL`,`EN`,`ES`,`ET`,`AN`,`CS`,`NSM`,`BN`,`B`,`S`,`WS`,`ON`,`LRE`,`LRO`,`RLE`,`RLO`,`PDF`,`LRI`,`RLI`,`FSI`,`PDI`],_p=[0,9,10,11,12,13,14,28,31,32,33,35,38,43,44,45,46,48,58,59,65,91,97,123,127,133,134,160,161,162,166,170,171,173,174,176,178,180,181,182,185,186,187,192,215,216,247,248,697,699,706,720,722,736,741,750,751,768,880,884,886,894,895,900,902,903,904,1014,1015,1155,1162,1418,1419,1421,1423,1424,1425,1470,1471,1472,1473,1475,1476,1478,1479,1480,1536,1542,1544,1545,1547,1548,1549,1550,1552,1563,1611,1632,1642,1643,1645,1648,1649,1750,1757,1758,1759,1765,1767,1769,1770,1774,1776,1786,1809,1810,1840,1867,1958,1969,1984,2027,2036,2038,2042,2045,2046,2070,2074,2075,2084,2085,2088,2089,2094,2137,2140,2144,2192,2194,2199,2208,2250,2274,2275,2307,2362,2363,2364,2365,2369,2377,2381,2382,2385,2392,2402,2404,2433,2434,2492,2493,2497,2501,2509,2510,2530,2532,2546,2548,2555,2556,2558,2559,2561,2563,2620,2621,2625,2627,2631,2633,2635,2638,2641,2642,2672,2674,2677,2678,2689,2691,2748,2749,2753,2758,2759,2761,2765,2766,2786,2788,2801,2802,2810,2816,2817,2818,2876,2877,2879,2880,2881,2885,2893,2894,2901,2903,2914,2916,2946,2947,3008,3009,3021,3022,3059,3065,3066,3067,3072,3073,3076,3077,3132,3133,3134,3137,3142,3145,3146,3150,3157,3159,3170,3172,3192,3199,3201,3202,3260,3261,3276,3278,3298,3300,3328,3330,3387,3389,3393,3397,3405,3406,3426,3428,3457,3458,3530,3531,3538,3541,3542,3543,3633,3634,3636,3643,3647,3648,3655,3663,3761,3762,3764,3773,3784,3791,3864,3866,3893,3894,3895,3896,3897,3898,3902,3953,3967,3968,3973,3974,3976,3981,3992,3993,4029,4038,4039,4141,4145,4146,4152,4153,4155,4157,4159,4184,4186,4190,4193,4209,4213,4226,4227,4229,4231,4237,4238,4253,4254,4957,4960,5008,5018,5120,5121,5760,5761,5787,5789,5906,5909,5938,5940,5970,5972,6002,6004,6068,6070,6071,6078,6086,6087,6089,6100,6107,6108,6109,6110,6128,6138,6144,6155,6158,6159,6160,6277,6279,6313,6314,6432,6435,6439,6441,6450,6451,6457,6460,6464,6465,6468,6470,6622,6656,6679,6681,6683,6684,6742,6743,6744,6751,6752,6753,6754,6755,6757,6765,6771,6781,6783,6784,6832,6878,6880,6892,6912,6916,6964,6965,6966,6971,6972,6973,6978,6979,7019,7028,7040,7042,7074,7078,7080,7082,7083,7086,7142,7143,7144,7146,7149,7150,7151,7154,7212,7220,7222,7224,7376,7379,7380,7393,7394,7401,7405,7406,7412,7413,7416,7418,7616,7680,8125,8126,8127,8130,8141,8144,8157,8160,8173,8176,8189,8191,8192,8203,8206,8207,8208,8232,8233,8234,8235,8236,8237,8238,8239,8240,8245,8260,8261,8287,8288,8294,8295,8296,8297,8298,8304,8305,8308,8314,8316,8319,8320,8330,8332,8335,8352,8400,8433,8448,8450,8451,8455,8456,8458,8468,8469,8470,8473,8478,8484,8485,8486,8487,8488,8489,8490,8494,8495,8506,8508,8512,8517,8522,8526,8528,8544,8585,8588,8592,8722,8723,8724,9014,9083,9109,9110,9258,9280,9291,9312,9352,9372,9450,9900,9901,10240,10496,11124,11126,11264,11493,11499,11503,11506,11513,11520,11647,11648,11744,11776,11870,11904,11930,11931,12020,12032,12246,12272,12288,12289,12293,12296,12321,12330,12334,12336,12337,12342,12344,12349,12352,12441,12443,12445,12448,12449,12539,12540,12736,12774,12783,12784,12829,12831,12880,12896,12924,12927,12977,12992,13004,13008,13175,13179,13278,13280,13311,13312,19904,19968,42128,42183,42509,42512,42607,42611,42612,42622,42624,42654,42656,42736,42738,42752,42786,42888,42889,43010,43011,43014,43015,43019,43020,43045,43047,43048,43052,43053,43064,43066,43124,43128,43204,43206,43232,43250,43263,43264,43302,43310,43335,43346,43392,43395,43443,43444,43446,43450,43452,43454,43493,43494,43561,43567,43569,43571,43573,43575,43587,43588,43596,43597,43644,43645,43696,43697,43698,43701,43703,43705,43710,43712,43713,43714,43756,43758,43766,43767,43882,43884,44005,44006,44008,44009,44013,44014,64285,64286,64287,64297,64298,64336,64451,64467,64830,64848,64912,64914,64968,64976,65008,65021,65024,65040,65050,65056,65072,65104,65105,65106,65107,65108,65109,65110,65119,65120,65122,65124,65127,65128,65129,65131,65132,65136,65279,65280,65281,65283,65286,65291,65292,65293,65294,65296,65306,65307,65313,65339,65345,65371,65382,65504,65506,65509,65511,65512,65519,65520,65529,65534,65536,65793,65794,65856,65933,65936,65949,65952,65953,66045,66046,66272,66273,66300,66422,66427,67584,67871,67872,68097,68100,68101,68103,68108,68112,68152,68155,68159,68160,68325,68327,68409,68416,68864,68900,68904,68912,68922,68928,68938,68969,68974,68975,69216,69247,69291,69293,69312,69328,69337,69370,69376,69424,69446,69457,69488,69506,69510,69632,69633,69634,69688,69703,69714,69734,69744,69745,69747,69749,69759,69762,69811,69815,69817,69819,69826,69827,69888,69891,69927,69932,69933,69941,70003,70004,70016,70018,70070,70079,70089,70093,70095,70096,70191,70194,70196,70197,70198,70200,70206,70207,70209,70210,70367,70368,70371,70379,70400,70402,70459,70461,70464,70465,70502,70509,70512,70517,70587,70593,70606,70607,70608,70609,70610,70611,70625,70627,70712,70720,70722,70725,70726,70727,70750,70751,70835,70841,70842,70843,70847,70849,70850,70852,71090,71094,71100,71102,71103,71105,71132,71134,71219,71227,71229,71230,71231,71233,71264,71277,71339,71340,71341,71342,71344,71350,71351,71352,71453,71454,71455,71456,71458,71462,71463,71468,71727,71736,71737,71739,71995,71997,71998,71999,72003,72004,72148,72152,72154,72156,72160,72161,72193,72199,72201,72203,72243,72249,72251,72255,72263,72264,72273,72279,72281,72284,72330,72343,72344,72346,72544,72545,72546,72549,72550,72551,72752,72759,72760,72766,72850,72872,72874,72881,72882,72884,72885,72887,73009,73015,73018,73019,73020,73022,73023,73030,73031,73032,73104,73106,73109,73110,73111,73112,73459,73461,73472,73474,73526,73531,73536,73537,73538,73539,73562,73563,73685,73693,73697,73714,78912,78913,78919,78934,90398,90410,90413,90416,92912,92917,92976,92983,94031,94032,94095,94099,94178,94179,94180,94181,113821,113823,113824,113828,117760,117974,118e3,118010,118013,118016,118452,118458,118481,118496,118513,118528,118574,118576,118599,119143,119146,119155,119163,119171,119173,119180,119210,119214,119273,119275,119296,119362,119365,119366,119552,119639,120513,120514,120539,120540,120571,120572,120597,120598,120629,120630,120655,120656,120687,120688,120713,120714,120745,120746,120771,120772,120782,120832,121344,121399,121403,121453,121461,121462,121476,121477,121499,121504,121505,121520,122880,122887,122888,122905,122907,122914,122915,122917,122918,122923,123023,123024,123184,123191,123566,123567,123628,123632,123647,123648,124140,124144,124398,124400,124643,124644,124646,124647,124654,124656,124661,124662,124928,125136,125143,125252,125259,126064,126144,126208,126288,126464,126704,126706,126720,126976,127020,127024,127124,127136,127151,127153,127168,127169,127184,127185,127222,127232,127243,127248,127279,127280,127338,127344,127405,127406,127584,127590,127744,128729,128732,128749,128752,128765,128768,128986,128992,129004,129008,129009,129024,129036,129040,129096,129104,129114,129120,129160,129168,129198,129200,129212,129216,129218,129232,129241,129280,129624,129632,129646,129648,129661,129664,129675,129678,129735,129736,129737,129741,129757,129759,129771,129775,129785,129792,129939,129940,130032,130042,130043,131070,131072,196606,196608,262142,262144,327678,327680,393214,393216,458750,458752,524286,524288,589822,589824,655358,655360,720894,720896,786430,786432,851966,851968,917502,917760,918e3,921600,983038,983040,1048574,1048576,1114110],vp=[9,11,10,11,12,10,9,10,11,12,13,5,13,4,7,4,7,3,7,13,0,13,0,13,9,10,9,7,13,5,13,0,13,9,13,5,3,13,0,13,3,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,8,0,13,0,13,0,13,0,13,0,13,0,8,0,13,0,13,5,1,8,1,8,1,8,1,8,1,8,1,6,13,2,5,2,7,2,13,8,2,8,6,5,6,2,8,2,8,6,13,8,2,8,13,8,2,3,2,8,2,8,2,8,2,1,8,1,13,1,8,1,8,1,8,1,8,1,8,1,8,1,2,6,2,8,2,8,6,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,5,0,5,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,5,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,13,5,13,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,13,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,5,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,13,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,13,0,13,0,12,0,13,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,5,0,8,0,13,0,13,8,9,8,0,8,0,8,0,8,0,8,0,8,0,8,0,13,0,13,0,13,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,13,0,13,0,13,0,13,0,13,0,13,0,12,9,0,1,13,12,10,14,16,18,15,17,7,5,13,7,13,12,9,19,20,21,22,9,3,0,3,4,13,0,3,4,13,0,5,8,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,5,0,13,0,13,0,13,0,13,0,13,0,13,4,5,13,0,13,0,13,0,13,0,13,3,0,13,0,13,0,13,0,13,0,13,0,8,0,13,0,8,0,8,13,0,13,0,13,0,13,0,13,12,13,0,13,0,8,0,13,0,13,0,13,0,8,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,8,13,8,13,0,8,0,8,0,13,0,13,0,8,0,8,0,8,0,8,0,13,8,0,5,0,13,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,13,0,8,0,8,0,8,0,1,8,1,4,1,2,13,2,13,2,13,2,13,9,2,13,8,13,0,8,13,7,13,7,0,13,7,13,5,13,4,13,0,13,5,13,0,2,9,0,13,5,13,4,7,4,7,3,7,13,0,13,0,13,0,5,13,5,0,13,0,9,13,9,0,13,0,13,0,13,0,13,0,8,0,8,3,0,8,0,1,13,1,8,1,8,1,8,1,8,1,8,1,8,1,13,1,2,8,2,6,2,6,1,8,13,1,6,1,8,1,2,13,2,8,1,2,8,2,1,8,1,0,8,0,8,0,13,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,13,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,13,5,13,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,13,0,8,0,8,0,9,0,13,0,3,13,0,13,0,13,0,13,0,8,0,8,0,8,0,9,8,0,8,0,8,0,13,0,13,8,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,3,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,5,0,8,0,8,0,8,0,8,0,8,0,8,0,1,8,1,8,1,2,1,2,1,2,13,2,1,13,0,13,0,13,0,13,0,13,0,13,0,3,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,0,13,3,13,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,8,9,0,9,0,9,0,9],yp=[40,41,41,40,60,62,62,60,91,93,93,91,123,125,125,123,171,187,187,171,3898,3899,3899,3898,3900,3901,3901,3900,5787,5788,5788,5787,8249,8250,8250,8249,8261,8262,8262,8261,8317,8318,8318,8317,8333,8334,8334,8333,8712,8715,8713,8716,8714,8717,8715,8712,8716,8713,8717,8714,8725,10741,8735,11262,8736,10659,8737,10651,8738,10656,8740,10990,8764,8765,8765,8764,8771,8909,8773,8780,8780,8773,8786,8787,8787,8786,8788,8789,8789,8788,8804,8805,8805,8804,8806,8807,8807,8806,8808,8809,8809,8808,8810,8811,8811,8810,8814,8815,8815,8814,8816,8817,8817,8816,8818,8819,8819,8818,8820,8821,8821,8820,8822,8823,8823,8822,8824,8825,8825,8824,8826,8827,8827,8826,8828,8829,8829,8828,8830,8831,8831,8830,8832,8833,8833,8832,8834,8835,8835,8834,8836,8837,8837,8836,8838,8839,8839,8838,8840,8841,8841,8840,8842,8843,8843,8842,8847,8848,8848,8847,8849,8850,8850,8849,8856,10680,8866,8867,8867,8866,8870,10974,8872,10980,8873,10979,8875,10981,8880,8881,8881,8880,8882,8883,8883,8882,8884,8885,8885,8884,8886,8887,8887,8886,8888,10204,8905,8906,8906,8905,8907,8908,8908,8907,8909,8771,8912,8913,8913,8912,8918,8919,8919,8918,8920,8921,8921,8920,8922,8923,8923,8922,8924,8925,8925,8924,8926,8927,8927,8926,8928,8929,8929,8928,8930,8931,8931,8930,8932,8933,8933,8932,8934,8935,8935,8934,8936,8937,8937,8936,8938,8939,8939,8938,8940,8941,8941,8940,8944,8945,8945,8944,8946,8954,8947,8955,8948,8956,8950,8957,8951,8958,8954,8946,8955,8947,8956,8948,8957,8950,8958,8951,8968,8969,8969,8968,8970,8971,8971,8970,9001,9002,9002,9001,10088,10089,10089,10088,10090,10091,10091,10090,10092,10093,10093,10092,10094,10095,10095,10094,10096,10097,10097,10096,10098,10099,10099,10098,10100,10101,10101,10100,10179,10180,10180,10179,10181,10182,10182,10181,10184,10185,10185,10184,10187,10189,10189,10187,10197,10198,10198,10197,10204,8888,10205,10206,10206,10205,10210,10211,10211,10210,10212,10213,10213,10212,10214,10215,10215,10214,10216,10217,10217,10216,10218,10219,10219,10218,10220,10221,10221,10220,10222,10223,10223,10222,10627,10628,10628,10627,10629,10630,10630,10629,10631,10632,10632,10631,10633,10634,10634,10633,10635,10636,10636,10635,10637,10640,10638,10639,10639,10638,10640,10637,10641,10642,10642,10641,10643,10644,10644,10643,10645,10646,10646,10645,10647,10648,10648,10647,10651,8737,10656,8738,10659,8736,10660,10661,10661,10660,10664,10665,10665,10664,10666,10667,10667,10666,10668,10669,10669,10668,10670,10671,10671,10670,10680,8856,10688,10689,10689,10688,10692,10693,10693,10692,10703,10704,10704,10703,10705,10706,10706,10705,10708,10709,10709,10708,10712,10713,10713,10712,10714,10715,10715,10714,10728,10729,10729,10728,10741,8725,10744,10745,10745,10744,10748,10749,10749,10748,10795,10796,10796,10795,10797,10798,10798,10797,10804,10805,10805,10804,10812,10813,10813,10812,10852,10853,10853,10852,10873,10874,10874,10873,10875,10876,10876,10875,10877,10878,10878,10877,10879,10880,10880,10879,10881,10882,10882,10881,10883,10884,10884,10883,10885,10886,10886,10885,10887,10888,10888,10887,10889,10890,10890,10889,10891,10892,10892,10891,10893,10894,10894,10893,10895,10896,10896,10895,10897,10898,10898,10897,10899,10900,10900,10899,10901,10902,10902,10901,10903,10904,10904,10903,10905,10906,10906,10905,10907,10908,10908,10907,10909,10910,10910,10909,10911,10912,10912,10911,10913,10914,10914,10913,10918,10919,10919,10918,10920,10921,10921,10920,10922,10923,10923,10922,10924,10925,10925,10924,10927,10928,10928,10927,10929,10930,10930,10929,10931,10932,10932,10931,10933,10934,10934,10933,10935,10936,10936,10935,10937,10938,10938,10937,10939,10940,10940,10939,10941,10942,10942,10941,10943,10944,10944,10943,10945,10946,10946,10945,10947,10948,10948,10947,10949,10950,10950,10949,10951,10952,10952,10951,10953,10954,10954,10953,10955,10956,10956,10955,10957,10958,10958,10957,10959,10960,10960,10959,10961,10962,10962,10961,10963,10964,10964,10963,10965,10966,10966,10965,10974,8870,10979,8873,10980,8872,10981,8875,10988,10989,10989,10988,10990,8740,10999,11e3,11e3,10999,11001,11002,11002,11001,11262,8735,11778,11779,11779,11778,11780,11781,11781,11780,11785,11786,11786,11785,11788,11789,11789,11788,11804,11805,11805,11804,11808,11809,11809,11808,11810,11811,11811,11810,11812,11813,11813,11812,11814,11815,11815,11814,11816,11817,11817,11816,11861,11862,11862,11861,11863,11864,11864,11863,11865,11866,11866,11865,11867,11868,11868,11867,12296,12297,12297,12296,12298,12299,12299,12298,12300,12301,12301,12300,12302,12303,12303,12302,12304,12305,12305,12304,12308,12309,12309,12308,12310,12311,12311,12310,12312,12313,12313,12312,12314,12315,12315,12314,65113,65114,65114,65113,65115,65116,65116,65115,65117,65118,65118,65117,65124,65125,65125,65124,65288,65289,65289,65288,65308,65310,65310,65308,65339,65341,65341,65339,65371,65373,65373,65371,65375,65376,65376,65375,65378,65379,65379,65378],bp=[40,41,0,41,40,1,91,93,0,93,91,1,123,125,0,125,123,1,3898,3899,0,3899,3898,1,3900,3901,0,3901,3900,1,5787,5788,0,5788,5787,1,8261,8262,0,8262,8261,1,8317,8318,0,8318,8317,1,8333,8334,0,8334,8333,1,8968,8969,0,8969,8968,1,8970,8971,0,8971,8970,1,9001,9002,0,9002,9001,1,10088,10089,0,10089,10088,1,10090,10091,0,10091,10090,1,10092,10093,0,10093,10092,1,10094,10095,0,10095,10094,1,10096,10097,0,10097,10096,1,10098,10099,0,10099,10098,1,10100,10101,0,10101,10100,1,10181,10182,0,10182,10181,1,10214,10215,0,10215,10214,1,10216,10217,0,10217,10216,1,10218,10219,0,10219,10218,1,10220,10221,0,10221,10220,1,10222,10223,0,10223,10222,1,10627,10628,0,10628,10627,1,10629,10630,0,10630,10629,1,10631,10632,0,10632,10631,1,10633,10634,0,10634,10633,1,10635,10636,0,10636,10635,1,10637,10640,0,10638,10639,1,10639,10638,0,10640,10637,1,10641,10642,0,10642,10641,1,10643,10644,0,10644,10643,1,10645,10646,0,10646,10645,1,10647,10648,0,10648,10647,1,10712,10713,0,10713,10712,1,10714,10715,0,10715,10714,1,10748,10749,0,10749,10748,1,11810,11811,0,11811,11810,1,11812,11813,0,11813,11812,1,11814,11815,0,11815,11814,1,11816,11817,0,11817,11816,1,11861,11862,0,11862,11861,1,11863,11864,0,11864,11863,1,11865,11866,0,11866,11865,1,11867,11868,0,11868,11867,1,12296,12297,0,12297,12296,1,12298,12299,0,12299,12298,1,12300,12301,0,12301,12300,1,12302,12303,0,12303,12302,1,12304,12305,0,12305,12304,1,12308,12309,0,12309,12308,1,12310,12311,0,12311,12310,1,12312,12313,0,12313,12312,1,12314,12315,0,12315,12314,1,65113,65114,0,65114,65113,1,65115,65116,0,65116,65115,1,65117,65118,0,65118,65117,1,65288,65289,0,65289,65288,1,65339,65341,0,65341,65339,1,65371,65373,0,65373,65371,1,65375,65376,0,65376,65375,1,65378,65379,0,65379,65378,1];function xp(e){let t=0,n=_p.length-1;for(;t<n;){let r=t+n+1>>1;_p[r]<=e?t=r:n=r-1}return vp[t]}function Sp(e){return gp[xp(e)]}const Cp=(()=>{let e=new Map;for(let t=0;t<yp.length;t+=2)e.set(yp[t],yp[t+1]);return e})();function wp(e){return Cp.get(e)??null}const Tp=(()=>{let e=new Map;for(let t=0;t<bp.length;t+=3)e.set(bp[t],{pair:bp[t+1],type:bp[t+2]===0?`o`:`c`});return e})();function Ep(e){return Tp.get(e)??null}const Dp=e=>e===`RLE`||e===`LRE`||e===`RLO`||e===`LRO`||e===`PDF`||e===`BN`,Op=e=>e===`LRI`||e===`RLI`||e===`FSI`,kp=e=>e===`B`||e===`S`||e===`WS`||e===`ON`||e===`FSI`||e===`LRI`||e===`RLI`||e===`PDI`,Ap=e=>e&1?e+2:e+1,jp=e=>e&1?e+1:e+2;function Mp(e,t,n){let r=0;for(let i=t;i<n;i++){let t=e[i];if(Op(t))r++;else if(t===`PDI`)r>0&&r--;else if(r===0){if(t===`L`)return 0;if(t===`R`||t===`AL`)return 1}}return 0}function Np(e){let t=e.length,n=new Int32Array(t).fill(t),r=new Int32Array(t).fill(-1),i=[];for(let a=0;a<t;a++){let t=e[a];if(Op(t))i.push(a);else if(t===`PDI`&&i.length){let e=i.pop();n[e]=a,r[a]=e}}return{pdiOf:n,initOf:r}}function Pp(e,t,n){let r=e.length,i=Array(r).fill(t),a=e.slice(),o=[{level:t,override:`neutral`,isolate:!1}],s=0,c=0,l=0,u=()=>o[o.length-1];for(let d=0;d<r;d++){let r=e[d];switch(r){case`RLE`:case`LRE`:case`RLO`:case`LRO`:{i[d]=u().level;let e=r===`RLE`||r===`RLO`?Ap(u().level):jp(u().level);e<=125&&s===0&&c===0?o.push({level:e,override:r===`RLO`?`R`:r===`LRO`?`L`:`neutral`,isolate:!1}):s===0&&c++;break}case`RLI`:case`LRI`:case`FSI`:{i[d]=u().level;let t=u().override;t!==`neutral`&&(a[d]=t);let f;f=r===`RLI`?`R`:r===`LRI`?`L`:Mp(e,d+1,n[d])===1?`R`:`L`;let p=f===`R`?Ap(u().level):jp(u().level);p<=125&&s===0&&c===0?(l++,o.push({level:p,override:`neutral`,isolate:!0})):s++;break}case`PDI`:if(s>0)s--;else if(l>0){for(c=0;!u().isolate;)o.pop();o.pop(),l--}{i[d]=u().level;let e=u().override;e!==`neutral`&&(a[d]=e)}break;case`PDF`:i[d]=u().level,s>0||(c>0?c--:!u().isolate&&o.length>=2&&o.pop());break;case`B`:o.length=1,s=0,c=0,l=0,i[d]=t;break;case`BN`:i[d]=u().level;break;default:{i[d]=u().level;let e=u().override;e!==`neutral`&&(a[d]=e);break}}}return{levels:i,types:a}}function Fp(e){return e===9001?12296:e===9002?12297:e}function Ip(e,t,n,r,i,a){let o=e.length,s=[];for(let e=0;e<o;e++)n[e]||s.push(e);let c=[];for(let e=0;e<s.length;e++){let n=s[e];e===0||t[n]!==t[s[e-1]]?c.push([n]):c[c.length-1].push(n)}let l=new Map;for(let e of c)l.set(e[0],e);let u=e=>e&1?`R`:`L`,d=[];for(let s of c){let c=s[0];if(e[c]===`PDI`&&a[c]!==-1)continue;let f=[],p=s;for(;;){for(let e of p)f.push(e);let t=p[p.length-1];if(Op(e[t])&&i[t]!==o){let e=l.get(i[t]);if(e){p=e;continue}}break}let m=t[f[0]],h=r;for(let e=f[0]-1;e>=0;e--)if(!n[e]){h=t[e];break}let g=u(Math.max(m,h)),_=f[f.length-1],v=r;if(!(Op(e[_])&&i[_]===o)){for(let e=_+1;e<o;e++)if(!n[e]){v=t[e];break}}let y=u(Math.max(m,v));d.push({indices:f,level:m,sos:g,eos:y})}return d}const Lp=e=>e===`L`?`L`:e===`R`||e===`EN`||e===`AN`?`R`:null;function Rp(e,t,n,r,i){let a=e.indices,o=a.length,{sos:s,eos:c,level:l}=e;for(let e=0;e<o;e++){let t=a[e];if(r[t]===`NSM`)if(e===0)r[t]=s;else{let n=r[a[e-1]];r[t]=n===`LRI`||n===`RLI`||n===`FSI`||n===`PDI`?`ON`:n}}{let e=s;for(let t=0;t<o;t++){let n=r[a[t]];n===`R`||n===`L`||n===`AL`?e=n:n===`EN`&&e===`AL`&&(r[a[t]]=`AN`)}}for(let e=0;e<o;e++)r[a[e]]===`AL`&&(r[a[e]]=`R`);for(let e=1;e<o-1;e++){let t=r[a[e]],n=r[a[e-1]],i=r[a[e+1]];t===`ES`&&n===`EN`&&i===`EN`||t===`CS`&&n===`EN`&&i===`EN`?r[a[e]]=`EN`:t===`CS`&&n===`AN`&&i===`AN`&&(r[a[e]]=`AN`)}for(let e=0;e<o;e++){if(r[a[e]]!==`ET`)continue;let t=e;for(;t<o&&r[a[t]]===`ET`;)t++;let n=e>0?r[a[e-1]]:s,i=t<o?r[a[t]]:c;if(n===`EN`||i===`EN`)for(let n=e;n<t;n++)r[a[n]]=`EN`;e=t-1}for(let e=0;e<o;e++){let t=r[a[e]];(t===`ES`||t===`ET`||t===`CS`)&&(r[a[e]]=`ON`)}{let e=s;for(let t=0;t<o;t++){let n=r[a[t]];n===`R`||n===`L`?e=n:n===`EN`&&e===`L`&&(r[a[t]]=`L`)}}let u=l&1?`R`:`L`,d=u===`R`?`L`:`R`,f=[];{let e=[];outer:for(let n=0;n<o;n++){let i=a[n];if(r[i]!==`ON`)continue;let o=Ep(t[i]);if(o)if(o.type===`o`){if(e.length===63)break outer;e.push({expect:Fp(o.pair),pos:n})}else{let r=Fp(t[i]);for(let t=e.length-1;t>=0;t--)if(e[t].expect===r){f.push({open:e[t].pos,close:n}),e.length=t;break}}}f.sort((e,t)=>e.open-t.open)}let p=(e,t)=>{for(let i=e+1;i<o&&n[a[i]]===`NSM`;i++)r[a[i]]=t};for(let{open:e,close:t}of f){let n=!1,i=!1;for(let o=e+1;o<t;o++){let e=Lp(r[a[o]]);e===u?n=!0:e===d&&(i=!0)}let o=null;if(n)o=u;else if(i){let t=s;for(let n=e-1;n>=0;n--){let e=Lp(r[a[n]]);if(e){t=e;break}}o=t===d?d:u}o&&(r[a[e]]=o,r[a[t]]=o,p(e,o),p(t,o))}for(let e=0;e<o;e++){if(!kp(r[a[e]]))continue;let t=e;for(;t<o&&kp(r[a[t]]);)t++;let n=e>0?Lp(r[a[e-1]]):s,i=t<o?Lp(r[a[t]]):c;if(n&&i&&n===i)for(let i=e;i<t;i++)r[a[i]]=n;e=t-1}for(let e=0;e<o;e++)kp(r[a[e]])&&(r[a[e]]=u);for(let e=0;e<o;e++){let t=a[e],n=r[t];l&1?(n===`L`||n===`EN`||n===`AN`)&&(i[t]+=1):n===`R`?i[t]+=1:(n===`AN`||n===`EN`)&&(i[t]+=2)}}function zp(e,t,n){let r=e.length,i=Array(r);for(let t=0;t<r;t++)i[t]=n?.[t]??Sp(e[t]);let a=t===`rtl`?1:t===`ltr`?0:Mp(i,0,r),{pdiOf:o,initOf:s}=Np(i),{levels:c,types:l}=Pp(i,a,o),u=Array(r);for(let e=0;e<r;e++)u[e]=Dp(i[e]);let d=Ip(i,c,u,a,o,s),f=l.slice();for(let t of d)Rp(t,e,i,f,c);let p=e=>{let t=i[e];return t===`WS`||Op(t)||t===`PDI`||u[e]};for(let e=0;e<r;e++){let t=i[e];if(t===`B`||t===`S`){c[e]=a;for(let t=e-1;t>=0&&p(t);t--)u[t]||(c[t]=a)}}for(let e=r-1;e>=0&&p(e);e--)u[e]||(c[e]=a);for(let e=0;e<r;e++)u[e]&&(c[e]=-1);return{levels:c,paragraphLevel:a}}function Bp(e,t,n){let r=[];for(let i=t;i<n;i++){let t=e[i];t>=0&&t<=126&&r.push(i)}if(r.length===0)return r;let i=0,a=127;for(let t of r){let n=e[t];n>i&&(i=n),n&1&&n<a&&(a=n)}for(let t=i;t>=a;t--){let n=0;for(;n<r.length;)if(e[r[n]]>=t){let i=n+1;for(;i<r.length&&e[r[i]]>=t;)i++;for(let e=n,t=i-1;e<t;e++,t--){let n=r[e];r[e]=r[t],r[t]=n}n=i}else n++}return r}function Vp(e){let t=[],n=[],r=[];for(let i=0;i<e.length;){let a=e.codePointAt(i),o=a>65535?2:1;t.push(a),n.push(o),r.push(i),i+=o}return{cps:t,units:n,starts:r}}var Hp=class{computeLevels(e,t,n){let{cps:r,units:i,starts:a}=Vp(e),{levels:o,paragraphLevel:s}=zp(r,t,n?r.map((e,t)=>n[a[t]]??null):void 0),c=new Uint8Array(e.length),l=0;for(let e=0;e<o.length;e++){let t=o[e]===-1?255:o[e];for(let n=0;n<i[e];n++)c[l++]=t}return{levels:c,paragraphLevel:s}}reorderVisual(e,t,n){return Bp(e,t,n)}getMirror(e){return wp(e)}};function Up(){return new Hp}let Wp=null;function Gp(){return Wp===null&&(Wp=Up()),Wp}const Kp=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF\u200F\u202B\u202E\u2067]|[\u{10800}-\u{10FFF}\u{1E800}-\u{1EFFF}]/u;function qp(e){return Kp.test(e)}function Jp(e,t,n){let r=n.length,i=new Uint8Array(r);for(let a=0;a<r;a++){let r=e[n[a]];i[a]=r===255?t:r}return{order:Gp().reorderVisual(i,0,r),segLevels:i}}function Yp(e){let t=new Set;for(let n of e)t.add(n.codePointAt(0));return t}function Xp(e){return{enabled:e?.kinsoku!==!1,lineStartForbidden:Yp(e?.noLineBreaksBefore??`”’)〕]}〉》」』】〙〗〟⦆»、。,.・:;/?!‐ー゠–〜~ぁぃぅぇぉっゃゅょゎゕゖァィゥェォッャュョヮヵヶㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ゝゞヽヾ゛゜%‰℃°′″。」、・ー゙゚!),.:;?]}⦆`),lineEndForbidden:Yp(e?.noLineBreaksAfter??`“‘(〔[{〈《「『【〘〖〝⦅«$¥#£¢([{⦅`)}}const Zp=Xp();function Qp(e,t,n,r=1){if(!n.enabled||t<=0||t>=e.length)return t;let i=t=>t<e.length&&n.lineStartForbidden.has(e[t].codePointAt(0)),a=t=>t>=0&&n.lineEndForbidden.has(e[t].codePointAt(0)),o=t;for(;o>r&&(i(o)||a(o-1));)o--;return o<=r&&(i(o)||a(o-1))?t:o}function $p(e,t,n){if(!t.enabled)return 0;let r=e.length-n;for(let n=1;n<=r;n++){let r=e[e.length-n];if(/\s/.test(r)||t.lineStartForbidden.has(r.codePointAt(0)))continue;let i=e[e.length-n-1];if(!(i&&t.lineEndForbidden.has(i.codePointAt(0))))return n}return 0}function em(e){return e>=12288&&e<=40959||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65280&&e<=65519}const tm=`BK.CM.CR.GL.LF.NL.SP.WJ.ZW.ZWJ.AK.AL.AP.AS.B2.BA.BB.CB.CL.CP.EB.EM.EX.H2.H3.HL.HH.HY.ID.IN.IS.JL.JT.JV.NS.NU.OP.PO.PR.QU.RI.SY.VF.VI`.split(`.`),nm=[0,9,10,11,13,14,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,58,60,63,64,91,92,93,94,123,124,125,126,127,133,134,160,161,162,163,166,171,172,173,174,176,177,178,180,181,187,188,191,192,712,713,716,717,735,736,768,860,867,880,894,895,1155,1162,1417,1418,1419,1423,1424,1425,1470,1471,1472,1473,1475,1476,1478,1479,1480,1488,1515,1519,1523,1536,1542,1545,1548,1550,1552,1563,1564,1565,1568,1611,1632,1642,1643,1645,1648,1649,1748,1749,1750,1757,1758,1759,1765,1767,1769,1770,1774,1776,1786,1809,1810,1840,1867,1958,1969,1984,1994,2027,2036,2040,2041,2042,2045,2046,2048,2070,2074,2075,2084,2085,2088,2089,2094,2137,2140,2192,2194,2199,2208,2250,2274,2275,2308,2362,2365,2366,2384,2385,2392,2402,2404,2406,2416,2433,2436,2492,2493,2494,2501,2503,2505,2507,2510,2519,2520,2530,2532,2534,2544,2546,2548,2553,2554,2555,2556,2558,2559,2561,2564,2620,2621,2622,2627,2631,2633,2635,2638,2641,2642,2662,2672,2674,2677,2678,2689,2692,2748,2749,2750,2758,2759,2762,2763,2766,2786,2788,2790,2800,2801,2802,2810,2816,2817,2820,2876,2877,2878,2885,2887,2889,2891,2894,2901,2904,2914,2916,2918,2928,2946,2947,3006,3011,3014,3017,3018,3022,3031,3032,3046,3056,3065,3066,3072,3077,3132,3133,3134,3141,3142,3145,3146,3150,3157,3159,3170,3172,3174,3184,3191,3192,3201,3204,3205,3260,3261,3262,3269,3270,3273,3274,3278,3285,3287,3298,3300,3302,3312,3315,3316,3328,3332,3387,3389,3390,3397,3398,3401,3402,3406,3415,3416,3426,3428,3430,3440,3449,3450,3457,3460,3530,3531,3535,3541,3542,3543,3544,3552,3558,3568,3570,3572,3633,3634,3636,3643,3647,3648,3655,3663,3664,3674,3676,3761,3762,3764,3773,3784,3791,3792,3802,3841,3845,3846,3848,3849,3851,3852,3853,3858,3859,3860,3861,3864,3866,3872,3882,3892,3893,3894,3895,3896,3897,3898,3899,3900,3901,3902,3904,3953,3967,3968,3973,3974,3976,3981,3992,3993,4029,4030,4032,4038,4039,4048,4050,4051,4052,4057,4059,4139,4159,4160,4170,4172,4182,4186,4190,4193,4194,4197,4199,4206,4209,4213,4226,4238,4239,4240,4250,4254,4352,4448,4520,4608,4957,4960,4961,4962,5120,5121,5760,5761,5787,5788,5789,5867,5870,5906,5910,5938,5941,5943,5970,5972,6002,6004,6068,6100,6102,6103,6104,6105,6106,6107,6108,6109,6110,6112,6122,6146,6148,6150,6151,6152,6154,6155,6158,6159,6160,6170,6277,6279,6313,6314,6432,6444,6448,6460,6468,6470,6480,6608,6619,6679,6684,6741,6751,6752,6781,6783,6784,6794,6800,6810,6832,6878,6880,6891,6892,6912,6917,6964,6980,6981,6989,6990,6992,7002,7004,7005,7009,7019,7028,7037,7040,7043,7073,7086,7088,7098,7104,7142,7154,7156,7204,7224,7227,7232,7242,7248,7258,7294,7296,7376,7379,7380,7401,7405,7406,7412,7413,7415,7418,7616,7629,7630,7676,7677,7680,8189,8190,8192,8199,8200,8203,8204,8205,8206,8208,8209,8210,8212,8213,8216,8218,8219,8222,8223,8224,8228,8231,8232,8234,8239,8240,8248,8249,8251,8252,8254,8260,8261,8262,8263,8266,8278,8279,8280,8284,8285,8288,8289,8294,8304,8317,8318,8319,8333,8334,8335,8352,8359,8360,8374,8375,8379,8380,8382,8383,8384,8385,8400,8433,8451,8452,8457,8458,8470,8471,8722,8724,8943,8944,8968,8969,8970,8971,8972,8986,8988,9001,9002,9003,9200,9204,9728,9732,9748,9750,9752,9753,9754,9757,9758,9760,9785,9788,9832,9833,9855,9856,9917,9929,9933,9934,9935,9938,9939,9941,9944,9946,9948,9949,9951,9954,9962,9963,9969,9974,9975,9977,9978,9979,9981,9989,9992,9994,9998,10075,10081,10082,10084,10085,10088,10089,10090,10091,10092,10093,10094,10095,10096,10097,10098,10099,10100,10101,10102,10181,10182,10183,10214,10215,10216,10217,10218,10219,10220,10221,10222,10223,10224,10240,10241,10627,10628,10629,10630,10631,10632,10633,10634,10635,10636,10637,10638,10639,10640,10641,10642,10643,10644,10645,10646,10647,10648,10649,10712,10713,10714,10715,10716,10748,10749,10750,11503,11506,11513,11514,11517,11518,11519,11520,11632,11633,11647,11648,11744,11776,11790,11798,11799,11800,11801,11802,11804,11806,11808,11810,11811,11812,11813,11814,11815,11816,11817,11818,11822,11823,11824,11826,11827,11829,11834,11836,11839,11840,11841,11842,11843,11851,11852,11853,11854,11856,11859,11861,11862,11863,11864,11865,11866,11867,11868,11869,11870,11904,11930,11931,12020,12032,12246,12272,12288,12289,12291,12293,12294,12296,12297,12298,12299,12300,12301,12302,12303,12304,12305,12306,12308,12309,12310,12311,12312,12313,12314,12315,12316,12317,12318,12320,12330,12336,12341,12342,12347,12349,12352,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12387,12388,12419,12420,12421,12422,12423,12424,12430,12431,12437,12439,12441,12443,12447,12448,12450,12451,12452,12453,12454,12455,12456,12457,12458,12483,12484,12515,12516,12517,12518,12519,12520,12526,12527,12533,12535,12539,12543,12544,12549,12592,12593,12687,12688,12774,12783,12784,12800,12831,12832,12872,12880,19904,19968,40981,40982,42125,42128,42183,42238,42240,42509,42510,42511,42512,42528,42538,42607,42611,42612,42622,42654,42656,42736,42738,42739,42744,43010,43011,43014,43015,43019,43020,43043,43048,43052,43053,43064,43065,43124,43126,43128,43136,43138,43188,43206,43214,43216,43226,43232,43250,43260,43261,43263,43264,43274,43302,43310,43312,43335,43348,43360,43389,43392,43396,43443,43456,43457,43463,43466,43470,43471,43472,43482,43486,43488,43493,43494,43504,43514,43520,43561,43575,43584,43587,43588,43596,43598,43600,43610,43612,43613,43616,43643,43646,43696,43697,43698,43701,43703,43705,43710,43712,43713,43714,43755,43760,43762,43765,43767,44003,44011,44012,44014,44016,44026,44032,44033,44060,44061,44088,44089,44116,44117,44144,44145,44172,44173,44200,44201,44228,44229,44256,44257,44284,44285,44312,44313,44340,44341,44368,44369,44396,44397,44424,44425,44452,44453,44480,44481,44508,44509,44536,44537,44564,44565,44592,44593,44620,44621,44648,44649,44676,44677,44704,44705,44732,44733,44760,44761,44788,44789,44816,44817,44844,44845,44872,44873,44900,44901,44928,44929,44956,44957,44984,44985,45012,45013,45040,45041,45068,45069,45096,45097,45124,45125,45152,45153,45180,45181,45208,45209,45236,45237,45264,45265,45292,45293,45320,45321,45348,45349,45376,45377,45404,45405,45432,45433,45460,45461,45488,45489,45516,45517,45544,45545,45572,45573,45600,45601,45628,45629,45656,45657,45684,45685,45712,45713,45740,45741,45768,45769,45796,45797,45824,45825,45852,45853,45880,45881,45908,45909,45936,45937,45964,45965,45992,45993,46020,46021,46048,46049,46076,46077,46104,46105,46132,46133,46160,46161,46188,46189,46216,46217,46244,46245,46272,46273,46300,46301,46328,46329,46356,46357,46384,46385,46412,46413,46440,46441,46468,46469,46496,46497,46524,46525,46552,46553,46580,46581,46608,46609,46636,46637,46664,46665,46692,46693,46720,46721,46748,46749,46776,46777,46804,46805,46832,46833,46860,46861,46888,46889,46916,46917,46944,46945,46972,46973,47e3,47001,47028,47029,47056,47057,47084,47085,47112,47113,47140,47141,47168,47169,47196,47197,47224,47225,47252,47253,47280,47281,47308,47309,47336,47337,47364,47365,47392,47393,47420,47421,47448,47449,47476,47477,47504,47505,47532,47533,47560,47561,47588,47589,47616,47617,47644,47645,47672,47673,47700,47701,47728,47729,47756,47757,47784,47785,47812,47813,47840,47841,47868,47869,47896,47897,47924,47925,47952,47953,47980,47981,48008,48009,48036,48037,48064,48065,48092,48093,48120,48121,48148,48149,48176,48177,48204,48205,48232,48233,48260,48261,48288,48289,48316,48317,48344,48345,48372,48373,48400,48401,48428,48429,48456,48457,48484,48485,48512,48513,48540,48541,48568,48569,48596,48597,48624,48625,48652,48653,48680,48681,48708,48709,48736,48737,48764,48765,48792,48793,48820,48821,48848,48849,48876,48877,48904,48905,48932,48933,48960,48961,48988,48989,49016,49017,49044,49045,49072,49073,49100,49101,49128,49129,49156,49157,49184,49185,49212,49213,49240,49241,49268,49269,49296,49297,49324,49325,49352,49353,49380,49381,49408,49409,49436,49437,49464,49465,49492,49493,49520,49521,49548,49549,49576,49577,49604,49605,49632,49633,49660,49661,49688,49689,49716,49717,49744,49745,49772,49773,49800,49801,49828,49829,49856,49857,49884,49885,49912,49913,49940,49941,49968,49969,49996,49997,50024,50025,50052,50053,50080,50081,50108,50109,50136,50137,50164,50165,50192,50193,50220,50221,50248,50249,50276,50277,50304,50305,50332,50333,50360,50361,50388,50389,50416,50417,50444,50445,50472,50473,50500,50501,50528,50529,50556,50557,50584,50585,50612,50613,50640,50641,50668,50669,50696,50697,50724,50725,50752,50753,50780,50781,50808,50809,50836,50837,50864,50865,50892,50893,50920,50921,50948,50949,50976,50977,51004,51005,51032,51033,51060,51061,51088,51089,51116,51117,51144,51145,51172,51173,51200,51201,51228,51229,51256,51257,51284,51285,51312,51313,51340,51341,51368,51369,51396,51397,51424,51425,51452,51453,51480,51481,51508,51509,51536,51537,51564,51565,51592,51593,51620,51621,51648,51649,51676,51677,51704,51705,51732,51733,51760,51761,51788,51789,51816,51817,51844,51845,51872,51873,51900,51901,51928,51929,51956,51957,51984,51985,52012,52013,52040,52041,52068,52069,52096,52097,52124,52125,52152,52153,52180,52181,52208,52209,52236,52237,52264,52265,52292,52293,52320,52321,52348,52349,52376,52377,52404,52405,52432,52433,52460,52461,52488,52489,52516,52517,52544,52545,52572,52573,52600,52601,52628,52629,52656,52657,52684,52685,52712,52713,52740,52741,52768,52769,52796,52797,52824,52825,52852,52853,52880,52881,52908,52909,52936,52937,52964,52965,52992,52993,53020,53021,53048,53049,53076,53077,53104,53105,53132,53133,53160,53161,53188,53189,53216,53217,53244,53245,53272,53273,53300,53301,53328,53329,53356,53357,53384,53385,53412,53413,53440,53441,53468,53469,53496,53497,53524,53525,53552,53553,53580,53581,53608,53609,53636,53637,53664,53665,53692,53693,53720,53721,53748,53749,53776,53777,53804,53805,53832,53833,53860,53861,53888,53889,53916,53917,53944,53945,53972,53973,54e3,54001,54028,54029,54056,54057,54084,54085,54112,54113,54140,54141,54168,54169,54196,54197,54224,54225,54252,54253,54280,54281,54308,54309,54336,54337,54364,54365,54392,54393,54420,54421,54448,54449,54476,54477,54504,54505,54532,54533,54560,54561,54588,54589,54616,54617,54644,54645,54672,54673,54700,54701,54728,54729,54756,54757,54784,54785,54812,54813,54840,54841,54868,54869,54896,54897,54924,54925,54952,54953,54980,54981,55008,55009,55036,55037,55064,55065,55092,55093,55120,55121,55148,55149,55176,55177,55204,55216,55239,55243,55292,63744,64256,64285,64286,64287,64297,64298,64311,64312,64317,64318,64319,64320,64322,64323,64325,64326,64336,64830,64831,64832,65020,65021,65024,65040,65043,65045,65047,65048,65049,65050,65056,65057,65058,65059,65060,65061,65062,65064,65065,65066,65067,65068,65069,65071,65072,65077,65078,65079,65080,65081,65082,65083,65084,65085,65086,65087,65088,65089,65090,65091,65092,65093,65095,65096,65097,65104,65105,65106,65107,65108,65110,65112,65113,65114,65115,65116,65117,65118,65119,65127,65128,65129,65130,65131,65132,65279,65280,65281,65282,65284,65285,65286,65288,65289,65290,65292,65293,65294,65295,65306,65308,65311,65312,65339,65340,65341,65342,65371,65372,65373,65374,65375,65376,65378,65379,65381,65382,65383,65393,65438,65440,65471,65474,65480,65482,65488,65490,65496,65498,65501,65504,65505,65506,65509,65511,65529,65532,65533,65792,65795,66045,66046,66272,66273,66422,66427,66463,66464,66512,66513,66720,66730,67671,67672,67871,67872,68097,68100,68101,68103,68108,68112,68152,68155,68159,68160,68176,68184,68325,68327,68336,68342,68343,68409,68416,68900,68904,68912,68922,68928,68938,68969,68974,68975,69291,69293,69294,69328,69329,69370,69376,69446,69457,69506,69510,69632,69635,69637,69688,69702,69703,69705,69710,69714,69734,69744,69745,69747,69749,69750,69759,69760,69763,69808,69819,69821,69822,69826,69827,69837,69838,69872,69882,69888,69891,69927,69941,69942,69952,69956,69957,69959,70003,70004,70005,70006,70016,70019,70067,70081,70085,70087,70088,70089,70093,70094,70096,70106,70107,70108,70109,70112,70188,70200,70202,70203,70205,70206,70207,70209,70210,70313,70314,70367,70379,70384,70394,70400,70404,70405,70413,70415,70417,70419,70441,70442,70449,70450,70452,70453,70458,70459,70461,70462,70469,70471,70473,70475,70477,70478,70480,70481,70487,70488,70493,70494,70496,70498,70500,70502,70509,70512,70517,70528,70538,70539,70540,70542,70543,70544,70546,70582,70583,70584,70593,70594,70595,70597,70598,70599,70603,70604,70608,70609,70610,70611,70614,70615,70617,70625,70627,70709,70727,70731,70735,70736,70746,70748,70750,70751,70832,70852,70864,70874,71087,71094,71096,71105,71106,71108,71110,71113,71128,71132,71134,71216,71233,71235,71248,71258,71264,71277,71339,71352,71360,71370,71376,71396,71453,71468,71472,71482,71484,71487,71724,71739,71904,71914,71936,71943,71945,71946,71948,71956,71957,71959,71960,71984,71990,71991,71993,71995,71998,71999,72e3,72001,72002,72004,72007,72016,72026,72145,72152,72154,72161,72162,72163,72164,72165,72193,72203,72243,72250,72251,72255,72256,72257,72261,72262,72263,72264,72273,72284,72330,72346,72349,72350,72353,72355,72448,72458,72544,72552,72688,72698,72751,72759,72760,72768,72769,72774,72784,72794,72816,72817,72818,72850,72872,72873,72887,73009,73015,73018,73019,73020,73022,73023,73030,73031,73032,73040,73050,73098,73103,73104,73106,73107,73112,73120,73130,73184,73194,73440,73458,73459,73463,73465,73472,73474,73475,73476,73489,73490,73524,73531,73534,73538,73539,73541,73552,73562,73563,73693,73697,73727,73728,74864,74869,78424,78427,78430,78466,78467,78470,78471,78472,78473,78474,78713,78714,78716,78895,78896,78903,78904,78905,78908,78909,78910,78911,78912,78913,78919,78934,83406,83407,83408,90368,90398,90416,90426,92768,92778,92782,92784,92864,92874,92912,92917,92918,92976,92983,92986,92996,92997,93008,93018,93550,93552,93562,93847,93849,94031,94032,94033,94088,94095,94099,94176,94180,94181,94192,94194,94196,94199,94208,101120,101632,101663,101760,101875,110592,110883,110898,110899,110928,110931,110933,110934,110948,110952,110960,111356,113821,113823,113824,113828,118e3,118010,118528,118574,118576,118599,119141,119146,119149,119171,119173,119180,119210,119214,119362,119365,120782,120832,121344,121399,121403,121453,121461,121462,121476,121477,121479,121483,121499,121504,121505,121520,122880,122887,122888,122905,122907,122914,122915,122917,122918,122923,123023,123024,123184,123191,123200,123210,123566,123567,123628,123632,123642,123647,123648,124140,124144,124154,124398,124400,124401,124411,124643,124644,124646,124647,124654,124656,124661,124662,125136,125143,125252,125259,125264,125274,125278,125280,126124,126125,126128,126129,126976,127232,127406,127462,127488,127877,127878,127900,127902,127925,127927,127932,127933,127938,127941,127943,127944,127946,127949,127995,128e3,128066,128068,128070,128081,128102,128121,128124,128125,128129,128132,128133,128136,128143,128144,128145,128146,128160,128161,128162,128163,128164,128165,128170,128171,128175,128176,128177,128179,128256,128263,128279,128293,128306,128330,128372,128374,128378,128379,128400,128401,128405,128407,128468,128476,128500,128506,128581,128584,128587,128592,128630,128633,128636,128640,128675,128676,128692,128695,128704,128705,128716,128717,128768,128884,128887,128891,128896,128981,129024,129292,129293,129295,129296,129304,129312,129318,129319,129328,129338,129340,129343,129399,129400,129461,129463,129464,129466,129467,129468,129485,129488,129489,129502,129536,129624,129731,129734,129776,129785,129792,130032,130042,130048,131070,131072,196606,196608,262142,917505,917506,917536,917632,917760,918e3],rm=[1,15,4,0,2,1,6,22,39,11,38,37,11,39,36,19,11,38,30,27,30,41,35,30,11,22,11,36,38,19,11,36,15,18,11,1,5,1,3,36,37,38,11,39,11,15,11,37,38,11,16,11,39,11,36,11,16,11,16,11,16,11,1,3,1,11,30,11,1,11,30,26,11,38,11,1,26,1,11,1,11,1,22,1,11,25,11,25,11,35,11,37,30,11,1,22,1,22,11,1,35,37,35,11,1,11,22,11,1,35,11,1,11,1,11,1,11,35,11,1,11,1,11,1,11,35,11,1,11,30,22,11,1,38,11,1,11,1,11,1,11,1,11,1,11,35,11,1,11,1,35,1,11,1,11,1,11,1,11,1,15,35,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,35,11,37,11,37,11,38,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,35,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,35,11,38,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,35,11,1,11,1,11,1,11,1,11,1,11,35,11,38,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,35,11,16,11,1,16,11,1,11,1,11,1,11,1,11,1,11,1,11,35,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,35,11,37,11,1,11,1,11,1,11,1,11,1,11,35,11,1,11,1,11,1,11,38,11,1,11,35,15,11,1,11,1,11,1,11,35,11,16,11,16,3,16,15,3,22,3,11,22,11,1,11,35,11,15,1,11,1,11,1,36,18,36,18,1,11,1,15,1,15,1,11,1,11,1,11,15,11,1,11,16,15,16,11,3,11,1,11,35,15,11,1,11,1,11,1,11,1,11,1,11,1,11,1,35,1,11,31,33,32,11,1,11,15,11,26,11,15,11,36,18,11,15,11,1,11,1,15,11,1,11,1,11,1,15,34,11,15,11,15,38,11,1,11,35,11,22,15,16,11,22,11,1,3,1,35,11,1,11,1,11,1,11,1,11,22,35,11,35,11,1,11,1,11,1,11,1,35,11,35,11,1,11,1,3,11,1,10,1,43,10,11,15,13,15,28,15,28,1,28,15,1,11,1,11,35,11,13,1,42,11,1,11,15,35,11,35,11,15,11,1,11,1,11,1,11,1,11,1,11,1,3,1,3,1,11,16,11,15,3,15,8,1,9,1,26,3,26,14,11,39,36,39,36,39,11,29,15,0,1,3,37,11,39,11,34,11,30,36,18,34,11,15,37,15,11,15,7,11,1,11,36,18,11,36,18,11,38,37,38,37,38,37,38,37,38,37,38,1,11,37,11,37,11,38,11,38,11,29,11,36,18,36,18,11,28,11,36,18,11,28,11,28,11,28,11,28,11,28,20,28,11,28,11,28,11,28,11,28,11,28,11,28,11,28,11,28,11,28,11,28,11,28,11,28,11,28,20,28,11,28,11,28,20,11,39,11,22,28,11,36,18,36,18,36,18,36,18,36,18,36,18,36,18,11,36,18,11,36,18,36,18,36,18,36,18,36,18,11,15,11,36,18,36,18,36,18,36,18,36,18,36,18,36,18,36,18,36,18,36,18,36,18,11,36,18,36,18,11,36,18,11,1,11,22,15,11,22,15,11,15,11,1,11,1,39,15,11,26,36,15,11,39,11,39,36,18,36,18,36,18,36,18,15,22,11,15,11,15,11,14,15,11,26,15,36,15,11,15,11,15,11,22,36,19,36,19,36,19,36,19,26,11,28,11,28,11,28,11,28,15,18,28,34,28,36,18,36,18,36,18,36,18,36,18,28,36,18,36,18,36,18,36,18,34,36,18,28,1,28,1,28,34,28,11,34,28,34,28,34,28,34,28,34,28,34,28,34,28,34,28,34,28,34,28,34,11,1,34,28,34,28,34,28,34,28,34,28,34,28,34,28,34,28,34,28,34,28,34,28,34,28,34,28,11,28,11,28,11,28,11,28,34,28,11,28,11,28,11,28,34,28,11,28,11,15,11,15,22,15,11,35,11,1,11,1,11,1,11,1,11,15,11,1,11,1,11,1,11,1,11,1,11,37,11,16,22,11,1,11,1,11,15,35,11,1,11,16,11,1,35,11,1,15,11,1,11,31,11,1,10,1,43,28,15,28,11,15,13,11,28,11,1,11,35,11,13,1,11,15,1,15,1,11,13,11,28,15,11,1,11,1,11,1,11,1,11,1,11,1,11,1,15,11,1,11,1,15,1,11,35,11,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,11,33,11,32,11,28,11,25,1,25,11,25,11,25,11,25,11,25,11,25,11,25,11,18,36,11,37,11,1,18,34,22,36,18,29,11,3,1,3,1,3,1,3,1,3,1,3,1,3,1,28,36,18,36,18,36,18,36,18,36,18,36,18,36,18,36,18,28,36,18,28,18,28,18,11,34,22,28,36,18,36,18,36,18,28,11,28,38,37,28,11,7,11,22,28,38,37,28,36,18,28,18,28,18,28,34,28,22,28,36,28,18,28,36,28,18,28,36,18,36,18,34,28,34,28,34,28,11,28,11,28,11,28,11,28,11,37,38,28,38,11,1,17,11,15,11,1,11,1,11,1,11,15,11,15,11,35,11,15,11,15,11,1,11,1,11,1,11,1,11,1,11,15,11,1,11,15,29,11,15,11,1,11,35,11,35,11,1,26,11,1,26,11,15,11,1,11,1,11,1,11,1,12,10,1,43,15,28,11,28,13,1,10,1,10,11,3,1,11,1,11,35,15,1,11,35,11,35,11,1,11,1,11,35,15,11,1,11,1,11,16,11,1,11,1,11,15,11,15,1,11,1,35,11,16,11,15,11,1,15,11,15,11,1,11,1,11,15,11,1,11,35,11,1,11,10,11,10,11,10,11,10,11,10,11,10,11,1,15,1,11,1,11,1,43,11,13,11,1,11,15,13,10,1,11,1,11,1,11,13,11,13,11,13,11,13,10,11,28,1,11,1,11,1,11,1,11,1,43,12,1,28,11,28,11,1,11,1,11,15,11,35,15,11,1,11,1,11,35,11,1,11,1,16,15,22,11,15,11,1,11,1,15,11,35,11,16,11,1,11,35,11,35,11,1,11,35,11,15,11,1,11,35,11,10,11,10,11,10,11,10,11,10,1,11,1,11,1,43,12,1,12,1,15,11,13,11,1,11,1,11,16,11,1,11,1,11,1,11,1,16,11,15,16,11,1,11,1,11,1,15,11,16,15,11,16,11,1,11,35,11,1,11,1,11,15,11,35,11,16,22,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,35,11,1,11,1,11,1,11,35,11,35,11,13,15,1,15,11,1,12,1,10,11,10,1,11,1,43,15,28,13,1,11,37,11,15,11,15,11,36,18,11,18,11,36,18,36,18,11,36,18,11,36,3,36,18,3,36,18,36,18,1,11,1,11,36,18,11,13,1,13,11,35,11,15,11,35,11,1,15,11,1,15,11,15,11,35,11,15,35,11,15,11,1,11,1,11,1,11,34,3,11,1,34,28,11,28,11,28,11,28,11,28,11,34,11,34,11,34,11,34,11,28,11,1,15,1,11,35,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,35,11,1,11,1,11,1,11,1,11,15,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,35,11,1,11,1,35,11,38,11,1,35,11,1,11,35,11,1,11,1,11,1,11,1,11,1,11,1,11,35,11,36,11,37,11,37,11,28,11,28,40,28,20,28,11,28,11,28,11,28,20,28,20,28,20,28,21,28,20,28,20,28,20,28,20,28,20,28,20,28,20,28,20,28,11,28,11,28,11,28,20,28,11,28,11,28,11,28,11,28,11,28,20,28,20,28,20,28,20,28,11,28,11,28,20,28,20,11,39,34,11,28,20,28,20,28,20,28,20,28,11,28,11,28,11,28,11,20,28,20,28,20,28,20,28,20,28,20,28,20,28,20,28,20,28,20,28,20,28,20,28,11,28,20,28,20,28,11,35,11,28,11,28,11,28,11,1,11,1,11,1,11],im=[4352,8361,8986,9001,9193,9200,9203,9725,9748,9776,9800,9855,9866,9875,9889,9898,9917,9924,9934,9940,9962,9970,9973,9978,9981,9989,9994,10024,10060,10062,10067,10071,10133,10160,10175,11035,11088,11093,11904,11931,12032,12272,12353,12441,12549,12593,12688,12783,12832,12880,42128,43360,44032,63744,65040,65072,65108,65128,65281,65474,65482,65490,65498,65504,65512,94176,94192,94208,101631,101760,110576,110581,110589,110592,110898,110928,110933,110948,110960,119552,119648,126980,127183,127374,127377,127488,127504,127552,127568,127584,127744,127789,127799,127870,127904,127951,127968,127988,127992,128064,128066,128255,128331,128336,128378,128405,128420,128507,128640,128716,128720,128725,128732,128747,128756,128992,129008,129292,129340,129351,129648,129664,129678,129736,129741,129759,129775,131072,196608],am=[4448,8362,8988,9003,9197,9201,9204,9727,9750,9784,9812,9856,9872,9876,9890,9900,9919,9926,9935,9941,9963,9972,9974,9979,9982,9990,9996,10025,10061,10063,10070,10072,10136,10161,10176,11037,11089,11094,11930,12020,12246,12351,12439,12544,12592,12687,12774,12831,12872,42125,42183,43389,55204,64256,65050,65107,65127,65132,65471,65480,65488,65496,65501,65511,65519,94181,94199,101590,101663,101875,110580,110588,110591,110883,110899,110931,110934,110952,111356,119639,119671,126981,127184,127375,127387,127491,127548,127561,127570,127590,127777,127798,127869,127892,127947,127956,127985,127989,128063,128065,128253,128318,128335,128360,128379,128407,128421,128592,128710,128717,128723,128729,128736,128749,128765,129004,129009,129339,129350,129536,129661,129675,129735,129737,129757,129771,129785,196606,262142];function om(e){let t=0,n=nm.length-1;for(;t<n;){let r=t+n+1>>1;nm[r]<=e?t=r:n=r-1}return tm[rm[t]]}function sm(e){let t=0,n=im.length-1;if(n<0||e<im[0])return!1;for(;t<n;){let r=t+n+1>>1;im[r]<=e?t=r:n=r-1}return e<am[t]}function cm(e,t){let n=om(e);if(n===`OP`)return!0;let r=om(t),i=n===`AL`||n===`HL`,a=r===`AL`||r===`HL`;return!!(i&&(a||r===`NU`||r===`PR`||r===`PO`)||a&&(n===`NU`||n===`PR`||n===`PO`)||n===`PR`&&(r===`ID`||r===`EB`||r===`EM`)||(n===`ID`||n===`EB`||n===`EM`)&&r===`PO`||n===`NU`&&(r===`NU`||r===`PO`||r===`PR`)||r===`NU`&&(n===`PO`||n===`PR`||n===`HY`||n===`IS`)||(i||n===`NU`)&&r===`OP`&&!sm(t)||n===`CP`&&!sm(e)&&(a||r===`NU`))}function lm(e){return e===`my`||e===`bo`}function um(e){return e>=3584&&e<=3711||e>=3712&&e<=3839||e>=6016&&e<=6143||e>=4096&&e<=4255||e>=43616&&e<=43647||e>=43488&&e<=43519||e>=3840&&e<=4095}function dm(e){return e===3633||e>=3635&&e<=3642||e>=3655&&e<=3662||e===3761||e>=3763&&e<=3772||e>=3784&&e<=3790||e>=6068&&e<=6099||e===6109}function fm(e){return e<=3711?`th`:e<=3839?`lo`:e<=4095?`bo`:e<=4255?`my`:e<=6143?`km`:`my`}function pm(e){for(let t of e)if(um(t.codePointAt(0)))return!0;return!1}function mm(e){for(let t of e){let e=t.codePointAt(0);if(um(e))return lm(fm(e))}return!1}function hm(e){let t=!1;for(let n of e){let e=n.codePointAt(0);if(um(e)){if(lm(fm(e)))return!1;t=!0}}return t}const gm=new Map;function _m(e){let t=gm.get(e);if(t!==void 0)return t;let n=null;try{typeof Intl<`u`&&typeof Intl.Segmenter==`function`&&(n=new Intl.Segmenter(e,{granularity:`word`}))}catch{n=null}return gm.set(e,n),n}function vm(e){let t=_m(e);return t?e=>t.segment(e):null}function ym(e){if(!pm(e))return[];let t=[],n=e.length,r=0;for(;r<n;){let i=e.codePointAt(r),a=i>65535?2:1;if(!um(i)){r+=a;continue}let o=fm(i),s=lm(o),c=r+a;for(;c<n;){let t=e.codePointAt(c);if(!um(t)||lm(fm(t))!==s)break;c+=t>65535?2:1}let l=e.slice(r,c);if(s)for(let e of Dm(l))t.push(r+e);else{let e=vm(o);if(e){let n=[];try{for(let t of e(l))t.index>0&&(t.isWordLike??!0)&&n.push(r+t.index);for(let e of n)t.push(e)}catch{}}}r=c}return t}function bm(e){if(!pm(e))return[];let t=[],n=e.length,r=e.codePointAt(0),i=r>65535?2:1;for(;i<n;){let n=e.codePointAt(i),a=n>65535?2:1;um(r)!==um(n)&&!xm(r)&&!xm(n)&&t.push(i),r=n,i+=a}return t}function xm(e){return e===32||e===9||e===10||e===13||e===12288||e===160||e===8199||e===8239||e===8288||e===65279}function Sm(e,t){if(!pm(e))return[];let n=e.length,r=new Set(ym(e)),i=new Set(Dm(e)),a=e=>{i.has(e)&&r.add(e)};for(let t of bm(e))a(t);if(t?.cjk){let t=e.codePointAt(0),r=t>65535?2:1;for(;r<n;){let n=e.codePointAt(r);(em(n)||em(t))&&a(r),t=n,r+=n>65535?2:1}}let o=t?.kinsoku,s=o!=null&&o.enabled!==!1,c=[];for(let t of r)if(!(t<=0||t>=n)){if(s){let n=e.codePointAt(t),r=Cm(e,t);if(r!==void 0&&o.lineEndForbidden.has(r)||o.lineStartForbidden.has(n))continue}c.push(t)}return c.sort((e,t)=>e-t),c}function Cm(e,t){if(t<=0)return;let n=e.charCodeAt(t-1);if(n>=56320&&n<=57343&&t>=2){let n=e.charCodeAt(t-2);if(n>=55296&&n<=56319)return e.codePointAt(t-2)}return n}function wm(e,t,n,r,i,a=!1){let o=e.length;if(n>=o)return n;if(a){if(i(e.slice(n,o))<=r)return o;let a=0,s=t.length-1,c=n;for(;a<=s;){let l=a+s>>1,u=t[l];u<=n?a=l+1:u>=o?s=l-1:i(e.slice(n,u))<=r?(c=u,a=l+1):s=l-1}return c}let s=n;for(let a of t)a<=n||a>=o||i(e.slice(n,a))<=r&&(s=a);return i(e.slice(n,o))<=r&&(s=o),s}let Tm;function Em(){if(Tm!==void 0)return Tm;let e=null;try{typeof Intl<`u`&&typeof Intl.Segmenter==`function`&&(e=new Intl.Segmenter(void 0,{granularity:`grapheme`}))}catch{e=null}return Tm=e,e}function Dm(e){let t=Em();if(t)try{let n=[];for(let r of t.segment(e))r.index>0&&n.push(r.index);return n}catch{}let n=[];for(let t=0;t<e.length;){let r=e.codePointAt(t);t+=r>65535?2:1,t<e.length&&n.push(t)}return n}const Om=[`U`,`R`,`Tu`,`Tr`],km=[0,167,168,169,170,174,175,177,178,188,191,215,216,247,248,746,748,4352,4608,5121,5760,6320,6400,8214,8215,8216,8218,8220,8222,8224,8226,8240,8242,8251,8253,8258,8259,8263,8266,8273,8274,8293,8294,8413,8417,8418,8421,8448,8450,8451,8458,8463,8464,8467,8469,8470,8472,8478,8484,8485,8486,8487,8488,8489,8490,8494,8495,8501,8512,8517,8523,8524,8526,8527,8586,8588,8592,8734,8735,8756,8758,8960,8968,8972,8992,8996,9001,9003,9004,9085,9115,9150,9166,9167,9168,9169,9180,9186,9251,9252,9472,9632,9754,9760,10088,10102,10132,11026,11056,11088,11098,11159,11160,11192,11218,11219,11244,11248,11264,11856,11858,11904,12289,12291,12296,12306,12308,12320,12336,12337,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12387,12388,12419,12420,12421,12422,12423,12424,12430,12431,12437,12439,12443,12445,12448,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12483,12484,12515,12516,12517,12518,12519,12520,12526,12527,12533,12535,12540,12541,12583,12584,12724,12728,12731,12732,12784,12800,13055,13144,13179,13184,42192,43360,43392,44032,55296,57344,64256,65040,65056,65072,65097,65104,65107,65112,65113,65119,65123,65127,65136,65281,65282,65288,65290,65292,65293,65294,65295,65306,65308,65311,65312,65339,65340,65341,65342,65343,65344,65371,65377,65504,65507,65508,65512,65520,65529,65532,65534,67968,68e3,71040,71168,72192,72384,77824,83584,94176,101888,110576,110898,110899,110928,110931,110933,110934,110948,110952,111360,118464,118736,118784,119296,119520,119680,120832,121520,126976,127488,127490,129024,129280,129792,131072,196606,196608,262142,983040,1048574,1048576,1114110],Am=[1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,3,1,3,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,3,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,3,0,3,0,3,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,3,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,3,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,2,0,1,3,0,1,0,1,2,0,3,0,2,1,2,0,3,1,2,0,3,0,3,0,3,0,3,1,0,3,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,2,0,1,0,1,0,1,0,1,0,1,0,1];function jm(e){let t=0,n=km.length-1;for(;t<n;){let r=t+n+1>>1;km[r]<=e?t=r:n=r-1}return Am[t]}function Mm(e){return Om[jm(e)]}function Nm(e){return Pm.get(e)??null}const Pm=new Map([[65292,65040],[12289,65041],[12290,65042]]);function Fm(e){return Im.get(e)??null}const Im=new Map([[65288,65077],[65289,65078],[65371,65079],[65373,65080],[12308,65081],[12309,65082],[12304,65083],[12305,65084],[12298,65085],[12299,65086],[12296,65087],[12297,65088],[12300,65089],[12301,65090],[12302,65091],[12303,65092],[12310,65047],[12311,65048]]),Lm=new Set([65307]);function Rm(e){return Lm.has(e)}const zm=new WeakMap;function Bm(e){let t=e.canvas,n=t?.ownerDocument?.defaultView?.HTMLCanvasElement;return typeof n==`function`&&t instanceof n||typeof HTMLCanvasElement<`u`&&t instanceof HTMLCanvasElement?t:null}function Vm(e,t){return e.replace(/(^|\s)\d*\.?\d+(?:px|pt|pc|in|cm|mm|q|em|rem|%)(?:\/[^\s]+)?(?=\s)/i,`$1${t}`)}function Hm(e,t=!0){let n=e.trim();return[...n===``||n.toLowerCase()===`normal`?[]:n.split(`,`).map(e=>e.trim()).filter(e=>!/^(["'])vert\1(?:\s+(?:on|off|\d+))?$/i.test(e)),`"vert" ${+!!t}`].join(`, `)}function Um(e){try{let t=e.ownerDocument?.defaultView,n=t?.getComputedStyle?t.getComputedStyle(e):typeof getComputedStyle==`function`?getComputedStyle(e):null;if(n?.fontFeatureSettings)return n.fontFeatureSettings}catch{}return e.style.fontFeatureSettings}function Wm(e,t){if(e.isConnected)return t();let n=e.ownerDocument??(typeof document>`u`?null:document),r=n?.body??n?.documentElement;if(!r)return t();let i=e.parentNode,a=e.nextSibling,o=e.style,s={position:o.position,left:o.left,top:o.top,opacity:o.opacity,pointerEvents:o.pointerEvents};Object.assign(o,{position:`fixed`,left:`-99999px`,top:`0`,opacity:`0`,pointerEvents:`none`}),r.appendChild(e);let c=!1;try{return t()}catch(e){throw c=!0,e}finally{let t;try{if(i){let t=a?.parentNode===i?a:null;i.insertBefore(e,t)}else e.remove()}catch(n){t=n;try{e.remove()}catch{}}finally{Object.assign(o,s)}if(t!==void 0&&!c)throw t}}function Gm(e,t){let n=Bm(e);return n===null?t():Wm(n,t)}function Km(e){let t=zm.get(e);if(t)return t;let n=e.createElement(`canvas`);n.width=256,n.height=256,n.setAttribute(`aria-hidden`,`true`),Object.assign(n.style,{position:`fixed`,left:`-99999px`,top:`0`,opacity:`0`,pointerEvents:`none`});let r={canvas:n,cache:new Map,epoch:0},i=()=>{r.epoch+=1,r.cache.clear()};return e.fonts?.addEventListener?.(`loadingdone`,i),e.fonts?.addEventListener?.(`loadingerror`,i),zm.set(e,r),r}function qm(e,t){let{width:n,height:r}=e.canvas,i=e.getImageData(0,0,n,r).data,a=new Uint8ClampedArray(n*r),o=n,s=r,c=-1,l=-1,u=0,d=0,f=0;for(let e=0;e<r;e+=1)for(let t=0;t<n;t+=1){let r=i[(e*n+t)*4+3];a[e*n+t]=r,r!==0&&(o=Math.min(o,t),s=Math.min(s,e),c=Math.max(c,t),l=Math.max(l,e),u+=r,d+=t*r,f+=e*r)}if(c<o||l<s||u===0)return null;let p=e.measureText(t),m=e=>typeof e==`number`&&Number.isFinite(e)?e:0;return{alpha:a,geometry:[o,s,c,l,d/u,f/u],metrics:[m(p.width),m(p.actualBoundingBoxLeft),m(p.actualBoundingBoxRight),m(p.actualBoundingBoxAscent),m(p.actualBoundingBoxDescent)]}}function Jm(e,t,n){let r=e.canvas;r.style.fontFeatureSettings=n,e.font=e.font,e.clearRect(0,0,r.width,r.height);let i=String.fromCodePoint(t);return e.fillText(i,r.width/2,r.height/2),qm(e,i)}function Ym(e,t){let n=0,r=Math.min(e.length,t.length);for(let i=0;i<r;i+=1)n+=Math.abs(e[i]-t[i]);return n}function Xm(e,t,n,r){let i=(e,t,n,r)=>{let i=Math.max(Ym(e,t),Ym(n,r));return Math.min(Ym(e,n),Ym(e,r),Ym(t,n),Ym(t,r))>i};return i(e.alpha,t.alpha,n.alpha,r.alpha)||i(e.geometry,t.geometry,n.geometry,r.geometry)||i(e.metrics,t.metrics,n.metrics,r.metrics)}function Zm(e,t){let n=Bm(e);if(n===null||typeof document>`u`)return!1;let r=n.ownerDocument??document,i=Km(r),a=Um(n),o=`${i.epoch}:${Vm(e.font,`<size>`)}:${a}:${t}`,s=i.cache.get(o);if(s!==void 0)return s;let c=!1,l=r.body??r.documentElement;if(!l)return!1;let u=i.canvas.isConnected;u||l.appendChild(i.canvas);let d=i.canvas.getContext(`2d`,{willReadFrequently:!0});if(d!==null){let n=i.canvas.style.fontFeatureSettings;try{d.font=Vm(e.font,`200px`),d.fillStyle=`#000`,d.textAlign=`center`,d.textBaseline=`middle`;let n=Hm(a,!1),r=Hm(a,!0),i=Jm(d,t,n),o=Jm(d,t,n),s=Jm(d,t,r),l=Jm(d,t,r);c=i!==null&&o!==null&&s!==null&&l!==null&&Xm(i,o,s,l)}catch{c=!1}finally{i.canvas.style.fontFeatureSettings=n,d.font=d.font,d.clearRect(0,0,i.canvas.width,i.canvas.height),u||i.canvas.remove()}}return i.cache.set(o,c),c}function Qm(e,t){let n=e.canvas;return n?.style?Gm(e,()=>{let r=n.style,i=r.fontFeatureSettings;r.fontFeatureSettings=Hm(Um(n)),e.font=e.font;try{return t()}finally{r.fontFeatureSettings=i,e.font=e.font}}):t()}function $m(e,t){return Qm(e,()=>{let n=e.textAlign,r=e.textBaseline;e.textAlign=`center`,e.textBaseline=`middle`;try{let n=e.measureText(t),r=Number.isFinite(n.width)?Math.max(0,n.width):0,i=typeof n.actualBoundingBoxAscent==`number`&&Number.isFinite(n.actualBoundingBoxAscent)&&typeof n.actualBoundingBoxDescent==`number`&&Number.isFinite(n.actualBoundingBoxDescent);return{advancePx:r,inkBeforePx:i?n.actualBoundingBoxAscent:0,inkAfterPx:i?n.actualBoundingBoxDescent:0,cellAdvancePx:r,originInCellPx:r/2}}finally{e.textAlign=n,e.textBaseline=r}})}const eh=e=>e===32||e===12288;function th(e,t,n={}){if(Math.abs(t)<=.5)return null;let r=n.firstContentSi??0,i=n.lastDrawnSi??e.length-1,a=n.minPerGap??-1/0,o=n.isGapChar??em,s=n.isWhitespace??eh,c=n.seaClusterGaps??!1,l=[];for(let t=r;t<e.length;t++){let n=e[t];if(n===void 0)continue;if(n.text===void 0){l.push({si:t,off:0,ws:!1});continue}let r=0;for(let e of n.text){let n=e.codePointAt(0);l.push({si:t,off:r,cp:n,ws:s(n)}),r++}}let u=-1,d=-1;for(let e=0;e<l.length;e++)l[e].ws||(u===-1&&(u=e),d=e);if(u===-1||u===d)return null;let f=Array(l.length).fill(!1),p=0;for(let e=u;e<d;e++){let t=l[e];if(t.si===i)continue;if(t.ws){f[e]=!0,p++;continue}let n=l[e+1];if(n.ws)continue;let r=t.cp,a=n.cp;(r!==void 0&&o(r)||a!==void 0&&o(a)||c&&r!==void 0&&a!==void 0&&um(r)&&um(a)&&!dm(a))&&(f[e]=!0,p++)}if(p===0)return null;let m=t/p;t<0&&m<a&&(m=a);let h=new Map;for(let e of l)e.cp!==void 0&&h.set(e.si,(h.get(e.si)??0)+1);let g=new Map;for(let e=0;e<l.length;e++){if(!f[e])continue;let t=l[e],n=g.get(t.si);n||(n={splitBefore:[],trailingGap:!1,internalStretch:0},g.set(t.si,n));let r=h.get(t.si)??0;t.cp===void 0||t.off===r-1?n.trailingGap=!0:(n.splitBefore.push(t.off+1),n.internalStretch+=m)}return{perGap:m,perSeg:g}}const nh=[[1e3,`M`],[900,`CM`],[500,`D`],[400,`CD`],[100,`C`],[90,`XC`],[50,`L`],[40,`XL`],[10,`X`],[9,`IX`],[5,`V`],[4,`IV`],[1,`I`]];function rh(e){let t=``,n=e;for(let[e,r]of nh)for(;n>=e;)t+=r,n-=e;return t}function ih(e,t){let n=t.length,r=Math.floor((e-1)/n)+1;return t[(e-1)%n].repeat(r)}const ah=Array.from({length:26},(e,t)=>String.fromCharCode(65+t)),oh=`أ.ب.ت.ث.ج.ح.خ.د.ذ.ر.ز.س.ش.ص.ض.ط.ظ.ع.غ.ف.ق.ك.ل.م.ن.ه.و.ي`.split(`.`),sh=`أ.ب.ج.د.ه.و.ز.ح.ط.ي.ك.ل.م.ن.س.ع.ف.ص.ق.ر.ش.ت.ث.خ.ذ.ض.غ.ظ`.split(`.`),ch=[`א`,`ב`,`ג`,`ד`,`ה`,`ו`,`ז`,`ח`,`ט`,`י`,`כ`,`ל`,`מ`,`נ`,`ס`,`ע`,`פ`,`צ`,`ק`,`ר`,`ש`,`ת`],lh=[...gh(1072,1080),...gh(1082,1087),...gh(1088,1097),`ы`,`э`,`ю`,`я`],uh=[...gh(1040,1048),...gh(1050,1055),...gh(1056,1065),`Ы`,`Э`,`Ю`,`Я`],dh=[`ก`,`ข`,`ค`,...gh(3591,3619),`ล`,...gh(3623,3630)],fh=[`ㄱ`,`ㄴ`,`ㄷ`,`ㄹ`,`ㅁ`,`ㅂ`,`ㅅ`,`ㅇ`,`ㅈ`,`ㅊ`,`ㅋ`,`ㅌ`,`ㅍ`,`ㅎ`],ph=[`가`,`나`,`다`,`라`,`마`,`바`,`사`,`아`,`자`,`차`,`카`,`타`,`파`,`하`],mh=gh(2325,2361),hh=[...gh(2309,2324),`अं`,`अः`];function gh(e,t){let n=[];for(let r=e;r<=t;r++)n.push(String.fromCodePoint(r));return n}const _h=`ア.イ.ウ.エ.オ.カ.キ.ク.ケ.コ.サ.シ.ス.セ.ソ.タ.チ.ツ.テ.ト.ナ.ニ.ヌ.ネ.ノ.ハ.ヒ.フ.ヘ.ホ.マ.ミ.ム.メ.モ.ヤ.ユ.ヨ.ラ.リ.ル.レ.ロ.ワ.ヰ.ヱ.ヲ.ン`.split(`.`),vh=[...gh(65393,65436),`ヲ`,`ン`];function yh(e){return e<=20?String.fromCodePoint(9312+(e-1)):String(e)}function bh(e,t){return String(e).split(``).map(e=>t[e.charCodeAt(0)-48]).join(``)}const xh=gh(65296,65305),Sh=gh(3664,3673),Ch=gh(2406,2415),wh=[`〇`,`一`,`二`,`三`,`四`,`五`,`六`,`七`,`八`,`九`],Th=[`영`,`일`,`이`,`삼`,`사`,`오`,`육`,`칠`,`팔`,`구`],Eh=[`零`,`一`,`二`,`三`,`四`,`五`,`六`,`七`,`八`,`九`],Dh=[`○`,`一`,`二`,`三`,`四`,`五`,`六`,`七`,`八`,`九`];function Oh(e,t){if(e<10)return t[e];if(e<100){let n=Math.floor(e/10),r=e%10,i=n===1?`十`:t[n]+`十`;return r===0?i:i+t[r]}return bh(e,t)}function kh(e,t){switch(t){case`upperRoman`:return e>=1?rh(e):String(e);case`lowerRoman`:return e>=1?rh(e).toLowerCase():String(e);case`upperLetter`:return e>=1?ih(e,ah):String(e);case`lowerLetter`:return e>=1?ih(e,ah).toLowerCase():String(e);case`arabicAlpha`:return e>=1?ih(e,oh):String(e);case`arabicAbjad`:return e>=1?ih(e,sh):String(e);case`russianLower`:return e>=1?ih(e,lh):String(e);case`russianUpper`:return e>=1?ih(e,uh):String(e);case`thaiLetters`:return e>=1?ih(e,dh):String(e);case`chosung`:return e>=1?ih(e,fh):String(e);case`ganada`:return e>=1?ih(e,ph):String(e);case`hindiVowels`:return e>=1?ih(e,mh):String(e);case`hindiConsonants`:return e>=1?ih(e,hh):String(e);case`aiueoFullWidth`:return e>=1?ih(e,_h):String(e);case`aiueo`:return e>=1?ih(e,vh):String(e);case`decimalEnclosedCircle`:return e>=1?yh(e):String(e);case`hebrew1`:return e>=1?Nh(e):String(e);case`hebrew2`:return e>=1?Ph(e):String(e);case`hex`:return e>=1?e.toString(16).toUpperCase():String(e);case`numberInDash`:return e>=1?`- ${e} -`:String(e);case`decimalZero`:return e>=1&&e<=9?`0${e}`:String(e);case`decimalFullWidth`:return e>=1?bh(e,xh):String(e);case`decimalHalfWidth`:return String(e);case`thaiNumbers`:return e>=1?bh(e,Sh):String(e);case`hindiNumbers`:return e>=1?bh(e,Ch):String(e);case`ideographDigital`:case`japaneseDigitalTenThousand`:return e>=1?bh(e,wh):String(e);case`koreanDigital`:return e>=1?bh(e,Th):String(e);case`koreanDigital2`:return e>=1?bh(e,Eh):String(e);case`taiwaneseDigital`:return e>=1?bh(e,Dh):String(e);case`chineseCounting`:return e>=1?Oh(e,wh):String(e);case`taiwaneseCounting`:return e>=1?Oh(e,Dh):String(e);case`chineseCountingThousand`:return e>=1?Uh(e,Ih):String(e);case`taiwaneseCountingThousand`:return e>=1?Uh(e,Lh):String(e);case`chineseLegalSimplified`:return e>=1?Uh(e,zh):String(e);case`ideographLegalTraditional`:return e>=1?Uh(e,Vh):String(e);case`japaneseCounting`:return e>=1?Uh(e,Fh):String(e);case`japaneseLegal`:return e>=1?Uh(e,Bh):String(e);case`koreanCounting`:return e>=1?Uh(e,Rh):String(e);case`koreanLegal`:return e>=1?Kh(e):String(e);default:return String(e)}}const Ah=[``,`א`,`ב`,`ג`,`ד`,`ה`,`ו`,`ז`,`ח`,`ט`],jh=[``,`י`,`כ`,`ל`,`מ`,`נ`,`ס`,`ע`,`פ`,`צ`],Mh=[``,`ק`,`ר`,`ש`,`ת`,`ך`,`ם`,`ן`,`ף`,`ץ`];function Nh(e){let t=``,n=e,r=Math.floor(n/1e3);n%=1e3;let i=Math.floor(n/100);if(n%=100,r>0&&(t+=Ah[r%10]),t+=Mh[i],n===15)return t+`טו`;if(n===16)return t+`טז`;let a=Math.floor(n/10),o=n%10;return t+=jh[a],t+=Ah[o],t}function Ph(e){let t=ch.length,n=Math.floor((e-1)/t);return ch[e-t*n-1]+`ת`.repeat(n)}const Fh={digits:Eh,ten:`十`,hundred:`百`,thousand:`千`,myriad:`万`,elideOne:!0,insertZero:!1},Ih={...Fh,elideOne:!1,insertZero:!0},Lh={...Ih},Rh={digits:[`영`,`일`,`이`,`삼`,`사`,`오`,`육`,`칠`,`팔`,`구`],ten:`십`,hundred:`백`,thousand:`천`,myriad:`만`,elideOne:!0,insertZero:!1},zh={digits:[`零`,`壹`,`贰`,`叁`,`肆`,`伍`,`陆`,`柒`,`捌`,`玖`],ten:`拾`,hundred:`佰`,thousand:`仟`,myriad:`万`,elideOne:!1,insertZero:!0},Bh={digits:[`零`,`壱`,`弐`,`参`,`四`,`伍`,`六`,`七`,`八`,`九`],ten:`拾`,hundred:`百`,thousand:`阡`,myriad:`萬`,elideOne:!1,insertZero:!1},Vh={digits:[`零`,`壹`,`貳`,`參`,`肆`,`伍`,`陸`,`柒`,`捌`,`玖`],ten:`拾`,hundred:`佰`,thousand:`仟`,myriad:`萬`,elideOne:!1,insertZero:!1};function Hh(e,t,n){let r=Math.floor(e/1e3)%10,i=Math.floor(e/100)%10,a=Math.floor(e/10)%10,o=e%10,s=[{digit:r,unit:t.thousand},{digit:i,unit:t.hundred},{digit:a,unit:t.ten},{digit:o,unit:``}],c=``,l=!1,u=!1;for(let{digit:e,unit:r}of s){if(e===0){l&&(u=!0);continue}u&&=(t.insertZero&&(c+=t.digits[0]),!1),n&&e===1&&r?c+=r:c+=t.digits[e]+r,l=!0}return c}function Uh(e,t){if(e>=1e8){let n=Math.floor(e/1e8),r=e%1e8,i=Uh(n,t)+`億`;return r===0?i:i+(t.insertZero&&r<1e7?t.digits[0]:``)+Uh(r,t)}let n=Math.floor(e/1e4),r=e%1e4,i=``;return n>0&&(i+=Hh(n,t,t.elideOne)+t.myriad),r>0&&(t.insertZero&&n>0&&r<1e3&&(i+=t.digits[0]),i+=Hh(r,t,t.elideOne)),i}const Wh=[``,`하나`,`둘`,`셋`,`넷`,`다섯`,`여섯`,`일곱`,`여덟`,`아홉`],Gh=[``,`열`,`스물`,`서른`,`마흔`,`쉰`,`예순`,`일흔`,`여든`,`아흔`];function Kh(e){if(e>=100)return String(e);let t=Math.floor(e/10),n=e%10;return Gh[t]+Wh[n]}const qh={Arabic:`decimal`,ArabicDash:`numberInDash`,Hex:`hex`,Roman:`upperRoman`,roman:`lowerRoman`,ALPHABETIC:`upperLetter`,alphabetic:`lowerLetter`,ARABICABJAD:`arabicAbjad`,ARABICALPHA:`arabicAlpha`,HEBREW1:`hebrew1`,HEBREW2:`hebrew2`,HINDIARABIC:`hindiNumbers`,HINDILETTER1:`hindiVowels`,HINDILETTER2:`hindiConsonants`,THAIARABIC:`thaiNumbers`,THAILETTER:`thaiLetters`,CHOSUNG:`chosung`,GANADA:`ganada`,DBCHAR:`decimalFullWidth`,SBCHAR:`decimalHalfWidth`};function Jh(e){let t=/\\\*\s+(\S+)/g,n;for(;(n=t.exec(e))!==null;){let e=qh[n[1]];if(e)return e}return null}const Yh=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],Xh=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],Zh=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],Qh=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],$h=e=>e<10?`0${e}`:`${e}`;function eg(e){let t=/\\@\s*"([^"]*)"/.exec(e);if(t)return t[1];let n=/\\@\s*(\S+)/.exec(e);return n?n[1]:null}function tg(e,t){let n=t.getFullYear(),r=t.getMonth(),i=t.getDate(),a=t.getDay(),o=t.getHours(),s=o%12==0?12:o%12,c=t.getMinutes(),l=t.getSeconds(),u=o>=12,d=``,f=0,p=e.length;for(;f<p;){let t=e[f];if(t===`'`){f++;let t=``;for(;f<p;){if(e[f]===`'`){if(e[f+1]===`'`){t+=`'`,f+=2;continue}f++;break}t+=e[f++]}d+=t;continue}if(/[A-Za-z]/.test(t)){let u=f;for(;u<p&&e[u]===t;)u++;let m=e.slice(f,u).length,h=t.toLowerCase(),g=null;if(t===`y`||t===`Y`?g=m>=4?String(n).padStart(4,`0`):$h(n%100):t===`M`?g=m>=4?Yh[r]:m===3?Xh[r]:m===2?$h(r+1):String(r+1):h===`d`?g=m>=4?Zh[a]:m===3?Qh[a]:m===2?$h(i):String(i):t===`H`?g=m>=2?$h(o):String(o):t===`h`?g=m>=2?$h(s):String(s):t===`m`?g=m>=2?$h(c):String(c):t===`s`?g=m>=2?$h(l):String(l):(h===`a`||h===`p`)&&(g=null),g!==null){d+=g,f=u;continue}if(!(h===`a`||h===`p`))return null}let m=/^([AaPp])([Mm])?\/([AaPp])([Mm])?/.exec(e.slice(f));if(m){let e=m[2]!==void 0;d+=e?u?`PM`:`AM`:u?`P`:`A`,f+=m[0].length;continue}d+=t,f++}return d}const ng=[[e=>e.includes(`meiryo ui`)||e.includes(`meiryoui`)||e.includes(`メイリオ`)&&e.includes(`ui`),{asc:2171*1.3/2048,desc:430*1.3/2048,eaOnly:!0}],[e=>e.includes(`meiryo`)||e.includes(`メイリオ`),{asc:2210/2048,desc:1059/2048}],[e=>!e.includes(`ui`)&&(e.includes(`yu mincho`)||e.includes(`yumincho`)||e.includes(`游明朝`)||e.includes(`yu gothic`)||e.includes(`yugothic`)||e.includes(`游ゴシック`)),{asc:1802*1.3/2048,desc:455*1.3/2048,eaOnly:!0}],[e=>e.includes(`sakkal majalla`)||e.includes(`majalla`),{asc:1810/2048,desc:1050/2048}],[e=>e===`times new roman`,{asc:1825/2048,desc:530/2048}],[e=>e===`arial`,{asc:1854/2048,desc:501/2048}]];function rg(e,t){if(!e)return null;let n=e.toLowerCase();for(let[e,r]of ng)if(e(n)&&(t||!r.eaOnly))return r;return null}function ig(e,t=!1){let n=rg(e,t);return n===null?null:n.asc+n.desc}function ag(e,t,n=!1){let r=ig(e,n);return r===null?0:r*t}function og(e,t,n,r,i=!1){let a=rg(e,i);if(a===null)return{ascent:n,descent:r};let o=(a.asc+a.desc)*t;return n+r<=o?{ascent:n,descent:r}:{ascent:a.asc*t,descent:a.desc*t}}function sg(e){return e.trim().toLowerCase()}function cg(e){return`local("${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}")`}function lg(e){return`__ooxml_local_${[...e].map(e=>(e.codePointAt(0)??0).toString(16).padStart(6,`0`)).join(``)}`}function ug(){return typeof OffscreenCanvas<`u`?new OffscreenCanvas(1,1).getContext(`2d`):typeof document<`u`&&document?.createElement?document.createElement(`canvas`).getContext(`2d`):null}async function dg(e){let t=P();if(!t||typeof FontFace>`u`)return{faces:[],metrics:{}};let n=[],r={},i=new Map;for(let t of e){let e=t.family.trim(),n=t.localNames.map(e=>e.trim()).filter(Boolean);if(!e||n.length===0||t.lineHeightMultiplier!=null&&!(t.lineHeightMultiplier>0))continue;let r=t.weight??400,a=t.style??`normal`;if(!(r>=100&&r<=900)||a!==`normal`&&a!==`italic`)continue;let o=n.map(cg).join(`, `),s=sg(e),c=`local-face:${o}:${r}:${a}`,l=i.get(c)??{source:o,requests:[]};l.requests.push({...t,family:e,normalizedFamily:s,source:o,weight:r,style:a}),i.set(c,l)}for(let[e,a]of i){let i=lg(e),{face:o}=k(e,t,()=>{let e=a.requests[0],n=new FontFace(i,a.source,{weight:String(e.weight),style:e.style});return t.add(n),n});try{if(!await j(o.load())||o.status!==`loaded`)throw Error(`local font load timed out`);let e=!1;for(let t of a.requests){let n;if(t.lineHeightMultiplier!=null){let e=ug();if(!e)continue;e.font=`${t.style} ${t.weight} 100px "${i}"`;let r=e.measureText(`Hg国`),a=r.fontBoundingBoxAscent,o=r.fontBoundingBoxDescent;if(!(Number.isFinite(a)&&Number.isFinite(o)&&a+o>0))continue;n=(a+o)/100*t.lineHeightMultiplier}let a=t.weight===400&&t.style===`normal`?t.normalizedFamily:`${t.normalizedFamily}:${t.weight}:${t.style}`;r[a]={family:i,...n==null?{}:{lineHeightRatio:n},requestedFamily:t.family,weight:t.weight,style:t.style,sourceIdentity:t.source,synthesized:!1},e=!0}if(!e)throw Error(`exact local font route unavailable`);n.push(o)}catch{A([o])}}return{faces:n,metrics:r}}function fg(e){A(e)}const pg=[{test:e=>e===`georgia`,biasEm:.0105}];function mg(e){return(e??``).trim().replace(/^["']|["']$/g,``).replace(/\s+/g,` `).toLowerCase()}function hg(e){let t=mg(e);for(let e of pg)if(e.test(t))return e.biasEm;return 0}function gg(e,t){if(!Number.isSafeInteger(e)||e<=0)throw TypeError(`${t} must be a positive safe integer`)}function _g(e){if(!Number.isSafeInteger(e)||e<0)throw TypeError(`cache entry weight must be a non-negative safe integer`)}var vg=class{#e;#t;#n;#r;#i=new Map;#a=new Map;#o=0;constructor(e){gg(e.maxEntries,`maxEntries`),gg(e.maxWeight,`maxWeight`),this.#e=e.maxEntries,this.#t=e.maxWeight,this.#n=e.measure,this.#r=e.onRemove}get usage(){return{entries:this.#i.size,weight:this.#o,pending:this.#a.size}}has(e){return this.#i.has(e)}get(e){let t=this.#i.get(e);if(t!==void 0)return this.#i.delete(e),this.#i.set(e,t),t.value}getOrLoad(e,t){let n=this.get(e);if(n!==void 0||this.#i.has(e))return Promise.resolve(n);let r=this.#a.get(e);if(r!==void 0)return r.promise;let i={},a=Promise.resolve().then(t).then(t=>this.#c(e,i,t),t=>{throw this.#s(e,i),t});return this.#a.set(e,{token:i,promise:a}),a}delete(e){let t=this.#a.delete(e),n=this.#i.get(e);return n===void 0?t:(this.#i.delete(e),this.#o-=n.weight,this.#l(n.value,e,`deleted`),!0)}clear(){this.#a.clear();let e=[...this.#i];this.#i.clear(),this.#o=0;for(let[t,n]of e)this.#l(n.value,t,`cleared`)}#s(e,t){this.#a.get(e)?.token===t&&this.#a.delete(e)}#c(e,t,n){if(this.#a.get(e)?.token!==t)return n;let r;try{r=this.#n(n),_g(r)}catch(n){throw this.#s(e,t),n}if(this.#a.get(e)?.token!==t||(this.#a.delete(e),r>this.#t))return n;let i=[];for(;this.#i.size>=this.#e||r>this.#t-this.#o;){let e=this.#i.entries().next().value;if(e===void 0)break;let[t,n]=e;this.#i.delete(t),this.#o-=n.weight,i.push([t,n])}this.#i.set(e,{value:n,weight:r}),this.#o+=r;for(let[e,t]of i)this.#l(t.value,e,`evicted`);return n}#l(e,t,n){try{this.#r?.(e,t,n)}catch{}}},yg=class{#e;constructor(e){this.#e=new vg({maxEntries:e.maxEntries,maxWeight:e.maxBytes,measure:e=>e.size})}get usage(){let e=this.#e.usage;return{entries:e.entries,bytes:e.weight,pending:e.pending}}async get(e,t,n){if(typeof e!=`string`||e.length===0)throw TypeError(`raw package part path must be a non-empty string`);if(typeof t!=`string`)throw TypeError(`raw package part MIME type must be a string`);let r=await this.#e.getOrLoad(e,async()=>{let e=await n();if(!(e instanceof Blob))throw TypeError(`raw package part loader must return a Blob`);return e});return t===``||r.type===t?r:r.slice(0,r.size,t)}clear(){this.#e.clear()}};function bg(e,t=`$`){if(e===null||typeof e==`boolean`||typeof e==`number`||typeof e==`string`)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map((e,n)=>bg(e,`${t}[${n}]`)).join(`,`)}]`;if(typeof e==`object`){let n=e;return`{${Object.keys(n).sort().map(e=>`${JSON.stringify(e)}:${bg(n[e],`${t}.${e}`)}`).join(`,`)}}`}throw TypeError(`Cannot fingerprint ${typeof e} at ${t}`)}function xg(e,t){let n=bg(t);return`${e}:${encodeURIComponent(n)}`}function Sg(e){return`${e.story}:${encodeURIComponent(e.storyInstance)}:${e.path.join(`.`)}`}function Cg(e,t,n){if(t.length===0||n.length===0)throw RangeError(`Body occurrence identity requires a flow domain and fragment start`);return[`body-occurrence`,encodeURIComponent(Sg(e)),encodeURIComponent(t),encodeURIComponent(n)].join(`/`)}function wg(e,t){return`image:${Sg(e)}:${encodeURIComponent(t)}`}function Tg(e,t){return`math:${Sg(e)}:${encodeURIComponent(t)}`}function Eg(e){return xg(`chart-resource`,e)}function Dg(e,t){return`anchor:${Sg(e)}:${encodeURIComponent(t)}`}function Og(e,t,n=new WeakSet,r=new WeakSet){if(e==null||typeof e==`string`||typeof e==`boolean`)return;if(typeof e==`number`){if(!Number.isFinite(e))throw TypeError(`${t} must contain finite numbers`);return}if(typeof e!=`object`||n.has(e))throw TypeError(`${t} must be structured-clone-safe plain data`);if(r.has(e))return;let i=Object.getPrototypeOf(e);if(!Array.isArray(e)&&i!==Object.prototype&&i!==null)throw TypeError(`${t} must be structured-clone-safe plain data`);if(Object.getOwnPropertySymbols(e).length!==0)throw TypeError(`${t} must contain only enumerable string data properties`);n.add(e);try{for(let i of Object.getOwnPropertyNames(e)){if(Array.isArray(e)&&i===`length`)continue;let a=Object.getOwnPropertyDescriptor(e,i);if(!a||!a.enumerable||!(`value`in a))throw TypeError(`${t}.${i} must be an enumerable data property`);Og(a.value,`${t}.${i}`,n,r)}}finally{n.delete(e)}r.add(e)}function kg(e,t=new WeakSet){if(typeof e!=`object`||!e||t.has(e))return e;t.add(e);for(let n of Object.values(e))kg(n,t);return Object.freeze(e)}function Ag(e,t){Og(e,t);try{return kg(structuredClone(e))}catch{throw TypeError(`${t} must be structured-clone-safe plain data`)}}function jg(e,t){return Og(e,t),kg(e)}function Mg(e,t){if(typeof e!=`string`||e.trim().length===0)throw TypeError(`${t} must be a non-empty string`)}function Ng(e,t){if(!Number.isFinite(e)||e<0)throw TypeError(`${t} must be finite and non-negative`)}function Pg(e,t){if(!Number.isFinite(e))throw TypeError(`${t} must be finite`)}function Fg(e,t){if(!Number.isFinite(e)||e<0||e>1)throw TypeError(`${t} must be between 0 and 1`)}function Ig(e,t){Ng(e.widthPt,`${t}.widthPt`),Ng(e.heightPt,`${t}.heightPt`)}function Lg(e){switch(Mg(e.resourceKey,`resourceKey`),e.kind){case`image`:case`picture-bullet`:if(e.documentOrder!==void 0&&(!Number.isSafeInteger(e.documentOrder)||e.documentOrder<0))throw TypeError(`documentOrder must be a non-negative safe integer`);if(Mg(e.partPath,`partPath`),Mg(e.mimeType,`mimeType`),e.svgImagePath!==void 0&&Mg(e.svgImagePath,`svgImagePath`),Ig(e.intrinsicSize,`intrinsicSize`),e.alpha!==void 0&&Fg(e.alpha,`alpha`),e.rotation!==void 0&&!Number.isFinite(e.rotation))throw TypeError(`rotation must be finite`);e.srcRect!==void 0&&(Pg(e.srcRect.l,`srcRect.l`),Pg(e.srcRect.t,`srcRect.t`),Pg(e.srcRect.r,`srcRect.r`),Pg(e.srcRect.b,`srcRect.b`));break;case`chart`:Ig(e.intrinsicSize,`intrinsicSize`);break;case`math`:break;default:throw TypeError(`Unknown paint resource kind: ${String(e)}`)}}function Rg(e){return Lg(e),Ag(e,`paint resource ${e.resourceKey}`)}function zg(e,t,n){return Error(`Paint resource kind mismatch for ${e}: expected ${t}, got ${n}`)}function Bg(e){let t=new Set;for(let n of e){if(t.has(n.resourceKey))throw Error(`Duplicate paint resource key: ${n.resourceKey}`);t.add(n.resourceKey)}let n=e.map(Rg).sort((e,t)=>e.resourceKey.localeCompare(t.resourceKey));return Vg(Object.freeze(n))}function Vg(e){if(!Object.isFrozen(e))throw TypeError(`Owned paint descriptors must be sealed`);let t=null;for(let n of e){if(Lg(n),!Object.isFrozen(n))throw TypeError(`Owned paint descriptor must be sealed: ${n.resourceKey}`);if(t!==null&&n.resourceKey.localeCompare(t)<=0)throw Error(`Owned paint descriptors must have unique sorted keys: ${n.resourceKey}`);t=n.resourceKey}let n=e,r=new Map(n.map(e=>[e.resourceKey,e])),i=Object.freeze(n.map(e=>e.resourceKey));return Object.freeze({keys:i,descriptors:n,resolve(e,t){let n=r.get(e);if(!n)throw Error(`Unknown paint resource: ${e}`);if(n.kind!==t)throw zg(e,t,n.kind);return n}})}function Hg(e){return Eg(e)}function Ug(e,t,n,r={}){return{kind:e,resourceKey:t,partPath:n,...r.svgImagePath===void 0?{}:{svgImagePath:r.svgImagePath},...r.srcRect==null?{}:{srcRect:{...r.srcRect}},...r.rotation===void 0?{}:{rotation:r.rotation},...r.flipH===void 0?{}:{flipH:r.flipH},...r.flipV===void 0?{}:{flipV:r.flipV},...r.alpha===void 0?{}:{alpha:r.alpha},...r.colorReplaceFrom===void 0?{}:{colorReplaceFrom:r.colorReplaceFrom},...r.duotone===void 0?{}:{duotone:{...r.duotone}}}}function Wg(e,t,n,r){let i=[],a=[],o=[],s=(e,t,n,r,o,s,c={})=>{let l=wg(t,n);i.push(Ug(e,l,n,c)),a.push({resourceKey:l,mimeType:r,widthPt:o,heightPt:s})},c=(e,t)=>{if(e.type===`image`){s(`image`,t,e.imagePath,e.mimeType,e.widthPt,e.heightPt,e);return}if(e.type===`chart`){o.push({kind:`chart`,resourceKey:Hg(t),intrinsicSize:{widthPt:e.widthPt,heightPt:e.heightPt},model:e.chart});return}if(e.type!==`shape`)return;let n=e;n.fill?.fillType===`image`&&s(`image`,t,n.fill.imagePath,n.fill.mimeType,n.widthPt,n.heightPt,{...n.fill.svgImagePath===void 0?{}:{svgImagePath:n.fill.svgImagePath},...n.fill.srcRect===void 0?{}:{srcRect:{...n.fill.srcRect}},...n.fill.alpha===void 0?{}:{alpha:n.fill.alpha},...n.fill.duotone===void 0?{}:{duotone:n.fill.duotone}});let r=`${t.story}:${t.storyInstance}:${t.path.join(`.`)}`;if(n.textBoxContent!==void 0){f(n.textBoxContent,`textbox`,r);return}n.textBlocks?.forEach((e,t)=>{if(e.imagePath){if(!e.mimeType||e.imageWidthPt==null||e.imageHeightPt==null)throw Error(`Text-box compatibility image requires complete metadata`);s(`image`,{story:`textbox`,storyInstance:r,path:[t,0]},e.imagePath,e.mimeType,e.imageWidthPt,e.imageHeightPt,{svgImagePath:e.svgImagePath})}})},l=(e,t,n,r)=>{e.rows.forEach((e,i)=>e.cells.forEach((e,a)=>{f(e.content,t,n,[...r,i,a])}))},u=(e,t,n)=>{if(e)for(let r of[`default`,`first`,`even`]){let i=e[r];i&&f(i.body,t,n?`${n}:${r}`:r)}},d=(e,n)=>{let i=e.numbering;if(i?.picBulletImagePath){let t=r?.(e),a=i.picBulletWidthPt??t?.widthPt,o=i.picBulletHeightPt??t?.heightPt;if(!i.picBulletMimeType||a==null||o==null)throw Error(`Picture bullet requires complete metadata`);s(`picture-bullet`,n,i.picBulletImagePath,i.picBulletMimeType,a,o)}let a=t?.paragraphAcquisitionInput(e,n).runs??e.runs,o=0;a.forEach((t,r)=>{if(t.type===`unavailableDrawing`)return;let i=e.runs[o++];i&&(i.type===`image`||i.type===`chart`||i.type===`shape`)&&c(i,{...n,path:[...n.path,r]})})},f=(e,t,n,r=[])=>{e.forEach((e,i)=>{let a=[...r,i];e.type===`paragraph`?d(e,{story:t,storyInstance:n,path:a}):e.type===`table`?l(e,t,n,a):e.type===`sectionBreak`&&(u(e.headers,`header`,`section:${i}`),u(e.footers,`footer`,`section:${i}`))})};f(e.body,`body`,`body`),u(e.headers,`header`),u(e.footers,`footer`);for(let t of e.footnotes??[])f(t.content,`footnote`,t.id);for(let t of e.endnotes??[])f(t.content,`endnote`,t.id);let p=new Map(a.map(e=>[e.resourceKey,e]));if(p.size!==a.length)throw Error(`Duplicate image resource key`);for(let[e,t]of i.entries()){let n=p.get(t.resourceKey);if(!n)throw Error(`Missing layout image metadata: ${t.resourceKey}`);o.push({...t,documentOrder:e,mimeType:n.mimeType,intrinsicSize:{widthPt:n.widthPt,heightPt:n.heightPt}})}for(let e of n)o.push({kind:`math`,resourceKey:e.resourceKey});return{imageMetadata:a,descriptors:o}}function Gg(e,t,n,r){let i=Wg(e,t,n,r);return Object.freeze({imageMetadata:Object.freeze(i.imageMetadata.map(e=>Object.freeze({...e}))),paintResources:Bg(i.descriptors)})}function Kg(e,t){if(!Number.isFinite(e)||e<0)throw RangeError(`${t} must be finite and non-negative`);return e}function qg(e){let t=[...e].map(e=>Object.freeze({resourceKey:e.resourceKey,widthPt:Kg(e.widthPt,`widthPt`),heightPt:Kg(e.heightPt,`heightPt`),mimeType:e.mimeType})).sort((e,t)=>e.resourceKey.localeCompare(t.resourceKey)),n=new Map(t.map(({resourceKey:e,...t})=>[e,Object.freeze(t)]));if(n.size!==t.length)throw Error(`Duplicate image resource key`);return Object.freeze({fingerprint:xg(`images`,t),resolve(e){let t=n.get(e);if(!t)throw Error(`Unknown image resource: ${e}`);return t}})}function Jg(e){let t=[...e].map(e=>Object.freeze({resourceKey:e.resourceKey,widthEm:Kg(e.widthEm,`widthEm`),ascentEm:Kg(e.ascentEm,`ascentEm`),descentEm:Kg(e.descentEm,`descentEm`),diagnostics:Object.freeze(e.diagnostics.map(e=>Object.freeze({...e}))),...e.available===!1?{available:!1}:{}})).sort((e,t)=>e.resourceKey.localeCompare(t.resourceKey)),n=new Map(t.map(e=>[e.resourceKey,e]));if(n.size!==t.length)throw Error(`Duplicate math resource key`);return Object.freeze({fingerprint:xg(`math`,t),resolve(e){let t=n.get(e);if(!t)throw Error(`Unknown math resource: ${e}`);return t}})}function Yg(e){let t=new Map(e),n=Object.freeze([...t.keys()].sort());return Object.freeze({keys:n,resolve(e){let n=t.get(e);if(n===void 0)throw Error(`Unknown runtime resource: ${e}`);return n}})}const Xg=new WeakMap,Zg=new WeakMap,Qg=new WeakMap,$g=new WeakMap,e_=new WeakMap,t_=new WeakMap,n_=new WeakMap;function r_(){let e=new WeakMap,t=new WeakMap,n=1;return Object.freeze({objectIdentity(t){let r=e.get(t);return r===void 0&&(r=n,n+=1,e.set(t,r)),r},get(e,n){return t.get(e)?.get(n)},set(e,n,r){let i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)}})}function i_(e,t){let n=[e.text,e.images,e.math],r=new Set(n.flatMap(e=>{let t=Zg.get(e);return t?[t]:[]}));if(r.size>1)throw Error(`Layout services combine foreign runtime owners`);let i=r.values().next().value,a=n.filter(e=>!Zg.has(e));if(i&&a.length>1)throw Error(`Layout services are missing service lineage for multiple components`);if(!i&&!t)return;let o=i??{};for(let e of n){let t=Zg.get(e);if(t&&t!==o)throw Error(`Layout services combine foreign runtime owners`);Zg.set(e,o)}return o}function a_(e,t){let n=i_(e,!0);if(Qg.has(n))throw Error(`Body layout kernel is already attached`);Qg.set(n,t)}function o_(e){let t=i_(e,!1);return t?Qg.get(t):void 0}function s_(e,t){let n=i_(e,!0);if($g.has(n))throw Error(`Layout source store is already attached`);$g.set(n,t)}function c_(e){let t=i_(e,!1);return t?$g.get(t):void 0}function l_(e,t){let n=i_(e,!0);if(e_.has(n))throw Error(`Vertical glyph measurement service is already attached`);e_.set(n,t)}function u_(e){let t=i_(e,!1),n=t?e_.get(t):void 0;if(!n)throw Error(`Vertical glyph measurement service is not attached`);return n}function d_(e,t){if(t_.has(e))throw Error(`Layout variant store is already attached`);t_.set(e,t)}function f_(e){return t_.get(e)}function p_(e,t,n=t.keys()){if(Xg.has(e))throw Error(`Private resource lookup is already attached`);let r=new Set(t.keys()),i=new Set(n),a=[...i].filter(e=>!r.has(e)).sort(),o=[...r].filter(e=>!i.has(e)).sort();if(a.length>0||o.length>0)throw Error(`Runtime resource membership mismatch: missing [${a.join(`, `)}]; extra [${o.join(`, `)}]`);Xg.set(e,Yg(t))}function m_(e){return Xg.get(e)}const h_=new WeakMap,g_=new WeakMap;function __(e,t={}){let n=Object.freeze({...e,...t}),r=o_(e);if(!r)throw Error(`Body layout kernel is not attached to the supplied services`);if(o_(n)!==r)throw Error(`Layout service view did not retain its body layout kernel owner`);let i=Xg.get(e);i&&Xg.set(n,i);let a=h_.get(e);a&&h_.set(n,a);let o=n_.get(e);return o&&n_.set(n,o),n}function v_(e){let t=__(e);return n_.set(t,r_()),t}function y_(e){return n_.get(e)}function b_(e,t){if(!Number.isInteger(t.totalPages)||t.totalPages<1)throw RangeError(`Field acquisition totalPages must be a positive integer`);let n=__(e);return g_.set(n,Object.freeze({...t})),n}function x_(e){return g_.get(e)??Object.freeze({totalPages:1})}function S_(e,t){if(h_.has(e))throw Error(`Paint resource registry is already attached`);h_.set(e,t)}function C_(e){let t=h_.get(e);if(!t)throw Error(`Paint resource registry is not attached`);return t}const w_=[`background`,`behindText`,`header`,`body`,`notes`,`front`,`footer`],T_=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0});function E_(e){return Object.freeze({kind:`clip`,clip:e})}function D_(e,t){return Object.freeze({kind:`transform`,transform:Object.freeze({...T_,e,f:t})})}function O_(e,t){if(!t.textBoxIds?.length)return Object.freeze([]);let n=new Map(e.textBoxes.map(e=>[e.id,e]));return Object.freeze(t.textBoxIds.flatMap(e=>{let t=n.get(e);return t?[t]:[]}))}function k_(e,t,n,r,i){if(e.kind===`drawing`){if(!e.anchorLayer)return;i.push(Object.freeze({drawing:e,textBoxes:Object.freeze([]),frames:Object.freeze([...n]),layoutTranslationPt:Object.freeze({...r}),encounterOrder:i.length,root:t}));return}if(e.kind!==`textbox`){if(e.kind===`note`){let a=e.story.clipBounds?Object.freeze([...n,E_(e.story.clipBounds)]):n;for(let n of e.story.blocks)k_(n,t,a,r,i);return}if(e.kind===`paragraph`){let a=e.clipBounds?Object.freeze([...n,E_(e.clipBounds)]):n;for(let n of e.drawings)n.anchorLayer&&i.push(Object.freeze({drawing:n,owner:e,textBoxes:O_(e,n),frames:Object.freeze([...a]),layoutTranslationPt:Object.freeze({...r}),encounterOrder:i.length,root:t}));return}M_(e,t,n,r,i)}}function A_(e,t,n,r,i,a){let o=t.xPt-e.flowBounds.xPt,s=t.yPt-e.flowBounds.yPt;k_(e,n,Object.freeze([...r,D_(o,s)]),Object.freeze({xPt:i.xPt+o,yPt:i.yPt+s}),a)}function j_(e,t,n,r,i){A_(e.child,{xPt:e.xPt-r.xPt,yPt:e.yPt-r.yPt},t,n,r,i)}function M_(e,t,n,r,i){let a=e.clipBounds?Object.freeze([...n,E_(e.clipBounds)]):n;for(let n of e.rows)for(let e of n.cells){let n=`visualMergeOwnership`in e&&e.visualMergeOwnership===`continuation`;if(e.verticalMerge===`continue`&&!n)continue;let o=e.clipBounds?Object.freeze([...a,E_(e.clipBounds)]):a;for(let n of e.blocks)A_(n.layout,{xPt:e.contentBounds.xPt+(n.layout.kind===`table`?n.layout.flowBounds.xPt:0),yPt:e.flowBounds.yPt+n.offsetPt+(n.layout.kind===`table`?n.layout.flowBounds.yPt:0)},t,o,r,i)}for(let n of e.resolvedFloatingTables??[])j_(n,t,a,r,i)}function N_(e){let t=e.drawing.anchorLayer;return Object.freeze({kind:`drawing`,layer:t.behindDoc?`behindText`:`front`,sourceLayer:e.root.layer,rootNodeId:e.root.node.id,coordinateSpace:e.root.coordinateSpace,flowDomainId:e.root.node.flowDomainId,node:e.drawing,...e.owner?{ownerNodeId:e.owner.id}:{},textBoxes:e.textBoxes,frames:e.frames,layoutTranslationPt:e.layoutTranslationPt})}function P_(e,t){return Object.freeze({kind:`node`,layer:e.layer,sourceLayer:e.layer,rootNodeId:e.node.id,coordinateSpace:e.coordinateSpace,flowDomainId:e.node.flowDomainId,node:e.node,omitAnchoredDrawings:t})}function F_(e,t){return e.drawing.anchorLayer.relativeHeight-t.drawing.anchorLayer.relativeHeight||e.drawing.anchorLayer.sourceOrder-t.drawing.anchorLayer.sourceOrder||e.encounterOrder-t.encounterOrder}function I_(e){let t=[];for(let n of e)k_(n.node,n,Object.freeze([]),Object.freeze({xPt:0,yPt:0}),t);let n=t.filter(({drawing:e})=>e.anchorLayer.behindDoc).sort(F_).map(N_),r=t.filter(({drawing:e})=>!e.anchorLayer.behindDoc).sort(F_).map(N_),i=new Set(t.map(({root:e})=>e.node)),a=e.flatMap(e=>e.node.kind===`drawing`&&e.node.anchorLayer?[]:[P_(e,i.has(e.node))]);return Object.freeze([...n,...a,...r])}function L_(e,t){return t.has(e)||(t.add(e),e.kind===`drawing`)?!1:e.kind===`paragraph`?e.lines.some(e=>e.placements.some(e=>e.kind===`text`&&e.paintOps?.some(e=>e.verticalFeature===!0)===!0))||e.textBoxes.some(e=>L_(e,t)):e.kind===`textbox`||e.kind===`note`?e.story.blocks.some(e=>L_(e,t)):e.rows.some(e=>e.cells.some(e=>e.blocks.some(e=>L_(e.layout,t))))||(e.resolvedFloatingTables??[]).some(e=>L_(e.child,t))}function R_(e){let t=Object.freeze(e.map(({layer:e,node:t,coordinateSpace:n})=>Object.freeze({layer:e,node:t,coordinateSpace:n??`section-logical`}))),n=new Map(w_.map(e=>[e,[]]));for(let e of t)n.get(e.layer).push(e.node);let r=[];for(let e=0;e<t.length;){let n=t[e].layer,i=e+1;for(;t[i]?.layer===n;)i+=1;let a=t.slice(e,i);n===`header`||n===`body`||n===`notes`||n===`footer`?r.push(...I_(a)):r.push(...a.map(e=>P_(e,!1))),e=i}let i=new Set;return Object.freeze({roots:t,paintOrder:Object.freeze(r),capabilities:Object.freeze({requiresElementBackedVerticalGlyphPaint:t.some(({node:e})=>L_(e,i))}),background:Object.freeze(n.get(`background`)),behindText:Object.freeze(n.get(`behindText`)),header:Object.freeze(n.get(`header`)),body:Object.freeze(n.get(`body`)),notes:Object.freeze(n.get(`notes`)),front:Object.freeze(n.get(`front`)),footer:Object.freeze(n.get(`footer`))})}var z_=class extends Error{constructor(e){super(e),this.name=`PageGraphError`}};const B_=R_;function V_(e,t,n){let r=new Map(n.map(e=>[e.id,e]));if(r.size!==n.length||n.length!==e[t].length)throw new z_(`Replacement ${t} layer must preserve unique paint node identities`);return B_(e.roots.map(e=>{if(e.layer!==t)return e;let n=r.get(e.node.id);if(!n)throw new z_(`Missing replacement paint node ${e.node.id}`);return{...e,node:n}}))}function H_(e){return e.layers.roots}function U_(e){let t=!1,n=!1;for(let r of e.layers.roots)if(r.layer===`body`){if(n)throw new z_(`Paint sequence must contain one contiguous body paint run; re-entered at ${r.node.id}`);t=!0}else t&&(n=!0);let r=new Map;for(let t of e.layers.roots){if(r.has(t.node.id))throw new z_(`Duplicate paint node ${t.node.id}`);r.set(t.node.id,t)}let i=new Map;for(let t of w_)for(let n of e.layers[t]){if(i.has(n.id))throw new z_(`Duplicate semantic page node ${n.id}`);i.set(n.id,{layer:t,node:n})}if(i.size!==r.size)throw new z_(`Semantic page layers do not match retained roots`);for(let[e,t]of r){let n=i.get(e);if(!n||n.layer!==t.layer||n.node!==t.node)throw new z_(`Paint root ${e} is not the retained ${t.layer} node`)}let a=new Set,o=new Set;for(let t of e.layers.paintOrder){let e=r.get(t.rootNodeId);if(!e)throw new z_(`Missing paint root ${t.rootNodeId}`);if(e.layer!==t.sourceLayer)throw new z_(`Paint root ${t.rootNodeId} belongs to ${e.layer}, not ${t.sourceLayer}`);if(a.add(t.rootNodeId),t.kind===`node`){if(t.node!==e.node||t.node.id!==t.rootNodeId)throw new z_(`Paint root ${t.rootNodeId} is not the retained ${t.sourceLayer} node`);continue}if(!t.node.anchorLayer)throw new z_(`Drawing paint entry ${t.node.id} is not anchored`);if(o.has(t.node.id))throw new z_(`Duplicate drawing paint reference ${t.node.id}`);o.add(t.node.id)}if(a.size!==r.size)throw new z_(`Missing paint-order reference for ${[...r.keys()].find(e=>!a.has(e))??`<unknown>`}`);return e.layers.roots.map(({node:e})=>e)}const W_=Object.freeze({story:`body`,storyInstance:`parse-error`,path:Object.freeze([])});function G_(e,t,n,r,i){let a=e.trim().split(/\s+/).filter(Boolean),o=[],s=``,c=e=>r.shape({text:e,fontSizePt:n,fonts:{},genericFamily:`sans-serif`}).advancePt,l=e=>{let n=[0,...Dm(e),e.length].filter((e,t,n)=>t===0||e!==n[t-1]),r=n.length-1;for(;r>0&&c(`${e.slice(0,n[r])}…`)>t;)--r;return`${e.slice(0,n[r]??0)}…`},u=()=>{o.length===0?o.push(l(``)):o[o.length-1]=l(o[o.length-1])},d=e=>{let n=[0,...Dm(e),e.length].filter((e,t,n)=>t===0||e!==n[t-1]),r=0;for(;r<n.length-1;){if(o.length>=i)return u(),!0;let a=r+1;for(;a<n.length&&c(e.slice(n[r],n[a]))<=t;)a+=1;let s=Math.max(r+1,a-1),d=e.slice(n[r],n[s]);if(o.length>=i-1&&s<n.length-1)return o.push(l(d)),!0;o.push(d),r=s}return!1};for(let e=0;e<a.length;e+=1){let n=a[e],r=s?`${s} ${n}`:n,l=c(r);if(s&&l>t){if(o.push(s),s=``,o.length>=i){u();break}if(c(n)>t){if(d(n))break}else s=n}else if(!s&&l>t){if(d(n))break}else s=r;if(e<a.length-1&&o.length>=i&&!s){u();break}}return s&&o.length<i&&o.push(s),o}function K_(e,t,n){if(!(t.widthPt>0&&t.heightPt>0))throw RangeError(`Error page size must be positive`);let r=Math.max(18,Math.min(t.widthPt,t.heightPt)*.06),i={xPt:r,yPt:r,widthPt:t.widthPt-r*2,heightPt:t.heightPt-r*2},a=Math.max(8,Math.min(t.widthPt,t.heightPt)*.02),o=n.resolve({fonts:{},slot:`ascii`,genericFamily:`sans-serif`}).route,s=G_(e,t.widthPt-r*4,a,n,4),c=a*1.4,l=[{kind:`fill-rect`,rect:{xPt:0,yPt:0,widthPt:t.widthPt,heightPt:t.heightPt},fill:`#ffffff`},{kind:`stroke-rect`,rect:i,stroke:`#c8ccd2`,lineWidthPt:1,dashPt:[6,5]},{kind:`text`,rect:{xPt:0,yPt:t.heightPt*.27,widthPt:t.widthPt,heightPt:36},text:`⚠`,fill:`#b23b3b`,fontRoute:o,fontSizePt:28,fontWeight:400,fontStyle:`normal`,align:`center`,baseline:`middle`},{kind:`text`,rect:{xPt:r*2,yPt:t.heightPt*.4,widthPt:t.widthPt-r*4,heightPt:24},text:`This document could not be displayed`,fill:`#333333`,fontRoute:o,fontSizePt:13,fontWeight:600,fontStyle:`normal`,align:`center`,baseline:`middle`},...s.map((e,n)=>({kind:`text`,rect:{xPt:r*2,yPt:t.heightPt*.5+c*n,widthPt:t.widthPt-r*4,heightPt:c},text:e,fill:`#666666`,fontRoute:o,fontSizePt:a,fontWeight:400,fontStyle:`normal`,align:`center`,baseline:`middle`}))],u={kind:`drawing`,id:`parse-error-page`,source:W_,flowDomainId:`parse-error`,flowBounds:i,inkBounds:i,advancePt:i.heightPt,ordinaryFlow:!1,commands:l},d={geometry:{pageWidth:t.widthPt,pageHeight:t.heightPt,marginTop:r,marginRight:r,marginBottom:r,marginLeft:r,headerDistance:0,footerDistance:0},columns:[{xPt:r,wPt:i.widthPt}],columnSeparator:!1,grid:{kind:`none`,linePitchPt:null,charSpacePt:null},textDirection:`lrTb`,verticalAlignment:`top`};return{pages:[{pageIndex:0,geometry:{xPt:0,yPt:0,widthPt:t.widthPt,heightPt:t.heightPt,contentTopPt:r,contentBottomPt:t.heightPt-r},flowDomains:[{id:`parse-error`,kind:`body`,logicalBounds:i,physicalBounds:i}],section:d,sectionOccurrenceId:`parse-error-section`,pageBorder:null,parityBlank:!1,bookmarkStarts:[],pageNumber:{displayNumber:1,format:`decimal`,sectionOccurrenceId:`parse-error-section`},columnSeparators:[],sectionRegions:[{id:`parse-error-region`,sectionOccurrenceId:`parse-error-section`,coordinateSpace:{writingMode:`horizontal-tb`,logicalToPhysical:{a:1,b:0,c:0,d:1,e:0,f:0},physicalToLogical:{a:1,b:0,c:0,d:1,e:0,f:0}},blockStartPt:r,blockEndPt:t.heightPt-r,columnFlowDirection:`ltr`,columnIndexes:[0],flowDomainIds:[`parse-error`],section:d}],layers:B_([{layer:`body`,node:u}]),readingOrder:[u.id]}],diagnostics:[{code:`UNSUPPORTED_FEATURE`,severity:`error`,source:W_,message:e}]}}function q_(e,t){let n=e==null?t:typeof e==`number`?e:e.getTime();if(!Number.isFinite(n))throw RangeError(`currentDate must resolve to finite epoch milliseconds`);return Object.freeze({currentDateMs:n})}function J_(e){return q_(e.currentDate,e.defaultCurrentDateMs)}function Y_(e,t){return xg(`layout`,{currentDateMs:e.currentDateMs,text:t.text.fingerprint,images:t.images.fingerprint,math:t.math.fingerprint,verticalGlyphs:t.verticalGlyphFingerprint??null})}const X_=Object.freeze({UNSUPPORTED_TEXT_EFFECT:Object.freeze({severity:`warning`,layoutCode:`UNSUPPORTED_FEATURE`,message:`WordprocessingML text effects are not rendered`}),INVALID_TEXT_EFFECT_VALUE:Object.freeze({severity:`warning`,layoutCode:`INVALID_VALUE`,message:`An invalid WordprocessingML text-effect value was ignored`}),MISSING_DRAWING_EXTENT:Object.freeze({severity:`error`,layoutCode:`INVALID_GEOMETRY`,message:`A drawing with a missing required extent was omitted`}),INVALID_DRAWING_EXTENT:Object.freeze({severity:`error`,layoutCode:`INVALID_GEOMETRY`,message:`A drawing with an invalid extent was omitted`}),DEGENERATE_DRAWING_EXTENT:Object.freeze({severity:`warning`,layoutCode:`INVALID_GEOMETRY`,message:`A drawing has a schema-valid zero-area extent`})}),Z_=Object.freeze({code:`INVALID_VALUE`,severity:`warning`,message:`The parser diagnostic contract did not match this renderer build`});function Q_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function $_(e,t){if(!Array.isArray(e)||!e.every(e=>Number.isSafeInteger(e)&&e>=0))return!1;let[n]=e;return n===void 0||n<t}function ev(e){return Object.freeze({story:`body`,storyInstance:`body`,path:Object.freeze([...e])})}function tv(e,t){if(e===void 0)return Object.freeze([]);if(!Array.isArray(e))return Object.freeze([Z_]);let n=[],r=!1;for(let i of e){if(!Q_(i)||typeof i.code!=`string`||!Object.hasOwn(X_,i.code)||i.part!==`word/document.xml`||!$_(i.path,t)){r=!0;continue}let e=X_[i.code];if(i.severity!==e.severity){r=!0;continue}n.push(Object.freeze({code:e.layoutCode,severity:e.severity,source:ev(i.path),message:e.message}))}return r&&n.push(Z_),Object.freeze(n)}var Z=class extends Error{code;constructor(e,t){super(`${e}: ${t}`),this.name=`LayoutInvariantError`,this.code=e}};function nv(e){switch(e){case`tb`:case`tbV`:case`lrTb`:case`lrTbV`:return`horizontal-tb`;case`rl`:case`rlV`:case`tbRl`:case`tbRlV`:return`vertical-rl`;case`btLr`:return`vertical-rl`;case`lr`:case`lrV`:case`tbLrV`:return`vertical-lr`;default:throw RangeError(`Unsupported Transitional text direction ${JSON.stringify(e)}`)}}function rv(e){if(!Number.isFinite(e.widthPt)||!Number.isFinite(e.heightPt)||e.widthPt<=0||e.heightPt<=0)throw RangeError(`Physical page extents must be positive and finite`)}function iv(e){if(!Number.isFinite(e.xPt)||!Number.isFinite(e.yPt))throw RangeError(`Point coordinates must be finite`)}function av(e){if(![e.a,e.b,e.c,e.d,e.e,e.f].every(Number.isFinite))throw RangeError(`Matrix coefficients must be finite`)}function ov(e){if(iv(e),!Number.isFinite(e.widthPt)||!Number.isFinite(e.heightPt)||e.widthPt<0||e.heightPt<0)throw RangeError(`Rectangle extents must be finite and non-negative`)}function sv(e,t){switch(rv(e),t){case`horizontal-tb`:return{widthPt:e.widthPt,heightPt:e.heightPt};case`vertical-rl`:case`vertical-lr`:return{widthPt:e.heightPt,heightPt:e.widthPt};default:throw RangeError(`Unsupported writing mode ${String(t)}`)}}function cv(e,t){switch(rv(e),t){case`horizontal-tb`:return{widthPt:e.widthPt,heightPt:e.heightPt};case`vertical-rl`:case`vertical-lr`:return{widthPt:e.heightPt,heightPt:e.widthPt};default:throw RangeError(`Unsupported writing mode ${String(t)}`)}}function lv(e,t){switch(rv(t),e){case`horizontal-tb`:return{a:1,b:0,c:0,d:1,e:0,f:0};case`vertical-rl`:return{a:0,b:1,c:-1,d:0,e:t.widthPt,f:0};case`vertical-lr`:return{a:0,b:1,c:1,d:0,e:0,f:0};default:throw RangeError(`Unsupported writing mode ${String(e)}`)}}function uv(e,t){switch(rv(t),e){case`horizontal-tb`:return{a:1,b:0,c:0,d:1,e:0,f:0};case`vertical-rl`:return{a:0,b:-1,c:1,d:0,e:0,f:t.widthPt};case`vertical-lr`:return{a:0,b:1,c:1,d:0,e:0,f:0};default:throw RangeError(`Unsupported writing mode ${String(e)}`)}}function dv(e,t){return av(e),iv(t),{xPt:e.a*t.xPt+e.c*t.yPt+e.e,yPt:e.b*t.xPt+e.d*t.yPt+e.f}}function fv(e,t){ov(t);let n=[dv(e,t),dv(e,{xPt:t.xPt+t.widthPt,yPt:t.yPt}),dv(e,{xPt:t.xPt,yPt:t.yPt+t.heightPt}),dv(e,{xPt:t.xPt+t.widthPt,yPt:t.yPt+t.heightPt})],r=n.map(({xPt:e})=>e),i=n.map(({yPt:e})=>e),a=Math.min(...r),o=Math.min(...i);return{xPt:a,yPt:o,widthPt:Math.max(...r)-a,heightPt:Math.max(...i)-o}}function pv(e,t){av(e);let n=dv(e,{xPt:0,yPt:0}),r={top:{xPt:0,yPt:-1},right:{xPt:1,yPt:0},bottom:{xPt:0,yPt:1},left:{xPt:-1,yPt:0}},i={},a=new Set;for(let o of[`top`,`right`,`bottom`,`left`]){let s=dv(e,r[o]),c=s.xPt-n.xPt,l=s.yPt-n.yPt,u=l===0&&c!==0?c>0?`right`:`left`:c===0&&l!==0?l>0?`bottom`:`top`:null;if(u===null||a.has(u))throw RangeError(`Edge transforms require a non-degenerate axis-aligned matrix`);i[u]=t[o],a.add(u)}if(a.size!==4)throw RangeError(`Edge transform must map every physical edge exactly once`);return i}function mv(e,t){return{writingMode:e,logicalToPhysical:lv(e,t),physicalToLogical:uv(e,t)}}function hv(e){return Object.freeze(e)}function gv(e){let t=[];for(let n of e){let{columns:e,columnSeparator:r}=n.section;if(!r||e.length<2||n.blockEndPt<=n.blockStartPt)continue;let i=new Set(n.columnIndexes),a=n.columnFlowDirection===`rtl`?e.map((e,t)=>t).reverse():e.map((e,t)=>t);for(let r=0;r<a.length-1;r+=1){let o=a[r];if(!i.has(o))continue;let s=a[r+1],c=Math.min(o,s),l=Math.max(o,s),u=e[c],d=e[l],f=(u.xPt+u.wPt+d.xPt)/2;t.push(Object.freeze({start:hv(dv(n.coordinateSpace.logicalToPhysical,{xPt:f,yPt:n.blockStartPt})),end:hv(dv(n.coordinateSpace.logicalToPhysical,{xPt:f,yPt:n.blockEndPt}))}))}}return Object.freeze(t)}function _v(e,t){let n=Dn(e,t),r=e===`triple`||/^(?:thinThick|thickThin|thinThickThin)(?:Small|Medium|Large)Gap$/.test(e);return Object.freeze({authoredStyle:e,style:e===`double`?`double`:r?`compound`:n.length>0?`dashed`:e.includes(`wave`)?`wavy`:`solid`,dashPatternPt:Object.freeze(n)})}function vv(e,t){let n=(e.smallCaps?Math.max(e.fontSize-2,1):e.fontSize)*t;return e.vertAlign&&(n*=.65),n}const yv=/[ᄀ-ᇿ⺀- -〿-ヿ-㐀-䶿一-鿿ꥠ-가-豈--]/u;function bv(e,t,n){let r=null,i=0;for(let n of t)n.alignment!==`bar`&&(n.pos>i&&(i=n.pos),n.pos>e&&(r===null||n.pos<r.pos)&&(r=n));let a=null;if(n>0){let t=Math.ceil((Math.max(e,i)+1e-6)/n)*n;t<=e&&(t+=n),a={pos:t,alignment:`left`}}return r&&a?r.pos<=a.pos?r:a:r??a}function xv(e,t,n){return bv(e,t,n)}function Sv(e,t){let n=t===`vert`||t===`vert270`||t===`eaVert`||t===`mongolianVert`;return{type:`text`,text:e.text,bold:e.bold??!1,italic:e.italic??!1,underline:!1,strikethrough:!1,fontSize:e.fontSizePt,color:e.color??null,fontFamily:e.fontFamily??null,fontFamilyEastAsia:e.fontFamilyEastAsia??null,isLink:!1,background:null,vertAlign:null,hyperlink:null,ruby:e.ruby??void 0,textBoxLineFloor:!0,textBoxVertical:n}}function Cv(e,t={},n={}){if(!e)return`sans-serif`;let r=t[e];return r===`roman`?`serif`:r===`swiss`?`sans-serif`:r===`modern`&&n[e]===`fixed`?`monospace`:`sans-serif`}const wv=Symbol(`docx.localMetricSnapshot`);function Tv(e={}){if(e[wv])return e;let t=Object.entries(e).map(([e,t])=>{if(!t.family?.trim())throw TypeError(`Local metric ${e} requires a family`);if(t.lineHeightRatio!==void 0&&(!Number.isFinite(t.lineHeightRatio)||t.lineHeightRatio<0))throw RangeError(`Local metric ${e} lineHeightRatio must be finite and non-negative`);if(t.weight!==void 0&&(!Number.isFinite(t.weight)||t.weight<1||t.weight>1e3))throw RangeError(`Local metric ${e} weight must be finite and between 1 and 1000`);let n={family:t.family,...t.lineHeightRatio===void 0?{}:{lineHeightRatio:t.lineHeightRatio},...t.requestedFamily===void 0?{}:{requestedFamily:t.requestedFamily},...t.weight===void 0?{}:{weight:t.weight},...t.style===void 0?{}:{style:t.style},...t.sourceIdentity===void 0?{}:{sourceIdentity:t.sourceIdentity},...t.synthesized===void 0?{}:{synthesized:t.synthesized}};return[sg(e),Object.freeze(n)]}).sort(([e],[t])=>e.localeCompare(t)),n=Object.fromEntries(t);return Object.defineProperty(n,wv,{value:!0}),Object.freeze(n)}const Ev=new Set([161,164,167,168,170,173,175,176,177,178,179,180,182,183,184,185,186,188,189,190,191,215,247]),Dv=new Set([224,225,232,233,234,236,237,242,243,249,250,252]);function Ov(e,t,n,r,i){let a=n===`eastAsia`,o=r?.split(/[-_]/,1)[0]?.toLowerCase()===`zh`,s=/^(?:86|88)$/i.test(i?.trim()??``),c=`highAnsi`;return e<=127?c=`ascii`:e<=255?c=a&&(Ev.has(e)||o&&Dv.has(e))?`eastAsia`:`highAnsi`:e>=256&&e<=687?c=a&&(o||s)?`eastAsia`:`highAnsi`:e>=688&&e<=767||e>=768&&e<=879||e>=880&&e<=975||e>=1024&&e<=1279?c=a?`eastAsia`:`highAnsi`:e>=1424&&e<=1983||e>=64285&&e<=65023||e>=65136&&e<=65278?c=`ascii`:e>=4352&&e<=4607||e>=11904&&e<=12031||e>=12032&&e<=12255||e>=12272&&e<=12687||e>=12688&&e<=12703||e>=12800&&e<=19903||e>=19968&&e<=40879||e>=40960&&e<=42127||e>=42128&&e<=42191||e>=44032&&e<=55215||e>=63744&&e<=64255||e>=65072&&e<=65103||e>=65104&&e<=65135||e>=65280&&e<=65519||e>=65536&&e<=1114111?c=`eastAsia`:e>=7680&&e<=7935?c=a&&o?`eastAsia`:`highAnsi`:(e>=8192&&e<=10175||e>=57344&&e<=63743||e>=64256&&e<=64284)&&(c=a?`eastAsia`:`highAnsi`),c===`eastAsia`&&a?c:t?`complexScript`:c}function kv(e,t){return e.themeFontPresence?.[t]??e.themeFonts?.[t]!=null?e.themeFonts?.[t]:e.fonts[t]??(e.themeFontPresence?.ascii??e.themeFonts?.ascii!=null?e.themeFonts?.ascii:e.fonts.ascii)}function Av(e){let t=Tv(e.localMetrics),n=Object.freeze(Object.fromEntries(Object.entries(e.genericFamilies??{}).map(([e,t])=>[e.trim().toLocaleLowerCase(`en-US`),t]).sort(([e],[t])=>e.localeCompare(t)))),r=Object.freeze(Object.fromEntries(Object.entries(e.eastAsiaFontCharsets??{}).map(([e,t])=>[e.trim().toLocaleLowerCase(`en-US`),t.trim()]).sort(([e],[t])=>e.localeCompare(t)))),i=xg(`text`,{fonts:e.fonts.fingerprint,measurer:e.measurer.fingerprint,localMetrics:t,eastAsiaFontCharsets:r,genericFamilies:n}),a=t=>{let r=kv(t,t.slot),i=r?n[r.trim().toLocaleLowerCase(`en-US`)]??t.genericFamily??`sans-serif`:t.genericFamily;return e.fonts.resolve({requestedFamily:r,genericFamily:i,weight:t.weight,style:t.style})},o=new Map,s=t=>{let n=JSON.stringify([t.text,t.fontRoute.familyList,t.fontRoute.scope,t.fontRoute.fingerprint,t.fontSizePt,t.weight,t.style,t.letterSpacingPt,t.kerning??null]),r=o.get(n);if(r)return r;let i=e.measurer.measure(t),a=Object.freeze({...i,...i.inkBounds?{inkBounds:Object.freeze({...i.inkBounds})}:{}});return o.set(n,a),a},c=t=>e.measurer.measure(t).advancePt,l=new Map;return Object.freeze({fingerprint:i,localMetrics:t,resolve:a,shape(e){if(!Number.isFinite(e.fontSizePt)||e.fontSizePt<0)throw RangeError(`fontSizePt must be a finite non-negative number`);let t=JSON.stringify([e.text,e.fontSizePt,[e.fonts.ascii??null,e.fonts.highAnsi??null,e.fonts.eastAsia??null,e.fonts.complexScript??null],[e.themeFonts?.ascii??null,e.themeFonts?.highAnsi??null,e.themeFonts?.eastAsia??null,e.themeFonts?.complexScript??null],[e.themeFontPresence?.ascii??null,e.themeFontPresence?.highAnsi??null,e.themeFontPresence?.eastAsia??null,e.themeFontPresence?.complexScript??null],e.weight??null,e.style??null,e.complexScript??null,e.fontHint??null,e.eastAsiaLanguage??null,e.eastAsiaFontCharset??null,e.genericFamily??null,e.letterSpacingPt??null,e.kerning??null,e.measure??null,e.clusterGeometry??null]),n=l.get(t);if(n)return n;let i=[],o=Object.freeze([...new Set([0,...Dm(e.text),e.text.length])].sort((e,t)=>e-t)),u=new Set(o),d=0;for(let t of e.text){let n=d+t.length,a=kv(e,`eastAsia`),o=e.eastAsiaFontCharset??(a?r[a.trim().toLocaleLowerCase(`en-US`)]:void 0),s=Ov(t.codePointAt(0)??0,e.complexScript??!1,e.fontHint,e.eastAsiaLanguage,o),c=i.at(-1);c?.script===s?(c.text+=t,c.end=n):i.push({text:t,start:d,end:n,script:s,breakBefore:u.has(d)}),d=n}let f=i.map(t=>{let n=a({fonts:e.fonts,themeFonts:e.themeFonts,themeFontPresence:e.themeFontPresence,slot:t.script,weight:e.weight,style:e.style,genericFamily:e.genericFamily}),r=e.measure===!1?{advancePt:0,ascentPt:0,descentPt:0}:s({text:t.text,fontRoute:n.route,fontSizePt:e.fontSizePt,weight:n.weight,style:n.style,letterSpacingPt:e.letterSpacingPt??0,kerning:e.kerning});return Object.freeze({...t,...r,font:n,fontRoute:n.route})}),p=f.flatMap(e=>e.font.diagnostics),m=f.length>0&&f.every(e=>e.inkBounds!==void 0)?(()=>{let e=0,t=1/0,n=-1/0,r=0,i=0;for(let a of f){let o=a.inkBounds;t=Math.min(t,e+o.xMinPt),n=Math.max(n,e+o.xMaxPt),r=Math.max(r,o.ascentPt),i=Math.max(i,o.descentPt),e+=a.advancePt}return Object.freeze({xMinPt:t,xMaxPt:n,ascentPt:r,descentPt:i})})():void 0,h=f.reduce((e,t)=>e+t.advancePt,0),g=e.clusterGeometry===!1?void 0:(()=>{let t=new Map([[0,0],[e.text.length,h]]),n=n=>{if(e.measure===!1||n<=0)return 0;let r=t.get(n);if(r!==void 0)return r;let i=0;for(let t of f){if(n>=t.end){i+=t.advancePt;continue}if(n<=t.start)break;i+=c({text:t.text.slice(0,n-t.start),fontRoute:t.fontRoute,fontSizePt:e.fontSizePt,weight:t.font.weight,style:t.font.style,letterSpacingPt:e.letterSpacingPt??0,kerning:e.kerning});break}return t.set(n,i),i};return Object.freeze(o.slice(0,-1).map((e,t)=>{let r=o[t+1]??e,i=n(e);return Object.freeze({range:Object.freeze({start:e,end:r}),offsetPt:i,advancePt:n(r)-i})}))})(),_=Object.freeze({advancePt:h,ascentPt:Math.max(0,...f.map(e=>e.ascentPt)),descentPt:Math.max(0,...f.map(e=>e.descentPt)),...m?{inkBounds:m}:{},...m&&f.every(e=>e.horizontalInkBoundsAreTight===!0)?{horizontalInkBoundsAreTight:!0}:{},spans:Object.freeze(f),graphemeBoundaries:o,...g?{clusters:g}:{},diagnostics:Object.freeze(p)});return l.set(t,_),_}})}function jv(e,t){let n=[];for(let r=0;r<e.length;){let i=e[r];if(i.fitTextValTwips===void 0){r+=1;continue}let a=r+1;if(i.fitTextId!==void 0)for(;a<e.length&&e[a].fitTextValTwips!==void 0&&e[a].fitTextId===i.fitTextId;)a+=1;let o=0,s=0;for(let t=r;t<a;t+=1){let n=e[t];o+=n.naturalWidthPx*(n.charScale??1),s+=n.charCount}let c=i.fitTextValTwips/20*t,l=s>1?(c-o)/(s-1):0,u=c-o-Math.max(0,s-1)*l;n.push({start:r,end:a,targetPx:c,naturalPx:o,charCount:s,perGapPx:l,trailingPadPx:u}),r=a}return n}function Mv(e){return e<0n?-e:e}function Nv(e,t){let n=Mv(e),r=Mv(t);for(;r!==0n;){let e=n%r;n=r,r=e}return n}function Pv(e,t){if(t===0n)throw Error(`Exact rational denominator must be nonzero`);if(e===0n)return Object.freeze({numerator:0n,denominator:1n});let n=t<0n?-1n:1n,r=Nv(e,t);return Object.freeze({numerator:n*e/r,denominator:n*t/r})}function Q(e,t){let n=e.numerator*t.denominator-t.numerator*e.denominator;return n<0n?-1:+(n>0n)}function Fv(e,t){return Pv(e.numerator*t.denominator-t.numerator*e.denominator,e.denominator*t.denominator)}function Iv(e,t){return Pv(e.numerator*t.denominator+t.numerator*e.denominator,2n*e.denominator*t.denominator)}function Lv(e){return`${e.numerator}/${e.denominator}`}const Rv=new DataView(new ArrayBuffer(8));function zv(e){if(!Number.isFinite(e))throw Error(`Exact geometry requires a finite binary64 value`);if(e===0)return Object.freeze({coefficient:0n,exponent:0});Rv.setFloat64(0,e,!1);let t=Rv.getBigUint64(0,!1),n=t>>63n!=0n,r=Number(t>>52n&2047n),i=t&(1n<<52n)-1n,a=r===0?i:1n<<52n|i,o=r===0?-1074:r-1023-52;for(;(a&1n)==0n;)a>>=1n,o+=1;return Object.freeze({coefficient:n?-a:a,exponent:o})}function Bv(e){return e===0n?0:e.toString(2).length}function Vv(e,t,n){let r=n>=0?e:e<<BigInt(-n),i=n>=0?t<<BigInt(n):t;return r<i?-1:+(r>i)}function Hv(e,t,n){let r=n>=0?e<<BigInt(n):e,i=n>=0?t:t<<BigInt(-n),a=r/i,o=r%i*2n;return(o>i||o===i&&(a&1n)!=0n)&&(a+=1n),a}function Uv(e){return Rv.setBigUint64(0,e,!1),Rv.getFloat64(0,!1)}function Wv(e){if(e.numerator===0n)return 0;let t=e.numerator<0n,n=Mv(e.numerator),r=e.denominator,i=Bv(n)-Bv(r);Vv(n,r,i)<0&&--i;let a=t?1n<<63n:0n;if(i<-1022){let e=Hv(n,r,1074);return Uv(e===0n?a:e>=1n<<52n?a|1n<<52n:a|e)}let o=Hv(n,r,52-i);if(o===1n<<53n&&(o>>=1n,i+=1),i>1023)return t?-1/0:1/0;let s=BigInt(i+1023)<<52n,c=o-(1n<<52n);return Uv(a|s|c)}function Gv(e){if(e===1/0)return e;if(Object.is(e,-0)||e===0)return Number.MIN_VALUE;Rv.setFloat64(0,e,!1);let t=Rv.getBigUint64(0,!1);return Uv(e>0?t+1n:t-1n)}function Kv(e){let t=Wv(e);if(t===1/0)return t;if(t===-1/0)return-Number.MAX_VALUE;let n=zv(t);return Q(n.exponent>=0?{numerator:n.coefficient<<BigInt(n.exponent),denominator:1n}:{numerator:n.coefficient,denominator:1n<<BigInt(-n.exponent)},e)>=0?t:Gv(t)}function qv(e){return-Kv({numerator:-e.numerator,denominator:e.denominator})}function Jv(e){if(!e.points||e.points.length<3||e.points.some(e=>!Number.isFinite(e.xPt)||!Number.isFinite(e.yPt)))throw Error(`Invalid ${e.kind} wrapPolygon for ${e.imageKey}`);if(![e.xLeftPt,e.xRightPt,e.yTopPt,e.yBottomPt].every(Number.isFinite)||e.xRightPt<e.xLeftPt||e.yBottomPt<e.yTopPt)throw Error(`Invalid finite wrap bounds for ${e.imageKey}`)}const Yv=new WeakMap;function Xv(e,t){return e.x===t.x&&e.y===t.y}function Zv(e,t,n,r){return e*r-t*n}function Qv(e,t){return t>0n?e>=0n&&e<=t:e<=0n&&e>=t}function $v(e,t){let n=Xv(e.from,t.from)||Xv(e.from,t.to)?e.from:Xv(e.to,t.from)||Xv(e.to,t.to)?e.to:null;if(n)return Object.freeze({y:Pv(n.y,1n),contact:`shared-endpoint`});let r=e.to.x-e.from.x,i=e.to.y-e.from.y,a=t.to.x-t.from.x,o=t.to.y-t.from.y,s=Zv(r,i,a,o);if(s===0n)return null;let c=t.from.x-e.from.x,l=t.from.y-e.from.y,u=Zv(c,l,a,o),d=Zv(c,l,r,i);return!Qv(u,s)||!Qv(d,s)?null:Object.freeze({y:Pv(e.from.y*s+i*u,s),contact:i===0n||o===0n?`horizontal`:`active-crossing`})}function ey(e,t){return`${e}:${t}`}function ty(e,t,n){let r=new Set;for(let i of t){if(i<0||i>=Math.floor(e.length/2))continue;n();let t=e[i*2],a=e[i*2+1];r.add(ey(t,a))}return r}function ny(e){let t=e=>{if(e.length===0)return null;let n=e[Math.floor(e.length/2)].yTopPt,r=[],i=[],a=[];for(let t of e)t.yBottomPt<=n?r.push(t):t.yTopPt>n?i.push(t):a.push(t);return Object.freeze({centerYPt:n,crossingByTop:Object.freeze(a),crossingByBottom:Object.freeze(a.slice().sort((e,t)=>t.yBottomPt-e.yBottomPt)),below:t(r),above:t(i)})};return t(e.slice().sort((e,t)=>e.yTopPt-t.yTopPt||e.yBottomPt-t.yBottomPt))}function ry(e,t){return Wv(t>=0?{numerator:e.numerator<<BigInt(t),denominator:e.denominator}:{numerator:e.numerator,denominator:e.denominator<<BigInt(-t)})}function iy(e,t){return Kv(t>=0?{numerator:e.numerator<<BigInt(t),denominator:e.denominator}:{numerator:e.numerator,denominator:e.denominator<<BigInt(-t)})}function ay(e,t){let n=zv(e),r=n.exponent-t;return r>=0?{numerator:n.coefficient<<BigInt(r),denominator:1n}:{numerator:n.coefficient,denominator:1n<<BigInt(-r)}}function oy(e,t,n){let r=e.dx*n.numerator-e.c*n.denominator,i=t.dx*n.numerator-t.c*n.denominator,a=r*t.dy-i*e.dy;return a<0n?-1:+(a>0n)}function sy(e){let t=e=>{if(e.length===0)return null;let n=e[Math.floor(e.length/2)].yTop,r=[],i=[],a=[];for(let t of e)Q(t.yBottom,n)<=0?r.push(t):Q(t.yTop,n)>0?i.push(t):a.push(t);return Object.freeze({centerY:n,crossingByTop:Object.freeze(a),crossingByBottom:Object.freeze(a.slice().sort((e,t)=>Q(t.yBottom,e.yBottom))),below:t(r),above:t(i)})};return t(e.slice().sort((e,t)=>Q(e.yTop,t.yTop)||Q(e.yBottom,t.yBottom)))}function cy(e,t,n,r){if(!(!e||Q(n,t)<=0)){if(Q(n,e.centerY)<=0){for(let t of e.crossingByTop){if(Q(t.yTop,n)>=0)break;r.push(t)}cy(e.below,t,n,r);return}if(Q(t,e.centerY)>=0){for(let n of e.crossingByBottom){if(Q(n.yBottom,t)<=0)break;r.push(n)}cy(e.above,t,n,r);return}r.push(...e.crossingByTop),cy(e.below,t,n,r),cy(e.above,t,n,r)}}function ly(e,t,n,r,i){let a=new Map,o=new Map;t.forEach((e,t)=>{if(e.minY===e.maxY)return;let n=Lv(Pv(e.minY,1n)),r=Lv(Pv(e.maxY,1n)),i=a.get(n);i?i.push(t):a.set(n,[t]);let s=o.get(r);s?s.push(t):o.set(r,[t])});let s=new Map;for(let e of i){if(e.contact!==`active-crossing`)continue;let t=Lv(e.y),n=s.get(t);n||s.set(t,n=new Set),n.add(e.leftEdge),n.add(e.rightEdge)}let c=[],l=new Set,u=new Map,d=[],f=[],p=0,m=0,h=(t,n,i)=>{for(let a of t){if(n.has(a))continue;let t=u.get(a);if(t&&Q(i,t.yTop)>0){let n=Object.freeze({yTop:t.yTop,yBottom:i,leftEdge:t.leftEdge,rightEdge:t.rightEdge});d.push(n);let a=ry(t.yTop,r),o=ry(i,r);o>a&&f.push(Object.freeze({yTopPt:a,yBottomPt:o,left:e[t.leftEdge],right:e[t.rightEdge]}))}u.delete(a)}for(let e of n){if(t.has(e))continue;let n=e.indexOf(`:`);u.set(e,{leftEdge:Number(e.slice(0,n)),rightEdge:Number(e.slice(n+1)),yTop:i})}},g=new Map,_=(e,t)=>{e.add(Math.floor((t-1)/2)),e.add(Math.floor(t/2)),e.add(Math.floor((t+1)/2))},v=e=>ty(c,e,()=>{m+=2}),y=()=>{let e=new Set;for(let t=0;t+1<c.length;t+=2)m+=2,e.add(ey(c[t],c[t+1]));return e};for(let e=0;e<n.length;e+=1){let r=n[e],i=n[e+1],u=i?Iv(r,i):r,d=(e,n)=>(p+=1,oy(t[e],t[n],u)||e-n),f=e=>{let t=0,n=c.length;for(;t<n;){let r=t+n>>>1;d(c[r],e)<=0?t=r+1:n=r}c.splice(t,0,e);for(let e=t;e<c.length;e+=1)g.set(c[e],e)},m=e=>{let t=g.get(e);if(t!==void 0){c.splice(t,1),g.delete(e);for(let e=t;e<c.length;e+=1)g.set(c[e],e)}},b=e=>{let n=[...e].filter(e=>g.has(e)&&Q(Pv(t[e].minY,1n),r)<=0&&Q(r,Pv(t[e].maxY,1n))<0),i=n.map(e=>g.get(e)).sort((e,t)=>e-t);n.sort(d);for(let e=0;e<i.length;e+=1){let t=i[e],r=n[e];c[t]=r,g.set(r,t)}},x=Lv(r),S=o.get(x)??[],C=a.get(x)??[],w=s.get(x)??l;if(S.length===0&&C.length===0&&(w.size===0||i===void 0))continue;let T=S.length>0||C.length>0,E=new Set;if(!T)for(let e of w){let t=g.get(e);t!==void 0&&_(E,t)}let D=T?y():v(E);for(let e of S)m(e);for(let e of C)f(e);if(w.size>0&&i!==void 0&&b(w),c.length%2!=0)throw Error(`Compiled wrapPolygon produced an odd open-slab crossing count`);if(T)h(D,y(),r);else{let e=new Set;for(let t of w){let n=g.get(t);n!==void 0&&_(e,n)}h(D,v(e),r)}}return Object.freeze({spans:Object.freeze(f),exactSpans:Object.freeze(d),orderComparisonCount:p,pairMembershipVisitCount:m})}function uy(e){Jv(e);let t=e.points,n=Object.freeze(t.map(e=>Object.freeze({...e}))),r=[...n.flatMap(e=>[e.xPt,e.yPt]),e.xLeftPt,e.xRightPt,e.yTopPt,e.yBottomPt].map(zv).filter(({coefficient:e})=>e!==0n),i=r.length===0?0:Math.min(...r.map(({exponent:e})=>e)),a=e=>{let t=zv(e);return t.coefficient===0n?0n:t.coefficient<<BigInt(t.exponent-i)},o=n.map(e=>Object.freeze({x:a(e.xPt),y:a(e.yPt)})),s=n.map((e,t)=>{let r=n[(t+1)%n.length],i=r.yPt-e.yPt,a=i===0?0:(r.xPt-e.xPt)/i;return Object.freeze({from:e,to:r,minYPt:Math.min(e.yPt,r.yPt),maxYPt:Math.max(e.yPt,r.yPt),slopeXPerY:a,interceptX:i===0?e.xPt:e.xPt-a*e.yPt})}),c=o.map((e,t)=>{let n=o[(t+1)%o.length],r=e.y<=n.y?e:n,i=e.y<=n.y?n:e,a=i.x-r.x,s=i.y-r.y;return Object.freeze({index:t,from:e,to:n,minY:r.y,maxY:i.y,dx:a,dy:s,c:a*r.y-s*r.x})}),l=[];for(let e=0;e<c.length;e+=1)for(let t=e+1;t<c.length;t+=1){let n=$v(c[e],c[t]);n&&l.push(Object.freeze({y:n.y,contact:n.contact,leftEdge:e,rightEdge:t}))}let u=1/0,d=-1/0,f=1/0,p=-1/0;for(let e of n)u=Math.min(u,e.xPt),d=Math.max(d,e.xPt),f=Math.min(f,e.yPt),p=Math.max(p,e.yPt);let m=new Map;for(let e of o){let t=Pv(e.y,1n);m.set(Lv(t),t)}for(let e of l)m.set(Lv(e.y),e.y);let h=Object.freeze([...m.values()].sort(Q)),g=Object.freeze([...new Set(h.map(e=>ry(e,i)))].sort((e,t)=>e-t)),_=ly(s,c,h,i,l),v=Pv(o.reduce((e,t)=>t.x<e?t.x:e,o[0].x),1n),y=Pv(o.reduce((e,t)=>t.x>e?t.x:e,o[0].x),1n),b=Pv(o.reduce((e,t)=>t.y<e?t.y:e,o[0].y),1n),x=Pv(o.reduce((e,t)=>t.y>e?t.y:e,o[0].y),1n),S=Pv(0n,1n),C=(e,t)=>{let n=Fv(e,t);return Q(n,S)>0?n:S},w=Object.freeze({scaleExponent:i,edges:Object.freeze(c),eventYs:h,spans:_.exactSpans,spanIndex:sy(_.exactSpans),polygonLeft:v,polygonRight:y,polygonTop:b,polygonBottom:x,padLeft:C(v,Pv(a(e.xLeftPt),1n)),padRight:C(Pv(a(e.xRightPt),1n),y),padTop:C(b,Pv(a(e.yTopPt),1n)),padBottom:C(Pv(a(e.yBottomPt),1n),x)}),T=Object.freeze({kind:e.kind,edges:Object.freeze(s),eventYPts:g,contourSpans:_.spans,contourSpanIndex:ny(_.spans),intersectionCount:l.length,compileOrderComparisonCount:_.orderComparisonCount,compilePairMembershipVisitCount:_.pairMembershipVisitCount,polygonLeftPt:u,polygonRightPt:d,polygonTopPt:f,polygonBottomPt:p,padLeftPt:Math.max(0,u-e.xLeftPt),padRightPt:Math.max(0,e.xRightPt-d),padTopPt:Math.max(0,f-e.yTopPt),padBottomPt:Math.max(0,e.yBottomPt-p)});return Yv.set(T,w),T}function dy(e,t){return{numerator:e.dx*t.numerator-e.c*t.denominator,denominator:e.dy*t.denominator}}function fy(e,t){return e.dx*t.dy===t.dx*e.dy&&e.c*t.dy===t.c*e.dy}function py(e){let t=e.filter(e=>Q(e.r,e.l)>0).slice().sort((e,t)=>Q(e.l,t.l)||Q(e.r,t.r)),n=[];for(let e of t){let t=n.at(-1);!t||Q(e.l,t.r)>0?n.push({...e}):Q(e.r,t.r)>0&&(n[n.length-1]={l:t.l,r:e.r})}return n}function my(e,t){return{numerator:e.numerator*t.denominator+t.numerator*e.denominator,denominator:e.denominator*t.denominator}}function hy(e,t){return{numerator:e.numerator*t.denominator-t.numerator*e.denominator,denominator:e.denominator*t.denominator}}function gy(e,t,n){let r=Yv.get(e);if(!r)throw Error(`Compiled polygon omitted its exact geometry authority`);let i=hy(t,r.padBottom),a=my(n,r.padTop),o=Q(r.polygonTop,i)>=0?r.polygonTop:i,s=Q(r.polygonBottom,a)<=0?r.polygonBottom:a;if(Q(s,o)<=0)return[];let c=[],l=[];cy(r.spanIndex,o,s,l);for(let e of l){let t=Q(o,e.yTop)>=0?o:e.yTop,n=Q(s,e.yBottom)<=0?s:e.yBottom;if(Q(n,t)<=0)continue;let i=r.edges[e.leftEdge],a=r.edges[e.rightEdge];if(fy(i,a))continue;let l=dy(i,t),u=dy(i,n),d=dy(a,t),f=dy(a,n);c.push({l:hy(Q(l,u)<=0?l:u,r.padLeft),r:my(Q(d,f)>=0?d:f,r.padRight)})}let u=py(c);return e.kind===`through`||u.length===0?u:[{l:u[0].l,r:u.at(-1).r}]}function _y(e,t,n){let r=Yv.get(e);if(!r)throw Error(`Compiled polygon omitted its exact geometry authority`);let i=ay(t,r.scaleExponent),a=my(i,ay(n,r.scaleExponent)),o=e=>r.scaleExponent>=0?{numerator:e.numerator<<BigInt(r.scaleExponent),denominator:e.denominator}:{numerator:e.numerator,denominator:e.denominator<<BigInt(-r.scaleExponent)};return Object.freeze(gy(e,i,a).map(e=>Object.freeze({l:o(e.l),r:o(e.r)})))}function vy(e,t){let n=Yv.get(e);if(!n)throw Error(`Compiled polygon omitted its exact geometry authority`);let r=ay(t,n.scaleExponent),i=new Set;for(let e of n.eventYs)i.add(iy(my(e,n.padBottom),n.scaleExponent)),i.add(iy(hy(hy(e,r),n.padTop),n.scaleExponent));return Object.freeze([...i].filter(Number.isFinite).sort((e,t)=>e-t))}function yy(e,t,n,r){let i=Yv.get(e);if(!i)throw Error(`Compiled polygon omitted its exact geometry authority`);let a=Iv(ay(n,i.scaleExponent),ay(r,i.scaleExponent)),o=ay(t,i.scaleExponent),s=hy(a,i.padBottom),c=my(o,i.padTop),l=my(a,c),u=Q(i.polygonTop,s)>=0?i.polygonTop:s,d=Q(i.polygonBottom,l)<=0?i.polygonBottom:l,f=[],p=[];cy(i.spanIndex,u,d,p);for(let e of p){let t=Q(u,e.yTop)>=0?u:e.yTop;if(Q(Q(d,e.yBottom)<=0?d:e.yBottom,t)<=0)continue;let n=i.edges[e.leftEdge],r=i.edges[e.rightEdge];if(fy(n,r))continue;let a=Q(s,e.yTop)>0,o=Q(l,e.yBottom)<0,p=(e,t,n,r)=>{let a=t?n:r,o={numerator:e.dx*a.numerator-e.c*a.denominator,denominator:e.dy*a.denominator};return{slope:t?{numerator:e.dx,denominator:e.dy}:{numerator:0n,denominator:1n},intercept:i.scaleExponent>=0?{numerator:o.numerator<<BigInt(i.scaleExponent),denominator:o.denominator}:{numerator:o.numerator,denominator:o.denominator<<BigInt(-i.scaleExponent)}}},m=p(n,a,{numerator:-i.padBottom.numerator,denominator:i.padBottom.denominator},e.yTop),h=p(n,o,c,e.yBottom),g=p(r,a,{numerator:-i.padBottom.numerator,denominator:i.padBottom.denominator},e.yTop),_=p(r,o,c,e.yBottom),v=n.dx>=0n?m:h,y=r.dx>=0n?_:g,b=Object.freeze({left:Object.freeze({slope:v.slope,intercept:hy(v.intercept,i.scaleExponent>=0?{numerator:i.padLeft.numerator<<BigInt(i.scaleExponent),denominator:i.padLeft.denominator}:{numerator:i.padLeft.numerator,denominator:i.padLeft.denominator<<BigInt(-i.scaleExponent)})}),right:Object.freeze({slope:y.slope,intercept:my(y.intercept,i.scaleExponent>=0?{numerator:i.padRight.numerator<<BigInt(i.scaleExponent),denominator:i.padRight.denominator}:{numerator:i.padRight.numerator,denominator:i.padRight.denominator<<BigInt(-i.scaleExponent)})})});f.push(b)}return Object.freeze(f)}function by(e,t,n){return e.left<t.right-n&&e.right>t.left+n&&e.top<t.bottom-n&&e.bottom>t.top+n}function xy(e,t,n){let r=e.right-e.left,i=e.bottom-e.top;if(r<0||i<0)throw RangeError(`Overlap rectangle has negative extent`);let a=e.left,o=e.top;for(let e=0;e<=t.length;e+=1){let s={left:a,right:a+r,top:o,bottom:o+i},c=t.map(e=>({left:e.left,right:e.right,top:e.top,bottom:e.bottom})).filter(e=>by(s,e,n.overlapEpsilon));if(c.length===0)return Object.freeze({left:a,top:o});if(e===t.length)throw Error(`Axis-aligned overlap resolution did not converge`);let l=Math.max(...c.map(e=>e.right));if(l+r<=n.rightBoundary+n.rightBoundarySlack){a=l;continue}o=Math.max(...c.map(e=>e.bottom))}throw Error(`Axis-aligned overlap resolution did not converge`)}function Sy(e,t){if(e.trim()===``)throw Error(`CompatibilityRule.${t} must not be empty`)}function $(e){if(Sy(e.id,`id`),Sy(e.description,`description`),!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e.id))throw Error(`CompatibilityRule.id must be a stable kebab-case identifier`);if(e.evidence.kind===`microsoft-note`){if(Sy(e.evidence.reference,`evidence.reference`),!/^\[MS-[A-Z0-9]+\] §§?\d/.test(e.evidence.reference))throw Error(`CompatibilityRule.evidence.reference must identify a Microsoft specification section`)}else if(e.evidence.kind===`regression-test`){if(Sy(e.evidence.reference,`evidence.reference`),!/^packages\/docx\/src\/.+\.(?:test|spec)\.tsx?#[^#]+$/.test(e.evidence.reference))throw Error(`CompatibilityRule.evidence.reference must use DOCX path#test-title`)}else if(Sy(e.evidence.syntheticFixtureId,`evidence.syntheticFixtureId`),Sy(e.evidence.application,`evidence.application`),Sy(e.evidence.version,`evidence.version`),Sy(e.evidence.platform,`evidence.platform`),!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e.evidence.syntheticFixtureId))throw Error(`CompatibilityRule.evidence.syntheticFixtureId must be kebab-case`);return Object.freeze(e.evidence),Object.freeze(e)}$({id:`word-section-btlr-tbrl-page-frame`,evidence:{kind:`regression-test`,reference:`packages/docx/src/layout/coordinate-space.test.ts#maps Transitional text direction %s to %s`},description:`Issue #988 comment 4950296007 records that, unlike the normative ECMA-376 Part 4 §14.11.7 equivalence to lr, Word uses the tbRl page frame for section-level btLr; this rule covers only the page frame, while glyph orientation is paint-owned.`}),$({id:`word-square-line-start-one-inch`,evidence:{kind:`regression-test`,reference:`packages/docx/src/float-line-start-one-inch.test.ts#(e) the boundary is identical across scales (absolute pt width)`},description:`Issue #676 records that Word starts a content line beside a square-wrapped object only when the free side gap is at least one inch; tight and through polygon openings and empty paragraph marks are outside this rule.`});const Cy=$({id:`word-float-different-paragraph-displacement`,evidence:{kind:`regression-test`,reference:`packages/docx/src/layout/floats.test.ts#keeps observed different-paragraph displacement on exclusion bounds`},description:`Preserve the established Word-compatible policy that an overlap-permitted float is displaced by exclusion geometry from floats anchored in other paragraphs, while same-paragraph floats may overlap.`}),wy=$({id:`word-page-anchored-table-collision-deferral`,evidence:{kind:`regression-test`,reference:`packages/docx/src/float-table-page-fit.test.ts#(g) DEFERS a page-anchored floating table when its raw band intersects an existing table float`},description:`Preserve the established Word-compatible pagination behavior that defers an absolute page- or margin-anchored floating table when its authored object band intersects an existing floating-table text-exclusion band on the page.`});$({id:`word-empty-mark-float-side-gap`,evidence:{kind:`regression-test`,reference:`packages/docx/src/float-line-start-one-inch.test.ts#keeps an anchor-host metric-only line on the paragraph-mark threshold`},description:`An empty or anchor-only paragraph-mark line may start beside a square-wrapped object when the available side gap can hold the paragraph mark em; the one-inch content-line threshold does not apply.`});function Ty(e){return 71.95*e}function Ey(e,t){return e*t}const Dy=.01,Oy=.5;function ky(e,t){return Object.freeze(e===`overlap`?{kind:`word-different-paragraph`,paragraphId:t}:{kind:`none`})}function Ay(e,t){return Object.freeze(e?{kind:`word-different-paragraph`,paragraphId:t}:{kind:`drawingml-normative`})}function jy(e){let t={occurrenceId:e.occurrenceId,paragraphId:e.paragraphId,bounds:e.bounds,exclusionBounds:e.exclusionBounds};return e.kind===`table`?{...t,kind:`table`,tableOverlap:e.overlap}:{...t,kind:e.kind===`shape`?`drawingml`:`frame`}}function My(e,t){let n=e.imageX,r=e.imageY,i=e.imageW,a=e.imageH,o=e.xLeft,s=e.xRight,c=e.yTop,l=e.yBottom,u={occurrenceId:e.anchorOccurrenceId??e.acquisitionOccurrenceId??`display-float:${t}`,paragraphId:e.paraId,bounds:{xPt:n,yPt:r,widthPt:i,heightPt:a},exclusionBounds:{xPt:o,yPt:c,widthPt:s-o,heightPt:l-c}};return e.kind===`table`?{...u,kind:`table`,tableOverlap:e.tableOverlap}:{...u,kind:e.kind===`shape`?`drawingml`:`frame`}}function Ny(e){let t=e.xPt,n=e.yPt,r=e.widthPt,i=e.heightPt;return{left:t,right:t+r,top:n,bottom:n+i}}function Py(e,t,n){return t===0&&n===0?e:Object.freeze({xPt:e.xPt+t,yPt:e.yPt+n,widthPt:e.widthPt,heightPt:e.heightPt})}function Fy(e,t,n,r){return Object.freeze({bounds:Py(e.bounds,t,n),exclusionBounds:Py(e.exclusionBounds,t,n),displacement:Object.freeze({xPt:t,yPt:n}),appliedCompatibilityRuleIds:Object.freeze([...r])})}function Iy(e,t){let n=e.bounds.xPt-e.exclusionBounds.xPt,r=e.bounds.yPt-e.exclusionBounds.yPt,i=e.exclusionBounds.xPt+e.exclusionBounds.widthPt-e.bounds.xPt-e.bounds.widthPt,a=e.exclusionBounds.yPt+e.exclusionBounds.heightPt-e.bounds.yPt-e.bounds.heightPt,o=Ny(t.exclusionBounds);return{left:o.left-i,right:o.right+n,top:o.top-a,bottom:o.bottom+r}}function Ly(e,t,n=e.rightBoundaryPt){let r=Ny(e.moving.bounds);return t.length===0?Object.freeze({left:r.left,top:r.top}):xy(r,t,{overlapEpsilon:e.overlapEpsilonPt??0,rightBoundary:n,rightBoundarySlack:e.rightBoundarySlackPt??0})}function Ry(e){let{moving:t,avoidance:n}=e,r=e.blockers.flatMap(e=>t.kind===`table`&&e.kind===`table`&&(t.tableOverlap===`never`||e.tableOverlap===`never`)||n.kind===`drawingml-normative`&&e.kind===`drawingml`?[Ny(e.bounds)]:[]),i=n.kind===`word-different-paragraph`?e.blockers.flatMap(e=>e.paragraphId===n.paragraphId?[]:[Iy(t,e)]):[],a=t.exclusionBounds.xPt+t.exclusionBounds.widthPt-t.bounds.xPt-t.bounds.widthPt,o=n.kind===`word-different-paragraph`?e.rightBoundaryPt-a:e.rightBoundaryPt,s=Ly(e,r,o),c=i.length===0?s:Ly(e,[...r,...i],o);return Fy(t,c.left-t.bounds.xPt,c.top-t.bounds.yPt,c.left!==s.left||c.top!==s.top?[Cy.id]:[])}function zy(e){if(e.inlineEndPt<e.inlineStartPt||e.blockExtentPt<0)throw RangeError(`Block-flow admission received a negative extent`);let t=e.blockers.filter(t=>{let n=t.exclusionBounds;return t.kind===`table`&&e.inlineEndPt-n.xPt>e.overlapEpsilonPt&&n.xPt+n.widthPt-e.inlineStartPt>e.overlapEpsilonPt}),n=e.blockStartPt;for(let r=0;r<=t.length;r+=1){let i=t.filter(t=>{let r=t.exclusionBounds;return n+e.blockExtentPt-r.yPt>e.overlapEpsilonPt&&r.yPt+r.heightPt-n>e.overlapEpsilonPt});if(i.length===0)return Object.freeze({blockStartPt:n});if(r===t.length)throw Error(`Block-flow float admission did not converge`);n=Math.max(...i.map(e=>e.exclusionBounds.yPt+e.exclusionBounds.heightPt))}throw Error(`Block-flow float admission did not converge`)}function By(e){let t=Ny(e.bounds),n=e.blockers.some(n=>n.kind===`table`&&by(t,Ny(n.exclusionBounds),e.overlapEpsilonPt));return Object.freeze({defer:n,appliedCompatibilityRuleIds:Object.freeze(n?[wy.id]:[])})}function Vy(e){let t=zv(e);return t.exponent>=0?{numerator:t.coefficient<<BigInt(t.exponent),denominator:1n}:{numerator:t.coefficient,denominator:1n<<BigInt(-t.exponent)}}function Hy(e,t){return{numerator:e.numerator*t.denominator+t.numerator*e.denominator,denominator:e.denominator*t.denominator}}function Uy(e,t){return{numerator:e.numerator*t.denominator-t.numerator*e.denominator,denominator:e.denominator*t.denominator}}function Wy(e,t){return{numerator:e.numerator*t.numerator,denominator:e.denominator*t.denominator}}function Gy(e,t){let n=t.numerator<0n;return{numerator:(n?-e.numerator:e.numerator)*t.denominator,denominator:e.denominator*(n?-t.numerator:t.numerator)}}function Ky(e,t){let n=Vy(e),r=Vy(t);return Wv({numerator:n.numerator*r.denominator+r.numerator*n.denominator,denominator:2n*n.denominator*r.denominator})}function qy(e){switch(e){case`left`:case`right`:case`largest`:case`bothSides`:return e;default:return`bothSides`}}function Jy(e){return e===`square`||e===`topAndBottom`||e===`tight`||e===`through`}function Yy(e,t,n){return e.xRight>t+.01&&e.xLeft<n-.01}const Xy=new WeakMap,Zy=new WeakMap;function Qy(e){return Object.isFrozen(e)&&e.every(e=>Object.isFrozen(e))}function $y(e,t,n,r,i,a){return e.kind===t&&Object.is(e.xLeftPt,n)&&Object.is(e.xRightPt,r)&&Object.is(e.yTopPt,i)&&Object.is(e.yBottomPt,a)}function eb(e,t,n){let r=e.authoredWrap;if(r!==`tight`&&r!==`through`)throw Error(`Polygon compilation requires tight or through wrap`);let i={kind:r,imageKey:e.imageKey,points:e.wrapPolygon,xLeftPt:e.xLeft,xRightPt:e.xRight,yTopPt:e.yTop,yBottomPt:e.yBottom};Jv(i);let a=Qy(t);if(a){let i=Zy.get(t)?.find(t=>$y(t,r,e.xLeft,e.xRight,e.yTop,e.yBottom));if(i)return n&&(n.polygonCacheHitCount+=1),i.compiled}n&&(n.polygonCompileCount+=1);let o=uy(i);if(a){let n=Object.freeze({kind:r,xLeftPt:e.xLeft,xRightPt:e.xRight,yTopPt:e.yTop,yBottomPt:e.yBottom,compiled:o});Zy.set(t,Object.freeze([n,...(Zy.get(t)??[]).slice(0,3)]))}return o}function tb(e,t){let n=e.map(e=>{let n=e.wrapPolygon;t&&n&&(t.polygonSnapshotPointCount+=n.length);let r=Object.freeze({...e,...n?{wrapPolygon:Object.freeze(n.map(e=>Object.freeze({...e})))}:{}}),i=r.authoredWrap===`tight`||r.authoredWrap===`through`?eb(r,n??[],t):null;return Object.freeze({rect:r,polygon:i,wrapMaximumLeftPt:i?Math.min(r.xLeft,i.polygonLeftPt):r.xLeft,wrapMaximumRightPt:i?Math.max(r.xRight,i.polygonRightPt):r.xRight})}),r=Object.freeze({floats:Object.freeze(n)});return Xy.set(r,new Map),r}function nb(e,t){let n=qy(e.rect.side);if(n!==`largest`)return n;let r=Q(Uy(Vy(e.wrapMaximumLeftPt),Vy(t.xLeftPt)),Uy(Vy(t.xRightPt),Vy(e.wrapMaximumRightPt)));return r===0?t.readingDirection===`ltr`?`left`:`right`:r>0?`left`:`right`}function rb(e,t,n,r,i,a){let{rect:o,polygon:s}=e,c=s?_y(s,t,n):[{l:Vy(o.xLeft),r:Vy(o.xRight)}];if(c.length===0)return[];let l=s===null,u=c.reduce((e,t)=>Q(t.l,e)<0?t.l:e,c[0].l),d=c.reduce((e,t)=>Q(t.r,e)>0?t.r:e,c[0].r);switch(nb(e,a)){case`left`:return[{l:u,r:Vy(i),leftSquareBoundary:l,rightSquareBoundary:!1}];case`right`:return[{l:Vy(r),r:d,leftSquareBoundary:!1,rightSquareBoundary:l}];case`bothSides`:return c.map(e=>({...e,leftSquareBoundary:l,rightSquareBoundary:l}))}}function ib(e,t){let n=Xy.get(t);if(!n)throw Error(`Prepared float geometry omitted its sweep cache`);let r=n.get(e);if(r)return r;let i=new Set,a=e=>{Number.isFinite(e)&&i.add(e)};for(let{rect:n,polygon:r}of t.floats)if(a(Kv(Uy(Vy(n.yTop),Vy(e)))),a(n.yBottom),r)for(let t of vy(r,e))a(t);let o=Object.freeze([...i].sort((e,t)=>e-t));return n.set(e,o),o}function ab(e){let t=e.filter(e=>Q(e.r,e.l)>0).slice().sort((e,t)=>Q(e.l,t.l)||Q(e.r,t.r)),n=[];for(let e of t){let t=n.at(-1);if(!t||Q(e.l,t.r)>0){n.push({...e});continue}Q(e.l,t.l)===0&&(t.leftSquareBoundary=t.leftSquareBoundary&&e.leftSquareBoundary);let r=Q(e.r,t.r);r>0?(t.r=e.r,t.rightSquareBoundary=e.rightSquareBoundary):r===0&&(t.rightSquareBoundary=t.rightSquareBoundary&&e.rightSquareBoundary)}return n}function ob(e,t,n,r,i){let a=ab(e),o=Vy(t),s=Vy(n),c=[],l=(e,t,n)=>{let r=Q(o,e)>=0?o:e,i=Q(s,t)<=0?s:t;Q(i,r)>0&&c.push({l:r,r:i,squareConstrained:n})},u=o,d=!1;for(let e of a){if(Q(e.r,o)<=0){d=e.rightSquareBoundary;continue}if(Q(e.l,s)>=0){l(u,s,d),u=s;break}Q(e.l,u)>0&&l(u,e.l,d||e.leftSquareBoundary);let t=Q(e.r,u);if(t>0?(u=e.r,d=e.rightSquareBoundary):t===0&&(d&&=e.rightSquareBoundary),Q(u,s)>=0)break}Q(u,s)<0&&l(u,s,d);let f={numerator:0n,denominator:1n};for(let e of c){let t=Uy(e.r,e.l);Q(t,f)>0&&(f=t)}for(let e of c){let t=Uy(e.r,e.l);if(Q(t,f)===0&&Q(t,Vy(Math.max(1,e.squareConstrained?i:r)))>=0)return{l:e.l,r:e.r,squareConstrained:e.squareConstrained}}return null}function sb(e,t,n,r,i,a,o,s,c,l,u){let d=Vy(e),f=Hy(d,Vy(t)),p=e=>Vy(e);if(a.floats.some(({rect:e})=>e.mode===`topAndBottom`&&Yy(e,o,s)&&Q(f,p(e.yTop))>0&&Q(d,p(e.yBottom))<0))return null;let m=[];for(let i of a.floats){let{rect:a}=i;if(a.mode!==`square`||Q(f,p(a.yTop))<=0||Q(d,p(a.yBottom))>=0||!Yy(a,n,r))continue;let o=rb(i,e,t,n,r,c);o.length!==0&&m.push(...o)}if(m.length===0)return{topY:e,xOffset:0,maxWidth:i};let h=ob(m,n,r,l,u);if(!h)return null;let g={numerator:0n,denominator:1n},_=Uy(h.l,Vy(n)),v=Q(_,g)>0?_:g,y=Vy(n),b=Kv(v),x=n+b,S=Vy(x);if(Q(S,h.l)<0&&(b=Kv(Uy(Vy(Kv(h.l)),y)),x=n+b,S=Vy(x)),Q(S,h.l)<0)throw Error(`Exact float window could not represent a contained start`);let C=Vy(r),w=Q(h.r,C)<=0?h.r:C,T=Uy(Vy(qv(w)),S),E=qv(Q(T,g)>0?T:g);if(Q(Vy(x+E),w)>0)throw Error(`Exact float window could not represent a contained end`);return{topY:e,xOffset:b,maxWidth:E}}function cb(e,t){return Hy(Wy(e.exact.slope,Vy(t)),e.exact.intercept)}function lb(e,t){return Q(e.exact.slope,t.exact.slope)===0&&Q(e.exact.intercept,t.exact.intercept)===0}function ub(e,t,n){return Q(cb(e,n),cb(t,n))||Q(e.exact.slope,t.exact.slope)}function db(e,t,n){let r=Uy(e.slope,t.slope);if(r.numerator===0n)return null;let i=Uy(e.intercept,t.intercept);return Gy(Uy(Vy(n),i),r)}function fb(e,t,n,r,i){t===null||Q(t,Vy(n))<=0||Q(t,Vy(r))>=0||(e.push(Kv(t)),i&&(i.localRootCandidateCount+=1))}function pb(e,t,n,r,i,a){let o=e[0];for(let r of e.slice(1)){let e=ub(r,o,n);(t===`min`&&e<0||t===`max`&&e>0)&&(o=r)}let s=o.square;for(let c of e)if(c!==o){if(lb(c,o)){s&&=c.square;continue}(t===`min`?Q(c.exact.slope,o.exact.slope)<0:Q(c.exact.slope,o.exact.slope)>0)&&fb(i,db(c.exact,o.exact,0),n,r,a)}return{exact:o.exact,square:s}}function mb(e,t=!1){return{exact:{slope:{numerator:0n,denominator:1n},intercept:Vy(e)},square:t}}function hb(e,t,n,r,i,a,o,s,c){let{rect:l,polygon:u}=e,d=Vy(Ky(n,r));if(Q(Hy(d,Vy(t)),Vy(l.yTop))<=0||Q(d,Vy(l.yBottom))>=0)return[];let f=u?yy(u,t,n,r).map(e=>({left:{exact:e.left,square:!1},right:{exact:e.right,square:!1}})):[{left:mb(l.xLeft,!0),right:mb(l.xRight,!0)}];if(f.length===0)return[];let p=pb(f.map(e=>e.left),`min`,n,r,s,c),m=pb(f.map(e=>e.right),`max`,n,r,s,c);switch(u?.kind===`tight`&&(f=[{left:p,right:m}]),nb(e,o)){case`left`:return[{left:p,right:mb(a)}];case`right`:return[{left:mb(i),right:m}];case`bothSides`:return f}}function gb(e,t,n,r,i){let a=e.slice().sort((e,n)=>ub(e.left,n.left,t)||ub(e.right,n.right,t));for(let e=0;e+1<a.length;e+=1)fb(r,db(a[e].left.exact,a[e+1].left.exact,0),t,n,i);let o=[];for(let e of a){let a=o.at(-1);if(!a){o.push(e);continue}if(fb(r,db(e.left.exact,a.right.exact,0),t,n,i),ub(e.left,a.right,t)>0){o.push(e);continue}let s=pb([a.right,e.right],`max`,t,n,r,i),c=lb(a.left,e.left)?{exact:a.left.exact,square:a.left.square&&e.left.square}:a.left;o[o.length-1]={left:c,right:s}}return o}function _b(e,t,n,r,i,a,o,s,c,l,u,d){let f=Vy(Ky(e,t)),p=Hy(f,Vy(n));if(a.floats.some(({rect:e})=>e.mode===`topAndBottom`&&Yy(e,o,s)&&Q(p,Vy(e.yTop))>0&&Q(f,Vy(e.yBottom))<0))return null;let m=[],h=[];for(let o of a.floats){let{rect:a}=o;a.mode===`square`&&Yy(a,r,i)&&h.push(...hb(o,n,e,t,r,i,c,m,d))}if(h.length===0)return null;let g=gb(h,e,t,m,d),_=mb(r),v=mb(i),y=[],b=(n,r,i)=>{let a={slope:Uy(r.exact.slope,n.exact.slope),intercept:Uy(r.exact.intercept,n.exact.intercept)};y.push({exactWidth:a});let o=Math.max(1,i?u:l);Q(Hy(Wy(a.slope,Vy(e)),a.intercept),Vy(o))<0&&a.slope.numerator>0n&&fb(m,db(r.exact,n.exact,o),e,t,d)},x=_;for(let e of g)b(x,e.left,x.square||e.left.square),x=e.right;b(x,v,x.square);let S=y[0];for(let t of y.slice(1))(Q(Hy(Wy(t.exactWidth.slope,Vy(e)),t.exactWidth.intercept),Hy(Wy(S.exactWidth.slope,Vy(e)),S.exactWidth.intercept))||Q(t.exactWidth.slope,S.exactWidth.slope))>0&&(S=t);if(S)for(let n of y)n===S||Q(n.exactWidth.slope,S.exactWidth.slope)<=0||fb(m,db(n.exactWidth,S.exactWidth,0),e,t,d);return m.length===0?null:Math.min(...m)}function vb(e,t,n,r,i,a,o=r,s=r+i,c={xLeftPt:r,xRightPt:r+i,readingDirection:`ltr`},l=t,u=null){let d=r,f=r+i,p=ib(n,a);if(u){u.structuralEventCount=p.length;for(let{polygon:e}of a.floats)e&&(u.compiledIntersectionCount+=e.intersectionCount,u.compiledContourSpanCount+=e.contourSpans.length,u.compileOrderComparisonCount+=e.compileOrderComparisonCount,u.compilePairMembershipVisitCount+=e.compilePairMembershipVisitCount)}let m=e=>(u&&(u.evaluatedYCount+=1),sb(e,n,d,f,i,a,o,s,c,t,l)),h=m(e);if(h)return h;let g=e,_=p.findIndex(e=>e>g);for(;_>=0&&_<p.length;){let e=p[_],r=_b(g,e,n,d,f,a,o,s,c,t,l,u);if(r!==null){u&&(u.localRootEventCount+=1);let e=m(r);if(e)return e;g=r;continue}let i=m(e);if(i)return i;g=e;do _+=1;while(_<p.length&&p[_]<=g)}throw Error(`Finite float line-window event sweep found no usable terminal Y`)}function yb(e,t,n,r,i,a,o=r,s=r+i,c={xLeftPt:r,xRightPt:r+i,readingDirection:`ltr`},l=t){return vb(e,t,n,r,i,a,o,s,c,l)}function bb(e,t,n,r){let i=new Set;for(;;){let a=e;for(let i of t)i.mode===`topAndBottom`&&Yy(i,n,r)&&e>=i.yTop&&e<i.yBottom&&(a=Math.max(a,i.yBottom));if(a===e)return e;if(!Number.isFinite(a)||a<e||i.has(a))throw Error(`Top-and-bottom solver violated strictly increasing finite-bottom progress`);i.add(a),e=a}}const xb=new Set([`+`,`-`,`−`,`=`,`±`,`×`,`÷`]);function Sb(e){return xb.has(e)?` ${e} `:e}function Cb(e){return e.map(e=>{switch(e.kind){case`run`:return Sb(e.text);case`fraction`:return`${Cb(e.num)}/${Cb(e.den)}`;case`sup`:return`${Cb(e.base)}^${Cb(e.sup??[])}`;case`sub`:return`${Cb(e.base)}_${Cb(e.sub??[])}`;case`subSup`:return`${Cb(e.base)}_${Cb(e.sub??[])}^${Cb(e.sup??[])}`;case`nary`:return`${e.op}${Cb(e.sub??[])}${Cb(e.sup??[])}${Cb(e.body)}`;case`delimiter`:return`${e.begChar}${e.items.map(Cb).join(`,`)}${e.endChar}`;case`radical`:return`${e.index?.length?Cb(e.index):``}√${Cb(e.radicand)}`;case`limit`:return`${Cb(e.base)}${Cb(e.lower??[])}${Cb(e.upper??[])}`;case`array`:return e.rows.map(e=>e.map(Cb).join(` `)).join(` `);case`groupChr`:return`${e.char}${Cb(e.base)}`;case`bar`:case`box`:case`borderBox`:return Cb(e.base);case`accent`:return`${e.char}${Cb(e.base)}`;case`func`:return`${Cb(e.name)}(${Cb(e.arg)})`;case`group`:return Cb(e.items);case`phant`:return e.show?Cb(e.base):``;case`sPre`:return`${Cb(e.sub)}${Cb(e.sup)}${Cb(e.base)}`}}).join(``).replace(/[ \t]{2,}/g,` `)}var wb=class extends Z{reason;states;passes;constructor(e,t,n){super(`NON_CONVERGENCE`,e===`cycle`?`repeated exact-state cycle at ${t.at(-1)??`<missing>`}`:`hard exact-state pass limit ${n} reached`),this.name=`ExactConvergenceError`,this.reason=e,this.states=Object.freeze([...t]),this.passes=n}};function Tb(e){let{seedState:t,step:n,stateOf:r,limit:i}=e,a=t===void 0?2:1;if(!Number.isInteger(i)||i<a)throw RangeError(`Exact convergence limit must be an integer >= ${a}`);let o=t===void 0?[]:[t],s=new Set(o),c=null;for(let e=1;e<=i;e+=1){let t=n(c,e),a=r(t),l=o.at(-1);if(o.push(a),l===a)return Object.freeze({value:t,passes:e});if(s.has(a))throw new wb(`cycle`,o,e);if(s.add(a),e===i)throw new wb(`limit`,o,e);c=t}throw new wb(`limit`,o,i)}function Eb(e,t,n){if(!Number.isInteger(n)||n<1)throw new Z(`NON_CONVERGENCE`,`limit must be a positive integer`);try{return Tb({seedState:e.fingerprint,step:n=>t(n??e),stateOf:e=>e.fingerprint,limit:n}).value}catch(e){throw e instanceof wb?new Z(`NON_CONVERGENCE`,e.reason===`cycle`?`repeated geometry fingerprint cycle at ${e.states.at(-1)??`<missing>`}`:`hard iteration limit ${n} reached`):e}}var Db=class extends Z{reason;states;constructor(e,t){super(`NON_CONVERGENCE`,e===`cycle`?`line wrap measure/resolve cycle did not converge (${t.length} states)`:`line wrap measure/resolve pass limit did not converge (${t.length} states)`),this.name=`LineWrapNonConvergenceError`,this.reason=e,this.states=Object.freeze([...t])}};function Ob(e){return e.map(e=>({...e}))}function kb(e,t){return JSON.stringify(e.map((e,n)=>({end:e.consumedEnd,topY:e.topY,xOffset:e.xOffset,availableWidth:e.availWidth,probeHeight:t[n],segments:e.segments.map(e=>({source:e.src,...e.text===void 0?{}:{text:e.text}}))})))}function Ab(e,t){try{return Tb({step:n=>{let r=e(n?.probeHeights??null),i=Object.freeze(r.map(t));return Object.freeze({lines:r,probeHeights:i,state:kb(r,i)})},stateOf:e=>e.state,limit:16}).value.lines}catch(e){throw e instanceof wb?new Db(e.reason,e.states):e}}$({id:`word-east-asian-grid-line-allocation`,evidence:{kind:`regression-test`,reference:`packages/docx/src/layout/compatibility.test.ts#pins East Asian grid allocation and the untabled Far East metric factor`},description:`For an East Asian single-spaced line on a document grid, preserve the measured whole-cell allocation from the intended face design height and use the established 1.3-times-em fallback only when that design height is unavailable.`}),$({id:`word-table-cell-ignores-grid-right-indent-adjustment`,evidence:{kind:`office-observation`,syntheticFixtureId:`table-cell-adjust-right-indent-width-position-matrix`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`In the observed linesAndChars matrix, paragraphs inside fixed-width table cells retain the same line breaks for omitted (default true) and explicit-false w:adjustRightInd across four boundary widths and both left/right cell positions. Scope this Word-only exception to table-cell containers; ordinary body paragraphs retain the ECMA-376 §17.3.1.1 adjustment.`}),$({id:`word-snap-to-chars-east-asian-cell-fit`,evidence:{kind:`office-observation`,syntheticFixtureId:`snap-to-chars-east-asian-cell-fit-matrix`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`For snapToChars, Word centers each East-Asian grapheme independently in the smallest whole number of character-pitch units that contains its natural advance. A grapheme that fits uses the one-unit placement described by [MS-OI29500] §2.1.534; an undersized authored pitch expands only that grapheme to additional units.`}),$({id:`word-snap-to-chars-script-block-allocation`,evidence:{kind:`microsoft-note`,reference:`[MS-OI29500] §2.1.534`},description:`Allocate snapToChars Latin text in contiguous blocks centered across the required grid units, complex-script blocks from their leading edge, and East-Asian graphemes independently by character cell.`});function jb(e,t){return!(t>0)||!Number.isFinite(e)?1:Math.max(1,Math.ceil(Math.max(0,e)/t-1e-9))}function Mb(e){return!e}$({id:`word-grid-right-indent-pitch-alignment`,evidence:{kind:`office-observation`,syntheticFixtureId:`grid-right-indent-character-pitch-boundary-matrix`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`For body paragraphs whose ECMA-376 §17.3.1.1 adjustment is enabled on a linesAndChars character grid, Word reduces the physical line width to the greatest whole character-pitch multiple not exceeding the available width. The observed matrix covers exact and non-exact widths, zero and negative charSpace, explicit opt-out, line-only control, both physical indent sides, and the separately registered table-cell exception.`});function Nb(e,t){if(!(t>0)||!Number.isFinite(e)||e<=0)return 0;let n=(e%t+t)%t,r=1e-9;return n<=r||t-n<=r?0:n}$({id:`word-hanging-tab-same-position-precedence`,evidence:{kind:`office-observation`,syntheticFixtureId:`hanging-indent-authored-tab-collision-matrix`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`When the implicit tab created by a hanging indent shares its coordinate with an authored center, end, or start stop, Word resolves one advancing stop at that coordinate using the authored alignment. An authored bar remains an independent drawing rule, so the implicit advancing stop survives beside it. If center/end alignment would place following text before the current pen, the tab contributes zero advance.`});function Pb(e){return e!==`bar`&&e!==`clear`}$({id:`word-rtl-decimal-tab-physical-alignment`,evidence:{kind:`office-observation`,syntheticFixtureId:`rtl-decimal-tab-run-boundary-matrix`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`For LTR numeric cells embedded in a bidi paragraph, Word aligns the physical left edge of the first halfwidth period to the decimal stop across source-run boundaries. When no period exists, it aligns the numeric cell's physical right edge to the stop.`}),$({id:`word-decimal-tab-separator-resolution`,evidence:{kind:`microsoft-note`,reference:`[MS-OI29500] §2.1.556`},description:`Use the first explicit halfwidth period as the decimal-tab alignment point; when absent, use the implicit separator after the final digit of the first Unicode decimal-number sequence.`}),$({id:`word-use-fe-layout-inherited-grid-minimum`,evidence:{kind:`office-observation`,syntheticFixtureId:`use-fe-layout-visible-script-grid-matrix`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`With useFELayout enabled, a visible Latin line with a resolved eastAsia font axis participates in Far East grid metrics even when w:rFonts@hint is absent; inherited automatic spacing keeps the larger of its whole-cell design allocation and one grid pitch multiplied by the inherited spacing value.`}),$({id:`word-use-fe-layout-empty-mark-grid-allocation`,evidence:{kind:`office-observation`,syntheticFixtureId:`use-fe-layout-empty-mark-grid-matrix`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`With useFELayout enabled, a content-less paragraph mark participates in Far East whole-cell document-grid allocation even when the document contains no literal East Asian text. Its face-specific Far East design height governs the cell count; exact spacing and snapToGrid=false remain the document-grid overrides named by ECMA-376 §17.6.5. Observed Word output gives signed atLeast spacing a discontinuous boundary on an active grid: negative values use their absolute magnitude as the mark advance, zero keeps the ordinary atLeast-zero advance regardless of inheritance source, and positive values retain whole-cell allocation.`});function Fb(e){let{ordinaryAdvancePx:t,allocatedGridAdvancePx:n,atLeastZeroAdvancePx:r,lineSpacing:i,gridAllocationActive:a,scale:o}=e;return a?i?.rule===`atLeast`&&i.value<0?Math.abs(i.value)*o:i?.rule===`atLeast`&&i.value===0?r:i?.rule===`exact`?t:Math.max(t,n):t}$({id:`word-contiguous-underline-geometry`,evidence:{kind:`regression-test`,reference:`packages/docx/src/layout/paragraph.test.ts#uses one safe baseline for a solid underline spanning adjacent source runs`},description:`Adjacent compatible underlined source runs share one safe baseline and continuous authored cadence while style, color, and thickness boundaries remain distinct.`}),$({id:`word-grid-at-least-tall-line-unsnapped`,evidence:{kind:`regression-test`,reference:`packages/docx/src/line-box-height.test.ts#does not round tall East Asian content up to an additional grid cell`},description:`An explicitly authored atLeast line on an active document grid keeps the maximum of its natural height, authored minimum, and one pitch instead of rounding tall content to another whole cell.`}),$({id:`word-degenerate-line-spacing-single`,evidence:{kind:`microsoft-note`,reference:`[MS-DOC] §2.9.146`},description:`Preserve a non-collapsing single-line fallback for exact or automatic line spacing at or below zero, consistent with the native LSPD representation.`}),$({id:`word-auto-multiple-baseline-pin`,evidence:{kind:`office-observation`,syntheticFixtureId:`auto-multiple-baseline-pin`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`Paint a positive automatic line-spacing multiplier with its glyph baseline pinned inside the single design line, placing extra leading or compressed overflow toward block-end; this is draw-only and does not replace the centered trailing-mark pagination metric.`}),$({id:`word-mixed-anchor-visible-line-metrics`,evidence:{kind:`regression-test`,reference:`packages/docx/src/anchor-host-metrics.test.ts#reserves host line height without using its zero-ink box for a visible run baseline`},description:`A zero-ink drawing anchor host reserves its line and grid height while visible neighboring glyphs retain their own ascent, descent, and design-line baseline.`}),$({id:`word-justification-leading-indent-exclusion`,evidence:{kind:`regression-test`,reference:`packages/docx/src/text-distribute.test.ts#forwards (segs, slack, firstContentSi, lastDrawnSi) positionally`},description:`Keep leading whitespace used as a first-line text indent fixed while distributing justified-line slack across content in a left-to-right line.`}),$({id:`word-justified-candidate-separator-fit`,evidence:{kind:`regression-test`,reference:`packages/docx/src/justify-shrink-overshoot.test.ts#counts a candidate trailing space when the prospective line will justify`},description:`On a full paragraph-width line that will be fully justified, include the candidate word separator in its wrap-fit width; lines narrowed by DrawingML wrap exclusions retain collapsible line-end separator fit behavior.`}),$({id:`word-overflow-punctuation-language-sets`,evidence:{kind:`microsoft-note`,reference:`[MS-OE376] §2.1.56`},description:`Apply the language-specific punctuation sets documented for Word in [MS-OE376] §2.1.56, and let overflowPunct override kinsoku when both rules affect the same character.`}),$({id:`word-full-width-character-spacing-scope`,evidence:{kind:`microsoft-note`,reference:`[MS-OE376] §2.1.562`},description:`Interpret ST_CharacterSpacing as applying whitespace compression to full-width punctuation characters. This rule establishes only which characters are eligible; it does not define a universal compression amount.`}),$({id:`word-japanese-punctuation-compression-cell`,evidence:{kind:`office-observation`,syntheticFixtureId:`japanese-fullwidth-punctuation-compression-cell`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`In the observed Japanese compatibility matrix, 、。 ,. and the closing forms 」』】)]} on a full ideographic-cell advance retain at least half of that cell. U+3017 and full-width !/? remain full-cell. A fontTable w:pitch value classifies the authored face for font selection; it is not a switch for document-level characterSpacingControl. Punctuation that the selected face already exposes on a smaller proportional advance is retained as measured rather than compressed a second time. Tight adjacent glyph ink can require a larger retained extent to prevent collision. This is an Office-observed compression amount, not a normative interpretation of ST_CharacterSpacing.`}),$({id:`word-authored-character-spacing-pitch-priority`,evidence:{kind:`office-observation`,syntheticFixtureId:`authored-character-spacing-punctuation-pitch`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`When a run authors a positive w:spacing character pitch, Word preserves that expanded pitch instead of additionally applying the document-level punctuation whitespace compression. Omitted, zero, or overlapping run spacing leaves characterSpacingControl active.`}),$({id:`word-source-run-space-sequence`,evidence:{kind:`office-observation`,syntheticFixtureId:`source-run-space-sequence-wrap-matrix`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`At a source-run boundary, Word keeps a space-only continuation attached when the preceding run already ends in a space. A single leading space in a distinct run without a preceding space remains a break opportunity. This isolates source-boundary compatibility from the ordinary UAX #14 LB7 handling within one authored run.`}),$({id:`word-consecutive-space-natural-advance`,evidence:{kind:`office-observation`,syntheticFixtureId:`consecutive-space-wrap-grid-matrix`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`When visible text follows two or more authored consecutive spaces, Word preserves the sequence at natural advance instead of using it as Knuth-Plass inter-word shrink capacity. The result is invariant across linesAndChars with negative/zero charSpace and a line-only grid; source-run boundaries remain governed separately by the source-space-sequence rule.`}),$({id:`word-balanced-consecutive-space-cell`,evidence:{kind:`office-observation`,syntheticFixtureId:`single-double-byte-width-space-grid-matrix`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`With ECMA-376 §17.15.3.3 balanceSingleByteDoubleByteWidth enabled, Word retains one ordinary inter-word U+0020 at its proportional natural advance, while a sequence of two or more authored U+0020 spaces advances each space by half of the selected East-Asian ideographic cell. The observed matrix covers one, two, four, and eight spaces; same-run and source-run boundaries; proportional and fixed-pitch faces; linesAndChars with negative/zero charSpace; and a line-only grid.`});function Ib(e){return Number.isInteger(e)&&e>=2}function Lb(e){return e!==`snapToChars`}$({id:`word-balanced-lines-and-chars-grid-delta`,evidence:{kind:`office-observation`,syntheticFixtureId:`single-double-byte-width-grid-observation-matrix`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`With balanceSingleByteDoubleByteWidth enabled on linesAndChars, Word applies half of the authored charSpace delta to ASCII SBCS text and to U+0020/U+3000 space characters, while applying the full delta to CJK ideographs and full-width ASCII forms. The Word-output evidence covers ASCII digits, letters, punctuation, spaces, CJK, full-width ASCII, mixed text, proportional/fixed-pitch faces, negative/zero/positive charSpace, and line-only controls. Non-ASCII high-ANSI and complex-script text are outside the observed matrix and retain the preexisting grid behavior.`}),$({id:`word-ideographic-space-line-end-allowance`,evidence:{kind:`office-observation`,syntheticFixtureId:`ideographic-space-line-end-count-and-run-boundary-matrix`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`Word keeps a single U+3000 immediately following visible East-Asian text on that line when the visible glyph is force-fitted into a narrow table cell. A paragraph-final sequence of two or more U+3000 characters remains authored width-bearing content and may form blank continuation lines. The observed matrix covers single and trailing multiple spaces, linesAndChars with negative/positive charSpace, line-only grids, and snapToGrid opt-out.`});function Rb(e,t){return e&&t===1?1:0}function zb(e,t){if(t!==`complexScript`)return e.length>0&&[...e].every(e=>e===` `||e===` `)?.5:t===`eastAsia`?1:[...e].every(e=>(e.codePointAt(0)??128)<=127)?.5:void 0}$({id:`word-ms-mincho-empty-east-asian-mark-height`,evidence:{kind:`office-observation`,syntheticFixtureId:`ms-mincho-empty-east-asian-paragraph-mark`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`In the observed compatibility fixture, an empty 12-point East-Asian paragraph mark routed to MS Mincho occupies a 15.6-point single-line box. Scope this 1.3-em floor to empty East-Asian paragraph marks; ordinary MS Mincho text lines and Latin marks retain their independently measured metrics.`});function Bb(e){let t=Math.max(0,e.punctuationAdvancePt),n=Math.max(0,e.ideographicCellAdvancePt);return t<n?t:Math.min(t,Math.max(0,e.punctuationInkEndPt,n/2))}function Vb(e){return e===void 0||e<=0}function Hb(e,t){return e.endsWith(` `)&&t.startsWith(` `)}const Ub={ja:new Set([...`,.’”、。」』】),.]}。、`]),zhHans:new Set([...`!%),.:;>?]}¢°·ˇ’”‰′″℃∶、。〃〉》」』】〗〕〞﹚﹜﹞!"%'),.:;?]}¢`]),zhHant:new Set([...`!),.:;?]}’”′、。〉》」』】〕〞﹚﹜﹞!),.:;?]}`]),ko:new Set([...`!%),.:;?]}¢°’”′″℃〉》」』】〕!%),.:;?]}¢`])},Wb=new Set([...Ub.ja,...Ub.zhHans,...Ub.zhHant,...Ub.ko]);function Gb(e,t){let n=t?.toLowerCase();return n?.startsWith(`ja`)?Ub.ja.has(e):n?.startsWith(`ko`)?Ub.ko.has(e):n?.startsWith(`zh`)?(/(?:^|-)(?:tw|hk|mo)(?:-|$)|hant/u.test(n)?Ub.zhHant:Ub.zhHans).has(e):Wb.has(e)}function Kb(e){return e.lineWillJustify&&e.wrapNarrowed!==!0?e.widthPx:e.widthPx-e.trailingSpacePx}function qb(e){return e.resolvedMeasurementRouteCount===1?e.biasBudgetPx:0}$({id:`word-ruby-paragraph-uniform-line-advance`,evidence:{kind:`regression-test`,reference:`packages/docx/src/paragraph-measure.test.ts#uses one uniform snapped advance for every line in a ruby paragraph`},description:`Every line in a ruby-bearing paragraph uses the paragraph-wide maximum snapped line advance so its baseline rhythm remains uniform.`}),$({id:`word-fit-text-inter-character-expansion`,evidence:{kind:`regression-test`,reference:`packages/docx/src/fit-text.test.ts#distributes (val − Σnatural)/(n−1) as the inter-character gap, no trailing gap`},description:`Expand a multi-character fitText region to its authored width by distributing the residual evenly across interior character gaps.`}),$({id:`word-cjk-both-inter-character-expansion`,evidence:{kind:`regression-test`,reference:`packages/docx/src/text-distribute.test.ts#§17.18.44: fills a wrapped pure-CJK line via inter-CJK pitch (expansion default)`},description:`Treat inter-CJK boundaries as eligible inter-word gaps when expanding a non-final both-justified line that contains no spaces.`}),$({id:`word-thai-distribute-cluster-policy`,evidence:{kind:`regression-test`,reference:`packages/docx/src/thai-distribute.test.ts#fills non-final lines to the right margin under thaiDistribute`},description:`Expand non-final thaiDistribute lines at Thai grapheme-cluster boundaries while retaining a natural-width final line.`}),$({id:`word-numeric-decimal-tab-inference`,evidence:{kind:`regression-test`,reference:`packages/docx/src/decimal-tab-autoalign.test.ts#right-aligns numbers of different digit counts at the decimal tab`},description:`Right-align an otherwise tab-less numeric paragraph at its leading decimal tab while leaving non-numeric and no-decimal-tab paragraphs unchanged.`}),$({id:`word-numbering-marker-overflow-tab-advance`,evidence:{kind:`regression-test`,reference:`packages/docx/src/numbered-marker-tab-advance.test.ts#advances the body past the marker to the next tab stop, not onto indentLeft`},description:`When a numbering marker overruns its hanging-indent budget, advance the body to the next reachable tab stop beyond the marker edge.`}),$({id:`word-numbering-suffix-coincident-list-tab`,evidence:{kind:`regression-test`,reference:`packages/docx/src/layout/numbering-marker.test.ts#keeps a suffix tab on the list stop coincident with the marker end`},description:`For the tab synthesized by a numbering suffix, accept an authored numeric list tab coincident with the shaped marker end instead of advancing to the next automatic tab stop.`}),$({id:`word-numbering-marker-paragraph-mark-fallback`,evidence:{kind:`office-observation`,syntheticFixtureId:`numbering-marker-paragraph-mark-formatting`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`When numbering-level rPr omits a marker formatting axis, Word takes that axis from the effective paragraph-mark rPr rather than a content run. A numbering-level concrete value or explicit auto remains authoritative, and body and text-box stories use the same cascade.`});function Jb(e,t){return t.alignment===`num`&&Math.abs(t.pos-e)<=1e-6}$({id:`word-tab-stop-page-edge-clamp`,evidence:{kind:`regression-test`,reference:`packages/docx/src/rtl-tab-stops.test.ts#pins a page number to the left text margin when the stop is past it`},description:`Clamp content assigned to a tab stop beyond the trailing text edge back onto that edge instead of placing ink outside the page content band.`}),$({id:`word-dictionary-sea-natural-fit`,evidence:{kind:`regression-test`,reference:`packages/docx/src/sea-justified-fit.test.ts#Rule 1: wraps the paragraph-final Thai word on a thaiDistribute closing line (zero space-shrink)`},description:`Do not admit a dictionary Southeast-Asian word by compressing preceding inter-word spaces when its natural advance exceeds the remaining line width.`}),$({id:`word-dictionary-sea-atomic-chunk`,evidence:{kind:`regression-test`,reference:`packages/docx/src/sea-justified-fit.test.ts#Rule 2: a no-space chunk that fits a full line moves whole instead of splitting`},description:`Move a glued dictionary Southeast-Asian chunk to a fresh line whole when it fits that full line, using dictionary breaks only when the chunk itself is overlong.`}),$({id:`word-overlong-token-emergency-break`,evidence:{kind:`regression-test`,reference:`packages/docx/src/run-inline-formatting.test.ts#breaks a no-space token wider than the line at the character level`},description:`Emergency-break a non-CJK token that is wider than an empty line at grapheme-safe character boundaries so it remains inside the content band.`}),$({id:`word-run-vertical-align-baseline-shift`,evidence:{kind:`regression-test`,reference:`packages/docx/src/run-char-metrics-render.test.ts#w:vertAlign raises superscript, lowers subscript, and leaves ordinary baselines unchanged`},description:`Retain the established run-level baseline displacement for vertically aligned text: superscript rises by 0.35 of its authored font size and subscript falls by 0.15, while the separately authored w:position remains additive.`}),$({id:`word-uniform-run-position-leading`,evidence:{kind:`office-observation`,syntheticFixtureId:`uniform-run-position-leading`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`When every metric-bearing item on a line has the same non-zero w:position, Word preserves the enlarged line extent but shares the resulting surplus above and below the glyphs. A line containing a differently-positioned item retains the full relative displacement.`});function Yb(e,t){return t===0?e:e-t/2}function Xb(e,t){return e===`super`?t*.35:e===`sub`?-t*.15:0}const Zb=1.3;function Qb(e,t,n){if(!n||!e)return 0;let r=e.trim().toLowerCase();return r===`ms mincho`||r===`ms 明朝`?t*Zb:0}function $b(e,t){return t>0?Math.max(1,Math.ceil(e/t)):1}function ex(e,t){return e>0?e:t*Zb}function tx(e,t,n){return Math.max(e,t*n)}function nx(e,t,n){return Math.max(e,t,n)}function rx(e,t){return(e===`exact`||e===`auto`)&&t<=0}$({id:`word-neutral-script-attachment`,evidence:{kind:`regression-test`,reference:`packages/docx/src/layout/compatibility.test.ts#keeps neutral characters attached to the active script slice`},description:`Weak and neutral non-letter characters stay with the active complex-script slice instead of opening additional formatting segments.`}),$({id:`word-rtl-run-ambiguous-class-override`,evidence:{kind:`regression-test`,reference:`packages/docx/src/bidi-line.test.ts#keeps LTR word order for English text in rtl-marked runs`},description:`Model an rtl-marked run as a higher-level UAX #9 override for punctuation and symbols only, leaving whitespace and strong letters at their ordinary classes.`}),$({id:`word-rtl-complex-script-european-digits-an`,evidence:{kind:`regression-test`,reference:`packages/docx/src/bidi-line.test.ts#orders an AN-classified date as 2026-02-28`},description:`Classify European digits as Arabic Number within an Arabic or Hebrew complex-script run so UAX #9 preserves the compatible visual ordering of digit groups and separators.`}),$({id:`word-kashida-final-form-priority`,evidence:{kind:`regression-test`,reference:`packages/docx/src/kashida-priority.test.ts#uses the BaRa join (Beh->Yeh) over the final-letter join in بين`},description:`Apply the measured kashida final-letter priority classes only at a word-final following letter instead of copying the broader Qt final-form conditions.`}),$({id:`word-vertical-tu-corner-placement`,evidence:{kind:`regression-test`,reference:`packages/docx/src/vertical-text.test.ts#does NOT ink-centre a substituted Tu comma even when ink metrics are present`},description:`Keep a substituted vertical Tu comma or full stop at the font-designed upper-right cell position rather than ink-centering it geometrically.`});const ix=/[\p{P}\p{S}]/u;function ax(e){return ix.test(e)}function ox(e,t){return e===t}function sx(e){return e!==null}function cx(e,t,n,r,i,a={}){if(t!=null)return t*n;if(!r?.ruby||!i)throw Error(`Ruby at ${e}pt without hpsRaise requires retained base and guide ink`);if(r.textLayoutService&&r.textShapeRequest){let e=r.textLayoutService.shape({...r.textShapeRequest,text:r.text,fontSizePt:vv(r,n),measure:!0,clusterGeometry:!1}),t=r.textLayoutService.shape({...r.textShapeRequest,text:r.ruby.text,fontSizePt:r.ruby.fontSizePt*n,measure:!0,clusterGeometry:!1});if(e.inkBounds&&t.inkBounds)return e.inkBounds.ascentPt+t.inkBounds.descentPt}let o=i.font;try{i.font=xx(r.bold,r.italic,vv(r,n),r.fontFamily,a,r.fontRoute);let t=i.measureText(r.text);i.font=xx(r.bold,r.italic,e*n,r.fontFamily,a,r.fontRoute);let o=i.measureText(r.ruby.text);if(Number.isFinite(t.actualBoundingBoxAscent)&&Number.isFinite(o.actualBoundingBoxDescent))return t.actualBoundingBoxAscent+o.actualBoundingBoxDescent}finally{i.font=o}throw Error(`Ruby without hpsRaise requires retained base and guide ink`)}const lx=new Set([`sakkal majalla`,`traditional arabic`,`simplified arabic`,`arabic typesetting`,`univers next arabic`,`noto naskh arabic`,`noto sans arabic`]),ux=new Set([`sakkal majalla`,`traditional arabic`,`simplified arabic`,`arabic typesetting`,`noto naskh arabic`]);function dx(e){return lx.has(e.toLowerCase())}function fx(e){return e.map(e=>`"${e}"`).join(`, `)}const px=[`Noto Naskh Arabic`,`Noto Sans Arabic`];function mx(e){let t=e&&e!==`jp`?K(e,`sans`):[`Noto Sans JP`,`Hiragino Sans`,`Meiryo`,...K(`jp`,`sans`).slice(1)];return e==null?`${fx([...q,`Arial`,`Helvetica`,`Liberation Sans`,...t,...px])}, sans-serif`:`${fx([...t,...px,...q])}, sans-serif`}function hx(e){let t=e&&e!==`jp`?K(e,`serif`):[`Yu Mincho`,`YuMincho`,`Hiragino Mincho ProN`,`MS Mincho`,`Noto Serif JP`,...K(`jp`,`serif`).slice(1)];return e==null?`${fx([...J,`Times New Roman`,`Cambria`,`Liberation Serif`,...t,...px])}, serif`:`${fx([...t,...px,...J])}, serif`}const gx=new WeakMap,_x=new WeakMap;function vx(e,t){let n=e??{};return t&&Object.keys(t).length>0&&_x.set(n,t),n}function yx(e,t={}){let n=gx.get(t)??(()=>{let e=new Map;return gx.set(t,e),e})(),r=e??`\0null`,i=n.get(r);if(i!==void 0)return i;let a=bx(e,t,_x.get(t));return n.set(r,a),a}function bx(e,t,n={}){if(!e)return mx(null);let r=`"${(e=>e.replace(/"/g,`\\"`))(e)}"`,i=e.toLowerCase(),a=ne(e);if(dx(e))return ux.has(i)?`${r}, "Noto Naskh Arabic", "Noto Sans Arabic", "Noto Serif", "Noto Sans JP", "Hiragino Sans", serif`:`${r}, "Noto Sans Arabic", "Noto Naskh Arabic", "Noto Sans JP", "Hiragino Sans", sans-serif`;let o=t[e];if(o&&o!==`auto`)switch(o){case`roman`:return`${r}, ${hx(a)}`;case`swiss`:return`${r}, ${mx(a)}`;case`modern`:if(n[e]===`fixed`)return a==null?`${r}, "Courier New", monospace`:`${r}, ${fx([...a===`jp`?[`Yu Gothic`,`YuGothic`,`Hiragino Sans`,`Meiryo`,`Noto Sans JP`]:K(a,`sans`),`Courier New`])}, monospace`;break;default:break}let s=G(e);if(s===`serif`)return`${r}, ${hx(a)}`;if(s===`mono`)return`${r}, "Courier New", monospace`;if(a==null||a===`jp`){if(i.includes(`meiryo`)||e.includes(`メイリオ`))return`${r}, "Meiryo UI", "Meiryo", ${mx(a)}`;if(e.includes(`游ゴシック`)||/\byu\s*gothic\b/i.test(e)||i.includes(`yugothic`))return`${r}, "Yu Gothic", "YuGothic", ${mx(a)}`;if(i.includes(`ipa`))return`${r}, "IPAexGothic", ${mx(a)}`;if(i.includes(`segoe`))return`${r}, "Segoe UI", ${fx([...px,...q])}, sans-serif`}return`${r}, ${mx(a)}`}function xx(e,t,n,r,i={},a){return a?W(a,n,e?700:400,t?`italic`:`normal`):`${t?`italic`:`normal`} ${e?`bold`:`normal`} ${n}px ${yx(r,i)}`}function Sx(e,t,n=!1){return Math.max(ag(e.fontFamily,t,n),(e.resolvedLineHeightRatio??0)*t)}function Cx(e,t,n=!1){return Math.max(ag(e.eaFloorFamily,t,n),(e.resolvedEaFloorLineHeightRatio??0)*t)}function wx(e){for(let t of e.runs)if(t.type===`text`||t.type===`field`)return t.fontSize;return typeof e.defaultFontSize==`number`?e.defaultFontSize:10}function Tx(e,t=!1){for(let t of e.runs)if(t.type===`text`||t.type===`field`)return t.fontFamily;return t&&e.defaultFontFamilyEastAsia?e.defaultFontFamilyEastAsia:e.defaultFontFamily??null}function Ex(e,t,n){return ag(Tx(e,n),wx(e)*t,n)}function Dx(e,t){return!e||e.charSpacePt==null||e.type!==`linesAndChars`&&e.type!==`snapToChars`?0:e.charSpacePt*t}function Ox(e){let t=0;for(let n of e)yv.test(n)&&t++;return t}function kx(e,t,n){let r=Dx(t,n);if(r===0||e.length===0)return 0;let i=[...e];return t?.type===`linesAndChars`||Ox(e)===i.length?i.length*r:0}function Ax(e,t,n){return e.snapToCharacterGrid===!1||t?.type===`snapToChars`?0:t?.type===`linesAndChars`&&e.widthBalanceGridDeltaFactor!==void 0?Dx(t,n)*e.widthBalanceGridDeltaFactor:kx(e.text,t,n)===0?0:Dx(t,n)}function jx(e,t){return e.fitTextPerGapPx===void 0?Mx(e)*t:e.fitTextPerGapPx}function Mx(e){return e.charSpacing??0}function Nx(e){return e.punctuationCompressions?.reduce((e,t)=>e+t.adjustmentPt,0)??0}function Px(e,t){return Fx(e,e.text,t)}function Fx(e,t,n){if(e.fitTextPerGapPx!==void 0||e.tateChuYoko||!Lb(n?.type)||!e.widthBalanceSpaceSequence||e.widthBalanceSpaceAdjustmentPt===void 0)return 0;let r=0;for(let e of t)e===` `&&(r+=1);return r*e.widthBalanceSpaceAdjustmentPt}function Ix(e,t,n){let r=e.punctuationCompressions?.filter(e=>e.end>t&&e.end<=n).map(e=>Object.freeze({end:e.end-t,adjustmentPt:e.adjustmentPt}));return r&&r.length>0?Object.freeze(r):void 0}function Lx(e,t){if(!e.textLayoutService||!e.textShapeRequest||t.length===0)return;let n=e.textLayoutService.shape({...e.textShapeRequest,text:t,measure:!0,clusterGeometry:!1});if(n.horizontalInkBoundsAreTight!==!0||!n.inkBounds||!Number.isFinite(n.advancePt)||!Number.isFinite(n.inkBounds.xMinPt)||!Number.isFinite(n.inkBounds.xMaxPt))return;let r=e.charScale??1;return{advancePt:n.advancePt*r,xMinPt:n.inkBounds.xMinPt*r,xMaxPt:n.inkBounds.xMaxPt*r}}function Rx(e){if(!e.textLayoutService||!e.textShapeRequest||e.text.length===0)return;let t=e.textLayoutService.shape({...e.textShapeRequest,text:e.text,measure:!0,clusterGeometry:!0});if(!t.clusters?.length)return;let n=e.charScale??1,r=new Map;for(let e of t.clusters){if(!Number.isFinite(e.advancePt))return;r.set(e.range.end,e.advancePt*n)}return r}function zx(e){let t,n=new Map;for(let r of e){if(!(`text`in r)||r.verticalRun){t=void 0;continue}let e=r,i=e.punctuationCompressions??[],a=new Map(i.map((e,t)=>[e.end,t])),o=i.length>0?Rx(e):void 0,s=[0,...Dm(e.text),e.text.length];for(let r=0;r<s.length-1;r+=1){let i=s[r],c=s[r+1];if(c<=i)continue;let l=a.get(c),u=t||l!==void 0?Lx(e,e.text.slice(i,c)):void 0;if(t&&u){let e=n.get(t.segment)??t.segment.punctuationCompressions.map(e=>({...e})),r=e[t.compressionIndex],i=Math.max(0,t.ink.advancePt+r.adjustmentPt),a=Math.min(0,i-t.contextualAdvancePt),o=Math.min(0,t.ink.xMaxPt-u.xMinPt-t.contextualAdvancePt),s=Math.max(r.adjustmentPt,a,o);s!==r.adjustmentPt&&(e[t.compressionIndex]={end:r.end,adjustmentPt:s},n.set(t.segment,e))}t=l!==void 0&&u?{segment:e,compressionIndex:l,ink:u,contextualAdvancePt:o?.get(c)??u.advancePt}:void 0}}for(let[e,t]of n)e.punctuationCompressions=Object.freeze(t.map(e=>Object.freeze(e)))}function Bx(e){return e.charScale??1}function Vx(e,t,n,r,i){return e*r+[...t].length*n+[...t].length*i}function Hx(e,t,n){return e.fitTextPerGapPx===void 0?Ax(e,t,n)+jx(e,n):e.fitTextPerGapPx}function Ux(e,t,n,r){if(e.fitTextPerGapPx!==void 0){let n=[...e.text].length,r=e.fitTextRegionEnd?Math.max(0,n-1):n;return t*Bx(e)+r*e.fitTextPerGapPx+(e.fitTextTrailingPadPx??0)}if(e.tateChuYoko)return e.fontSize*r;let i=Ax(e,n,r);return Vx(t,e.text,i,Bx(e),jx(e,r))+Px(e,n)*r*Bx(e)+Nx(e)*r}function Wx(e,t){return t?.type!==`snapToChars`||!t.characterPitchPt||t.characterPitchPt<=0||e.snapToCharacterGrid===!1||e.metricOnly||e.fitTextRegionIndex!==void 0||e.tateChuYoko?null:e.script===`eastAsia`?`eastAsia`:e.script===`complexScript`?`complexScript`:`latin`}function Gx(e,t,n,r=1){return!(n>0)||!Number.isFinite(e)?e:t===`eastAsia`?Math.max(1,r)*n:Math.max(1,Math.ceil(Math.max(0,e)/n-1e-9))*n}function Kx(e){return!e||!e.linePitchPt||e.linePitchPt<=0?!1:e.type===`lines`||e.type===`linesAndChars`||e.type===`snapToChars`}function qx(e,t){return $b(e,t)}function Jx(e,t){return ex(e,t)}function Yx(e,t,n,r,i,a,o=0,s=!1,c,l){let u=t+n,d=Math.max(u,o),f=Kx(i),p=f?i.linePitchPt*r:0,m=()=>s?a?Math.max(p,Math.ceil(u/p)*p):qx(c??(o>0?o:l===void 0?p:Jx(0,l)),p)*p:Math.max(u,p),h=e!==null&&e.explicit!==!0;if(!e||rx(e.rule,e.value))return f?m():d;if(e.rule===`auto`){if(f){if(h){let t=m();return s?tx(t,p,e.value):t}return Math.max(u,p*e.value)}return d*e.value}if(e.rule===`exact`)return e.value*r;if(e.rule===`atLeast`){let t=f?a||h?m():p:0;return nx(d,e.value*r,t)}return d}function Xx(e,t){return{asc:e*t*.8,desc:e*t*.2}}function Zx(e,t,n,r,i=!1){return og(t,r,e.fontBoundingBoxAscent??e.actualBoundingBoxAscent??n*.8,e.fontBoundingBoxDescent??e.actualBoundingBoxDescent??n*.2,i)}function Qx(e,t,n,r,i=!1,a,o={},s=e.lineSpacing,c={},l,u,d=!1){let f=u,p=i||f?.fontHint===`eastAsia`,m=f?.complexScript===!0,h=f?.fontSizePt??wx(e),g=Tx(e,p),_=g?c[sg(g)]:void 0,v=_?.family??g,y,b;if(l){let n=f?f.weight>=600:!1,r=f?.style===`italic`,i=f?.fonts.ascii??e.defaultFontFamily??g,a=l.shape({text:p?`あ`:`x`,fontSizePt:h*t,fonts:f?.fonts??{ascii:i,highAnsi:i,eastAsia:e.defaultFontFamilyEastAsia??i,complexScript:i},themeFonts:f?.themeFonts,themeFontPresence:f?.themeFontPresence,weight:n?700:400,style:r?`italic`:`normal`,complexScript:m,fontHint:f?.fontHint,eastAsiaLanguage:f?.eastAsiaLanguage,kerning:f?.kerning,measure:!0}),o=a.spans[0]?.font.resolvedFamily??g;({ascent:y,descent:b}=Zx({width:a.advancePt,actualBoundingBoxAscent:a.ascentPt,actualBoundingBoxDescent:a.descentPt,fontBoundingBoxAscent:a.ascentPt,fontBoundingBoxDescent:a.descentPt},o,h*t,h*t,p))}else if(a){let e=a.font;a.font=xx(!1,!1,h*t,v,o);let n=a.measureText(p?`あ`:`x`);a.font=e,{ascent:y,descent:b}=Zx(n,v,h*t,h*t,p)}else ({asc:y,desc:b}=Xx(h,t));let x=_?.lineHeightRatio==null?Ex(e,t,p):h*t*_.lineHeightRatio,S=Math.max(x,Qb(g,h*t,p)),C=i?Jx(S,h*t):void 0,w=Yx(s,y,b,t,n,r,S,i,C),T=d&&i&&Kx(n),E=T?Yx(null,y,b,t,n,r,S,i,C):w,D=T?Yx({rule:`atLeast`,value:0,explicit:!0},y,b,t,n,r,S,i,C):w;return{advancePx:d?Fb({ordinaryAdvancePx:w,allocatedGridAdvancePx:E,atLeastZeroAdvancePx:D,lineSpacing:s,gridAllocationActive:T,scale:t}):w,ascentPx:y,descentPx:b}}function $x(e,t,n,r,i=!1,a,o={},s=e.lineSpacing,c={},l,u,d=!1){return Qx(e,t,n,r,i,a,o,s,c,l,u,d).advancePx}function eS(e,t,n){return Math.max(0,(e-t+n)/2)}function tS(e,t,n,r,i,a,o,s={},c,l,u=!1){let d=Qx(e,1,t,n,r,i,a,o,s,c,l,u);return eS(d.advancePx,d.ascentPx,d.descentPx)}function nS(e){let t=[];for(let n of e){let e=n.toLowerCase()===n&&n.toUpperCase()!==n,r=/\s/.test(n)?t[t.length-1]?.reduced??!1:e,i=t[t.length-1];i&&i.reduced===r?i.text+=n:t.push({text:n,reduced:r})}return t.length?t:[{text:e,reduced:!1}]}function rS(e,t){for(let n=t-1;n>=0;n--){let t=e[n];if(t.type===`text`||t.type===`field`)return t.fontSize}for(let n=t+1;n<e.length;n++){let t=e[n];if(t.type===`text`||t.type===`field`)return t.fontSize}return 10}function iS(e,t){if(e.fieldType===`page`)return kh(t.displayPageNumber??t.pageIndex+1,Jh(e.instruction)??t.pageNumberFormat??`decimal`);if(e.fieldType===`numPages`){let n=Jh(e.instruction)??`decimal`;return kh(t.totalPages,n)}if(e.fieldType===`date`||e.fieldType===`time`){let n=eg(e.instruction);if(n){let e=tg(n,new Date(t.currentDateMs??Date.now()));if(e!==null)return e}return e.fallbackText}return e.fallbackText}function aS(e){for(let t=0;t<e.length;){let n=e.codePointAt(t);if(em(n))return!0;t+=n>65535?2:1}return!1}const oS=new Set([`、`,`。`,`,`,`.`,`」`,`』`,`】`,`)`,`]`,`}`]);function sS(e){let t=e.codePointAt(0);return t===void 0?!1:t>=12353&&t<=12438||t>=12445&&t<=12447||t>=12449&&t<=12538||t===12540||t>=12541&&t<=12543||t>=12784&&t<=12799||t>=110576&&t<=110591||t>=110592&&t<=110959}function cS(e,t){switch(t){case`compressPunctuation`:return oS.has(e);case`compressPunctuationAndJapaneseKana`:return oS.has(e)||sS(e);default:return!1}}function lS(e,t){if(e===void 0)return;let n=[];for(let r of e)r>t&&n.push(r-t);return n}function uS(e,t,n=1/0){if(t<=0||n<=0||Number.isFinite(n)&&e[t-1]===` `)return t;let r=t,i=n;for(;r<e.length&&e[r]===` `&&i>0;)r++,i--;return r}function dS(e){let t=[...e];for(let e=t.length-1;e>=0;--e)if(t[e]!==` `)return yv.test(t[e]);return!1}function fS(e,t,n,r=0,i=1,a=0,o=!1,s,c,l=1/0){let u=[...t],d=t=>c?.(t)??(()=>{let n=0;if(o){if(!s)throw Error(`Vertical glyph measurement capability is required for vertical text`);n=s.measureRunInkExtra(t)}return Vx(e.measureText(t).width+n,t,r,i,a)})(),f=e=>{let t=e,r=l;if(r>0){for(;t>0&&u[t-1]===` `;)t--;let n=e-t;t+=Math.max(0,n-r)}return d(u.slice(0,t).join(``))<=n},p=0,m=u.length;for(;p<m;){let e=p+m+1>>1;f(e)?p=e:m=e-1}return u.slice(0,p).join(``)}const pS=new Set([`ar`,`fa`,`ur`,`he`,`iw`,`yi`,`ji`,`ps`,`sd`,`ug`,`dv`,`syr`,`ckb`]);function mS(e,t){if(e){let t=e.split(`-`)[0].toLowerCase();if(pS.has(t))return!0}return t}function hS(e){let t=[],n=null,r=``;for(let i of e){let e=em(i.codePointAt(0));n===null||e===n?(n=e,r+=i):(t.push({text:r,ea:n}),n=e,r=i)}return r.length>0&&t.push({text:r,ea:n??!1}),t}function gS(e){let t=e=>e>=48&&e<=57,n=e=>e===`.`||e===`,`||e===`:`||e===`/`||e===`\xA0`,r=[],i=``,a=null;for(let o=0;o<e.length;o++){let s=e[o],c=t(s.charCodeAt(0));!c&&a===!0&&n(s)&&t(e.charCodeAt(o+1))&&(c=!0),a===null||c===a?i+=s:(r.push(i),i=s),a=c}return i.length>0&&r.push(i),r.length?r:[e]}function _S(e){let t=[],n=0;for(;n<e.length;){let r=n;for(;r<e.length&&e[r]!==` `;)r++;for(;r<e.length&&e[r]===` `;)r++;r>n&&t.push(e.slice(n,r)),n=r}return t.length?t:[e]}function vS(e){let t=e?.defaultTabStop;return t!=null&&t>0?t:36}function yS(e){return e===`center`?`center`:e===`decimal`?`decimal`:e===`right`||e===`end`?`trailing`:`leading`}function bS(e,t,n,r,i){let a=e.length,o=e.map(e=>e.width),s=Array(a).fill(void 0),c=(t,n)=>{let r=0,i;for(let n=t;n<a&&!e[n].isTab;n++)i===void 0&&e[n].decimalOffset!==void 0&&(i=r+e[n].decimalOffset),r+=o[n];return{total:r,alignment:n===`center`?r/2:n===`trailing`?r:n===`decimal`?i===void 0?0:r-i:0}},l=n;for(let n=0;n<a;n++){if(!e[n].isTab){l+=o[n];continue}let a=xv(l,t,i);if(!a){o[n]=0;continue}let u=yS(a.alignment),d=c(n+1,u),f=d.total,p;p=u===`leading`?a.pos:a.pos-d.alignment,p+f>r&&(p=r-f),p<l&&(p=l),o[n]=p-l,s[n]=a.leader,l=p}return e.map((e,t)=>({width:o[t],leader:s[t]}))}function xS(e,t,n){let r=new Map;for(let t of e){if(t.fitTextRegionIndex===void 0)continue;let e=r.get(t.fitTextRegionIndex)??[];e.push(t),r.set(t.fitTextRegionIndex,e)}for(let e of r.values()){let r=e.find(e=>e.fitTextVal!==void 0);if(!r||r.fitTextVal===void 0)continue;let i=0,a=0;for(let t of e)i+=n(t)*Bx(t),a+=[...t.text].length;let o=jv([{fitTextValTwips:r.fitTextVal,charCount:a,naturalWidthPx:i}],t)[0];o&&e.forEach((t,n)=>{t.fitTextPerGapPx=o.perGapPx,t.fitTextTrailingPadPx=n===e.length-1?o.trailingPadPx:void 0,t.fitTextRegionStart=n===0?!0:void 0,t.fitTextRegionEnd=n===e.length-1?!0:void 0})}}function SS(e,t){let n=[],r=(e,n=400,r=`normal`)=>{if(!e)return;let i=sg(e),a=t.resolvedLocalFonts;if(!a)return;let o=a[`${i}:${n}:${r}`];if(o)return o;let s=a[i];return n===400&&r===`normal`&&s?s:Object.values(a).find(e=>sg(e.requestedFamily??``)===i&&(e.weight??400)===n&&(e.style??`normal`)===r)},i=new Map,a=[];for(let[t,n]of e.entries()){if(n.type!==`text`){a.push({charCount:0,naturalWidthPx:0});continue}let e=n.text.split(` `);for(let r=0;r<e.length;r+=1)i.set(`${t}:${r}`,a.length),a.push({fitTextValTwips:n.fitTextVal,fitTextId:n.fitTextId,charCount:[...e[r]].length,naturalWidthPx:0,charScale:n.charScale}),r<e.length-1&&a.push({charCount:0,naturalWidthPx:0})}let o=new Map;jv(a,1).forEach((e,t)=>{for(let n=e.start;n<e.end;n+=1)o.set(n,t)});let s=(e,a,s,c,l)=>{let u=a,d=u.typographyInput,f=(e,t)=>e?.status===`valid`&&e.value!==null?e.value:t,p=f(d?.verticalAlign,s??void 0)??null,m=f(d?.positionPt,u.position),h=d?.characterSpacingPt??u.charSpacing,g=Vb(h),_=d?.characterScale??u.charScale,v=d?.kerningThresholdPt??u.kerning,y=d?.snapToGrid??u.snapToGrid,b=!1,x=u.ruby,S=x?{text:x.text,fontSizePt:x.fontSizePt,...x.hpsRaisePt==null?{}:{hpsRaisePt:x.hpsRaisePt}}:void 0,C=u.revision,w=u.rtl===!0?!0:void 0,T=l===void 0?void 0:i.get(`${c}:${l}`),E=T===void 0?void 0:o.get(T),D=u.hyperlink?{kind:`external`,url:u.hyperlink}:u.hyperlinkAnchor?{kind:`internal`,ref:u.hyperlinkAnchor}:void 0,O=u.rtl===!0||u.cs===!0,k=u.fontSizeCs??a.fontSize,A=u.fontFamilyCs??a.fontFamily,j=u.fontFamilyHighAnsi??a.fontFamily,M=u.boldCs??!1,N=u.italicCs??!1,P=u.fontFamilyEastAsia??a.fontFamily,F=(O||!!u.rtl)&&mS(u.langBidi,!!u.rtl),I=!0,L=!1,R=(e,i,o,s,c=!1,l=!1)=>{if(t.balanceSingleByteDoubleByteWidth&&!i&&e.includes(` `)&&[...e].some(e=>e!==` `)){for(let t of e.split(/(\u3000+)/u).filter(Boolean))R(t,i,o,void 0,c,l);return}if(!c&&g&&E===void 0){let n=[0,...Dm(e),e.length];if(n.slice(0,-1).map((t,r)=>e.slice(t,n[r+1])).some(e=>cS(e,t.characterSpacingControl))){R(e,i,o,void 0,!0,l);return}}let d=i?M:a.bold,f=i?N:a.italic,x=d?700:400,O=f?`italic`:`normal`,z=Object.freeze({text:e,fontSizePt:i?k:a.fontSize,fonts:l?{ascii:null,highAnsi:null,eastAsia:null,complexScript:null}:u.fontSlots?.direct??{ascii:a.fontFamily,highAnsi:j,eastAsia:P,complexScript:A},themeFonts:l?void 0:u.fontSlots?.theme,themeFontPresence:l?void 0:u.fontSlots?.themePresent,weight:x,style:O,complexScript:i,fontHint:u.fontHint,eastAsiaLanguage:u.langEastAsia,kerning:v==null?void 0:(i?k:a.fontSize)>=v,measure:!1}),ee=s?{spans:[s]}:t.layoutServices?.text.shape(z),B=c&&g?(()=>{let n=[0,...Dm(e),e.length],r=[];for(let i=0;i<n.length-1;i+=1){let a=n[i],o=n[i+1],s=e.slice(a,o);if(!cS(s,t.characterSpacingControl))continue;let c=t.layoutServices?.text.shape({...z,text:s,measure:!0,clusterGeometry:!1}),l=(c?.inkBounds&&c.horizontalInkBoundsAreTight===!0?(()=>{let e=Math.max(0,Math.min(c.advancePt,c.advancePt-c.inkBounds.xMaxPt));if(!oS.has(s))return e;let n=c.spans[0]?.fontRoute.fingerprint,r=t.layoutServices?.text.shape({...z,text:`一`,fontHint:`eastAsia`,measure:!0,clusterGeometry:!1}),i=r?.spans[0]?.fontRoute.fingerprint,a=r?.advancePt;if(!n||i!==n||a===void 0||!Number.isFinite(a)||a<=0)return 0;let o=Bb({punctuationAdvancePt:c.advancePt,punctuationInkEndPt:c.inkBounds.xMaxPt,ideographicCellAdvancePt:a});return Math.max(0,Math.min(e,c.advancePt-o))})():0)*(_??1);l>0&&r.push({end:o,adjustmentPt:-l})}return r.length===0?void 0:Object.freeze(r.map(e=>Object.freeze(e)))})():void 0,V=ee?.spans.some(e=>e.script===`complexScript`!==i)??!1;if(ee&&(ee.spans.length>1||V)){for(let e=0;e<ee.spans.length;e+=1){let n=ee.spans[e],r=n.script===`complexScript`,i=r?A:n.script===`eastAsia`?P:n.script===`highAnsi`?j:a.fontFamily,o=g&&c&&[...n.text].some(e=>cS(e,t.characterSpacingControl));R(n.text,r,i,n,o)}return}let H=ee?.spans[0],U=(e,n)=>{if(!e)return;let r=Object.values(t.layoutServices?.text.localMetrics??{}).filter(t=>sg(t.family)===sg(e)&&(t.weight??400)===x&&(t.style??`normal`)===O);return r.find(e=>n&&sg(e.requestedFamily??``)===sg(n))??r[0]},te=H?U(H.font.resolvedFamily,H.font.requestedFamily):r(o,x,O),W=t.layoutServices?.text.resolve({fonts:z.fonts,themeFonts:z.themeFonts,themeFontPresence:z.themeFontPresence,slot:`eastAsia`,weight:x,style:O}),ne=W?U(W.resolvedFamily,W.requestedFamily):r(P,x,O),G=te??(o?t.resolvedLocalFonts?.[sg(o)]:void 0),K=ne??(P?t.resolvedLocalFonts?.[sg(P)]:void 0),q=W?.resolvedFamily??ne?.family??P,J=t.useFeLayout&&(u.fontHint===`eastAsia`||!!q?.trim()),Y=H?.script??s?.script??(i?`complexScript`:yv.test(e)?`eastAsia`:`ascii`),re=t.balanceSingleByteDoubleByteWidth?zb(e,Y):void 0;n.push({text:e,script:Y,...re===void 0?{}:{widthBalanceGridDeltaFactor:re},...J?{metricEastAsian:!0}:{},bold:d,italic:f,underline:a.underline,underlineStyle:u.underlineStyle,underlineColor:u.underlineColor,strikethrough:a.strikethrough,fontSize:i?k:a.fontSize,color:a.color,fontFamily:H?.font.resolvedFamily??te?.family??o,fontRoute:H?.fontRoute,resolvedLineHeightRatio:G?.lineHeightRatio,vertAlign:p,measuredWidth:0,textLayoutService:t.layoutServices?.text,textShapeRequest:z,breakBefore:H?.breakBefore??s?.breakBefore??!0,smallCaps:b,joinPrev:L||s?.breakBefore===!1?!0:void 0,doubleStrikethrough:a.doubleStrikethrough??!1,highlight:a.highlight??null,emphasisMark:a.emphasisMark,background:a.background??null,colorAuto:u.colorAuto??!1,border:u.border??null,ruby:I?S:void 0,revision:C,rtl:w,digitsAsAN:F?!0:void 0,eaFloorFamily:q,eaFloorRoute:W?.route,resolvedEaFloorLineHeightRatio:K?.lineHeightRatio,textBoxLineFloor:u.textBoxLineFloor,textBoxVertical:u.textBoxVertical,hyperlink:D,snapToCharacterGrid:y!==!1,charSpacing:h,punctuationCompressions:B,eastAsiaLanguage:u.langEastAsia,charScale:_,fitTextVal:E===void 0?void 0:u.fitTextVal,fitTextId:E===void 0?void 0:u.fitTextId,fitTextRegionIndex:E,fitTextRunIndex:E===void 0?void 0:T,position:m,positionExtendsLineBox:t.positionExtendsLineBox!==!1,kerning:v,tateChuYoko:t.verticalCJK&&u.eastAsianVert===!0?!0:void 0,tateChuYokoCompress:t.verticalCJK&&u.eastAsianVert===!0&&u.eastAsianVertCompress===!0?!0:void 0,verticalRun:t.verticalCJK&&u.eastAsianVert!==!0?!0:void 0}),I=!1,L=!1},z=(e,t)=>{let n=t===`cs`,r=t===`cs`?A:t===`ea`?P:a.fontFamily;if(fe(r)){for(let t of pe(e,r))R(t.text,n,t.mapped?null:r,void 0,!1,t.mapped);return}R(e,n,r)},ee=e=>{if(t.layoutServices?.text){if(fe(a.fontFamily)){z(e,`latin`);return}R(e,!1,a.fontFamily);return}for(let t of hS(e))z(t.text,t.ea?`ea`:`latin`)},B=a.smallCaps?nS(e):[{text:e,reduced:!1}],V=``;for(let e of B){b=e.reduced,L=V.length>0&&!/\s$/.test(V),V=e.text;let t=a.allCaps||a.smallCaps?e.text.toUpperCase():e.text;for(let e of _S(t))if(O)if(F)for(let t of gS(e))z(t,`cs`);else z(e,`cs`);else ee(e)}};for(let[i,a]of e.entries()){let o=n.length;if(a.type===`text`){let e=a,r=e.noteRef?e.noteRef.id?t.noteNumbers?.get(`${e.noteRef.kind}:${e.noteRef.id}`):t.noteReferenceNumber:void 0;if(e.noteRef){let t=r==null?e.text||``:String(r);t.length>0&&s(t,e,e.vertAlign??`super`,i,0);for(let e=o;e<n.length;e+=1)n[e].sourceRunIndex=i;continue}let c=e.text.split(` `);for(let t=0;t<c.length;t++)c[t].length>0&&s(c[t],e,e.vertAlign,i,t),t<c.length-1&&n.push({isTab:!0,fontSize:e.fontSize,measuredWidth:0,bold:e.bold,italic:e.italic,sourceRunIndex:i})}else if(a.type===`image`){let e=a;n.push({imagePath:e.imagePath,mimeType:e.mimeType,widthPt:e.widthPt,heightPt:e.heightPt,rotation:e.rotation,flipH:e.flipH,flipV:e.flipV,anchor:e.anchor??!1,anchorXPt:e.anchorXPt??0,anchorYPt:e.anchorYPt??0,anchorXFromMargin:e.anchorXFromMargin??!1,anchorYFromPara:e.anchorYFromPara??!1,colorReplaceFrom:e.colorReplaceFrom,duotone:e.duotone,alpha:e.alpha,srcRect:e.srcRect??void 0,measuredWidth:0})}else if(a.type===`chart`){let e=a;n.push({imagePath:``,mimeType:``,widthPt:e.widthPt,heightPt:e.heightPt,anchor:e.anchor??!1,anchorXPt:e.anchorXPt??0,anchorYPt:e.anchorYPt??0,anchorXFromMargin:e.anchorXFromMargin??!1,anchorYFromPara:e.anchorYFromPara??!1,chart:!0,chartResourceKey:e.resourceKey,measuredWidth:0})}else if(a.type===`shape`&&a.inline===!0)n.push({imagePath:``,mimeType:``,widthPt:a.widthPt,heightPt:a.heightPt,anchor:!1,anchorXPt:0,anchorYPt:0,anchorXFromMargin:!1,anchorYFromPara:!1,inlineShape:!0,measuredWidth:0});else if(a.type===`unavailableDrawing`){let e=`anchorAcquisitionInput`in a?a.anchorAcquisitionInput:void 0;n.push({imagePath:``,mimeType:``,widthPt:a.widthPt,heightPt:a.heightPt,anchor:e!==void 0,anchorXPt:0,anchorYPt:0,anchorXFromMargin:!1,anchorYFromPara:!1,unavailableResourceKind:a.resourceKind,measuredWidth:0})}else if(a.type===`break`){if(a.breakType===`line`){let t=rS(e,e.indexOf(a));n.push({lineBreak:!0,fontSize:t,measuredWidth:0})}}else if(a.type===`field`){let e=a,n=iS(e,t);n&&s(n,e,e.vertAlign,i)}else if(a.type===`math`){let r=a.fontSize||rS(e,e.indexOf(a)),i=`resourceKey`in a?a.resourceKey:void 0;if(t.layoutServices&&!i)throw Error(`Service-backed math layout requires a normalized structural resource key`);let o=i?t.layoutServices?.math.resolve(i):void 0;n.push({math:!0,mathResourceKey:i??``,mathMetadata:o,display:a.display,fontSize:r,color:null,fallbackText:`fallbackText`in a?a.fallbackText:Cb(a.nodes),measuredWidth:0,mathAscent:0,mathDescent:0,jc:a.jc})}else if(a.type===`ptab`)n.push({isTab:!0,fontSize:a.fontSize||rS(e,e.indexOf(a)),measuredWidth:0,leader:a.leader,ptab:{alignment:a.alignment,relativeTo:a.relativeTo}});else if(a.type===`anchorHost`){let e=a.fontFamilyEastAsia!=null,i=a.bold??!1,o=a.italic??!1,s=a.fontFamilyEastAsia??a.fontFamily??null,c=i?700:400,l=o?`italic`:`normal`,u=r(s,c,l),d=r(a.fontFamilyEastAsia??null,c,l),f=u??(s?t.resolvedLocalFonts?.[sg(s)]:void 0),p=d??(a.fontFamilyEastAsia?t.resolvedLocalFonts?.[sg(a.fontFamilyEastAsia)]:void 0);n.push({text:``,metricOnly:!0,...e?{metricEastAsian:!0}:{},bold:i,italic:o,underline:!1,strikethrough:!1,fontSize:a.fontSize,color:null,fontFamily:u?.family??s,resolvedLineHeightRatio:f?.lineHeightRatio,vertAlign:null,measuredWidth:0,eaFloorFamily:d?.family??a.fontFamilyEastAsia??null,resolvedEaFloorLineHeightRatio:p?.lineHeightRatio,snapToCharacterGrid:!1})}for(let e=o;e<n.length;e+=1)n[e].sourceRunIndex=i}if(t.balanceSingleByteDoubleByteWidth){let e=new Map,t=t=>{let n=t.textLayoutService,r=t.textShapeRequest;if(!n||!r)return;let i=vv(t,1),a=[n.fingerprint,t.fontRoute?.fingerprint??`implicit-latin`,t.eaFloorRoute?.fingerprint??`implicit-east-asia`,i,t.bold?700:400,t.italic?`italic`:`normal`,t.kerning??`auto`].join(`|`),o=e.get(a);if(o!==void 0)return o;let s=n.shape({...r,text:` `,fontSizePt:i,measure:!0,clusterGeometry:!1}).advancePt,c=n.shape({...r,text:`一`,fontSizePt:i,fontHint:`eastAsia`,measure:!0,clusterGeometry:!1}).advancePt;if(!Number.isFinite(s)||!Number.isFinite(c)||s<0||c<=0)return;let l=c/2-s;return e.set(a,l),l},r=[],i=0,a=()=>{if(Ib(i))for(let e of r){e.widthBalanceSpaceSequence=!0;let n=t(e);n!==void 0&&(e.widthBalanceSpaceAdjustmentPt=n)}r=[],i=0};for(let e of n){if(!(`text`in e)||e.script===`complexScript`){a();continue}let t=e.text.length-e.text.replace(/ +$/u,``).length;t>0&&t===e.text.length||a(),t>0?(r.push(e),i+=t):a()}a()}for(let e=1;e<n.length;e++){let t=n[e];if(!(`text`in t)||t.joinPrev)continue;let r=t.text.codePointAt(0);if(r===void 0||!Zp.lineStartForbidden.has(r))continue;let i=n[e-1];!(`text`in i)||/\s$/.test(i.text)||(t.joinPrev=!0)}for(let e=1;e<n.length;e++){let t=n[e];if(!(`text`in t)||t.joinPrev||t.text[0]!==` `&&t.text[0]!==` `)continue;let r=n[e-1];if(!(`text`in r))continue;let i=t.sourceRunIndex===r.sourceRunIndex,a=Hb(r.text,t.text);!i&&!a||(t.joinPrev=!0)}for(let e=1;e<n.length;e++){let t=n[e];if(!(`text`in t)||t.joinPrev||t.text.length===0)continue;let r=n[e-1];if(!(`text`in r)||r.text.length===0||/\s$/u.test(r.text)||/^\s/u.test(t.text))continue;let i=[...r.text].at(-1),a=[...t.text][0],o=i?.codePointAt(0),s=a?.codePointAt(0);o===void 0||s===void 0||o===8203||s===8203||pm(r.text)||pm(t.text)||aS(r.text)||aS(t.text)||cm(o,s)&&(t.joinPrev=!0)}let c=new Set;for(let e of n)!(`text`in e)||e.fitTextRegionIndex===void 0||(c.has(e.fitTextRegionIndex)?e.joinPrev=!0:(e.fitTextRegionStart=!0,c.add(e.fitTextRegionIndex)));return zx(n),n}function CS(e,t,n,r,i,a=[],o,s={},c=0,l=Zp,u=void 0,d=36,f=n,p=!1,m=!1,h=!1,g,_=`bounded`,v,y=!1,b){if(b===void 0){let b=(b,x)=>CS(e,Ob(t),n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,{probeHeights:b,preparedFloatWrap:x});if(!o||_===`intrinsic`)return b(null);let x=o.lineWindow?void 0:tb(o.floats);return Ab(e=>b(e,x),e=>o.lineBoxH(e.ascent,e.descent,e.hasRuby,e.intendedSingle,e.eastAsian,e.gridCountSingle))}let{probeHeights:x,preparedFloatWrap:S}=b,C=[],w=[],T=0,E=u?.type===`snapToChars`&&u.characterPitchPt!=null&&u.characterPitchPt>0?u.characterPitchPt*i:null,D=null,O=0,k=0,A=0,j=0,M=new Set,N=0,P=0,F=0,I=0,L=0,R=0,z=0,ee=0,B=!1,V=!0,H=n,U=0,te=o?.startPageY??0,W=()=>Ty(i),ne=t.length>0&&t.every(e=>`text`in e&&e.metricOnly===!0||`imagePath`in e&&!!e.anchor),G=(e=0)=>{if(D=null,j=0,M.clear(),U=0,H=n,!o)return;let t=x?.[C.length];if(t===void 0)return;let r={xLeftPt:o.referenceXPt??o.paraX,xRightPt:(o.referenceXPt??o.paraX)+(o.referenceWidthPt??n),readingDirection:o.readingDirection??(p?`rtl`:`ltr`)};if(o.lineWindow){let r=o.lineWindow({topYPt:te,minimumStartWidthPt:1,squareMinimumStartWidthPt:e,probeHeightPt:t,paragraphXPt:o.paraX,maximumWidthPt:n,columnXPt:o.columnXPt,columnWidthPt:o.columnWidthPt});te=r.topYPt,U=r.xOffsetPt,H=r.maximumWidthPt}else{let i=yb(te,1,t,o.paraX,n,S??tb(o.floats),o.columnXPt,o.columnXPt+o.columnWidthPt,r,e);te=i.topY,U=i.xOffset,H=i.maxWidth}},K=()=>_===`intrinsic`?1/0:H-(V?r:0),q=p?a.map(e=>({pos:e.pos*i,alignment:e.alignment,leader:e.leader})):[],J=d*i,Y=()=>{if(!p||!w.some(e=>`isTab`in e))return;let e=w.map(e=>({isTab:`isTab`in e,width:e.measuredWidth}));for(let t=0;t<w.length;t+=1){if(!(`isTab`in w[t]))continue;let n=t+1;for(;n<w.length&&!(`isTab`in w[n]);)n+=1;let r=Pe(w.slice(t+1,n));if(!r)continue;let i=t+1+r.segmentIndex,a=w[i];`text`in a&&(e[i].decimalOffset=Ae(a,a.text.slice(0,r.charOffset)))}let t=bS(e,q,f-(U+H)+(V?r:0),f+c,J),n=0;for(let e=0;e<w.length;e++){let r=w[e];`isTab`in r&&(n+=t[e].width-r.measuredWidth,r.measuredWidth=t[e].width,r.leader=t[e].leader)}T+=n},re=!1,ie=!1,ae=!1,oe=(e,t=!1,n)=>{Y();let r,a=!1;for(let e of w){if(`isTab`in e)continue;let t=`text`in e?e.position??0:0;if(`text`in e&&e.positionExtendsLineBox===!1){r=0,a=!0;break}if(!a)r=t,a=!0;else if(r!==t){r=0;break}}let s=a?r??0:0;if(s!==0)for(let e of w)`text`in e&&(e.lineRelativePosition=Yb(e.position??0,s));let c=e===void 0?N||10:Math.max(N,e),l=P>0||F>0,u=l?P:c*i*.8,d=l?F:c*i*.2,f=B?R:u,p=B?z:d,m=B?ee:I,h=L||(ie?Jx(I,c*i):u+d);C.push({segments:w,height:c,ascent:u,descent:d,visibleAscent:f,visibleDescent:p,visibleIntendedSingle:m,intendedSingle:I,gridCountSingle:h,xOffset:U,availWidth:H,topY:o?te:void 0,hasRuby:re,eastAsian:ie,endsWithBreak:t,consumedEnd:n??X[0]?.src??be}),o&&(te+=o.lineBoxH(u,d,re,I,ie,h)),w=[],T=0,O=0,k=0,A=0,j=0,M.clear(),N=0,P=0,F=0,I=0,L=0,R=0,z=0,ee=0,B=!1,re=!1,ie=!1,ae=!1,V=!1,G(W())},se=(e,t=e.text)=>hg(e.fontFamily)*vv(e,i)*Bx(e)*[...t].length,ce=e=>{let t=e.bold?700:400,n=e.italic?`italic`:`normal`;return e.fontRoute?`${e.fontRoute.fingerprint}|${t}|${n}`:`implicit|${xx(e.bold,e.italic,1,e.fontFamily,s)}`},le=(e,t,n=t.text)=>{/\S/.test(n)&&e.add(ce(t))},ue=e=>{let t=M.size;for(let n of e)M.has(n)||(t+=1);return t},de=(e,t)=>{let n=Wx(e,u);return!n||E==null?t:n===`eastAsia`?Gx(t,n,E,ke(e)):D?.kind===n?Gx(D.naturalWidthPx+t,n,E)-D.allocatedWidthPx:Gx(t,n,E)},fe=(e,t,n,r,a,o=0)=>{let s=t;if(`text`in e){let n=Wx(e,u),r=e.snapGridNaturalWidthPx??t;if(n&&E!=null)if(e.snapGridClass=n,e.snapGridNaturalWidthPx=r,e.snapGridCellPitchPx=E,n===`eastAsia`)s=Gx(r,n,E,ke(e)),e.snapGridLeadingPadPx=0,e.snapGridTrailingPadPx=s-r,e.measuredWidth=s,D=null;else if(D?.kind===n){let t=D.first.snapGridLeadingPadPx??0,i=D.last.snapGridTrailingPadPx??0,a=D.naturalWidthPx+r,o=Gx(a,n,E),c=o-a,l=n===`latin`?c/2:0,u=c-l;D.first.measuredWidth-=t,D.first.snapGridLeadingPadPx=l,D.first.measuredWidth+=l,D.last.measuredWidth-=i,e.snapGridLeadingPadPx=0,e.snapGridTrailingPadPx=u,e.measuredWidth=r+u,s=o-D.allocatedWidthPx,D={kind:n,first:D.first,last:e,naturalWidthPx:a,allocatedWidthPx:o}}else{let t=Gx(r,n,E),i=t-r,a=n===`latin`?i/2:0,o=i-a;e.snapGridLeadingPadPx=a,e.snapGridTrailingPadPx=o,e.measuredWidth=t,s=t,D={kind:n,first:e,last:e,naturalWidthPx:r,allocatedWidthPx:t}}else e.snapGridClass=void 0,e.snapGridLeadingPadPx=void 0,e.snapGridTrailingPadPx=void 0,e.snapGridCellPitchPx=void 0,e.measuredWidth=t,D=null}else D=null;if(w.push(e),T+=s,`text`in e){let t=e.text.length-e.text.replace(/ +$/,``).length,n=t>0&&t===e.text.length;if(n&&k>0)O-=A,k+=t,A=0;else{k=0,A=0;let e=w[w.length-2],r=e!==void 0&&`text`in e&&/\S$/u.test(e.text);(n&&r||t>0&&!n)&&(k=t,A=t===1?o:0,O+=A)}j+=se(e),le(M,e)}n>N&&(N=n),r>P&&(P=r),a>F&&(F=a);let c=!(`text`in e)||e.metricOnly!==!0;c&&(B=!0,r>R&&(R=r),a>z&&(z=a));let l=0;if(!(`isTab`in e)&&!(`imagePath`in e)&&!(`math`in e)){let t=e;t.ruby&&(re=!0),t.seaBreaks!==void 0&&hm(t.text)&&(ae=!0);let n=t.metricEastAsian===!0||yv.test(t.text);!ie&&n&&(ie=!0);let r=t.smallCaps&&!t.vertAlign?t.fontSize*i:pe(t),a=n&&!t.ruby,o=t.textBoxLineFloor&&t.ruby?0:Math.max(Sx(t,r,a),t.textBoxLineFloor||t.metricEastAsian===!0?Cx(t,r,a):0);o>I&&(I=o),c&&o>ee&&(ee=o),a&&(l=Jx(o,r))}else `isTab`in e||(l=r+a);l>L&&(L=l)},pe=e=>vv(e,i),me=null,he=t=>{t!==me&&(e.font=t,me=t)},ge=t=>{if(t.kerning==null)return null;let n=e.fontKerning;return e.fontKerning=t.fontSize>=t.kerning?`normal`:`none`,n},_e=t=>{t!=null&&(e.fontKerning=t)},ve=(t,n=!1)=>{if(t.textLayoutService&&t.textShapeRequest){let e=t.textLayoutService.shape({...t.textShapeRequest,text:t.text,fontSizePt:pe(t),measure:!0,clusterGeometry:n});return n&&(t.shapedClusters=e.clusters,t.selectedFaceFontBox={ascentPt:e.ascentPt,descentPt:e.descentPt},t.selectedFaceInkBounds=e.inkBounds??{xMinPt:0,xMaxPt:e.advancePt,ascentPt:e.ascentPt,descentPt:e.descentPt}),{width:e.advancePt,actualBoundingBoxAscent:e.ascentPt,actualBoundingBoxDescent:e.descentPt,fontBoundingBoxAscent:e.ascentPt,fontBoundingBoxDescent:e.descentPt}}he(xx(t.bold,t.italic,pe(t),t.fontFamily,s,t.fontRoute));let r=ge(t),i=e.measureText(t.text);return _e(r),i},ye=(e,t)=>{if(!e.verticalRun)return 0;if(!v)throw Error(`Vertical glyph measurement capability is required for vertical text`);he(xx(e.bold,e.italic,pe(e),e.fontFamily,s,e.fontRoute));let n=ge(e);try{return v.measureRunInkExtra(t)}finally{_e(n)}},be={segIndex:t.length,charOffset:0},xe=t.map((e,t)=>(e.src={segIndex:t,charOffset:0},`text`in e&&pm(e.text)&&(e.seaBreaks=Sm(e.text,{cjk:!0,kinsoku:l})),e)),X;if(!g)X=xe;else if(g.segIndex>=xe.length)X=[];else{let e=xe[g.segIndex];if(g.charOffset>0)if(!(`text`in e)||g.charOffset>e.text.length)X=[];else{let t=e.text.slice(g.charOffset);X=t?[{...e,text:t,measuredWidth:0,src:{...g},punctuationCompressions:Ix(e,g.charOffset,e.text.length),seaBreaks:lS(e.seaBreaks,g.charOffset)},...xe.slice(g.segIndex+1)]:xe.slice(g.segIndex+1)}else X=xe.slice(g.segIndex)}let Se=0,Ce=-1,we=[];for(let e=X.length-1;e>=0;--e){let t=X[e];if(!t||!(`text`in t)||t.text.length===0)break;if(t.fitTextRegionIndex!==void 0||t.tateChuYoko===!0||t.ruby!==void 0){if(t.sourceRunIndex!==void 0){for(let e=we.length-1;e>=0;--e){let n=we[e];n.segment.sourceRunIndex===t.sourceRunIndex&&(n.segment.paragraphFinalIdeographicSpaceTail=void 0,n.segment.paragraphFinalIdeographicSpaceLocalCount=void 0,n.segment.paragraphFinalIdeographicSpaceCount=void 0,n.segment.paragraphFinalIdeographicSpaceTailStart=void 0,we.splice(e,1))}Ce=we.at(-1)?.index??-1}break}let n=/^\u3000+$/u.test(t.text),r=/[^\u3000]\u3000+$/u.test(t.text);if(!n&&!r)break;let i=n?[...t.text].length:[...t.text].reverse().findIndex(e=>e!==` `);if(Se+=i,t.paragraphFinalIdeographicSpaceTail=!0,t.paragraphFinalIdeographicSpaceLocalCount=i,t.paragraphFinalIdeographicSpaceCount=Se,Ce=e,we.push({index:e,segment:t}),r)break}if(Ce>=0){let e=X[Ce];e&&`text`in e&&(e.paragraphFinalIdeographicSpaceTailStart=!0)}xS(X.filter(e=>`text`in e),i,e=>ve(e).width+ye(e,e.text));let Te=e=>Ux(e,ve(e).width+ye(e,e.text),u,i),Ee=(e,t)=>{let n=Wx(e,u);return!n||E==null||e.text.length===0?t:Gx(t,n,E,n===`eastAsia`?ke(e):1)},De=e=>Ee(e,Te(e)),Oe=(t,n,r=!1)=>{let a=r?t.text.length-n.length:0,o={...t,text:n,punctuationCompressions:Ix(t,Math.max(0,a),Math.max(0,a)+n.length)};if(t.textLayoutService&&t.textShapeRequest)return Ux(o,t.textLayoutService.shape({...t.textShapeRequest,text:n,fontSizePt:pe(t),measure:!0,clusterGeometry:!1}).advancePt+ye(t,n),u,i);he(xx(t.bold,t.italic,pe(t),t.fontFamily,s,t.fontRoute));let c=ge(t),l=e.measureText(n).width;return _e(c),Ux(o,l+ye(t,n),u,i)},ke=t=>{if(E==null)return 1;t.textLayoutService&&t.textShapeRequest&&!t.shapedClusters&&ve(t,!0);let n=t.shapedClusters?.length?t.shapedClusters:null,r=n==null?[...new Set([0,...Dm(t.text),t.text.length])].sort((e,t)=>e-t):null,a=n?.map(e=>({start:e.range.start,end:e.range.end,advancePx:e.advancePt}))??r.slice(0,-1).map((e,t)=>({start:e,end:r[t+1],advancePx:void 0})),o=0;for(let n of a){let{start:r,end:a}=n;if(a<=r)continue;let c=t.text.slice(r,a),l={...t,text:c,punctuationCompressions:Ix(t,r,a)},d;if(n.advancePx!=null)d=Ux(l,n.advancePx+ye(t,c),u,i);else{he(xx(t.bold,t.italic,pe(t),t.fontFamily,s,t.fontRoute));let n=ge(t),r=e.measureText(c).width;_e(n),d=Ux(l,r+ye(t,c),u,i)}o+=jb(d,E)}return Math.max(1,o)},Ae=(e,t,n=!1)=>Ee({...e,text:t,shapedClusters:t===e.text?e.shapedClusters:void 0},Oe(e,t,n)),je=t=>{let n=ve(t,Wx(t,u)===`eastAsia`),r=Ux(t,n.width+ye(t,t.text),u,i);t.snapGridNaturalWidthPx=r;let a=t.fontSize*i,o=n,c=pe(t);if(t.smallCaps&&!t.vertAlign&&c!==a){if(t.textLayoutService&&t.textShapeRequest){let e=t.textLayoutService.shape({...t.textShapeRequest,text:t.text||`X`,fontSizePt:a,measure:!0,clusterGeometry:!1});o={width:e.advancePt,actualBoundingBoxAscent:e.ascentPt,actualBoundingBoxDescent:e.descentPt,fontBoundingBoxAscent:e.ascentPt,fontBoundingBoxDescent:e.descentPt}}else{let n=e.font;e.font=xx(t.bold,t.italic,a,t.fontFamily,s,t.fontRoute),o=e.measureText(t.text||`X`),e.font=n}c=a}let l=Zx(o,t.fontFamily,a,c,(t.metricEastAsian===!0||yv.test(t.text))&&!t.ruby),d=l.ascent,f=l.descent;if(t.positionExtendsLineBox!==!1){let e=(t.position??0)*i;e>0?d+=e:e<0&&(f-=e)}return t.ruby&&(!t.textBoxLineFloor||t.textBoxVertical)&&(d+=cx(t.ruby.fontSizePt,t.ruby.hpsRaisePt,i,t,e,s)),{width:r,height:t.fontSize,ascent:d,descent:f}},Me=e=>{if(/\s$/u.test(e.text)||e.ruby!==void 0||e.tateChuYoko===!0||e.fitTextRegionIndex!==void 0)return;let t=X[0];if(!t||!(`text`in t)||t.joinPrev!==!0||t.text.length===0||[...t.text].some(e=>e!==` `))return;X.shift();let n=Rb(dS(e.text),t.paragraphFinalIdeographicSpaceCount??[...t.text].length);if(n===0){X.unshift(t);return}let r=t.text.slice(0,n),i={...t,text:r,measuredWidth:0,punctuationCompressions:Ix(t,0,1)},a=je(i);i.measuredWidth=a.width,fe(i,a.width,a.height,a.ascent,a.descent);let o=t.text.slice(r.length);o.length>0&&X.unshift({...t,text:o,measuredWidth:0,joinPrev:void 0,punctuationCompressions:Ix(t,r.length,t.text.length),src:t.src?{segIndex:t.src.segIndex,charOffset:t.src.charOffset+r.length}:void 0})},Ne=e=>`isTab`in e?e.measuredWidth||0:`imagePath`in e?e.widthPt*i:`math`in e?e.measuredWidth||0:`lineBreak`in e?0:De(e),Pe=e=>{for(let t=0;t<e.length;t+=1){let n=e[t];if(!(`text`in n))continue;let r=n.text.indexOf(`.`);if(r>=0)return{segmentIndex:t,charOffset:r}}let t=null,n=!1;for(let r=0;r<e.length;r+=1){let i=e[r];if(!(`text`in i)){if(n)return t;continue}let a=0;for(let e of i.text)if(a+=e.length,/\p{Decimal_Number}/u.test(e))n=!0,t={segmentIndex:r,charOffset:a};else if(n)return t}return t},Fe=e=>{let t=Pe(e);if(!t)return;let n=0;for(let r=0;r<t.segmentIndex;r+=1)n+=Ne(e[r]);let r=e[t.segmentIndex];return`text`in r?n+Ae(r,r.text.slice(0,t.charOffset)):n},Ie=()=>{let e=[],t=0;for(let n of X){if(`isTab`in n||`lineBreak`in n)break;e.push(n),t+=Ne(n)}let n=Fe(e);return n===void 0?{totalWidth:t}:{totalWidth:t,decimalPrefixWidth:n}},Le=null;for(G(ne?o?.paragraphMarkLineStartWidth??W():W());X.length>0;){let t=X.shift();if(`lineBreak`in t){oe(t.fontSize,!0),Le=t.fontSize;continue}if(Le=null,`isTab`in t){if(p&&!t.ptab){t.measuredWidth=0,fe(t,0,t.fontSize,t.fontSize*i*.8,t.fontSize*i*.2);continue}let e=T+(V?r:0);if(t.ptab){t.resolvedAlignment=t.ptab.alignment;let r=t.ptab.relativeTo===`indent`?0:-c,a=t.ptab.relativeTo===`indent`?n:f,o=t.ptab.alignment===`left`?r:t.ptab.alignment===`center`?(r+a)/2:a,s=0;for(let e of X){if(`isTab`in e||`lineBreak`in e)break;s+=Ne(e)}let l=t.ptab.alignment===`center`?.5:+(t.ptab.alignment===`right`),d=o-e-s*l;if(d<=0){if(w.length>0){oe(void 0,!1,t.src),X.unshift(t);continue}d=0}if(t.measuredWidth=d,fe(t,d,t.fontSize,t.fontSize*i*.8,t.fontSize*i*.2),t.ptab.alignment!==`left`)for(;X.length>0;){let e=X[0];if(`isTab`in e||`lineBreak`in e)break;if(X.shift(),`imagePath`in e){let t=e.widthPt*i;e.measuredWidth=t,fe(e,t,e.heightPt,e.heightPt*i,0)}else if(`math`in e)fe(e,e.measuredWidth||0,e.fontSize,e.mathAscent||0,e.mathDescent||0);else{let t=ve(e),n=Ux(e,t.width+ye(e,e.text),u,i);e.measuredWidth=n;let r=t.fontBoundingBoxAscent??t.actualBoundingBoxAscent??e.fontSize*i*.8,a=t.fontBoundingBoxDescent??t.actualBoundingBoxDescent??e.fontSize*i*.2;fe(e,n,e.fontSize,r,a)}}continue}let o=bv(e+c,a.map(e=>({pos:e.pos*i,alignment:e.alignment,leader:e.leader})),d*i);t.resolvedAlignment=o?.alignment??`left`;let s=o?o.pos-c:e,l=o?yS(o.alignment):`leading`;if(o&&l!==`leading`){let n=s;t.leader=o.leader;let r=Ie(),a=l===`center`?r.totalWidth/2:l===`decimal`?r.decimalPrefixWidth??r.totalWidth:r.totalWidth,c=n-e-a;for(c<=0&&(c=0),t.measuredWidth=c,fe(t,c,t.fontSize,t.fontSize*i*.8,t.fontSize*i*.2);X.length>0;){let e=X[0];if(`isTab`in e||`lineBreak`in e)break;if(X.shift(),`imagePath`in e){let t=e.widthPt*i;e.measuredWidth=t,fe(e,t,e.heightPt,e.heightPt*i,0)}else if(`math`in e)fe(e,e.measuredWidth||0,e.fontSize,e.mathAscent||0,e.mathDescent||0);else{let t=ve(e),n=Ux(e,t.width+ye(e,e.text),u,i);e.measuredWidth=n;let r=t.fontBoundingBoxAscent??t.actualBoundingBoxAscent??e.fontSize*i*.8,a=t.fontBoundingBoxDescent??t.actualBoundingBoxDescent??e.fontSize*i*.2;fe(e,n,e.fontSize,r,a)}}continue}let m=s-e;if(o&&(t.leader=o.leader),m<=0){oe(void 0,!1,t.src),X.unshift(t);continue}if(T+m>K()&&w.length>0){oe(void 0,!1,t.src),X.unshift(t);continue}t.measuredWidth=m,fe(t,m,t.fontSize,t.fontSize*i*.8,t.fontSize*i*.2);continue}if(`imagePath`in t){if(t.anchor){t.measuredWidth=0;continue}let e=t.widthPt*i,n=t.heightPt,r=t.heightPt*i;t.measuredWidth=e,w.length>0&&T+e>K()&&oe(void 0,!1,t.src),fe(t,e,n,r,0);continue}if(`math`in t){let n=t.mathMetadata;if(!n||n.available===!1){let n=t.fontSize*i;he(xx(!1,!1,n,null,s));let r=e.measureText(t.fallbackText),a=r.width,o=r.fontBoundingBoxAscent??r.actualBoundingBoxAscent??n*.8,c=r.fontBoundingBoxDescent??r.actualBoundingBoxDescent??n*.2;t.measuredWidth=a,t.mathAscent=o,t.mathDescent=c,w.length>0&&T+a>K()&&oe(void 0,!1,t.src),fe(t,a,t.fontSize,Math.max(o,n*.8),Math.max(c,n*.2));continue}let r=t.fontSize*i,a=n.widthEm*r,o=n.ascentEm*r,c=n.descentEm*r;t.measuredWidth=a,t.mathAscent=o,t.mathDescent=c;let l=Math.max(o,r*.8),u=Math.max(c,r*.2);w.length>0&&T+a>K()&&oe(void 0,!1,t.src),fe(t,a,t.fontSize,l,u);continue}let o=t,g=je(o),_=g.width,b=de(o,_),x=g.height,S=g.ascent,C=g.descent,E=o.paragraphFinalIdeographicSpaceTail===!0,D=o.paragraphFinalIdeographicSpaceCount??0,k=o.paragraphFinalIdeographicSpaceLocalCount??0,A=E?o.text.slice(0,Math.max(0,o.text.length-k)):o.text;if(E&&D>1&&A.length>0){let e={...o,text:A,paragraphFinalIdeographicSpaceTail:void 0,paragraphFinalIdeographicSpaceLocalCount:void 0,paragraphFinalIdeographicSpaceCount:void 0,paragraphFinalIdeographicSpaceTailStart:void 0,measuredWidth:0,punctuationCompressions:Ix(o,0,A.length)},t={...o,text:o.text.slice(A.length),paragraphFinalIdeographicSpaceLocalCount:k,joinPrev:void 0,paragraphFinalIdeographicSpaceTailStart:!0,measuredWidth:0,punctuationCompressions:Ix(o,A.length,o.text.length),src:o.src?{segIndex:o.src.segIndex,charOffset:o.src.charOffset+A.length}:void 0};X.unshift(t),X.unshift(e);continue}if(E&&/^\u3000+$/u.test(o.text)&&o.paragraphFinalIdeographicSpaceTailStart===!0&&w.some(e=>`text`in e&&/[^\u3000]/u.test(e.text))){let e=_;for(let t of X){if(!(`text`in t)||t.paragraphFinalIdeographicSpaceTail!==!0)break;e+=De(t)}if(T+e>K()){oe(void 0,!1,o.src),X.unshift(o);continue}}if(o.fitTextRegionIndex!==void 0){if(o.fitTextRegionStart){let e=_;for(let t of X){if(!(`text`in t)||t.fitTextRegionIndex!==o.fitTextRegionIndex)break;e+=De(t)}w.length>0&&T+e>K()&&oe(void 0,!1,o.src)}o.measuredWidth=_,fe(o,_,x,S,C);continue}let M=o.text.replace(/ +$/,``),N=Wx(o,u)?0:o.text.endsWith(` `)?_-Ae(o,M):0,P=e=>{let t=e===void 0||`lineBreak`in e;return m&&(!t||h)},F=(e,t,r)=>Kb({widthPx:e,trailingSpacePx:t,lineWillJustify:P(r),wrapNarrowed:H!==n||U!==0}),I=F(b,N,X[0]),L=o.seaBreaks!==void 0&&hm(o.text),R=new Set;le(R,o,M);let z=(e,t,n)=>P(e)?qb({biasBudgetPx:t,resolvedMeasurementRouteCount:ue(n)}):ae||L?0:O*.25;if(!o.joinPrev&&w.length>0&&X[0]?.joinPrev&&!aS(o.text)&&!(o.seaBreaks&&o.seaBreaks.length>0)){let e=_,t=N,n=0,r=j,i=new Set(R),a=o,s=o.text,c=(e,t=e.text)=>{r+=se(a,s),a=e,s=t};for(;n<X.length&&X[n].joinPrev;n++){let r=X[n];if(aS(r.text)){let n=[...r.text],a=0;for(;a<n.length&&Zp.lineStartForbidden.has(n[a].codePointAt(0));)a++;if(a<n.length){let o=n.slice(0,a).join(``),s=Ae(r,o);e+=s,o.length>0&&(c(r,o),le(i,r,o)),t=0;break}}let a=De(r);e+=a,c(r),le(i,r);let o=r.text.replace(/ +$/,``),s=r.text.endsWith(` `)?a-Ae(r,o):0;t=o.length===0&&t>0?t+s:s}r+=se(a,s.replace(/ +$/,``)),T+F(e,t,X[n])>K()+z(X[n],r,i)&&oe(void 0,!1,o.src)}if(L&&w.length>0&&(()=>{let e=w[w.length-1];return!(`text`in e)||e.text.endsWith(` `)})()){let e=_,t=N,n=0,r=j+se(o,M),i=new Set(R);if(!o.text.endsWith(` `))for(;n<X.length;n++){let a=X[n];if(!(`text`in a)||a.seaBreaks===void 0||!hm(a.text))break;let o=a,s=De(o),c=o.text.replace(/ +$/,``);if(e+=s,t=o.text.endsWith(` `)?s-Ae(o,c):0,r+=se(o,c),le(i,o,c),o.text.endsWith(` `)){n++;break}}let a=F(e,t,X[n]);T+a>K()+z(X[n],r,i)&&a<=H&&oe(void 0,!1,o.src)}let ee=z(X[0],j+se(o,M),R),B=[...M],te=B.at(-1),W=B.slice(0,-1).join(``),ne=y&&te!==void 0&&(w.length>0||W.length>0)&&Gb(te,o.eastAsiaLanguage)&&T+Ae(o,W)<=K()+ee;if(T+I<=K()+ee)o.measuredWidth=_,fe(o,_,x,S,C,N),Me(o);else if(ne)o.measuredWidth=_,fe(o,_,x,S,C,N),Me(o);else if(aS(o.text)&&o.seaBreaks===void 0){let t=K()-T;he(xx(o.bold,o.italic,pe(o),o.fontFamily,s,o.fontRoute));let n=ge(o),r=``,a=E?Rb(dS(o.text),o.paragraphFinalIdeographicSpaceCount??0):1/0;try{r=t>0?fS(e,o.text,t,Ax(o,u,i),Bx(o),jx(o,i),o.verticalRun===!0,v,e=>Ae(o,e),a):``}finally{_e(n)}let c=[...o.text],d=[...r].length,f=w.length>0?0:1,p=uS(c,(y&&d<c.length&&(w.length>0||d>0)&&Gb(c[d],o.eastAsiaLanguage)?d+1:null)??Qp(c,d,l,f),E&&a===0?0:a),m=c.slice(0,p).join(``);if(m.length>0){let e=Oe(o,m);fe({...o,text:m,measuredWidth:e,punctuationCompressions:Ix(o,0,m.length)},e,x,S,C);let t=o.text.slice(m.length);t?X.unshift({...o,text:t,punctuationCompressions:Ix(o,m.length,o.text.length),measuredWidth:0,src:{segIndex:o.src.segIndex,charOffset:o.src.charOffset+m.length}}):Me(o)}else if(w.length>0){let e=null,t=o.text.codePointAt(0),n=w[w.length-1];if(t!==void 0&&l.lineStartForbidden.has(t)&&`text`in n){let t=n,r=[...t.text],i=$p(r,l,w.length>1?0:1);if(i>0){let n=r.slice(0,r.length-i).join(``),a=r.slice(r.length-i).join(``);if(e={...t,text:a,punctuationCompressions:Ix(t,n.length,t.text.length),measuredWidth:Ae(t,a,!0),src:{segIndex:t.src.segIndex,charOffset:t.src.charOffset+n.length}},n){let e=Ae(t,n);T-=t.measuredWidth-e,w[w.length-1]={...t,text:n,measuredWidth:e,punctuationCompressions:Ix(t,0,n.length)}}else T-=t.measuredWidth,w.pop()}}oe(void 0,!1,e?.src??o.src),X.unshift(o),e&&X.unshift(e)}else{let e=[...o.text],t=e.length>0?uS(e,1,o.paragraphFinalIdeographicSpaceTail===!0?Rb(yv.test(e[0]??``),o.paragraphFinalIdeographicSpaceCount??0):1/0):0,n=e.slice(0,t).join(``);if(n){let e=Oe(o,n);fe({...o,text:n,measuredWidth:e,punctuationCompressions:Ix(o,0,n.length)},e,x,S,C);let t=o.text.slice(n.length);t?X.unshift({...o,text:t,punctuationCompressions:Ix(o,n.length,o.text.length),measuredWidth:0,src:{segIndex:o.src.segIndex,charOffset:o.src.charOffset+n.length}}):Me(o)}}}else if(o.seaBreaks!==void 0){let e=K()-T,t=e=>Ae(o,e),n=mm(o.text),r=wm(o.text,o.seaBreaks,0,e,t,n);if(r>0){let e=o.text.slice(0,r),t=Oe(o,e);fe({...o,text:e,measuredWidth:t,punctuationCompressions:Ix(o,0,e.length)},t,x,S,C);let n=o.text.slice(r);n&&X.unshift({...o,text:n,punctuationCompressions:Ix(o,r,o.text.length),measuredWidth:0,src:{segIndex:o.src.segIndex,charOffset:o.src.charOffset+r},seaBreaks:lS(o.seaBreaks,r)})}else if(w.length>0){let e=null,t=o.text.codePointAt(0),n=w[w.length-1];if(t!==void 0&&l.lineStartForbidden.has(t)&&`text`in n){let t=n,r=[...t.text],i=$p(r,l,w.length>1?0:1);if(i>0){let n=r.slice(0,r.length-i).join(``),a=r.slice(r.length-i).join(``);if(e={...t,text:a,punctuationCompressions:Ix(t,n.length,t.text.length),measuredWidth:Ae(t,a,!0),src:{segIndex:t.src.segIndex,charOffset:t.src.charOffset+n.length},seaBreaks:lS(t.seaBreaks,n.length)},n){let e=Ae(t,n);T-=t.measuredWidth-e,w[w.length-1]={...t,text:n,measuredWidth:e,punctuationCompressions:Ix(t,0,n.length)}}else T-=t.measuredWidth,w.pop()}}oe(void 0,!1,e?.src??o.src),X.unshift(o),e&&X.unshift(e)}else{let r=o.seaBreaks[0]??o.text.length,i=o.text.slice(0,r),a=Dm(i),s=wm(i,a,0,e,t,n);s<=0&&(s=a.length>0?a[0]:i.length);let c=o.text.slice(0,s),l=Oe(o,c);fe({...o,text:c,measuredWidth:l,punctuationCompressions:Ix(o,0,c.length)},l,x,S,C);let u=o.text.slice(s);u&&X.unshift({...o,text:u,punctuationCompressions:Ix(o,s,o.text.length),measuredWidth:0,src:{segIndex:o.src.segIndex,charOffset:o.src.charOffset+s},seaBreaks:lS(o.seaBreaks,s)})}}else if(w.length===0){let t=K();he(xx(o.bold,o.italic,pe(o),o.fontFamily,s,o.fontRoute));let n=ge(o),r=0;try{r=t>0?fS(e,o.text,t,Ax(o,u,i),Bx(o),jx(o,i),o.verticalRun===!0,v,e=>Ae(o,e)).length:0}finally{_e(n)}let a=[0,...Dm(o.text),o.text.length],c=a.filter(e=>e<=r).at(-1)??0;for(c<=0&&(c=a[1]??o.text.length);o.text.startsWith(` `,c);)c+=1;if(c>=o.text.length)o.measuredWidth=_,fe(o,_,x,S,C);else{let e=o.text.slice(0,c),t=Oe(o,e);fe({...o,text:e,measuredWidth:t,punctuationCompressions:Ix(o,0,e.length)},t,x,S,C),X.unshift({...o,text:o.text.slice(c),punctuationCompressions:Ix(o,c,o.text.length),measuredWidth:0,src:{segIndex:o.src.segIndex,charOffset:o.src.charOffset+e.length}})}}else{if(o.joinPrev){o.measuredWidth=_,fe(o,_,x,S,C,N);continue}oe(void 0,!1,o.src),X.unshift(o)}}if(w.length>0?oe():Le!==null&&oe(Le),_===`bounded`)for(let e of C)for(let t of e.segments)!(`text`in t)||t.metricOnly||t.text.length===0||(t.shapedClusters=void 0,t.textLayoutService&&t.textShapeRequest&&ve(t,!0));return C}const wS=e=>{let t=e.text;return typeof t==`string`?t:void 0},TS=e=>e.rtl===!0,ES=e=>e.digitsAsAN===!0,DS=e=>`isTab`in e;function OS(e){for(let t of e){if(TS(t))return!0;let e=wS(t);if(e!==void 0&&qp(e))return!0}return!1}function kS(e,t){let n=e.length;if(n===0)return{order:[],rtl:[]};let r=``,i=Array(n),a=Array(n),o,s=()=>{for(o||=[];o.length<r.length;)o.push(null);return o};for(let t=0;t<n;t++){let n=wS(e[t])??``;if(i[t]=r.length,r+=n.length>0?n:``,a[t]=r.length,DS(e[t]))s()[i[t]]=`S`;else if(n.length>0&&(ES(e[t])||TS(e[t]))){let n=s(),o=ES(e[t]),c=TS(e[t]);for(let e=i[t];e<a[t];e++){let t=r.charCodeAt(e);o&&t>=48&&t<=57?n[e]=`AN`:c&&ax(r[e])&&(n[e]=`R`)}}}if(o)for(;o.length<r.length;)o.push(null);let{levels:c,paragraphLevel:l}=Gp().computeLevels(r,t?`rtl`:`ltr`,o),u=Array(n),d=Array(n);for(let e=0;e<n;e++){let t=a[e];for(;t>i[e]&&r[t-1]===` `;)t--;let n=!1;for(let r=i[e];r<t;r++){let e=c[r];if(e!==255&&(e&1)==1){n=!0;break}}u[e]=n,d[e]=i[e];for(let r=i[e];r<t;r++){let t=c[r];if(t!==255&&(t&1)==1===n){d[e]=r;break}}}let{order:f}=Jp(c,l,d);return{order:f,rtl:u}}function AS(e,t){switch(e){case`center`:return`center`;case`both`:case`justify`:case`distribute`:case`lowKashida`:case`mediumKashida`:case`highKashida`:case`thaiDistribute`:return`justify`;case`end`:case`right`:return t?`left`:`right`;case`start`:case`left`:case void 0:default:return t?`right`:`left`}}function jS(e){switch(e){case`both`:case`justify`:case`distribute`:case`lowKashida`:case`mediumKashida`:case`highKashida`:case`thaiDistribute`:return!0;default:return!1}}function MS(e){return e===`distribute`}function NS(e,t){let n=e.map(e=>Object.freeze({...e})),r=tb(n);return{lineWindow:({topYPt:e,minimumStartWidthPt:n,squareMinimumStartWidthPt:i,probeHeightPt:a,paragraphXPt:o,maximumWidthPt:s,columnXPt:c,columnWidthPt:l})=>{let u=yb(e,n,a,o,s,r,c,c+l,t??{xLeftPt:o,xRightPt:o+s,readingDirection:`ltr`},i??n);return{topYPt:u.topY,xOffsetPt:u.xOffset,maximumWidthPt:u.maxWidth}},skipTopAndBottomBands:({yPt:e,columnXPt:t,columnWidthPt:r})=>bb(e,n,t,t+r)}}function PS(e){if(e.characterGrid.active)return{type:e.characterGrid.kind,linePitchPt:null,characterPitchPt:e.characterGrid.pitchPt,charSpacePt:e.characterGrid.deltaPt}}function FS(e){let t=PS(e);return{type:t?t.type:e.lineGrid.active?`lines`:null,linePitchPt:e.lineGrid.active?e.lineGrid.pitchPt:null,characterPitchPt:e.characterGrid.active?e.characterGrid.pitchPt:null,charSpacePt:e.characterGrid.active?e.characterGrid.deltaPt:null}}function IS(e,t){if(!Kx(t))return e;let n=t.linePitchPt;return n<=0?e:e<=n?n:Math.ceil(e/n)*n}function LS(e,t,n,r,i,a){let o=FS(t),s=TC(t,n.availableWidthPt),c=Math.max(1,n.availableWidthPt-t.physicalIndentLeftPt-t.physicalIndentRightPt-s),l=n.paragraphXPt+t.physicalIndentLeftPt,u=t.spaceBeforePt,d=t.spaceAfterPt,f=Object.freeze({...n}),p=r.fontFamilyClasses,m=i.documentHasEastAsianText===!0||i.useFeLayout===!0,h=n.startYPt+(n.suppressSpaceBefore?0:u);n.wrap&&(h=n.wrap.skipTopAndBottomBands({yPt:h,columnXPt:n.paragraphXPt,columnWidthPt:n.availableWidthPt}));let g=()=>{let a=h,s=$x(e,1,o,t.hasRuby,m,r.context,p,t.lineSpacing,i.resolvedLocalFonts,i.layoutServices?.text,i.paragraphMarkShapeInput,i.useFeLayout===!0);return n.wrap&&(a=n.wrap.lineWindow({topYPt:a,minimumStartWidthPt:wx(e),squareMinimumStartWidthPt:Ey(wx(e),1),probeHeightPt:s,paragraphXPt:l,maximumWidthPt:c,columnXPt:n.paragraphXPt,columnWidthPt:n.availableWidthPt}).topYPt),{lines:[],markOnly:!0,requestedSpaceBeforePt:u,requestedSpaceAfterPt:d,uniformRubyAdvancePt:0,contentStartYPt:a,contentEndYPt:a+s,lastLineBelowBaselinePt:tS(e,o,t.hasRuby,m,r.context,p,t.lineSpacing,i.resolvedLocalFonts,i.layoutServices?.text,i.paragraphMarkShapeInput,i.useFeLayout===!0),placement:f}},_=SS(e.runs,i);if(_.length===0)return g();let v=n.wrap?{startPageY:h,paraX:l,columnXPt:n.paragraphXPt,columnWidthPt:n.availableWidthPt,floats:[],paragraphMarkLineStartWidth:Ey(wx(e),1),lineWindow:e=>n.wrap.lineWindow(e),lineBoxH:(e,n,r,i,a,s)=>Yx(t.lineSpacing,e,n,1,o,t.hasRuby,i??0,t.hasRuby?t.hasEastAsianText:a??!1,s),pageH:n.maximumYPt}:void 0,y=CS(r.context,_,c,a?0:t.firstIndentPt,1,[...t.tabStops],v,p,t.physicalIndentLeftPt,t.kinsoku,o,t.defaultTabPt,c+t.physicalIndentRightPt+s,t.baseRtl,t.isJustified,t.stretchLastLine,a?.boundary,void 0,i.verticalGlyphMeasurement,t.overflowPunct!==!1);if(y.length===0)return g();let b=t.hasRuby?IS(Math.max(0,...y.map(e=>Yx(t.lineSpacing,e.ascent,e.descent,1,o,!0,e.intendedSingle,t.hasEastAsianText))),o):0;t.hasRuby&&a?.uniformRubyAdvancePt!==void 0&&(b=Math.max(b,a.uniformRubyAdvancePt));let x=[];for(let e of y){let n=e.topY!==void 0&&e.topY>h?e.topY:h,r=t.hasRuby?b:Yx(t.lineSpacing,e.ascent,e.descent,1,o,!1,e.intendedSingle,e.eastAsian??!1,e.gridCountSingle);x.push({layout:e,topYPt:n,advancePt:r}),h=n+r}let S=x[x.length-1];return{lines:x,markOnly:!1,requestedSpaceBeforePt:u,requestedSpaceAfterPt:d,uniformRubyAdvancePt:b,contentStartYPt:x[0].topYPt,contentEndYPt:h,lastLineBelowBaselinePt:eS(S.advancePt,S.layout.ascent,S.layout.descent),placement:f}}function RS(e){let t=e.leadingIndentPt+e.authoredFirstIndentPt+e.markerShiftPt;return{startPt:t,endPt:t+e.markerWidthPt}}function zS(e){let t=e.authoredFirstIndentPt+e.markerShiftPt;return e.baseRtl?e.alignedLeadingEdgePt-t-e.markerWidthPt:e.alignedLeadingEdgePt+t}function BS(e,t){let{numbering:n,markerInput:r,service:i}=t,a=n!=null&&(n.text!==``||n.picBulletImagePath!=null)&&(!e.baseRtl||(n?.suff||`tab`)===`tab`&&t.authoredFirstIndentPt<0);if(!n||!r||!i||!a)return e;let o=US(n,r,{authoredFirstIndentPt:t.authoredFirstIndentPt,physicalIndentLeftPt:e.physicalIndentLeftPt,tabStops:t.tabStops,defaultTabPt:t.defaultTabPt??e.defaultTabPt},i,t.clusterGeometry??!0);return{...e,firstIndentPt:o.bodyOffsetPt,numberingMarkerGeometry:o}}function VS(e,t,n,r,i=!0){return r?{shape:r.shape({text:t,fontSizePt:e.fontSizePt*n,fonts:e.fonts,themeFonts:e.themeFonts,themeFontPresence:e.themeFontPresence,weight:e.weight,style:e.style,complexScript:e.complexScript,fontHint:e.fontHint,eastAsiaLanguage:e.eastAsiaLanguage,kerning:e.kerning,measure:!0,clusterGeometry:i}),fontSizePx:e.fontSizePt*n}:null}function HS(e,t,n){return t.find(t=>Jb(e,t))??bv(e,[...t],n)}function US(e,t,n,r,i=!0){let a=e.picBulletImagePath?``:de(e.text,e.fontFamily??null),o=a?VS(t,a,1,r,i)?.shape??null:null,s=e.picBulletImagePath?e.picBulletWidthPt??t.fontSizePt:o?.advancePt??0,c=e.jc===`right`?-s:e.jc===`center`?-s/2:0,l=n.authoredFirstIndentPt+c+s,u=e.suff||`tab`,d=l;if(u===`space`)d+=VS(t,` `,1,r,i)?.shape.advancePt??0;else if(u===`tab`&&(d=0,l>0)){let e=HS(n.physicalIndentLeftPt+l,n.tabStops,n.defaultTabPt);d=e?e.pos-n.physicalIndentLeftPt:l}return d=Math.max(0,d),{bodyOffsetPt:d,markerText:a,markerWidthPt:s,markerShiftPt:c,shape:o}}function WS(e,t,n){let r=0,i=0;for(let t of e.content){let e=t.type===`paragraph`?n.paragraph(t):n.nestedTable(t);r=Math.max(r,e.minWidthPt),i=Math.max(i,e.maxWidthPt)}let a=Math.max(0,t.left)+Math.max(0,t.right);return{minWidthPt:r+a,maxWidthPt:Math.max(r,i)+a}}function GS(e){let t=e.textShapeRequest,n=e=>e?[e.ascii??null,e.highAnsi??null,e.eastAsia??null,e.complexScript??null]:null;return xg(`paragraph-intrinsic-text`,[e.textLayoutService?.fingerprint??null,t?[n(t.fonts),n(t.themeFonts),t.themeFontPresence?[t.themeFontPresence.ascii??!1,t.themeFontPresence.highAnsi??!1,t.themeFontPresence.eastAsia??!1,t.themeFontPresence.complexScript??!1]:null,t.fontHint??null,t.fontSizePt,t.weight??null,t.style??null,t.complexScript??!1,t.eastAsiaLanguage??null,t.eastAsiaFontCharset??null,t.genericFamily??null,t.letterSpacingPt??null,t.kerning??null]:null,e.bold,e.italic,vv(e,1),e.fontFamily,e.fontRoute??null,e.charScale??1,e.charSpacing??0,e.fitTextPerGapPx??null,e.fitTextTrailingPadPx??null,e.fitTextRegionIndex??null,e.snapToCharacterGrid!==!1,e.widthBalanceGridDeltaFactor??null,e.widthBalanceSpaceSequence??!1,e.widthBalanceSpaceAdjustmentPt??null,e.script,e.tateChuYoko??!1,e.tateChuYoko?e.sourceRunIndex??null:null,e.ruby?[e.sourceRunIndex??null,e.ruby.text,e.ruby.fontSizePt,e.ruby.hpsRaisePt??null]:null,e.verticalRun??!1])}function KS(e){let t=[];for(let n of e){let e=t.at(-1);if(e&&`text`in e&&`text`in n&&GS(e)===GS(n)){let r=e.text.length,i=e.text+n.text,a=[...e.punctuationCompressions??[],...(n.punctuationCompressions??[]).map(e=>({end:r+e.end,adjustmentPt:e.adjustmentPt}))];t[t.length-1]={...e,text:i,punctuationCompressions:a.length>0?a:void 0,textShapeRequest:e.textShapeRequest?{...e.textShapeRequest,text:i}:void 0};continue}t.push({...n})}return t}function qS(e,t,n,r,i,a){let o=0,s=null,c=a?.type===`snapToChars`&&a.characterPitchPt!=null&&a.characterPitchPt>0?a.characterPitchPt:null,l=()=>{!s||c==null||(o+=Gx(s.naturalWidthPt,s.kind,c),s=null)};for(let u of e){let e=Math.max(n,u.start),d=Math.min(r,u.end);if(e>=d)continue;let f=t.slice(e,d),p=e-u.start,m=d-u.start,h={...u.segment,text:f,punctuationCompressions:Ix(u.segment,p,m)},g=e=>e.textLayoutService&&e.textShapeRequest?Ux(e,e.textLayoutService.shape({...e.textShapeRequest,text:e.text,fontSizePt:vv(e,1),measure:!0,clusterGeometry:!1}).advancePt,a,1):(i.context.font=xx(e.bold,e.italic,vv(e,1),e.fontFamily,i.fontFamilyClasses,e.fontRoute),Ux(e,i.context.measureText(e.text).width,a,1)),_=Wx(h,a);if(_===`eastAsia`&&c!=null){l();let e=h.textLayoutService&&h.textShapeRequest?h.textLayoutService.shape({...h.textShapeRequest,text:f,fontSizePt:vv(h,1),measure:!0,clusterGeometry:!0}).clusters:void 0,t=e?.length?null:[...new Set([0,...Dm(f),f.length])].sort((e,t)=>e-t),n=e?.map(e=>({start:e.range.start,end:e.range.end,naturalWidthPt:Ux({...h,text:f.slice(e.range.start,e.range.end),punctuationCompressions:Ix(h,e.range.start,e.range.end)},e.advancePt,a,1)}))??t.slice(0,-1).map((e,n)=>{let r=t[n+1];return{start:e,end:r,naturalWidthPt:g({...h,text:f.slice(e,r),punctuationCompressions:Ix(h,e,r)})}}),r=0;for(let e of n)e.end<=e.start||(r+=jb(e.naturalWidthPt,c));o+=Gx(n.reduce((e,t)=>e+t.naturalWidthPt,0),_,c,Math.max(1,r))}else{let e=g(h);if((_===`latin`||_===`complexScript`)&&c!=null){let t=s;t?.kind===_?s={kind:_,naturalWidthPt:t.naturalWidthPt+e}:(l(),s={kind:_,naturalWidthPt:e})}else l(),o+=e}}return l(),o}function JS(e,t,n){let r=PS(t),i=0;for(let a=0;a<e.length;a+=1){let o=e[a];if(!(`text`in o)||o.text.length===0)continue;let s=[],c=``,l=e=>{let t=c.length;c+=e.text,s.push({segment:e,start:t,end:c.length})};for(l(o);a+1<e.length;){let t=e[a+1];if(!(`text`in t)||t.joinPrev!==!0)break;l(t),a+=1}let u=0;for(let e of _S(c)){let a=e.replace(/\s+$/u,``),o=u,l=u+a.length;if(u+=e.length,!a)continue;if(!aS(a)){i=Math.max(i,qS(s,c,o,l,n,r));continue}let d=[0,...Dm(a),a.length],f=[];for(let e=1;e<d.length;e+=1)f.push({text:a.slice(d[e-1],d[e]),start:o+d[e-1],end:o+d[e]});let p=[],m=f[0];for(let e=1;e<f.length;e+=1){let n=[...m.text].at(-1)?.codePointAt(0),r=f[e].text.codePointAt(0);n!==void 0&&r!==void 0&&!t.kinsoku.lineEndForbidden.has(n)&&!t.kinsoku.lineStartForbidden.has(r)?(p.push(m),m=f[e]):m={text:m.text+f[e].text,start:m.start,end:f[e].end}}m&&p.push(m);for(let e of p)i=Math.max(i,qS(s,c,e.start,e.end,n,r))}}return i}function YS(e,t,n){let r=(n.baseRtl?n.physicalIndentRightPt:n.physicalIndentLeftPt)+(t===0?n.firstIndentPt:0)+e.xOffset;return{startPt:r,endPt:r+e.segments.reduce((e,t)=>e+t.measuredWidth,0)}}function XS(e,t,n,r,i,a){if(!Number.isFinite(n)||n<0)throw RangeError(`maximumWidthPt must be finite and non-negative`);if(n===0)return{minWidthPt:0,maxWidthPt:0};let o=KS(SS(e.runs,i)),s=Math.max(1,n-t.physicalIndentLeftPt-t.physicalIndentRightPt),c=o.length===0?[]:CS(r.context,o,s,t.firstIndentPt,1,[...t.tabStops],void 0,r.fontFamilyClasses,t.physicalIndentLeftPt,t.kinsoku,PS(t),t.defaultTabPt,s+t.physicalIndentRightPt,t.baseRtl,t.isJustified,t.stretchLastLine,void 0,`intrinsic`,i.verticalGlyphMeasurement,t.overflowPunct!==!1),l=t.baseRtl?t.physicalIndentLeftPt:t.physicalIndentRightPt,u=0,d=0;c.forEach((e,n)=>{let r=YS(e,n,t);u=Math.min(u,r.startPt),d=Math.max(d,r.endPt)});let f=a?RS({leadingIndentPt:t.baseRtl?t.physicalIndentRightPt:t.physicalIndentLeftPt,authoredFirstIndentPt:e.indentFirst,markerShiftPt:a.markerShiftPt,markerWidthPt:a.markerWidthPt}):void 0;f&&(u=Math.min(u,f.startPt),d=Math.max(d,f.endPt));let p=Math.min(n,Math.max(0,d-u+l)),m=JS(o,t,r);for(let e of c){let t=0,n=e.segments.reduce((e,t)=>e+t.measuredWidth,0);for(let r of e.segments)t+=r.measuredWidth,`imagePath`in r&&!r.anchor||`math`in r?m=Math.max(m,r.measuredWidth):`isTab`in r&&(m=Math.max(m,r.resolvedAlignment===`left`?t:n))}let h=t.baseRtl?t.physicalIndentRightPt:t.physicalIndentLeftPt,g=h,_=Math.min(0,g),v=Math.max(0,g+m),y=h+t.firstIndentPt;return _=Math.min(_,y),v=Math.max(v,y+m),f&&(_=Math.min(_,f.startPt),v=Math.max(v,f.endPt)),{minWidthPt:Math.min(n,Math.max(0,v-_+l)),maxWidthPt:p}}function ZS(e,t){if(!e||t?.suppressBottom)return 0;let n=e.bottom;return!n||n.style===`none`?0:(n.space??0)+(n.width??0)/2}function QS(e){return e==null||e.style===`none`?null:e}function $S(e,t){let n=QS(e),r=QS(t);return n==null||r==null?n==null&&r==null:n.style===r.style&&n.width===r.width&&(n.space??0)===(r.space??0)&&(n.color??null)===(r.color??null)}function eC(e,t){return!e||!t?!1:$S(e.top,t.top)&&$S(e.bottom,t.bottom)&&$S(e.left,t.left)&&$S(e.right,t.right)&&$S(e.between,t.between)}function tC(e){return e?[e.top,e.right,e.bottom,e.left,e.between].some(e=>e!=null&&e.style!==`none`):!1}function nC(e,t){return!e||!t||e.framePr||t.framePr?!1:tC(e.borders)&&tC(t.borders)&&eC(e.borders,t.borders)}function rC(e,t,n,r=!1){let i=(e,t)=>r?!!e&&!!t&&!!e.framePr&&!!t.framePr&&tC(e.borders)&&tC(t.borders)&&eC(e.borders,t.borders):nC(e,t),a=i(e,t),o=i(t,n),s=t.borders?.between;return Object.freeze({top:a?s&&s.style!==`none`?`between`:`none`:`top`,bottom:o?`none`:`bottom`})}function iC(e,t,n,r,i,a){return XS(e,t,n,r,i,a).maxWidthPt}function aC(e){let t=e;return xg(`w:framePr`,[t.dropCap,t.lines,t.wrap,t.hAnchor,t.vAnchor,t.hRule,t.hSpace,t.vSpace,t.w??null,t.h??null,t.x??null,t.y??null,t.xAlign??null,t.yAlign??null,t.__anchorLock===!0])}function oC(e){let t=new WeakMap;for(let n=0;n<e.length;){let r=e[n];if(r?.type!==`paragraph`||!r.framePr){n+=1;continue}let i=aC(r.framePr),a=[r],o=[n],s=n+1;for(;s<e.length;){let t=e[s];if(t?.type!==`paragraph`||!t.framePr||aC(t.framePr)!==i)break;a.push(t),o.push(s),s+=1}let c=Object.freeze({id:`${i}:${n}`,owner:r,members:Object.freeze(a),sourceIndices:Object.freeze(o),framePr:r.framePr});for(let e of a)t.set(e,c);n=s}return t}const sC=new WeakMap,cC=new WeakMap;function lC(e){let t=oC(e);for(let n=0;n<e.length;n+=1){let r=e[n];if(r.type!==`paragraph`)continue;let i=t.get(r);i&&sC.set(r,i);let a=e[n-1],o=e[n+1],s=a?.type===`paragraph`&&t.get(a)===i?a:null,c=o?.type===`paragraph`&&t.get(o)===i?o:null;cC.set(r,rC(i?s:a?.type===`paragraph`?a:null,r,i?c:o?.type===`paragraph`?o:null,i!==void 0))}}const uC=e=>sC.get(e),dC=e=>cC.get(e);function fC(e){return{story:e.story,containers:[...e.containers,{kind:`tableCell`}],lineNumberingEligible:!1}}function pC(e){return e.runs.some(e=>e.type===`text`&&!!e.ruby)}function mC(e){return e.runs.some(e=>e.type===`text`&&yv.test(e.text))}function hC(e){for(let t of e){if(t.type===`paragraph`){if(mC(t))return!0;continue}if(t.type===`table`){for(let e of t.rows)for(let t of e.cells)if(hC(t.content))return!0}}return!1}function gC(e,t={normalStyleFontSizePt:10}){return lC(e.body),{kinsoku:Xp(e.settings),defaultTabPt:vS(e.settings),characterSpacingControl:e.settings?.characterSpacingControl,mathDefJc:e.settings?.mathDefJc,documentHasEastAsianText:hC(e.body),normalStyleFontSizePt:t.normalStyleFontSizePt,compat:{adjustLineHeightInTable:e.settings?.adjustLineHeightInTable??!1,useFeLayout:e.settings?.useFeLayout??!1,balanceSingleByteDoubleByteWidth:e.settings?.balanceSingleByteDoubleByteWidth??!1}}}function _C(e){let t=e.pageWidth-e.marginLeft-e.marginRight,n=e.columns;if(!n||n.count<=1)return[{xPt:e.marginLeft,wPt:Math.max(1,t)}];if(!n.equalWidth&&n.cols.length>0){let t=[],r=e.marginLeft;for(let e of n.cols)t.push({xPt:r,wPt:Math.max(1,e.widthPt)}),r+=e.widthPt+e.spacePt;return t}let r=Math.max(1,(t-(n.count-1)*n.spacePt)/n.count);return Array.from({length:n.count},(t,i)=>({xPt:e.marginLeft+i*(r+n.spacePt),wPt:r}))}function vC(e){switch(e){case`lines`:case`linesAndChars`:case`snapToChars`:return e;default:return`none`}}function yC(e){return e===`lines`||e===`linesAndChars`||e===`snapToChars`}function bC(e){return e===`linesAndChars`||e===`snapToChars`}function xC(e,t){return{geometry:{pageWidth:t.pageWidth,pageHeight:t.pageHeight,marginTop:t.marginTop,marginRight:t.marginRight,marginBottom:t.marginBottom,marginLeft:t.marginLeft,headerDistance:t.headerDistance,footerDistance:t.footerDistance},columns:_C(t),columnSeparator:t.columns?.sep===!0,grid:{kind:vC(t.docGridType),linePitchPt:t.docGridLinePitch??null,charSpacePt:t.docGridCharSpace==null?null:t.docGridCharSpace/4096},textDirection:t.textDirection??`lrTb`,sectionBidi:!1,verticalAlignment:t.vAlign??`top`,lineNumbering:t.lineNumbering??void 0}}function SC(e){return e.containers.some(e=>e.kind===`tableCell`)}function CC(e,t,n,r){let i=yC(t.grid.kind)&&t.grid.linePitchPt!=null&&t.grid.linePitchPt>0&&r.snapToGrid!==!1&&r.lineSpacing?.rule!==`exact`&&(!SC(n)||e.compat.adjustLineHeightInTable),a=bC(t.grid.kind),o=r.bidi===!0,s=SC(n),c=a?e.normalStyleFontSizePt+(t.grid.charSpacePt??0):null,l=t.grid.kind===`linesAndChars`?c:null,u=r.numbering,d=u!=null&&(u.text!==``||u.picBulletImagePath!=null),f=o&&d&&(u.suff||`tab`)===`tab`&&r.indentFirst<0;return{lineGrid:{active:i,pitchPt:i?t.grid.linePitchPt:null},characterGrid:{active:a,kind:a?t.grid.kind:null,deltaPt:a?t.grid.charSpacePt??0:0,pitchPt:c!=null&&c>0?c:null},rightIndentGrid:{pitchPt:l!=null&&l>0?l:null,paragraphAllowsAdjustment:r.adjustRightInd!==!1&&Mb(s)},physicalIndentLeftPt:o?r.indentRight:r.indentLeft,physicalIndentRightPt:o?r.indentLeft:r.indentRight,firstIndentPt:f?0:r.indentFirst,lineSpacing:r.lineSpacing,spaceBeforePt:r.spaceBefore,spaceAfterPt:r.spaceAfter,baseRtl:o,isJustified:jS(r.alignment),stretchLastLine:MS(r.alignment),tabStops:wC(r),hasRuby:pC(r),hasEastAsianText:mC(r),kinsoku:e.kinsoku,defaultTabPt:e.defaultTabPt,overflowPunct:r.overflowPunct!==!1,mathDefJc:e.mathDefJc}}function wC(e){let t=e.tabStops.filter(e=>e.alignment!==`clear`).map(e=>({...e})),n=e.indentLeft,r=t.some(e=>e.pos===n&&Pb(e.alignment));return(e.indentFirst<0&&!r?[{pos:n,alignment:`left`,leader:`none`},...t]:t).sort((e,t)=>e.pos-t.pos)}function TC(e,t){let{pitchPt:n,paragraphAllowsAdjustment:r}=e.rightIndentGrid;return!r||n==null?0:Nb(t,n)}$({id:`word-default-line-number-distance`,evidence:{kind:`regression-test`,reference:`packages/docx/src/layout/compatibility.test.ts#uses Word's observed 18pt line-number distance only when omitted`},description:`ECMA-376 §17.6.8 leaves an omitted line-number distance implementation-defined. Preserve Word-compatible 18pt placement only when the authored distance is absent.`}),$({id:`word-continuous-section-page-number-restart`,evidence:{kind:`regression-test`,reference:`packages/docx/src/page-number-field-render.test.ts#restarts a spilling continuous section after its shared first page`},description:`Issue #804 records that Word anchors a continuous section page-number restart to the section first appearance on the shared physical page, so its next owned page advances from that appearance.`}),$({id:`word-trailing-empty-mark-baseline-admission`,evidence:{kind:`regression-test`,reference:`packages/docx/src/paginate-trailing-empty-mark-fit.test.ts#KEEPS an inkless empty paragraph on the page when ink-bearing content follows and only its below-baseline whitespace overflows`},description:`At the unreserved physical body edge, Word admits an undecorated non-terminal empty paragraph mark by its baseline when later ink follows in the same flow.`}),$({id:`word-section-mark-blank-page-suppression`,evidence:{kind:`office-observation`,syntheticFixtureId:`next-page-section-mark-bottom-edge-admission`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`For the observed nextPage boundary, Word consumes an undecorated inkless paragraph that carries the section boundary on the outgoing page instead of creating an otherwise empty intermediate page solely for that non-painting mark. The following section still starts its requested page. Other section-start kinds remain outside this observation.`}),$({id:`word-book-fold-gutter-right-edge`,evidence:{kind:`microsoft-note`,reference:`[MS-OI29500] §§2.1.389, 2.1.391`},description:`For book-fold printing Word places the automatic gutter at the right-margin bisector edge, including reverse book-fold mode.`});function EC(e){return e??18}function DC(e,t,n){return e+t-n}function OC(e){return!e.hasContinuationBoundary&&e.inkless&&e.undecorated&&!e.keepNext&&e.markReservePt===0&&e.pageBottomIsUnreserved&&e.physicalRegionBottomIsActive?e.followsNextPageSectionBoundary?Math.max(0,e.markExtentPt):e.hasFollowingInk?e.markBelowBaselinePt:0:0}function kC(){return`right`}function AC(e){if(e.sectionOccurrenceId.length===0)throw RangeError(`Section occurrence id must not be empty`);if(e.columns.length===0)throw RangeError(`A page-flow section requires at least one column`);return Object.freeze({sectionOccurrenceId:e.sectionOccurrenceId,geometry:Object.freeze({...e.geometry}),columns:Object.freeze(e.columns.map(e=>Object.freeze({...e}))),textDirection:e.textDirection,sectionBidi:e.sectionBidi??!1,grid:Object.freeze(e.grid??{kind:`none`,linePitchPt:null,charSpacePt:null})})}function jC(e){return NC(e.geometry.marginTop)}function MC(e){return e.geometry.pageHeight-NC(e.geometry.marginBottom)}function NC(e){return Math.abs(e)}function PC(e){return{pageWidth:e.pageHeight,pageHeight:e.pageWidth,marginLeft:e.marginTop,marginTop:e.marginRight,marginRight:e.marginBottom,marginBottom:e.marginLeft,headerDistance:e.headerDistance,footerDistance:e.footerDistance}}function FC(e){return{pageWidth:e.pageHeight,pageHeight:e.pageWidth,marginTop:e.marginLeft,marginRight:e.marginTop,marginBottom:e.marginRight,marginLeft:e.marginBottom,headerDistance:e.headerDistance,footerDistance:e.footerDistance}}function IC(e){return e===`tbRl`||e===`tbRlV`||e===`tbLrV`||e===`btLr`}function LC(e,t){if(!Number.isInteger(t)||t<0)throw RangeError(`Physical page index must be a non-negative integer`);let{pageWidth:n,pageHeight:r}=e.physicalGeometry,{marginTop:i,marginRight:a,marginBottom:o,marginLeft:s}=e.physicalGeometry,c=e.bookFoldPrinting||e.bookFoldRevPrinting;return c?(n/=2,kC()===`right`&&(a+=e.gutterPt)):e.printTwoOnOne?(r/=2,i+=e.gutterPt):e.gutterAtTop&&!e.mirrorMargins?i+=e.gutterPt:e.rtlGutter?a+=e.gutterPt:s+=e.gutterPt,!c&&!e.printTwoOnOne&&e.mirrorMargins&&t%2==1&&([s,a]=[a,s]),{...e.physicalGeometry,pageWidth:n,pageHeight:r,marginTop:i,marginRight:a,marginBottom:o,marginLeft:s}}function RC(e,t,n){let r=LC(t,n),i=IC(t.textDirection)?PC(r):r;return Object.freeze({...e,geometry:Object.freeze(i),columns:Object.freeze(_C({...i,titlePage:!1,evenAndOddHeaders:!1,columns:t.columns}).map(e=>Object.freeze(e)))})}function zC(e){return{pageWidth:e.pageWidth,pageHeight:e.pageHeight,marginTop:e.marginTop,marginRight:e.marginRight,marginBottom:e.marginBottom,marginLeft:e.marginLeft,headerDistance:e.headerDistance,footerDistance:e.footerDistance}}function BC(){return{pageWidth:612,pageHeight:792,marginTop:72,marginRight:72,marginBottom:72,marginLeft:72,headerDistance:36,footerDistance:36}}function VC(e,t=!1){let n=e.docGridType===`lines`||e.docGridType===`linesAndChars`||e.docGridType===`snapToChars`?e.docGridType:`none`;return Object.freeze({geometry:Object.freeze(zC(e)),columns:Object.freeze(_C(e).map(e=>Object.freeze(e))),columnSeparator:e.columns?.sep===!0,grid:Object.freeze({kind:n,linePitchPt:e.docGridLinePitch??null,charSpacePt:e.docGridCharSpace==null?null:e.docGridCharSpace/4096}),textDirection:e.textDirection??`lrTb`,sectionBidi:t,verticalAlignment:e.vAlign??`top`,...e.lineNumbering===null||e.lineNumbering===void 0?{}:{lineNumbering:Object.freeze({...e.lineNumbering})}})}function HC(e,t){switch(e.display){case`firstPage`:return t;case`notFirstPage`:return!t;default:return!0}}function UC(e){return e!==void 0&&/^[0-9a-fA-F]{6}$/.test(e)?`#${e}`:`#000000`}function WC(e){return e!==void 0&&Number.isFinite(e.space)?e.space:0}function GC(e,t,n,r){let i=Number.isFinite(e.width)?e.width:.5;return Object.freeze({edge:t,from:Object.freeze(n),to:Object.freeze(r),color:UC(e.color),widthPt:i,..._v(e.style,i)})}function KC(e,t,n,r){if(!e||!HC(e,r))return null;let{geometry:i}=t,a=e.offsetFrom===`text`,o=a?i.marginLeft:0,s=a?i.pageWidth-i.marginRight:i.pageWidth,c=a?NC(i.marginTop):0,l=a?i.pageHeight-NC(i.marginBottom):i.pageHeight,u=c+WC(e.top),d=l-WC(e.bottom),f=o+WC(e.left),p=s-WC(e.right),m=[];if(e.top&&m.push(GC(e.top,`top`,{xPt:f,yPt:u},{xPt:p,yPt:u})),e.bottom&&m.push(GC(e.bottom,`bottom`,{xPt:f,yPt:d},{xPt:p,yPt:d})),e.left&&m.push(GC(e.left,`left`,{xPt:f,yPt:u},{xPt:f,yPt:d})),e.right&&m.push(GC(e.right,`right`,{xPt:p,yPt:u},{xPt:p,yPt:d})),m.length===0)return null;let h=mv(nv(t.textDirection),n);return Object.freeze({zOrder:e.zOrder===`back`?`back`:`front`,logicalToPhysical:Object.freeze({...h.logicalToPhysical}),segments:Object.freeze(m)})}function qC(e,t,n){return`page:${e}:region:${encodeURIComponent(t)}:column:${n}`}function JC(e){return YC(e),{xPt:0,yPt:0,widthPt:e.widthPt,heightPt:e.heightPt,contentTopPt:e.contentTopPt,contentBottomPt:e.contentBottomPt}}function YC(e){if(!Number.isFinite(e.widthPt)||!Number.isFinite(e.heightPt)||!Number.isFinite(e.contentTopPt)||!Number.isFinite(e.contentBottomPt)||e.widthPt<=0||e.heightPt<=0||e.contentTopPt<0||e.contentTopPt>e.contentBottomPt||e.contentBottomPt>e.heightPt)throw RangeError(`Effective page edges must satisfy 0 <= contentTopPt <= contentBottomPt <= heightPt`)}function XC(e,t){if(e.length===0)throw RangeError(`${t} must not be empty`)}function ZC(e,t){if(e&&t===void 0)throw RangeError(`Page-border finalization requires explicit section-owned page identity`);return t??!1}function QC(e,t){return e.length===t.length&&e.every((e,n)=>{let r=t[n];return r!==void 0&&e.xPt===r.xPt&&e.wPt===r.wPt})}function $C(e,t){return e===t||e!==void 0&&t!==void 0&&e.start===t.start&&e.countBy===t.countBy&&e.distance===t.distance&&e.restart===t.restart}function ew(e,t){return e.geometry.pageWidth===t.geometry.pageWidth&&e.geometry.pageHeight===t.geometry.pageHeight&&e.geometry.marginTop===t.geometry.marginTop&&e.geometry.marginRight===t.geometry.marginRight&&e.geometry.marginBottom===t.geometry.marginBottom&&e.geometry.marginLeft===t.geometry.marginLeft&&e.geometry.headerDistance===t.geometry.headerDistance&&e.geometry.footerDistance===t.geometry.footerDistance&&QC(e.columns,t.columns)&&e.columnSeparator===t.columnSeparator&&e.textDirection===t.textDirection&&e.sectionBidi===!0==(t.sectionBidi===!0)&&e.grid.kind===t.grid.kind&&e.grid.linePitchPt===t.grid.linePitchPt&&e.grid.charSpacePt===t.grid.charSpacePt&&e.verticalAlignment===t.verticalAlignment&&$C(e.lineNumbering,t.lineNumbering)}function tw(e){if(nv(e.section.textDirection)!==e.writingMode)throw RangeError(`Section region writing mode must agree with its section text direction`);let t=e.section.sectionBidi===!0?`rtl`:`ltr`;if(e.columnFlowDirection!==void 0&&e.columnFlowDirection!==t)throw RangeError(`Section region column flow direction must agree with sectPr bidi`);let n=e.columnIndexes??e.section.columns.map((e,t)=>t);if(e.columns.length!==n.length||n.some((t,r)=>!Number.isInteger(t)||t<0||t>=e.section.columns.length||r>0&&t<=n[r-1])||e.columns.some((t,r)=>{let i=e.section.columns[n[r]];return i===void 0||t.inlineStartPt!==i.xPt||t.inlineExtentPt!==i.wPt}))throw RangeError(`Section region columns must equal its normalized section columns`)}function nw(e){if(!Number.isInteger(e)||e<0)throw RangeError(`Layout page index must be a non-negative integer`)}function rw(e,t,n){let r=[],i=[],a=new Map,o=new Set,s=new Set,c,l=[];for(let u of n){if(XC(u.id,`Section region id`),XC(u.sectionOccurrenceId,`Section occurrence id`),o.has(u.id)||s.has(u.sectionOccurrenceId))throw RangeError(`Section region and occurrence identities must be unique`);if(o.add(u.id),s.add(u.sectionOccurrenceId),c!==void 0&&c!==u.writingMode)throw RangeError(`One physical page cannot mix writing modes`);c=u.writingMode,tw(u);let n=cv({widthPt:u.section.geometry.pageWidth,heightPt:u.section.geometry.pageHeight},u.writingMode);if(n.widthPt!==t.widthPt||n.heightPt!==t.heightPt)throw RangeError(`Section regions on one physical page must use the same page box: expected ${n.widthPt}x${n.heightPt}, got ${t.widthPt}x${t.heightPt}`);let d=sv(t,u.writingMode),f=d.widthPt,p=d.heightPt;if(!Number.isFinite(u.blockStartPt)||!Number.isFinite(u.blockEndPt)||u.blockStartPt<0||u.blockEndPt<u.blockStartPt||u.blockEndPt>p)throw RangeError(`Section regions must be inside the logical page`);if(u.columns.length===0)throw RangeError(`Section region must contain a column`);let m=u.columnIndexes??u.section.columns.map((e,t)=>t),h=0,g=mv(u.writingMode,t),_=u.columns.map((t,n)=>{let r=m[n];if(!Number.isFinite(t.inlineStartPt)||!Number.isFinite(t.inlineExtentPt)||t.inlineStartPt<0||t.inlineExtentPt<=0||t.inlineStartPt+t.inlineExtentPt>f||t.inlineStartPt<h)throw RangeError(`Columns must be ordered, disjoint, and inside the logical page`);h=t.inlineStartPt+t.inlineExtentPt;let o=qC(e,u.id,r);if(a.has(o))throw RangeError(`Duplicate flow domain ${o}`);let s={xPt:t.inlineStartPt,yPt:u.blockStartPt,widthPt:t.inlineExtentPt,heightPt:u.blockEndPt-u.blockStartPt},c=fv(g.logicalToPhysical,s);if(l.some(e=>c.xPt<e.xPt+e.widthPt&&e.xPt<c.xPt+c.widthPt&&c.yPt<e.yPt+e.heightPt&&e.yPt<c.yPt+c.heightPt))throw RangeError(`Section flow domains on one page must be physically disjoint`);return l.push(c),i.push({id:o,kind:`body`,logicalBounds:s,physicalBounds:c}),a.set(o,u.sectionOccurrenceId),o});r.push({id:u.id,sectionOccurrenceId:u.sectionOccurrenceId,coordinateSpace:g,blockStartPt:u.blockStartPt,blockEndPt:u.blockEndPt,columnFlowDirection:u.columnFlowDirection??(u.section.sectionBidi===!0?`rtl`:`ltr`),columnIndexes:Object.freeze([...m]),flowDomainIds:_,section:u.section})}return{regions:r,domains:i,sectionByDomain:a}}function iw(e,t){if(e.kind===`paragraph`){t(e),e.drawings.forEach(e=>iw(e,t)),e.textBoxes.forEach(e=>iw(e,t));return}if(e.kind===`table`){aw(e,t);return}e.kind===`textbox`&&ow(e,t)}function aw(e,t){for(let n of e.rows)for(let e of n.cells)for(let n of e.blocks)iw(n.layout,t)}function ow(e,t){e.story.blocks.forEach(e=>iw(e,t))}function sw(e,t,n){let r=[],i=new Set;for(let a of e){let e=n.get(a.flowDomainId)??t;iw(a,t=>{for(let n of t.bookmarkStarts??[])!n||i.has(n)||(i.add(n),r.push({name:n,nodeId:t.id,sectionOccurrenceId:e}))})}return r}function cw(e){let t=e.sectionRegions??[],n=new Map(t.map(e=>[e.id,e])),r=new Map;for(let e of t)for(let t of e.flowDomainIds)r.set(t,e.sectionOccurrenceId);for(let i of e.flowDomains){if(i.kind!==`footnote`&&i.kind!==`endnote`)continue;let e=i.sectionRegionId?n.get(i.sectionRegionId):t[0];e&&r.set(i.id,e.sectionOccurrenceId)}return r}function lw(e,t=cw(e)){return sw(U_(e),e.sectionOccurrenceId??``,t)}function uw(e){return e.parityBlank?e:Object.freeze({...e,bookmarkStarts:Object.freeze([...lw(e)])})}function dw(e){nw(e.pageIndex),XC(e.sectionOccurrenceId,`Page-start section occurrence id`);let{regions:t,domains:n,sectionByDomain:r}=rw(e.pageIndex,e.physicalPage,e.sectionRegions),i=e.sectionRegions[0],a=i?.pageBorders??e.pageBorders;if(i!==void 0&&(e.sectionOccurrenceId!==i.sectionOccurrenceId||!ew(e.section,i.section)))throw RangeError(`Page-start section context must equal the first section region`);return{pageIndex:e.pageIndex,geometry:JC(e.physicalPage),flowDomains:n,section:e.section,sectionOccurrenceId:e.sectionOccurrenceId,parityBlank:!1,bookmarkStarts:sw(e.paint.map(({node:e})=>e),e.sectionOccurrenceId,r),pageNumber:e.pageNumber,sectionRegions:t,columnSeparators:gv(t),pageBorder:KC(a,e.section,e.physicalPage,ZC(a,e.firstSectionOwnedPage)),layers:B_(e.paint),readingOrder:e.readingOrder.map(e=>e.id)}}function fw(e){return nw(e.pageIndex),XC(e.sectionOccurrenceId,`Page-start section occurrence id`),YC(e.physicalPage),Object.freeze({...e,sectionRegions:Object.freeze([]),paint:Object.freeze([]),readingOrder:Object.freeze([])})}function pw(e,t){return Object.freeze({...e,sectionRegions:Object.freeze([...e.sectionRegions,t])})}function mw(e,t,n){return Object.freeze({...e,paint:Object.freeze([...e.paint,t]),readingOrder:n?Object.freeze([...e.readingOrder,t.node]):e.readingOrder})}function hw(e,t,n){return dw({...e,pageNumber:t,firstSectionOwnedPage:n})}function gw(e){return nw(e.pageIndex),XC(e.sectionOccurrenceId,`Page-start section occurrence id`),{pageIndex:e.pageIndex,geometry:JC(e.physicalPage),flowDomains:[],section:e.section,sectionOccurrenceId:e.sectionOccurrenceId,parityBlank:!0,bookmarkStarts:[],pageNumber:e.pageNumber,sectionRegions:[],columnSeparators:[],pageBorder:KC(e.pageBorders,e.section,e.physicalPage,ZC(e.pageBorders,e.firstSectionOwnedPage)),layers:B_([]),readingOrder:[]}}function _w(e){if(e.length===0)return null;let t=Math.min(...e.map(e=>e.xPt)),n=Math.min(...e.map(e=>e.yPt)),r=Math.max(...e.map(e=>e.xPt+e.widthPt)),i=Math.max(...e.map(e=>e.yPt+e.heightPt));return{xPt:t,yPt:n,widthPt:r-t,heightPt:i-n}}const vw={FLOW_OVERLAP:!0,BOTTOM_MARGIN_INVASION:!0,FLOW_DOMAIN_INVASION:!0,INVALID_REFERENCE:!0,INVALID_GEOMETRY:!0,INVALID_VALUE:!0,MISSING_RESOURCE:!0,NON_CONVERGENCE:!0,UNSUPPORTED_FEATURE:!0},yw={body:!0,header:!0,footer:!0,footnote:!0,endnote:!0,textbox:!0},bw=new Set(Object.keys(vw)),xw=new Set(Object.keys(yw));function Sw(e,t,n=new WeakSet){if(!(e===null||typeof e==`string`||typeof e==`boolean`)){if(typeof e==`number`){if(!Number.isFinite(e))throw new Z(`INVALID_GEOMETRY`,`${t} is not finite`);return}if(typeof e!=`object`)throw new Z(`INVALID_GEOMETRY`,`${t} contains ${typeof e}`);if(n.has(e))throw new Z(`INVALID_GEOMETRY`,`${t} contains a cycle`);n.add(e);try{if(Array.isArray(e)){let r=0;for(let i of Reflect.ownKeys(e)){if(i===`length`)continue;if(typeof i!=`string`)throw new Z(`INVALID_GEOMETRY`,`${t} has a symbol key`);let a=Number(i);if(!Number.isInteger(a)||a<0||String(a)!==i||a>=e.length)throw new Z(`INVALID_GEOMETRY`,`${t}.${i} is not an array index`);let o=Object.getOwnPropertyDescriptor(e,i);if(!o?.enumerable||!(`value`in o))throw new Z(`INVALID_GEOMETRY`,`${t}[${i}] is not plain data`);Sw(o.value,`${t}[${i}]`,n),r+=1}if(r!==e.length)throw new Z(`INVALID_GEOMETRY`,`${t} is sparse`);return}let r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==null)throw new Z(`INVALID_GEOMETRY`,`${t} is not a plain record`);for(let r of Reflect.ownKeys(e)){if(typeof r!=`string`)throw new Z(`INVALID_GEOMETRY`,`${t} has a symbol key`);let i=Object.getOwnPropertyDescriptor(e,r);if(!i?.enumerable||!(`value`in i))throw new Z(`INVALID_GEOMETRY`,`${t}.${r} is not plain data`);Sw(i.value,`${t}.${r}`,n)}}finally{n.delete(e)}}}function Cw(e,t){if(!Number.isFinite(e))throw new Z(`INVALID_GEOMETRY`,`${t} is not finite`)}function ww(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Tw(e,t){if(!ww(e))throw new Z(`INVALID_GEOMETRY`,`${t} is not a point`);Cw(e.xPt,`${t}.xPt`),Cw(e.yPt,`${t}.yPt`)}function Ew(e,t){if(Tw(e,t),Cw(e.widthPt,`${t}.widthPt`),Cw(e.heightPt,`${t}.heightPt`),e.widthPt<0||e.heightPt<0)throw new Z(`INVALID_GEOMETRY`,`${t} has a negative extent`)}function Dw(e,t){if(!ww(e))throw new Z(`INVALID_GEOMETRY`,`${t} is not a matrix`);for(let n of[`a`,`b`,`c`,`d`,`e`,`f`])Cw(e[n],`${t}.${n}`)}function Ow(e,t){if(e!==`horizontal-tb`&&e!==`vertical-rl`&&e!==`vertical-lr`)throw new Z(`INVALID_GEOMETRY`,`${t} is unsupported`)}function kw(e,t){if(!ww(e))throw new Z(`INVALID_GEOMETRY`,`${t} is not a coordinate space`);Ow(e.writingMode,`${t}.writingMode`),Dw(e.logicalToPhysical,`${t}.logicalToPhysical`),Dw(e.physicalToLogical,`${t}.physicalToLogical`)}function Aw(e,t){let{plan:n}=e;if(Sw(n,`${t}.plan`),Cw(n.rect.x,`${t}.plan.rect.x`),Cw(n.rect.y,`${t}.plan.rect.y`),Cw(n.rect.w,`${t}.plan.rect.w`),Cw(n.rect.h,`${t}.plan.rect.h`),n.rect.w<0||n.rect.h<0)throw new Z(`INVALID_GEOMETRY`,`${t}.plan.rect has a negative extent`);if(Cw(n.transform.rotationDeg,`${t}.plan.transform.rotationDeg`),n.geometry.kind===`preset`){if(n.geometry.name.length===0)throw new Z(`INVALID_GEOMETRY`,`${t}.plan.geometry.name is empty`);n.geometry.adjustments.forEach((e,n)=>{e!==null&&Cw(e,`${t}.plan.geometry.adjustments[${n}]`)})}else n.geometry.subpaths.forEach((e,n)=>{e.forEach((e,r)=>{if(e.cmd.length===0)throw new Z(`INVALID_GEOMETRY`,`${t}.plan.geometry.subpaths[${n}][${r}].cmd is empty`)})});if(n.stroke&&(Cw(n.stroke.width,`${t}.plan.stroke.width`),n.stroke.width<0))throw new Z(`INVALID_GEOMETRY`,`${t}.plan.stroke.width is negative`)}function jw(e,t){if(e<=t)return!0;let n=2**-52*Math.max(1,Math.abs(e),Math.abs(t));return e-t<=n}function Mw(e,t){return e<t&&!jw(t,e)}function Nw(e,t){return Mw(e.xPt,t.xPt+t.widthPt)&&Mw(t.xPt,e.xPt+e.widthPt)&&Mw(e.yPt,t.yPt+t.heightPt)&&Mw(t.yPt,e.yPt+e.heightPt)}function Pw(e,t){return jw(e.xPt,t.xPt)&&jw(e.yPt,t.yPt)&&jw(t.xPt+t.widthPt,e.xPt+e.widthPt)&&jw(t.yPt+t.heightPt,e.yPt+e.heightPt)}function Fw(e,t){return jw(e.xPt,t.xPt)&&jw(t.xPt+t.widthPt,e.xPt+e.widthPt)}function Iw(e,t,n){return jw(e,n.yPt)&&jw(n.yPt+n.heightPt,t)}function Lw(e,t){return jw(e.yPt,t.yPt)&&jw(t.yPt+t.heightPt,e.yPt+e.heightPt)}function Rw(e,t){return e.xPt===t.xPt&&e.yPt===t.yPt&&e.widthPt===t.widthPt&&e.heightPt===t.heightPt}function zw(e,t){return e.a===t.a&&e.b===t.b&&e.c===t.c&&e.d===t.d&&e.e===t.e&&e.f===t.f}function Bw(e,t){let n=e.pageBorder;if(n===null)return;if(n.zOrder!==`front`&&n.zOrder!==`back`)throw new Z(`INVALID_REFERENCE`,`${t}.zOrder is invalid`);Dw(n.logicalToPhysical,`${t}.logicalToPhysical`);let r=mv(nv(e.section.textDirection),e.geometry).logicalToPhysical;if(!zw(n.logicalToPhysical,r))throw new Z(`INVALID_GEOMETRY`,`${t}.logicalToPhysical contradicts the page-start section`);if(!Array.isArray(n.segments)||n.segments.length===0)throw new Z(`INVALID_GEOMETRY`,`${t}.segments is empty`);n.segments.forEach((e,n)=>{let r=`${t}.segments[${n}]`;if(Tw(e.from,`${r}.from`),Tw(e.to,`${r}.to`),Cw(e.widthPt,`${r}.widthPt`),e.from.xPt!==e.to.xPt&&e.from.yPt!==e.to.yPt)throw new Z(`INVALID_GEOMETRY`,`${r} is not an axis-aligned page edge`);if(!/^#[0-9a-fA-F]{6}$/.test(e.color))throw new Z(`INVALID_REFERENCE`,`${r}.color is invalid`)})}function Vw(e,t,n){if(n.has(e))throw new Z(`INVALID_REFERENCE`,`duplicate retained node id ${e}`);n.add(e),t.add(e)}function Hw(e,t,n){if(Vw(e.id,t,n),e.kind===`paragraph`){e.drawings.forEach(e=>Hw(e,t,n)),e.textBoxes.forEach(e=>Hw(e,t,n));return}if(e.kind===`table`){e.rows.forEach(e=>{Vw(e.id,t,n),e.cells.forEach(e=>{Vw(e.id,t,n),e.blocks.forEach(e=>Hw(e.layout,t,n))})});return}if(e.kind===`note`){e.story.blocks.forEach(e=>Hw(e,t,n));return}e.kind===`textbox`&&e.story.blocks.forEach(e=>Hw(e,t,n))}function Uw(e,t){if(e.kind===`paragraph`){let n=_w(e.drawings.filter(e=>e.anchorLayer?.cellContainment===!0).map(e=>e.flowBounds));if(e.cellContainmentBounds&&Ew(e.cellContainmentBounds,`${t}.cellContainmentBounds`),n===null!=(e.cellContainmentBounds===void 0)||n&&e.cellContainmentBounds&&!Rw(n,e.cellContainmentBounds))throw new Z(`INVALID_GEOMETRY`,`${t}.cellContainmentBounds does not match its retained layoutInCell drawings`);let r=new Set;(e.anchorCollisions??[]).forEach((e,n)=>{let i=`${t}.anchorCollisions[${n}]`;if(e.occurrenceId.length===0||r.has(e.occurrenceId))throw new Z(`INVALID_REFERENCE`,`${i}.occurrenceId is empty or duplicated`);if(r.add(e.occurrenceId),Ew(e.bounds,`${i}.bounds`),e.horizontalOwnership!==`page`&&e.horizontalOwnership!==`host`||e.verticalOwnership!==`page`&&e.verticalOwnership!==`host`)throw new Z(`INVALID_REFERENCE`,`${i} has invalid axis ownership`)}),e.textBoxes.forEach((e,n)=>Uw(e,`${t}.textBoxes[${n}]`));return}if(e.kind===`table`){e.rows.forEach((e,n)=>e.cells.forEach((e,r)=>e.blocks.forEach((e,i)=>Uw(e.layout,`${t}.rows[${n}].cells[${r}].blocks[${i}]`))));return}e.kind===`textbox`&&e.story.blocks.forEach((e,n)=>Uw(e,`${t}.story.blocks[${n}]`))}function Ww(e,t){if(e.orientation===`upright-physical`&&!e.transform)throw new Z(`INVALID_GEOMETRY`,`${t} upright physical drawing is missing its logical transform`);if(e.transform)for(let n of[`a`,`b`,`c`,`d`,`e`,`f`])Cw(e.transform[n],`${t}.transform.${n}`);e.clip?.kind===`rect`&&Ew(e.clip.rect,`${t}.clip.rect`),e.clip?.kind===`polygon`&&e.clip.points.forEach((e,n)=>Tw(e,`${t}.clip.points[${n}]`)),e.commands.forEach((e,n)=>{let r=`${t}.commands[${n}]`;if(e.kind!==`noop`){if(e.kind===`drawingml-shape`){Aw(e,r);return}if(e.kind===`drawingml-image-fill`){if(Aw(e,r),e.resourceKey.length===0)throw new Z(`INVALID_GEOMETRY`,`${r}.resourceKey is empty`);if(e.fillRect)for(let t of[`l`,`t`,`r`,`b`])Cw(e.fillRect[t],`${r}.fillRect.${t}`);return}if(Ew(e.rect,`${r}.rect`),e.kind===`stroke-rect`&&(Cw(e.lineWidthPt,`${r}.lineWidthPt`),e.dashPt.forEach((e,t)=>Cw(e,`${r}.dashPt[${t}]`))),e.kind===`text`&&(Cw(e.fontSizePt,`${r}.fontSizePt`),Cw(e.fontWeight,`${r}.fontWeight`)),e.kind===`watermark-text`){if(Ew(e.sourceBounds,`${r}.sourceBounds`),e.sourceBounds.widthPt<=0||e.sourceBounds.heightPt<=0)throw new Z(`INVALID_GEOMETRY`,`${r}.sourceBounds must have positive extents`);if(Cw(e.opacity,`${r}.opacity`),Cw(e.rotationDeg,`${r}.rotationDeg`),Cw(e.fontSizePt,`${r}.fontSizePt`),e.opacity<0||e.opacity>1||e.fontSizePt<=0)throw new Z(`INVALID_GEOMETRY`,`${r} has invalid textPath paint metrics`);e.spans.forEach((e,t)=>{Cw(e.advancePt,`${r}.spans[${t}].advancePt`),Cw(e.fontWeight,`${r}.spans[${t}].fontWeight`)})}}})}function Gw(e){Sw(e,`layout`),e.diagnostics.forEach((e,t)=>{let n=`diagnostics[${t}]`;if(!bw.has(e.code))throw new Z(`INVALID_REFERENCE`,`${n}.code is unknown`);if(e.severity!==`warning`&&e.severity!==`error`)throw new Z(`INVALID_REFERENCE`,`${n}.severity is unknown`);if(typeof e.message!=`string`||e.message.length===0)throw new Z(`INVALID_REFERENCE`,`${n}.message is empty`);if(e.source!==void 0&&(!xw.has(e.source.story)||typeof e.source.storyInstance!=`string`||e.source.storyInstance.length===0||!Array.isArray(e.source.path)||e.source.path.some(e=>!Number.isSafeInteger(e)||e<0)))throw new Z(`INVALID_REFERENCE`,`${n}.source is invalid`)});let t=new Set;e.pages.forEach((e,n)=>{if(!Number.isInteger(e.pageIndex)||e.pageIndex!==n)throw new Z(`INVALID_REFERENCE`,`pages[${n}] has invalid page index ${e.pageIndex}`);if(Ew(e.geometry,`pages[${n}].geometry`),Cw(e.geometry.contentTopPt,`pages[${n}].geometry.contentTopPt`),Cw(e.geometry.contentBottomPt,`pages[${n}].geometry.contentBottomPt`),e.geometry.widthPt<=0||e.geometry.heightPt<=0||e.geometry.contentTopPt<0||e.geometry.contentTopPt>e.geometry.contentBottomPt||e.geometry.contentBottomPt>e.geometry.heightPt)throw new Z(`INVALID_GEOMETRY`,`pages[${n}] has invalid effective page edges`);Bw(e,`pages[${n}].pageBorder`);let r=new Map;if(e.flowDomains.forEach((e,t)=>{if(Ew(e.logicalBounds,`pages[${n}].flowDomains[${t}].logicalBounds`),Ew(e.physicalBounds,`pages[${n}].flowDomains[${t}].physicalBounds`),r.has(e.id))throw new Z(`INVALID_REFERENCE`,`duplicate flow domain ${e.id}`);r.set(e.id,e)}),e.parityBlank&&(e.flowDomains.length>0||(e.sectionRegions?.length??0)>0||(e.columnSeparators?.length??0)>0||H_(e).length>0||e.layers.roots.length>0||e.readingOrder.length>0||(e.bookmarkStarts?.length??0)>0))throw new Z(`INVALID_REFERENCE`,`pages[${n}] parity blank retains page content`);let i=new Set;if(e.sectionOccurrenceId!==void 0){if(e.sectionOccurrenceId.length===0)throw new Z(`INVALID_REFERENCE`,`pages[${n}] has an empty section occurrence id`);i.add(e.sectionOccurrenceId)}let a=new Map;if(e.sectionRegions){let t=new Set,o=new Set,s=new Map,c=[],l;if(e.sectionRegions.forEach((u,d)=>{let f=`pages[${n}].sectionRegions[${d}]`;if(u.id.length===0||t.has(u.id))throw new Z(`INVALID_REFERENCE`,`${f} has an invalid region id`);if(t.add(u.id),u.sectionOccurrenceId.length===0)throw new Z(`INVALID_REFERENCE`,`${f} has an empty section occurrence id`);if(o.has(u.sectionOccurrenceId))throw new Z(`INVALID_REFERENCE`,`${f} has a duplicate section occurrence id`);o.add(u.sectionOccurrenceId),i.add(u.sectionOccurrenceId),kw(u.coordinateSpace,`${f}.coordinateSpace`);let p=u.coordinateSpace.writingMode;if(l!==void 0&&l!==p)throw new Z(`INVALID_GEOMETRY`,`${f} mixes coordinate systems on one physical page`);l=p;let m;try{m=nv(u.section.textDirection)}catch(e){throw new Z(`INVALID_GEOMETRY`,`${f}.section.textDirection is unsupported: ${e.message}`)}if(p!==m)throw new Z(`INVALID_GEOMETRY`,`${f} writing mode contradicts its section text direction`);let h=sv(e.geometry,p),g=cv({widthPt:u.section.geometry.pageWidth,heightPt:u.section.geometry.pageHeight},p);if(g.widthPt!==e.geometry.widthPt||g.heightPt!==e.geometry.heightPt)throw new Z(`INVALID_GEOMETRY`,`${f} section geometry does not match the upright physical page`);if(Cw(u.blockStartPt,`${f}.blockStartPt`),Cw(u.blockEndPt,`${f}.blockEndPt`),u.columnFlowDirection!==`ltr`&&u.columnFlowDirection!==`rtl`)throw new Z(`INVALID_GEOMETRY`,`${f} has an invalid column flow direction`);let _=u.section.sectionBidi===!0?`rtl`:`ltr`;if(u.columnFlowDirection!==_)throw new Z(`INVALID_GEOMETRY`,`${f} column flow direction contradicts its section bidi`);if(u.blockStartPt<0||u.blockEndPt<u.blockStartPt||u.blockEndPt>h.heightPt)throw new Z(`INVALID_GEOMETRY`,`${f} has an invalid block interval`);let v=mv(u.coordinateSpace.writingMode,e.geometry);if(!zw(u.coordinateSpace.logicalToPhysical,v.logicalToPhysical)||!zw(u.coordinateSpace.physicalToLogical,v.physicalToLogical))throw new Z(`INVALID_GEOMETRY`,`${f} has an invalid coordinate transform`);let y=u.columnIndexes;if(u.flowDomainIds.length!==y.length||y.some((e,t)=>!Number.isInteger(e)||e<0||e>=u.section.columns.length||t>0&&e<=y[t-1]))throw new Z(`INVALID_GEOMETRY`,`${f} columns contradict its section`);let b=0;u.flowDomainIds.forEach((t,n)=>{let i=r.get(t);if(!i)throw new Z(`INVALID_REFERENCE`,`${f} references missing flow domain ${t}`);if(i.kind!==`body`)throw new Z(`INVALID_REFERENCE`,`${f} owns non-body flow domain ${t}`);s.set(t,(s.get(t)??0)+1),a.set(t,u);let o=i.logicalBounds,l=u.section.columns[y[n]];if(o.widthPt<=0||o.heightPt<0||o.yPt!==u.blockStartPt||o.heightPt!==u.blockEndPt-u.blockStartPt||o.xPt<0||o.xPt<b||o.xPt+o.widthPt>h.widthPt||l===void 0||o.xPt!==l.xPt||o.widthPt!==l.wPt)throw new Z(`INVALID_GEOMETRY`,`${t} is not the section column's non-negative logical region`);if(b=o.xPt+o.widthPt,!Rw(fv(u.coordinateSpace.logicalToPhysical,i.logicalBounds),i.physicalBounds))throw new Z(`INVALID_GEOMETRY`,`${t} physical bounds do not match its section region transform`);if(!Pw(e.geometry,i.physicalBounds))throw new Z(`INVALID_GEOMETRY`,`${t} physical bounds leave the upright physical page`);if(c.some(e=>e.regionId!==u.id&&Nw(e.bounds,i.physicalBounds)))throw new Z(`INVALID_GEOMETRY`,`${t} overlaps a body flow domain owned by another section region`);c.push({regionId:u.id,bounds:i.physicalBounds})})}),e.flowDomains.filter(e=>e.kind===`body`).forEach(e=>{if(s.get(e.id)!==1)throw new Z(`INVALID_REFERENCE`,`${e.id} has invalid section region ownership`)}),!e.parityBlank&&e.sectionRegions.length>0){let t=e.sectionRegions[0];if(e.sectionOccurrenceId!==t.sectionOccurrenceId)throw new Z(`INVALID_REFERENCE`,`pages[${n}] page-start section occurrence does not match its first region`);if(!ew(e.section,t.section))throw new Z(`INVALID_GEOMETRY`,`pages[${n}] page-start section facts do not match its first region`)}}let o=gv(e.sectionRegions??[]);if(!Array.isArray(e.columnSeparators)||e.columnSeparators.length!==o.length||e.columnSeparators.some((e,t)=>{let n=o[t];return n===void 0||e.start.xPt!==n.start.xPt||e.start.yPt!==n.start.yPt||e.end.xPt!==n.end.xPt||e.end.yPt!==n.end.yPt}))throw new Z(`INVALID_GEOMETRY`,`pages[${n}].columnSeparators contradict the retained section regions`);let s=new Map(e.sectionRegions.map(e=>[e.id,e]));for(let t of e.flowDomains){if(t.kind!==`footnote`&&t.kind!==`endnote`)continue;let n=t.sectionRegionId?s.get(t.sectionRegionId):e.sectionRegions[0];if(!n)throw new Z(`INVALID_REFERENCE`,`${t.id} references missing page story region ${t.sectionRegionId??`<default>`}`);if(!Rw(fv(n.coordinateSpace.logicalToPhysical,t.logicalBounds),t.physicalBounds))throw new Z(`INVALID_GEOMETRY`,`${t.id} physical bounds do not match the page story transform`);a.set(t.id,n)}for(let t of e.flowDomains)if(!a.has(t.id)&&!Rw(t.logicalBounds,t.physicalBounds))throw new Z(`INVALID_GEOMETRY`,`${t.id} has unequal logical and physical bounds without a section region`);if(e.pageNumber){if(Cw(e.pageNumber.displayNumber,`pages[${n}].pageNumber.displayNumber`),!Number.isInteger(e.pageNumber.displayNumber))throw new Z(`INVALID_GEOMETRY`,`pages[${n}] page number is not an integer`);if(e.pageNumber.format.length===0||!i.has(e.pageNumber.sectionOccurrenceId))throw new Z(`INVALID_REFERENCE`,`pages[${n}] has an invalid page number section owner`)}let c=[];try{U_(e)}catch(e){throw e instanceof z_?new Z(`INVALID_REFERENCE`,e.message):e}let l=new Map,u=new Set;H_(e).forEach(({node:e},i)=>{let o=`pages[${n}].nodes[${i}]`;l.set(e.id,e),Hw(e,u,t),Uw(e,o),Ew(e.flowBounds,`${o}.flowBounds`),Ew(e.inkBounds,`${o}.inkBounds`),e.clipBounds&&Ew(e.clipBounds,`${o}.clipBounds`),Cw(e.advancePt,`${o}.advancePt`),e.kind===`drawing`&&Ww(e,o);let s=r.get(e.flowDomainId);if(!s)throw new Z(`INVALID_REFERENCE`,`${e.id} references missing flow domain ${e.flowDomainId}`);if(e.ordinaryFlow&&s.kind===`body`&&s.logicalBounds.heightPt===0)throw new Z(`FLOW_DOMAIN_INVASION`,`${e.id} claims ordinary flow in an empty body domain`);if(!e.ordinaryFlow)return;let d=s.kind===`body`?a.get(s.id):void 0;if(s.kind===`body`){if(!d)throw new Z(`INVALID_REFERENCE`,`${e.id} references a body flow domain without a section region`);if(e.flowBounds.yPt+e.flowBounds.heightPt>d.blockEndPt)throw new Z(`BOTTOM_MARGIN_INVASION`,`${e.id} crosses logical block end`)}if(!(d?Iw(d.blockStartPt,d.blockEndPt,e.flowBounds)&&(e.kind===`table`||Fw(s.logicalBounds,e.flowBounds)):e.kind===`table`?Lw(s.logicalBounds,e.flowBounds):Pw(s.logicalBounds,e.flowBounds)))throw new Z(`FLOW_DOMAIN_INVASION`,`${e.id} crosses flow domain ${s.id}`);c.push(e)});let d=new Set;if(e.readingOrder.forEach(e=>{if(!l.has(e)||d.has(e))throw new Z(`INVALID_REFERENCE`,`invalid reading-order reference ${e}`);d.add(e)}),e.bookmarkStarts!==void 0){let t=lw(e,new Map([...a].map(([e,t])=>[e,t.sectionOccurrenceId]))),r=t.every(e=>e.sectionOccurrenceId.length>0&&i.has(e.sectionOccurrenceId)),o=e.bookmarkStarts.length===t.length&&e.bookmarkStarts.every((e,n)=>{let r=t[n];return r!==void 0&&e.name===r.name&&e.nodeId===r.nodeId&&e.sectionOccurrenceId===r.sectionOccurrenceId});if(!r||!o)throw new Z(`INVALID_REFERENCE`,`pages[${n}] bookmark metadata does not match its retained graph (invalid bookmark node or ownership)`)}for(let e=0;e<c.length;e+=1)for(let t=e+1;t<c.length;t+=1){let n=c[e],i=c[t];if(!n||!i)continue;let a=r.get(n.flowDomainId),o=r.get(i.flowDomainId),s=n.flowDomainId===i.flowDomainId,l=a?.kind===`body`&&(o?.kind===`footnote`||o?.kind===`endnote`)||o?.kind===`body`&&(a?.kind===`footnote`||a?.kind===`endnote`),u=a?.id!==o?.id&&(a?.kind===`footnote`||a?.kind===`endnote`)&&(o?.kind===`footnote`||o?.kind===`endnote`);if((s||l||u)&&Nw(n.flowBounds,i.flowBounds))throw new Z(`FLOW_OVERLAP`,`${n.id} overlaps ${i.id}`)}})}function Kw(e){try{Gw(e)}catch(e){throw e instanceof Z?e:e instanceof TypeError||e instanceof RangeError?new Z(`INVALID_GEOMETRY`,e.message):e}}function qw(e,t){if(typeof e!=`object`||!e||t.has(e))return e;t.add(e);for(let n of Object.values(e))qw(n,t);return Object.freeze(e)}const Jw=new WeakSet,Yw=new WeakSet;function Xw(e){if(Jw.has(e))return e;let t=qw(e,new WeakSet);return Jw.add(t),t}function Zw(e){return Jw.has(e)?e:(Sw(e,`layout`),Xw(e))}function Qw(e){if(Yw.has(e))return e;Kw(e);let t=Xw(e);return Yw.add(t),t}function $w(e,t){if(!Number.isInteger(t)||t<0||t>=e.pages.length)throw RangeError(`Page index ${t} out of range (count: ${e.pages.length})`);return e.pages[t]}var eT=class{#e;#t;#n=new Map;#r;#i;#a=null;constructor(e,t,n){this.#e=e,this.#r=Object.freeze({...t}),this.#i=Y_(this.#r,this.#e),this.#t=n}get defaultLayout(){return this.layoutFor(this.#r)}layoutFor(e){return this.select(e).layout}select(e){let t=Object.isFrozen(e)?e:Object.freeze({...e}),n=Y_(t,this.#e),r=this.#n.get(n);return r||(r=Zw(this.#t(t)),n!==this.#i&&(this.#a!==null&&this.#a!==n&&this.#n.delete(this.#a),this.#a=n),this.#n.set(n,r)),Object.freeze({key:n,options:t,layout:r})}selectPage(e,t){let n=this.select(e);return Object.freeze({...n,page:$w(n.layout,t)})}isDefault(e){return Y_(e,this.#e)===this.#i}};function tT(e){let{services:t,defaultCurrentDateMs:n,buildLayout:r}=e,i=J_({defaultCurrentDateMs:n}),a=e.source.fatalParse,o=a===null?null:K_(a.message,a.pageSize,t.text),s=new eT(t,i,o===null?r:()=>o);return d_(t,s),Object.freeze({store:s,defaultOptions:i})}function nT(e,t,n){let r=f_(e);if(!r)throw Error(`Document layout variant store is not attached to the supplied services`);return r.selectPage(J_(t),n)}function rT(e,t){return Object.freeze({a:e.a*t.a+e.c*t.b,b:e.b*t.a+e.d*t.b,c:e.a*t.c+e.c*t.d,d:e.b*t.c+e.d*t.d,e:e.a*t.e+e.c*t.f+e.e,f:e.b*t.e+e.d*t.f+e.f})}function iT(e){return Object.freeze({a:e,b:0,c:0,d:e,e:0,f:0})}function aT(e,t){return Object.freeze({a:1,b:0,c:0,d:1,e,f:t})}function oT(e,t){return{xPt:e.a*t.xPt+e.c*t.yPt+e.e,yPt:e.b*t.xPt+e.d*t.yPt+e.f}}function sT(e,t){let n=e.a*e.d-e.b*e.c;if(!Number.isFinite(n)||n===0)return null;let r=t.xPt-e.e,i=t.yPt-e.f,a={xPt:(e.d*r-e.c*i)/n,yPt:(-e.b*r+e.a*i)/n};return Number.isFinite(a.xPt)&&Number.isFinite(a.yPt)?a:null}function cT(e,t){let n=e.a*e.d-e.b*e.c;if(!Number.isFinite(n)||n===0)return null;let r={xPt:(e.d*t.xPt-e.c*t.yPt)/n,yPt:(-e.b*t.xPt+e.a*t.yPt)/n};return Number.isFinite(r.xPt)&&Number.isFinite(r.yPt)?r:null}const lT=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0}),uT=Object.freeze([]);function dT(e){let t=new Map(e.sectionRegions.map(e=>[e.id,e])),n=new Map;for(let t of e.sectionRegions)for(let e of t.flowDomainIds)n.set(e,t);for(let r of e.flowDomains){if(r.kind!==`footnote`&&r.kind!==`endnote`)continue;let i=r.sectionRegionId?t.get(r.sectionRegionId):e.sectionRegions[0];if(!i)throw Error(`${r.id} references missing page story region ${r.sectionRegionId??`<default>`}`);n.set(r.id,i)}return n}function fT(e,t){return t.coordinateSpace===`upright-physical`?lT:e.get(t.node.flowDomainId)?.coordinateSpace.logicalToPhysical??lT}function pT(e,t){let n=e.rootPointToPage.get(t.rootNodeId);if(!n)throw Error(`Drawing entry ${t.node.id} references missing root ${t.rootNodeId}`);let r=n,i=[];for(let e of t.frames)e.kind===`transform`?r=rT(r,e.transform):i.push(Object.freeze({bounds:e.clip,pointToPage:r}));return{pointToPage:r,layoutTranslationPt:t.layoutTranslationPt,rootNodeId:t.rootNodeId,paintOrderIndex:e.drawingPaintOrder.get(t.node.id)??-1,clips:Object.freeze(i)}}function mT(e,t){return t?{...e,clips:Object.freeze([...e.clips,Object.freeze({bounds:t,pointToPage:e.pointToPage})])}:e}function hT(e,t,n){let r=t.xPt-e.flowBounds.xPt,i=t.yPt-e.flowBounds.yPt;return{...n,pointToPage:rT(n.pointToPage,aT(r,i)),layoutTranslationPt:{xPt:n.layoutTranslationPt.xPt+r,yPt:n.layoutTranslationPt.yPt+i}}}function gT(e,t){return(t.textBoxIds??[]).flatMap(t=>{let n=e.get(t);return n?[n]:[]})}function _T(e,t,n){if(n.emittedTextBoxes.has(e.id))return;n.emittedTextBoxes.add(e.id);let r=mT({...t,pointToPage:rT(t.pointToPage,e.transform)},e.clipBounds);for(let t of e.story.blocks)ST(t,r,n)}function vT(e,t,n,r){let i=gT(e,t),a=yT(t,n,r);r.collectDrawings&&!r.emittedDrawings.has(t.id)&&(r.emittedDrawings.add(t.id),r.drawings.push(Object.freeze({drawing:t,textBoxes:i,pointToPage:a.pointToPage,clips:a.clips,paintOrderIndex:a.paintOrderIndex,sourceOrder:r.drawingSourceOrder++})));for(let e of i)_T(e,a,r)}function yT(e,t,n){let r=n.drawingEntries.get(e.id),i=t;r&&r.rootNodeId===t.rootNodeId&&(i=pT(n,r));let a=i.layoutTranslationPt,o=e.anchorLayer?.horizontalOwnership===`page`?-a.xPt:0,s=e.anchorLayer?.verticalOwnership===`page`?-a.yPt:0,c=o===0&&s===0?i:{...i,pointToPage:rT(i.pointToPage,aT(o,s))};if(e.orientation===`upright-physical`){if(!e.transform)throw Error(`Upright physical drawing ${e.id} is missing its logical transform`);c={...c,pointToPage:rT(c.pointToPage,e.transform)}}return c}function bT(e,t,n){let r=mT(t,e.clipBounds);if(n.collectTextRuns)for(let r of e.lines)for(let i of r.placements)i.kind===`text`&&n.runs.push(Object.freeze({placement:i,pointToPage:t.pointToPage,source:e.source,...e.paragraphId===void 0?{}:{paragraphId:e.paragraphId}}));let i=new Map(e.textBoxes.map(e=>[e.id,e])),a=new Set,o=e.drawings.map((e,t)=>{let n=e.source.path.at(-1);if(n===void 0||!Number.isSafeInteger(n)||n<0)throw Error(`Drawing ${e.id} has no retained paragraph run index`);return{drawing:e,index:t,runIndex:n}}).sort((e,t)=>e.runIndex-t.runIndex||e.index-t.index),s=n.collectDrawings?e.lines.flatMap(e=>e.placements.flatMap((e,t)=>e.kind!==`resource`||e.resourceKind!==`image`&&e.resourceKind!==`chart`||e.sourceRunIndex===void 0?[]:[{placement:e,index:t,runIndex:e.sourceRunIndex}])):[];for(let{drawing:e}of o)for(let t of e.textBoxIds??[])a.add(t);let c=[...o.map(e=>({kind:`drawing`,...e})),...s.map(e=>({kind:`resource`,...e}))].sort((e,t)=>e.runIndex-t.runIndex||e.index-t.index);for(let t of c){if(t.kind===`drawing`){vT(i,t.drawing,r,n);continue}n.collectDrawings&&n.inlineResources.push(Object.freeze({placement:t.placement,source:Object.freeze({...e.source,path:Object.freeze([...e.source.path,t.runIndex])}),pointToPage:r.pointToPage,clips:r.clips,paintOrderIndex:r.paintOrderIndex,sourceOrder:n.drawingSourceOrder++}))}for(let t of e.textBoxes)a.has(t.id)||_T(t,r,n)}function xT(e,t,n){let r=mT(t,e.clipBounds);for(let t of e.rows)for(let e of t.cells){let t=`visualMergeOwnership`in e&&e.visualMergeOwnership===`continuation`;if(e.verticalMerge===`continue`&&!t)continue;let i=mT(r,e.clipBounds);for(let t of e.blocks){let r=t.layout;ST(r,hT(r,{xPt:e.contentBounds.xPt+(r.kind===`table`?r.flowBounds.xPt:0),yPt:e.flowBounds.yPt+t.offsetPt+(r.kind===`table`?r.flowBounds.yPt:0)},i),n)}}for(let i of e.resolvedFloatingTables??[])ST(i.child,hT(i.child,{xPt:i.xPt-t.layoutTranslationPt.xPt,yPt:i.yPt-t.layoutTranslationPt.yPt},r),n)}function ST(e,t,n){switch(e.kind){case`paragraph`:bT(e,t,n);return;case`table`:xT(e,t,n);return;case`note`:for(let r of e.story.blocks)ST(r,mT(t,e.story.clipBounds),n);return;case`textbox`:_T(e,t,n);return;case`drawing`:{let r=n.drawingEntries.get(e.id);vT(new Map((r?.textBoxes??[]).map(e=>[e.id,e])),e,t,n);return}default:throw Error(`Unknown text-index node: ${String(e)}`)}}function CT(e,t,n){let r=e.pages[t];if(!r)throw RangeError(`Page index ${t} is out of range`);let i=new Map(r.layers.roots.map(e=>[e.node.id,e])),a=dT(r),o=new Map(r.layers.roots.map(e=>[e.node.id,fT(a,e)])),s=new Map,c=new Map,l=new Map;for(let[e,t]of r.layers.paintOrder.entries())t.kind===`drawing`&&s.set(t.node.id,t),t.kind===`drawing`?c.set(t.node.id,e):l.set(t.node.id,e);let u={...n,drawingEntries:s,rootPointToPage:o,rootPaintOrder:l,drawingPaintOrder:c,emittedTextBoxes:new Set,emittedDrawings:new Set,runs:[],drawings:[],inlineResources:[],drawingSourceOrder:0};for(let e of r.readingOrder){let t=i.get(e);if(!t)throw Error(`Reading-order node ${e} is not a page root`);let n=o.get(e);if(!n)throw Error(`Reading-order node ${e} has no page projection`);ST(t.node,{pointToPage:n,layoutTranslationPt:{xPt:0,yPt:0},rootNodeId:t.node.id,paintOrderIndex:l.get(t.node.id)??-1,clips:uT},u)}return u}function wT(e,t){return Object.freeze(CT(e,t,{collectTextRuns:!0,collectDrawings:!1}).runs)}function TT(e,t){let n=CT(e,t,{collectTextRuns:!1,collectDrawings:!0}),r=[...n.drawings,...n.inlineResources];return r.sort((e,t)=>e.paintOrderIndex-t.paintOrderIndex||e.sourceOrder-t.sourceOrder),Object.freeze(r)}function ET(e){let t=Math.hypot(e.a,e.b),n=Math.hypot(e.c,e.d),r=e.a/t,i=e.b/t,a=e.c/n,o=e.d/n;if(!(r===1&&i===0&&a===0&&o===1))return r===0&&i===1&&a===-1&&o===0?`rotate(90deg)`:r===0&&i===-1&&a===1&&o===0?`rotate(-90deg)`:`matrix(${r}, ${i}, ${a}, ${o}, 0, 0)`}function DT(e,t){let{placement:n}=e,r=oT(t,n.bounds),i=Math.hypot(t.a,t.b),a=Math.hypot(t.c,t.d),o=ET(t),s=n.paintOps[0]?.letterSpacingPt??0;return{source:{story:e.source.story,storyInstance:e.source.storyInstance,path:[...e.source.path]},...e.paragraphId===void 0?{}:{paragraphId:e.paragraphId},text:n.text,x:r.xPt,y:r.yPt,w:n.bounds.widthPt*i,h:n.bounds.heightPt*a,fontSize:n.fontSizePt*a,font:W(n.fontRoute,n.fontSizePt*a,n.fontWeight,n.fontStyle),...s===0?{}:{letterSpacingPx:s*i},...o?{transform:o}:{},...n.hyperlink?{hyperlink:n.hyperlink}:{},...n.tateChuYoko?{eastAsianVert:!0}:{}}}function OT(e,t,n){if(!Number.isFinite(n.scale)||n.scale<=0)throw RangeError(`Text projection scale must be positive: ${n.scale}`);let r=iT(n.scale);return wT(e,t).map(e=>DT(e,rT(r,e.pointToPage)))}function kT(e,t,n){let r=nT(e,{currentDate:n.currentDate,defaultCurrentDateMs:n.defaultCurrentDateMs},t),i=(n.width??r.page.geometry.widthPt*1.3333333333333333)/r.page.geometry.widthPt;return OT(r.layout,t,{scale:i})}function AT(e,t,n){return`${e}${t?`|clr:${t}`:``}${n?`|duo:${n.clr1}:${n.clr2}`:``}`}async function jT(e,t){let n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=new OffscreenCanvas(e.width,e.height),o=a.getContext(`2d`);if(!o)throw Error(`2D canvas is unavailable for image color replacement`);o.drawImage(e,0,0);let s=o.getImageData(0,0,e.width,e.height);for(let e=0;e<s.data.length;e+=4)s.data[e]===n&&s.data[e+1]===r&&s.data[e+2]===i&&(s.data[e+3]=0);return o.putImageData(s,0,0),createImageBitmap(a)}async function MT(e,t,n,r,i=0,a=0,o){let s=await el(e,t,r,{widthPt:i,heightPt:a,suppressBoundaryFrame:!0});return s?!n&&!o?s:$c(`docx-color-effects`,AT(e,n,o),r,async()=>{let e=s;try{if(n&&(e=await jT(e,n)),o){let{w:t,h:n}=ol(e);if(t>0&&n>0){let r=e;e=await ml(e,o,{width:t,height:n}),r!==s&&e!==r&&Wc(r)}}return{bitmap:e,owned:e!==s}}catch(t){throw e!==s&&Wc(e),t}}):null}function NT(e){let t=new Map,n=e.filter(e=>e.kind===`image`||e.kind===`picture-bullet`).sort((e,t)=>(e.documentOrder??2**53-1)-(t.documentOrder??2**53-1));for(let e of n){let n=ll(e.mimeType,e.srcRect,e.intrinsicSize.widthPt,e.intrinsicSize.heightPt),r={imagePath:e.partPath,mimeType:e.mimeType,...e.svgImagePath===void 0?{}:{svgImagePath:e.svgImagePath},...e.colorReplaceFrom===void 0?{}:{colorReplaceFrom:e.colorReplaceFrom},...e.duotone===void 0?{}:{duotone:e.duotone},widthPt:n.widthPt,heightPt:n.heightPt,hasCrop:e.srcRect!=null},i=AT(r.imagePath,r.colorReplaceFrom,r.duotone),a=t.get(i);a?(a.widthPt=Math.max(a.widthPt,r.widthPt),a.heightPt=Math.max(a.heightPt,r.heightPt),a.hasCrop||=r.hasCrop):t.set(i,r)}return[...t.values()]}async function PT(e,t){if(!t)return new Map;let n=await Promise.all(NT(e).map(async e=>{let n=e.mimeType===`image/svg+xml`,r={svgImagePath:e.svgImagePath,srcRect:e.hasCrop||null},i;if(hl(r))try{i=await il(r.svgImagePath,t)}catch(r){let a=n?await il(e.imagePath,t):await MT(e.imagePath,e.mimeType,e.colorReplaceFrom,t,e.widthPt,e.heightPt,e.duotone);if(!a)throw r;i=a}else i=n?await il(e.imagePath,t):await MT(e.imagePath,e.mimeType,e.colorReplaceFrom,t,e.widthPt,e.heightPt,e.duotone);return i==null?null:[AT(e.imagePath,e.colorReplaceFrom,e.duotone),i]}));return new Map(n.filter(e=>e!==null))}function FT(e,t){return Math.round(e*t)/t}function IT(e,t,n){let r=e*t;return(n%2==0?Math.round(r):Math.round(r-.5)+.5)/t}function LT(e,t,n){let r=t*n,i=Math.max(1,Math.round(.5*t)),a=Math.max(1,Math.round(i*n)),o=a/r;if(e.start.xPt===e.end.xPt){let t=IT(e.start.xPt,r,a);return{segment:{start:{xPt:t,yPt:FT(e.start.yPt,r)},end:{xPt:t,yPt:FT(e.end.yPt,r)}},widthPt:o}}if(e.start.yPt===e.end.yPt){let t=IT(e.start.yPt,r,a);return{segment:{start:{xPt:FT(e.start.xPt,r),yPt:t},end:{xPt:FT(e.end.xPt,r),yPt:t}},widthPt:o}}return{segment:e,widthPt:o}}function RT(e,t,n,r,i){if(r!==`upright-physical`){i.resources.paint(e,t,n,i.ctx);return}let{ctx:a}=i;a.save(),a.translate(n.xPt+n.widthPt/2,n.yPt+n.heightPt/2),a.rotate(-Math.PI/2),i.resources.paint(e,t,{xPt:-n.heightPt/2,yPt:-n.widthPt/2,widthPt:n.heightPt,heightPt:n.widthPt},a),a.restore()}function zT(e,t){for(let n of e.commands){if(n.kind===`noop`)continue;if(n.kind===`drawingml-shape`){Zo(t.ctx,n.plan,1);continue}if(n.kind===`drawingml-image-fill`){if(!t.resources)throw Error(`Missing retained resource painter for ${n.resourceKey}`);let{x:e,y:r,w:i,h:a}=n.plan.rect,o=n.fillRect??{l:0,t:0,r:0,b:0},s={xPt:e+o.l*i,yPt:r+o.t*a,widthPt:i*(1-o.l-o.r),heightPt:a*(1-o.t-o.b)};s.widthPt>0&&s.heightPt>0&&Uo(t.ctx,n.plan,()=>{Wo(t.ctx,n.plan),RT(n.resourceKey,`image`,s,void 0,t)}),Zo(t.ctx,n.plan,1);continue}if(n.kind===`resource`){if(!t.resources)throw Error(`Missing retained resource painter for ${n.resourceKey}`);RT(n.resourceKey,n.resourceKind,n.rect,n.orientation,t);continue}if(n.kind===`fill-rect`){t.ctx.fillStyle=n.fill,t.ctx.fillRect(n.rect.xPt,n.rect.yPt,n.rect.widthPt,n.rect.heightPt);continue}if(n.kind===`stroke-rect`){t.ctx.strokeStyle=n.stroke,t.ctx.lineWidth=n.lineWidthPt,t.ctx.setLineDash([...n.dashPt]),t.ctx.strokeRect(n.rect.xPt,n.rect.yPt,n.rect.widthPt,n.rect.heightPt),t.ctx.setLineDash([]);continue}if(n.kind===`watermark-text`){let e=Ln(n.fill,t.ctx,n.rect.xPt,n.rect.yPt,n.rect.widthPt,n.rect.heightPt);if(e===null)continue;t.ctx.save();let r=n.rect.xPt+n.rect.widthPt/2,i=n.rect.yPt+n.rect.heightPt/2;t.ctx.translate(r,i),n.rotationDeg!==0&&t.ctx.rotate(n.rotationDeg*Math.PI/180),n.fitShape?(t.ctx.scale(n.rect.widthPt/n.sourceBounds.widthPt,n.rect.heightPt/n.sourceBounds.heightPt),t.ctx.translate(-(n.sourceBounds.xPt+n.sourceBounds.widthPt/2),-(n.sourceBounds.yPt+n.sourceBounds.heightPt/2))):t.ctx.translate(n.rect.xPt-r-n.sourceBounds.xPt,n.rect.yPt-i-n.sourceBounds.yPt),t.ctx.globalAlpha*=n.opacity,t.ctx.fillStyle=e,t.ctx.textAlign=`left`,t.ctx.textBaseline=`alphabetic`;let a=0;for(let e of n.spans)t.ctx.font=W(e.fontRoute,n.fontSizePt,e.fontWeight,e.fontStyle),t.ctx.fillText(e.text,a,0),a+=e.advancePt;t.ctx.restore();continue}t.ctx.fillStyle=n.fill,t.ctx.font=W(n.fontRoute,n.fontSizePt,n.fontWeight,n.fontStyle),t.ctx.textAlign=n.align===`start`?`left`:n.align===`end`?`right`:`center`,t.ctx.textBaseline=n.baseline;let e=n.align===`start`?n.rect.xPt:n.align===`end`?n.rect.xPt+n.rect.widthPt:n.rect.xPt+n.rect.widthPt/2,r=n.baseline===`top`?n.rect.yPt:n.baseline===`bottom`?n.rect.yPt+n.rect.heightPt:n.rect.yPt+n.rect.heightPt/2;t.ctx.fillText(n.text,e,r)}}function BT(e,t,n){let r=e===`triple`,i=/^(thinThick|thickThin|thinThickThin)(Small|Medium|Large)Gap$/.exec(e);if(!r&&!i)return null;let a=r?[1,1,1]:i?.[1]===`thinThick`?[1,2]:i?.[1]===`thickThin`?[2,1]:[1,2,1],o=r||i?.[2]===`Small`?1:i?.[2]===`Medium`?2:3,s=t/(a.reduce((e,t)=>e+t,0)+o*(a.length-1)),c=a.map(e=>Math.max(1,Math.round(s*e*n))),l=Math.max(1,Math.round(s*o*n)),u=0;return{bands:c.map((e,t)=>{let n={offsetDev:u,widthDev:e};return u+=e+(t<c.length-1?l:0),n}),spanDev:u}}function VT(e){return[...e.bands].reverse().map(t=>({offsetDev:e.spanDev-t.offsetDev-t.widthDev,widthDev:t.widthDev}))}function HT(e,t,n){if(t.style!==`compound`)return!1;let r=n.pointToCss??iT(n.scale);if(r.b!==0||r.c!==0||r.a<=0||r.d<=0)return!1;let i=oT(r,{xPt:e.xPt,yPt:e.yPt}),a=oT(r,{xPt:e.xPt+e.widthPt,yPt:e.yPt+e.heightPt}),o=BT(t.authoredStyle,t.widthPt*r.d,n.dpr),s=BT(t.authoredStyle,t.widthPt*r.a,n.dpr);if(!o||!s||o.bands.length!==s.bands.length)return!1;let c=VT(o),l=VT(s),u=(e,t,i,a)=>{let o=[{xPt:e,yPt:t},{xPt:e+i,yPt:t},{xPt:e,yPt:t+a},{xPt:e+i,yPt:t+a}].map(e=>sT(r,e));if(o.some(e=>e===null))return!1;let s=o.filter(e=>e!==null),c=s.map(e=>e.xPt),l=s.map(e=>e.yPt);return n.ctx.fillRect(Math.min(...c),Math.min(...l),Math.max(...c)-Math.min(...c),Math.max(...l)-Math.min(...l)),!0},d=Math.round(i.xPt*n.dpr-s.spanDev/2),f=Math.round(a.xPt*n.dpr+s.spanDev/2),p=Math.round(i.yPt*n.dpr-o.spanDev/2),m=Math.round(a.yPt*n.dpr+o.spanDev/2);n.ctx.fillStyle=t.color;for(let e=0;e<c.length;e+=1){let t=c[e],r=l[e],i=d+r.offsetDev,a=f-r.offsetDev,o=p+t.offsetDev,s=m-t.offsetDev,h=i/n.dpr,g=a/n.dpr,_=o/n.dpr,v=s/n.dpr,y=r.widthDev/n.dpr,b=t.widthDev/n.dpr;if(!u(h,_,g-h,b)||!u(h,v-b,g-h,b)||!u(h,_,y,v-_)||!u(g-y,_,y,v-_))return!1}return n.ctx.setLineDash([]),!0}function UT(e){return 1/e.dpr}function WT(e,t,n=0){let r=n/t.scale,i=r>e.widthPt?{...e,widthPt:r,...typeof e.authoredStyle==`string`?{dashPatternPt:Object.freeze(Dn(e.authoredStyle,r))}:{}}:e,{ctx:a}=t;a.strokeStyle=i.color,a.lineWidth=i.widthPt,a.setLineDash(`dashPatternPt`in i&&i.dashPatternPt?[...i.dashPatternPt]:[]),a.beginPath();let o=`path`in i&&i.path?.length?i.path:[i.from,i.to],s=o.length===2&&(o[0].xPt===o[1].xPt||o[0].yPt===o[1].yPt),c=s&&o[0].yPt===o[1].yPt,l=s&&o[0].xPt===o[1].xPt,u=t.pointToCss??iT(t.scale),d=o.map(e=>oT(u,e)),f=s?o[1].xPt-o[0].xPt:0,p=s?o[1].yPt-o[0].yPt:0,m=u.a*f+u.c*p,h=u.b*f+u.d*p,g=s&&h===0,_=s&&m===0,v=c?Math.hypot(u.c,u.d):l?Math.hypot(u.a,u.b):0,y=i.style===`compound`&&s&&v>0?BT(i.authoredStyle,i.widthPt*v,t.dpr):null;if(y){a.fillStyle=i.color;let e=(e,t,n,r)=>{let i=[{xPt:e,yPt:t},{xPt:e+n,yPt:t},{xPt:e,yPt:t+r},{xPt:e+n,yPt:t+r}].map(e=>sT(u,e));if(i.some(e=>e===null))return;let o=i.filter(e=>e!==null),s=o.map(e=>e.xPt),c=o.map(e=>e.yPt);a.fillRect(Math.min(...s),Math.min(...c),Math.max(...s)-Math.min(...s),Math.max(...c)-Math.min(...c))},n=Math.round((g?d[0].yPt:d[0].xPt)*t.dpr-y.spanDev/2);for(let r of y.bands){let i=(n+r.offsetDev)/t.dpr,s=r.widthDev/t.dpr;if(g)e(Math.min(d[0].xPt,d[1].xPt),i,Math.abs(m),s);else if(_)e(i,Math.min(d[0].yPt,d[1].yPt),s,Math.abs(h));else{let e=(r.offsetDev-y.spanDev/2)/t.dpr/v,n=r.widthDev/t.dpr/v;c?a.fillRect(Math.min(o[0].xPt,o[1].xPt),o[0].yPt+e,Math.abs(o[1].xPt-o[0].xPt),n):a.fillRect(o[0].xPt+e,Math.min(o[0].yPt,o[1].yPt),n,Math.abs(o[1].yPt-o[0].yPt))}}a.setLineDash([]);return}if(i.style===`double`&&s&&v>0){if(a.fillStyle=i.color,g||_){let e=(e,t,n,r)=>{let i=[{xPt:e,yPt:t},{xPt:e+n,yPt:t},{xPt:e,yPt:t+r},{xPt:e+n,yPt:t+r}].map(e=>sT(u,e));if(i.some(e=>e===null))return;let o=i.filter(e=>e!==null),s=o.map(e=>e.xPt),c=o.map(e=>e.yPt);a.fillRect(Math.min(...s),Math.min(...c),Math.max(...s)-Math.min(...s),Math.max(...c)-Math.min(...c))},{railDev:n,gapDev:r,spanDev:o}=eu(i.widthPt*v,t.dpr),s=n/t.dpr;if(g){let i=Math.round(d[0].yPt*t.dpr-o/2),a=Math.min(d[0].xPt,d[1].xPt),c=Math.abs(d[1].xPt-d[0].xPt);e(a,i/t.dpr,c,s),e(a,(i+n+r)/t.dpr,c,s)}else{let i=Math.round(d[0].xPt*t.dpr-o/2),a=Math.min(d[0].yPt,d[1].yPt),c=Math.abs(d[1].yPt-d[0].yPt);e(i/t.dpr,a,s,c),e((i+n+r)/t.dpr,a,s,c)}}else{let{railDev:e,gapDev:n,spanDev:r}=eu(i.widthPt*v,t.dpr),s=e/t.dpr/v,l=n/t.dpr/v,u=r/t.dpr/v;if(c){let e=Math.min(o[0].xPt,o[1].xPt),t=Math.abs(o[1].xPt-o[0].xPt);a.fillRect(e,o[0].yPt-u/2,t,s),a.fillRect(e,o[0].yPt-u/2+s+l,t,s)}else{let e=Math.min(o[0].yPt,o[1].yPt),t=Math.abs(o[1].yPt-o[0].yPt);a.fillRect(o[0].xPt-u/2,e,s,t),a.fillRect(o[0].xPt-u/2+s+l,e,s,t)}}a.setLineDash([]);return}let b=cT(u,_&&v>0?{xPt:$l(d[0].xPt,i.widthPt*v,t.dpr),yPt:0}:g&&v>0?{xPt:0,yPt:$l(d[0].yPt,i.widthPt*v,t.dpr)}:{xPt:0,yPt:0})??{xPt:0,yPt:0},x=o[0];a.moveTo(x.xPt+b.xPt,x.yPt+b.yPt);for(let e of o.slice(1))a.lineTo(e.xPt+b.xPt,e.yPt+b.yPt);let S=i.style===`wavy`&&o.length>2;S&&(a.save(),a.lineJoin=`bevel`),a.stroke(),S&&a.restore(),a.setLineDash([])}function GT(e,t){return n=>()=>{e.save();try{t(),n()}finally{e.restore()}}}function KT(e,t){let n=t.pointToCss??iT(t.scale);if(n.b!==0||n.c!==0)return e;let r=[{xPt:e.xPt,yPt:e.yPt},{xPt:e.xPt+e.widthPt,yPt:e.yPt},{xPt:e.xPt,yPt:e.yPt+e.heightPt},{xPt:e.xPt+e.widthPt,yPt:e.yPt+e.heightPt}].map(e=>oT(n,e)),i=r.map(e=>e.xPt),a=r.map(e=>e.yPt),o=Math.floor(Math.min(...i)*t.dpr)/t.dpr,s=Math.floor(Math.min(...a)*t.dpr)/t.dpr,c=Math.ceil(Math.max(...i)*t.dpr)/t.dpr,l=Math.ceil(Math.max(...a)*t.dpr)/t.dpr,u=[{xPt:o,yPt:s},{xPt:c,yPt:s},{xPt:o,yPt:l},{xPt:c,yPt:l}].map(e=>sT(n,e));if(u.some(e=>e===null))return e;let d=u.filter(e=>e!==null),f=d.map(e=>e.xPt),p=d.map(e=>e.yPt);return{xPt:Math.min(...f),yPt:Math.min(...p),widthPt:Math.max(...f)-Math.min(...f),heightPt:Math.max(...p)-Math.min(...p)}}function qT(e,t,n,r=!0){let i=t.xPt-e.flowBounds.xPt,a=t.yPt-e.flowBounds.yPt,o=n.layoutTranslationPt??{xPt:0,yPt:0},s=rT(n.pointToCss??iT(n.scale),aT(i,a)),c=GT(n.ctx,()=>n.ctx.translate(i,a)),l={...n,pointToCss:s,layoutTranslationPt:{xPt:o.xPt+i,yPt:o.yPt+a}};c(()=>{e.kind===`paragraph`?uE(e,l):ZT(e,l,e.resolvedFloatingTables??[],r)})()}function JT(e,t){let n=UT(t),r=new Set;for(let n of e.compoundBorderFrames??[])HT(n.bounds,n.border,t)&&n.segmentIndexes.forEach(e=>r.add(e));e.borders.forEach((e,i)=>{r.has(i)||WT(e,t,n)})}function YT(e,t,n){let r=t.xPt-e.flowBounds.xPt,i=t.yPt-e.flowBounds.yPt,a=n.layoutTranslationPt??{xPt:0,yPt:0},o=rT(n.pointToCss??iT(n.scale),aT(r,i)),s=GT(n.ctx,()=>n.ctx.translate(r,i)),c={...n,pointToCss:o,layoutTranslationPt:{xPt:a.xPt+r,yPt:a.yPt+i}};s(()=>{let t=()=>JT(e,c);if(!e.clipBounds){t();return}GT(n.ctx,()=>{n.ctx.beginPath(),n.ctx.rect(e.clipBounds.xPt,e.clipBounds.yPt,e.clipBounds.widthPt,e.clipBounds.heightPt),n.ctx.clip()})(t)()})()}function XT(e,t,n,r){for(let n of e.rows)for(let e of n.cells){let n=`visualMergeOwnership`in e&&e.visualMergeOwnership===`continuation`;if(e.verticalMerge===`continue`&&!n)continue;e.background&&(t.ctx.fillStyle=e.background.color,t.ctx.fillRect(e.flowBounds.xPt,e.flowBounds.yPt,e.flowBounds.widthPt,e.flowBounds.heightPt));let r=(t,n=!0)=>{for(let r of e.blocks)qT(r.layout,{xPt:e.contentBounds.xPt+(r.layout.kind===`table`?r.layout.flowBounds.xPt:0),yPt:e.flowBounds.yPt+r.offsetPt+(r.layout.kind===`table`?r.layout.flowBounds.yPt:0)},t,r.layout.kind!==`table`||n)};if(!e.clipBounds){r(t);continue}if(GT(t.ctx,()=>{t.ctx.beginPath(),t.ctx.rect(e.clipBounds.xPt,e.clipBounds.yPt,e.clipBounds.widthPt,e.clipBounds.heightPt),t.ctx.clip()})(()=>r(t,!1))(),e.blocks.some(e=>e.layout.kind===`table`)){let n=KT(e.clipBounds,t);GT(t.ctx,()=>{t.ctx.beginPath(),t.ctx.rect(n.xPt,n.yPt,n.widthPt,n.heightPt),t.ctx.clip()})(()=>{for(let n of e.blocks)n.layout.kind===`table`&&YT(n.layout,{xPt:e.contentBounds.xPt+n.layout.flowBounds.xPt,yPt:e.flowBounds.yPt+n.offsetPt+n.layout.flowBounds.yPt},t)})()}}$T(n,t),r&&JT(e,t)}function ZT(e,t,n,r){if(!e.clipBounds){XT(e,t,n,r);return}let i=e.clipBounds;GT(t.ctx,()=>{t.ctx.beginPath(),t.ctx.rect(i.xPt,i.yPt,i.widthPt,i.heightPt),t.ctx.clip()})(()=>XT(e,t,n,r))()}function QT(e,t,n){ZT(e,t,n??e.resolvedFloatingTables??[],!0)}function $T(e,t){let n=t.layoutTranslationPt??{xPt:0,yPt:0};for(let r of e)qT(r.child,{xPt:r.xPt-n.xPt,yPt:r.yPt-n.yPt},t)}function eE(e,t){let n=e.transform;if(n){n.call(e,t.a,t.b,t.c,t.d,t.e,t.f);return}if(e.translate(t.e,t.f),t.a===0&&t.b===1&&t.c===-1&&t.d===0)e.rotate(Math.PI/2);else if(t.a===0&&t.b===-1&&t.c===1&&t.d===0)e.rotate(-Math.PI/2);else if(t.b===0&&t.c===0)e.scale(t.a,t.d);else throw Error(`Canvas context cannot apply the retained point-space transform`)}function tE(e){if(e.text.length!==e.range.end-e.range.start)throw Error(`UTF-16 text range is inconsistent`);if(e.clusters.length===0)throw Error(`Retained glyph slices are incomplete (clusters)`);let t=e.range.start;for(let n of e.clusters){let{advancePt:r,offset:i,range:a}=n;if(!Number.isFinite(r)||!Number.isFinite(i.xPt)||!Number.isFinite(i.yPt)||a.start!==t||a.end<=a.start||a.end>e.range.end)throw Error(`Retained glyph slices are incomplete (cluster range ${t}:${a.start}-${a.end}/${e.range.end}; advance ${r}; offset ${i.xPt},${i.yPt})`);t=a.end}if(t!==e.range.end)throw Error(`Retained glyph slices are incomplete (cluster end ${t}/${e.range.end})`);if(e.paintOps.length===0)throw Error(`Retained glyph slices are incomplete (paint ops)`);let n=e.range.start;for(let t of e.paintOps){let r=t.sourceMapping!==`kashida`&&t.text.length!==t.range.end-t.range.start,i=!Number.isFinite(t.offset.xPt)||!Number.isFinite(t.offset.yPt)||t.glyphOffsetPt!==void 0&&(!Number.isFinite(t.glyphOffsetPt.xPt)||!Number.isFinite(t.glyphOffsetPt.yPt))||t.blockAxisInkBounds!==void 0&&(!Number.isFinite(t.blockAxisInkBounds.startPt)||!Number.isFinite(t.blockAxisInkBounds.endPt)||t.blockAxisInkBounds.endPt<t.blockAxisInkBounds.startPt)||!Number.isFinite(t.letterSpacingPt)||!Number.isFinite(t.scaleX)||t.scaleX<=0||t.scaleY!==void 0&&(!Number.isFinite(t.scaleY)||t.scaleY<=0),a=t.range.start!==n||t.range.end<=t.range.start||t.range.end>e.range.end;if(r||i||a)throw Error(`Retained glyph slices are incomplete (${r?`text`:i?`geometry`:`range ${n}:${t.range.start}-${t.range.end}/${e.range.end}`})`);n=t.range.end}let r=e.text.slice(n-e.range.start);if(r!==``&&!/^\s+$/u.test(r))throw Error(`Retained glyph slices are incomplete (paint end ${n}/${e.range.end})`)}function nE(e,t){return e.kind===`explicit`?e.color:e.kind===`auto`?In(e.background??`#FFFFFF`):t.defaultTextColor??`#000000`}function rE(e,t){return nE(e.color,t)}function iE(e,t,n=!1){let{ctx:r}=t;r.fillStyle=nE(e.color,t),r.font=W(e.fontRoute,e.fontSizePt,e.fontWeight,e.fontStyle),n?(r.save(),r.translate(e.origin.xPt,e.origin.yPt),r.rotate(-Math.PI/2),r.fillText(e.text,0,0),r.restore()):r.fillText(e.text,e.origin.xPt,e.origin.yPt)}function aE(e,t){let{ctx:n}=t;if(n.beginPath(),e.points.length>0){let t=e.points[0];n.moveTo(t.xPt,t.yPt);for(let t of e.points.slice(1))n.lineTo(t.xPt,t.yPt)}e.stroke!==null&&(n.strokeStyle=e.stroke,n.lineWidth=e.strokeWidthPt,n.stroke()),e.fill!==null&&(n.fillStyle=e.fill,n.fill())}function oE(e,t){let n=new Map(e.textBoxes.map(e=>[e.id,e]));return(t.textBoxIds??[]).flatMap(e=>{let t=n.get(e);return t?[t]:[]})}function sE(e,t,n){let r=n.layoutTranslationPt,i=e.anchorLayer?.horizontalOwnership===`page`?-(r?.xPt??0):0,a=e.anchorLayer?.verticalOwnership===`page`?-(r?.yPt??0):0;(i!==0||a!==0)&&(n.ctx.save(),n.ctx.translate(i,a));let o=n=>{zT(e,n);for(let e of t)dE(e,{...n,omitAnchoredDrawings:!1})};try{if(e.orientation===`upright-physical`){if(!e.transform)throw Error(`Upright physical drawing requires its retained logical transform`);let t=rT(n.pointToCss??iT(n.scale),e.transform);GT(n.ctx,()=>{eE(n.ctx,e.transform)})(()=>o({...n,pointToCss:t}))()}else o(n)}finally{(i!==0||a!==0)&&n.ctx.restore()}}function cE(e,t,n){sE(t,oE(e,t),n)}function lE(e,t){let{ctx:n}=t,r=new Set(e.drawings.flatMap(e=>e.textBoxIds??[])),i=n=>cE(e,n,t),a=e.drawings.filter(e=>e.anchorLayer?.behindDoc===!0).sort((e,t)=>e.anchorLayer.relativeHeight-t.anchorLayer.relativeHeight||e.anchorLayer.sourceOrder-t.anchorLayer.sourceOrder);if(!t.omitAnchoredDrawings)for(let e of a)i(e);for(let t of e.lineNumbers??[])for(let e of t.paintOps)n.fillStyle=e.color,n.font=e.font,n.textAlign=e.textAlign,n.textBaseline=`alphabetic`,n.fillText(e.text,e.origin.xPt,e.origin.yPt);e.shading&&(n.fillStyle=e.shading.color,n.fillRect(e.inkBounds.xPt,e.inkBounds.yPt,e.inkBounds.widthPt,e.inkBounds.heightPt));for(let r of e.lines){for(let e of r.barTabRules??[])WT(e,t,UT(t));for(let e of r.placements){if(e.kind===`resource`){if(!t.resources)throw Error(`Missing retained resource painter for ${e.resourceKey}`);if(t.textBoxVerticalMode){let r=t.textBoxVerticalMode===`vert270`?Math.PI/2:-Math.PI/2;n.save(),n.translate(e.bounds.xPt+e.bounds.widthPt/2,e.bounds.yPt+e.bounds.heightPt/2),n.rotate(r),RT(e.resourceKey,e.resourceKind,{xPt:-e.bounds.heightPt/2,yPt:-e.bounds.widthPt/2,widthPt:e.bounds.heightPt,heightPt:e.bounds.widthPt},e.orientation,t),n.restore()}else RT(e.resourceKey,e.resourceKind,e.bounds,e.orientation,t);continue}if(e.kind===`tab`){if(e.leader!==`none`){if(!e.leaderGlyphs)throw Error(`Retained tab leader geometry is missing`);for(let n of e.leaderGlyphs)iE(n,t)}for(let n of e.decorations??[])WT(n,t);continue}if(e.kind!==`text`)continue;if(tE(e),e.unsupportedGeometry?.length)throw Error(`Unsupported retained typography geometry: ${e.unsupportedGeometry.join(`, `)}`);if(e.highlightFragments)for(let t of e.highlightFragments)n.fillStyle=t.color,n.fillRect(t.rect.xPt,t.rect.yPt,t.rect.widthPt,t.rect.heightPt);else (e.background||e.highlight)&&(n.fillStyle=e.highlight??e.background??`#000000`,n.fillRect(e.bounds.xPt,e.bounds.yPt,e.bounds.widthPt,e.bounds.heightPt));n.fillStyle=rE(e,t),n.font=W(e.fontRoute,e.fontSizePt,e.fontWeight,e.fontStyle),n.textAlign=`left`,n.textBaseline=`alphabetic`;let r=n.letterSpacing,i=n.fontKerning;for(let t of e.paintOps){n.direction=t.direction,n.fontKerning=t.kerning;let r=e.origin.xPt+t.offset.xPt,i=e.origin.yPt+t.offset.yPt,a=t.glyphOffsetPt?.xPt??0,o=t.glyphOffsetPt?.yPt??0;if(t.glyphOrientation===`upright`){n.save(),n.translate(r,i),n.rotate(-Math.PI/2),(t.scaleX!==1||t.scaleY!==void 0)&&(t.writingMode===`vertical-rl`?n.scale(1,t.scaleX):n.scale(t.scaleX,t.scaleY??1)),n.textAlign=`center`,n.textBaseline=`middle`,n.letterSpacing=`${t.letterSpacingPt}px`;let e=()=>n.fillText(t.text,a,o);t.verticalFeature?Qm(n,e):e(),n.restore()}else t.glyphOrientation===`rotate`?(n.save(),n.translate(r,i),t.scaleX!==1&&n.scale(t.scaleX,1),n.textAlign=`center`,n.textBaseline=`middle`,n.letterSpacing=`${t.letterSpacingPt/t.scaleX}px`,n.fillText(t.text,a,o),n.restore()):t.scaleX===1?(n.letterSpacing=`${t.letterSpacingPt}px`,n.fillText(t.text,r+a,i+o)):(n.save(),n.translate(r+a,i+o),n.scale(t.scaleX,1),n.letterSpacing=`${t.letterSpacingPt/t.scaleX}px`,n.fillText(t.text,0,0),n.restore())}if(n.letterSpacing=r,n.fontKerning=i,e.ruby){let n=t.textBoxVerticalMode===`eaVert`||t.textBoxVerticalMode===`mongolianVert`;for(let r of e.ruby.paintOps)iE(r,t,n)}for(let n of e.emphasis?.glyphs??[])iE(n,t);for(let n of e.emphasis?.paths??[])aE(n,t);for(let n of e.decorations)WT(n,t);for(let n of e.runBorderFragments??[])WT(n,t)}}let o=UT(t);for(let n of e.borders)WT(n,t,o);for(let t of e.drawings.filter(e=>!e.anchorLayer))i(t);let s=e.drawings.filter(e=>e.anchorLayer&&!e.anchorLayer.behindDoc).sort((e,t)=>e.anchorLayer.relativeHeight-t.anchorLayer.relativeHeight||e.anchorLayer.sourceOrder-t.anchorLayer.sourceOrder);if(!t.omitAnchoredDrawings)for(let e of s)i(e);for(let n of e.textBoxes)r.has(n.id)||dE(n,{...t,omitAnchoredDrawings:!1})}function uE(e,t){if(!e.clipBounds){lE(e,t);return}let n=e.clipBounds;GT(t.ctx,()=>{t.ctx.beginPath(),t.ctx.rect(n.xPt,n.yPt,n.widthPt,n.heightPt),t.ctx.clip()})(()=>lE(e,t))()}function dE(e,t){let n=t=>{for(let n of e.story.blocks)if(n.kind===`paragraph`)uE(n,t);else if(n.kind===`table`)QT(n,t,n.resolvedFloatingTables??[]);else throw Error(`Text-box story contains unsupported retained node: ${n.kind}`)},r=rT(t.pointToCss??iT(t.scale),e.transform),i=e.transform.a!==1||e.transform.b!==0||e.transform.c!==0||e.transform.d!==1||e.transform.e!==0||e.transform.f!==0,a=GT(t.ctx,()=>{i&&(e.verticalMode?(t.ctx.translate(e.transform.e,e.transform.f),t.ctx.rotate(e.verticalMode===`vert270`?-Math.PI/2:Math.PI/2)):t.ctx.transform(e.transform.a,e.transform.b,e.transform.c,e.transform.d,e.transform.e,e.transform.f))}),o=e.clipBounds?GT(t.ctx,()=>{t.ctx.beginPath(),t.ctx.rect(e.clipBounds.xPt,e.clipBounds.yPt,e.clipBounds.widthPt,e.clipBounds.heightPt),t.ctx.clip()}):null,s=t.documentDefaultTextColor??t.defaultTextColor??`#000000`,c={...t,pointToCss:r,documentDefaultTextColor:s,defaultTextColor:e.defaultTextColor??s,...e.verticalMode?{textBoxVerticalMode:e.verticalMode}:{}};a(()=>{o?o(()=>n(c))():n(c)})()}function fE(e,t){let n=rT(t.pointToCss??iT(t.scale),e.logicalToPhysical),r={...t,pointToCss:n};GT(t.ctx,()=>{eE(t.ctx,e.logicalToPhysical)})(()=>{for(let t of e.segments)WT(t,r,.5)})()}const pE=Object.freeze({paint(e,t){throw Error(`Missing retained resource painter for ${e}: expected ${t}`)}});function mE(e,t){return Object.freeze({paint(n,r,i,a){switch(r){case`image`:t.image(e.resolve(n,r),i,a);return;case`chart`:t.chart(e.resolve(n,r),i,a);return;case`math`:t.math(e.resolve(n,r),i,a);return;case`picture-bullet`:t[`picture-bullet`](e.resolve(n,r),i,a);return;default:throw Error(`Unknown retained resource kind: ${String(r)}`)}}})}function hE(e,t){switch(e.kind){case`drawing`:zT(e,t);return;case`paragraph`:uE(e,t);return;case`table`:QT(e,t,e.resolvedFloatingTables??[]);return;case`note`:{e.separator.forEach(e=>WT(e,t));let n=()=>e.story.blocks.forEach(e=>hE(e,t));if(!e.story.clipBounds){n();return}let r=e.story.clipBounds;t.ctx.save();try{t.ctx.beginPath(),t.ctx.rect(r.xPt,r.yPt,r.widthPt,r.heightPt),t.ctx.clip(),n()}finally{t.ctx.restore()}return}case`textbox`:throw Error(`Unsupported page paint node kind: ${e.kind}`);default:throw Error(`Unknown page paint node kind: ${String(e)}`)}}function gE(e,t){let n=e.columnSeparators;if(n.length===0)return;let{ctx:r}=t;r.save(),r.strokeStyle=`#000000`;for(let e of n){let n=LT(e,t.scale,t.dpr);r.lineWidth=n.widthPt,r.beginPath(),r.moveTo(n.segment.start.xPt,n.segment.start.yPt),r.lineTo(n.segment.end.xPt,n.segment.end.yPt),r.stroke()}r.restore()}function _E(e,t,n,r){let i=n.get(e.flowDomainId),a=e.coordinateSpace===`upright-physical`?void 0:i?.coordinateSpace.logicalToPhysical,o=GT(t.ctx,()=>{a&&(a.a!==1||a.b!==0||a.c!==0||a.d!==1||a.e!==0||a.f!==0)&&eE(t.ctx,a)}),s={...t,...a?{pointToCss:{a:a.a*t.scale,b:a.b*t.scale,c:a.c*t.scale,d:a.d*t.scale,e:a.e*t.scale,f:a.f*t.scale}}:{}};o(()=>r(s))()}function vE(e,t){if(e.kind===`transform`){let n=t.transform;if(n)n.call(t,e.transform.a,e.transform.b,e.transform.c,e.transform.d,e.transform.e,e.transform.f);else if(e.transform.a===1&&e.transform.b===0&&e.transform.c===0&&e.transform.d===1)t.translate(e.transform.e,e.transform.f);else throw Error(`Canvas context cannot apply the retained page paint transform`);return}t.beginPath(),t.rect(e.clip.xPt,e.clip.yPt,e.clip.widthPt,e.clip.heightPt),t.clip()}function yE(e,t){let n=t.pointToCss??iT(t.scale);for(let t of e.frames)t.kind===`transform`&&(n=rT(n,t.transform));let r={...t,pointToCss:n,layoutTranslationPt:e.layoutTranslationPt,omitAnchoredDrawings:!1},i=0;try{for(let n of e.frames)t.ctx.save(),i+=1,vE(n,t.ctx);sE(e.node,e.textBoxes,r)}finally{for(;i>0;)t.ctx.restore(),--i}}function bE(e,t){let n=new Map(e.sectionRegions.flatMap(e=>e.flowDomainIds.map(t=>[t,e]))),r=new Map(e.sectionRegions.map(e=>[e.id,e]));for(let t of e.flowDomains)if(t.kind===`footnote`||t.kind===`endnote`){let i=t.sectionRegionId?r.get(t.sectionRegionId):e.sectionRegions[0];if(!i)throw Error(`${t.id} references missing page story region ${t.sectionRegionId??`<default>`}`);n.set(t.id,i)}let i=e.layers.paintOrder,a=i.findIndex(e=>e.sourceLayer!==`background`&&e.sourceLayer!==`behindText`&&e.sourceLayer!==`header`),o=a===-1?i.length:a,s=e=>{for(let r of e)_E(r,t,n,e=>{r.kind===`drawing`?yE(r,e):hE(r.node,{...e,omitAnchoredDrawings:r.omitAnchoredDrawings})})};e.pageBorder?.zOrder===`back`&&fE(e.pageBorder,t),s(i.slice(0,o)),gE(e,t),s(i.slice(o)),e.pageBorder?.zOrder!==`back`&&e.pageBorder&&fE(e.pageBorder,t)}async function xE(e,t,n,r,i=pE){let a=e.pages[t];if(!a)throw RangeError(`Page ${t} is outside the layout`);let o=n.getContext(`2d`);if(!o)throw Error(`Canvas 2D context is unavailable`);let s=r.scale*r.dpr;n.width=Math.ceil(a.geometry.widthPt*s),n.height=Math.ceil(a.geometry.heightPt*s),o.save();try{o.setTransform(1,0,0,1,0,0),o.clearRect(0,0,n.width,n.height),o.setTransform(s,0,0,s,0,0),bE(a,{ctx:o,scale:r.scale,dpr:r.dpr,resources:i})}finally{o.restore()}}function SE(e,t){if(typeof e!=`string`||e.trim().length===0)throw TypeError(`${t} must be a non-empty string`)}function CE(e){return SE(e,`unavailable paint resource reason`),Object.freeze({status:`unavailable`,reason:e})}function wE(e){return typeof e==`object`&&!!e&&e.status===`unavailable`&&typeof e.reason==`string`&&e.reason.trim().length>0}function TE(e){typeof e!=`object`||!e||e.status!==`unavailable`||SE(e.reason,`unavailable paint resource reason`)}function EE(e,t){let n=new Map;for(let r of t){if(n.has(r.resourceKey))throw Error(`Duplicate paint resource handle: ${r.resourceKey}`);TE(r.handle),e.resolve(r.resourceKey,r.kind),n.set(r.resourceKey,Object.freeze({kind:r.kind,handle:r.handle}))}let r=Object.freeze([...n.keys()].sort());return Object.freeze({keys:r,resolve(t,r){let i=e.resolve(t,r),a=n.get(t);if(!a)throw Error(`Missing paint resource handle for ${t}: expected ${r}`);if(a.kind!==r)throw Error(`Paint resource kind mismatch for ${t}: expected ${r}, got ${a.kind}`);return Object.freeze({descriptor:i,handle:a.handle})}})}function DE(e,t){return EE(e,e.descriptors.map(e=>{if(e.kind===`chart`)return{resourceKey:e.resourceKey,kind:e.kind,handle:null};let n=t(e);if(n==null)throw Error(`Missing ${e.kind} paint handle for ${e.resourceKey}`);return{resourceKey:e.resourceKey,kind:e.kind,handle:n}}))}function OE(e){if(!wE(e.handle)){if(e.handle===void 0||e.handle===null)throw Error(`Missing ${e.descriptor.kind} drawable for ${e.descriptor.resourceKey}`);return e.handle}}function kE(e,t,n){let r=e.descriptor,i=OE(e);if(!i)return;let a=(e,a)=>{cl(n,i,r.srcRect,e,a,t.widthPt,t.heightPt)},o=r.alpha!==void 0&&r.alpha<1;o&&(n.save(),n.globalAlpha*=r.alpha);let s=r.rotation??0;s===0&&!r.flipH&&!r.flipV?a(t.xPt,t.yPt):(n.save(),n.translate(t.xPt+t.widthPt/2,t.yPt+t.heightPt/2),n.rotate(s*Math.PI/180),n.scale(r.flipH?-1:1,r.flipV?-1:1),a(-t.widthPt/2,-t.heightPt/2),n.restore()),o&&n.restore()}function AE(e,t,n){let r=OE(e);r&&n.drawImage(r,t.xPt,t.yPt,t.widthPt,t.heightPt)}function jE(e,t){return Object.freeze({image(e,t,n){kE(e,t,n)},chart(n,r,i){Za(i,n.descriptor.model,{x:r.xPt,y:r.yPt,w:r.widthPt,h:r.heightPt},1,0,e,t)},math(e,t,n){AE(e,t,n)},"picture-bullet"(e,t,n){AE(e,t,n)}})}const ME=jE(),NE=new WeakMap;function PE(e,t){return(t??e.geometry.widthPt*1.3333333333333333)/e.geometry.widthPt}function FE(e){if(Zl(e))return e.ownerDocument??(typeof document>`u`?null:document);let t=e.ownerDocument,n=t?.defaultView?.HTMLCanvasElement;return n&&e instanceof n?t:null}function IE(e){return FE(e)!==null}function LE(e,t){let n=FE(e);if(!t||n&&e.isConnected)return{canvas:e};let r=n??(typeof document>`u`?void 0:document);if(!r)throw Error(`OpenType vertical glyph paint requires an element-backed document surface`);let i=r.body??r.documentElement;if(!i)throw Error(`OpenType vertical glyph paint requires an attached document surface`);let a=r.createElement(`canvas`);return a.setAttribute(`aria-hidden`,`true`),Object.assign(a.style,{position:`fixed`,left:`-99999px`,top:`0`,opacity:`0`,pointerEvents:`none`}),i.appendChild(a),{canvas:a,release:()=>a.remove()}}async function RE(e,t,n,r){let i=r.fetchImage?Gc(r.fetchImage):void 0,a;try{let i=(NE.get(n)??0)+1;NE.set(n,i);let o=()=>NE.get(n)!==i,s=r.dpr??Ql(),c=LE(n,!r.parseError&&t.layers.capabilities.requiresElementBackedVerticalGlyphPaint),l=c.canvas;a=c.release;let u=l.getContext(`2d`);if(!u)throw Error(`2D canvas is unavailable for DOCX paint`);let d=PE(t,r.width),f=t.geometry.widthPt*d,p=t.geometry.heightPt*d,m=Vl(f*s,p*s),h=m.clamped?s*m.scale:s;if(n.width=m.width,n.height=m.height,l!==n&&(l.width=m.width,l.height=m.height),IE(n)&&(n.style.width=`${f}px`,n.style.height=`${p}px`,n.style.display||(n.style.display=`block`)),IE(l)&&l!==n&&(l.style.width=`${f}px`,l.style.height=`${p}px`),u.scale(h,h),u.fillStyle=`#ffffff`,u.fillRect(0,0,f,p),r.parseError){await xE(e,0,n,{scale:d,dpr:h});return}let g;try{g=await PT(r.registry.descriptors,r.fetchImage)}catch(e){if(o())return;throw e}if(o())return;let _=mE(DE(r.registry,e=>{if(e.kind===`math`)return r.privateResources?.keys.includes(e.resourceKey)?r.privateResources.resolve(e.resourceKey):CE(`optional math renderer unavailable`);if(e.kind===`image`||e.kind===`picture-bullet`)return g.get(AT(e.partPath,e.colorReplaceFrom,e.duotone))??CE(r.fetchImage?`unsupported image format produced no drawable output`:`image byte source unavailable`)}),r.threeD||r.regionMap?jE(r.threeD,r.regionMap):ME);u.save();try{u.scale(d,d),bE(t,{ctx:u,scale:d,dpr:h,resources:_,documentDefaultTextColor:r.defaultTextColor??`#000000`,defaultTextColor:r.defaultTextColor??`#000000`})}finally{u.restore()}if(l!==n){if(o())return;let e=n.getContext(`2d`);if(!e)throw Error(`2D canvas is unavailable for DOCX paint projection`);e.drawImage(l,0,0)}if(r.onTextRun)for(let e of r.textRuns)r.onTextRun(e)}finally{a?.(),i?.()}}var zE=class extends Error{code=`NOTE_CAPACITY_EXCEEDED`;constructor(e,t,n){super(`${e} story exceeds ${n} on page ${t}`),this.kind=e,this.pageIndex=t,this.containerId=n,this.name=`NoteCapacityExceededError`}};function BE(e){return Object.freeze({...e,pages:Object.freeze([...e.pages])})}function VE(e){let{kind:t,region:n,...r}=e,i=fw(r);if(n&&(i=pw(i,n)),t===`content`&&i.sectionRegions.length===0)throw RangeError(`A content page draft requires an initial section region`);if(t===`parity-blank`&&i.sectionRegions.length!==0)throw RangeError(`A parity blank cannot retain a section region`);return Object.freeze({kind:t,accumulator:i})}function HE(e,t){if(t.kind!==`content`||t.accumulator.pageIndex!==e.pageIndex)throw Error(`The initial body page must be owned by the active flow`);return BE({flow:e,pages:[t],footnoteReservePt:0,balanceTargetPt:null})}function UE(e,t){if(t!==null&&(!Number.isFinite(t)||t<0))throw RangeError(`A body balance target must be finite and non-negative`);return BE({...e,balanceTargetPt:t})}function WE(e,t){if(!Number.isFinite(t)||t<0)throw RangeError(`A footnote reserve increment must be finite and non-negative`);return t===0?e:BE({...e,footnoteReservePt:e.footnoteReservePt+t})}function GE(e,t,n){let r=[...e.pages],i=t.state,a=!1;for(let e of t.events){if(e.type===`place`)throw Error(`Occurrence acceptance owns place events`);if(e.type!==`next-column`){if(e.type===`next-page`){if(e.parityBlank)r.push(n.openParityBlankPage(e));else{let a=n.openContentPage(e,t.state);r.push(a.page),i=a.flow}a=!0;continue}if(!a){let t=r.at(-1);if(!t||t.kind!==`content`)throw Error(`A continuous section requires an active content page`);r[r.length-1]=n.openSamePageSectionRegion(t,e,i)}}}let o=r.at(-1);if(!o||o.kind!==`content`||o.accumulator.pageIndex!==i.pageIndex)throw Error(`A page transition must end on the active content page`);return BE({...e,flow:i,pages:r,footnoteReservePt:a?0:e.footnoteReservePt,balanceTargetPt:a?null:e.balanceTargetPt})}function KE(e){if(e.length===0)return null;let t=Math.min(...e.map(e=>e.xPt)),n=Math.min(...e.map(e=>e.yPt)),r=Math.max(...e.map(e=>e.xPt+e.widthPt)),i=Math.max(...e.map(e=>e.yPt+e.heightPt));return{xPt:t,yPt:n,widthPt:r-t,heightPt:i-n}}function qE(e){return{x:!e.horzSpecified||e.horzAnchor!==`page`&&e.horzAnchor!==`margin`,y:e.vertAnchor!==`page`&&e.vertAnchor!==`margin`}}function JE(e,t){return{...e,xPt:e.xPt+t.xPt,yPt:e.yPt+t.yPt}}function YE(e,t){return{...e,xPt:e.xPt+t.xPt,yPt:e.yPt+t.yPt}}function XE(e,t){return{...e,from:JE(e.from,t),to:JE(e.to,t)}}function ZE(e,t){return e.kind===`rect`?{...e,rect:YE(e.rect,t)}:{...e,points:e.points.map(e=>JE(e,t))}}function QE(e,t){return e.kind===`noop`?e:e.kind===`drawingml-shape`||e.kind===`drawingml-image-fill`?{...e,plan:{...e.plan,rect:{...e.plan.rect,x:e.plan.rect.x+t.xPt,y:e.plan.rect.y+t.yPt}}}:{...e,rect:YE(e.rect,t)}}function $E(e,t){let n=e.orientation===`upright-physical`?{xPt:0,yPt:0}:t;return{...e,flowBounds:YE(e.flowBounds,t),inkBounds:YE(e.inkBounds,t),...e.clipBounds?{clipBounds:YE(e.clipBounds,t)}:{},...e.transform?{transform:{...e.transform,e:e.transform.e+t.xPt,f:e.transform.f+t.yPt}}:{},...e.clip?{clip:ZE(e.clip,t)}:{},commands:e.commands.map(e=>QE(e,n))}}function eD(e,t,n){let r=`${t.xPt}\u0000${t.yPt}`,i=n.drawingMemo.get(e);if(i){if(i.key!==r)throw Error(`incompatible projection ownership`);return i.value}let a=$E(e,t);return n.drawingMemo.set(e,{key:r,value:a}),a}function tD(e,t,n){return e.kind===`text`?{...e,origin:JE(e.origin,t),bounds:YE(e.bounds,t),decorations:e.decorations.map(e=>({...e,from:JE(e.from,t),to:JE(e.to,t),...e.path?{path:e.path.map(e=>JE(e,t))}:{}})),...e.highlightFragments?{highlightFragments:e.highlightFragments.map(e=>({...e,rect:YE(e.rect,t)}))}:{},...e.ruby?{ruby:{...e.ruby,paintOps:e.ruby.paintOps.map(e=>({...e,origin:JE(e.origin,t)}))}}:{},...e.emphasis?{emphasis:{...e.emphasis,...e.emphasis.glyphs?{glyphs:e.emphasis.glyphs.map(e=>({...e,origin:JE(e.origin,t)}))}:{},...e.emphasis.paths?{paths:e.emphasis.paths.map(e=>({...e,points:e.points.map(e=>JE(e,t))}))}:{}}}:{},...e.runBorderFragments?{runBorderFragments:e.runBorderFragments.map(e=>XE(e,t))}:{}}:e.kind===`anchor-host`?{...e,bounds:YE(e.bounds,t),baselinePt:e.baselinePt+t.yPt}:e.kind===`drawing`?{...e,bounds:YE(e.bounds,n?.get(e.drawingId)??t)}:e.kind===`tab`&&(e.leaderGlyphs||e.decorations)?{...e,...e.bounds?{bounds:YE(e.bounds,t)}:{},...e.leaderGlyphs?{leaderGlyphs:e.leaderGlyphs.map(e=>({...e,origin:JE(e.origin,t)}))}:{},...e.decorations?{decorations:e.decorations.map(e=>({...e,from:JE(e.from,t),to:JE(e.to,t),...e.path?{path:e.path.map(e=>JE(e,t))}:{}}))}:{}}:e.bounds?{...e,bounds:YE(e.bounds,t)}:e}function nD(e,t,n){return{...e,bounds:YE(e.bounds,t),baselinePt:e.baselinePt+t.yPt,placements:e.placements.map(e=>tD(e,t,n)),...e.barTabRules?{barTabRules:e.barTabRules.map(e=>({...e,from:JE(e.from,t),to:JE(e.to,t)}))}:{}}}function rD(e,t){let n=e.axes[t];return n.status===`resolved`&&[`page`,`margin`,`leftMargin`,`rightMargin`,`topMargin`,`bottomMargin`].includes(n.referenceFrame)}function iD(e,t){let n=rD(e,`horizontal`)?0:t.xPt,r=rD(e,`vertical`)?0:t.yPt,i={xPt:n,yPt:r},a={horizontal:e.axes.horizontal.status===`resolved`?{...e.axes.horizontal,baseStartPt:e.axes.horizontal.baseStartPt+n,baseEndPt:e.axes.horizontal.baseEndPt+n,resolvedOriginPt:e.axes.horizontal.resolvedOriginPt+n}:e.axes.horizontal,vertical:e.axes.vertical.status===`resolved`?{...e.axes.vertical,baseStartPt:e.axes.vertical.baseStartPt+r,baseEndPt:e.axes.vertical.baseEndPt+r,resolvedOriginPt:e.axes.vertical.resolvedOriginPt+r}:e.axes.vertical};return e.status===`unsupported`?{...e,axes:a}:{...e,axes:a,geometry:{...e.geometry,objectFrame:YE(e.geometry.objectFrame,i),inkBounds:YE(e.geometry.inkBounds,i),wrapBounds:e.geometry.wrapBounds?YE(e.geometry.wrapBounds,i):null,wrap:{...e.geometry.wrap,polygon:e.geometry.wrap.polygon?{...e.geometry.wrap.polygon,points:e.geometry.wrap.polygon.points.map(e=>JE(e,i))}:null}}}}function aD(e,t){return oD(e,t,{memo:new WeakMap,drawingMemo:new WeakMap})}function oD(e,t,n){let r=`${t.xPt}\u0000${t.yPt}`,i=n.memo.get(e);if(i){if(i.key!==r)throw Error(`incompatible projection ownership`);return i.value}let a=new Map(e.drawings.flatMap(e=>e.anchorLayer?[[e.anchorLayer.occurrenceId,e.anchorLayer]]:[])),o=new Map,s=new Map;for(let n of e.drawings){let e={xPt:n.anchorLayer?.horizontalOwnership===`page`?0:t.xPt,yPt:n.anchorLayer?.verticalOwnership===`page`?0:t.yPt};s.set(n.id,e),n.textBoxIds?.forEach(t=>o.set(t,n.orientation===`upright-physical`?{xPt:0,yPt:0}:e))}let c=e.drawings.map(e=>eD(e,s.get(e.id)??t,n)),l=KE(c.filter(e=>e.anchorLayer?.cellContainment===!0).map(e=>e.flowBounds)),u={...e,flowBounds:YE(e.flowBounds,t),inkBounds:YE(e.inkBounds,t),...e.clipBounds?{clipBounds:YE(e.clipBounds,t)}:{},lines:e.lines.map(e=>nD(e,t,s)),borders:e.borders.map(e=>XE(e,t)),drawings:c,...l?{cellContainmentBounds:l}:{},textBoxes:e.textBoxes.map(e=>cD(e,o.get(e.id)??t,n)),exclusions:e.exclusions.map(e=>{let n=e.anchorOccurrenceId?a.get(e.anchorOccurrenceId):void 0,r={xPt:n?.horizontalOwnership===`page`?0:t.xPt,yPt:e.verticalOwnership===`page`||n?.verticalOwnership===`page`?0:t.yPt};return{...e,bounds:YE(e.bounds,r),polygon:e.polygon.map(e=>JE(e,r))}}),...e.anchorCollisions?{anchorCollisions:e.anchorCollisions.map(e=>({...e,bounds:YE(e.bounds,{xPt:e.horizontalOwnership===`page`?0:t.xPt,yPt:e.verticalOwnership===`page`?0:t.yPt})}))}:{},...e.anchorFrames?{anchorFrames:e.anchorFrames.map(e=>iD(e,t))}:{},...e.paragraphMark?{paragraphMark:{...e.paragraphMark,bounds:YE(e.paragraphMark.bounds,t)}}:{},...e.lineNumbers?{lineNumbers:e.lineNumbers.map(e=>({...e,bounds:YE(e.bounds,t),paintOps:e.paintOps.map(e=>({...e,origin:JE(e.origin,t)}))}))}:{}};return n.memo.set(e,{key:r,value:u}),u}function sD(e,t){return cD(e,t,{memo:new WeakMap,drawingMemo:new WeakMap})}function cD(e,t,n){let r=e.verticalMode===void 0;return{...e,flowBounds:YE(e.flowBounds,t),inkBounds:YE(e.inkBounds,t),...e.clipBounds?{clipBounds:r?YE(e.clipBounds,t):e.clipBounds}:{},...e.contentBounds?{contentBounds:r?YE(e.contentBounds,t):e.contentBounds}:{},transform:r?e.transform:{...e.transform,e:e.transform.e+t.xPt,f:e.transform.f+t.yPt},story:r?{...e.story,flowBounds:YE(e.story.flowBounds,t),inkBounds:YE(e.story.inkBounds,t),...e.story.clipBounds?{clipBounds:YE(e.story.clipBounds,t)}:{},blocks:e.story.blocks.map(e=>{if(e.kind===`paragraph`)return oD(e,t,n);if(e.kind===`table`)return uD(e,t);throw Error(`Text-box story contains unsupported retained node: ${e.kind}`)})}:e.story}}function lD(e,t){return aD(e,t)}function uD(e,t){return{...e,flowBounds:YE(e.flowBounds,t),inkBounds:YE(e.inkBounds,t),...e.clipBounds?{clipBounds:YE(e.clipBounds,t)}:{},borders:e.borders.map(e=>XE(e,t)),...e.compoundBorderFrames?{compoundBorderFrames:e.compoundBorderFrames.map(e=>({...e,bounds:YE(e.bounds,t)}))}:{},rows:e.rows.map(e=>({...e,flowBounds:YE(e.flowBounds,t),inkBounds:YE(e.inkBounds,t),...e.clipBounds?{clipBounds:YE(e.clipBounds,t)}:{},cells:e.cells.map(e=>({...e,flowBounds:YE(e.flowBounds,t),inkBounds:YE(e.inkBounds,t),...e.clipBounds?{clipBounds:YE(e.clipBounds,t)}:{},contentBounds:YE(e.contentBounds,t),blocks:e.blocks}))}))}}function dD(e,t){return`${e}/occurrence/${encodeURIComponent(t).replaceAll(`%3A`,`:`)}`}function fD(e){if(!Number.isFinite(e.xPt)||!Number.isFinite(e.yPt))throw RangeError(`body occurrence translation must be finite`)}function pD(e){if(e.occurrenceId.length===0)throw RangeError(`occurrenceId must not be empty`);if(e.destination.flowDomainId.length===0)throw RangeError(`flowDomainId must not be empty`);fD(e.destination.translation)}function mD(e,t){let n=qE(e.positioning);return{xPt:n.x?t.xPt:0,yPt:n.y?t.yPt:0}}function hD(e){let t=new WeakSet,n=new WeakSet,r=e=>{if(t.has(e))throw TypeError(`body occurrence layout graph must be acyclic`);if(!n.has(e)){if(t.add(e),e.kind===`paragraph`)for(let t of e.textBoxes)for(let e of t.story.blocks)(e.kind===`paragraph`||e.kind===`table`)&&r(e);else{for(let t of e.rows)for(let e of t.cells)for(let t of e.blocks)r(t.layout);for(let t of e.floatingTables??[])r(t.child);for(let t of e.resolvedFloatingTables??[])r(t.source.child),r(t.child)}t.delete(e),n.add(e)}};r(e)}function gD(e,t){hD(e);let n=new WeakMap,r=new WeakMap,i=e=>`${e.xPt}\u0000${e.yPt}`,a=(e,t)=>{let n=i(t),a=r.get(e);if(a){if(a.key!==n)throw Error(`incompatible projection ownership`);return a.value}let o=lD(e,t),s=Object.freeze({...o,...e.sectionFlowOwnership===void 0?{}:{sectionFlowOwnership:e.sectionFlowOwnership}});return r.set(e,{key:n,value:s}),s},o=(e,t)=>{let r=i(t),a=n.get(e);if(a){if(a.key!==r)throw Error(`incompatible projection ownership`);return a.value}let s={...uD(e,t),...e.sectionFlowOwnership===void 0?{}:{sectionFlowOwnership:e.sectionFlowOwnership}};n.set(e,{key:r,value:s});let c=new Map,l=new Set;for(let n of e.resolvedFloatingTables??[]){let r=e.resolvedFloatingTableCoordinateSpace!==void 0;c.set(n.source,r?{xPt:0,yPt:0}:mD(n.source,t)),r&&l.add(n.source)}let u=new Map,d=e=>{let n=u.get(e);if(n)return n;let r=c.get(e)??t,i=l.has(e)?{xPt:0,yPt:0}:t,a={...e,anchorBounds:YE(e.anchorBounds,i),...e.columnBounds?{columnBounds:YE(e.columnBounds,i)}:{},child:o(e.child,r)};return u.set(e,a),a},f=(e.floatingTables??[]).map(d),p=(e.resolvedFloatingTables??[]).map(e=>{let n=d(e.source),r=c.get(e.source)??mD(e.source,t);return{...e,xPt:e.xPt+r.xPt,yPt:e.yPt+r.yPt,bounds:YE(e.bounds,r),exclusionBounds:YE(e.exclusionBounds,r),child:n.child,source:n}});return(e.floatingTables||e.resolvedFloatingTables)&&Object.assign(s,{floatingTables:f,resolvedFloatingTables:p}),s};return e.kind===`paragraph`?a(e,t):o(e,t)}function _D(e,t){return fD(t),gD(e,t)}function vD(e,t){pD(t);let n=gD(e,t.destination.translation),r=encodeURIComponent(t.occurrenceId),i=new WeakMap,a=new WeakMap,o=new WeakMap,s=new Map,c=new Map,l=e=>`${t.occurrenceId}/node/${encodeURIComponent(e)}`,u=e=>`${t.occurrenceId}/anchor/${encodeURIComponent(e)}`,d=e=>dD(t.occurrenceId,e),f=(e,n)=>`${t.destination.flowDomainId}/occurrence/${r}/${e}/${encodeURIComponent(n)}`,p=e=>e.kind===`drawing`?{...e,drawingId:l(e.drawingId)}:e.kind===`anchor-host`&&e.anchorOccurrenceId?{...e,anchorOccurrenceId:u(e.anchorOccurrenceId)}:e,m=(e,t)=>{let n=o.get(e);if(n){if(n.domain!==t)throw Error(`incompatible projection ownership`);return n.value}if(e.anchorLayer){let t=s.get(e.anchorLayer.occurrenceId);if(t&&t!==e)throw Error(`duplicate anchor occurrence owner`);s.set(e.anchorLayer.occurrenceId,e)}let r={...e,id:l(e.id),flowDomainId:t,...e.textBoxIds?{textBoxIds:e.textBoxIds.map(l)}:{},...e.anchorLayer?{anchorLayer:{...e.anchorLayer,occurrenceId:u(e.anchorLayer.occurrenceId),acquisitionOccurrenceId:e.anchorLayer.acquisitionOccurrenceId??e.anchorLayer.occurrenceId}}:{}};return o.set(e,{domain:t,value:r}),r},h=e=>{let t=f(`textbox`,e.id);return{...e,id:l(e.id),flowDomainId:t,story:{...e.story,blocks:e.story.blocks.map(e=>{if(e.kind===`paragraph`)return g(e,t);if(e.kind===`table`)return b(e,t);throw Error(`Text-box story contains unsupported retained node: ${e.kind}`)})}}},g=(e,t)=>{let n=a.get(e);if(n){if(n.domain!==t)throw Error(`incompatible projection ownership`);return n.value}let r={...e,id:l(e.id),flowDomainId:t,lines:e.lines.map(e=>({...e,placements:e.placements.map(p)})),drawings:e.drawings.map(e=>m(e,t)),textBoxes:e.textBoxes.map(h),exclusions:e.exclusions.map(e=>({...e,id:e.verticalOwnership===`page`&&!e.anchorOccurrenceId?e.id:l(e.id),...e.anchorOccurrenceId?{anchorOccurrenceId:u(e.anchorOccurrenceId)}:{}})),...e.anchorCollisions?{anchorCollisions:e.anchorCollisions.map(e=>({...e,occurrenceId:u(e.occurrenceId)}))}:{},...e.anchorFrames?{anchorFrames:e.anchorFrames.map(e=>({...e,occurrenceId:u(e.occurrenceId)}))}:{}};return a.set(e,{domain:t,value:r}),r},_=e=>{let t=f(`cell`,e.id);return{...e,id:l(e.id),flowDomainId:t,blocks:e.blocks.map(e=>({...e,layout:x(e.layout,t)}))}},v=(e,t)=>({...e,id:l(e.id),flowDomainId:t,...`occurrenceId`in e&&typeof e.occurrenceId==`string`?{occurrenceId:d(e.occurrenceId)}:{},cells:e.cells.map(_)}),y=e=>{let t=f(`cell`,e.hostCellId);return{...e,occurrenceId:d(e.occurrenceId),hostCellId:l(e.hostCellId),tableId:l(e.tableId),child:b(e.child,t)}},b=(e,t)=>{let n=i.get(e);if(n){if(n.domain!==t)throw Error(`incompatible projection ownership`);return n.value}let r={...e,id:l(e.id),flowDomainId:t,rows:e.rows.map(e=>v(e,t))};i.set(e,{domain:t,value:r});let a=new Map,o=e=>{let t=a.get(e);if(t)return t;let n=c.get(e.occurrenceId);if(n&&n!==e)throw Error(`duplicate floating placement occurrence owner`);c.set(e.occurrenceId,e);let r=y(e);return a.set(e,r),r},s=(e.floatingTables??[]).map(o),u=(e.resolvedFloatingTables??[]).map(e=>{let t=o(e.source);return{...e,occurrenceId:d(e.occurrenceId),child:t.child,source:t}});return(e.floatingTables||e.resolvedFloatingTables)&&Object.assign(r,{floatingTables:s,resolvedFloatingTables:u}),r};function x(e,t){return e.kind===`paragraph`?g(e,t):b(e,t)}let S=Ag(x(n,t.destination.flowDomainId),`DOCX body occurrence projection`);if(S.kind!==`table`||e.kind!==`table`)return S;let C=Object.isFrozen(e.columnWidthsPt)?e.columnWidthsPt:Object.freeze([...e.columnWidthsPt]);return Object.freeze({...S,columnWidthsPt:C})}var yD=class extends Error{code=`NEXT_COLUMN_DESTINATION_UNAVAILABLE`;constructor(e,t,n,r){super(`nextColumn requires a following column on the current page, but column ${e+1} is unavailable (outgoing columns: ${t}, incoming columns: ${n}, reason: ${r})`),this.outgoingColumnIndex=e,this.outgoingColumnCount=t,this.incomingColumnCount=n,this.reason=r,this.name=`UnsupportedPageFlowTransitionError`}};function bD(e,t){return e.sectionBidi?[...t].reverse():[...t]}function xD(e){let t=bD(e.section,e.columnSubset);return t[t.indexOf(e.columnIndex)+1]}function SD(e,t={}){let n=jC(e),r=MC(e),i=t.pageContentStartBlockPt??n,a=t.pageContentEndBlockPt??r,o=t.regionStartBlockPt??i,s=t.regionEndBlockPt??a,c=t.cursorBlockPt??o,l=t.deepestColumnBlockPt??c,u=t.pageIndex??0,d=Object.freeze([...t.columnSubset??e.columns.map((e,t)=>t)]),f=bD(e,d),p=t.columnIndex??f[0]??-1;if(!Number.isInteger(u)||u<0)throw RangeError(`Page index must be a non-negative integer`);if(!Number.isInteger(p)||p<0||p>=e.columns.length)throw RangeError(`Column index must identify a column in the active section`);if(d.length===0||d.some((t,n)=>!Number.isInteger(t)||t<0||t>=e.columns.length||n>0&&t<=d[n-1])||!d.includes(p))throw RangeError(`Column subset must be ordered, unique, and contain the active column`);if(![i,a,o,s,c,l].every(Number.isFinite))throw RangeError(`Page-flow cursors and bounds must be finite`);if(i>o||o>s||s>a||o>c||c>s||c>l)throw RangeError(`Page-flow bounds must contain the region and live cursor`);return Object.freeze({pageIndex:u,columnIndex:p,pageHasContent:t.pageHasContent??!1,cursorBlockPt:c,pageContentStartBlockPt:i,pageContentEndBlockPt:a,regionStartBlockPt:o,regionEndBlockPt:s,columnSubset:d,deepestColumnBlockPt:l,section:e})}function CD(e,t){return Object.freeze({state:e,events:Object.freeze(t.map(e=>Object.freeze({...e})))})}function wD(e,t,n){if(!Number.isFinite(n)||n<0)throw RangeError(`A flow node charge must be a finite non-negative value`);let r=e.cursorBlockPt,i=r+n;return CD(Object.freeze({...e,pageHasContent:!0,cursorBlockPt:i,deepestColumnBlockPt:Math.max(e.deepestColumnBlockPt,i)}),[{type:`place`,node:t,blockStartPt:r,blockEndPt:i}])}function TD(e,t){let n=Math.max(e.deepestColumnBlockPt,e.cursorBlockPt),r=xD(e);if(r!==void 0)return CD(Object.freeze({...e,columnIndex:r,cursorBlockPt:e.regionStartBlockPt,deepestColumnBlockPt:n}),[{type:`next-column`}]);let i=e.pageIndex+1;return CD(SD(e.section,{pageIndex:i}),[{type:`next-page`,reason:t,pageIndex:i,sectionOccurrenceId:e.section.sectionOccurrenceId,parityBlank:!1}])}function ED(e,t){return e.kind===t.kind&&e.linePitchPt===t.linePitchPt&&e.charSpacePt===t.charSpacePt}function DD(e,t){return e.xPt===t.xPt&&e.yPt===t.yPt&&e.widthPt===t.widthPt&&e.heightPt===t.heightPt}function OD(e,t){return e.xPt<t.xPt+t.widthPt&&t.xPt<e.xPt+e.widthPt&&e.yPt<t.yPt+t.heightPt&&t.yPt<e.yPt+e.heightPt}function kD(e,t,n){let r=n=>{throw new yD(e.columnIndex,e.section.columns.length,t.columns.length,n)},i=nv(e.section.textDirection),a=nv(t.textDirection);i!==a&&r(`writing-mode`);let o=cv({widthPt:e.section.geometry.pageWidth,heightPt:e.section.geometry.pageHeight},i),s=cv({widthPt:t.geometry.pageWidth,heightPt:t.geometry.pageHeight},a);(o.widthPt!==s.widthPt||o.heightPt!==s.heightPt)&&r(`page-extent`);let c=n.incomingPageContentStartBlockPt??jC(t),l=n.incomingPageContentEndBlockPt??MC(t);(c!==e.pageContentStartBlockPt||l!==e.pageContentEndBlockPt)&&r(`block-band`),ED(e.section.grid,t.grid)||r(`grid`);let u=bD(e.section,e.columnSubset),d=u.indexOf(e.columnIndex),f=u[d+1];if(f===void 0)throw Error(`nextColumn destination resolution requires a same-page successor`);let p=mv(i,o),m=e.section.columns[f],h=fv(p.logicalToPhysical,{xPt:m.xPt,yPt:e.regionStartBlockPt,widthPt:m.wPt,heightPt:e.regionEndBlockPt-e.regionStartBlockPt}),g=t.columns.findIndex(t=>DD(h,fv(p.logicalToPhysical,{xPt:t.xPt,yPt:e.regionStartBlockPt,widthPt:t.wPt,heightPt:e.regionEndBlockPt-e.regionStartBlockPt})));g<0&&r(`physical-column`);let _=bD(t,t.columns.map((e,t)=>t)),v=_.indexOf(g);v<0&&r(`physical-column`);let y=Object.freeze(_.slice(v).sort((e,t)=>e-t)),b=Object.freeze(u.slice(0,d+1).sort((e,t)=>e-t)),x=(t,n)=>{let r=t.columns[n];return fv(p.logicalToPhysical,{xPt:r.xPt,yPt:e.regionStartBlockPt,widthPt:r.wPt,heightPt:e.regionEndBlockPt-e.regionStartBlockPt})},S=b.map(t=>x(e.section,t));return y.some(e=>{let n=x(t,e);return S.some(e=>OD(e,n))})&&r(`physical-overlap`),Object.freeze({targetColumnIndex:g,targetColumnOrdinal:v,columnSubset:y,outgoingColumnSubset:b})}function AD(e,t,n){let r=e.pageIndex+1;return CD(SD(t,{pageIndex:r}),[{type:`next-page`,reason:n,pageIndex:r,sectionOccurrenceId:t.sectionOccurrenceId,parityBlank:!1}])}function jD(e,t){let n=e%2==0;return t===`odd`?n:!n}function MD(e,t,n,r){let i=e.pageIndex+1,a=[];return r!==void 0&&!jD(i,r)&&(a.push({type:`next-page`,reason:`parity`,pageIndex:i,sectionOccurrenceId:e.section.sectionOccurrenceId,parityBlank:!0}),i+=1),a.push({type:`next-page`,reason:n,pageIndex:i,sectionOccurrenceId:t.sectionOccurrenceId,parityBlank:!1}),CD(SD(t,{pageIndex:i}),a)}function ND(e,t,n){return t===`lastRenderedPageBreak`?CD(e,[]):t===`column`?TD(e,`explicit-break`):t===`pageBreakBefore`&&!e.pageHasContent&&e.columnIndex===bD(e.section,e.columnSubset)[0]&&e.cursorBlockPt===e.pageContentStartBlockPt?CD(e,[]):t===`page`?MD(e,e.section,`explicit-break`,n):AD(e,e.section,`page-break-before`)}function PD(e,t,n,r={}){if(n===`continuous`&&!r.hasFootnoteReferenceOnCurrentPage){let n=e.section.columns.length>1?Math.max(e.cursorBlockPt,e.deepestColumnBlockPt):e.cursorBlockPt;return CD(SD(t,{pageIndex:e.pageIndex,pageContentStartBlockPt:e.pageContentStartBlockPt,pageContentEndBlockPt:e.pageContentEndBlockPt,cursorBlockPt:n,regionStartBlockPt:n,regionEndBlockPt:e.pageContentEndBlockPt,deepestColumnBlockPt:n,pageHasContent:e.pageHasContent}),[{type:`begin-section`,placement:`same-page-block`,section:t,targetColumnOrdinal:0,columnSubset:t.columns.map((e,t)=>t)}])}if(n===`nextColumn`){if(xD(e)===void 0){let n=AD(e,t,`section-break`);return CD(n.state,[...n.events,{type:`begin-section`,section:t}])}let n=kD(e,t,r);return CD(Object.freeze({...e,columnIndex:n.targetColumnIndex,columnSubset:n.columnSubset,cursorBlockPt:e.regionStartBlockPt,deepestColumnBlockPt:Math.max(e.deepestColumnBlockPt,e.cursorBlockPt),section:t}),[{type:`next-column`},{type:`begin-section`,placement:`same-page-column`,section:t,targetColumnOrdinal:n.targetColumnOrdinal,columnSubset:n.columnSubset,outgoingColumnSubset:n.outgoingColumnSubset}])}if(n===`continuous`){let n=AD(e,t,`section-break`);return CD(n.state,[...n.events,{type:`begin-section`,section:t}])}let i=MD(e,t,`section-break`,n===`oddPage`?`odd`:n===`evenPage`?`even`:void 0);return CD(i.state,[...i.events,{type:`begin-section`,section:t}])}function FD(e,t,n,r){let i=e,a=0;for(let o=e+1;o<=t;o++){let e=r(o);if(!(e<=n))break;i=o,a=e}return{end:i,fitValue:a}}function ID(e){return!e.widowControl||e.end>=e.totalLines?{kind:`keep`}:e.totalLines-e.end===1&&e.end-e.start>=2?{kind:`dropLastLine`}:e.start===0&&e.end-e.start===1&&e.canRelocate?{kind:`relocate`}:{kind:`keep`}}$({id:`word-terminal-column-break`,evidence:{kind:`regression-test`,reference:`packages/docx/src/pagination.test.ts#ignores a terminal last-column break before a hard page boundary`},description:`The established pagination regression contract does not materialize a column transition when no body flow content occurs before the next forced page or non-continuous section boundary.`}),$({id:`word-pre-break-anchor-paragraph`,evidence:{kind:`regression-test`,reference:`packages/docx/src/pagination.test.ts#does not push an anchor-only pre-break paragraph to a new page just for its empty mark`},description:`The established pagination regression contract keeps an anchor-only paragraph immediately before an authored page break in the pre-break flow region without charging its otherwise visible paragraph mark.`}),$({id:`word-pre-break-inline-drawing-group`,evidence:{kind:`regression-test`,reference:`packages/docx/src/pagination.test.ts#moves a preceding image with its pre-break callout when the pair only fits fresh`},description:`The established pagination regression contract relocates a preceding inline DrawingML resource with an immediately following host-owned anchor paragraph before an authored page break when the pair fits only in a fresh flow region.`}),$({id:`word-continuous-section-mark-spacing`,evidence:{kind:`regression-test`,reference:`packages/docx/src/body-layout-input.test.ts#projects mutually exclusive collapsed-mark and drop-previous-after roles`},description:`The retained body input projects the established continuous-section empty-mark spacing behavior into one mutually exclusive role before pagination.`}),$({id:`word-contextual-spacing-per-side`,evidence:{kind:`regression-test`,reference:`packages/docx/src/contextual-spacing-body-paint.test.ts#paints the adjudicated six-case gap table`},description:`For same-style adjacent paragraphs, contextualSpacing removes only the contribution owned by each toggling side; a current-only toggle preserves the previous paragraph spaceAfter contribution.`}),$({id:`word-empty-keep-next-bridge`,evidence:{kind:`regression-test`,reference:`packages/docx/src/layout/body-paginator-production.test.ts#bridges an undecorated empty keepNext mark through the following paragraph`},description:`Word print pagination treats an undecorated empty keep-with-next paragraph as a bridge: the following paragraph is admitted completely with the first indivisible content of its successor.`}),$({id:`word-automatic-keep-next-start-spacing`,evidence:{kind:`regression-test`,reference:`packages/docx/src/layout/body-paginator-production.test.ts#suppresses leading spacing when a keepNext unit moves to an automatic page`},description:`When automatic overflow relocates a keep-with-next unit to a fresh physical page, suppress the leading paragraph space-before for that grouped relocation without changing ordinary overflow or authored-break spacing.`}),$({id:`word-trailing-space-after-fit-admission`,evidence:{kind:`regression-test`,reference:`packages/docx/src/layout/paragraph-pagination.test.ts#admits final visible content when only authored spaceAfter crosses the region edge`},description:`Admit the final visible paragraph content at a flow-region edge when only its authored trailing space crosses the edge, while retaining that space for placement and paint.`}),$({id:`word-vertical-rl-final-line-baseline-admission`,evidence:{kind:`office-observation`,syntheticFixtureId:`vertical-rl-final-line-baseline-admission`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`In a vertical-rl section, Word admits the final visible text column when its transformed baseline and retained visible ink remain inside the block-end edge even if the complete logical line box crosses that edge. The complete retained advance remains authoritative after admission.`}),$({id:`word-lowered-drop-cap-anchor-leading`,evidence:{kind:`office-observation`,syntheticFixtureId:`lowered-drop-cap-anchor-leading`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`Word keeps the following anchor text below a baseline-lowered drop-cap glyph while preserving the drop cap exclusion height authored by framePr lines. ECMA-376 specifies those two inputs independently but does not prescribe this interaction.`});function LD(e){return Math.max(0,e)}function RD(e){return e===`none`}function zD(e){return Math.max(0,e.advancePt-Math.min(e.authoredSpaceAfterPt,e.retainedSpaceAfterPt))}function BD(e){return e.origin.yPt+(e.inkBounds?.descentPt??0)}function VD(e){if(e.kind===`resource`||e.kind===`drawing`)return e.bounds.yPt+e.bounds.heightPt;if(e.kind===`anchor-host`)return null;if(e.kind===`tab`){let t=e.leaderGlyphs??[];return t.length>0?Math.max(...t.map(BD)):null}let t=e.paintOps??[],n=t.length>0?t.map(t=>e.origin.yPt+t.offset.yPt+(t.blockAxisInkBounds?.endPt??t.inkBounds?.descentPt??0)):[e.origin.yPt];for(let t of e.decorations){let e=t.widthPt/2;n.push(t.from.yPt+e,t.to.yPt+e);for(let r of t.path??[])n.push(r.yPt+e)}for(let t of e.highlightFragments??[])n.push(t.rect.yPt+t.rect.heightPt);for(let t of e.runBorderFragments??[]){let e=t.widthPt/2;n.push(t.from.yPt+e,t.to.yPt+e)}for(let t of e.emphasis?.glyphs??[])n.push(BD(t));for(let t of e.ruby?.paintOps??[])n.push(BD(t));for(let t of e.emphasis?.paths??[]){let e=t.stroke===null?0:t.strokeWidthPt/2;for(let r of t.points)n.push(r.yPt+e)}return Math.max(...n)}function HD(e){if(e.writingMode!==`vertical-rl`||e.logicalLineBoxExtentPt<=e.availableBlockExtentPt)return e.logicalLineBoxExtentPt;let t=e.paragraph.lines.at(-1);if(!t||t.placements.some(e=>e.kind===`text`&&(e.paintOps??[]).some(e=>e.glyphOrientation!==void 0&&e.blockAxisInkBounds===void 0)))return e.logicalLineBoxExtentPt;let n=t.placements.flatMap(e=>{let t=VD(e);return t===null?[]:[t]});if(n.length===0||e.paragraph.shading)return e.logicalLineBoxExtentPt;for(let t of e.paragraph.borders){let e=t.widthPt/2;n.push(t.from.yPt+e,t.to.yPt+e)}if(e.paragraph.paragraphMark&&!e.paragraph.paragraphMark.hidden){let t=e.paragraph.paragraphMark.bounds;n.push(t.yPt+t.heightPt)}return Math.max(0,Math.max(...n)-e.paragraph.flowBounds.yPt)}function UD(e){return e.keepNext&&e.inkless&&e.undecoratedMark}function WD(e,t){let n=e[t];if(n?.kind!==`body-block`||n.block.kind!==`paragraph`)return;let r=e[t+1],i=e[t+2],a=n.block.inkless===!0&&r?.kind===`begin-section`&&r.section.startType===`continuous`;return a&&n.block.spaceBeforePt===0?`collapse-mark`:a?`suppress-before`:n.block.inkless===!0&&r?.kind===`body-block`&&r.block.kind===`paragraph`&&r.block.inkless===!0&&r.block.spaceBeforePt===0&&i?.kind===`begin-section`&&i.section.startType===`continuous`?`drop-previous-after`:void 0}function GD(e){return e.drawings.length>0&&e.lines.every(e=>e.placements.every(e=>e.kind===`drawing`||e.kind===`anchor-host`))}function KD(e){return e.lines.some(e=>e.placements.some(e=>(e.kind===`resource`&&(e.resourceKind===`image`||e.resourceKind===`chart`)||e.kind===`drawing`)&&e.advancePt>0&&e.bounds!==void 0&&e.bounds.widthPt>0&&e.bounds.heightPt>0))}function qD(e,t){if(!GD(e))return null;let n=e.drawings.filter(e=>e.anchorLayer?.verticalOwnership===`host`&&Number.isFinite(e.flowBounds.xPt)&&Number.isFinite(e.flowBounds.yPt)&&Number.isFinite(e.flowBounds.widthPt)&&Number.isFinite(e.flowBounds.heightPt)&&e.flowBounds.widthPt>0&&e.flowBounds.heightPt>0);if(n.length!==e.drawings.length)return null;let r=Math.max(...n.map(e=>e.flowBounds.yPt+e.flowBounds.heightPt));return Math.max(0,r-t)}function JD(e){if(!GD(e))return null;let{paragraphMark:t,...n}=e;return Object.freeze({...n,advancePt:0,flowBounds:Object.freeze({...e.flowBounds,heightPt:0})})}function YD(e){let t=new Set,n=!1;for(let r=e.length-1;r>=0;--r){let i=e[r];if(i.kind===`body-block`){n=i.block.kind!==`paragraph`||!i.block.pageBreakBefore;continue}if(i.kind===`adjacent-table-group`){n=!0;continue}if(i.kind===`authored-break`){i.break===`column`?n&&t.add(r):n=!1;continue}i.kind===`begin-section`&&i.section.startType!==`continuous`&&(n=!1)}return t}function XD(e,t,n,r,i=-1/0,a=!0,o=!1){return th(e,t,{firstContentSi:n,lastDrawnSi:r,minPerGap:i,seaClusterGaps:o,...a?{}:{isGapChar:()=>!1}})}function ZD(e){if(!e)return 0;let t=0;for(let n of e.perSeg.values())t+=n.splitBefore.length+ +!!n.trailingGap;return e.perGap*t}function QD(e,t,n,r,i){return t>=0?null:XD(e,t,n,r,-i*.25,!1)}const $D=[`U`,`C`,`D`,`L`,`R`,`T`],eO=[0,173,174,768,880,1155,1162,1425,1470,1471,1472,1473,1475,1476,1478,1479,1480,1552,1563,1564,1565,1568,1569,1570,1574,1575,1576,1577,1578,1583,1587,1600,1601,1608,1609,1611,1632,1646,1648,1649,1652,1653,1656,1672,1690,1728,1729,1731,1740,1741,1742,1743,1744,1746,1748,1749,1750,1757,1759,1765,1767,1769,1770,1774,1776,1786,1789,1791,1792,1807,1808,1809,1810,1813,1818,1822,1823,1832,1833,1834,1835,1836,1837,1839,1840,1867,1869,1870,1881,1884,1899,1901,1905,1906,1907,1909,1912,1914,1920,1958,1969,1994,2027,2036,2042,2043,2045,2046,2070,2074,2075,2084,2085,2088,2089,2094,2112,2113,2118,2120,2121,2122,2132,2133,2134,2137,2140,2144,2145,2146,2150,2151,2152,2153,2155,2160,2179,2182,2183,2185,2190,2191,2192,2199,2208,2218,2221,2222,2223,2225,2227,2233,2234,2249,2250,2274,2275,2307,2362,2363,2364,2365,2369,2377,2381,2382,2385,2392,2402,2404,2433,2434,2492,2493,2497,2501,2509,2510,2530,2532,2558,2559,2561,2563,2620,2621,2625,2627,2631,2633,2635,2638,2641,2642,2672,2674,2677,2678,2689,2691,2748,2749,2753,2758,2759,2761,2765,2766,2786,2788,2810,2816,2817,2818,2876,2877,2879,2880,2881,2885,2893,2894,2901,2903,2914,2916,2946,2947,3008,3009,3021,3022,3072,3073,3076,3077,3132,3133,3134,3137,3142,3145,3146,3150,3157,3159,3170,3172,3201,3202,3260,3261,3263,3264,3270,3271,3276,3278,3298,3300,3328,3330,3387,3389,3393,3397,3405,3406,3426,3428,3457,3458,3530,3531,3538,3541,3542,3543,3633,3634,3636,3643,3655,3663,3761,3762,3764,3773,3784,3791,3864,3866,3893,3894,3895,3896,3897,3898,3953,3967,3968,3973,3974,3976,3981,3992,3993,4029,4038,4039,4141,4145,4146,4152,4153,4155,4157,4159,4184,4186,4190,4193,4209,4213,4226,4227,4229,4231,4237,4238,4253,4254,4957,4960,5906,5909,5938,5940,5970,5972,6002,6004,6068,6070,6071,6078,6086,6087,6089,6100,6109,6110,6151,6152,6154,6155,6158,6159,6160,6176,6265,6277,6279,6313,6314,6315,6432,6435,6439,6441,6450,6451,6457,6460,6679,6681,6683,6684,6742,6743,6744,6751,6752,6753,6754,6755,6757,6765,6771,6781,6783,6784,6832,6878,6880,6892,6912,6916,6964,6965,6966,6971,6972,6973,6978,6979,7019,7028,7040,7042,7074,7078,7080,7082,7083,7086,7142,7143,7144,7146,7149,7150,7151,7154,7212,7220,7222,7224,7376,7379,7380,7393,7394,7401,7405,7406,7412,7413,7416,7418,7616,7680,8203,8204,8205,8206,8208,8234,8239,8288,8293,8298,8304,8400,8433,11503,11506,11647,11648,11744,11776,12330,12334,12441,12443,42607,42611,42612,42622,42654,42656,42736,42738,43010,43011,43014,43015,43019,43020,43045,43047,43052,43053,43072,43122,43123,43204,43206,43232,43250,43263,43264,43302,43310,43335,43346,43392,43395,43443,43444,43446,43450,43452,43454,43493,43494,43561,43567,43569,43571,43573,43575,43587,43588,43596,43597,43644,43645,43696,43697,43698,43701,43703,43705,43710,43712,43713,43714,43756,43758,43766,43767,44005,44006,44008,44009,44013,44014,64286,64287,65024,65040,65056,65072,65279,65280,65529,65532,66045,66046,66272,66273,66422,66427,68097,68100,68101,68103,68108,68112,68152,68155,68159,68160,68288,68293,68294,68295,68296,68297,68299,68301,68302,68307,68311,68312,68317,68318,68321,68322,68324,68325,68327,68331,68335,68336,68480,68481,68482,68483,68486,68489,68490,68492,68493,68494,68496,68497,68498,68521,68525,68527,68864,68865,68898,68899,68900,68904,68969,68974,69291,69293,69314,69315,69317,69318,69320,69370,69376,69424,69427,69428,69445,69446,69457,69460,69461,69488,69492,69494,69506,69510,69552,69553,69554,69556,69559,69560,69561,69563,69565,69566,69568,69569,69570,69572,69573,69577,69578,69579,69580,69633,69634,69688,69703,69744,69745,69747,69749,69759,69762,69811,69815,69817,69819,69826,69827,69888,69891,69927,69932,69933,69941,70003,70004,70016,70018,70070,70079,70089,70093,70095,70096,70191,70194,70196,70197,70198,70200,70206,70207,70209,70210,70367,70368,70371,70379,70400,70402,70459,70461,70464,70465,70502,70509,70512,70517,70587,70593,70606,70607,70608,70609,70610,70611,70625,70627,70712,70720,70722,70725,70726,70727,70750,70751,70835,70841,70842,70843,70847,70849,70850,70852,71090,71094,71100,71102,71103,71105,71132,71134,71219,71227,71229,71230,71231,71233,71339,71340,71341,71342,71344,71350,71351,71352,71453,71454,71455,71456,71458,71462,71463,71468,71727,71736,71737,71739,71995,71997,71998,71999,72003,72004,72148,72152,72154,72156,72160,72161,72193,72203,72243,72249,72251,72255,72263,72264,72273,72279,72281,72284,72330,72343,72344,72346,72544,72545,72546,72549,72550,72551,72752,72759,72760,72766,72767,72768,72850,72872,72874,72881,72882,72884,72885,72887,73009,73015,73018,73019,73020,73022,73023,73030,73031,73032,73104,73106,73109,73110,73111,73112,73459,73461,73472,73474,73526,73531,73536,73537,73538,73539,73562,73563,78896,78913,78919,78934,90398,90410,90413,90416,92912,92917,92976,92983,94031,94032,94095,94099,94180,94181,113821,113823,113824,113828,118528,118574,118576,118599,119143,119146,119155,119171,119173,119180,119210,119214,119362,119365,121344,121399,121403,121453,121461,121462,121476,121477,121499,121504,121505,121520,122880,122887,122888,122905,122907,122914,122915,122917,122918,122923,123023,123024,123184,123191,123566,123567,123628,123632,124140,124144,124398,124400,124643,124644,124646,124647,124654,124656,124661,124662,125136,125143,125184,125252,125260,917505,917506,917536,917632,917760,918e3],tO=[0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,2,0,4,2,4,2,4,2,4,2,1,2,4,2,5,0,2,5,4,0,4,2,4,2,4,2,4,2,4,2,4,2,4,0,4,5,0,5,0,5,0,5,4,0,2,0,2,0,5,4,5,2,4,2,4,2,4,2,4,2,4,2,4,5,0,4,2,4,2,4,2,4,2,4,2,4,2,0,5,0,2,5,0,1,0,5,0,5,0,5,0,5,0,5,0,4,2,4,2,4,2,4,2,4,5,0,2,0,2,0,4,2,4,0,4,1,2,0,2,4,2,0,5,2,4,0,4,2,4,2,4,2,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,2,0,1,5,0,5,0,2,0,5,2,5,2,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,1,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,2,3,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,2,4,0,4,0,4,0,3,4,2,3,2,4,2,4,0,4,5,0,2,4,0,2,4,2,4,2,4,2,4,2,4,2,4,0,4,2,0,3,2,4,2,5,0,5,0,5,0,4,2,0,2,0,5,0,2,4,2,0,5,2,4,0,2,4,2,5,0,2,0,2,4,0,2,4,2,4,2,0,2,4,2,0,4,2,3,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,2,5,0,5,0,5,0,5,0],nO=[1587,1588,1589,1590,1690,1691,1692,1693,1694,1786,1787,1884,1901,1904,1917,1918,2223],rO=[1580,1581,1582,1665,1666,1667,1668,1669,1670,1671,1727,1879,1880,1902,1903,1906,1916,2186,2210,2241,2245,2246],iO=[1576,1578,1579,1646,1657,1658,1659,1660,1661,1662,1663,1664,1872,1873,1874,1875,1876,1877,1878,2208,2209,2230,2231,2232,2238,2239,2240],aO=[1574,1585,1586,1597,1598,1599,1609,1610,1656,1681,1682,1683,1684,1685,1686,1687,1688,1689,1740,1742,1744,1745,1775,1883,1899,1900,1905,1909,1910,1911,2216,2217,2218,2226,2233,2234,69319],oO=[1570,1571,1573,1575,1591,1592,1595,1596,1603,1604,1649,1650,1651,1653,1695,1705,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1890,1891,1892,1898,1907,1908,1919,2160,2161,2162,2163,2164,2165,2166,2167,2168,2169,2170,2171,2172,2173,2174,2175,2176,2177,2178,2187,2188,2189,2211,2214,2224,2228,2242,2247,2248,69315,69316],sO=[1572,1593,1594,1601,1602,1608,1647,1654,1655,1696,1697,1698,1699,1700,1701,1702,1703,1704,1732,1733,1734,1735,1736,1737,1738,1739,1743,1788,1885,1886,1887,1888,1889,1912,1913,2212,2213,2219,2227,2229,2243];function cO(e){let t=0,n=eO.length-1,r=-1;for(;t<=n;){let i=t+(n-t>>1);eO[i]<=e?(r=i,t=i+1):n=i-1}return r<0?`U`:$D[tO[r]]??`U`}function lO(e){let t=cO(e);return t===`D`||t===`L`||t===`C`}function uO(e){let t=cO(e);return t===`D`||t===`R`||t===`C`}const dO=new Set([1575,1570,1571,1573,1649]),fO=new Set(nO),pO=new Set(rO),mO=new Set(iO),hO=new Set(aO),gO=new Set(oO),_O=new Set(sO);var vO=function(e){return e[e.Normal=7]=`Normal`,e[e.Waw=8]=`Waw`,e[e.BaRa=9]=`BaRa`,e[e.Alef=10]=`Alef`,e[e.HahDal=11]=`HahDal`,e[e.Seen=12]=`Seen`,e[e.Kashida=13]=`Kashida`,e}(vO||{});function yO(e){let t=[...e].map(e=>e.codePointAt(0)),n=[],r=t.length>0&&cO(t[0])!==`T`?0:-1;for(let e=1;e<t.length;e++){let i=t[e];if(cO(i)!==`T`){if(r>=0){let a=t[r];!(a===1604&&dO.has(i))&&lO(a)&&uO(i)&&n.push(e)}r=e}}return n}function bO(e,t,n){let r=t-1;for(;r>=0&&cO(e[r])===`T`;)r--;let i=e[r],a=e[t];return i===1600?vO.Kashida:fO.has(i)?vO.Seen:pO.has(i)?vO.HahDal:ox(t,n)&&gO.has(a)?vO.Alef:mO.has(i)&&hO.has(a)?vO.BaRa:ox(t,n)&&_O.has(a)?vO.Waw:vO.Normal}function xO(e){let t=[...e],n=[];for(let e=0;e<t.length;){for(;e<t.length&&/\s/u.test(t[e]);)e++;if(e>=t.length)break;let r=e+1;for(;r<t.length&&!/\s/u.test(t[r]);)r++;let i=t.slice(e,r),a=i.map(e=>e.codePointAt(0)),o=a.length-1;for(;o>=0&&cO(a[o])===`T`;)o--;let s=-1,c=-1;for(let e of yO(i.join(``))){let t=bO(a,e,o);t>=c&&(s=e,c=t)}s>=0&&n.push({beforeCp:e+s,priority:c}),e=r}return n}function SO(e,t){let n=[...e],r=``;for(let e=0;e<n.length;e++){let i=t.get(e)??0;i>0&&(r+=`ـ`.repeat(i)),r+=n[e]}return r}function CO(e,t,n,r){if(t<=.5)return null;let i=[];for(let t=0;t<e.length;t++){let n=e[t].text;if(n!==void 0)for(let{beforeCp:e,priority:r}of xO(n))i.push({si:t,beforeCp:e,priority:r,textOrder:i.length})}if(i.length===0)return null;i.sort((e,t)=>t.priority-e.priority||e.textOrder-t.textOrder);let a=n===`low`?1:n===`medium`?2:1/0,o=a,s=i.length*64,c=new Map,l=new Map,u=new Map;for(let{si:t}of i){if(u.has(t))continue;let n=r(t,e[t].text);l.set(t,n),u.set(t,n)}let d=t,f=0;for(let t=0;t<o&&d>.5&&f<s;t++){let t=!1;for(let{si:n,beforeCp:o}of i){if(d<=.5||f>=s)break;let i=c.get(n);i||(i=new Map,c.set(n,i));let l=i.get(o)??0;if(l>=a)continue;i.set(o,l+1);let p=r(n,SO(e[n].text,i)),m=p-u.get(n);m>0&&m<=d+1e-6?(u.set(n,p),d-=m,f++,t=!0):l===0?i.delete(o):i.set(o,l)}if(!t)break}let p=new Map;for(let[t,n]of c){let r=[...n.entries()].filter(([,e])=>e>0).sort(([e],[t])=>e-t).map(([e,t])=>({beforeCp:e,count:t}));r.length!==0&&p.set(t,{text:SO(e[t].text,n),insertions:r,advanceDeltaPx:u.get(t)-l.get(t)})}if(p.size===0)return null;let m=[...p.values()].reduce((e,t)=>e+t.advanceDeltaPx,0);return{perSeg:p,appliedPx:m,residualPx:t-m}}function wO(e){return Object.freeze({status:`unsupported`,command:Object.freeze({kind:`noop`}),diagnostics:Object.freeze([Object.freeze({code:`UNSUPPORTED_FEATURE`,severity:`error`,message:e})])})}function TO(e){return e?{type:e.type,w:e.w,len:e.len}:void 0}function EO(e){if(e)return e.fillType===`gradient`?{fillType:`gradient`,stops:e.stops.map(e=>({position:e.position,color:e.color})),angle:e.angle,gradType:e.gradType,...e.scaled===void 0?{}:{scaled:e.scaled},...e.path===void 0?{}:{path:e.path},...e.fillToRect===void 0?{}:{fillToRect:{...e.fillToRect}},...e.tileRect===void 0?{}:{tileRect:{...e.tileRect}},...e.flip===void 0?{}:{flip:e.flip},...e.rotWithShape===void 0?{}:{rotWithShape:e.rotWithShape}}:{fillType:`pattern`,fg:e.fg,bg:e.bg,preset:e.preset}}function DO(e){if(!e.stroke||!e.strokeWidth||e.strokeWidth<=0)return null;let t=EO(e.strokeFill);return{color:e.stroke,width:e.strokeWidth,...t?{fill:t}:{},...e.strokeDash?{dashStyle:e.strokeDash}:{},...e.strokeCustomDash?.length?{customDash:e.strokeCustomDash}:{},...e.strokeCap?{lineCap:e.strokeCap}:{},...e.strokeJoin?{lineJoin:e.strokeJoin}:{},...e.strokeMiterLimit!==void 0&&e.strokeMiterLimit!==null?{miterLimit:e.strokeMiterLimit}:{},...e.strokeAlignment?{alignment:e.strokeAlignment}:{},...e.strokeCompound?{cmpd:e.strokeCompound}:{},...TO(e.headEnd)?{headEnd:TO(e.headEnd)}:{},...TO(e.tailEnd)?{tailEnd:TO(e.tailEnd)}:{}}}function OO(e,t,n,r,i){let a=r!==void 0&&(r.textPathOk!==void 0||r.on!==void 0||r.fitShape!==void 0||r.fitPath!==void 0||r.trim!==void 0||r.xScale!==void 0);if(r!==void 0&&(!a||r.textPathOk===!0&&r.on===!0)){if(e.fill?.fillType===`image`)return wO(`VML textPath with a DrawingML image fill is not rendered`);if(r.fitPath===!0)return wO(`VML textPath fitPath=true is not rendered`);if(r.xScale===!0)return wO(`VML textPath xScale=true is not rendered`);if(r.string.trim().length===0)return Object.freeze({status:`planned`,command:Object.freeze({kind:`noop`})});if(!n)throw Error(`Shape textPath acquisition requires TextLayoutService`);let i=a?r.fitShape===!0:!0;if(r.fontSizePt!==void 0&&(!Number.isFinite(r.fontSizePt)||r.fontSizePt<0))throw RangeError(`VML textPath fontSizePt must be finite and non-negative`);if(!i&&r.fontSizePt===void 0)return wO(`VML textPath fitShape=false requires an authored font-size`);if(r.fontSizePt===0)return Object.freeze({status:`planned`,command:Object.freeze({kind:`noop`})});let o=r.fontSizePt??1,s=r.fontFamily??void 0,c=n.shape({text:r.string,fontSizePt:o,fonts:{ascii:s,highAnsi:s,eastAsia:s,complexScript:s},weight:r.bold?700:400,style:r.italic?`italic`:`normal`,measure:!0});if(r.trim===!0&&!c.inkBounds)return wO(`VML textPath trim=true requires glyph ink bounds`);let l=r.trim===!0?c.inkBounds?.xMinPt??0:0,u=r.trim===!0?c.inkBounds?.xMaxPt??0:c.advancePt,d=r.trim===!0?c.inkBounds?.ascentPt??0:c.ascentPt,f=r.trim===!0?c.inkBounds?.descentPt??0:c.descentPt,p={xPt:l,yPt:-d,widthPt:u-l,heightPt:d+f};if(!Number.isFinite(c.advancePt)||Object.values(p).some(e=>!Number.isFinite(e))||c.spans.some(e=>!Number.isFinite(e.advancePt)))throw Error(`Shape textPath acquisition produced non-finite metrics`);return p.widthPt<=0||p.heightPt<=0||c.spans.length===0?wO(`VML textPath produced empty glyph metrics`):Object.freeze({status:`planned`,command:Ag({kind:`watermark-text`,rect:{...t},text:r.string,fill:e.fill?{...e.fill,...e.fill.fillType===`gradient`?{stops:e.fill.stops.map(e=>({...e}))}:{}}:null,opacity:Math.max(0,Math.min(1,e.fillOpacity??1)),rotationDeg:e.rotation??0,fitShape:i,fontSizePt:o,sourceBounds:p,spans:c.spans.map(e=>({text:e.text,advancePt:e.advancePt,fontRoute:e.fontRoute,fontWeight:e.font.weight,fontStyle:e.font.style}))},`VML textPath command`)})}let o={rect:{x:t.xPt,y:t.yPt,w:t.widthPt,h:t.heightPt},geometry:e.presetGeometry?{kind:`preset`,name:e.presetGeometry,adjustments:[...e.adjValues??[]]}:{kind:`custom`,subpaths:e.subpaths.map(e=>e.map(e=>({...e})))},fill:e.fill&&e.fill.fillType!==`image`?{...e.fill,...e.fill.fillType===`gradient`?{stops:e.fill.stops.map(e=>({...e}))}:{}}:null,stroke:DO(e),transform:{rotationDeg:e.rotation??0,flipH:e.flipH??!1,flipV:e.flipV??!1}};if(e.fill?.fillType===`image`){if(e.fill.tile!==void 0)return Object.freeze({status:`unsupported`,command:Object.freeze({kind:`noop`}),diagnostics:Object.freeze([Object.freeze({code:`UNSUPPORTED_FEATURE`,severity:`error`,message:`Tiled DrawingML shape image fills are not rendered`})])});if(!i)throw Error(`DrawingML shape image fill requires a retained image resource key`);return Object.freeze({status:`planned`,command:Ag({kind:`drawingml-image-fill`,plan:o,resourceKey:i,...e.fill.fillRect===void 0?{}:{fillRect:{l:e.fill.fillRect.l??0,t:e.fill.fillRect.t??0,r:e.fill.fillRect.r??0,b:e.fill.fillRect.b??0}}},`DrawingML shape image-fill command`)})}return Object.freeze({status:`planned`,command:Ag({kind:`drawingml-shape`,plan:o},`DrawingML shape command`)})}function kO(e,t){let n=e.fontFamily??null;return{fontSizePt:t,fonts:{ascii:n,highAnsi:n,eastAsia:e.fontFamilyEastAsia??n,complexScript:n},weight:400,style:`normal`,complexScript:!1}}function AO(e,t={story:`textbox`,storyInstance:`shape`,path:[]},n=kO){return Ag((e.textBlocks??[]).map((e,r)=>{let i={story:`textbox`,storyInstance:t.storyInstance,path:[...t.path,r]},a=e.runs?.length?e.runs:[{text:e.text,fontSizePt:e.fontSizePt,color:e.color,fontFamily:e.fontFamily,bold:e.bold,italic:e.italic}],o=e.paragraphMarkColor===void 0?e.color??a[0]?.color:e.paragraphMarkColor??void 0,s=e.numbering?{...e.numbering,...e.numbering.color==null&&!e.numbering.colorAuto&&o?{color:o}:{}}:null;return{source:i,spacing:{beforePt:e.spaceBefore??0,afterPt:e.spaceAfter??0},runs:a.map(t=>({text:t.text,fontSizePt:t.fontSizePt,...t.color??e.color?{color:`#${t.color??e.color}`}:{},...t.fontFamily||e.fontFamily?{fontFamily:t.fontFamily??e.fontFamily??void 0}:{},...t.fontFamilyEastAsia?{fontFamilyEastAsia:t.fontFamilyEastAsia}:{},bold:t.bold??e.bold??!1,italic:t.italic??e.italic??!1,...t.ruby?{ruby:t.ruby}:{}})),alignment:e.alignment??`left`,indentLeftPt:e.indentLeft??0,indentRightPt:e.indentRight??0,indentFirstPt:e.indentFirst??0,lineSpacing:e.lineSpacingVal==null?null:{value:e.lineSpacingVal,rule:e.lineSpacingRule===`exact`||e.lineSpacingRule===`atLeast`?e.lineSpacingRule:`auto`,explicit:!0},tabStops:(e.tabStops??[]).map(e=>({...e})),...e.bidi===void 0?{}:{bidi:e.bidi},contextualSpacing:e.contextualSpacing??!1,...e.styleId===void 0?{}:{styleId:e.styleId},...s?{numbering:s,numberingMarkerShapeInput:n(s,e.fontSizePt)}:{},...e.imagePath?{image:{imagePath:e.imagePath,mimeType:e.mimeType??`application/octet-stream`,...e.svgImagePath?{svgImagePath:e.svgImagePath}:{},widthPt:e.imageWidthPt??0,heightPt:e.imageHeightPt??0}}:{}}}),`DOCX text box acquisition input`)}function jO(e){if(!Number.isFinite(e.advancePt)||e.advancePt<=0)throw RangeError(`Tab leader glyph advance must be finite and positive`);let t=Math.floor(e.interval.widthPt/e.advancePt),n=e.interval.widthPt-t*e.advancePt;return Array.from({length:t},(t,r)=>({text:e.glyph,origin:{xPt:e.interval.xPt+n/2+r*e.advancePt,yPt:e.baselinePt},fontRoute:e.fontRoute,fontSizePt:e.fontSizePt,fontWeight:e.fontWeight,fontStyle:e.fontStyle,color:e.color}))}function MO(e){let t;if(e.raisePt!==void 0)t=e.baseOrigin.yPt-e.raisePt;else if(e.baseInkTopPt!==void 0&&e.guideInkBottomFromBaselinePt!==void 0)t=e.baseInkTopPt-e.guideInkBottomFromBaselinePt;else throw Error(`Ruby geometry requires authored w:hpsRaise or retained base/guide ink bounds`);let n=e.baseOrigin.xPt+(e.baseAdvancePt-e.guideAdvancePt)/2;return e.spans.map(e=>({text:e.text,origin:{xPt:n+e.offsetPt,yPt:t},fontRoute:e.fontRoute,fontSizePt:e.fontSizePt,fontWeight:e.fontWeight,fontStyle:e.fontStyle,color:e.color}))}function NO(e){return-(e.inkBounds?.ascentPt??e.ascentPt)}function PO(e){return e.inkBounds?.descentPt??e.descentPt}function FO(e){let t=e.inkBounds?e.inkBounds.ascentPt+e.inkBounds.descentPt:Math.min(e.ascentPt,e.descentPt);if(!Number.isFinite(t)||t<=0)throw Error(`Retained decoration probe requires positive selected-face ink`);return t}function IO(e){return e===`double`||e===`dbl`?`double`:e?.includes(`dot`)?`dotted`:e?.includes(`dash`)?`dashed`:e?.includes(`wave`)?`wavy`:`solid`}function LO(e,t,n){let r=Math.max(0,t.xPt-e.xPt),i=n*2,a=Math.max(1,Math.ceil(r/i));return Array.from({length:a+1},(t,i)=>({xPt:e.xPt+r*i/a,yPt:e.yPt+(i%2==0?-n/2:n/2)}))}function RO(e){let t=[],n=e.origin.xPt+e.advancePt;if(e.underline){let r=FO(e.underline.probe),i=e.origin.yPt+(NO(e.underline.probe)+PO(e.underline.probe))/2,a=e.origin.yPt+PO(e.base)+r/2,o=Math.max(i,a),s=IO(e.underline.authoredStyle),c={kind:`underline`,...e.underline.authoredStyle===void 0?{}:{authoredStyle:e.underline.authoredStyle},color:e.underline.color,widthPt:r};if(s===`double`){let i=o+r*2;t.push({...c,style:`solid`,from:{xPt:e.origin.xPt,yPt:o},to:{xPt:n,yPt:o}},{...c,style:`solid`,from:{xPt:e.origin.xPt,yPt:i},to:{xPt:n,yPt:i}})}else{let i={xPt:e.origin.xPt,yPt:o},a={xPt:n,yPt:o};t.push({...c,style:s,from:i,to:a,...s===`wavy`?{path:LO(i,a,r)}:{},...s===`dotted`?{dashPatternPt:[r,r*2]}:{},...s===`dashed`?{dashPatternPt:[r*4,r*3]}:{}})}}if(e.strike){let r=FO(e.strike.probe);if(e.strike.double&&e.strike.doubleProbe){let i=e.origin.yPt+NO(e.strike.doubleProbe)+r/2,a=e.origin.yPt+PO(e.strike.doubleProbe)-r/2;for(let o of[i,a])t.push({kind:`strikethrough`,color:e.color,widthPt:r,style:`solid`,from:{xPt:e.origin.xPt,yPt:o},to:{xPt:n,yPt:o}})}else{let i=e.origin.yPt+(NO(e.strike.probe)+PO(e.strike.probe))/2;t.push({kind:`strikethrough`,color:e.color,widthPt:r,style:`solid`,from:{xPt:e.origin.xPt,yPt:i},to:{xPt:n,yPt:i}})}}return t}function zO(e){let t=e.mark.inkBounds.xMaxPt-e.mark.inkBounds.xMinPt,n=e.mark.inkBounds.ascentPt+e.mark.inkBounds.descentPt;if(!(t>0)||!(n>0))throw Error(`Retained emphasis glyph requires positive selected-face ink bounds`);let r=[];for(let t of e.clusterInk){if(/^\s+$/u.test(t.text))continue;let n=e.clusters.find(e=>e.range.start===t.range.start&&e.range.end===t.range.end);if(!n)throw Error(`Retained emphasis cluster ink does not match shaped cluster geometry`);let i=(e.origin.xPt+n.offset.xPt+t.ink.xMinPt*e.scaleX+(e.origin.xPt+n.offset.xPt+t.ink.xMaxPt*e.scaleX))/2-(e.mark.inkBounds.xMinPt+e.mark.inkBounds.xMaxPt)/2,a=e.authored===`underDot`?e.origin.yPt+t.ink.descentPt+e.mark.inkBounds.ascentPt:e.origin.yPt-t.ink.ascentPt-e.mark.inkBounds.descentPt;r.push({text:e.glyph,origin:{xPt:i,yPt:a},fontRoute:e.mark.fontRoute,fontSizePt:e.mark.fontSizePt,fontWeight:e.mark.fontWeight,fontStyle:e.mark.fontStyle,color:e.mark.color,inkBounds:e.mark.inkBounds})}return r}function BO(e,t){return e.val===t.val&&e.color===t.color&&e.widthPt===t.widthPt&&e.spacePt===t.spacePt&&e.themeColor===t.themeColor&&e.themeTint===t.themeTint&&e.themeShade===t.themeShade&&e.shadow===t.shadow&&e.frame===t.frame}function VO(e){let t=[],n=0;for(;n<e.length;){let r=e[n],i=n+1,a=r.bounds.xPt+r.bounds.widthPt+r.trailingSlackPt;for(;i<e.length;){let t=e[i];if(!BO(r.border,t.border)||Math.abs(t.bounds.xPt-a)>1e-6||t.bounds.yPt!==r.bounds.yPt||t.bounds.heightPt!==r.bounds.heightPt)break;a=t.bounds.xPt+t.bounds.widthPt+t.trailingSlackPt,i+=1}let o=r.bounds.xPt-r.border.spacePt,s=r.bounds.yPt-r.border.spacePt,c=a+r.border.spacePt,l=r.bounds.yPt+r.bounds.heightPt+r.border.spacePt,u={color:r.border.color,widthPt:r.border.widthPt,..._v(r.border.val,r.border.widthPt)};t.push({...u,edge:`top`,from:{xPt:o,yPt:s},to:{xPt:c,yPt:s}},{...u,edge:`right`,from:{xPt:c,yPt:s},to:{xPt:c,yPt:l}},{...u,edge:`bottom`,from:{xPt:o,yPt:l},to:{xPt:c,yPt:l}},{...u,edge:`left`,from:{xPt:o,yPt:s},to:{xPt:o,yPt:l}}),n=i}return t}const HO=$({id:`word-zero-relative-size`,evidence:{kind:`regression-test`,reference:`packages/docx/src/layout/anchor-frame.test.ts#uses wp:extent when Word does not support an exact-zero relative size`},description:`Word 2010 accepts only positive wp14:pctWidth and wp14:pctHeight values under [MS-ODRAWXML] notes 125/126. Preserve an authored zero as acquisition evidence while resolving the object from wp:extent.`});$({id:`word-vertical-section-physical-drawing-layer`,evidence:{kind:`regression-test`,reference:`packages/docx/src/anchor-vertical-physical.test.ts#lands an upright-section anchor at the recorded physical centroid`},description:`Resolve anchored drawings in an upright vertical section against the physical page frame independently of the rotated text-flow coordinate space.`}),$({id:`word-page-level-float-prescan`,evidence:{kind:`regression-test`,reference:`packages/docx/src/page-anchor-prescan.test.ts#pre-scan REGISTERS a page-level (relativeFrom="margin") wrap float on an earlier-scanned paragraph`},description:`A wrapping drawing whose vertical reference is page-level participates from page start so source-earlier paragraphs on that page see its exclusion.`}),$({id:`word-paragraph-anchor-pre-spacing-origin`,evidence:{kind:`regression-test`,reference:`packages/docx/src/anchor-paragraph-spacebefore.test.ts#anchors a wrapSquare paragraph float at the pre-spaceBefore paragraph top`},description:`Resolve a paragraph-relative anchored drawing from the paragraph top before applying the paragraph spaceBefore contribution.`}),$({id:`word-vertical-section-physical-header-footer`,evidence:{kind:`regression-test`,reference:`packages/docx/src/vertical-header-footer.test.ts#recovers the physical page box + margins from the logical (swapped) section`},description:`Paint a vertical section header and footer in the unrotated physical page frame rather than rotating them with the body text flow.`}),$({id:`word-frame-auto-wrap-around`,evidence:{kind:`regression-test`,reference:`packages/docx/src/frame-geometry.test.ts#wrap="around" and "auto" → square float (auto ≡ around in Word)`},description:`Resolve an authored frame wrap value of auto through the same square side-wrap path as around.`}),$({id:`word-lower-layer-same-paragraph-anchor-composition`,evidence:{kind:`office-observation`,syntheticFixtureId:`lower-layer-same-paragraph-anchor-composition`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`Word preserves a source-later, lower-z, page-owned drawing at its authored position when it belongs to the same anchor paragraph as already composed higher layers. This is a Word-observed compatibility override to ECMA-376 §20.4.2.3, not a normative OOXML rule.`}),$({id:`word-textbox-visible-anchor-extent`,evidence:{kind:`office-observation`,syntheticFixtureId:`textbox-visible-anchor-extent`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`For DrawingML middle and bottom text anchoring, derive the positioned extent through the last visible retained block while preserving structural trailing empty paragraphs and terminal paragraph spacing in the complete story.`}),$({id:`word-overlapping-layout-in-cell-overlay`,evidence:{kind:`regression-test`,reference:`packages/docx/src/table-cell-anchor-reflow.test.ts#does not grow an automatic row for an overlapping layoutInCell wrapNone object`},description:`Word leaves an overlap-permitted, non-wrapping layoutInCell drawing as an overlay instead of growing its automatic table row. This is an Office compatibility exception to the general resize behavior in ECMA-376 §20.4.2.3 layoutInCell; non-overlap drawings retain normative cell containment.`});function UO(e,t){return!e||t!==`none`}function WO(e){return e.shading||e.borders.length>0||e.resources.length>0||e.drawings.length>0||e.textBoxes.length>0||e.lineNumbers?.some(e=>e.paintOps.length>0)?!0:e.lines.some(e=>e.placements.some(e=>e.kind===`text`||e.kind===`resource`||e.kind===`drawing`?!0:e.kind===`tab`&&(e.leaderGlyphs?.length??0)>0))}function GO(e){let t=e.flowBounds.yPt,n;for(let r of e.blocks){if(r.kind===`table`){n=Math.max(n??t,r.flowBounds.yPt+r.advancePt);continue}r.kind!==`paragraph`||!WO(r)||(n=Math.max(n??t,r.flowBounds.yPt+Math.max(0,r.advancePt-r.spacing.afterPt)))}return n===void 0?0:Math.max(0,n-t)}function KO(e){return e===0}function qO(e,t){return e==null?!t:e!==`paragraph`&&e!==`line`&&e!==`character`}function JO(e,t,n){return e===`page`&&t!==null&&n!==void 0&&t<n}const YO=21600;function XO(e,t,n){return{code:e,path:t,message:n}}function ZO(e){return typeof e==`number`&&Number.isFinite(e)}function QO(e){return ZO(e.xPt)&&ZO(e.yPt)&&ZO(e.widthPt)&&ZO(e.heightPt)&&e.widthPt>=0&&e.heightPt>=0}function $O(e){return e.kind===`align`?e.value:e.kind===`offset`?e.valuePt:e.kind===`percent`?e.fraction:null}function ek(e,t,n,r=!1){let i=t[e];return{axis:e,status:`unsupported`,relativeFrom:r?`page`:i.relativeFrom,choiceKind:r?`simple-position`:i.choice.kind,choiceValue:r?e===`horizontal`?t.simplePosition.xPt:t.simplePosition.yPt:$O(i.choice),issueCode:n.code}}function tk(e,t,n,r){let i=n[e];return i===null?{problem:XO(`missing-reference-frame`,r,`${e} frame is required`)}:QO(i)?{base:{startPt:t===`horizontal`?i.xPt:i.yPt,endPt:t===`horizontal`?i.xPt+i.widthPt:i.yPt+i.heightPt,referenceFrame:e}}:{problem:XO(`invalid-reference-frame`,r,`${e} frame must be finite and non-negative`)}}function nk(e,t,n,r){let i=tk(`page`,t,n,r);if(!i.base)return i;let a=tk(`margin`,t,n,r);if(!a.base)return a;let o=n.page,s=n.margin,c=e===`leftMargin`||e===`rightMargin`;if(c!==(t===`horizontal`))return{problem:XO(`unsupported-relative-from`,r,`${e} is not valid for the ${t} axis`)};let l=c?o.xPt:o.yPt,u=c?o.xPt+o.widthPt:o.yPt+o.heightPt,d=c?s.xPt:s.yPt,f=c?s.xPt+s.widthPt:s.yPt+s.heightPt;if(d<l||f>u)return{problem:XO(`invalid-reference-frame`,r,`margin frame must be contained by the page frame`)};let p=e===`leftMargin`||e===`topMargin`;return{base:{startPt:p?l:f,endPt:p?d:u,referenceFrame:e}}}function rk(e,t,n,r){if(t===`page`||t===`margin`||e===`horizontal`&&(t===`column`||t===`character`)||e===`vertical`&&(t===`paragraph`||t===`line`))return tk(t,e,n,r);if(e===`horizontal`&&(t===`leftMargin`||t===`rightMargin`)||e===`vertical`&&(t===`topMargin`||t===`bottomMargin`))return nk(t,e,n,r);if(t===`insideMargin`||t===`outsideMargin`){if(n.pageParity===null)return{problem:XO(`missing-page-parity`,r,`${t} requires explicit page parity`)};let i=t===`insideMargin`==(n.pageParity===`odd`);return{...nk(e===`horizontal`?i?`leftMargin`:`rightMargin`:i?`topMargin`:`bottomMargin`,e,n,r),parityRequired:!0}}return{problem:XO(`unsupported-relative-from`,r,`${t} is not a valid ${e} reference`)}}function ik(e,t,n){let r=t.relativeSize[e],i=e===`horizontal`?`width`:`height`,a=(n=null)=>{let r=e===`horizontal`?t.extent.widthStatus:t.extent.heightStatus,a=e===`horizontal`?t.extent.widthPt:t.extent.heightPt;return r===`missing`?{problem:XO(`missing-size`,`extent.${i}`,`${i} is required`)}:r!==`valid`||!ZO(a)||a<=0?{problem:XO(`invalid-size`,`extent.${i}`,`${i} extent must be finite and positive`)}:{resolved:{valuePt:a,diagnostic:{source:`extent`,valuePt:a,relativeFrom:n?.relativeFrom??null,referenceFrame:null,fraction:n?.fraction??null,...n===null?{}:{compatibilityFallback:HO.id}}}}};if(r===null)return a();let o=`relativeSize.${e}`;if(r.fractionStatus===`missing`||r.fraction===null)return{problem:XO(`missing-relative-size-fraction`,`${o}.fraction`,`relative size fraction is required`)};if(r.fractionStatus!==`valid`||!ZO(r.fraction))return{problem:XO(`invalid-relative-size-fraction`,`${o}.fraction`,`relative size fraction must be finite`)};if(r.fraction<0)return{problem:XO(`invalid-relative-size-fraction`,`${o}.fraction`,`relative size fraction must be non-negative`)};if(KO(r.fraction))return a({relativeFrom:r.relativeFrom,fraction:r.fraction});if(r.relativeFromStatus===`missing`||r.relativeFrom===null)return{problem:XO(`missing-relative-size-reference`,`${o}.relativeFrom`,`relative size reference is required`)};if(r.relativeFromStatus!==`valid`)return{problem:XO(`invalid-relative-size-reference`,`${o}.relativeFrom`,`relative size reference is invalid`)};let s=rk(e,r.relativeFrom,n,`${o}.relativeFrom`);if(!s.base)return{problem:XO(s.problem?.code===`missing-reference-frame`?`missing-relative-size-reference`:`invalid-relative-size-reference`,`${o}.relativeFrom`,s.problem?.message??`relative size reference cannot be resolved`)};let c=(s.base.endPt-s.base.startPt)*r.fraction;return!ZO(c)||c<0?{problem:XO(`invalid-relative-size-fraction`,`${o}.fraction`,`relative size result must be finite and non-negative`)}:{resolved:{valuePt:c,diagnostic:{source:`relative`,valuePt:c,relativeFrom:r.relativeFrom,referenceFrame:s.base.referenceFrame,fraction:r.fraction}}}}function ak(e,t,n,r){let i=n[e],a=e;if(i.relativeFromStatus===`missing`||i.relativeFrom===null){let t=XO(`missing-relative-from`,`${a}.relativeFrom`,`${e} relativeFrom is required`);return{diagnostic:ek(e,n,t),problem:t}}if(i.relativeFromStatus!==`valid`){let t=XO(`invalid-relative-from`,`${a}.relativeFrom`,`${e} relativeFrom is invalid`);return{diagnostic:ek(e,n,t),problem:t}}let o=rk(e,i.relativeFrom,r,`${a}.relativeFrom`);if(!o.base){let t=o.problem;return{diagnostic:ek(e,n,t),problem:t}}let s=i.choice;if(s.kind===`missing`){let t=XO(`missing-axis-choice`,`${a}.choice`,`${e} choice is required`);return{diagnostic:ek(e,n,t),problem:t}}if(s.kind===`invalid`){let t=XO(`invalid-axis-choice`,`${a}.choice`,`${e} choice is invalid`);return{diagnostic:ek(e,n,t),problem:t}}let c=o.base.endPt-o.base.startPt,l,u;if(s.kind===`offset`){if(!ZO(s.valuePt)){let t=XO(`invalid-axis-value`,`${a}.choice`,`offset must be finite`);return{diagnostic:ek(e,n,t),problem:t}}l=o.base.startPt+s.valuePt,u=s.valuePt}else if(s.kind===`percent`){if(!ZO(s.fraction)){let t=XO(`invalid-axis-value`,`${a}.choice`,`percentage must be finite`);return{diagnostic:ek(e,n,t),problem:t}}l=o.base.startPt+c*s.fraction,u=s.fraction}else if(s.kind===`align`){if(!(e===`horizontal`?[`left`,`center`,`right`,`inside`,`outside`].includes(s.value):[`top`,`center`,`bottom`,`inside`,`outside`].includes(s.value))){let t=XO(`invalid-axis-value`,`${a}.choice`,`${s.value} is invalid`);return{diagnostic:ek(e,n,t),problem:t}}if((s.value===`inside`||s.value===`outside`)&&r.pageParity===null){let t=XO(`missing-page-parity`,`frames.pageParity`,`${s.value} alignment requires explicit page parity`);return{diagnostic:ek(e,n,t),problem:t}}let i=e===`horizontal`?`left`:`top`,d=e===`horizontal`?`right`:`bottom`,f=s.value===`inside`,p=r.pageParity===`odd`,m=s.value===i||f&&p||s.value===`outside`&&!p,h=s.value===d||f&&!p||s.value===`outside`&&p;l=m?o.base.startPt:h?o.base.endPt-t:o.base.startPt+(c-t)/2,u=s.value}else{let t=XO(`invalid-axis-choice`,`${a}.choice`,`${e} choice is invalid`);return{diagnostic:ek(e,n,t),problem:t}}if(!ZO(l)){let t=XO(`invalid-axis-value`,`${a}.choice`,`resolved origin is not finite`);return{diagnostic:ek(e,n,t),problem:t}}return{valuePt:l,diagnostic:{axis:e,status:`resolved`,relativeFrom:i.relativeFrom,referenceFrame:o.base.referenceFrame,choiceKind:s.kind,choiceValue:u,baseStartPt:o.base.startPt,baseEndPt:o.base.endPt,resolvedOriginPt:l,pageParity:s.kind===`align`&&(s.value===`inside`||s.value===`outside`)?r.pageParity:null}}}function ok(e,t,n){let r=e===`horizontal`?n.xPt:n.yPt,i=e===`horizontal`?n.xPt+n.widthPt:n.yPt+n.heightPt,a=r+t;return{valuePt:a,diagnostic:{axis:e,status:`resolved`,relativeFrom:`page`,referenceFrame:`page`,choiceKind:`simple-position`,choiceValue:t,baseStartPt:r,baseEndPt:i,resolvedOriginPt:a,pageParity:null}}}const sk=[`top`,`right`,`bottom`,`left`];function ck(e,t){return e[`${t}Status`]}function lk(e,t){return e[`${t}Pt`]}function uk(e,t,n){let r=sk.some(t=>ck(e,t)!==`missing`);if(!n&&!r)return{values:{topPt:0,rightPt:0,bottomPt:0,leftPt:0}};let i={topPt:0,rightPt:0,bottomPt:0,leftPt:0};for(let n of sk){let r=ck(e,n),a=lk(e,n);if(r!==`valid`||!ZO(a))return{problem:XO(`invalid-effect-extent`,`${t}.${n}`,`present effectExtent requires four finite edge values`)};i[`${n}Pt`]=a}return{values:i}}function dk(e,t){let n={topPt:0,rightPt:0,bottomPt:0,leftPt:0},r={};for(let i of sk){let a=ck(t,i),o=ck(e,i),s=a===`valid`||a===`invalid`?{status:a,value:lk(t,i),source:`wrap`}:o===`valid`||o===`invalid`?{status:o,value:lk(e,i),source:`anchor`}:{status:`missing`,value:null,source:`implicit-zero`};if(s.status===`invalid`||s.status===`valid`&&(!ZO(s.value)||s.value<0))return{problem:XO(`invalid-distance`,`${s.source===`wrap`?`wrap.distances`:`anchorDistances`}.${i}`,`wrap distance must be finite and non-negative`)};n[`${i}Pt`]=s.status===`missing`?0:s.value,r[i]=s.source}return{resolved:{values:n,sources:r}}}function fk(e,t){let n={xPt:e.xPt-t.leftPt,yPt:e.yPt-t.topPt,widthPt:e.widthPt+t.leftPt+t.rightPt,heightPt:e.heightPt+t.topPt+t.bottomPt};return QO(n)?n:null}function pk(e,t){let n=e.wrap.polygon;if(n===null||n.invalidPointCount!==0||n.coordinateSpace.width!==YO||n.coordinateSpace.height!==YO||n.points.length<3)return{problem:XO(`invalid-wrap-polygon`,`wrap.polygon`,`tight and through wrapping require a valid fixed 21600 by 21600 polygon`)};let r=[];for(let[e,i]of n.points.entries()){if(!ZO(i.x)||!ZO(i.y))return{problem:XO(`invalid-wrap-polygon`,`wrap.polygon.points.${e}`,`polygon coordinates must be finite`)};r.push({xPt:t.xPt+i.x/YO*t.widthPt,yPt:t.yPt+i.y/YO*t.heightPt})}let i=r.map(e=>e.xPt),a=r.map(e=>e.yPt),o=Math.min(...i),s=Math.max(...i),c=Math.min(...a),l=Math.max(...a);return{polygon:{edited:n.edited,points:r},bounds:{xPt:o,yPt:c,widthPt:s-o,heightPt:l-c}}}function mk(e){return{coordinateSpace:`anchor-frame`,groupApplication:`parser-resolved-child-frame`,group:e===null?null:{childSourceId:e.childSourceId,sourceIndex:e.sourceIndex,sourceCount:e.sourceCount,transformChain:e.transformChain.map(e=>({...e})),childTransform:e.childTransform===null?null:{...e.childTransform},resolvedChildFrame:{...e.resolvedChildFrame}}}}function hk(e){return Ag(e,`anchor frame result`)}function gk(e){let{acquisition:t,frames:n}=e;for(let e of[`relativeHeight`,`behindDoc`,`locked`,`layoutInCell`,`allowOverlap`]){let n=t.behavior[`${e}Status`],r=t.behavior[e];if(n===`valid`&&r!==null)continue;let i=XO(n===`missing`?`missing-required-behavior`:`invalid-required-behavior`,`behavior.${e}`,`CT_Anchor requires a ${e} value`);return hk({status:`unsupported`,occurrenceId:t.occurrenceId,axes:{horizontal:ek(`horizontal`,t,i),vertical:ek(`vertical`,t,i)},issues:[i]})}let r=[],i=ik(`horizontal`,t,n),a=ik(`vertical`,t,n);i.problem&&r.push(i.problem),a.problem&&r.push(a.problem);let o,s,c=i.problem??a.problem;if(c||!i.resolved||!a.resolved){let e=c;o={diagnostic:ek(`horizontal`,t,e)},s={diagnostic:ek(`vertical`,t,e)}}else if(t.simplePosition.status===`invalid`){let e=XO(`invalid-simple-position`,`simplePosition.enabled`,`simplePos enablement is invalid`);r.push(e),o={diagnostic:ek(`horizontal`,t,e,!0),problem:e},s={diagnostic:ek(`vertical`,t,e,!0),problem:e}}else if(t.simplePosition.status===`valid`&&t.simplePosition.enabled===!0){let e=tk(`page`,`horizontal`,n,`frames.page`),i=t.simplePosition.xPt,a=t.simplePosition.yPt;if(!e.base||n.page===null||!QO(n.page)){let n=e.problem??XO(`invalid-reference-frame`,`frames.page`,`simple positioning requires a valid page frame`);r.push(n),o={diagnostic:ek(`horizontal`,t,n,!0),problem:n},s={diagnostic:ek(`vertical`,t,n,!0),problem:n}}else if(t.simplePosition.xStatus!==`valid`||!ZO(i)){let e=t.simplePosition.xStatus===`invalid`,n=XO(e?`invalid-simple-position`:`missing-simple-coordinate`,`simplePosition.x`,e?`simple position x is lexically invalid`:`simple position x is required`);r.push(n),o={diagnostic:ek(`horizontal`,t,n,!0),problem:n},s={diagnostic:ek(`vertical`,t,n,!0),problem:n}}else if(t.simplePosition.yStatus!==`valid`||!ZO(a)){let e=t.simplePosition.yStatus===`invalid`,n=XO(e?`invalid-simple-position`:`missing-simple-coordinate`,`simplePosition.y`,e?`simple position y is lexically invalid`:`simple position y is required`);r.push(n),o={diagnostic:ek(`horizontal`,t,n,!0),problem:n},s={diagnostic:ek(`vertical`,t,n,!0),problem:n}}else o=ok(`horizontal`,i,n.page),s=ok(`vertical`,a,n.page)}else{let e=ak(`horizontal`,i.resolved.valuePt,t,n),c=ak(`vertical`,a.resolved.valuePt,t,n);o={...e,diagnostic:e.diagnostic},s={...c,diagnostic:c.diagnostic},e.problem&&r.push(e.problem),c.problem&&r.push(c.problem)}if(r.length>0||!i.resolved||!a.resolved||o.valuePt===void 0||s.valuePt===void 0)return hk({status:`unsupported`,occurrenceId:t.occurrenceId,axes:{horizontal:o.diagnostic,vertical:s.diagnostic},issues:r});let l={xPt:o.valuePt,yPt:s.valuePt,widthPt:i.resolved.valuePt,heightPt:a.resolved.valuePt},u=uk(t.parentEffectExtent,`parentEffectExtent`,!1);if(u.problem||!u.values){let e=u.problem;return hk({status:`unsupported`,occurrenceId:t.occurrenceId,axes:{horizontal:o.diagnostic,vertical:s.diagnostic},issues:[e]})}let d=fk(l,u.values);if(d===null){let e=XO(`invalid-effect-extent`,`parentEffectExtent`,`parent effect extents produce invalid ink bounds`);return hk({status:`unsupported`,occurrenceId:t.occurrenceId,axes:{horizontal:o.diagnostic,vertical:s.diagnostic},issues:[e]})}if(t.wrap.kind===`missing`||t.wrap.kind===`invalid`){let e=XO(t.wrap.kind===`missing`?`missing-wrap-kind`:`invalid-wrap-kind`,`wrap.kind`,`exactly one valid wrap kind is required`);return hk({status:`unsupported`,occurrenceId:t.occurrenceId,axes:{horizontal:o.diagnostic,vertical:s.diagnostic},issues:[e]})}let f=dk(t.anchorDistances,t.wrap.distances);if(f.problem||!f.resolved)return hk({status:`unsupported`,occurrenceId:t.occurrenceId,axes:{horizontal:o.diagnostic,vertical:s.diagnostic},issues:[f.problem]});let p=t.wrap.kind===`square`||t.wrap.kind===`tight`||t.wrap.kind===`through`,m=p&&[`bothSides`,`left`,`right`,`largest`].includes(t.wrap.side??``)?t.wrap.side:null;if(p&&m===null){let e=XO(`invalid-wrap-side`,`wrap.side`,`square, tight, and through wrapping require an authored wrap side`);return hk({status:`unsupported`,occurrenceId:t.occurrenceId,axes:{horizontal:o.diagnostic,vertical:s.diagnostic},issues:[e]})}let h=u.values,g=sk.some(e=>ck(t.parentEffectExtent,e)!==`missing`)?`parent`:`none`;if(t.wrap.effectExtent!==null){let e=uk(t.wrap.effectExtent,`wrap.effectExtent`,!0);if(e.problem||!e.values)return hk({status:`unsupported`,occurrenceId:t.occurrenceId,axes:{horizontal:o.diagnostic,vertical:s.diagnostic},issues:[e.problem]});h=e.values,g=`wrap-child`}let _=null,v=null,y=null;if(t.wrap.kind===`tight`||t.wrap.kind===`through`){let e=pk(t,l);if(e.problem||!e.polygon||!e.bounds)return hk({status:`unsupported`,occurrenceId:t.occurrenceId,axes:{horizontal:o.diagnostic,vertical:s.diagnostic},issues:[e.problem]});_=e.polygon,v={width:21600,height:21600},y=e.bounds,h={topPt:0,rightPt:0,bottomPt:0,leftPt:0},g=`none`}else if(t.wrap.kind!==`none`&&(y=fk(l,h),y===null)){let e=XO(`invalid-effect-extent`,`wrap.effectExtent`,`wrapping effect extents produce invalid bounds`);return hk({status:`unsupported`,occurrenceId:t.occurrenceId,axes:{horizontal:o.diagnostic,vertical:s.diagnostic},issues:[e]})}let b=y===null?null:fk(y,f.resolved.values);if(y!==null&&b===null){let e=XO(`invalid-distance`,`wrap.distances`,`distances produce invalid bounds`);return hk({status:`unsupported`,occurrenceId:t.occurrenceId,axes:{horizontal:o.diagnostic,vertical:s.diagnostic},issues:[e]})}return hk({status:`resolved`,occurrenceId:t.occurrenceId,axes:{horizontal:o.diagnostic,vertical:s.diagnostic},issues:[],geometry:{objectFrame:l,inkBounds:d,wrapBounds:b,size:{horizontal:i.resolved.diagnostic,vertical:a.resolved.diagnostic},parentEffectExtent:u.values,wrap:{kind:t.wrap.kind,side:m,distances:f.resolved.values,distanceSources:f.resolved.sources,effectExtent:h,effectExtentSource:g,coordinateSpace:v,polygon:_},transform:mk(t.group)}})}function _k(e,t,n,r){if(!e)return r;let i=!!(e.styleId&&e.styleId===t.styleId),a=!!(i&&e.contextualSpacing),o=!!(i&&t.contextualSpacing);return a&&o?0:o?n:a?Math.max(r-n,0):Math.max(n,r)}function vk(e,t,n,r){let i=_k(e,t,n,r),a=i<=n;return{suppressBefore:a,overlap:n+(a?0:r)-i}}function yk(e){return Object.freeze(e.pages.map(e=>Object.freeze({pageIndex:e.pageIndex,displayPageNumber:e.pageNumber.displayNumber,pageNumberFormat:e.pageNumber.format})))}function bk(e){if(e.fieldType===`page`)return`page`;if(/numPages/i.test(e.fieldType)||/NUMPAGES/i.test(e.instruction))return`total-pages`}function xk(e){return e.some(e=>e.type===`paragraph`?e.runs.some(e=>e.type===`field`?bk(e)!==void 0:!1):e.type===`table`?e.rows.some(e=>e.cells.some(e=>xk(e.content))):!1)}function Sk(e,t=[],n=[]){return xk(e)||t.some(e=>xk(e.content))||n.some(e=>xk(e))}const Ck=new WeakMap;function wk(e){let t=new Set(e.drawings.flatMap(e=>{let t=e.anchorLayer?.acquisitionOccurrenceId??e.anchorLayer?.occurrenceId;return t===void 0?[]:[t]}));return Object.freeze({exclusions:Object.freeze(e.exclusions.filter(e=>!e.id.startsWith(`table-final-frame:`)&&(e.anchorOccurrenceId===void 0||!t.has(e.anchorOccurrenceId)))),collisions:Object.freeze((e.anchorCollisions??[]).filter(e=>!t.has(e.occurrenceId)))})}function Tk(e){return new Set((e.anchorFrames??[]).flatMap(e=>e.status===`resolved`?[e.occurrenceId]:[]))}function Ek(e){let t=Tk(e),n=(e.anchorCollisions??[]).filter(e=>t.has(e.occurrenceId)),r=new Set(n.map(e=>e.occurrenceId));for(let e of t)if(!r.has(e))throw Error(`Paragraph anchor omitted collision geometry: ${e}`);return Object.freeze(n)}function Dk(e){let t=Tk(e);return Object.freeze(e.exclusions.filter(e=>e.anchorOccurrenceId!==void 0&&t.has(e.anchorOccurrenceId)))}function Ok(e){return Object.freeze({flowDomainId:e,collisions:Object.freeze([]),exclusions:Object.freeze([])})}function kk(e,t){let n=Ck.get(e);n||(n=new Map,Ck.set(e,n));let r=n.get(t);if(r)return r;let i=Ok(t);return n.set(t,i),i}function Ak(e,t,n){let r=Ck.get(e);if(!r||r.get(t.flowDomainId)!==t)throw Error(`Paragraph wrap registry transaction is stale`);r.set(t.flowDomainId,jk(t,n))}function jk(e,t){if(t.flowDomainId!==e.flowDomainId)throw Error(`Paragraph wrap registry cannot cross flow domains`);let n=new Set(e.collisions.map(e=>e.occurrenceId)),r=Ek(t);for(let e of r){if(n.has(e.occurrenceId))throw Error(`Paragraph wrap occurrence committed twice: ${e.occurrenceId}`);n.add(e.occurrenceId)}let i=Dk(t),a=new Set(r.map(e=>e.occurrenceId)),o=new Set;for(let e of i){let t=e.anchorOccurrenceId;if(t===void 0||!a.has(t))throw Error(`Owned paragraph wrap exclusion omitted its collision occurrence`);if(o.has(t))throw Error(`Paragraph wrap occurrence produced duplicate exclusions: ${t}`);o.add(t)}return Object.freeze({flowDomainId:e.flowDomainId,collisions:Object.freeze([...e.collisions,...r]),exclusions:Object.freeze([...e.exclusions,...i])})}function Mk(e,t){if(!Number.isFinite(e)||e<0)throw RangeError(`${t} must be finite and non-negative`);return e}function Nk(e){if(!(!e||e.type!==`text`&&e.type!==`field`))return e.typographyInput}function Pk(e){switch(e){case`left`:return`left`;case`right`:return`right`;default:return`center`}}function Fk(e){return Mk(e.measuredWidthPt,`segment.measuredWidthPt`)}function Ik(e){return e.map(e=>e.kind===`text`&&!e.fixedPitch?{text:e.text}:{})}function Lk(e){return e===`lowKashida`?`low`:e===`mediumKashida`?`medium`:e===`highKashida`?`high`:null}function Rk(e,t){if(!e.textLayoutService||!e.textShapeRequest)throw Error(`Kashida acquisition requires the retained TextLayoutService authority`);let n=e.textLayoutService.shape({...e.textShapeRequest,text:t,measure:!0}),r=e.basePaintOps[0]?.scaleX??1,i=e.basePaintOps[0]?.letterSpacingPt??0;return n.advancePt*r+[...t].length*i}function zk(e,t){if(!e)return null;let n=ZD(e),r=new Map,i=0;for(let[n,a]of e.perSeg){let e=t[n],o=a.splitBefore;if(e?.kind===`text`){let t=new Set(e.clusters.slice(1).map(t=>t.range.start-e.range.start)),n=[...e.text],r=[0];for(let e of n)r.push((r.at(-1)??0)+e.length);o=o.filter(e=>t.has(r[e]??-1))}let s=t[n+1],c=a.trailingGap&&!(s?.kind===`text`&&s.breakBefore===!1);i+=o.length+ +!!c,r.set(n,{splitBefore:[...o],trailingGap:c,internalStretch:0})}if(i===0)return null;let a=n/i;for(let e of r.values())e.internalStretch=e.splitBefore.length*a;return{perGap:a,perSeg:r}}function Bk(e,t,n){if(!t||t.splitBefore.length===0)return{clusters:e.clusters,paintOps:e.basePaintOps};let r=[...e.text],i=[...t.splitBefore];if(i.some((e,t)=>e<=0||e>=r.length||t>0&&e<=(i[t-1]??0)))throw Error(`Internal paragraph justification contains an invalid code-point cut`);let a=[0];for(let e of r)a.push((a.at(-1)??0)+e.length);let o=i.map(e=>a[e]??-1),s=new Set(e.clusters.map(t=>t.range.start-e.range.start));if(o.some(e=>!s.has(e)))throw Error(`Internal paragraph justification must split at shaped cluster boundaries`);let c=[0,...i,r.length],l=[];for(let t=0;t<c.length-1;t+=1){let r=c[t]??0,i=c[t+1]??r,o=e.range.start+(a[r]??0),s=e.clusters.find(e=>e.range.start===o);if(!s)throw Error(`Internal paragraph justification is missing shaped cluster geometry`);l.push({range:{start:o,end:e.range.start+(a[i]??0)},offset:{xPt:s.offset.xPt+t*n,yPt:s.offset.yPt}})}let u=e.clusters.map(t=>{let r=t.range.start-e.range.start,i=o.filter(e=>e<=r).length;return{...t,offset:{...t.offset,xPt:t.offset.xPt+i*n}}});if(e.basePaintOps.length>1){let t=e.range.start;for(let n of e.basePaintOps){if(n.range.start!==t||n.range.end<=n.range.start)throw Error(`Internal paragraph justification has incomplete retained paint operations`);t=n.range.end}if(t!==e.range.end)throw Error(`Internal paragraph justification has incomplete retained paint operations`);let r=o.map(t=>e.range.start+t),i=[...new Set([e.range.start,e.range.end,...r,...e.basePaintOps.flatMap(e=>[e.range.start,e.range.end])])].sort((e,t)=>e-t),a=[];for(let t=0;t<i.length-1;t+=1){let o=i[t]??e.range.start,s=i[t+1]??o,c=e.basePaintOps.find(e=>e.range.start<=o&&e.range.end>=s);if(!c)throw Error(`Internal paragraph justification lost a retained paint slice`);let l=r.filter(e=>e<=o).length,d=u.find(e=>e.range.start===o);if(!d)throw Error(`Internal paragraph justification is missing retained slice geometry`);a.push({...c,text:c.text.slice(o-c.range.start,s-c.range.start),range:{start:o,end:s},offset:o===c.range.start?{...c.offset,xPt:c.offset.xPt+l*n}:d.offset})}return{clusters:u,paintOps:a}}let d=e.basePaintOps.length===1?e.basePaintOps[0]:void 0;if(!d)throw Error(`Internal paragraph justification requires one contextual paint op`);return i.length===r.length-1&&i.every((e,t)=>e===t+1)?{clusters:u,paintOps:[{...d,letterSpacingPt:d.letterSpacingPt+n}]}:{clusters:u,paintOps:l.map(t=>({...d,text:e.text.slice(t.range.start-e.range.start,t.range.end-e.range.start),range:t.range,offset:t.offset}))}}function Vk(e,t){return e.flatMap(e=>{let n=e.text.trimEnd();if(n===``||n.length===e.text.length)return[e];if(e.sourceMapping===`kashida`)return[{...e,text:n}];let r=e.range.start+n.length,i=t.find(e=>e.range.start===r),{inkBounds:a,blockAxisInkBounds:o,...s}=e;return[{...e,text:n,range:{...e.range,end:r}},{...s,text:e.text.slice(n.length),range:{start:r,end:e.range.end},offset:i?.offset??e.offset}]})}function Hk(e,t){return e===void 0||t===void 0?e===t:e.length===t.length&&e.every((e,n)=>e===t[n])}function Uk(e,t){return e.kind===`underline`&&e.kind===t.kind&&e.authoredStyle===t.authoredStyle&&e.style===t.style&&e.color===t.color&&e.widthPt===t.widthPt&&e.to.xPt===t.from.xPt&&Hk(e.dashPatternPt,t.dashPatternPt)}function Wk(e,t){let n=Math.max(e.from.yPt,t.from.yPt),r={xPt:e.from.xPt,yPt:n},i={xPt:t.to.xPt,yPt:n},{path:a,...o}=e;return{...o,from:r,to:i,...e.style===`wavy`?{path:LO(r,i,e.widthPt)}:{}}}function Gk(e){let t=[];e.forEach((n,r)=>{if(n.kind!==`text`&&n.kind!==`tab`||!n.decorations){t=[];return}let i=[],a=[],o=new Set;for(let s of n.decorations){let n=t.filter(e=>!o.has(e)&&Uk(e.decoration,s)).sort((e,t)=>Math.abs(e.decoration.from.yPt-s.from.yPt)-Math.abs(t.decoration.from.yPt-s.from.yPt))[0];if(n){o.add(n);let t=e[n.placementIndex];if(!t||t.kind!==`text`&&t.kind!==`tab`||!t.decorations)throw Error(`Continuous decoration owner left the retained line`);let r=[...t.decorations],i=Wk(n.decoration,s);r[n.decorationIndex]=i,e[n.placementIndex]={...t,decorations:r},a.push({...n,decoration:i})}else{let e=i.length;i.push(s),a.push({placementIndex:r,decorationIndex:e,decoration:s})}}e[r]={...n,decorations:i},t=a})}function Kk(e){let{line:t}=e,n=t.segments,r=e.baseRtl||OS(n),i=kS(n.map(e=>e.kind===`tab`?{isTab:!0}:e.kind===`text`?{text:e.text,rtl:e.rtl,digitsAsAN:e.digitsAsAN}:{}),e.baseRtl),a=n.reduce((e,t)=>e+Fk(t),0),o=e.paragraphXPt+t.xOffsetPt,s=Math.min(e.availableWidthPt,t.availableWidthPt),c=e.isFirstLine?e.numbering?Mk(e.numbering.bodyOffsetPt,`numbering.bodyOffsetPt`):e.firstLineIndentPt??0:0,l=e.baseRtl?0:c,u=(e.baseRtl?s-c:s)-l-a,d=e.isLastLine||t.endsWithBreak,f=e.displayMathJustification===void 0?AS(e.alignment,e.baseRtl):Pk(e.displayMathJustification),p=f===`justify`&&(!d||e.stretchLastLine),m=p?Lk(e.alignment):null;if(m&&u>0){let e=CO(n.map(e=>e.kind===`text`?{text:e.text}:{}),u,m,(e,t)=>{let r=n[e];return r?.kind===`text`?Rk(r,t):0});e&&(n=n.map((t,n)=>{if(t.kind!==`text`)return t;let r=e.perSeg.get(n);if(!r)return t;let i=t.basePaintOps[0];if(!i)throw Error(`Kashida acquisition requires a contextual text paint operation`);return{...t,measuredWidthPt:t.measuredWidthPt+r.advanceDeltaPx,basePaintOps:[{...i,text:r.text,sourceMapping:`kashida`}]}}),a+=e.appliedPx,u=e.residualPx)}let h=i.order.at(-1)??-1,g=0;if(!r){let e=n.findIndex(e=>e.kind!==`text`||/\S/.test(e.text));g=e<0?0:e}let _=null,v=0,y=0,b=Ik(n);if(p){let i=zk(XD(b,u,g,r?h:n.length,-(t.baselinePt-t.topPt)*.25,u>0,e.alignment===`thaiDistribute`&&u>0),n);_=i?.perSeg??null,v=i?.perGap??0,y=ZD(i)}else if(u<0){let e=zk(QD(b,u,g,r?h:n.length,t.baselinePt-t.topPt),n);_=e?.perSeg??null,v=e?.perGap??0,y=ZD(e)}let x=a+y,S=u-y,C=f===`right`?S:f===`center`?S/2:f===`justify`&&e.baseRtl&&!p?S:0,w=o+l,T=e.decimalAutoTabPt===void 0?C:Math.max(0,e.paragraphXPt+e.decimalAutoTabPt-x-w),E=w+T,D=[];for(let e of i.order){let r=n[e];if(!r)continue;let a=_?.get(e),o=a?.internalStretch??0,s=Fk(r)+o;if(r.kind===`tab`){let e={xPt:E,yPt:t.topPt,widthPt:r.measuredWidthPt,heightPt:t.advancePt},n=r.underline?RO({origin:{xPt:E,yPt:t.baselinePt},advancePt:r.measuredWidthPt,base:r.underline.base,color:r.underline.color,underline:r.underline}):void 0;D.push({kind:`tab`,range:r.range,bounds:e,advancePt:r.measuredWidthPt,leader:r.leader,...n?.length?{decorations:n}:{},...r.leader===`none`?{}:r.leaderShape?{leaderGlyphs:jO({interval:e,baselinePt:t.baselinePt,...r.leaderShape})}:{}})}else if(r.kind===`resource`)D.push({kind:`resource`,range:r.range,...r.sourceRunIndex===void 0?{}:{sourceRunIndex:r.sourceRunIndex},resourceKey:r.resourceKey,resourceKind:r.resourceKind,...r.orientation?{orientation:r.orientation}:{},bounds:{xPt:E,yPt:t.baselinePt+r.topOffsetPt,widthPt:r.widthPt,heightPt:r.heightPt},advancePt:r.measuredWidthPt});else if(r.kind===`unavailable-resource`||r.kind===`inline-drawing`)D.push({kind:`drawing`,range:r.range,drawingId:r.drawingId,bounds:{xPt:E,yPt:t.baselinePt+r.topOffsetPt,widthPt:r.widthPt,heightPt:r.heightPt},advancePt:r.measuredWidthPt});else if(r.kind===`anchor-host`)D.push({kind:`anchor-host`,range:r.range,bounds:{xPt:E,yPt:t.topPt,widthPt:0,heightPt:t.advancePt},baselinePt:t.baselinePt,...r.sourceMetrics?{sourceMetrics:r.sourceMetrics}:{},...r.anchorOccurrenceId?{anchorOccurrenceId:r.anchorOccurrenceId}:{}});else{let{measuredWidthPt:n,breakBefore:o,rtl:c,digitsAsAN:l,fixedPitch:u,textLayoutService:d,textShapeRequest:f,retainedGeometry:p,direction:m,...h}=r,g=Bk(r,a,v),_=i.rtl[e]?`rtl`:`ltr`,y=_===`rtl`?Vk(g.paintOps,g.clusters):g.paintOps,b=r.text.trimEnd().length,x=_===`rtl`?(h.fitText?.trailingPadPt??0)+r.clusters.filter(e=>e.range.start>=r.range.start+b).reduce((e,t)=>e+t.advancePt,0):0,S=a?.trailingGap?v:0,C={xPt:E+x,yPt:t.baselinePt},w=g.paintOps[0]?.offset.yPt??0,T={xPt:E,yPt:t.baselinePt+w},O=p?RO({origin:T,advancePt:s+S,base:p.base,color:hA(h.color),...p.underline?{underline:p.underline}:{},...p.strike?{strike:p.strike}:{}}):h.decorations,k=p?.emphasis?{authored:p.emphasis.authored,glyphs:zO({authored:p.emphasis.authored,glyph:p.emphasis.glyph,origin:{xPt:C.xPt,yPt:t.baselinePt+w},clusters:g.clusters,clusterInk:p.emphasis.clusterInk,mark:p.emphasis.mark,scaleX:r.basePaintOps[0]?.scaleX??1})}:void 0,A={...h,kind:`text`,origin:C,bounds:{xPt:E,yPt:t.topPt,widthPt:s,heightPt:t.advancePt},advancePt:s,clusters:g.clusters,paintOps:y.map(e=>({...e,direction:_})),decorations:O,...k?{emphasis:k}:{},direction:_,...S===0?{}:{ownedTrailingSlackPt:S},...h.highlight||h.background?{highlightFragments:[{rect:h.highlight&&p?{xPt:E,yPt:t.baselinePt+w-p.base.ascentPt,widthPt:s+S,heightPt:p.base.ascentPt+p.base.descentPt}:{xPt:E,yPt:t.topPt,widthPt:s+S,heightPt:t.advancePt},color:h.highlight??h.background}]}:{},...h.ruby?{ruby:{...h.ruby,paintOps:h.ruby.paintOps.map(e=>({...e,origin:{xPt:e.origin.xPt+E+(s-r.measuredWidthPt)/2,yPt:e.origin.yPt+t.baselinePt}}))}}:{}};D.push(A)}E+=s,a?.trailingGap&&(E+=v)}for(let e=0;e<D.length;){let t=D[e];if(t?.kind!==`text`||!t.runBorder){e+=1;continue}let n=e+1;for(;n<D.length;){let e=D[n];if(e?.kind!==`text`||!e.runBorder)break;n+=1}let r=VO(D.slice(e,n).map(e=>({bounds:e.bounds,trailingSlackPt:e.ownedTrailingSlackPt??0,border:e.runBorder})));D[e]={...t,runBorderFragments:r},e=n}return Gk(D),kg({range:t.range,bounds:{xPt:w+T,yPt:t.topPt,widthPt:x,heightPt:t.advancePt},baselinePt:t.baselinePt,advancePt:t.advancePt,placements:D})}function qk(e){let t=e.continuation,n=t?.lineStart??0,r=t?.lineEnd??e.lines.length;if(n<0||r<n||r>e.lines.length)throw RangeError(`Paragraph continuation line range is outside the retained lines`);let i=t?.continuesFromPrevious?0:e.spacing.beforePt;for(let a=n;a<r;a+=1){let r=e.lines[a];if(r){if(a===0&&!t?.continuesFromPrevious)i+=Math.max(0,r.bounds.yPt-(e.flowBounds.yPt+e.spacing.beforePt));else if(a>n){let t=e.lines[a-1];i+=Math.max(0,r.bounds.yPt-((t?.bounds.yPt??r.bounds.yPt)+(t?.advancePt??0)))}i+=Mk(r.advancePt,`line.advancePt`)}}return e.lines.length===0&&e.paragraphMark&&(i+=Mk(e.paragraphMark.bounds.heightPt,`paragraphMark.heightPt`)),t?.continuesOnNext||(i+=e.spacing.afterPt),i}function Jk(e){let t=e.continuation?.lineStart??0,n=e.continuation?.lineEnd??e.lines.length,r=e.lines.slice(t,n),i=e.continuation?qk(e):Mk(e.flowBounds.heightPt,`flowBounds.heightPt`);return kg({kind:`paragraph`,id:e.id,source:e.source,...e.paragraphId===void 0?{}:{paragraphId:e.paragraphId},flowDomainId:e.flowDomainId,ordinaryFlow:e.ordinaryFlow,...e.styleId===void 0?{}:{styleId:e.styleId},...e.bookmarkStarts?.length?{bookmarkStarts:e.bookmarkStarts}:{},flowBounds:{...e.flowBounds,heightPt:i},inkBounds:e.inkBounds,...e.clipBounds?{clipBounds:e.clipBounds}:{},advancePt:i,spacing:e.spacing,contextualSpacing:e.contextualSpacing??!1,lines:r,borders:e.borders,...e.shading?{shading:e.shading}:{},resources:e.resources,drawings:e.drawings,textBoxes:e.textBoxes,events:e.events,exclusions:e.exclusions,...e.cellContainmentBounds?{cellContainmentBounds:e.cellContainmentBounds}:{},...e.anchorCollisions?.length?{anchorCollisions:e.anchorCollisions}:{},...e.anchorFrames?{anchorFrames:e.anchorFrames}:{},...e.paragraphMark?{paragraphMark:e.paragraphMark}:{},...e.continuation?{continuation:e.continuation}:{}})}function Yk(e,t){return{...e,path:[...e.path,t]}}function Xk(e,t){if(e.status===`planned`)return Object.freeze([]);let n=Object.freeze({...t,path:Object.freeze([...t.path])});return Object.freeze(e.diagnostics.map(e=>Object.freeze({...e,source:n})))}function Zk(e){return Eg(e)}function Qk(e,t){return xg(`unavailable-drawing`,Yk(e,t))}function $k(e,t){return Object.freeze({code:`MISSING_RESOURCE`,severity:`warning`,source:Object.freeze({...t,path:Object.freeze([...t.path])}),message:`Drawing ${e} resource is unavailable`})}function eA(e){return bk(e)||(/^date$/i.test(e.fieldType)?`date`:/^time$/i.test(e.fieldType)?`time`:`document`)}function tA(e){return e.sourceRunIndex}function nA(e){if(!e.textLayoutService||!e.textShapeRequest)return;let t=e.textLayoutService.shape({...e.textShapeRequest,text:e.text,measure:!0});return{ascentPt:t.ascentPt,descentPt:t.descentPt}}const rA=Object.freeze({yellow:`#FFFF00`,cyan:`#00FFFF`,green:`#00FF00`,magenta:`#FF00FF`,blue:`#0000FF`,red:`#FF0000`,darkBlue:`#000080`,darkCyan:`#008080`,darkGreen:`#008000`,darkMagenta:`#800080`,darkRed:`#800000`,darkYellow:`#808000`,darkGray:`#808080`,lightGray:`#C0C0C0`,black:`#000000`,white:`#FFFFFF`});function iA(e){return e.startsWith(`#`)?e:rA[e]??`#FFFF00`}function aA(e){let t=Xb(e.vertAlign,e.fontSize)+(e.lineRelativePosition??e.position??0);return t===0?0:-t}function oA(e,t,n,r,i,a,o){let s=tA(e),c=s===void 0?void 0:t.runs[s],l=Nk(c);if(e.metricOnly){let t=nA(e);return{kind:`anchor-host`,range:{start:n,end:n},bounds:{xPt:r,yPt:a,widthPt:0,heightPt:o},baselinePt:i,...t?{sourceMetrics:t}:{}}}let u=e.color?{kind:`explicit`,color:`#${e.color}`}:e.colorAuto?{kind:`auto`,...e.background?{background:`#${e.background}`}:{}}:{kind:`default`},d=e.fontRoute??te(e.fontFamily?`"${e.fontFamily.replaceAll(`"`,`\\"`)}"`:`sans-serif`,e.fontFamily?`native`:`generic`),f=e.ruby&&e.textLayoutService&&e.textShapeRequest?e.textLayoutService.shape({...e.textShapeRequest,text:e.text,measure:!0}):void 0,p=e.ruby&&e.textLayoutService&&e.textShapeRequest?e.textLayoutService.shape({...e.textShapeRequest,text:e.ruby.text,fontSizePt:e.ruby.fontSizePt,measure:!0}):void 0,m=e.ruby&&p?(p.clusters??[]).map(t=>{let n=p.spans.find(e=>e.start<=t.range.start&&e.end>=t.range.end)??p.spans[0];if(!n)throw Error(`Ruby shaping produced no selected-face span`);return{text:e.ruby.text.slice(t.range.start,t.range.end),offsetPt:t.offsetPt,fontRoute:n.fontRoute,fontSizePt:e.ruby.fontSizePt,fontWeight:n.font.weight,fontStyle:n.font.style,color:u}}):[],h=l?.ruby?.raisePt.status===`valid`?l.ruby.raisePt.value??void 0:e.ruby?.hpsRaisePt,g=e.ruby&&p?MO({baseOrigin:{xPt:0,yPt:0},baseAdvancePt:e.measuredWidth,guideAdvancePt:p.advancePt,...h===void 0?{}:{raisePt:h},...f?.inkBounds&&p.inkBounds?{baseInkTopPt:-f.inkBounds.ascentPt,guideInkBottomFromBaselinePt:p.inkBounds.descentPt}:{},spans:m}):[],_=aA(e);return{kind:`text`,text:e.text,...s===void 0?{}:{sourceRunIndex:s},...c?.type===`field`?{role:`field-result`,dependency:eA(c)}:{},...c?.type===`text`&&(c.noteRef?.kind===`footnote`||c.noteRef?.kind===`endnote`)?{noteReference:{kind:c.noteRef.kind,id:c.noteRef.id}}:{},range:{start:n,end:n+e.text.length},origin:{xPt:r,yPt:i+_},bounds:{xPt:r,yPt:a,widthPt:e.measuredWidth,heightPt:o},advancePt:e.measuredWidth,clusters:[{range:{start:n,end:n+e.text.length},offset:{xPt:0,yPt:0},advancePt:e.measuredWidth}],color:u,fontRoute:d,fontSizePt:vv(e,1),fontWeight:e.bold?700:400,fontStyle:e.italic?`italic`:`normal`,direction:e.rtl?`rtl`:`ltr`,...e.verticalRun?{writingMode:`vertical-rl`}:{},...e.charSpacing===void 0?{}:{characterSpacingPt:e.charSpacing},...e.charScale===void 0?{}:{characterScale:e.charScale},...e.fitTextRegionIndex===void 0?{}:{fitText:{regionIndex:e.fitTextRegionIndex,perGapPt:e.fitTextPerGapPx??0,trailingPadPt:e.fitTextTrailingPadPx??0}},...e.kerning===void 0?{}:{kerning:e.fontSize>=e.kerning},...e.position===void 0?{}:{positionPt:e.position},...e.vertAlign?{verticalAlign:e.vertAlign}:{},...e.tateChuYoko?{tateChuYoko:!0}:{},...e.tateChuYokoCompress?{tateChuYokoCompress:!0}:{},...e.ruby&&p?{ruby:{text:e.ruby.text,advancePt:p.advancePt,authored:{...l?.ruby?.align.status===`valid`&&l.ruby.align.value?{align:l.ruby.align.value}:{},...l?.ruby?.baseFontSizePt.status===`valid`&&l.ruby.baseFontSizePt.value!==null?{baseFontSizePt:l.ruby.baseFontSizePt.value}:{},...h===void 0?{}:{raisePt:h},...l?.ruby?.language.status===`valid`&&l.ruby.language.value?{language:l.ruby.language.value}:{}},paintOps:g}}:{},...e.emphasisMark?{emphasisMark:e.emphasisMark}:{},...e.highlight?{highlight:iA(e.highlight)}:{},...e.background?{background:`#${e.background}`}:{},...e.border?{runBorder:{val:l?.border?.val.value??e.border.style,color:e.border.color?`#${e.border.color}`:`#000000`,widthPt:e.border.width,spacePt:e.border.space??0,...l?.border?.themeColor.value?{themeColor:l.border.themeColor.value}:{},...l?.border?.themeTint.value?{themeTint:l.border.themeTint.value}:{},...l?.border?.themeShade.value?{themeShade:l.border.themeShade.value}:{},...l?.border?.shadow.status===`valid`&&l.border.shadow.value!==null?{shadow:l.border.shadow.value}:{},...l?.border?.frame.status===`valid`&&l.border.frame.value!==null?{frame:l.border.frame.value}:{}}}:{},...e.revision?{revision:e.revision}:{},typography:{caps:l?.caps??!1,smallCaps:l?.smallCaps??e.smallCaps===!0,strike:l?.strike??e.strikethrough,doubleStrike:l?.doubleStrike??e.doubleStrikethrough===!0,verticalAlign:l?.verticalAlign??{status:e.vertAlign?`valid`:`missing`,raw:e.vertAlign??null,value:e.vertAlign??null},positionPt:l?.positionPt??{status:e.position===void 0?`missing`:`valid`,raw:e.position===void 0?null:String(e.position*2),value:e.position??null},emphasis:l?.emphasis??{status:e.emphasisMark?`valid`:`missing`,raw:e.emphasisMark??null,value:e.emphasisMark??null},...l?.underline?{underline:l.underline}:{}},decorations:[],paintOps:[{text:e.text,range:{start:n,end:n+e.text.length},offset:{xPt:0,yPt:_},letterSpacingPt:Mx(e),scaleX:e.charScale??1,direction:e.rtl?`rtl`:`ltr`,kerning:e.kerning===void 0?`auto`:e.fontSize>=e.kerning?`normal`:`none`,writingMode:e.verticalRun?`vertical-rl`:`horizontal-tb`}],...e.hyperlink?{hyperlink:e.hyperlink}:{}}}function sA(e,t){let n=e.layout,r=n.visibleAscent??n.ascent,i=r+(n.visibleDescent??n.descent),a=t.lineSpacing?.rule===`auto`&&!t.hasRuby&&!t.lineGrid.active,o=a&&(t.lineSpacing?.value??1)<1,s=a&&!o?Math.max(i,n.visibleIntendedSingle??n.intendedSingle):e.advancePt;return e.topYPt+(s-i)/2+r}function cA(e,t,n){let r=e.numbering;if(!r)return;if(t.numberingMarkerGeometry)return t.numberingMarkerGeometry;let i=e.numberingMarkerShapeInput,a=n.environment.layoutServices?.text;if(!(!i||!a))return US(r,i,{authoredFirstIndentPt:e.indentFirst,physicalIndentLeftPt:t.physicalIndentLeftPt,tabStops:e.tabStops,defaultTabPt:t.defaultTabPt},a)}function lA(e,t,n,r,i){return i.bounds.widthPt<=0?t.baseRtl?n+r:n:t.baseRtl?i.bounds.xPt+i.bounds.widthPt+e.bodyOffsetPt:i.bounds.xPt-e.bodyOffsetPt}function uA(e,t,n,r,i,a){if(!e.shape||e.markerText===``)return[];let o=e.shape,s=zS({baseRtl:n.baseRtl,alignedLeadingEdgePt:lA(e,n,r,i,a),authoredFirstIndentPt:t.indentFirst,markerShiftPt:e.markerShiftPt,markerWidthPt:e.markerWidthPt}),c=-e.markerText.length,l=t.numbering?.color?{kind:`explicit`,color:`#${t.numbering.color}`}:t.numbering?.colorAuto?{kind:`auto`}:t.paragraphMarkColor?{kind:`explicit`,color:`#${t.paragraphMarkColor}`}:{kind:`default`},u=0;return o.spans.map(e=>{let r=u;u+=e.advancePt;let i=o.clusters?o.clusters.filter(t=>t.range.start>=e.start&&t.range.end<=e.end).map(e=>({range:{start:c+e.range.start,end:c+e.range.end},offset:{xPt:e.offsetPt-r,yPt:0},advancePt:e.advancePt})):[{range:{start:c+e.start,end:c+e.end},offset:{xPt:0,yPt:0},advancePt:e.advancePt}],d=s+r;return{kind:`text`,role:`numbering-marker`,text:e.text,range:{start:c+e.start,end:c+e.end},origin:{xPt:d,yPt:a.baselinePt},bounds:{xPt:d,yPt:a.baselinePt-e.ascentPt,widthPt:e.advancePt,heightPt:e.ascentPt+e.descentPt},advancePt:e.advancePt,clusters:i,paintOps:[{text:e.text,range:{start:c+e.start,end:c+e.end},offset:{xPt:0,yPt:0},letterSpacingPt:0,scaleX:1,direction:n.baseRtl?`rtl`:`ltr`,kerning:`auto`,writingMode:`horizontal-tb`}],color:l,fontRoute:e.fontRoute,fontSizePt:t.numberingMarkerShapeInput?.fontSizePt??e.ascentPt+e.descentPt,fontWeight:e.font.weight,fontStyle:e.font.style,direction:n.baseRtl?`rtl`:`ltr`,decorations:[]}})}function dA(e){if(e)return e.startsWith(`#`)?e:`#${e}`}function fA(e,t,n){let r=dA(t),i=dA(n);return e.map(e=>({...e,placements:e.placements.map(e=>{if(e.kind!==`text`)return e;let t=e.background??r??i;return!t||e.color.kind===`explicit`?e:{...e,color:{kind:`auto`,background:t}}})}))}function pA(e){return e!=null&&e.style!==`none`}function mA(e,t,n,r,i,a,o){let s=n,c=n+r;e.indentFirst<0&&(e.bidi?c-=e.indentFirst:s+=e.indentFirst);for(let e of t.flatMap(e=>e.placements))!(e.kind===`text`&&e.role===`numbering-marker`||e.kind===`resource`&&e.resourceKind===`picture-bullet`)||!e.bounds||(s=Math.min(s,e.bounds.xPt),c=Math.max(c,e.bounds.xPt+e.bounds.widthPt));let l=e.borders,u=o.top===`none`?null:l?.[o.top]??null,d=o.bottom===`none`?null:l?.bottom??null,f=pA(l?.left??null)?l.left.space??0:0,p=pA(l?.right??null)?l.right.space??0:0,m=pA(u)?u.space??0:0,h=pA(d)?d.space??0:0;return{xPt:s-f,yPt:i-m,widthPt:c-s+f+p,heightPt:a+m+h}}function hA(e){return e.kind===`explicit`?e.color:e.kind===`auto`?In(e.background??`#FFFFFF`):`#000000`}function gA(e){return e.inkBounds??{xMinPt:0,xMaxPt:e.advancePt,ascentPt:e.ascentPt,descentPt:e.descentPt}}function _A(e){return e===`circle`?`○`:e===`comma`?`﹅`:`•`}function vA(e,t,n){if(!(e.highlight||e.underline||e.strikethrough||e.doubleStrikethrough||e.emphasisMark))return;let r=e.textLayoutService,i=e.textShapeRequest;if(!r||!i)throw Error(`Retained typography geometry requires TextLayoutService`);let a=e=>r.shape({...i,text:e,measure:!0}),o=e=>{let t=a(e),n=t.spans[0];if(!n||t.spans.length!==1||n.start!==0||n.end!==e.length)throw Error(`Retained decoration probe requires one selected-face span`);return{ascentPt:n.ascentPt,descentPt:n.descentPt,...n.inkBounds?{inkBounds:n.inkBounds}:{}}},s=e.selectedFaceFontBox;if(!s||!e.selectedFaceInkBounds)throw Error(`Retained typography geometry requires authoritative selected-face metrics`);let c={ascentPt:s.ascentPt,descentPt:s.descentPt,inkBounds:e.selectedFaceInkBounds},l=hA(n),u=e.underline?{...e.underlineStyle?{authoredStyle:e.underlineStyle}:{},color:e.underlineColor&&e.underlineColor!==`auto`?`#${e.underlineColor}`:l,probe:o(`_`)}:void 0,d=e.strikethrough||e.doubleStrikethrough?{double:e.doubleStrikethrough===!0,probe:o(`-`),...e.doubleStrikethrough?{doubleProbe:o(`=`)}:{}}:void 0,f=e.emphasisMark?(()=>{let r=_A(e.emphasisMark),o=a(r),s=o.spans[0];if(!s)throw Error(`Emphasis shaping produced no selected-face span`);let c=(e.shapedClusters??[]).map(n=>{let r=e.text.slice(n.range.start,n.range.end);return{text:r,range:{start:t+n.range.start,end:t+n.range.end},ink:gA(a(r))}});return{authored:e.emphasisMark,glyph:r,mark:{inkBounds:gA(o),fontRoute:s.fontRoute,fontSizePt:i.fontSizePt,fontWeight:s.font.weight,fontStyle:s.font.style,color:n},clusterInk:c}})():void 0;return{base:c,...u?{underline:u}:{},...d?{strike:d}:{},...f?{emphasis:f}:{}}}function yA(e,t,n,r,i,a){if(e.metricOnly){let t=nA(e);return{kind:`anchor-host`,measuredWidthPt:0,range:{start:n,end:n},...t?{sourceMetrics:t}:{},...i?.type===`anchorHost`&&i.anchorOccurrenceId?{anchorOccurrenceId:i.anchorOccurrenceId}:{}}}let o=oA(e,t,n,0,0,0,0);if(o.kind!==`text`)throw Error(`Visible text segment projected as anchor host`);let s=Hx(e,r,1),c=e.charScale??1,l=aA(e),u=vA(e,n,o.color),d=e.shapedClusters,f=d?.length&&d[0]?.range.start===0&&d.at(-1)?.range.end===e.text.length&&d.every((e,t)=>t===0||d[t-1]?.range.end===e.range.start)&&d.every(e=>e.range.start<e.range.end&&Number.isFinite(e.offsetPt)&&Number.isFinite(e.advancePt))?d:void 0;if(e.text.length>0&&!f)throw Error(`Visible text acquisition requires complete authoritative grapheme clusters from TextLayoutService`);let p=(f??[]).map((t,i)=>{let a=e.text.slice(0,t.range.start),o=e.text.slice(t.range.start,t.range.end),u=[...a].length,d=[...o].length,p=i===(f?.length??0)-1?e.fitTextTrailingPadPx??0:0,m=e.punctuationCompressions?.filter(e=>e.end<=t.range.start).reduce((e,t)=>e+t.adjustmentPt,0)??0,h=e.punctuationCompressions?.filter(e=>e.end>t.range.start&&e.end<=t.range.end).reduce((e,t)=>e+t.adjustmentPt,0)??0,g=Fx(e,a,r)*c,_=Fx(e,o,r)*c;return{range:{start:n+t.range.start,end:n+t.range.end},offset:{xPt:t.offsetPt*c+u*s+g+m,yPt:l},advancePt:t.advancePt*c+d*s+_+p+h}}),m=e.snapGridLeadingPadPx??0;if(e.snapGridClass===`eastAsia`&&e.snapGridCellPitchPx){let t=e.snapGridCellPitchPx,r=0;p=p.map(i=>{e.text.slice(i.range.start-n,i.range.end-n);let a=jb(i.advancePt,t),o=a*t,s={...i,offset:{xPt:r*t+(o-i.advancePt)/2,yPt:i.offset.yPt},advancePt:o};return r+=a,s})}else m!==0&&(p=p.map(e=>({...e,offset:{xPt:e.offset.xPt+m,yPt:e.offset.yPt}})));let{origin:h,bounds:g,advancePt:_,paintOps:v,clusters:y,...b}=o,x=e.tateChuYoko&&e.tateChuYokoCompress?(()=>{if(!e.textLayoutService||!e.textShapeRequest)throw Error(`Tate-chu-yoko compression requires TextLayoutService`);let t=e.textLayoutService.shape({...e.textShapeRequest,text:e.text,fontSizePt:o.fontSizePt,measure:!0,clusterGeometry:!1}),n=t.ascentPt+t.descentPt;return n>o.fontSizePt&&n>0?o.fontSizePt/n:1})():1,S=e.punctuationCompressions?.some(t=>t.end<e.text.length)??!1,C=e.verticalRun?(()=>{if(!a)throw Error(`Vertical glyph planning capability is required for vertical text`);let t=v[0];return a.planRun({text:e.text,font:W(o.fontRoute,o.fontSizePt,o.fontWeight,o.fontStyle),fontKerning:t.kerning,fontSizePt:o.fontSizePt,letterSpacingPt:s,charScale:c,growTrRotateInk:!0,writingMode:t.writingMode}).map(r=>({...t,text:r.text,range:{start:n+r.range.start,end:n+r.range.end},offset:{xPt:r.originPt+(e.punctuationCompressions?.filter(e=>e.end<=r.range.start).reduce((e,t)=>e+t.adjustmentPt,0)??0),yPt:l},letterSpacingPt:s,glyphOrientation:r.orientation,...r.verticalFeature?{verticalFeature:!0}:{},...r.blockAxisInkBounds?{blockAxisInkBounds:r.blockAxisInkBounds}:{},...r.drawOffsetPt.xPt!==0||r.drawOffsetPt.yPt!==0?{glyphOffsetPt:r.drawOffsetPt}:{}}))})():e.tateChuYoko?v.map(t=>({...t,offset:{xPt:t.offset.xPt+e.measuredWidth/2,yPt:t.offset.yPt},glyphOrientation:`upright`,...x===1?{}:{scaleY:x}})):S?(()=>{let t=v[0],r=[];for(let t of p){let i=t.range.end-n,a=e.punctuationCompressions?.find(e=>e.end===i)?.adjustmentPt??null,o=r.at(-1);o&&o.adjustmentPt===a?o.end=t.range.end:r.push({start:t.range.start,end:t.range.end,offset:t.offset,adjustmentPt:a})}return r.map(r=>({...t,text:e.text.slice(r.start-n,r.end-n),range:{start:r.start,end:r.end},offset:r.offset,letterSpacingPt:s+(r.adjustmentPt??0)}))})():v,w=e.snapGridClass===`eastAsia`?(()=>{let t=C[0];return t?p.map(r=>({...t,text:e.text.slice(r.range.start-n,r.range.end-n),range:r.range,offset:r.offset})):C})():m===0?C:C.map(e=>({...e,offset:{xPt:e.offset.xPt+m,yPt:e.offset.yPt}}));return{...b,kind:`text`,measuredWidthPt:e.measuredWidth,clusters:p,basePaintOps:w.map(t=>({...t,letterSpacingPt:e.verticalRun&&t.glyphOrientation!==`sideways`?0:S?t.letterSpacingPt:s,...!e.verticalRun&&e.selectedFaceInkBounds?{inkBounds:e.selectedFaceInkBounds}:{},...!e.verticalRun&&e.selectedFaceInkBounds&&t.glyphOrientation===void 0?{blockAxisInkBounds:{startPt:(t.glyphOffsetPt?.yPt??0)-e.selectedFaceInkBounds.ascentPt,endPt:(t.glyphOffsetPt?.yPt??0)+e.selectedFaceInkBounds.descentPt}}:{}})),breakBefore:e.breakBefore!==!1&&!e.joinPrev,rtl:e.rtl,digitsAsAN:e.digitsAsAN,fixedPitch:e.fitTextRegionIndex!==void 0||e.snapGridClass!==void 0,...u?{retainedGeometry:u}:{},...e.textLayoutService?{textLayoutService:e.textLayoutService}:{},...e.textShapeRequest?{textShapeRequest:e.textShapeRequest}:{}}}function bA(e,t){let n=new Map;for(let e of t.lines)for(let t of e.layout.segments){let e=tA(t);if(e===void 0)continue;let r=`text`in t?t.metricOnly?0:t.text.length:`math`in t?t.fallbackText.length:+(`isTab`in t||`imagePath`in t);n.set(e,(n.get(e)??0)+r)}let r=e.runs.map((e,t)=>{let r=n.get(t);return r===void 0?e.type===`text`?e.text.length:e.type===`field`?e.fallbackText.length:e.type===`anchorHost`?0:1:r}),i=0;return{runStarts:r.map(e=>{let t=i;return i+=e,t}),runLengths:r}}function xA(e){return`text`in e?e.metricOnly?0:e.text.length:`math`in e?e.fallbackText.length:1}function SA(e,t,n,r,i,a,o,s,c,l,u,d=!1){let f=0,p=new Map,m=e.lines.some(e=>e.layout.segments.some(e=>`isTab`in e)),h=t.tabStops?.reduce((e,t)=>!e||t.pos<e.pos?t:e,void 0),g=e.lines.flatMap(e=>e.layout.segments.flatMap(e=>`text`in e&&!e.metricOnly?[e.text]:[])).join(``).trim(),_=!m&&h?.alignment===`decimal`&&g!==``&&/^[+\-(]?[\d., ]+\)?%?$/u.test(g)?h.pos-o.physicalIndentLeftPt:void 0;return e.lines.map((m,h)=>{let g=m.layout,v=sA(m,o),y=1/0,b=f,x=[];for(let e of g.segments){let n=tA(e),r=n===void 0?void 0:t.runs[n],c=xA(e),m=n===void 0?f:(s.runStarts[n]??f)+(p.get(n)??0);if(n!==void 0&&p.set(n,(p.get(n)??0)+c),y=Math.min(y,m),b=Math.max(b,m+c),`isTab`in e){let t=e,n=t.leader??`none`,i,a,o=r?.type===`text`||r?.type===`field`?r:void 0,s=o,u=e=>{if(!l)throw Error(`Formatted tab acquisition requires TextLayoutService`);return l.shape({text:e,fontSizePt:t.fontSize,fonts:s?.fontSlots?.direct??(o?.fontFamily?{ascii:o.fontFamily}:{}),themeFonts:s?.fontSlots?.theme,themeFontPresence:s?.fontSlots?.themePresent,weight:t.bold?700:400,style:t.italic?`italic`:`normal`,measure:!0})},d=e=>{let t=u(e),n=t.spans[0];if(!n||t.spans.length!==1||n.start!==0||n.end!==e.length)throw Error(`Formatted tab probe requires one selected-face span`);return{ascentPt:n.ascentPt,descentPt:n.descentPt,...n.inkBounds?{inkBounds:n.inkBounds}:{}}};if(o?.underline){let e=o.color?`#${o.color}`:`#000000`;a={base:d(`M`),probe:d(`_`),color:s?.underlineColor&&s.underlineColor!==`auto`?`#${s.underlineColor}`:e,...s?.underlineStyle?{authoredStyle:s.underlineStyle}:{}}}if(n!==`none`){if(!l)throw Error(`Tab leader acquisition requires TextLayoutService`);let e=n===`hyphen`?`-`:n===`underscore`||n===`heavy`?`_`:n===`middleDot`?`·`:`.`,r=u(e),a=r.spans[0];if(!a||!Number.isFinite(r.advancePt)||r.advancePt<=0)throw Error(`Tab leader acquisition produced no shaped glyph advance`);i={glyph:e,advancePt:r.advancePt,fontRoute:a.fontRoute,fontSizePt:t.fontSize,fontWeight:a.font.weight,fontStyle:a.font.style,color:o?.color?{kind:`explicit`,color:`#${o.color}`}:s?.colorAuto?{kind:`auto`}:{kind:`default`}}}x.push({kind:`tab`,range:{start:m,end:m+c},measuredWidthPt:t.measuredWidth,leader:n,fontSizePt:t.fontSize,bold:t.bold,italic:t.italic,...a?{underline:a}:{},...i?{leaderShape:i}:{}})}else if(`imagePath`in e){let t=e;if(t.anchor)continue;let n=tA(e),r=Yk(i,n??0);if(t.inlineShape){x.push({kind:`inline-drawing`,range:{start:m,end:m+c},drawingId:`${a}:drawing:${n??0}`,measuredWidthPt:t.measuredWidth,widthPt:t.widthPt,heightPt:t.heightPt,topOffsetPt:-t.heightPt}),f=Math.max(f,m+c);continue}if(t.unavailableResourceKind){x.push({kind:`unavailable-resource`,range:{start:m,end:m+c},resourceKind:t.unavailableResourceKind,measuredWidthPt:t.measuredWidth,widthPt:t.widthPt,heightPt:t.heightPt,topOffsetPt:-t.heightPt,drawingId:Qk(i,n??0)}),f=Math.max(f,m+c);continue}let o=t.chart?`chart`:`image`,s=t.chartResourceKey??(t.chart?Zk(r):wg(r,t.imagePath));x.push({kind:`resource`,range:{start:m,end:m+c},...n===void 0?{}:{sourceRunIndex:n},resourceKey:s,resourceKind:o,measuredWidthPt:t.measuredWidth,widthPt:t.widthPt,heightPt:t.heightPt,topOffsetPt:-t.heightPt,...d?{orientation:`upright-physical`}:{}})}else if(`math`in e){let t=e;x.push({kind:`resource`,range:{start:m,end:m+c},...tA(e)===void 0?{}:{sourceRunIndex:tA(e)},resourceKey:t.mathResourceKey,resourceKind:`math`,measuredWidthPt:t.measuredWidth,widthPt:t.measuredWidth,heightPt:t.mathAscent+t.mathDescent,topOffsetPt:-t.mathAscent})}else x.push(yA(e,t,m,PS(o),r,u));f=Math.max(f,m+c)}let S=g.segments.length===1&&`math`in(g.segments[0]??{})?g.segments[0]:void 0;return Kk({paragraphXPt:n,availableWidthPt:r,alignment:t.alignment,baseRtl:o.baseRtl,isFirstLine:h===0,isLastLine:h===e.lines.length-1,stretchLastLine:o.stretchLastLine,firstLineIndentPt:o.firstIndentPt,...h===0&&c?{numbering:{bodyOffsetPt:c.bodyOffsetPt}}:{},..._===void 0?{}:{decimalAutoTabPt:_},...S?.display?{displayMathJustification:S.jc??o.mathDefJc??`centerGroup`}:{},line:{range:{start:Number.isFinite(y)?y:f,end:b},topPt:m.topYPt,baselinePt:v,advancePt:m.advancePt,xOffsetPt:g.xOffset,availableWidthPt:g.availWidth,endsWithBreak:g.endsWithBreak??!1,segments:x}})})}function CA(e,t,n,r,i){let a=i.filter(e=>e.alignment===`bar`);return a.length===0?e:e.map(e=>({...e,barTabRules:a.map(i=>{let a=r?t+n-i.pos:t+i.pos;return{from:{xPt:a,yPt:e.bounds.yPt},to:{xPt:a,yPt:e.bounds.yPt+e.bounds.heightPt},color:`#000000`,widthPt:0,authoredStyle:`single`,style:`solid`}})}))}function wA(e,t){return{start:e.start+t,end:e.end+t}}function TA(e,t){if(!Number.isFinite(t)||t<0)throw RangeError(`Paragraph continuation source range must be finite and non-negative`);let n=e[0];if(!n)return e;let r=t-n.range.start;return r===0?e:e.map(e=>({...e,range:wA(e.range,r),placements:e.placements.map(e=>{let t=wA(e.range,r);return e.kind===`text`?{...e,range:t,clusters:e.clusters.map(e=>({...e,range:wA(e.range,r)})),paintOps:e.paintOps.map(e=>({...e,range:wA(e.range,r)}))}:{...e,range:t}})}))}function EA(e,t,n,r,i){let a=e.contentEndYPt-e.contentStartYPt;return Kk({paragraphXPt:n,availableWidthPt:r,alignment:t.alignment,baseRtl:i.baseRtl,isFirstLine:!0,isLastLine:!0,stretchLastLine:i.stretchLastLine,line:{range:{start:0,end:0},topPt:e.contentStartYPt,baselinePt:e.contentEndYPt-e.lastLineBelowBaselinePt,advancePt:a,xOffsetPt:0,availableWidthPt:r,endsWithBreak:!1,segments:[]}})}function DA(e,t){let n=t.anchorFrames,r=e.anchorXRelativeFrom??(e.anchorXFromMargin?`margin`:`page`),i=e.anchorYRelativeFrom??(e.anchorYFromPara?`paragraph`:`page`),a=n?.page,o=n?.margin,s=a&&o?{xPt:a.xPt,yPt:a.yPt,widthPt:Math.max(0,o.xPt-a.xPt),heightPt:a.heightPt}:null,c=a&&o?{xPt:o.xPt+o.widthPt,yPt:a.yPt,widthPt:Math.max(0,a.xPt+a.widthPt-o.xPt-o.widthPt),heightPt:a.heightPt}:null,l=a&&o?{xPt:a.xPt,yPt:a.yPt,widthPt:a.widthPt,heightPt:Math.max(0,o.yPt-a.yPt)}:null,u=a&&o?{xPt:a.xPt,yPt:o.yPt+o.heightPt,widthPt:a.widthPt,heightPt:Math.max(0,a.yPt+a.heightPt-o.yPt-o.heightPt)}:null,d=n?.pageParity===`even`,f=r===`page`?a:r===`column`||r===`character`?n?.column:r===`leftMargin`?s:r===`rightMargin`?c:r===`insideMargin`?d?c:s:r===`outsideMargin`?d?s:c:o,p=i===`paragraph`||i===`line`||i===`character`?{xPt:t.placement.paragraphXPt,yPt:t.placement.startYPt,widthPt:t.placement.availableWidthPt,heightPt:0}:i===`page`?a:i===`column`?n?.column:i===`topMargin`?l:i===`bottomMargin`?u:i===`insideMargin`?d?u:l:i===`outsideMargin`?d?l:u:o;if(!f||!p)return null;let m=e.widthPt,h=e.heightPt,g=e.anchorXPt??0,_=e.anchorYPt??0,v=e.type===`shape`?e.pctPosH:null,y=e.type===`shape`?e.pctPosV:null;return{xPt:v==null?e.anchorXAlign===`center`?f.xPt+(f.widthPt-m)/2:e.anchorXAlign===`right`||e.anchorXAlign===`outside`&&!d||e.anchorXAlign===`inside`&&d?f.xPt+f.widthPt-m:f.xPt+g:f.xPt+f.widthPt*v+g,yPt:y==null?e.anchorYAlign===`center`?p.yPt+(p.heightPt-h)/2:e.anchorYAlign===`bottom`||e.anchorYAlign===`outside`&&!d||e.anchorYAlign===`inside`&&d?p.yPt+p.heightPt-h:p.yPt+_:p.yPt+p.heightPt*y+_,widthPt:m,heightPt:h}}function OA(e,t){return DA(e,t)??{xPt:e.anchorXPt+(e.anchorXFromMargin?t.placement.paragraphXPt:0),yPt:e.anchorYPt+(e.anchorYFromPara?t.placement.startYPt:0),widthPt:e.widthPt,heightPt:e.heightPt}}function kA(e,t,n,r,i=!1){let a=Yk(n.source,r),o=OO(e,t,n.environment.layoutServices?.text,e.vmlTextPathInput,e.fill?.fillType===`image`?wg(a,e.fill.imagePath):void 0),s=[o.command],c=Xk(o,a);return{kind:`drawing`,id:`${n.id}:drawing:${r}`,source:a,flowDomainId:n.flowDomainId,flowBounds:t,inkBounds:t,advancePt:0,ordinaryFlow:!1,commands:s,...c.length===0?{}:{diagnostics:c},...i?{}:{anchorLayer:{occurrenceId:`public-shape:${n.id}:${r}`,behindDoc:e.behindDoc===!0,relativeHeight:Number.isFinite(e.zOrder)?e.zOrder:r,sourceOrder:r,horizontalOwnership:e.anchorXRelativeFrom===`character`||e.anchorXRelativeFrom===`column`?`host`:`page`,verticalOwnership:e.anchorYRelativeFrom===`paragraph`||e.anchorYRelativeFrom===`line`||e.anchorYRelativeFrom===`character`||!e.anchorYRelativeFrom&&e.anchorYFromPara?`host`:`page`}}}}function AA(e,t,n){if(!e.anchor||e.anchorAcquisitionInput)return null;let r=DA(e,t);if(!r)return null;let i=e.anchorYRelativeFrom??(e.anchorYFromPara?`paragraph`:`page`),a=Yk(t.source,n);return{kind:`drawing`,id:`${t.id}:public-anchor-drawing:${n}`,source:a,flowDomainId:t.flowDomainId,flowBounds:r,inkBounds:r,advancePt:0,ordinaryFlow:!1,commands:[{kind:`resource`,resourceKind:e.type,resourceKey:e.type===`image`?wg(a,e.imagePath):Zk(a),rect:r,...t.environment.verticalPageFrame?{orientation:`upright-physical`}:{}}],anchorLayer:{occurrenceId:`public-anchor:${t.id}:${n}`,behindDoc:!1,relativeHeight:n,sourceOrder:n,horizontalOwnership:`page`,verticalOwnership:i===`paragraph`?`host`:`page`}}}function jA(e){return(e.type===`image`||e.type===`chart`||e.type===`shape`||e.type===`unavailableDrawing`)&&e.anchorAcquisitionInput!==void 0}function MA(e){return[{xPt:e.xPt,yPt:e.yPt},{xPt:e.xPt+e.widthPt,yPt:e.yPt},{xPt:e.xPt+e.widthPt,yPt:e.yPt+e.heightPt},{xPt:e.xPt,yPt:e.yPt+e.heightPt}]}function NA(e,t,n){let r=t.xPt-e.xPt,i=t.yPt-e.yPt,a=e.xPt+e.widthPt-t.xPt-t.widthPt,o=e.yPt+e.heightPt-t.yPt-t.heightPt;return{xPt:n.xPt-r,yPt:n.yPt-i,widthPt:Math.max(0,n.widthPt+r+a),heightPt:Math.max(0,n.heightPt+i+o)}}function PA(e,t){return{a:t.a,b:t.b,c:t.c,d:t.d,e:e.xPt+e.widthPt/2,f:e.yPt+e.heightPt/2}}function FA(e,t){let n=[sT(t,e),sT(t,{xPt:e.xPt+e.widthPt,yPt:e.yPt}),sT(t,{xPt:e.xPt,yPt:e.yPt+e.heightPt}),sT(t,{xPt:e.xPt+e.widthPt,yPt:e.yPt+e.heightPt})];if(n.some(e=>e===null))throw Error(`Upright drawing transform must be invertible`);let r=n,i=Math.min(...r.map(e=>e.xPt)),a=Math.min(...r.map(e=>e.yPt));return{xPt:i,yPt:a,widthPt:Math.max(...r.map(e=>e.xPt))-i,heightPt:Math.max(...r.map(e=>e.yPt))-a}}function IA(e,t){return fv(t,e)}function LA(e,t){let n=e=>{let n=pv(t,{top:e.topPt,right:e.rightPt,bottom:e.bottomPt,left:e.leftPt});return{topPt:n.top,rightPt:n.right,bottomPt:n.bottom,leftPt:n.left}};return{...e,axes:{horizontal:e.axes.vertical,vertical:e.axes.horizontal},geometry:{...e.geometry,objectFrame:fv(t,e.geometry.objectFrame),inkBounds:fv(t,e.geometry.inkBounds),wrapBounds:e.geometry.wrapBounds?fv(t,e.geometry.wrapBounds):null,size:{horizontal:e.geometry.size.vertical,vertical:e.geometry.size.horizontal},parentEffectExtent:n(e.geometry.parentEffectExtent),wrap:{...e.geometry.wrap,distances:n(e.geometry.wrap.distances),distanceSources:pv(t,e.geometry.wrap.distanceSources),effectExtent:n(e.geometry.wrap.effectExtent),...e.geometry.wrap.polygon?{polygon:{...e.geometry.wrap.polygon,points:e.geometry.wrap.polygon.points.map(e=>dv(t,e))}}:{}}}}}function RA(e,t){let n=e.geometry.objectFrame;if(n.xPt===t.xPt&&n.yPt===t.yPt&&n.widthPt===t.widthPt&&n.heightPt===t.heightPt)return e;let r=n.widthPt===0?1:t.widthPt/n.widthPt,i=n.heightPt===0?1:t.heightPt/n.heightPt,a=e.geometry.wrap.polygon;return{...e,geometry:{...e.geometry,objectFrame:t,inkBounds:NA(e.geometry.inkBounds,n,t),wrapBounds:e.geometry.wrapBounds?NA(e.geometry.wrapBounds,n,t):null,wrap:{...e.geometry.wrap,polygon:a?{...a,points:a.points.map(e=>({xPt:t.xPt+(e.xPt-n.xPt)*r,yPt:t.yPt+(e.yPt-n.yPt)*i}))}:null}}}}function zA(e,t,n){let r=e.group?.resolvedChildFrame;if(!r)return t;let i=e.extent.widthPt,a=e.extent.heightPt;if(e.extent.widthStatus!==`valid`||e.extent.heightStatus!==`valid`||i===null||a===null||i<=0||a<=0)throw Error(`resolved grouped anchor requires its authored wp:extent`);let o=n===void 0?t:fv(n.logicalToPhysical,t),s=o.widthPt/i,c=o.heightPt/a,l={xPt:o.xPt+r.offsetXPt*s,yPt:o.yPt+r.offsetYPt*c,widthPt:r.widthPt*s,heightPt:r.heightPt*c};return n===void 0?l:fv(n.physicalToLogical,l)}function BA(e,t,n=!1){let r=e.axes[t];return r.status!==`resolved`||n||r.referenceFrame===`paragraph`||r.referenceFrame===`line`||r.referenceFrame===`character`?`host`:`page`}function VA(e,t,n,r,i,a,o,s,c,l){let u=-1,d;for(let t=0;t<n.length;t+=1){let r=n[t]?.placements.find(t=>t.kind===`anchor-host`&&t.anchorOccurrenceId===e);if(r?.kind===`anchor-host`){u=t,d=r;break}}if(!d||u<0)return null;let f=[...t].sort((e,t)=>(e.run.anchorAcquisitionInput?.group?.sourceIndex??0)-(t.run.anchorAcquisitionInput?.group?.sourceIndex??0)||e.runIndex-t.runIndex),p=f[0];if(!p?.run.anchorAcquisitionInput)return null;let m=n[u],h=i.anchorFrames,g=p.run.anchorAcquisitionInput.behavior,_=g.layoutInCellStatus===`valid`&&g.layoutInCell===!0&&i.anchorCellBounds!==void 0?i.anchorCellBounds:null,v=gk({acquisition:p.run.anchorAcquisitionInput,frames:{page:h?.page?_?{...h.page,..._}:h.page:null,margin:h?.margin?_?{...h.margin,..._}:h.margin:null,column:h?.column?_?{...h.column,..._}:h.column:null,paragraph:{xPt:i.placement.paragraphXPt,yPt:i.placement.startYPt,widthPt:i.placement.availableWidthPt,heightPt:Math.max(0,a)},line:m.bounds,character:d.bounds,pageParity:h?.pageParity??null}});if(v.status!==`resolved`)return{result:v,textBoxes:[],hostLineIndex:u,hostRange:d.range};let y=i.environment.verticalPageFrame&&h?.page?cv(h.page,i.environment.pageWritingMode):void 0,b=y===void 0?void 0:mv(i.environment.pageWritingMode,y),x=y===void 0?v:LA(v,b.physicalToLogical);if(g.behindDocStatus!==`valid`||g.relativeHeightStatus!==`valid`||g.behindDoc===null||g.relativeHeight===null)throw Error(`resolved anchor frame must retain required CT_Anchor behavior`);let S=x.geometry.objectFrame,C=y===void 0?void 0:PA(S,b.physicalToLogical),w=C?{...i.environment,verticalCJK:!1,verticalPageFrame:!1}:i.environment,T=[],E=[],D=[],O=[],k=new Map,A=S;if(p.run.type===`shape`&&p.run.anchorAcquisitionInput.group===null){let t=Yk(i.source,p.runIndex),n=C?FA(S,C):S,r=XA(p.run,n,{id:`${i.id}:anchor-textbox:${e}:${p.runIndex}`,source:t,flowDomainId:i.flowDomainId,context:i.context,measurer:i.measurer,environment:w,input:p.run.textBoxInput,acquireCompleteStory:i.acquireCompleteStory,...C?{coordinateSpace:`upright-physical`}:{}});r&&(k.set(p.runIndex,r),A=C?IA(r.flowBounds,C):r.flowBounds)}let j=RA(x,A);if(g.allowOverlapStatus!==`valid`||g.allowOverlap===null||g.layoutInCellStatus!==`valid`||g.layoutInCell===null)throw Error(`resolved anchor frame must retain overlap and cell behavior`);let M=j.geometry.wrapBounds,N=!g.allowOverlap,P=g.allowOverlap&&i.ordinaryFlow&&M!==null;if(N||P){let t=BA(j,`vertical`,g.layoutInCell&&i.anchorCellBounds!==void 0),n=l.filter(e=>!JO(t,g.relativeHeight,e.relativeHeight)),r=(N?[...c,...n].filter(t=>t.occurrenceId!==e).map(e=>({occurrenceId:e.occurrenceId,bounds:e.bounds})):o.filter(t=>t.anchorOccurrenceId!==e).map(e=>({occurrenceId:e.anchorOccurrenceId??e.id,bounds:e.bounds}))).map(e=>({occurrenceId:e.occurrenceId,kind:`drawingml`,paragraphId:0,bounds:e.bounds,exclusionBounds:e.bounds})),a=i.anchorFrames?.page,s=N&&g.layoutInCell&&i.anchorCellBounds?i.anchorCellBounds.xPt+i.anchorCellBounds.widthPt:a?a.xPt+a.widthPt:1/0,u=Ry({moving:{occurrenceId:e,kind:`drawingml`,paragraphId:1,bounds:A,exclusionBounds:M??A},blockers:r,avoidance:N?{kind:`drawingml-normative`}:{kind:`word-different-paragraph`,paragraphId:1},rightBoundaryPt:s}).displacement;if(u.xPt!==0||u.yPt!==0){if(A=YE(A,u),C)C={...C,e:C.e+u.xPt,f:C.f+u.yPt};else{let e=k.get(p.runIndex);e&&k.set(p.runIndex,sD(e,u))}j=RA(x,A)}}for(let{run:t,runIndex:n}of f){let r=Yk(i.source,n),a=t.anchorAcquisitionInput,o=zA(a,A,b),s=C?FA(o,C):o;if(t.type===`image`)T.push({kind:`resource`,resourceKind:`image`,resourceKey:wg(r,t.imagePath),rect:s});else if(t.type===`chart`)T.push({kind:`resource`,resourceKind:`chart`,resourceKey:Zk(r),rect:s});else if(t.type===`unavailableDrawing`)T.push({kind:`noop`}),E.push($k(t.resourceKind,r));else{let o=a.group?.resolvedChildFrame,c=OO(o?{...t,rotation:o.rotationDeg,flipH:o.flipH,flipV:o.flipV}:t,s,i.environment.layoutServices?.text,t.vmlTextPathInput,t.fill?.fillType===`image`?wg(r,t.fill.imagePath):void 0);T.push(c.command),E.push(...Xk(c,r));let l=`${i.id}:anchor-textbox:${e}:${n}`,u=k.get(n)??XA(t,s,{id:l,source:r,flowDomainId:i.flowDomainId,context:i.context,measurer:i.measurer,environment:w,input:t.textBoxInput,acquireCompleteStory:i.acquireCompleteStory,...C?{coordinateSpace:`upright-physical`}:{}});u&&(D.push(u),O.push(l))}}let F={kind:`drawing`,id:`${i.id}:anchor-drawing:${e}`,source:Yk(i.source,p.runIndex),flowDomainId:i.flowDomainId,flowBounds:A,inkBounds:j.geometry.inkBounds,advancePt:0,ordinaryFlow:!1,...C?{orientation:`upright-physical`,transform:C}:{},commands:T,...E.length===0?{}:{diagnostics:Object.freeze(E)},anchorLayer:{occurrenceId:e,behindDoc:g.behindDoc,relativeHeight:g.relativeHeight,sourceOrder:p.runIndex,horizontalOwnership:BA(j,`horizontal`,g.layoutInCell&&i.anchorCellBounds!==void 0),verticalOwnership:BA(j,`vertical`,g.layoutInCell&&i.anchorCellBounds!==void 0),...g.layoutInCell&&UO(g.allowOverlap,j.geometry.wrap.kind)&&i.anchorCellBounds?{cellContainment:!0}:{}},...O.length?{textBoxIds:O}:{}},I=j.geometry.wrapBounds,L=I&&j.geometry.wrap.kind!==`none`?{id:`${i.id}:anchor-exclusion:${e}`,wrap:j.geometry.wrap.kind,...j.geometry.wrap.side?{wrapSide:j.geometry.wrap.side}:{},bounds:I,polygon:j.geometry.wrap.polygon?.points??MA(I),anchorOccurrenceId:e,verticalOwnership:BA(j,`vertical`,g.layoutInCell&&i.anchorCellBounds!==void 0)}:void 0,R={occurrenceId:e,bounds:A,horizontalOwnership:BA(j,`horizontal`,g.layoutInCell&&i.anchorCellBounds!==void 0),verticalOwnership:BA(j,`vertical`,g.layoutInCell&&i.anchorCellBounds!==void 0),...g.relativeHeight===null?{}:{relativeHeight:g.relativeHeight}};return{result:j,drawing:F,exclusion:L,collision:R,textBoxes:D,...g.layoutInCell&&UO(g.allowOverlap,j.geometry.wrap.kind)&&i.anchorCellBounds?{cellContainmentBounds:A}:{},hostLineIndex:u,hostRange:d.range}}function HA(e,t){let n=t.bidi===!0,r=t.runs.some(e=>e.type===`text`&&!!e.ruby),i=t.runs.some(e=>e.type===`text`&&yv.test(e.text));return{...e,rightIndentGrid:{...e.rightIndentGrid,paragraphAllowsAdjustment:t.adjustRightInd!==!1},physicalIndentLeftPt:n?t.indentRight:t.indentLeft,physicalIndentRightPt:n?t.indentLeft:t.indentRight,firstIndentPt:t.indentFirst,lineSpacing:t.lineSpacing,spaceBeforePt:t.spaceBefore,spaceAfterPt:t.spaceAfter,baseRtl:n,isJustified:jS(t.alignment),stretchLastLine:MS(t.alignment),tabStops:wC(t),hasRuby:r,hasEastAsianText:i}}function UA(e){return e===`vert`||e===`vert270`||e===`eaVert`||e===`mongolianVert`?e:void 0}function WA(e,t,n){let r=Math.max(0,t-n);return e===`b`?r:e===`ctr`?r/2:0}function GA(e,t,n,r){let i=t===`eaVert`||t===`mongolianVert`,a=e.lines.map(e=>{let a=t===`mongolianVert`?e.placements.reduce((t,n)=>n.kind===`text`&&n.ruby?Math.max(t,e.baselinePt-Math.min(e.baselinePt,...n.ruby.paintOps.map(e=>e.origin.yPt))):t,0):0,o=(t===`mongolianVert`?2*n.yPt+n.heightPt-e.baselinePt+r.bottomPt-r.leftPt+a:e.baselinePt)-e.baselinePt,s=e.bounds.yPt+o,c=e.placements.map(e=>{if(e.kind!==`text`)return`bounds`in e&&e.bounds?{...e,bounds:{...e.bounds,yPt:e.bounds.yPt+o}}:e;let t=i?e.clusters.map(t=>{let n=e.text.slice(t.range.start-e.range.start,t.range.end-e.range.start),r=e.paintOps.find(e=>e.range.start<=t.range.start&&e.range.end>=t.range.end)??e.paintOps[0],i=yv.test(n);return{...r,text:n,range:t.range,offset:i?{xPt:t.offset.xPt+t.advancePt/2,yPt:t.offset.yPt}:t.offset,glyphOrientation:i?`upright`:`sideways`}}):e.paintOps;return _j({...e,paintOps:t},o)});return{...e,bounds:{...e.bounds,yPt:s},baselinePt:e.baselinePt+o,placements:c}});return{...e,lines:a}}function KA(e,t){let n=(e,n)=>e.kind===`paragraph`?GA(e,t===`mongolianVert`?`eaVert`:t,n,{topPt:0,rightPt:0,bottomPt:0,leftPt:0}):KA(e,t),r={...e,rows:e.rows.map(e=>({...e,cells:e.cells.map(e=>({...e,blocks:e.blocks.map(t=>({...t,layout:n(t.layout,e.contentBounds)}))}))}))},i=new Map,a=e=>{let n=i.get(e);if(n)return n;let r={...e,child:KA(e.child,t)};return i.set(e,r),r},o=e.floatingTables?.map(a),s=e.resolvedFloatingTables?.map(e=>{let t=a(e.source);return{...e,source:t,child:t.child}});return{...r,...o?{floatingTables:o}:{},...s?{resolvedFloatingTables:s}:{}}}function qA(e,t,n,r){return{...e,blocks:e.blocks.map(e=>{if(e.kind===`paragraph`)return GA(e,t,n,r);if(e.kind===`table`)return KA(e,t);throw Error(`Text-box story contains unsupported retained node: ${e.kind}`)})}}function JA(e,t,n=!0){if(t===0)return e;let r={xPt:0,yPt:t};return{...e,flowBounds:YE(e.flowBounds,r),inkBounds:YE(e.inkBounds,r),...e.clipBounds?{clipBounds:n?YE(e.clipBounds,r):e.clipBounds}:{},blocks:e.blocks.map(e=>{if(e.kind===`paragraph`)return aD(e,r);if(e.kind===`table`)return YA(e,r);throw Error(`Text-box story contains unsupported retained node: ${e.kind}`)})}}function YA(e,t){let n=uD(e,t),r=new Map,i=e=>{let n=r.get(e);if(n)return n;let i={...e,anchorBounds:YE(e.anchorBounds,t),...e.columnBounds?{columnBounds:YE(e.columnBounds,t)}:{},child:YA(e.child,t)};return r.set(e,i),i},a=e.floatingTables?.map(i),o=e.resolvedFloatingTables?.map(e=>{let n=i(e.source);return{...e,xPt:e.xPt+t.xPt,yPt:e.yPt+t.yPt,bounds:YE(e.bounds,t),exclusionBounds:YE(e.exclusionBounds,t),source:n,child:n.child}});return{...n,...a?{floatingTables:a}:{},...o?{resolvedFloatingTables:o}:{}}}function XA(e,t,n){let r=n.source,i=n.input??{kind:`compatibility`,source:{story:`textbox`,storyInstance:`${r.story}:${r.storyInstance}:${r.path.join(`.`)}`,path:[]},paragraphs:AO(e,{story:`textbox`,storyInstance:`${r.story}:${r.storyInstance}:${r.path.join(`.`)}`,path:[]})},a=i.source,o=i.kind===`complete`?i.blockCount:i.paragraphs.length;if(o===0)return;let s=UA(e.textVert),c=s?{xPt:-t.heightPt/2,yPt:-t.widthPt/2,widthPt:t.heightPt,heightPt:t.widthPt}:t,l=i.kind===`compatibility`?i.paragraphs:Object.freeze([]),u={topPt:e.textInsetT??0,rightPt:e.textInsetR??0,bottomPt:e.textInsetB??0,leftPt:e.textInsetL??0},d={xPt:c.xPt+u.leftPt,yPt:c.yPt+u.topPt,widthPt:Math.max(0,c.widthPt-u.leftPt-u.rightPt),heightPt:Math.max(0,c.heightPt-u.topPt-u.bottomPt)},f;if(i.kind===`complete`){if(!n.acquireCompleteStory)throw Error(`Complete text-box content requires the shared story acquisition adapter`);f=n.acquireCompleteStory({source:a,container:{id:`${n.id}:story`,kind:`textbox`,bounds:d,capacity:`unbounded`},coordinateSpace:n.coordinateSpace??`section-logical`})}let p=c.yPt+u.topPt,m=null,h=l.map((t,r)=>{let i=t.runs.map(t=>Sv({text:t.text,fontSizePt:t.fontSizePt,color:t.color?.slice(1)??null,fontFamily:t.fontFamily??null,fontFamilyEastAsia:t.fontFamilyEastAsia??null,bold:t.bold,italic:t.italic,ruby:t.ruby},e.textVert)),a=Math.max(0,c.widthPt-u.leftPt-u.rightPt-t.indentLeftPt-t.indentRightPt-Math.max(0,t.indentFirstPt)),o=s?t.image?.heightPt??0:t.image?.widthPt??0,l=s?t.image?.widthPt??0:t.image?.heightPt??0,f=o>a&&o>0?a/o:1,h=t.image?[{type:`image`,imagePath:t.image.imagePath,mimeType:t.image.mimeType,...t.image.svgImagePath?{svgImagePath:t.image.svgImagePath}:{},widthPt:o>0?o*f:a,heightPt:l>0?l*f:a,anchor:!1}]:i,g={alignment:t.alignment,indentLeft:t.indentLeftPt,indentRight:t.indentRightPt,indentFirst:t.indentFirstPt,spaceBefore:t.spacing.beforePt,spaceAfter:t.spacing.afterPt,lineSpacing:t.lineSpacing,numbering:t.numbering??null,numberingMarkerShapeInput:t.numberingMarkerShapeInput,tabStops:[...t.tabStops],bidi:t.bidi,contextualSpacing:t.contextualSpacing,styleId:t.styleId,runs:h},_=HA(n.context,g),v=_k(m,t,m?.spacing.afterPt??0,t.spacing.beforePt);p+=v;let y=cj(g,{id:`${n.id}:paragraph:${r}`,source:t.source,flowDomainId:`${n.flowDomainId}:textbox`,ordinaryFlow:!0,context:_,placement:{startYPt:p,paragraphXPt:c.xPt+u.leftPt,availableWidthPt:Math.max(0,c.widthPt-u.leftPt-u.rightPt),maximumYPt:c.yPt+c.heightPt-u.bottomPt,suppressSpaceBefore:!0},measurer:n.measurer,environment:n.environment,exclusions:[]});return p+=y.advancePt-y.spacing.afterPt,m=t,s?GA(y,s,d,u):y}),g=f?Math.max(0,f.advancePt+u.topPt+u.bottomPt):Math.max(0,p-c.yPt+u.bottomPt),_=e.textAutofit===`sp`&&o>0&&(!s||l.every(e=>e.image===void 0))&&Number.isFinite(g)&&g>0?s?{...t,widthPt:g}:{...t,heightPt:g}:t,v=s?{xPt:-_.heightPt/2,yPt:-_.widthPt/2,widthPt:_.heightPt,heightPt:_.widthPt}:_;if(s&&_.widthPt!==t.widthPt&&s!==`mongolianVert`){let e=v.yPt-c.yPt;h=h.map(t=>yj(t,e))}let y={xPt:v.xPt+u.leftPt,yPt:v.yPt+u.topPt,widthPt:Math.max(0,v.widthPt-u.leftPt-u.rightPt),heightPt:Math.max(0,v.heightPt-u.topPt-u.bottomPt)},b=_w(h.map(e=>e.flowBounds))??{xPt:y.xPt,yPt:y.yPt,widthPt:0,heightPt:0},x=_w(h.map(e=>e.inkBounds))??{xPt:y.xPt,yPt:y.yPt,widthPt:0,heightPt:0},S=f??{story:`textbox`,flowBounds:b,inkBounds:x,clipBounds:y,blocks:h,advancePt:Math.max(0,g-u.topPt-u.bottomPt),diagnostics:[]},C=GO(S);return f&&s&&(S=qA(JA(S,v.yPt-c.yPt),s,y,u)),S=JA(S,WA(e.textAnchor,y.heightPt,C),!1),kg({kind:`textbox`,id:n.id,source:l[0]?.source??a,flowDomainId:`${n.flowDomainId}:textbox`,flowBounds:_,inkBounds:_,...e.defaultTextColor?{defaultTextColor:`#${e.defaultTextColor.replace(/^#/u,``)}`}:{},...e.textAutofit===`none`?{clipBounds:y}:{},advancePt:0,ordinaryFlow:!1,story:S,transform:s?{a:0,b:s===`vert270`?-1:1,c:s===`vert270`?1:-1,d:0,e:_.xPt+_.widthPt/2,f:_.yPt+_.heightPt/2}:{a:1,b:0,c:0,d:1,e:0,f:0},writingMode:e.textVert===`vert270`?`vertical-lr`:e.textVert?`vertical-rl`:`horizontal-tb`,insets:u,contentBounds:v,...s?{verticalMode:s}:{}})}var ZA=class extends Z{reason;states;occurrenceCapacity;constructor(e,t,n){super(`NON_CONVERGENCE`,`parser-owned paragraph anchor reflow did not converge (${e}; ${n} occurrences; ${t.length} states)`),this.name=`ParagraphAnchorReflowNonConvergenceError`,this.reason=e,this.states=Object.freeze([...t]),this.occurrenceCapacity=n}};function QA(e,t){if(t.length===0)return e.placement;if(e.placement.wrap)throw Error(`Conflicting paragraph wrap authorities: placement.wrap and effective exclusions`);let n=e.anchorFrames?.page,r=NS(t.map((e,t)=>({kind:`shape`,mode:e.wrap===`topAndBottom`?`topAndBottom`:`square`,authoredWrap:e.wrap,wrapPolygon:e.polygon,imageKey:e.id,imageX:e.bounds.xPt,imageY:e.bounds.yPt,imageW:e.bounds.widthPt,imageH:e.bounds.heightPt,xLeft:e.bounds.xPt,xRight:e.bounds.xPt+e.bounds.widthPt,yTop:e.bounds.yPt,yBottom:e.bounds.yPt+e.bounds.heightPt,side:e.wrapSide??`bothSides`,distLeft:0,distRight:0,distTop:0,distBottom:0,paraId:t})),{xLeftPt:n?.xPt??e.placement.paragraphXPt,xRightPt:n?n.xPt+n.widthPt:e.placement.paragraphXPt+e.placement.availableWidthPt,readingDirection:e.context.baseRtl?`rtl`:`ltr`});return{...e.placement,wrap:r}}function $A(e,t){let n=new Map;for(let r of e.exclusions){let e=r.anchorOccurrenceId;if(!(!e||!t.has(e))){if(n.has(e))throw Error(`Paragraph anchor occurrence produced duplicate exclusions: ${e}`);n.set(e,r)}}return Object.freeze([...n.values()])}function ej(e){return xg(`paragraph-effective-wrap-exclusions`,e.map(e=>({id:e.id,...e.anchorOccurrenceId===void 0?{}:{occurrenceId:e.anchorOccurrenceId},wrap:e.wrap,...e.wrapSide===void 0?{}:{wrapSide:e.wrapSide},bounds:e.bounds,polygon:e.polygon,...e.verticalOwnership===void 0?{}:{verticalOwnership:e.verticalOwnership}})))}function tj(e){let t=new Set;for(let n of e){let e=n.anchorOccurrenceId;if(e){if(t.has(e))throw Error(`Duplicate external paragraph exclusion occurrence: ${e}`);t.add(e)}}return t}function nj(e,t){let n=tj(e);return Object.freeze([...e,...t.filter(e=>!e.anchorOccurrenceId||!n.has(e.anchorOccurrenceId))])}function rj(e,t){let n=new Set;for(let t of e){if(n.has(t.occurrenceId))throw Error(`Duplicate external anchor collision occurrence: ${t.occurrenceId}`);n.add(t.occurrenceId)}return Object.freeze([...e,...t.filter(e=>!n.has(e.occurrenceId))])}function ij(e,t,n,r){let i=n.environment.layoutServices,a=n.environment.verticalGlyphMeasurement,o=n.anchorFrames,s=t.runs.some(jA),c=t.runs.some(e=>e.type===`shape`&&e.textBoxInput?.kind===`complete`),{wrap:l,...u}=n.placement,d=n.context,f=n.environment;return`paragraph-acquisition-v1:${JSON.stringify([n.id,[n.source.story,n.source.storyInstance,n.source.path],n.flowDomainId,n.ordinaryFlow,[u.startYPt,u.paragraphXPt,u.availableWidthPt,u.maximumYPt,u.suppressSpaceBefore,l?e.objectIdentity(l):null],[d.lineGrid.active,d.lineGrid.pitchPt,d.characterGrid.active,d.characterGrid.kind,d.characterGrid.deltaPt,d.rightIndentGrid.pitchPt,d.rightIndentGrid.paragraphAllowsAdjustment,d.physicalIndentLeftPt,d.physicalIndentRightPt,d.firstIndentPt,d.lineSpacing?[d.lineSpacing.value,d.lineSpacing.rule,d.lineSpacing.explicit??null]:null,d.spaceBeforePt,d.spaceAfterPt,d.baseRtl,d.isJustified,d.stretchLastLine,d.tabStops.map(e=>[e.pos,e.alignment,e.leader]),d.hasRuby,d.hasEastAsianText,[d.kinsoku.enabled,[...d.kinsoku.lineStartForbidden].sort((e,t)=>e-t),[...d.kinsoku.lineEndForbidden].sort((e,t)=>e-t)],d.defaultTabPt,d.overflowPunct!==!1,d.numberingMarkerGeometry?JSON.stringify(d.numberingMarkerGeometry):null,d.mathDefJc??null],[e.objectIdentity(n.measurer.context),e.objectIdentity(n.measurer.fontFamilyClasses)],[f.pageIndex,f.totalPages,f.displayPageNumber??null,f.pageNumberFormat??null,f.currentDateMs??null,f.noteNumbers?[...f.noteNumbers.entries()].sort(([e],[t])=>e.localeCompare(t)):null,f.noteReferenceNumber??null,f.pageWritingMode,f.verticalCJK??null,f.verticalPageFrame??null,f.documentHasEastAsianText,f.useFeLayout??null,f.balanceSingleByteDoubleByteWidth??null,f.characterSpacingControl??null,f.resolvedLocalFonts?e.objectIdentity(f.resolvedLocalFonts):null,i?.text.fingerprint??null,i?.images.fingerprint??null,i?.math.fingerprint??null,i?.verticalGlyphFingerprint??null,a?.fingerprint??null],JSON.stringify(n.exclusions),s?JSON.stringify(n.anchorCollisions??[]):null,r?JSON.stringify(r):null,n.paragraphBorderEdges?[n.paragraphBorderEdges.top,n.paragraphBorderEdges.bottom]:null,n.trailingExtentPt??null,n.containerShading??null,n.continuesFromPrevious??null,n.sourceRangeStart??null,o?[o.page?[o.page.xPt,o.page.yPt,o.page.widthPt,o.page.heightPt]:null,o.margin?[o.margin.xPt,o.margin.yPt,o.margin.widthPt,o.margin.heightPt]:null,o.column?[o.column.xPt,o.column.yPt,o.column.widthPt,o.column.heightPt]:null,o.pageParity]:null,s?JSON.stringify(n.anchorCellBounds??null):null,c&&n.acquireCompleteStory?e.objectIdentity(n.acquireCompleteStory):null])}`}function aj(e){let t=e.src?Object.freeze({...e.src}):void 0;return`text`in e?Object.freeze({...e,...t?{src:t}:{},...e.shapedClusters?{shapedClusters:Object.freeze(e.shapedClusters.map(e=>Object.freeze({...e,range:Object.freeze({...e.range})})))}:{},...e.selectedFaceInkBounds?{selectedFaceInkBounds:Object.freeze({...e.selectedFaceInkBounds})}:{},...e.selectedFaceFontBox?{selectedFaceFontBox:Object.freeze({...e.selectedFaceFontBox})}:{},...e.ruby?{ruby:Object.freeze({...e.ruby})}:{},...e.border?{border:Object.freeze({...e.border})}:{},...e.revision?{revision:Object.freeze({...e.revision})}:{},...e.hyperlink?{hyperlink:Object.freeze({...e.hyperlink})}:{},...e.seaBreaks?{seaBreaks:Object.freeze([...e.seaBreaks])}:{}}):`imagePath`in e?Object.freeze({...e,...t?{src:t}:{},...e.srcRect?{srcRect:Object.freeze({...e.srcRect})}:{},...e.duotone?{duotone:Object.freeze({...e.duotone})}:{}}):`isTab`in e?Object.freeze({...e,...t?{src:t}:{},...e.ptab?{ptab:Object.freeze({...e.ptab})}:{}}):Object.freeze({...e,...t?{src:t}:{}})}function oj(e){return Object.freeze({...e,layout:Object.freeze({...e.layout,segments:Object.freeze(e.layout.segments.map(aj)),...e.layout.consumedEnd?{consumedEnd:Object.freeze({...e.layout.consumedEnd})}:{}})})}function sj(e,t,n){let r=t.environment.layoutServices?y_(t.environment.layoutServices):void 0,i=r?ij(r,e,t,n):void 0,a=i===void 0?void 0:r.get(e,i);if(a)return a;let o=tj(t.exclusions),s=new Set(e.runs.flatMap(e=>jA(e)?[e.anchorAcquisitionInput.occurrenceId]:[]));for(let e of o)s.delete(e);let c=s.size,l=Object.freeze([]),u=nj(t.exclusions,l);try{let a=Tb({seedState:ej(u),step:r=>{let i=nj(t.exclusions,r?.ownedExclusions??l),a=LS(e,t.context,QA(t,i),t.measurer,{...t.environment,paragraphMarkShapeInput:e.paragraphMarkShapeInput},n),o=pj(e,t,a),c=$A(o,s),u=ej(nj(t.exclusions,c));if(ej(o.exclusions)!==u)throw Error(`Paragraph retained exclusions differ from the measured exclusion authority`);return Object.freeze({measured:a,layout:o,ownedExclusions:c,state:u})},stateOf:e=>e.state,limit:16}).value,o=Object.freeze({...a.measured,lines:Object.freeze(a.measured.lines.map(oj)),placement:Object.freeze({...a.measured.placement})}),c=Object.freeze({measured:o,layout:a.layout});return i!==void 0&&r.set(e,i,c),c}catch(e){throw e instanceof wb?new ZA(e.reason,e.states,c):e}}function cj(e,t){return sj(e,t).layout}function lj(e){let t=0;for(let n of e.members)for(let e of n.fragment.lines)for(let n of e.placements)n.kind===`text`&&(t=Math.max(t,-(n.positionPt??0)));return t}const uj=new WeakMap;function dj(e){return e===void 0?null:e instanceof Date?{date:e.toISOString()}:e instanceof Set?{set:[...e].map(dj).sort((e,t)=>JSON.stringify(e).localeCompare(JSON.stringify(t)))}:e instanceof Map?{map:[...e.entries()].map(([e,t])=>[dj(e),dj(t)]).sort((e,t)=>JSON.stringify(e[0]).localeCompare(JSON.stringify(t[0])))}:Array.isArray(e)?e.map(dj):e&&typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,dj(t)])):e}function fj(e,t){if(t.contexts.length!==e.members.length||t.inputs.length!==e.members.length||t.borderEdges.length!==e.members.length||t.borderExtentsPt.length!==e.members.length)throw Error(`Frame acquisition metadata must align with every group member`);if(!Number.isFinite(t.maximumWidthPt)||t.maximumWidthPt<0)throw RangeError(`Frame maximumWidthPt must be finite and non-negative`);let n=uj.get(t.acquisitionSession);n||(n=new Map,uj.set(t.acquisitionSession,n));let r=xg(`w:frame-acquisition`,[e.id,t.placementSignature,t.maximumWidthPt,t.environment.pageIndex,t.environment.totalPages,t.environment.displayPageNumber??null,t.environment.pageNumberFormat??null,t.environment.currentDateMs??null,t.environment.documentHasEastAsianText,t.environment.layoutServices?.text.fingerprint??null,t.environment.layoutServices?.images.fingerprint??null,t.environment.layoutServices?.math.fingerprint??null,t.environment.layoutServices?.verticalGlyphFingerprint??null,dj(t.contexts),dj(t.inputs),dj(t.borderEdges),dj(t.borderExtentsPt),t.containerShading??null,dj(t.anchorFrames)]),i=n.get(r);if(i)return i;let a=e.framePr,o=a.w==null?Math.max(0,...e.members.map((e,n)=>iC(e,t.contexts[n],t.maximumWidthPt,t.measurer,t.environment,cA(t.inputs[n],t.contexts[n],t)))):Math.max(0,a.w),s=Math.max(1,o),c=(()=>{let n=Ok(`body-frame:${e.id}`),r=0,i=null,a=0,o=0,c=[];return e.members.forEach((l,u)=>{let d=t.contexts[u],f=Math.max(_k(i,l,a,d.spaceBeforePt),o),p={startYPt:r+f,paragraphXPt:0,availableWidthPt:s,maximumYPt:1/0,suppressSpaceBefore:!0},m=t.borderExtentsPt[u]??0,h={story:`body`,storyInstance:`body`,path:[e.sourceIndices[u]]},{measured:g,layout:_}=sj(t.inputs[u],{id:`body-frame:${e.id}:${u}`,source:h,flowDomainId:`body-frame:${e.id}`,ordinaryFlow:!1,context:d,placement:p,measurer:t.measurer,environment:{...t.environment,positionExtendsLineBox:RD(e.framePr.dropCap)},exclusions:n.exclusions,anchorCollisions:n.collisions,containerShading:t.containerShading,paragraphBorderEdges:t.borderEdges[u],trailingExtentPt:Math.max(d.spaceAfterPt,m),anchorFrames:t.anchorFrames});n=jk(n,_),c.push({paragraph:l,fragment:_,source:h}),r=g.contentEndYPt,i=l,a=g.requestedSpaceAfterPt,o=m}),{heightPt:Math.max(0,r+Math.max(a,o)),members:c}})(),l=t.place(o,c.heightPt),u=Object.freeze(c.members.map(e=>{let t=aD(e.fragment,{xPt:l.bounds.xPt,yPt:l.bounds.yPt}),n=Jk(a.hRule===`exact`&&a.h!=null?{...t,clipBounds:l.bounds}:t),r=Object.freeze({...n,advancePt:0});return Object.freeze({...e,fragment:r})})),d=Object.freeze({box:Object.freeze({bounds:l.bounds,exclusionBounds:l.exclusionBounds,exclusionId:`frame:${e.id}`}),members:u});return n.set(r,d),d}function pj(e,t,n){let r=t.continuesFromPrevious?{...t.context,firstIndentPt:0}:t.context,i=t.placement.paragraphXPt+r.physicalIndentLeftPt,a=TC(r,t.placement.availableWidthPt),o=t.placement.availableWidthPt-r.physicalIndentLeftPt-r.physicalIndentRightPt-a,s=bA(e,n),c=t.continuesFromPrevious?void 0:cA(e,r,t),l=SA(n,e,i,o,t.source,t.id,r,s,c,t.environment.layoutServices?.text,t.environment.verticalGlyphMeasurement,t.environment.verticalPageFrame);t.sourceRangeStart!==void 0&&(l=TA(l,t.sourceRangeStart)),l=CA(l,t.placement.paragraphXPt,t.placement.availableWidthPt,r.baseRtl,r.tabStops),c&&n.markOnly&&l.length===0&&(c.markerText!==``||e.numbering?.picBulletImagePath)&&(l=[EA(n,e,i,o,r)]);let u=[],d=[],f=[],p=[],m=[],h=[],g=[],_=e.runs.map((e,t)=>e.type===`break`?{kind:`break`,breakKind:e.breakType,offset:s.runStarts[t]??0}:void 0).filter(e=>e!==void 0),v=new Map;e.runs.forEach((e,t)=>{if(!jA(e))return;let n=v.get(e.anchorAcquisitionInput.occurrenceId)??[];n.push({run:e,runIndex:t}),v.set(e.anchorAcquisitionInput.occurrenceId,n)});for(let[r,i]of v){let a=VA(r,i,l,e,t,n.contentEndYPt-t.placement.startYPt,t.exclusions,m,t.anchorCollisions??[],h);a&&(p.push(a.result),a.cellContainmentBounds&&g.push(a.cellContainmentBounds),a.drawing&&(d.push(a.drawing),f.push(...a.textBoxes),a.exclusion&&m.push(a.exclusion),a.collision&&h.push(a.collision),l[a.hostLineIndex]&&(l=l.map((e,t)=>t===a.hostLineIndex?{...e,placements:[...e.placements,{kind:`drawing`,range:a.hostRange,drawingId:a.drawing.id,bounds:a.drawing.inkBounds,advancePt:0}]}:e))))}if(c&&l[0]){let n=uA(c,e,t.context,i,o,l[0]);n.length>0&&(l=[{...l[0],placements:[...n,...l[0].placements]},...l.slice(1)])}if(e.runs.forEach((e,n)=>{let r=Yk(t.source,n);if(e.type===`unavailableDrawing`&&e.anchorAcquisitionInput===void 0){let i=Qk(t.source,n),a=l.flatMap(e=>e.placements).find(e=>e.kind===`drawing`&&e.drawingId===i);a?.kind===`drawing`&&d.push({kind:`drawing`,id:i,source:r,flowDomainId:t.flowDomainId,flowBounds:a.bounds,inkBounds:a.bounds,advancePt:0,ordinaryFlow:!1,commands:Object.freeze([{kind:`noop`}]),diagnostics:Object.freeze([$k(e.resourceKind,r)])})}if(e.type===`image`&&u.push({kind:`image`,resourceKey:wg(r,e.imagePath),intrinsicSize:{widthPt:e.widthPt,heightPt:e.heightPt}}),e.type===`chart`&&u.push({kind:`chart`,resourceKey:Zk(r),intrinsicSize:{widthPt:e.widthPt,heightPt:e.heightPt}}),e.type===`math`&&u.push({kind:`math`,resourceKey:e.resourceKey??xg(`math-resource`,r),intrinsicSize:{widthPt:l.flatMap(e=>e.placements).find(e=>e.kind===`resource`&&e.resourceKind===`math`)?.bounds?.widthPt??0,heightPt:e.fontSize}}),(e.type===`image`||e.type===`chart`)&&!t.continuesFromPrevious){let r=AA(e,t,n);if(r){d.push(r);let e=l[0];e&&(l=[{...e,placements:[...e.placements,{kind:`drawing`,range:{start:s.runStarts[n]??0,end:(s.runStarts[n]??0)+(s.runLengths[n]??1)},drawingId:r.id,bounds:r.inkBounds,advancePt:0}]},...l.slice(1)])}}if(e.type===`shape`&&!e.anchorAcquisitionInput&&!t.continuesFromPrevious){let i=`${t.id}:drawing:${n}`,a=e.inline===!0?l.flatMap(e=>e.placements).find(e=>e.kind===`drawing`&&e.drawingId===i):void 0;if(e.inline===!0&&!a)throw Error(`Inline shape ${i} has no retained line placement`);let o=a?.bounds??OA(e,t),c=`${t.id}:textbox:${n}`,u=XA(e,o,{id:c,source:r,flowDomainId:t.flowDomainId,context:t.context,measurer:t.measurer,environment:t.environment,input:e.textBoxInput,acquireCompleteStory:t.acquireCompleteStory}),p=kA(e,e.inline===!0?o:u?.flowBounds??o,t,n,e.inline===!0);u&&(f.push(u),p={...p,textBoxIds:[c]}),d.push(p);let m=e.inline===!0?void 0:l[0];m&&(l=[{...m,placements:[...m.placements,{kind:`drawing`,range:{start:s.runStarts[n]??0,end:(s.runStarts[n]??0)+(s.runLengths[n]??1)},drawingId:p.id,bounds:p.inkBounds,advancePt:0}]},...l.slice(1)])}}),e.numbering?.picBulletImagePath&&!t.continuesFromPrevious&&u.push({kind:`picture-bullet`,resourceKey:wg(t.source,e.numbering.picBulletImagePath),intrinsicSize:{widthPt:e.numbering.picBulletWidthPt??e.numberingMarkerShapeInput?.fontSizePt??0,heightPt:e.numbering.picBulletHeightPt??e.numberingMarkerShapeInput?.fontSizePt??0}}),e.numbering?.picBulletImagePath&&l[0]&&!t.continuesFromPrevious){if(!c)throw Error(`Picture-bullet acquisition requires resolved marker font geometry`);let n=e.numbering.picBulletWidthPt??c.markerWidthPt,r=e.numbering.picBulletHeightPt??e.numberingMarkerShapeInput?.fontSizePt;if(r===void 0)throw Error(`Picture-bullet acquisition requires resolved marker height`);let a=zS({baseRtl:t.context.baseRtl,alignedLeadingEdgePt:lA(c,t.context,i,o,l[0]),authoredFirstIndentPt:e.indentFirst,markerShiftPt:c.markerShiftPt,markerWidthPt:n});l=[{...l[0],placements:[{kind:`resource`,resourceKind:`picture-bullet`,range:{start:-1,end:0},resourceKey:wg(t.source,e.numbering.picBulletImagePath),bounds:{xPt:a,yPt:l[0].baselinePt-r,widthPt:n,heightPt:r},advancePt:0},...l[0].placements]},...l.slice(1)]}l=fA(l,e.shading,t.containerShading);let y=n.contentEndYPt-n.contentStartYPt,b=t.paragraphBorderEdges??{top:`top`,bottom:`bottom`},x=mA(e,l,i,o,n.contentStartYPt,y,b),S=e.borders?[...b.top===`none`?[]:[[b.top,e.borders[b.top]]],[`right`,e.borders.right],...b.bottom===`none`?[]:[[`bottom`,e.borders.bottom]],[`left`,e.borders.left]]:[],C=e.borders?S.flatMap(([e,t])=>{if(!pA(t))return[];let n=e===`top`||e===`between`||e===`bottom`,r=e===`right`||e===`bottom`,i=n?x.yPt+(r?x.heightPt:0):x.xPt+(r?x.widthPt:0);return[{edge:e,from:n?{xPt:x.xPt,yPt:i}:{xPt:i,yPt:x.yPt},to:n?{xPt:x.xPt+x.widthPt,yPt:i}:{xPt:i,yPt:x.yPt+x.heightPt},color:t.color?`#${t.color}`:`#000000`,widthPt:t.width,..._v(t.style,t.width)}]}):[],w=t.trailingExtentPt??n.requestedSpaceAfterPt,T=_w(g);return Jk({kind:`paragraph`,id:t.id,source:t.source,...e.paragraphId===void 0?{}:{paragraphId:e.paragraphId},flowDomainId:t.flowDomainId,ordinaryFlow:t.ordinaryFlow,...e.styleId===void 0?{}:{styleId:e.styleId},...!t.continuesFromPrevious&&e.bookmarks?.length?{bookmarkStarts:e.bookmarks}:{},flowBounds:{xPt:t.placement.paragraphXPt,yPt:t.placement.startYPt,widthPt:t.placement.availableWidthPt,heightPt:n.contentEndYPt-t.placement.startYPt+w},inkBounds:{...e.shading||e.borders?x:{xPt:i,yPt:n.contentStartYPt,widthPt:Math.max(0,...l.map(e=>e.bounds.widthPt)),heightPt:y}},spacing:{beforePt:t.placement.suppressSpaceBefore?0:n.requestedSpaceBeforePt,afterPt:w},contextualSpacing:e.contextualSpacing??!1,lines:l,borders:C,shading:e.shading?{color:`#${e.shading}`}:void 0,resources:u,drawings:d,textBoxes:f,events:_,exclusions:nj(t.exclusions,m),...T?{cellContainmentBounds:T}:{},anchorCollisions:rj(t.anchorCollisions??[],h),...p.length?{anchorFrames:p}:{},paragraphMark:n.markOnly?{hidden:e.markVanish===!0,bounds:{xPt:i,yPt:n.contentStartYPt,widthPt:0,heightPt:y}}:void 0})}const mj=(e,t)=>JE(e,{xPt:0,yPt:t}),hj=(e,t)=>YE(e,{xPt:0,yPt:t}),gj=(e,t)=>$E(e,{xPt:0,yPt:t}),_j=(e,t)=>tD(e,{xPt:0,yPt:t}),vj=(e,t)=>nD(e,{xPt:0,yPt:t}),yj=(e,t)=>aD(e,{xPt:0,yPt:t}),bj=(e,t)=>sD(e,{xPt:0,yPt:t});function xj(e,t,n,r){if(!e.shading&&e.borders.length===0)return null;let i=t[0],a=t.at(-1);if(!i||!a)return{box:hj(e.inkBounds,n),borders:[]};let o=e.inkBounds.yPt,s=o+e.inkBounds.heightPt,c=r.continuesFromPrevious?Math.max(o,i.bounds.yPt):o,l=r.continuesOnNext?Math.min(s,a.bounds.yPt+a.advancePt):s,u={xPt:e.inkBounds.xPt,yPt:c+n,widthPt:e.inkBounds.widthPt,heightPt:Math.max(0,l-c)},d=u.xPt,f=d+u.widthPt,p=u.yPt,m=p+u.heightPt;return{box:u,borders:e.borders.flatMap(e=>(e.edge===`top`||e.edge===`between`)&&r.continuesFromPrevious||e.edge===`bottom`&&r.continuesOnNext?[]:e.edge===`top`||e.edge===`between`?[{...e,from:{xPt:d,yPt:p},to:{xPt:f,yPt:p}}]:e.edge===`bottom`?[{...e,from:{xPt:d,yPt:m},to:{xPt:f,yPt:m}}]:e.edge===`left`?[{...e,from:{xPt:d,yPt:p},to:{xPt:d,yPt:m}}]:e.edge===`right`?[{...e,from:{xPt:f,yPt:p},to:{xPt:f,yPt:m}}]:[{...e,from:mj(e.from,n),to:mj(e.to,n)}])}}function Sj(e,t,n=`${e.id}:${t.lineStart}-${t.lineEnd}`){let r=e.lines.slice(t.lineStart,t.lineEnd),i=r[0],a=r.at(-1),o=t.continuesFromPrevious&&i?e.flowBounds.yPt-i.bounds.yPt:0,s=o===0?r:r.map(e=>vj(e,o)),c=s[0],l=s.at(-1),u=e.lines.map((e,n)=>n>=t.lineStart&&n<t.lineEnd?s[n-t.lineStart]:e),d=c&&l?{xPt:Math.min(...s.map(e=>e.bounds.xPt)),yPt:c.bounds.yPt,widthPt:Math.max(...s.map(e=>e.bounds.xPt+e.bounds.widthPt))-Math.min(...s.map(e=>e.bounds.xPt)),heightPt:l.bounds.yPt+l.bounds.heightPt-c.bounds.yPt}:e.inkBounds,f=xj(e,r,o,t),p=new Set(r.flatMap(e=>e.placements.flatMap(e=>e.kind===`drawing`?[e.drawingId]:[]))),m=e.drawings.filter(e=>p.has(e.id)).map(e=>e.anchorLayer?.verticalOwnership===`page`?e:gj(e,o)),h=_w(m.filter(e=>e.anchorLayer?.cellContainment===!0).map(e=>e.flowBounds)),g=new Set(e.drawings.flatMap(e=>{if(e.anchorLayer?.verticalOwnership!==`host`)return[];let t=e.anchorLayer.acquisitionOccurrenceId??e.anchorLayer.occurrenceId;return t===void 0?[]:[t]})),_=new Set(m.flatMap(e=>{if(e.anchorLayer?.verticalOwnership!==`host`)return[];let t=e.anchorLayer.acquisitionOccurrenceId??e.anchorLayer.occurrenceId;return t===void 0?[]:[t]})),v=new Set(r.flatMap(e=>e.placements.flatMap(e=>e.kind===`resource`?[e.resourceKey]:[])));for(let e of m)for(let t of e.commands)t.kind===`resource`&&v.add(t.resourceKey);let y=new Set(m.flatMap(e=>[e.id.replace(`:drawing:`,`:textbox:`),...e.textBoxIds??[]])),b=new Set(m.filter(e=>e.anchorLayer?.verticalOwnership===`page`||e.orientation===`upright-physical`).flatMap(e=>e.textBoxIds??[])),x=new Set(m.map(e=>xg(`source-occurrence`,e.source))),S=i?.range.start,C=a?.range.end,{bookmarkStarts:w,...T}=e;return Jk({...T,kind:`paragraph`,id:n,...!t.continuesFromPrevious&&w?.length?{bookmarkStarts:w}:{},lines:u,flowBounds:{...e.flowBounds,yPt:e.flowBounds.yPt},...e.clipBounds?{clipBounds:hj(e.clipBounds,o)}:{},spacing:{beforePt:t.continuesFromPrevious?0:e.spacing.beforePt,afterPt:t.continuesOnNext?0:e.spacing.afterPt},inkBounds:f?.box??d,borders:f?.borders??e.borders.map(e=>({...e,from:mj(e.from,o),to:mj(e.to,o)})),resources:e.resources.filter(e=>v.has(e.resourceKey)),drawings:m,cellContainmentBounds:h??void 0,textBoxes:e.textBoxes.filter(e=>y.has(e.id)||x.has(xg(`source-occurrence`,e.source))).map(e=>b.has(e.id)?e:bj(e,o)),events:S===void 0||C===void 0?[]:e.events.filter(e=>e.offset>=S&&(e.offset<C||!t.continuesOnNext&&e.offset===C)),exclusions:e.exclusions.filter(e=>e.verticalOwnership===`page`||e.anchorOccurrenceId===void 0||!g.has(e.anchorOccurrenceId)||_.has(e.anchorOccurrenceId)).map(e=>({...e,bounds:e.verticalOwnership===`page`?e.bounds:hj(e.bounds,o),polygon:e.verticalOwnership===`page`?e.polygon:e.polygon.map(e=>mj(e,o))})),anchorCollisions:(e.anchorCollisions??[]).filter(e=>e.verticalOwnership===`page`||!g.has(e.occurrenceId)||_.has(e.occurrenceId)).map(e=>({...e,bounds:e.verticalOwnership===`page`?e.bounds:hj(e.bounds,o)})),...t.continuesOnNext?{paragraphMark:void 0}:e.paragraphMark?{paragraphMark:{...e.paragraphMark,bounds:hj(e.paragraphMark.bounds,o)}}:{},continuation:t})}function Cj(e,t){return e.segIndex-t.segIndex||e.charOffset-t.charOffset}function wj(e,t,n,r,i,a,o,s,c,l){if(![r,i].every(e=>Number.isFinite(e)&&e>=0))throw RangeError(`Paragraph fragment extents must be finite and non-negative`);if(n.kind===`splittable`&&n.lineEndBoundaries.length!==e.lines.length)throw RangeError(`Splittable paragraph source boundaries must align with retained lines`);if(n.kind===`indivisible`&&t.boundary!==null)throw RangeError(`Indivisible paragraph cannot carry a continuation boundary`);let u=o.authoredSpaceAfterPt??0;if(!Number.isFinite(u)||u<0)throw RangeError(`Authored paragraph spaceAfter must be finite and non-negative`);let d=e.lines.length,f=n=>Sj(e,{lineStart:0,lineEnd:n,continuesFromPrevious:t.boundary!==null,continuesOnNext:n<d}),p=e=>{let t=s?.(e)??0;if(!Number.isFinite(t)||t<0)throw RangeError(`Paragraph page-local reserve must be finite and non-negative`);return t},m=e=>l?.(e)??!0,h=(e,t)=>{if(!t)return e.advancePt;let n=zD({advancePt:e.advancePt,retainedSpaceAfterPt:e.spacing.afterPt,authoredSpaceAfterPt:u});return HD({paragraph:e,writingMode:o.writingMode??`horizontal-tb`,logicalLineBoxExtentPt:n,availableBlockExtentPt:r})};if(n.kind===`indivisible`){let n=p(e),o=h(e,!0);return a&&(o+n>r||!m(n))&&o+n<=i?{fragment:null,nextCursor:t,requiresFreshFlowRegion:!0,additionalReservePt:0,admittedBlockExtentPt:0}:{fragment:e,nextCursor:null,requiresFreshFlowRegion:!1,additionalReservePt:n,admittedBlockExtentPt:Math.min(e.advancePt,r)}}if(d===0){let n=p(e),o=h(e,!0);return a&&(o+n>r||!m(n))&&o+n<=i?{fragment:null,nextCursor:t,requiresFreshFlowRegion:!0,additionalReservePt:0,admittedBlockExtentPt:0}:{fragment:e,nextCursor:null,requiresFreshFlowRegion:!1,additionalReservePt:n,admittedBlockExtentPt:Math.min(e.advancePt,r)}}let g=p(e),_=h(e,!0);if(t.boundary===null&&o.keepLines&&a&&(_+g>r||!m(g))&&_+g<=i)return{fragment:null,nextCursor:t,requiresFreshFlowRegion:!0,additionalReservePt:0,admittedBlockExtentPt:0};let v=FD(0,d,r,e=>(()=>{let t=f(e),n=p(t);return m(n)?h(t,e===d)+n:r+1})()).end;if(v===0){if(a)return{fragment:null,nextCursor:t,requiresFreshFlowRegion:!0,additionalReservePt:0,admittedBlockExtentPt:0};v=1}for(;;){let e=ID({widowControl:o.widowControl,start:0,end:v,totalLines:d,canRelocate:a});if(e.kind===`relocate`)return{fragment:null,nextCursor:t,requiresFreshFlowRegion:!0,additionalReservePt:0,admittedBlockExtentPt:0};if(e.kind!==`dropLastLine`)break;--v}let y=f(v),b=v<d?n.lineEndBoundaries[v-1]:null;if(b!==null&&t.boundary!==null&&Cj(b,t.boundary)<=0)throw Error(`Paragraph continuation source boundary did not advance`);return{fragment:y,nextCursor:b===null?null:Object.freeze({boundary:b,sourceRangeStart:y.lines.at(-1).range.end,...c===void 0?{}:{uniformRubyAdvancePt:c}}),requiresFreshFlowRegion:!1,additionalReservePt:p(y),admittedBlockExtentPt:Math.min(y.advancePt,r)}}function Tj(e,t){let n=new Map;if(!e)return n;let r=new Set(e.map(e=>e.id));return t.forEach(e=>{r.has(e)&&!n.has(e)&&n.set(e,n.size+1)}),n}function Ej(e){let t=new Map;if(!e)return t;for(let n of e)t.set(n.id,n);return t}function Dj(e,t){let n=[],r=new Set;for(let i of e)if(i.type===`paragraph`&&`runs`in i)for(let e of i.runs)e.type!==`text`||e.noteRef?.kind!==t||e.noteRef.id.length===0||r.has(e.noteRef.id)||(r.add(e.noteRef.id),n.push(e.noteRef.id));else if(i.type===`table`&&`rows`in i)for(let e of i.rows)for(let i of e.cells)for(let e of Dj(i.content,t))r.has(e)||(r.add(e),n.push(e));return Object.freeze(n)}function Oj(e,t){return Object.freeze([...new Set(e.flatMap(e=>e.placements.flatMap(e=>e.kind===`text`&&e.noteReference?.kind===t?[e.noteReference.id]:[])))])}function kj(e,t){return e.rows.flatMap(e=>e.cells.flatMap(e=>e.blocks.flatMap(e=>Aj(e.layout,t))))}function Aj(e,t){let n=e.kind===`paragraph`?Oj(e.lines,t):kj(e,t);return Object.freeze([...new Set(n)])}function jj(e){return Oj(e,`footnote`)}function Mj(e){return Aj(e,`footnote`)}function Nj(e){return Aj(e,`endnote`)}function Pj(e){if(!Number.isInteger(e.columnCount)||e.columnCount<=0)throw RangeError(`Column count must be a positive integer`);for(let t of e.fragments)if(!Number.isFinite(t.extentPt)||t.extentPt<0)throw RangeError(`Column balance fragment extents must be finite and non-negative`);if(e.fragments.length===0)return Object.freeze({targetPt:0,cutIndexes:Object.freeze([]),transitionExpansions:0});let t=[0],n=[0],r=[];e.fragments.forEach((i,a)=>{t.push(t[a]+i.extentPt);let o=a+1;(i.breakAfter!==`forbidden`||o===e.fragments.length)&&n.push(o),i.breakAfter===`forced`&&o<e.fragments.length&&r.push(o)});let i=Math.min(e.columnCount,n.length-1),a=Array.from({length:i+1},()=>Array(n.length).fill(1/0)),o=Array.from({length:i+1},()=>Array(n.length).fill(-1));a[0][0]=0;let s=0;for(let e=1;e<=i;e+=1){let i=a[e-1],c=a[e],l=i.flatMap((e,t)=>Number.isFinite(e)?[t]:[]),u=0,d=0,f=0,p=0;for(let a=1;a<n.length;a+=1){let m=n[a];for(;d<r.length&&r[d]<m;)f=r[d],d+=1;for(;n[p]<f;)p+=1;for(;u<l.length&&l[u]<p;)u+=1;let h=l[u];if(h===void 0||h>=a)continue;let g=e=>{s+=1;let r=n[e];return Math.max(i[e],t[m]-t[r])},_=h,v=g(_);for(;u+1<l.length;){let e=l[u+1];if(e>=a)break;let t=g(e);if(t>v)break;u+=1,_=e,v=t}c[a]=v,o[e][a]=_}}let c=n.length-1,l=-1,u=1/0;for(let e=1;e<=i;e+=1){let t=a[e][c];t<=u&&(u=t,l=e)}if(l<0||!Number.isFinite(u))throw Error(`Authored column breaks exceed the available column frontier`);let d=[],f=c;for(let e=l;e>0;--e)if(d.push(n[f]),f=o[e][f],f<0)throw Error(`Column balance frontier omitted a predecessor`);return d.reverse(),Object.freeze({targetPt:u,cutIndexes:Object.freeze(d),transitionExpansions:s})}function Fj(e){let t=new Map;return e.sequence.forEach((e,n)=>{if(e.kind===`body-block`){let r=e.block;t.set(Sg(r.source),Object.freeze({sequenceIndex:n,keepLines:r.kind===`paragraph`&&r.keepLines,keepNext:r.kind===`paragraph`&&r.keepNext,widowControl:r.kind===`paragraph`&&r.widowControl}));return}e.kind===`adjacent-table-group`&&e.tables.forEach(e=>t.set(Sg(e.source),Object.freeze({sequenceIndex:n,keepLines:!1,keepNext:!1,widowControl:!1})))}),t}function Ij(e,t,n){let r=t-e;if(n.length<=1)return Object.freeze([r]);let i=[],a=e;for(let e of n){if(!Number.isFinite(e)||e<a||e>t)return Object.freeze([r]);i.push(e-a),a=e}return i[i.length-1]=i.at(-1)+t-a,Object.freeze(i)}function Lj(e,t,n,r){let i=new Set(r.flowDomainIds),a=new Map(n.layers.body.map(e=>[e.id,e])),o=Fj(e),s=[];for(let e of t){if(!i.has(e.flowDomainId))continue;let t=a.get(e.nodeId);if(!t||!t.ordinaryFlow)continue;let n=Sg(t.source),r=o.get(n);if(!r)continue;let c=t.kind===`paragraph`&&!r.keepLines&&t.lines.length>1?t.lines.map(e=>e.bounds.yPt+e.advancePt):t.kind===`table`&&t.rows.length>1?t.rows.map(e=>e.flowBounds.yPt+e.advancePt):[e.blockEndPt];Ij(e.blockStartPt,e.blockEndPt,c).forEach(e=>s.push({extentPt:e,breakAfter:`allowed`,sequenceIndex:r.sequenceIndex,sourceIdentity:n,paragraphLine:t.kind===`paragraph`&&!r.keepLines&&t.lines.length>0}))}let c=new Map;s.forEach((e,t)=>{let n=c.get(e.sourceIdentity)??[];n.push(t),c.set(e.sourceIdentity,n)});for(let[e,t]of c){let n=o.get(e);if(!n)continue;let r=t.filter(e=>s[e].paragraphLine);n.keepLines&&t.slice(0,-1).forEach(e=>{s[e].breakAfter=`forbidden`});for(let e=0;e+1<r.length;e+=1)ID({widowControl:n.widowControl,start:0,end:e+1,totalLines:r.length,canRelocate:!0}).kind!==`keep`&&(s[r[e]].breakAfter=`forbidden`);n.keepNext&&(s[t.at(-1)].breakAfter=`forbidden`)}let l=e.initialSection.sectionOccurrenceId;return e.sequence.forEach((e,t)=>{if(e.kind===`begin-section`){l=e.section.sectionOccurrenceId;return}if(!(l!==r.sectionOccurrenceId||e.kind!==`authored-break`||e.break!==`column`)){for(let e=s.length-1;e>=0;--e)if(!(s[e].sequenceIndex>=t)){s[e].breakAfter=`forced`;break}}}),Object.freeze(s.map(e=>Object.freeze(e)))}function Rj(e,t,n,r,i){let a=Lj(e,t,r,i),o=n.get(r.pageIndex)??0;return Pj({columnCount:i.flowDomainIds.length,fragments:a}).targetPt+o}function zj(e,t,n,r,i){let a=t,o=e.lines.map((t,o)=>{let s=a++,c=String(s),l=i.measureLineNumberGlyph(c),u=Object.freeze({xPt:e.flowBounds.xPt-r,yPt:t.baselinePt});return Object.freeze({lineIndex:o,counterValue:s,bounds:Object.freeze({xPt:u.xPt-l.widthPt,yPt:u.yPt-l.ascentPt,widthPt:l.widthPt,heightPt:l.ascentPt+l.descentPt}),paintOps:s%n===0?Object.freeze([Object.freeze({kind:`text`,text:c,origin:u,font:l.font??``,color:`#000000`,textAlign:`right`})]):Object.freeze([])})});return Object.freeze({paragraph:Object.freeze({...e,lineNumbers:Object.freeze(o)}),counterEnd:a})}function Bj(e,t,n){let r=new Map,i,a=e.pages.map(e=>{if(e.parityBlank)return e;let a=[...e.layers.body];for(let o=0;o<e.sectionRegions.length;o+=1){let s=e.sectionRegions[o],c=new Set(s.flowDomainIds),l=a.flatMap((e,t)=>c.has(e.flowDomainId)?[t]:[]),u=new Map(l.map(e=>[a[e].id,a[e]])),d=n.filter(e=>{let t=u.get(e.nodeId);return c.has(e.flowDomainId)&&e.blockEndPt>e.blockStartPt&&t!==void 0&&(t.ordinaryFlow||t.sectionFlowOwnership===`host-flow`)}),f=d.length===0?s.blockStartPt:Math.min(...d.map(e=>e.blockStartPt)),p=d.length===0?f:Math.max(...d.map(e=>e.blockEndPt)),m=s.blockEndPt,h=Math.max(0,m-s.blockStartPt),g=Math.max(0,p-f),_=s.section.verticalAlignment,v=d.length>0&&g<h?_===`center`?s.blockStartPt+(h-g)/2-f:_===`bottom`?m-g-f:0:0,y=s.section.lineNumbering,b=y?.restart===`newPage`?y.start:y?.restart===`newSection`?r.get(s.sectionOccurrenceId)??y.start:r.get(s.sectionOccurrenceId)??i??y?.start??1;b??=1;for(let e of l){let n=a[e];if(n.kind===`paragraph`&&n.ordinaryFlow&&y){let e=zj(n,b,Math.max(1,y.countBy),EC(y.distance),t);n=e.paragraph,b=e.counterEnd}v!==0&&(n.ordinaryFlow||n.sectionFlowOwnership===`host-flow`)&&(n.kind===`paragraph`||n.kind===`table`)&&(n=_D(n,{xPt:0,yPt:v})),a[e]=n}y&&(r.set(s.sectionOccurrenceId,b),i=b)}return Object.freeze({...e,layers:V_(e.layers,`body`,a)})});return Object.freeze({...e,pages:Object.freeze(a)})}function Vj(e){let t=new Map;for(let n of e)for(let e of n.sectionRegions)t.has(e.sectionOccurrenceId)||t.set(e.sectionOccurrenceId,n.pageIndex);return t}function Hj(e,t){let n=e[t];return n?t===0||e[t-1]?.sectionOccurrenceId!==n.sectionOccurrenceId:!1}function Uj(e,t){return t.titlePage&&t.firstPageOfSection?e.first:t.evenAndOddHeaders&&t.displayPageNumber%2==0?e.even:e.default}function Wj(e,t){if(![e.pageHeight,e.marginTop,e.marginBottom,t.top,t.bottom].every(Number.isFinite))throw RangeError(`Reserved body interval inputs must be finite`);if(e.pageHeight<=0||t.top<0||t.bottom<0)throw RangeError(`Reserved body interval requires a positive page and non-negative reserves`);let n=Math.min(e.pageHeight,Math.abs(e.marginTop)+t.top),r=e.pageHeight-Math.abs(e.marginBottom)-t.bottom;return Object.freeze({blockStartPt:n,blockEndPt:Math.max(n,Math.min(e.pageHeight,r))})}function Gj(e,t,n){if(![e,t,n].every(Number.isFinite))throw RangeError(`Header/footer reserve inputs must be finite`);if(e<0)throw RangeError(`Story extent must be non-negative`);return e===0||t<0?0:Math.max(0,e-(t-n))}function Kj(e){let t=t=>{let n=Object.freeze(e.measure(t).map(e=>Object.freeze({...e})));return Object.freeze({result:t,reserves:n,pageCount:n.length,fingerprint:xg(`header-footer-reserve-v1`,{identity:e.identity(t),reserves:n})})},n=t(e.seed);return!e.requiresConvergence&&n.reserves.every(e=>e.top===0&&e.bottom===0)?n:Eb(n,n=>t(e.repaginate(n.reserves,n.result)),e.limit??16)}var qj=class extends Z{constructor(e,t){super(`INVALID_GEOMETRY`,`${t} exceeds the available flow capacity`),this.containerId=e,this.layoutId=t,this.name=`FlowCapacityExceededError`}};function Jj(e,t){if(e.length===0)return{xPt:t.xPt,yPt:t.yPt,widthPt:0,heightPt:0};let n=Math.min(...e.map(e=>e.xPt)),r=Math.min(...e.map(e=>e.yPt)),i=Math.max(...e.map(e=>e.xPt+e.widthPt)),a=Math.max(...e.map(e=>e.yPt+e.heightPt));return{xPt:n,yPt:r,widthPt:i-n,heightPt:a-r}}function Yj(e,t,n){let r=[],i=e.cursor,a=e.container.bounds;if(![a.xPt,a.yPt,a.widthPt,a.heightPt].every(Number.isFinite)||a.widthPt<0||a.heightPt<0)throw new Z(`INVALID_GEOMETRY`,`${e.container.id} has invalid bounds`);let o=e.container.bounds.yPt+e.container.bounds.heightPt,s=e.container.capacity===`unbounded`?2**53-1:o,c=e.container.bounds.xPt+e.container.bounds.widthPt;if(!Number.isFinite(i.xPt)||!Number.isFinite(i.yPt)||i.xPt<a.xPt||i.xPt>c||i.yPt<a.yPt||i.yPt>o)throw new Z(`INVALID_GEOMETRY`,`${e.container.id} has an invalid initial flow cursor`);for(let a of e.blocks){let l={container:e.container,cursor:i,availableBounds:{xPt:e.container.bounds.xPt,yPt:i.yPt,widthPt:e.container.bounds.widthPt,heightPt:Math.max(0,s-i.yPt)}},u=a.kind===`paragraph`?n.layoutParagraph(a,l,t):n.layoutTable(a,l,t);if(u.layout.flowDomainId!==e.container.id)throw new Z(`INVALID_REFERENCE`,`${u.layout.id} belongs to ${u.layout.flowDomainId}, not ${e.container.id}`);if(e.container.capacity!==`unbounded`&&Number.isFinite(u.nextCursor.yPt)&&u.nextCursor.yPt>o)throw new qj(e.container.id,u.layout.id);if(!Number.isFinite(u.nextCursor.xPt)||!Number.isFinite(u.nextCursor.yPt)||u.nextCursor.xPt<e.container.bounds.xPt||u.nextCursor.xPt>c||u.nextCursor.yPt<i.yPt)throw new Z(`INVALID_GEOMETRY`,`${u.layout.id} returned an invalid flow cursor`);r.push(u.layout),i=u.nextCursor}return{source:e.source,container:e.container,blocks:r,nextCursor:i,flowDomainId:e.container.id,flowBounds:Jj(r.map(e=>e.flowBounds),e.container.bounds),inkBounds:Jj(r.map(e=>e.inkBounds),e.container.bounds),...e.container.capacity===`unbounded`?{}:{clipBounds:e.container.bounds},advancePt:i.yPt-e.cursor.yPt,ordinaryFlow:!0}}const Xj=new WeakMap,Zj=e=>`type`in e&&e.type===`unsupportedTextBoxBlock`;function Qj(e,t){if(Xj.has(e))throw Error(`Story block layout algorithms are already attached`);Xj.set(e,Object.freeze({...t}))}function $j(e,t){return Object.freeze({...e,flowBounds:YE(e.flowBounds,t),inkBounds:YE(e.inkBounds,t),...e.clipBounds?{clipBounds:YE(e.clipBounds,t)}:{},blocks:Object.freeze(e.blocks.map(e=>{if(e.kind===`paragraph`)return lD(e,t);if(e.kind===`table`)return uD(e,t);throw Error(`Story contains unsupported retained node: ${e.kind}`)}))})}function eM(e,t){return Object.freeze({...e,flowBounds:YE(e.flowBounds,t),inkBounds:YE(e.inkBounds,t),...e.clipBounds?{clipBounds:YE(e.clipBounds,t)}:{},separator:Object.freeze(e.separator.map(e=>XE(e,t))),story:$j(e.story,t)})}function tM(e,t){for(let t of e.blocks)if(!Zj(t)&&(t.source.story!==e.source.story||t.source.storyInstance!==e.source.storyInstance))throw new Z(`INVALID_REFERENCE`,`Story block ${t.source.story}:${t.source.storyInstance} is not owned by ${e.source.story}:${e.source.storyInstance}`);let n=Xj.get(t);if(!n)throw Error(`Story block layout algorithms are not attached to the supplied services`);let r=e.blocks.filter(Zj),i=Yj({blocks:e.blocks.filter(e=>!Zj(e)),container:e.container,cursor:{xPt:e.container.bounds.xPt,yPt:e.container.bounds.yPt},source:e.source},t,n);return Object.freeze({story:e.source.story,flowBounds:i.flowBounds,inkBounds:i.inkBounds,...i.clipBounds?{clipBounds:i.clipBounds}:{},blocks:Object.freeze([...i.blocks]),advancePt:i.advancePt,diagnostics:Object.freeze(r.map(t=>Object.freeze({code:`UNSUPPORTED_FEATURE`,severity:`warning`,source:Object.freeze({story:e.source.story,storyInstance:e.source.storyInstance,path:Object.freeze([...t.sourcePath])}),message:`Unsupported text-box block ${t.qName}`})))})}var nM=class extends Error{code=`FOOTNOTE_RESERVE_EXCEEDS_FRESH_PAGE`;constructor(e,t,n){super(`Body footnote admission cannot fit a fresh physical page (reserve: ${e}, charge: ${t}, fresh page: ${n})`),this.reservePt=e,this.admissionChargePt=t,this.freshPageExtentPt=n,this.name=`FootnoteAdmissionOverflowError`}};function rM(e,t){if(t.has(e))return[];t.add(e);let n=e.diagnostics??[];return e.kind===`paragraph`?[...n,...e.drawings.flatMap(e=>rM(e,t)),...e.textBoxes.flatMap(e=>rM(e,t))]:e.kind===`table`?[...n,...e.rows.flatMap(e=>e.cells.flatMap(e=>e.blocks.flatMap(e=>rM(e.layout,t)))),...(e.floatingTables??[]).flatMap(e=>rM(e.child,t)),...(e.resolvedFloatingTables??[]).flatMap(e=>rM(e.child,t))]:e.kind===`textbox`||e.kind===`note`?[...n,...e.story.diagnostics,...e.story.blocks.flatMap(e=>rM(e,t))]:n}function iM(e,t,n){if(e>0&&t>n)throw new nM(e,t,n)}function aM(e){let t=new Set,n=e=>{for(let r of e.resolvedFloatingTables??[])t.add(r.occurrenceId),n(r.child)};return n(e),t}function oM(e,t,n){if(!e.floats)throw Error(`Accepted floating table omitted its float registry delta`);let r=aM(t);return Object.freeze({...e,floats:Object.freeze({...e.floats,entries:Object.freeze(e.floats.entries.map(e=>{let i=r.has(e.occurrenceId)?dD(n,e.occurrenceId):t.ordinaryFlow?null:n;return i===null?e:Object.freeze({...e,occurrenceId:i,exclusionId:i})}))})})}function sM(e,t){let n=new Set(t.drawings.flatMap(e=>{let t=e.anchorLayer?.acquisitionOccurrenceId??e.anchorLayer?.occurrenceId;return t===void 0?[]:[t]})),r=e.floats?.entries.filter(e=>n.has(e.occurrenceId))??[],i=e.drawingCollisions?.entries.filter(e=>n.has(e.occurrenceId))??[];return r.length===0&&i.length===0?null:Object.freeze({...e.floats&&r.length>0?{floats:Object.freeze({...e.floats,entries:Object.freeze(r),nextParagraphId:e.floats.baseNextParagraphId+r.length})}:{},...e.drawingCollisions&&i.length>0?{drawingCollisions:Object.freeze({...e.drawingCollisions,entries:Object.freeze(i)})}:{}})}function cM(e){let t=new Map([[e.initialSection.sectionOccurrenceId,e.initialSection]]);for(let n=0;n<e.sequence.length;n+=1){let r=e.sequence[n];r.kind===`begin-section`&&t.set(r.section.sectionOccurrenceId,r.section)}return t}function lM(e,t){return RC(e.context,e.pageLayout,t)}function uM(e,t){let n=lM(e,t);return AC({sectionOccurrenceId:e.sectionOccurrenceId,geometry:n.geometry,columns:n.columns,textDirection:n.textDirection,sectionBidi:n.sectionBidi===!0,grid:n.grid})}function dM(e,t,n,r=n.blockStartPt,i=lM(e,t).columns.map((e,t)=>t)){let a=lM(e,t);return Object.freeze({id:`page:${t}:section:${encodeURIComponent(e.sectionOccurrenceId)}`,sectionOccurrenceId:e.sectionOccurrenceId,section:a,pageBorders:e.pageBordersAuthored?e.pageBorders:null,writingMode:nv(a.textDirection),blockStartPt:r,blockEndPt:n.blockEndPt,columnFlowDirection:a.sectionBidi===!0?`rtl`:`ltr`,columnIndexes:Object.freeze([...i]),columns:Object.freeze(i.map(e=>{let t=a.columns[e];if(!t)throw Error(`Missing authored section column`);return Object.freeze({inlineStartPt:t.xPt,inlineExtentPt:t.wPt})}))})}function fM(e,t){let n=nv(e.textDirection),r=cv({widthPt:e.geometry.pageWidth,heightPt:e.geometry.pageHeight},n);return Object.freeze(n===`horizontal-tb`?{...r,contentTopPt:t.blockStartPt,contentBottomPt:t.blockEndPt}:{...r,contentTopPt:0,contentBottomPt:r.heightPt})}function pM(e,t,n){return Wj(lM(e,t).geometry,n)}function mM(e,t,n){let r=lM(e,t);return VE({kind:`content`,pageIndex:t,physicalPage:fM(r,n),sectionOccurrenceId:e.sectionOccurrenceId,section:r,region:dM(e,t,n)})}function hM(e){let t=e.pages.at(-1),n=t?.accumulator.sectionRegions.at(-1);if(!t||t.kind!==`content`||!n)throw Error(`Missing active body region`);return n}function gM(e){let t=hM(e),n=t.columnIndexes??t.section.columns.map((e,t)=>t),r=(t.columnFlowDirection===`rtl`?[...n].reverse():[...n]).at(-1)===e.flow.columnIndex;return e.balanceTargetPt===null||r?t.blockEndPt:Math.min(t.blockEndPt,t.blockStartPt+e.balanceTargetPt)}function _M(e){let t=hM(e),n=t.columnIndexes??t.section.columns.map((e,t)=>t),r=t.columns[n.indexOf(e.flow.columnIndex)];if(!r)throw Error(`Missing active body column`);return Object.freeze({pageIndex:e.flow.pageIndex,columnIndex:e.flow.columnIndex,flowDomainId:qC(e.flow.pageIndex,t.id,e.flow.columnIndex),section:t.section,cursorPt:Object.freeze({xPt:r.inlineStartPt,yPt:e.flow.cursorBlockPt}),availableBounds:Object.freeze({xPt:r.inlineStartPt,yPt:e.flow.cursorBlockPt,widthPt:r.inlineExtentPt,heightPt:Math.max(0,gM(e)-e.footnoteReservePt-e.flow.cursorBlockPt)})})}function vM(e,t){let n=t=>{let n=e.get(t);if(!n)throw Error(`Unknown body section ${t}`);return n};return{openContentPage(e){let r=n(e.sectionOccurrenceId),i=t[e.pageIndex]??{top:0,bottom:0},a=pM(r,e.pageIndex,i),o=SD(uM(r,e.pageIndex),{pageIndex:e.pageIndex,pageContentStartBlockPt:a.blockStartPt,pageContentEndBlockPt:a.blockEndPt});return{page:mM(r,e.pageIndex,a),flow:o}},openParityBlankPage(e){let r=n(e.sectionOccurrenceId),i=lM(r,e.pageIndex),a=pM(r,e.pageIndex,t[e.pageIndex]??{top:0,bottom:0});return VE({kind:`parity-blank`,pageIndex:e.pageIndex,physicalPage:fM(i,a),sectionOccurrenceId:r.sectionOccurrenceId,section:i,pageBorders:r.pageBordersAuthored?r.pageBorders:null})},openSamePageSectionRegion(e,t,r){let i=n(t.section.sectionOccurrenceId),a=e.accumulator.sectionRegions,o=a.at(-1);if(!o||!(`placement`in t))throw Error(`A same-page section requires explicit retained placement`);let s=Object.freeze({blockStartPt:e.accumulator.sectionRegions[0].blockStartPt,blockEndPt:o.blockEndPt}),c=t.placement===`same-page-block`?Object.freeze({...o,blockEndPt:r.regionStartBlockPt}):(()=>{let e=t.outgoingColumnSubset;if(!e||e.length===0)throw Error(`A same-page-column transition requires outgoing column ownership`);return Object.freeze({...o,columnIndexes:Object.freeze([...e]),columns:Object.freeze(e.map(e=>{let t=o.section.columns[e];if(!t)throw Error(`Missing outgoing authored column`);return Object.freeze({inlineStartPt:t.xPt,inlineExtentPt:t.wPt})}))})})(),l=Object.freeze([...a.slice(0,-1),c]);return Object.freeze({...e,accumulator:pw(Object.freeze({...e.accumulator,sectionRegions:l}),dM(i,r.pageIndex,s,r.regionStartBlockPt,t.columnSubset))})}}}function yM(e,t,n,r,i,a,o,s){let c=e.pages.at(-1);if(!c||c.kind!==`content`)throw Error(`Body content requires an active page`);let l=hM(e),u=l.columnIndexes??l.section.columns.map((e,t)=>t),d=l.columns[u.indexOf(e.flow.columnIndex)],f=qC(e.flow.pageIndex,l.id,e.flow.columnIndex),p=Cg(n,f,i);if(a.has(p))throw Error(`Duplicate body occurrence acceptance: ${p}`);a.add(p);let m=vD(t,{occurrenceId:p,destination:{coordinateSpace:`logical-page-points`,flowDomainId:f,translation:{xPt:s?s.xPt-t.flowBounds.xPt:t.kind===`table`?d.inlineStartPt:d.inlineStartPt-t.flowBounds.xPt,yPt:(s?.yPt??e.flow.cursorBlockPt)-t.flowBounds.yPt}}}),h=s?.sectionFlowOwnership===void 0?m:Object.freeze({...m,sectionFlowOwnership:s.sectionFlowOwnership}),g=s?.yPt??e.flow.cursorBlockPt,_=h.kind===`paragraph`&&h.ordinaryFlow?(()=>{let e=g+h.spacing.beforePt,t=g+r-h.spacing.afterPt;return Object.freeze({...h,flowBounds:Object.freeze({...h.flowBounds,yPt:e,heightPt:Math.max(0,t-e)})})})():h,v=s?.coordinateSpace===`upright-physical`?{..._,ordinaryFlow:!1,flowBounds:Object.freeze({..._.flowBounds,heightPt:r})}:_,y=wD(e.flow,v,r),b=y.events[0];if(!b||b.type!==`place`)throw Error(`Flow placement did not emit an allocation`);o.push(Object.freeze({nodeId:v.id,flowDomainId:v.flowDomainId,blockStartPt:b.blockStartPt,blockEndPt:b.blockEndPt}));let x=mw(c.accumulator,{layer:`body`,node:v,...s?.coordinateSpace===`upright-physical`?{coordinateSpace:`upright-physical`}:{}},!0),S=[...e.pages];return S[S.length-1]=Object.freeze({...c,accumulator:x}),Object.freeze({...e,flow:y.state,pages:Object.freeze(S)})}function bM(e){return e.boundary===null?`root`:`paragraph:${e.boundary.segIndex}:${e.boundary.charOffset}`}function xM(e,t){for(let n=t;n<e.sequence.length;n+=1){let t=e.sequence[n];if(t.kind===`consume-source`)continue;if(t.kind===`authored-break`){if(t.break!==`lastRenderedPageBreak`)return!1;continue}if(t.kind===`begin-section`){if(t.section.startType!==`continuous`)return!1;continue}let r=t.kind===`adjacent-table-group`?t:t.block;if(r.kind!==`paragraph`)return!0;if(r.pageBreakBefore)return!1;if(r.inkless!==!0)return!0}return!1}function SM(e){return e.paragraphMark!==void 0&&e.lines.length===0&&e.shading===void 0&&e.borders.length===0&&e.resources.length===0&&e.drawings.length===0&&e.textBoxes.length===0}function CM(e){return[e.rowIndex,e.rowFragmentIndex,e.cells.map(e=>[e.blockIndex,e.paragraphLineStart,e.nestedFragmentIndex,e.nestedCursor===null?null:CM(e.nestedCursor)])]}function wM(e){if(e===void 0)return`root`;if(e.kind===`table`)return`table:${JSON.stringify(CM(e.cursor))}`;let t=e.cursor.tableCursor;return`adjacent-table:${e.cursor.tableIndex}:${e.cursor.sourceRowIndex}:${JSON.stringify(t===void 0?null:CM(t))}`}function TM(e,t){let n=e.cursorPt.yPt+t,r=e.availableBounds.yPt+e.availableBounds.heightPt;return Object.freeze({...e,cursorPt:Object.freeze({...e.cursorPt,yPt:n}),availableBounds:Object.freeze({...e.availableBounds,yPt:n,heightPt:Math.max(0,r-n)})})}function EM(e,t){let n=Vj(e.pages.map(e=>e.accumulator)),r=0,i=null,a=e.pages.map(e=>{let a=t.get(e.accumulator.sectionOccurrenceId),o=a.sectionOccurrenceId!==i;a.sectionOccurrenceId!==i&&a.pageNumbering.start!==null?r=DC(a.pageNumbering.start,e.accumulator.pageIndex,n.get(a.sectionOccurrenceId)??e.accumulator.pageIndex):r+=1,i=a.sectionOccurrenceId;let s={displayNumber:r,format:a.pageNumbering.format??`decimal`,sectionOccurrenceId:a.sectionOccurrenceId};return e.kind===`parity-blank`?gw({pageIndex:e.accumulator.pageIndex,physicalPage:e.accumulator.physicalPage,sectionOccurrenceId:e.accumulator.sectionOccurrenceId,section:e.accumulator.section,pageBorders:e.accumulator.pageBorders,firstSectionOwnedPage:o,pageNumber:s}):hw(e.accumulator,s,o)}),o=new WeakSet;return{pages:a,diagnostics:a.flatMap(e=>H_(e).flatMap(({node:e})=>rM(e,o)))}}function DM(e,t,n,r,i,a){let o=o_(t);if(!o)throw Error(`Body layout kernel is not attached to the supplied services`);let s=cM(e),c=new Set,l=[],u=r[0]??{top:0,bottom:0},d=pM(e.initialSection,0,u),f=HE(SD(uM(e.initialSection,0),{pageContentStartBlockPt:d.blockStartPt,pageContentEndBlockPt:d.blockEndPt}),mM(e.initialSection,0,d)),p=e=>{let t=a.get(e.flow.section.sectionOccurrenceId);return t?.pageIndex===e.flow.pageIndex?t.targetPt:null};f=UE(f,p(f));let m=vM(s,r),h=null,g=o.openBodyLayoutSession({source:e.source,section:e.initialSection.context,initialLocation:_M(f)},t,n),_=e=>{let t=s.get(e.flow.section.sectionOccurrenceId);if(!t)throw Error(`Unknown body section ${e.flow.section.sectionOccurrenceId}`);let n=e.flow.pageIndex+1,i=pM(t,n,r[n]??{top:0,bottom:0});return i.blockEndPt-i.blockStartPt},v=(t,n)=>{if(i!==null){let e=_M(t);return Object.freeze([...i.values()].filter(t=>t.pageIndex===e.pageIndex&&t.flowDomainId===e.flowDomainId).map(({occurrenceId:e,paragraphSource:t})=>Object.freeze({occurrenceId:e,paragraphSource:t})))}let r=[];for(let t=n;t<e.sequence.length;t+=1){let i=e.sequence[t];if(i.kind===`authored-break`&&i.break!==`column`||i.kind===`begin-section`&&i.section.startType!==`continuous`)break;if(!(i.kind!==`body-block`||i.block.kind!==`paragraph`)){if(t>n&&i.block.pageBreakBefore)break;i.block.pageOwnedAnchorOccurrenceIds?.forEach(e=>r.push(Object.freeze({occurrenceId:e,paragraphSource:i.block.source})))}}return Object.freeze(r)},y=(e,t)=>{let n=v(e,t);if(n.length===0)return;if(!g.prescanPageAnchors)throw Error(`Page-owned anchors require canonical prescan acquisition`);let r=_M(e),i=g.prescanPageAnchors({anchors:n,location:r,availableInlineExtentPt:r.availableBounds.widthPt});i&&g.commitFlowRegistryDelta(i)};y(f,0);let b=(e,t,n=!1)=>{let r=f.flow.pageIndex,i=e.events.some(e=>e.type===`next-page`&&e.reason===`overflow`),a=e.events.some(e=>e.type===`begin-section`&&`placement`in e&&e.placement===`same-page-column`);f=GE(f,e,m),f=UE(f,p(f));let o=_M(f);f.flow.pageIndex===r?(g.moveAcquisitionCursor(o),a&&y(f,t)):(h=i&&n?t:null,g.resetPageAcquisition(o),y(f,t))},x=new Map,S=new Map,C=new Map,w=e=>(x.get(e)?.size??0)>0,T=(e,t,n)=>E(n??Mj(e),t),E=(e,t)=>{let n=x.get(f.flow.pageIndex)??new Set,r=[...new Set(e)].filter(e=>!n.has(e)),i=_M(f);if(r.length>0&&!g.layoutNotes)throw Error(`Footnote layout requires a note-capable layout session`);let a=r.length===0?Object.freeze([]):g.layoutNotes({kind:`footnote`,referenceIds:Object.freeze(r),pageIndex:f.flow.pageIndex,section:i.section,container:{id:`notes:page:${f.flow.pageIndex}`,kind:`footnote`,bounds:{xPt:i.availableBounds.xPt,yPt:0,widthPt:t,heightPt:i.section.geometry.pageHeight}},firstOnPage:n.size===0});return Object.freeze({ids:Object.freeze(r),layouts:a,reservePt:a.reduce((e,t)=>e+t.advancePt,0)})},D=(e,t,n)=>{let r=x.get(f.flow.pageIndex);r||(r=new Set,x.set(f.flow.pageIndex,r)),e.forEach(e=>r.add(e));let i=C.get(f.flow.pageIndex)??[];i.push(...t),C.set(f.flow.pageIndex,i),S.set(f.flow.pageIndex,(S.get(f.flow.pageIndex)??0)+n),f=WE(f,n)},O=()=>Math.max(0,gM(f)-f.footnoteReservePt-f.flow.deepestColumnBlockPt),k=e=>e>O(),A=null,j=YD(e.sequence),M=null;bodyEntries:for(let t=0;t<e.sequence.length;t+=1){let n=e.sequence[t];if(n.kind===`consume-source`)continue;if(n.kind===`authored-break`){if(A=null,n.break===`column`&&!j.has(t))continue;b(ND(f.flow,n.break,n.parity),t+1);continue}if(n.kind===`begin-section`){A=null;let e=nv(hM(f).section.textDirection),i=nv(lM(n.section,f.flow.pageIndex).textDirection),a=cv({widthPt:hM(f).section.geometry.pageWidth,heightPt:hM(f).section.geometry.pageHeight},e),o=lM(n.section,f.flow.pageIndex),s=cv({widthPt:o.geometry.pageWidth,heightPt:o.geometry.pageHeight},i),c=n.section.startType===`continuous`&&(e!==i||a.widthPt!==s.widthPt||a.heightPt!==s.heightPt)?`nextPage`:n.section.startType,l=pM(n.section,f.flow.pageIndex,r[f.flow.pageIndex]??{top:0,bottom:0});try{b(PD(f.flow,uM(n.section,f.flow.pageIndex),c,{hasFootnoteReferenceOnCurrentPage:w(f.flow.pageIndex),incomingPageContentStartBlockPt:l.blockStartPt,incomingPageContentEndBlockPt:l.blockEndPt}),t+1)}catch(e){if(!(e instanceof yD)||f.flow.pageIndex===0)throw e;let t=f.flow.pageIndex;f=Object.freeze({...f,pages:Object.freeze(f.pages.filter(e=>e.accumulator.pageIndex<t))}),M=Object.freeze({code:`UNSUPPORTED_FEATURE`,severity:`error`,source:n.source,message:`Document layout stopped after the last complete page because a nextColumn section could not be placed safely (${e.reason})`});break bodyEntries}continue}let i=n.kind===`adjacent-table-group`?n:n.block;if(i.kind===`paragraph`){if(i.continuousSectionRole===`collapse-mark`)continue;i.pageBreakBefore&&b(ND(f.flow,`pageBreakBefore`),t);let n=A?.spaceAfterPt??0,a=vk(A,i,n,i.continuousSectionRole===`suppress-before`?0:i.spaceBeforePt),o=i.continuousSectionRole===`drop-previous-after`?n:a.overlap;o>0&&(f=Object.freeze({...f,flow:Object.freeze({...f.flow,cursorBlockPt:Math.max(f.flow.regionStartBlockPt,f.flow.cursorBlockPt-o)})}));let s=Object.freeze({boundary:null});for(;s;){let n=bM(s),o=_M(f),u=g.measureParagraph({input:i,location:o,availableInlineExtentPt:o.availableBounds.widthPt,suppressSpaceBefore:s.boundary!==null||i.continuousSectionRole===`suppress-before`||a.suppressBefore||s.boundary===null&&!f.flow.pageHasContent&&h===t,continuation:s});if(u.placement){let e=T(u.layout,o.availableBounds.widthPt,u.retainedFootnoteReferenceIds),r=u.relocationBlockExtentPt,a=u.placement.sectionFlowOwnership===`page`?e.reservePt:(r??u.blockExtentPt)+e.reservePt,d=_(f),p=k(e.reservePt);if(iM(e.reservePt,a,d),(a>o.availableBounds.heightPt||p)&&a<=d&&f.flow.pageHasContent){b(p?AD(f.flow,f.flow.section,`overflow`):TD(f.flow,`overflow`),t);continue}f=yM(f,u.layout,i.source,u.blockExtentPt,n,c,l,u.placement),D(e.ids,e.layouts,e.reservePt),u.flowRegistryDelta&&g.commitFlowRegistryDelta(u.flowRegistryDelta),s=null,g.moveAcquisitionCursor(_M(f));continue}if(s.boundary===null&&i.keepNext&&f.flow.pageHasContent){let n=u.blockExtentPt,r=new Set(Mj(u.layout)),a=!1,s=UD({keepNext:i.keepNext,inkless:i.inkless===!0,undecoratedMark:SM(u.layout)});for(let i=t+1;i<e.sequence.length;i+=1){let t=e.sequence[i];if(t.kind===`consume-source`)continue;if(t.kind===`authored-break`||t.kind===`begin-section`)break;let c=t.kind===`adjacent-table-group`?t:t.block;if(c.kind===`paragraph`&&c.pageBreakBefore)break;let l=g.measureFollowingBlock({input:c,location:o,availableInlineExtentPt:o.availableBounds.widthPt}),u=c.kind===`paragraph`&&(c.keepNext||s);if(s=!1,n+=u?l.fullExtentPt:l.leadContentExtentPt,(u?l.fullFootnoteReferenceIds:l.leadFootnoteReferenceIds)?.forEach(e=>r.add(e)),!u){a=!0;break}}let c=E([...r],o.availableBounds.widthPt).reservePt,l=n+c;if(a&&l>o.availableBounds.heightPt&&l<=_(f)){b(TD(f.flow,`overflow`),t,!0);continue}}let d=e.sequence[t+1],p=e.sequence[t+2],m=d?.kind===`body-block`&&d.block.kind===`paragraph`&&p?.kind===`authored-break`&&p.break===`page`&&p.sameSourceParagraphAsPrevious!==!0,v=KD(u.layout);if(s.boundary===null&&v&&m&&f.flow.pageHasContent){let e=TM(o,u.blockExtentPt),n=g.measureParagraph({input:d.block,location:e,availableInlineExtentPt:e.availableBounds.widthPt,suppressSpaceBefore:!1,continuation:Object.freeze({boundary:null})});g.moveAcquisitionCursor(o);let r=qD(n.layout,e.cursorPt.yPt);if(r!==null){let e=u.blockExtentPt+r;if(e>o.availableBounds.heightPt&&e<=_(f)){b(TD(f.flow,`overflow`),t);continue}}}let y=e.sequence[t+1],x=y?.kind===`authored-break`&&y.break===`page`;if(s.boundary===null&&x){let e=JD(u.layout);if(e!==null){f=yM(f,e,i.source,0,n,c,l),u.flowRegistryDelta&&g.commitFlowRegistryDelta(u.flowRegistryDelta),s=null,g.moveAcquisitionCursor(_M(f));continue}}let S=T(u.layout,o.availableBounds.widthPt).reservePt,C=(r[f.flow.pageIndex]?.bottom??0)===0&&f.footnoteReservePt===0,w=gM(f)===hM(f).blockEndPt,O=y?.kind===`begin-section`&&y.section.startType===`nextPage`,A=OC({hasContinuationBoundary:s.boundary!==null,inkless:i.inkless===!0,undecorated:SM(u.layout),keepNext:i.keepNext,markReservePt:S,pageBottomIsUnreserved:C,physicalRegionBottomIsActive:w,hasFollowingInk:xM(e,t+1),followsNextPageSectionBoundary:O,markExtentPt:u.blockExtentPt,markBelowBaselinePt:u.markBelowBaselinePt??0}),j=wj(u.layout,s,u.fragmentation,o.availableBounds.heightPt+A,_(f),f.flow.pageHasContent,{keepLines:i.keepLines,widowControl:i.widowControl,authoredSpaceAfterPt:i.spaceAfterPt,writingMode:hM(f).writingMode},e=>T(e,o.availableBounds.widthPt).reservePt,u.uniformRubyAdvancePt,e=>!k(e));if(j.requiresFreshFlowRegion){b(TD(f.flow,`overflow`),t);continue}if(!j.fragment)throw Error(`Paragraph acquisition made no progress`);f=yM(f,j.fragment,i.source,Math.min(j.admittedBlockExtentPt,o.availableBounds.heightPt),n,c,l,u.placement);let M=T(j.fragment,o.availableBounds.widthPt);if(iM(M.reservePt,j.fragment.advancePt+M.reservePt,_(f)),D(M.ids,M.layouts,M.reservePt),u.flowRegistryDelta){let e=sM(u.flowRegistryDelta,j.fragment);e&&g.commitFlowRegistryDelta(e)}s=j.nextCursor,s&&b(TD(f.flow,`overflow`),t),o=_M(f),g.moveAcquisitionCursor(o)}A=i}else{A=null;let e,n=!1;for(;!n;){let r=wM(e),a=_M(f),o=t=>g.measureTable({input:i,location:a,availableInlineExtentPt:a.availableBounds.widthPt,availableBlockExtentPt:t,freshPageBlockExtentPt:_(f),...e?{cursor:e}:{}}),s=a.availableBounds.heightPt,u=o(s);if(u.retryAtBlockStartPt!==void 0){if(!Number.isFinite(u.retryAtBlockStartPt)||u.retryAtBlockStartPt<=f.flow.cursorBlockPt)throw Error(`Table repositioning must advance the block cursor`);f=Object.freeze({...f,flow:Object.freeze({...f.flow,cursorBlockPt:u.retryAtBlockStartPt})}),g.moveAcquisitionCursor(_M(f));continue}let d=u.requiresFreshFlowRegion?Object.freeze({ids:Object.freeze([]),layouts:Object.freeze([]),reservePt:0}):T(u.layout,a.availableBounds.widthPt),p=Object.freeze({reservePt:d.reservePt,chargePt:u.blockExtentPt+d.reservePt}),m=new Set;for(;!u.requiresFreshFlowRegion&&u.blockExtentPt+d.reservePt>a.availableBounds.heightPt;){let e=JSON.stringify({advancePt:u.blockExtentPt,nextCursor:u.nextCursor??null,noteIds:d.ids,reservePt:d.reservePt});if(m.has(e))throw iM(p.reservePt,p.chargePt,_(f)),Error(`Table footnote admission did not converge`);m.add(e),s=Math.max(0,a.availableBounds.heightPt-d.reservePt),u=o(s),d=u.requiresFreshFlowRegion?Object.freeze({ids:Object.freeze([]),layouts:Object.freeze([]),reservePt:0}):T(u.layout,a.availableBounds.widthPt),u.requiresFreshFlowRegion||(p=Object.freeze({reservePt:d.reservePt,chargePt:u.blockExtentPt+d.reservePt}))}if(u.requiresFreshFlowRegion){iM(p.reservePt,p.chargePt,_(f));let n=!f.flow.pageHasContent&&u.nextCursor?.kind===`table`&&u.nextCursor.floatingContinuationFrame===`fresh-text`&&!(e?.kind===`table`&&e.floatingContinuationFrame!==void 0);if(u.nextCursor?.kind===`table`&&u.nextCursor.floatingContinuationFrame!==void 0&&(e=u.nextCursor),n)continue;b(TD(f.flow,`overflow`),t);continue}if(k(d.reservePt)&&f.flow.pageHasContent){b(AD(f.flow,f.flow.section,`overflow`),t);continue}f=yM(f,u.layout,i.source,u.blockExtentPt,r,c,l,u.placement),D(d.ids,d.layouts,d.reservePt),u.flowRegistryDelta&&g.commitFlowRegistryDelta(oM(u.flowRegistryDelta,u.layout,Cg(i.source,a.flowDomainId,r))),e=u.nextCursor??void 0,n=e===void 0,e&&b(TD(f.flow,`overflow`),t)}}g.moveAcquisitionCursor(_M(f))}let N=new Set([...S.keys(),...C.keys()]);for(let e of N){let t=S.get(e)??0,n=(C.get(e)??[]).reduce((e,t)=>e+t.advancePt,0);if(t!==n)throw new Z(`INVALID_GEOMETRY`,`Page ${e} footnote reserve ${t} does not equal retained advance ${n}`)}let P=EM(f,s),F=new Set(P.pages.map(e=>e.pageIndex)),I=new Set(P.pages.flatMap(e=>H_(e).map(({node:e})=>e.id))),L=new Map([...S].filter(([e])=>F.has(e))),R=new Map([...C].filter(([e])=>F.has(e)));return Object.freeze({layout:P,session:g,allocations:Object.freeze(l.filter(e=>I.has(e.nodeId))),footnoteReserveByPage:L,footnoteLayoutsByPage:R,terminalDiagnostic:M})}function OM(e,t){return Object.freeze(e.layout.pages.map((n,r)=>{if(n.parityBlank||nv(n.section.textDirection)!==`horizontal-tb`)return Object.freeze({top:0,bottom:0});let i=t.get(n.sectionOccurrenceId);if(!i)throw Error(`Unknown body section ${n.sectionOccurrenceId}`);let a=Math.max(0,n.section.geometry.pageWidth-Math.abs(n.section.geometry.marginLeft)-Math.abs(n.section.geometry.marginRight)),o=t=>{let o=Uj(t===`header`?i.headers:i.footers,{titlePage:i.titlePage,firstPageOfSection:Hj(e.layout.pages,r),evenAndOddHeaders:i.evenAndOddHeaders,displayPageNumber:n.pageNumber.displayNumber});if(o===null)return 0;if(!e.session.layoutStory)throw Error(`Header/footer story layout requires a story-capable layout session`);return e.session.layoutStory({source:o,pageIndex:n.pageIndex,section:n.section,container:{id:`story:${t}:page:${n.pageIndex}`,kind:t,bounds:{xPt:Math.abs(n.section.geometry.marginLeft),yPt:0,widthPt:a,heightPt:n.section.geometry.pageHeight}}}).advancePt};return Object.freeze({top:Gj(o(`header`),n.section.geometry.marginTop,n.section.geometry.headerDistance),bottom:Gj(o(`footer`),n.section.geometry.marginBottom,n.section.geometry.footerDistance)})}))}function kM(e,t,n,r){let i=e.pages.map((i,a)=>{if(i.parityBlank)return i;let o=n.get(i.sectionOccurrenceId);if(!o)throw Error(`Unknown body section ${i.sectionOccurrenceId}`);if(!t.layoutStory){if(!(Object.values(o.headers).some(e=>e!==null)||Object.values(o.footers).some(e=>e!==null)||(r.get(i.pageIndex)?.length??0)>0))return i;throw Error(`Page-story composition requires a story-capable layout session`)}let s=nv(i.section.textDirection)!==`horizontal-tb`,c=s?FC(i.section.geometry):i.section.geometry,l=Math.abs(c.marginLeft),u=Math.max(0,c.pageWidth-Math.abs(c.marginLeft)-Math.abs(c.marginRight)),d=s?`upright-physical`:`section-logical`,f=s?Object.freeze({...i.section,geometry:Object.freeze({...c}),columns:Object.freeze([Object.freeze({xPt:l,wPt:u})]),textDirection:`lrTb`}):i.section,p=t=>Uj(t===`header`?o.headers:o.footers,{titlePage:o.titlePage,firstPageOfSection:Hj(e.pages,a),evenAndOddHeaders:o.evenAndOddHeaders,displayPageNumber:i.pageNumber.displayNumber}),m=e=>{let n=p(e);if(n===null)return null;let r=t.layoutStory({source:n,pageIndex:i.pageIndex,section:f,container:{id:`story:${e}:page:${i.pageIndex}`,kind:e,bounds:{xPt:l,yPt:0,widthPt:u,heightPt:c.pageHeight}}});return $j(r,{xPt:0,yPt:(e===`header`?c.headerDistance:c.pageHeight-c.footerDistance-r.advancePt)-r.flowBounds.yPt})},h=m(`header`),g=m(`footer`),_=r.get(i.pageIndex)??[],v=_.reduce((e,t)=>e+t.advancePt,0),y=i.sectionRegions[0],b=(y?.blockEndPt??Math.max(0,i.section.geometry.pageHeight-Math.abs(i.section.geometry.marginBottom)))-v,x=b,S=_.map(e=>{let t=eM(e,{xPt:0,yPt:x-e.flowBounds.yPt});return x+=e.advancePt,t}),C=S.length===0?0:Math.min(...S.map(e=>e.flowBounds.xPt)),w=S.length===0?0:Math.max(...S.map(e=>e.flowBounds.xPt+e.flowBounds.widthPt)),T=Object.freeze({xPt:C,yPt:b,widthPt:w-C,heightPt:v}),E=y?Object.freeze(fv(y.coordinateSpace.logicalToPhysical,T)):T,D=[...h?[Object.freeze({id:`story:header:page:${i.pageIndex}`,kind:`header`,logicalBounds:Object.freeze({xPt:l,yPt:h.flowBounds.yPt,widthPt:u,heightPt:h.advancePt}),physicalBounds:Object.freeze({xPt:l,yPt:h.flowBounds.yPt,widthPt:u,heightPt:h.advancePt})})]:[],...S.length>0?[Object.freeze({id:`notes:page:${i.pageIndex}`,kind:`footnote`,...y?{sectionRegionId:y.id}:{},logicalBounds:T,physicalBounds:E})]:[],...g?[Object.freeze({id:`story:footer:page:${i.pageIndex}`,kind:`footer`,logicalBounds:Object.freeze({xPt:l,yPt:g.flowBounds.yPt,widthPt:u,heightPt:g.advancePt}),physicalBounds:Object.freeze({xPt:l,yPt:g.flowBounds.yPt,widthPt:u,heightPt:g.advancePt})})]:[]],O=i.layers.roots.map(e=>e),k=O.findIndex(e=>e.layer!==`background`&&e.layer!==`behindText`),A=k<0?O.length:k,j=[...O.slice(0,A),...h?.blocks.map(e=>({layer:`header`,node:e,coordinateSpace:d}))??[],...O.slice(A)],M=-1;for(let e=0;e<j.length;e+=1)j[e].layer===`body`&&(M=e);let N=M<0?j.length:M+1,P=[...j.slice(0,N),...S.map(e=>({layer:`notes`,node:e,coordinateSpace:`section-logical`})),...j.slice(N),...g?.blocks.map(e=>({layer:`footer`,node:e,coordinateSpace:d}))??[]];return Object.freeze({...i,flowDomains:Object.freeze([...i.flowDomains,...D]),layers:B_(P),readingOrder:Object.freeze([...h?.blocks.map(e=>e.id)??[],...i.readingOrder,...S.map(e=>e.id),...g?.blocks.map(e=>e.id)??[]])})});return Object.freeze({...e,pages:Object.freeze(i)})}function AM(e,t,n){if(n.length===0)return e;let r=-1;for(let t=e.pages.length-1;t>=0;--t)if(!e.pages[t].parityBlank){r=t;break}if(r<0)return e;let i=e.pages[r];if(!t.layoutNotes)return Object.freeze({...e,diagnostics:Object.freeze([...e.diagnostics,Object.freeze({code:`UNSUPPORTED_FEATURE`,severity:`error`,source:Object.freeze({story:`endnote`,storyInstance:n[0],path:Object.freeze([])}),message:`Document-end notes require a note-capable layout session`})])});let a=new Map(i.flowDomains.map(e=>[e.id,e])),o=i.layers.body.filter(e=>e.ordinaryFlow&&a.get(e.flowDomainId)?.kind===`body`).reduce((e,t)=>e===null||t.flowBounds.yPt+t.flowBounds.heightPt>e.flowBounds.yPt+e.flowBounds.heightPt?t:e,null),s=o?a.get(o.flowDomainId):[...i.flowDomains].reverse().find(e=>e.kind===`body`);if(!s)return Object.freeze({...e,diagnostics:Object.freeze([...e.diagnostics,Object.freeze({code:`UNSUPPORTED_FEATURE`,severity:`error`,message:`Document-end notes require a retained body flow domain`})])});let c=i.sectionRegions.find(e=>e.flowDomainIds.includes(s.id))??i.sectionRegions[0],l=o?o.flowBounds.yPt+o.flowBounds.heightPt:s.logicalBounds.yPt,u=i.layers.notes.filter(e=>e.kind===`note`&&e.source.story===`footnote`).reduce((e,t)=>Math.min(e,t.flowBounds.yPt),s.logicalBounds.yPt+s.logicalBounds.heightPt),d=Math.min(s.logicalBounds.yPt+s.logicalBounds.heightPt,u),f=`endnotes:page:${i.pageIndex}`;try{let a=t.layoutNotes({kind:`endnote`,referenceIds:Object.freeze([...n]),pageIndex:i.pageIndex,section:c?.section??i.section,container:{id:f,kind:`endnote`,bounds:{xPt:s.logicalBounds.xPt,yPt:l,widthPt:s.logicalBounds.widthPt,heightPt:Math.max(0,d-l)}},firstOnPage:!0});if(a.length===0)return e;let o=a.reduce((e,t)=>e+t.advancePt,0),u=Object.freeze({xPt:s.logicalBounds.xPt,yPt:l,widthPt:s.logicalBounds.widthPt,heightPt:o}),p=Object.freeze({id:f,kind:`endnote`,...c?{sectionRegionId:c.id}:{},logicalBounds:u,physicalBounds:c?Object.freeze(fv(c.coordinateSpace.logicalToPhysical,u)):u}),m=i.layers.roots.map(e=>e),h=-1;for(let e=0;e<m.length;e+=1)m[e].layer===`body`&&(h=e);h+=1,m.splice(h,0,...a.map(e=>({layer:`notes`,node:e,coordinateSpace:`section-logical`})));let g=new Set(i.layers.body.map(e=>e.id)),_=-1;for(let e=0;e<i.readingOrder.length;e+=1)g.has(i.readingOrder[e])&&(_=e);_+=1;let v=[...i.readingOrder];v.splice(_,0,...a.map(e=>e.id));let y=[...e.pages];return y[r]=Object.freeze({...i,flowDomains:Object.freeze([...i.flowDomains,p]),layers:B_(m),readingOrder:Object.freeze(v)}),Object.freeze({...e,pages:Object.freeze(y)})}catch(t){if(!(t instanceof zE)||t.kind!==`endnote`||t.pageIndex!==i.pageIndex||t.containerId!==f)throw t;return Object.freeze({...e,diagnostics:Object.freeze([...e.diagnostics,Object.freeze({code:`UNSUPPORTED_FEATURE`,severity:`error`,source:Object.freeze({story:`endnote`,storyInstance:n[0],path:Object.freeze([])}),message:`Document-end notes do not fit the retained terminal flow region: ${t instanceof Error?t.message:String(t)}`})])})}}function jM(e,t,n,r){return Object.freeze({...e,diagnostics:Object.freeze([...e.diagnostics,Object.freeze({code:`UNSUPPORTED_FEATURE`,severity:`error`,message:`Unsupported ${t} position ${JSON.stringify(n)}; retained layout uses the ${r} fallback`})])})}function MM(e){let t=new Map;for(let n of e.pages)for(let e of n.layers.body)if(e.kind===`paragraph`)for(let r of e.drawings){let i=r.anchorLayer;if(!i||i.horizontalOwnership!==`page`||i.verticalOwnership!==`page`)continue;let a=i.acquisitionOccurrenceId??i.occurrenceId;t.set(a,Object.freeze({occurrenceId:a,paragraphSource:e.source,pageIndex:n.pageIndex,flowDomainId:e.flowDomainId}))}return t}function NM(e){return JSON.stringify([...e].sort(([e],[t])=>e.localeCompare(t)))}function PM(e,t,n,r,i){if(!e.sequence.some(e=>e.kind===`body-block`&&e.block.kind===`paragraph`&&(e.block.pageOwnedAnchorOccurrenceIds?.length??0)>0))return DM(e,t,n,r,null,i);try{return Tb({step:a=>{let o=DM(e,t,n,r,a?.plan??null,i);return Object.freeze({pass:o,plan:MM(o.layout)})},stateOf:e=>NM(e.plan),limit:16}).value.pass}catch(e){throw e instanceof wb?new Z(`NON_CONVERGENCE`,e.reason===`cycle`?`Page-anchor destination acquisition repeated an exact-state cycle`:`Page-anchor destination acquisition reached the operational pass limit 16`):e}}function FM(e){let t=[],n=e.initialSection;for(let r of e.sequence)r.kind===`begin-section`&&(r.section.startType===`continuous`&&t.push(Object.freeze({outgoingSectionOccurrenceId:n.sectionOccurrenceId,incomingSectionOccurrenceId:r.section.sectionOccurrenceId})),n=r.section);return Object.freeze(t)}function IM(e,t,n){for(let r of e.pages)for(let e=0;e+1<r.sectionRegions.length;e+=1){let i=r.sectionRegions[e],a=r.sectionRegions[e+1];if(i.sectionOccurrenceId===t&&a.sectionOccurrenceId===n)return Object.freeze({page:r,outgoing:i})}return null}function LM(e,t,n,r){let i=new Map,a=PM(e,t,n,r,i);if(a.terminalDiagnostic!==null)return a;for(let o of FM(e)){let s=IM(a.layout,o.outgoingSectionOccurrenceId,o.incomingSectionOccurrenceId);if(s===null||s.outgoing.flowDomainIds.length<2)continue;let c=s.page.pageIndex,l=Rj(e,a.allocations,a.footnoteReserveByPage,s.page,s.outgoing),u=new Map(i);if(u.set(o.outgoingSectionOccurrenceId,Object.freeze({pageIndex:c,targetPt:l})),i=u,a=PM(e,t,n,r,i),a.terminalDiagnostic!==null)return a}return a}function RM(e,t,n){t=v_(t);let r=cM(e),i=LM(e,t,n,[]),a=Kj({seed:i,measure:e=>OM(e,r),repaginate:(r,i)=>{let a=yk(i.layout);return LM(e,b_(t,{totalPages:i.layout.pages.length,resolveDestinationPage:e=>a[e]}),n,r)},identity:e=>yk(e.layout),requiresConvergence:i.session.hasPaginationFields}).result,o=Bj(a.layout,a.session,a.allocations),s=e.noteLayoutSettings??Object.freeze({footnotePosition:`pageBottom`,endnotePosition:`docEnd`}),c=kM(o,a.session,r,a.footnoteLayoutsByPage),l=c.pages.some(e=>e.layers.notes.some(e=>e.source.story===`footnote`))&&s.footnotePosition!==`pageBottom`?jM(c,`footnote`,s.footnotePosition,`pageBottom`):c,u=new Set(o.pages.flatMap(e=>e.layers.body.flatMap(e=>e.kind===`paragraph`||e.kind===`table`?Nj(e):[]))),d=(e.endnoteIds??[]).filter(e=>u.has(e)),f=AM(l,a.session,d),p=d.length>0&&s.endnotePosition!==`docEnd`?jM(f,`endnote`,s.endnotePosition,`docEnd`):f,m=[...e.parserDiagnostics??[],...a.terminalDiagnostic===null?[]:[a.terminalDiagnostic]],h=m.length===0?p:Object.freeze({...p,diagnostics:Object.freeze([...m,...p.diagnostics])});return Qw(Object.freeze({...h,pages:Object.freeze(h.pages.map(uw))}))}function zM(e,t,n=q_(void 0,Date.now())){return RM(e,t,n)}function BM(e,t,n){if(f_(e))return;let r=n();tT({source:r,services:e,defaultCurrentDateMs:t,buildLayout:t=>zM(r.bodyLayoutInput,e,t)})}async function VM(e,t){if(e.length===0)return{records:[],drawables:new Map};await t.loadMathJax();let n=[],r=new Map,i=new Set;for(let a of e){if(i.has(a.resourceKey))throw Error(`Duplicate math occurrence: ${a.resourceKey}`);i.add(a.resourceKey);try{let e=await t.mathMLToSvg(Fl(a.nodes,a.display)),i=await Xl(e,`#000000`);n.push({resourceKey:a.resourceKey,widthEm:e.widthEm,ascentEm:e.ascentEm,descentEm:e.descentEm,diagnostics:[]}),r.set(a.resourceKey,i.source)}catch{n.push({resourceKey:a.resourceKey,widthEm:0,ascentEm:0,descentEm:0,available:!1,diagnostics:[{code:`UNSUPPORTED_FEATURE`,severity:`warning`,message:`Math conversion failed; using the deterministic text fallback`}]})}}return{records:n,drawables:r}}function HM(e,t){switch(e){case`margin`:return{left:t.marginLeft,right:t.pageWidth-t.marginRight};case`page`:return{left:0,right:t.pageWidth};default:return{left:t.contentX,right:t.contentX+t.contentW}}}function UM(e,t,n,r){switch(e){case`margin`:return{start:r.marginTop,end:r.pageH-r.marginBottom};case`page`:return{start:0,end:r.pageH};default:return{start:t,end:t+n}}}function WM(e,t,n,r){switch(e){case`center`:return t+(n-t-r)/2;case`right`:case`outside`:return n-r;default:return t}}function GM(e,t,n){switch(e){case`center`:return t.start+(t.end-t.start-n)/2;case`bottom`:case`outside`:return t.end-n;default:return t.start}}function KM(e,t,n){return e+t<=n.end?e:Math.max(n.start,n.end-t)}function qM(e,t,n,r,i,a){let o=e.dropCap===`drop`||e.dropCap===`margin`,s=HM(e.hAnchor,t),c=UM(e.vAnchor,n,i,t),l=e.w==null?r:e.w,u;if(o)u=Math.max(1,e.lines)*a;else{let t=e.h??0;u=e.hRule===`exact`?t:e.hRule===`atLeast`?Math.max(t,i):i}let d;d=e.dropCap===`drop`?s.left:e.dropCap===`margin`?s.left-l:e.xAlign?WM(e.xAlign,s.left,s.right,l):s.left+(e.x??0);let f;f=o?c.start:e.yAlign&&e.vAnchor!==`text`?GM(e.yAlign,c,u):c.start+(e.y??0),(e.vAnchor===`page`||e.vAnchor===`margin`)&&(f=KM(f,u,c));let p=e.wrap===`around`||e.wrap===`auto`?e.hSpace:0,m=e.vSpace;return{x:d,y:f,w:l,h:u,exLeft:d-p,exRight:d+l+p,exTop:f-m,exBottom:f+u+m}}function JM(e,t){if(t.kind===`table`&&t.tableOverlap===void 0)throw Error(`Floating-table transport omitted tblOverlap`);let n=t.x,r=t.y;if(t.avoidOverlap){let i={occurrenceId:`display-moving-float`,paragraphId:t.paraId,bounds:{xPt:n,yPt:r,widthPt:t.w,heightPt:t.h},exclusionBounds:{xPt:n-t.dl,yPt:r-t.dt,widthPt:t.w+t.dl+t.dr,heightPt:t.h+t.dt+t.db}},a=Ry({moving:t.kind===`table`?{...i,kind:`table`,tableOverlap:t.tableOverlap}:{...i,kind:t.kind===`frame`?`frame`:`drawingml`},blockers:e.floats.map(My),avoidance:t.kind===`table`?ky(t.tableOverlap,t.paraId):Ay(t.allowOverlap??!0,t.paraId),rightBoundaryPt:e.pageWidth,overlapEpsilonPt:Dy,rightBoundarySlackPt:Oy});n=a.bounds.xPt,r=a.bounds.yPt}let i={mode:t.mode,imageKey:t.imageKey,imageX:n,imageY:r,imageW:t.w,imageH:t.h,xLeft:n-t.dl,xRight:n+t.w+t.dr,yTop:r-t.dt,yBottom:r+t.h+t.db,side:t.side,distLeft:t.dl,distRight:t.dr,distTop:t.dt,distBottom:t.db,paraId:t.paraId},a=t.kind===`table`?{...i,kind:`table`,tableOverlap:t.tableOverlap}:{...i,kind:t.kind};return e.floats.push(a),a}function YM(e){return e.xPt+e.widthPt}function XM(e){return e.yPt+e.heightPt}function ZM(e,t,n,r){return e===`center`?t+(n-t-r)/2:e===`right`||e===`outside`?n-r:t}function QM(e,t,n,r){return e===`center`?t+(n-t-r)/2:e===`bottom`||e===`outside`?n-r:t}function $M(e,t,n,r,i=!1){let a=e.horzSpecified?e.horzAnchor===`page`?t.page:e.horzAnchor===`margin`?t.margin:t.text:t.text,o=e.vertAnchor===`page`?t.page:e.vertAnchor===`margin`?t.margin:t.text,s=e.xAlign?ZM(e.xAlign,a.xPt,YM(a),n):a.xPt+e.xPt,c=e.yAlign&&e.vertAnchor!==`text`?QM(e.yAlign,o.yPt,XM(o),r):o.yPt+e.yPt;return!i&&(e.vertAnchor===`page`||e.vertAnchor===`margin`)&&c+r>XM(o)&&(c=Math.max(o.yPt,XM(o)-r)),Object.freeze({x:s,y:c,w:n,h:r})}function eN(e,t,n,r){return $M(e,t,n,r)}function tN(e,t,n){let r=e.child.columnWidthsPt.reduce((e,t)=>e+t,0),i=e.child.advancePt,a=e.positioning,o=Object.freeze({xPt:t,yPt:n,widthPt:r,heightPt:i}),s=Object.freeze({xPt:t-a.leftFromTextPt,yPt:n-a.topFromTextPt,widthPt:r+a.leftFromTextPt+a.rightFromTextPt,heightPt:i+a.topFromTextPt+a.bottomFromTextPt});return Object.freeze({kind:`resolved-floating-table-placement`,occurrenceId:e.occurrenceId,xPt:t,yPt:n,bounds:o,exclusionBounds:s,overlap:e.overlap,child:e.child,source:e})}function nN(e,t){let n=e.child.columnWidthsPt.reduce((e,t)=>e+t,0),r=e.child.advancePt,i=eN(e.positioning,t,n,r),a=qE(e.positioning);return tN(e,a.x&&e.acquiredTextOffsetPt?t.text.xPt+e.acquiredTextOffsetPt.xPt:i.x,a.y&&e.acquiredTextOffsetPt?t.text.yPt+e.acquiredTextOffsetPt.yPt:i.y)}function rN(e,t,n){return Object.freeze({coordinateSpace:e.coordinateSpace,flowDomainId:e.flowDomainId,baseEntries:e.entries,baseNextParagraphId:e.nextParagraphId,nextParagraphId:n,entries:Object.freeze([...t])})}function iN(e,t){if(t.coordinateSpace!==e.coordinateSpace||t.flowDomainId!==e.flowDomainId||t.entries!==e.baseEntries||t.nextParagraphId!==e.baseNextParagraphId)throw Error(`Floating table registry delta base/domain mismatch`);let n=new Set(t.entries.map(e=>e.occurrenceId));if(e.entries.some(e=>n.has(e.occurrenceId)))throw Error(`Floating table registry delta was already committed`);if(e.nextParagraphId!==e.baseNextParagraphId+e.entries.length)throw Error(`Floating table registry delta sequence mismatch`)}function aN(e,t,n=`logical-page-points`,r=`logical-page`){let i=new Set;for(let t of e){if(i.has(t.occurrenceId))throw Error(`Duplicate float registry occurrence: ${t.occurrenceId}`);i.add(t.occurrenceId)}return Object.freeze({coordinateSpace:n,flowDomainId:r,base:Object.freeze([...e]),delta:Object.freeze([]),nextParagraphId:t})}function oN(e,t,n){let r=[...n.base,...n.delta],i=r.find(t=>t.occurrenceId===e.occurrenceId);if(i)return Object.freeze({placement:Object.freeze({...tN(e,i.bounds.xPt,i.bounds.yPt),bounds:i.bounds,exclusionBounds:i.exclusionBounds}),transaction:n});let a=nN(e,t),o=Ry({moving:{occurrenceId:e.occurrenceId,kind:`table`,tableOverlap:e.overlap,paragraphId:n.nextParagraphId,bounds:a.bounds,exclusionBounds:a.exclusionBounds},blockers:r.filter(e=>e.kind!==`shape`||e.wrap!==void 0).map(jy),avoidance:ky(e.overlap,n.nextParagraphId),rightBoundaryPt:YM(t.page),overlapEpsilonPt:Dy,rightBoundarySlackPt:Oy}),s=tN(e,o.bounds.xPt,o.bounds.yPt),c=Object.freeze({kind:`table`,occurrenceId:e.occurrenceId,overlap:e.overlap,paragraphId:n.nextParagraphId,bounds:s.bounds,exclusionBounds:s.exclusionBounds});return Object.freeze({placement:s,transaction:Object.freeze({coordinateSpace:n.coordinateSpace,flowDomainId:n.flowDomainId,base:n.base,delta:Object.freeze([...n.delta,c]),nextParagraphId:n.nextParagraphId+1})})}function sN(e,t,n){let r=n.pageWidth,i=n.marginLeft,a=n.marginRight;switch(e??(t?`margin`:`page`)){case`page`:return{start:0,end:r};case`leftMargin`:return{start:0,end:i};case`rightMargin`:return{start:r-a,end:r};case`insideMargin`:return{start:0,end:i};case`outsideMargin`:return{start:r-a,end:r};case`character`:case`column`:return{start:n.contentX,end:n.contentX+n.contentW};default:return{start:i,end:r-a}}}function cN(e,t,n,r){let i=r.marginTop,a=r.marginBottom;switch(e??(t?`paragraph`:`page`)){case`page`:return{start:0,end:r.pageH};case`topMargin`:return{start:0,end:i};case`bottomMargin`:return{start:r.pageH-a,end:r.pageH};case`paragraph`:case`line`:return{start:n,end:r.pageH};default:return{start:i,end:r.pageH-a}}}function lN(e,t,n,r,i,a,o,s){let c=sN(a,t,i);if(o!=null)return c.start+(c.end-c.start)*o+n;if(!e)return c.start+n;let l=c.end-c.start,u=s??r,d=s==null?0:n;switch(e){case`center`:return c.start+(l-u)/2+d;case`right`:case`outside`:return c.end-u+d;default:return c.start+d}}function uN(e,t,n,r,i,a,o,s,c){let l=cN(o,t,i,a);if(s!=null)return l.start+(l.end-l.start)*s+n;if(!e)return l.start+n;let u=l.end-l.start,d=c??r,f=c==null?0:n;switch(e){case`center`:return l.start+(u-d)/2+f;case`bottom`:case`outside`:return l.end-d+f;default:return l.start+f}}function dN(e){return fN(e.textDirection)}function fN(e){return typeof e==`string`&&IC(e)}function pN(e){return e===`btLr`}function mN(e){return{...e,...PC(e)}}function hN(e){return{...e,...FC(e)}}function gN(e){for(let t of e.body){if(t.type!==`paragraph`)continue;let e=t;if(typeof e.defaultFontSize==`number`)return e.defaultFontSize;for(let t of e.runs)if(t.type===`text`)return t.fontSize}return 10}function _N(e){return{pageIndex:e.pageIndex,totalPages:e.totalPages,displayPageNumber:e.displayPageNumber,pageNumberFormat:e.pageNumberFormat,currentDateMs:e.currentDateMs,noteNumbers:e.noteNumbers,noteReferenceNumber:e.noteReferenceNumber,pageWritingMode:nv(e.sectionLayout.textDirection),verticalCJK:e.verticalCJK&&!e.verticalAllRotated,verticalPageFrame:e.verticalCJK===!0,documentHasEastAsianText:e.docEastAsian,useFeLayout:e.layoutSettings.compat.useFeLayout,balanceSingleByteDoubleByteWidth:e.layoutSettings.compat.balanceSingleByteDoubleByteWidth,characterSpacingControl:e.layoutSettings.characterSpacingControl,resolvedLocalFonts:e.resolvedLocalFonts,layoutServices:e.layoutServices,verticalGlyphMeasurement:e.verticalGlyphMeasurement}}function vN(e,t){let n=PS(t);return{type:n?n.type:t.lineGrid.active?e.sectionLayout.grid.kind:null,linePitchPt:t.lineGrid.active?t.lineGrid.pitchPt:null,characterPitchPt:n?.characterPitchPt??null,charSpacePt:n?.charSpacePt??null}}const yN=Object.freeze({story:`body`,containers:Object.freeze([]),lineNumberingEligible:!0});function bN(e){let t=Math.max(0,e.pageH-e.marginTop-e.marginBottom);return{page:{xPt:0,yPt:0,widthPt:e.pageWidth,heightPt:e.pageH},margin:{xPt:e.marginLeft,yPt:e.marginTop,widthPt:Math.max(0,e.pageWidth-e.marginLeft-e.marginRight),heightPt:t},column:{xPt:e.contentX,yPt:e.marginTop,widthPt:e.contentW,heightPt:t},pageParity:e.pageIndex%2==0?`odd`:`even`}}function xN(e,t,n){return BS(n,{numbering:t.numbering,...t.numbering?{markerInput:e.acquisitionInputs.numberingMarkerShapeInput(t.numbering,wx(t))}:{},authoredFirstIndentPt:t.indentFirst,tabStops:t.tabStops,defaultTabPt:e.defaultTabPt,service:e.layoutServices?.text})}function SN(e,t){return xN(e,t,CC(e.layoutSettings,e.sectionLayout,yN,t))}function CN(e,t){return xN(e,t,CC(e.layoutSettings,e.sectionLayout,e.storyContext??yN,t))}function wN(e){return{...e,storyContext:fC(e.storyContext??yN)}}function TN(e,t){let n=e.retainedTablesBySourceIndex?.get(t);if(!n)throw Error(`Table placement requires retained table acquisition`);return n}function EN(e,t){let n=e<0n?-e:e,r=t<0n?-t:t;for(;r!==0n;)[n,r]=[r,n%r];return n===0n?1n:n}function DN(e,t){if(t===0n)throw RangeError(`Exact length denominator must not be zero`);let n=t<0n?-1n:1n,r=EN(e,t);return Object.freeze({numerator:n*e/r,denominator:n*t/r})}function ON(e){let t=/^([+-]?)(?:(\d+)(?:\.(\d*))?|\.(\d+))(?:[eE]([+-]?\d+))?$/.exec(e);if(!t)return null;let n=t[1]===`-`,r=t[2]??``,i=t[3]??t[4]??``,a=Number(t[5]??`0`);if(!Number.isSafeInteger(a))return null;let o=`${r}${i}`,s=0;for(;s<o.length&&o.charCodeAt(s)===48;)s+=1;if(s===o.length)return DN(0n,1n);let c=o.length-1;for(;c>s&&o.charCodeAt(c)===48;)--c;let l=o.slice(s,c+1),u=o.length-1-c,d=a-i.length+u,f=d+l.length-1;if(l.length>768||Math.abs(f)>1100)return null;let p=BigInt(l),m=1n;return d>=0?p*=10n**BigInt(d):m=10n**BigInt(-d),n&&(p=-p),DN(p,m)}function kN(e){let t=/^(-?\d+)\/([1-9]\d*)$/.exec(e);if(!t)throw RangeError(`Invalid exact length key: ${e}`);return DN(BigInt(t[1]),BigInt(t[2]))}function AN(e){let t=DN(e.numerator,e.denominator);return`${t.numerator}/${t.denominator}`}function jN(e){let t=ON(e);return t?AN(t):null}function MN(e){if(!Number.isFinite(e)||e<0)return null;let t=ON(e.toString());return t?AN(t):null}function NN(e,t){let n=e.toString(2).length-t.toString(2).length;return(n>=0?e<t<<BigInt(n):e<<BigInt(-n)<t)&&--n,n}function PN(e,t,n){let r=n>=0?e<<BigInt(n):e,i=n<0?t<<BigInt(-n):t,a=r/i,o=r%i*2n-i;return o>0n||o===0n&&a%2n!=0n?a+1n:a}function FN(e){let t=kN(e);if(t.numerator===0n)return 0;let n=t.numerator<0n,r=n?-t.numerator:t.numerator,i=NN(r,t.denominator),a;if(i<-1022){let e=PN(r,t.denominator,1074);a=Number(e)*Number.MIN_VALUE}else{let e=PN(r,t.denominator,52-i);e===1n<<53n&&(e>>=1n,i+=1),a=i>1023?1/0:Number(e)*2**(i-52)}return n?-a:a}function IN(e,t){let n=kN(e),r=kN(t);return AN(DN(n.numerator*r.denominator+r.numerator*n.denominator,n.denominator*r.denominator))}function LN(e,t){let n=kN(e),r=kN(t);return AN(DN(n.numerator*r.numerator,n.denominator*r.denominator))}function RN(e,t){let n=kN(e),r=kN(t);return AN(DN(n.numerator*r.denominator-r.numerator*n.denominator,n.denominator*r.denominator))}function zN(e,t){if(t===0n)throw RangeError(`Exact length divisor must not be zero`);let n=kN(e);return AN(DN(n.numerator,n.denominator*t))}function BN(e,t){let n=kN(e),r=kN(t),i=n.numerator*r.denominator-r.numerator*n.denominator;return i<0n?-1:+(i>0n)}const VN=1e-9;function HN(e,t,n,r){let i=Number.isFinite(e)?Math.max(0,e):0,a=Math.max(0,t),o=a+Math.max(1,n);return{startPt:a===0?i:i/2,endPt:o>=Math.max(0,r)?i:i/2}}function UN(e){return typeof e==`number`&&Number.isFinite(e)?Math.max(0,e):0}function WN(e){return e.map(e=>Math.abs(e)<=VN?0:e)}function GN(e){let t=e.gridWidthsPt.length;for(let n of e.rows){for(let e of n.cells)t=Math.max(t,e.columnStart+Math.max(1,e.columnSpan));let e=n.cells.reduce((e,t)=>Math.max(e,t.columnStart+Math.max(1,t.columnSpan)),n.before?.columnSpan??0);t=Math.max(t,e+(n.after?.columnSpan??0))}return t}function KN(e,t,n){let r=0,i=Math.min(e.length,t+Math.max(1,n));for(let n=Math.max(0,t);n<i;n+=1)r+=e[n]??0;return r}function qN(e,t){return e?e.kind===`pct`?UN(e.value)*t:UN(e.value):null}function JN(e,t,n,r){let i=Math.max(0,t),a=Math.max(1,Math.min(n,e.length-i));if(a<=0)return;let o=KN(e,i,a);if(o<=VN){e[i+a-1]=r;return}let s=r/o;for(let t=i;t<i+a;t+=1)e[t]=(e[t]??0)*s}function YN(e,t,n,r){let i=Math.max(0,t),a=Math.max(1,Math.min(n,e.length-i));if(a<=0)return;let o=KN(e,i,a);r<=o+VN||(e[i+a-1]+=r-o)}function XN(e,t){let n=[];e.before&&e.before.columnSpan>0&&n.push({start:0,span:e.before.columnSpan,preferred:e.before.preferredWidth});for(let t of e.cells)n.push({start:t.columnStart,span:t.columnSpan,preferred:t.preferredWidth});return e.after&&e.after.columnSpan>0&&n.push({start:Math.max(0,t-e.after.columnSpan),span:e.after.columnSpan,preferred:e.after.preferredWidth}),n}function ZN(e,t){let n=Array.from({length:t},(t,n)=>UN(e.gridWidthsPt[n]??0)),r=n.reduce((e,t)=>e+t,0),i=e.tablePreferredWidthPt??(r>0?r:UN(e.availableWidthPt));e.rows.forEach((e,r)=>{for(let a of XN(e,t)){let e=qN(a.preferred,i);e!==null&&(r===0?JN(n,a.start,a.span,e):YN(n,a.start,a.span,e))}}),e.tablePreferredWidthPt===null&&QN(n,e.rows);let a=e.tablePreferredWidthPt,o=n.reduce((e,t)=>e+t,0);if(a!==null&&a>=0&&o<=VN&&n.length>0)return n.map(()=>a/n.length);if(a!==null&&a>=0&&o>VN){let e=a/o;return n.map(t=>t*e)}return n}function QN(e,t){let n=Array(e.length).fill(0);for(let r of t)for(let t of r.cells){if(t.columnSpan!==1||t.preferredWidth?.kind!==`pct`)continue;let r=t.columnStart;r<0||r>=e.length||(n[r]=Math.max(n[r]??0,UN(t.preferredWidth.value)))}let r=e.reduce((e,t)=>e+t,0),i=n.map((t,n)=>t*r>e[n]+VN),a=new Set;for(;i.some(Boolean);){let t=i.map(e=>e?`1`:`0`).join(``);if(a.has(t))return;a.add(t);let o=0,s=0;for(let t=0;t<e.length;t+=1)i[t]?s+=n[t]??0:o+=e[t]??0;if(s>=1-VN)return;r=o/(1-s);let c=n.map((t,n)=>t*r>e[n]+VN);if(c.every((e,t)=>e===i[t])){for(let t=0;t<e.length;t+=1)i[t]&&(e[t]=n[t]*r);return}i=c}}function $N(e,t,n){let r=Array(t).fill(0),i=Array(t).fill(0);for(let n of e)for(let e of n.cells)e.columnSpan!==1||e.columnStart<0||e.columnStart>=t||(r[e.columnStart]=Math.max(r[e.columnStart]??0,UN(e.minContentWidthPt)),i[e.columnStart]=Math.max(i[e.columnStart]??0,UN(e.maxContentWidthPt)));let a=Array(t).fill(!1);for(let o of e)for(let e of o.cells){let o=e.columnStart;if(e.columnSpan!==1||o<0||o>=t||a[o]||e.preferredWidth===null)continue;let s=qN(e.preferredWidth,n);s!==null&&(i[o]=Math.max(r[o]??0,s),a[o]=!0)}for(let e=0;e<t;e+=1)i[e]=Math.max(r[e]??0,i[e]??0);return{minimums:r,maximums:i}}function eP(e,t,n,r,i){let a=Math.min(e.length,n+r),o=e.map((e,t)=>t).filter(e=>e<n||e>=a),s=o.map(n=>Math.max(0,e[n]-(t[n]??0))),c=s.reduce((e,t)=>e+t,0),l=Math.min(i,c);return l<=VN||c<=VN?0:(o.forEach((t,n)=>{e[t]-=l*((s[n]??0)/c)}),l)}function tP(e,t,n,r){if(r<=VN||n<=0)return;let i=KN(e,t,n);for(let a=0;a<n;a+=1){let o=t+a,s=i>VN?(e[o]??0)/i:1/n;e[o]+=r*s}}function nP(e){let t=GN(e);if(e.layout===`fixed`){let n=ZN(e,t).reduce((e,t)=>e+t,0);return Object.freeze({minWidthPt:n,maxWidthPt:n})}let n=Array(t).fill(0),r=Array(t).fill(0),i=e.rows.flatMap(e=>e.cells).sort((e,t)=>e.columnSpan-t.columnSpan),a=(e,t,n)=>{let r=Math.max(0,t.columnStart),i=Math.max(1,Math.min(t.columnSpan,e.length-r));if(i<=0)return;let a=UN(n)-KN(e,r,i);a>VN&&tP(e,r,i,a)};for(let e of i)a(n,e,e.minContentWidthPt),a(r,e,Math.max(e.minContentWidthPt,e.maxContentWidthPt));let o=n.reduce((e,t)=>e+t,0),s=Math.max(o,r.reduce((e,t)=>e+t,0));return Object.freeze({minWidthPt:o,maxWidthPt:s})}function rP(e,t,n,r){let i=Math.max(0,r.columnStart),a=Math.max(1,Math.min(r.columnSpan,e.length-i));if(a<=0)return;let o=UN(r.minContentWidthPt),s=KN(e,i,a);if(o<=s+VN)return;let c=a===1?n[i]??o:Math.max(o,UN(r.maxContentWidthPt));tP(e,i,a,eP(e,t,i,a,Math.max(0,c-s)));let l=KN(e,i,a);l<o-VN&&tP(e,i,a,o-l)}function iP(e,t,n,r){let i=e.reduce((e,t)=>e+t,0);if(i<=r+VN||i<=VN)return e;let a=[...e],o=a.map((e,n)=>Math.max(0,e-(t[n]??0))),s=o.reduce((e,t)=>e+t,0),c=Math.min(i-r,s);c>VN&&s>VN&&a.forEach((e,t)=>{a[t]-=c*((o[t]??0)/s)});for(let e of n){if(e.columnSpan<=1)continue;let n=Math.max(0,e.columnStart),r=Math.max(1,Math.min(e.columnSpan,a.length-n)),i=UN(e.minContentWidthPt)-KN(a,n,r);if(i<=VN)continue;let o=eP(a,t,n,r,i);tP(a,n,r,o),o<i-VN&&tP(a,n,r,i-o)}let l=a.reduce((e,t)=>e+t,0);if(l<=r+VN||l<=VN)return WN(a);let u=Math.max(0,r)/l;return WN(a.map(e=>e*u))}function aP(e){let t=GN(e);if(t===0)return Object.freeze([]);let n=ZN(e,t);if(e.layout===`fixed`){if(e.availableWidthPt===null)return Object.freeze(n);let t=n.reduce((e,t)=>e+t,0),r=UN(e.availableWidthPt);if(t<=r+VN||t<=VN)return Object.freeze(n);let i=r/t;return Object.freeze(WN(n.map(e=>e*i)))}let r=n.reduce((e,t)=>e+t,0),{minimums:i,maximums:a}=$N(e.rows,t,r),o=e.rows.flatMap(e=>e.cells);o.sort((e,t)=>e.columnSpan-t.columnSpan);for(let e of o)rP(n,i,a,e);return Object.freeze(iP(n,i,o,UN(e.availableWidthPt)))}function oP(e){let t=aP(e),n=t.map((t,n)=>{let r=t!==e.gridWidthsPt[n];return!r&&e.gridWidthKeys?.[n]===null?null:!r&&e.gridWidthKeys?.[n]!==void 0?e.gridWidthKeys[n]:MN(t)??`0/1`});return Object.freeze({widthsPt:Object.freeze([...t]),widthKeys:Object.freeze(n)})}function sP(e){return oP(e).widthsPt}function cP(e,t){if(t!==e.length-1||t===0)return!1;let n=e[t],r=e[t-1];return n?.type===`paragraph`&&r?.type===`table`&&n.runs.length===0}function lP(e,t){let{cell:n,table:r,cellTotalWidthPt:i,outerState:a,sourcePath:o}=e,s=t.resolveContentWidthPt(n,r,i),c=t.createCellState(a,s,n),l=[];for(let e=0;e<n.content.length;e+=1){let r=n.content[e];if(!r)continue;let i=[...o,e];if(r.type===`paragraph`){let a=n.content[e-1],o=n.content[e+1],u=r,d=t.acquireParagraph(c,u,s,i,rC(a?.type===`paragraph`?a:null,u,o?.type===`paragraph`?o:null));l.push(d),t.advanceState(c,d.advancePt);continue}let a=r,u=r;l.push(t.acquireNestedTable(c,a,s,i,{fromPrevious:u.nestedSliceContinuesFromPrevious??!1,onNext:u.nestedSliceContinuesOnNext??!1},(e,n,r,i,a)=>lP({cell:e,table:n,cellTotalWidthPt:r,outerState:i,sourcePath:a},t)))}return l}$({id:`word-exact-row-height-bottom-padding`,evidence:{kind:`microsoft-note`,reference:`[MS-OI29500] §2.1.180(d)`},description:`Word adds the largest bottom cell margin to an exact trHeight instead of treating that margin as part of the authored height.`}),$({id:`word-table-border-layer-cascade`,evidence:{kind:`microsoft-note`,reference:`[MS-OI29500] §2.1.169`},description:`During per-side border acquisition, none falls through to a lower-precedence layer while nil remains authored and blocks fallback only on that side.`}),$({id:`word-spaced-cell-inside-border-conflict`,evidence:{kind:`microsoft-note`,reference:`[MS-OI29500] §§2.1.136, 2.1.138`},description:`With non-zero cell spacing, Word retains the narrow conditional tcBorders insideH/insideV conflict against the corresponding table inside border.`}),$({id:`word-table-indent-all-alignments`,evidence:{kind:`microsoft-note`,reference:`[MS-OI29500] §2.1.155`},description:`Word applies tblInd as a signed leading-edge translation for every table alignment, reversing the translation for bidi visual order.`}),$({id:`word-exact-row-vertical-clip-only`,evidence:{kind:`regression-test`,reference:`packages/docx/src/layout/table.test.ts#clips an overflowing merged owner when every row in its span is exact`},description:`Preserve the established exact-row overflow behavior that clips the owned vertical interval without clipping nested table ink horizontally to the cell box.`}),$({id:`word-over-page-cant-split-clip`,evidence:{kind:`microsoft-note`,reference:`[MS-OI29500] §2.1.120`},description:`Word starts an over-page cantSplit row on a fresh page and clips its overflow instead of synthesizing a row continuation.`}),$({id:`word-positioned-table-adjacency-exclusion`,evidence:{kind:`microsoft-note`,reference:`[MS-OI29500] §2.1.149(a)`},description:`Word excludes effectively positioned tables from the logical adjacent-table sequence before retained layout consumes the parser-owned sequence identity.`}),$({id:`word-table-border-weight-precedence`,evidence:{kind:`microsoft-note`,reference:`[MS-OI29500] §2.1.169`},description:`Use the documented Word border numbers for shared-cell conflict weight and force dotted and dashed borders to a complete weight of one.`}),$({id:`word-omitted-row-height-rule-at-least`,evidence:{kind:`microsoft-note`,reference:`[MS-OI29500] §2.1.180`},description:`Treat an omitted trHeight hRule as atLeast while retaining an explicitly authored auto rule as authored input.`}),$({id:`word-authored-auto-row-height-floor`,evidence:{kind:`regression-test`,reference:`packages/docx/src/table-row-height.test.ts#auto with @val — @val is honored as a lower bound`},description:`Preserve the established legacy-model behavior that an auto row with an authored height value uses that value as a lower bound.`}),$({id:`word-collapsed-border-row-track-footprint`,evidence:{kind:`office-observation`,syntheticFixtureId:`collapsed-border-row-track-matrix`,application:`Microsoft Word`,version:`16.111.1`,platform:`macOS 26.5.2`},description:`For automatic and at-least table rows with collapsed cell boundaries, Word includes half of the winning top and bottom rule widths in each row track. Exact rows retain their authored complete height, and cell spacing keeps independent edges out of the collapsed footprint.`}),$({id:`word-effective-floating-table-positioning`,evidence:{kind:`microsoft-note`,reference:`[MS-OI29500] §2.1.162`},description:`Use parser-retained effective positioning status rather than lexical tblpPr presence to decide whether a table leaves ordinary flow.`}),$({id:`word-table-cell-spacing-scope-shadow`,evidence:{kind:`microsoft-note`,reference:`[MS-OI29500] §§2.1.152, 2.1.153, 2.1.154`},description:`At each table-cell-spacing precedence scope, pct, auto, and nil resolve to zero and shadow lower scopes instead of being treated as absent.`}),$({id:`word-table-margin-scope-shadow`,evidence:{kind:`microsoft-note`,reference:`[MS-OI29500] §§2.1.116, 2.1.125, 2.1.146, 2.1.177`},description:`Preserve the documented scope-specific treatment of non-dxa table cell margins: leading/trailing defaults may resolve to zero while cell/exception and nil top/bottom values remain ignored.`}),$({id:`word-first-row-table-exception-scope`,evidence:{kind:`microsoft-note`,reference:`[MS-OI29500] §§2.1.156, 2.1.158, 2.1.167`},description:`Apply the supported first-row table-property exception facts at table scope, including authored preferred-width shadowing.`}),$({id:`word-trailing-structural-cell-marker`,evidence:{kind:`regression-test`,reference:`packages/docx/src/layout/compatibility.test.ts#drops only an empty trailing paragraph after a non-paragraph cell block`},description:`Exclude the required empty trailing cell paragraph from row-height and vertical-alignment measurements when it follows a visible non-paragraph block.`}),$({id:`word-cell-vertical-alignment-ink-block`,evidence:{kind:`regression-test`,reference:`packages/docx/src/cell-valign-leading-spacing.test.ts#inked block is vertically centred in the cell (midpoint = cell midpoint)`},description:`Center or bottom-align the visible cell ink block without charging the first paragraph spaceBefore or final paragraph spaceAfter at the cell edges.`}),$({id:`word-vertical-merge-terminal-border`,evidence:{kind:`regression-test`,reference:`packages/docx/src/cell-border-conflict-render.test.ts#uses the final continuation cell border at the bottom of a vertical merge`},description:`Resolve the bottom edge of a vertically merged cell from its terminal continuation cell before applying shared-edge conflict rules.`}),$({id:`word-vertical-section-upright-block-table`,evidence:{kind:`regression-test`,reference:`packages/docx/src/vertical-table-upright.test.ts#the table advances the flow by its PHYSICAL WIDTH; body text stays vertical`},description:`Paint a block table in an upright physical frame within a vertical section and charge its physical width as the body-flow advance.`});function uP(e,t){return Math.max(0,e??0)+Math.max(0,...t)}function dP(e,t){return(Math.max(0,e)+Math.max(0,t))/2}function fP(e){return e!=null&&e!==`none`}function pP(e,t,n){return n?e-t:e+t}function mP(e){return e.spacingPt>0&&!fP(e.directStyle)&&fP(e.conditionalInsideStyle)}function hP(e,t){let n=Math.min(e.xPt,t.xPt),r=Math.max(e.xPt+e.widthPt,t.xPt+t.widthPt);return Object.freeze({xPt:n,yPt:e.yPt,widthPt:r-n,heightPt:e.heightPt})}function gP(e){return e.compatibility===`word`&&e.availableHeightPt+e.epsilonPt>=e.freshPageHeightPt}const _P=Object.freeze([`single`,`thick`,`double`,`dotted`,`dashed`,`dotDash`,`dotDotDash`,`triple`,`thinThickSmallGap`,`thickThinSmallGap`,`thinThickThinSmallGap`,`thinThickMediumGap`,`thickThinMediumGap`,`thinThickThinMediumGap`,`thinThickLargeGap`,`thickThinLargeGap`,`thinThickThinLargeGap`,`wave`,`doubleWave`,`dashSmallGap`,`dashDotStroked`,`threeDEmboss`,`threeDEngrave`,`outset`,`inset`]),vP=Object.freeze({single:1,thick:2,double:3,dotDash:8,dotDotDash:9,triple:10,thinThickSmallGap:11,thickThinSmallGap:12,thinThickThinSmallGap:13,thinThickMediumGap:14,thickThinMediumGap:15,thinThickThinMediumGap:16,thinThickLargeGap:17,thickThinLargeGap:18,thinThickThinLargeGap:19,wave:20,doubleWave:21,dashSmallGap:22,dashDotStroked:23,threeDEmboss:24,threeDEngrave:25,outset:26,inset:27});function yP(e,t){return e===`dotted`||e===`dashed`?1:Math.max(0,t)*8*(vP[e]??0)}function bP(e,t){return t?e:`atLeast`}function xP(e,t){return e===`pct`||e===`auto`||e===`nil`?0:t}function SP(e){return e.kind===`dxa`?e.dxaValuePt:e.scope===`cell`||e.scope===`exception`?null:(e.edge===`start`||e.edge===`end`)&&(e.kind===`pct`||e.kind===`auto`||e.kind===`nil`)?0:null}function CP(e){return yP(e.style,e.width)}function wP(e){let t=_P.indexOf(e);return t===-1?_P.length:t}function TP(e){if(!e)return{r:0,g:0,b:0};let t=e.replace(/^#/,``);return t.length!==6||/[^0-9a-fA-F]/.test(t)?{r:0,g:0,b:0}:{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}}function EP(e,t){let n=TP(e),r=TP(t),i=e=>e.r+e.b+2*e.g,a=e=>e.b+2*e.g,o=e=>e.g;for(let e of[i,a,o]){let t=e(n)-e(r);if(t!==0)return t}return 0}function DP(e,t){let n=e=>e&&e.spec.style!==`nil`&&e.spec.style!==`none`?e:null,r=n(e),i=n(t);if(!r&&!i)return null;if(!r)return i;if(!i||r.source===`cell`&&i.source===`table`)return r;if(i.source===`cell`&&r.source===`table`)return i;let a=CP(r.spec),o=CP(i.spec);if(a!==o)return a>o?r:i;let s=wP(r.spec.style),c=wP(i.spec.style);if(s!==c)return s<c?r:i;let l=EP(r.spec.color,i.spec.color);return l===0||l<0?r:i}function OP(...e){for(let t of e)if(t&&fP(t.authoredStyle))return t;return null}function kP(e){return Math.max(0,e.advancePt-e.spacing.beforePt-e.spacing.afterPt)}function AP(e){let t=[],n=0,r=null,i=0,a,o=0,s=null,c=null;for(let l of e){let e=l.layout;if(e.kind===`paragraph`){let u=e.spacing.beforePt,d=e.spacing.afterPt,f=r?_k(r,e,i,u):u,p=l.structuralTrailing?0:kP(e),m=n+(l.structuralTrailing?0:f);if(t.push({layout:e,offsetPt:m,advancePt:p}),l.structuralTrailing||(n=m+p,a??=m,o=Math.max(o,n),r=e,i=d),e.cellContainmentBounds){let t=m+e.cellContainmentBounds.yPt-e.flowBounds.yPt,n=t+e.cellContainmentBounds.heightPt;a=a===void 0?t:Math.min(a,t),o=Math.max(o,n),s=s===null?t:Math.min(s,t),c=c===null?n:Math.max(c,n)}continue}r&&(n+=i);let u=e.advancePt;t.push({layout:e,offsetPt:n,advancePt:u}),a??=n,n+=u,o=n,r=null,i=0}let l=n+(r?i:0),u=a??0;return{blocks:t,flowHeightPt:l,inkTopPt:u,inkHeightPt:Math.max(0,o-u),cellContainmentTopPt:s,cellContainmentBottomPt:c}}function jP(e){let t=e.cellContainmentTopPt??0,n=e.cellContainmentBottomPt??0;return Math.max(e.flowHeightPt,n)-Math.min(0,t)}function MP(e){return jP(AP(e))}function NP(e){return Number.isFinite(e?.cellSpacingPt)?Math.max(0,e?.cellSpacingPt??0):0}function PP(e,t){let n=NP(e[t]),r=NP(e[t-1]),i=NP(e[t+1]);return{topPt:t===0?n:Math.max(r,n)/2,bottomPt:t===e.length-1?n:Math.max(n,i)/2}}function FP(e,t,n){return n.topPt+e.margins.topPt+jP(t)+e.margins.bottomPt+n.bottomPt}function IP(e,t,n,r){let i=t;for(let a=t+1;a<e.length&&e[a]?.cells.find(e=>e.columnStart===n&&e.columnSpan===r&&e.verticalMerge===`continue`);a+=1)i=a;return i}function LP(e){return e.heightRule===`exact`?uP(e.heightPt,e.cells.map(e=>e.margins.bottomPt)):e.heightRule===`atLeast`?Math.max(0,e.heightPt??0):0}function RP(e,t,n){let r=e.map(e=>LP(e)),i=e.map((n,r)=>Math.max(0,...n.cells.filter(e=>e.verticalMerge!==`continue`).map(n=>{let i=n.verticalMerge===`restart`?IP(e,r,n.columnStart,n.columnSpan):r,a=PP(e,r),o=PP(e,i);return FP(n,t.get(n.id)??AP([]),{topPt:a.topPt,bottomPt:o.bottomPt})})));e.forEach((n,i)=>{let a=PP(e,i);for(let e of n.cells){if(e.verticalMerge!==`none`)continue;let o=FP(e,t.get(e.id)??AP([]),a);n.heightRule!==`exact`&&(r[i]=Math.max(r[i]??0,o))}});let a=[];e.forEach((n,r)=>{for(let i of n.cells)i.verticalMerge===`restart`&&a.push({start:r,end:IP(e,r,i.columnStart,i.columnSpan),requiredPt:FP(i,t.get(i.id)??AP([]),{topPt:PP(e,r).topPt,bottomPt:PP(e,IP(e,r,i.columnStart,i.columnSpan)).bottomPt})})}),a.sort((e,t)=>e.end-t.end||e.start-t.start);for(let t of a){let n=0;for(let e=t.start;e<=t.end;e+=1)n+=r[e]??0;let i=t.requiredPt-n;if(!(i<=0)){for(let n=t.end;n>=t.start;--n)if(e[n]?.heightRule!==`exact`){r[n]=(r[n]??0)+i;break}}}return e.forEach((e,t)=>{e.heightRule!==`exact`&&(r[t]=(r[t]??0)+(n[t]??0))}),{heights:r,contentHeights:i}}function zP(e,t){return e?{source:t,spec:{width:e.widthPt,color:e.color,style:e.authoredStyle}}:null}function BP(e,t,n,r,i,a,o,s){let c=(e,t,n,r,i,a,o)=>{let s=OP(e,o?t:null);return s?zP(s,`cell`):zP(o?OP(r,a):OP(n,i),`table`)},l=c(e.borders.top,e.borders.insideH,n?.top??null,n?.insideH??null,t.top,t.insideH,r!==0),u=c(e.borders.bottom,e.borders.insideH,n?.bottom??null,n?.insideH??null,t.bottom,t.insideH,i!==a-1),d=c(e.borders.left,e.borders.insideV,n?.left??null,n?.insideV??null,t.left,t.insideV,e.columnStart!==0),f=c(e.borders.right,e.borders.insideV,n?.right??null,n?.insideV??null,t.right,t.insideV,e.columnStart+e.columnSpan!==o);return s?{top:l,right:d,bottom:u,left:f}:{top:l,right:f,bottom:u,left:d}}function VP(e){return e?{widthPt:e.spec.width,color:e.spec.color??`#000000`,authoredStyle:e.spec.style}:null}function HP(e,t,n){let r=VP(DP(e,t));return r?{border:r,edge:n}:null}function UP(e){let t=e.columnWidthsPt.length,n=[],r=e.rows.map(()=>Array(t).fill(-1));return e.rows.forEach((i,a)=>{for(let o of i.cells){if(o.verticalMerge===`continue`)continue;let i=o.verticalMerge===`restart`?IP(e.rows,a,o.columnStart,o.columnSpan):a,s=n.length;n.push({input:o,rowIndex:a,lastRowIndex:i});let c=Math.min(t,o.columnStart+o.columnSpan);for(let e=a;e<=i;e+=1)for(let t=Math.max(0,o.columnStart);t<c;t+=1)r[e][t]=s}}),{owners:n,occupancy:r}}function WP(e,t){return t.lastRowIndex===t.rowIndex?t.input:e.rows[t.lastRowIndex]?.cells.find(e=>e.columnStart===t.input.columnStart&&e.columnSpan===t.input.columnSpan&&e.verticalMerge===`continue`)??t.input}function GP(e){let t=e.rows.length,n=e.columnWidthsPt.length,{owners:r,occupancy:i}=UP(e),a=(i,a=!1)=>{let o=r[i];if(!o)return null;let s=a?WP(e,o):o.input,c=a&&s!==o.input?o.lastRowIndex:o.rowIndex;return BP(s,e.borders,e.rows[c]?.exceptionBorders??null,o.rowIndex,o.lastRowIndex,t,n,e.bidiVisual)};return{horizontal:Array.from({length:t+1},(e,o)=>Array.from({length:n},(e,n)=>{let s=o>0?i[o-1]?.[n]??-1:-1,c=o<t?i[o]?.[n]??-1:-1;if(s>=0&&s===c)return null;let l=a(c),u=o===0?`top`:o===t?`bottom`:`between`;return{above:{owner:r[s]??null,border:a(s,!0)?.bottom??null},below:{owner:r[c]??null,border:l?.top??null},edge:u}})),vertical:Array.from({length:n+1},(r,o)=>Array.from({length:t},(t,r)=>{let s=o>0?i[r]?.[o-1]??-1:-1,c=o<n?i[r]?.[o]??-1:-1,l=e.bidiVisual?c:s,u=e.bidiVisual?s:c;return l>=0&&l===u?null:HP(a(l)?.right??null,a(u)?.left??null,o===0?e.bidiVisual?`right`:`left`:o===n?e.bidiVisual?`left`:`right`:`between`)})),occupancy:i}}function KP(e,t){return t.horizontal.map((t,n)=>NP(e.rows[n-1])>0||NP(e.rows[n])>0?0:t.reduce((e,t)=>{if(!t)return e;let n=HP(t.above.border,t.below.border,t.edge);return Math.max(e,n?.border.widthPt??0)},0))}function qP(e,t){let n=KP(e,t);return e.rows.map((e,t)=>e.heightRule===`exact`?0:dP(n[t]??0,n[t+1]??0))}function JP(e){return qP(e,GP(e))}function YP(e,t,n){return{edge:e.edge,from:t,to:n,color:e.border.color,widthPt:e.border.widthPt,..._v(e.border.authoredStyle,e.border.widthPt)}}const XP=Object.freeze({top:null,right:null,bottom:null,left:null,insideH:null,insideV:null});function ZP(e){let t=VP(e);return t&&t.authoredStyle!==`nil`&&t.authoredStyle!==`none`?t:null}function QP(e,t,n,r,i){let a=[0];for(let t of e.columnWidthsPt)a.push((a.at(-1)??0)+t);let o=[0];for(let e of r)o.push((o.at(-1)??0)+e);let s=a.at(-1)??0,c=(n,r)=>(t[n]??0)+(e.bidiVisual?s-(a[r]??0):a[r]??0),l=e=>n+(o[e]??0),u=[],d=(e,t,n,r)=>{!e||e.authoredStyle===`nil`||e.authoredStyle===`none`||u.push(YP({border:e,edge:t},n,r))},f=new Set,p=(t,n,r,i)=>{let a=t.owner;if(!a)return;let o=`${n}:${r}:${a.input.id}`;if(f.has(o))return;f.add(o);let s=e.rows[a.rowIndex];if(!s)return;let u=NP(s),p=c(a.rowIndex,a.input.columnStart),m=c(a.rowIndex,Math.min(e.columnWidthsPt.length,a.input.columnStart+a.input.columnSpan)),{startPt:h,endPt:g}=HN(u,a.input.columnStart,a.input.columnSpan,e.columnWidthsPt.length),_=Math.min(p,m)+(e.bidiVisual?g:h),v=Math.max(p,m)-(e.bidiVisual?h:g),y=l(a.rowIndex)+PP(e.rows,a.rowIndex).topPt,b=l(a.lastRowIndex+1)-PP(e.rows,a.lastRowIndex).bottomPt,x=BP(a.input,XP,null,a.rowIndex,a.lastRowIndex,e.rows.length,e.columnWidthsPt.length,e.bidiVisual),S=r===`top`?x.top:x.bottom,C=r===`top`?y:b;d(ZP(S),i,{xPt:_,yPt:C},{xPt:v,yPt:C})};return i.horizontal.forEach((n,r)=>{let a=r>0&&NP(e.rows[r-1])>0,o=r<e.rows.length&&NP(e.rows[r])>0;if(a||o){let a=Math.max(NP(e.rows[r-1]),NP(e.rows[r])),u=o?r:r-1,f=t[u]??0,m=r===0?`top`:r===e.rows.length?`bottom`:`between`;r===0||r===e.rows.length?d(OP(r===0?e.rows[0]?.exceptionBorders?.top??null:e.rows.at(-1)?.exceptionBorders?.bottom??null,r===0?e.borders.top:e.borders.bottom),m,{xPt:f,yPt:l(r)},{xPt:f+s,yPt:l(r)}):n.forEach((t,n)=>{let o=i.occupancy[r-1]?.[n]??-1,s=i.occupancy[r]?.[n]??-1;if(!t||!(o!==s&&(o>=0||s>=0))||[{side:t.above,directEdge:`bottom`},{side:t.below,directEdge:`top`}].some(({side:e,directEdge:t})=>{let n=e.owner;return n?mP({spacingPt:a,directStyle:n.input.borders[t]?.authoredStyle,conditionalInsideStyle:n.input.borders.insideH?.authoredStyle}):!1}))return;let f=c(u,n),p=c(u,n+1),h=OP(e.rows[r-1]?.exceptionBorders?.insideH??null,e.borders.insideH),g=OP(e.rows[r]?.exceptionBorders?.insideH??null,e.borders.insideH);d(HP(zP(h,`table`),zP(g,`table`),m)?.border??null,m,{xPt:Math.min(f,p),yPt:l(r)},{xPt:Math.max(f,p),yPt:l(r)})}),n.forEach(e=>{e&&(p(e.above,r,`bottom`,e.edge),p(e.below,r,`top`,e.edge))});return}let f=[],m=new Map;n.forEach(t=>{if(!t)return;let n=(t,n)=>{if(!n.owner||!n.border)return;let r=`${t}:${n.owner.input.id}`;if(m.has(r))return;let i=c(n.owner.rowIndex,n.owner.input.columnStart),a=c(n.owner.rowIndex,Math.min(e.columnWidthsPt.length,n.owner.input.columnStart+n.owner.input.columnSpan));m.set(r,{side:t,border:n.border,leftPt:Math.min(i,a),rightPt:Math.max(i,a)})};n(`above`,t.above),n(`below`,t.below)});let h=[...m.values()],g=[...new Set(h.flatMap(e=>[e.leftPt,e.rightPt]))].sort((e,t)=>e-t),_=r===0?`top`:r===e.rows.length?`bottom`:`between`;for(let e=1;e<g.length;e+=1){let t=g[e-1]??0,n=g[e]??t;if(n<=t)continue;let r=(t+n)/2,i=h.filter(e=>r>e.leftPt&&r<e.rightPt),a=HP(i.find(e=>e.side===`above`)?.border??null,i.find(e=>e.side===`below`)?.border??null,_);a&&f.push({resolved:a,leftPt:t,rightPt:n})}f.sort((e,t)=>e.leftPt-t.leftPt);let v=[];for(let e of f){let t=v.at(-1);t&&t.rightPt===e.leftPt&&t.resolved.edge===e.resolved.edge&&t.resolved.border.widthPt===e.resolved.border.widthPt&&t.resolved.border.color===e.resolved.border.color&&t.resolved.border.authoredStyle===e.resolved.border.authoredStyle?t.rightPt=e.rightPt:v.push({...e})}for(let e of v)u.push(YP(e.resolved,{xPt:e.leftPt,yPt:l(r)},{xPt:e.rightPt,yPt:l(r)}))}),i.vertical.forEach((t,n)=>{t.forEach((t,r)=>{NP(e.rows[r])>0||t&&u.push(YP(t,{xPt:c(r,n),yPt:l(r)},{xPt:c(r,n),yPt:l(r+1)}))})}),e.rows.forEach((n,r)=>{let a=NP(n);if(a<=0)return;let o=l(r),u=l(r+1),f=t[r]??0;d(OP(n.exceptionBorders?.left??null,e.borders.left),`left`,{xPt:f,yPt:o},{xPt:f,yPt:u}),d(OP(n.exceptionBorders?.right??null,e.borders.right),`right`,{xPt:f+s,yPt:o},{xPt:f+s,yPt:u});let p=new Set;for(let e of n.cells)mP({spacingPt:a,directStyle:e.borders.left?.authoredStyle,conditionalInsideStyle:e.borders.insideV?.authoredStyle})&&p.add(e.columnStart),mP({spacingPt:a,directStyle:e.borders.right?.authoredStyle,conditionalInsideStyle:e.borders.insideV?.authoredStyle})&&p.add(e.columnStart+e.columnSpan);for(let t=1;t<e.columnWidthsPt.length;t+=1){let a=i.occupancy[r]?.[t-1]??-1,s=i.occupancy[r]?.[t]??-1;if(!(a!==s&&(a>=0||s>=0)))continue;let l=c(r,t);p.has(t)||d(OP(n.exceptionBorders?.insideV??null,e.borders.insideV),`between`,{xPt:l,yPt:o},{xPt:l,yPt:u})}for(let t of n.cells){if(t.verticalMerge===`continue`)continue;let n=t.verticalMerge===`restart`?IP(e.rows,r,t.columnStart,t.columnSpan):r,i=c(r,t.columnStart),o=c(r,Math.min(e.columnWidthsPt.length,t.columnStart+t.columnSpan)),{startPt:s,endPt:u}=HN(a,t.columnStart,t.columnSpan,e.columnWidthsPt.length),f=Math.min(i,o)+(e.bidiVisual?u:s),p=Math.max(i,o)-(e.bidiVisual?s:u),m=l(r)+PP(e.rows,r).topPt,h=l(n+1)-PP(e.rows,n).bottomPt,g=BP(t,XP,null,r,n,e.rows.length,e.columnWidthsPt.length,e.bidiVisual);d(ZP(g.right),`right`,{xPt:p,yPt:m},{xPt:p,yPt:h}),d(ZP(g.left),`left`,{xPt:f,yPt:m},{xPt:f,yPt:h})}}),u}function $P(e,t,n,r,i){let a=r.availableBounds,o=e===`center`?a.xPt+(a.widthPt-i)/2:e===`right`?a.xPt+a.widthPt-i:a.xPt;return t===0?o:pP(o,t,n)}function eF(e,t){if(t.length===0)return e;let n=Math.min(e.xPt,...t.map(e=>Math.min(e.from.xPt,e.to.xPt)-e.widthPt/2)),r=Math.min(e.yPt,...t.map(e=>Math.min(e.from.yPt,e.to.yPt)-e.widthPt/2)),i=Math.max(e.xPt+e.widthPt,...t.map(e=>Math.max(e.from.xPt,e.to.xPt)+e.widthPt/2)),a=Math.max(e.yPt+e.heightPt,...t.map(e=>Math.max(e.from.yPt,e.to.yPt)+e.widthPt/2));return{xPt:n,yPt:r,widthPt:i-n,heightPt:a-r}}function tF(e){let t=new Map;e.forEach((e,n)=>{if(e.style!==`compound`||!e.edge||e.edge===`between`)return;let r=`${e.authoredStyle}\u0000${e.color}\u0000${e.widthPt}`,i=t.get(r)??[];i.push({border:e,index:n}),t.set(r,i)});let n=[];for(let e of t.values()){let t=t=>e.filter(e=>e.border.edge===t),r=t(`top`),i=t(`right`),a=t(`bottom`),o=t(`left`);if(!r.length||!i.length||!a.length||!o.length)continue;let s=Math.min(...r.flatMap(({border:e})=>[e.from.xPt,e.to.xPt])),c=Math.max(...r.flatMap(({border:e})=>[e.from.xPt,e.to.xPt])),l=r[0].border.from.yPt,u=a[0].border.from.yPt,d=(e,t,n,r)=>{let i=e.map(({border:e})=>r(e)).map(([e,t])=>[Math.min(e,t),Math.max(e,t)]).sort((e,t)=>e[0]-t[0]);if(i[0]?.[0]!==t)return!1;let a=t;for(let e of i){if(e[0]>a)return!1;a=Math.max(a,e[1])}return a===n};if(!(r.every(({border:e})=>e.from.yPt===l&&e.to.yPt===l)&&a.every(({border:e})=>e.from.yPt===u&&e.to.yPt===u)&&o.every(({border:e})=>e.from.xPt===s&&e.to.xPt===s)&&i.every(({border:e})=>e.from.xPt===c&&e.to.xPt===c)&&d(r,s,c,e=>[e.from.xPt,e.to.xPt])&&d(a,s,c,e=>[e.from.xPt,e.to.xPt])&&d(o,l,u,e=>[e.from.yPt,e.to.yPt])&&d(i,l,u,e=>[e.from.yPt,e.to.yPt])))continue;let f=e[0].border;n.push({bounds:{xPt:s,yPt:l,widthPt:c-s,heightPt:u-l},border:{authoredStyle:f.authoredStyle,color:f.color,widthPt:f.widthPt,style:f.style},segmentIndexes:e.map(({index:e})=>e)})}return n}function nF(e,t){let n=Math.max(e.xPt,t.xPt),r=Math.max(e.yPt,t.yPt),i=Math.min(e.xPt+e.widthPt,t.xPt+t.widthPt),a=Math.min(e.yPt+e.heightPt,t.yPt+t.heightPt);return i>n&&a>r?{xPt:n,yPt:r,widthPt:i-n,heightPt:a-r}:null}function rF(e,t,n){let r=e.layout,i=t+(r.kind===`table`?r.flowBounds.xPt:0),a=n+e.offsetPt+(r.kind===`table`?r.flowBounds.yPt:0),o=i-r.flowBounds.xPt,s=a-r.flowBounds.yPt;return{xPt:r.inkBounds.xPt+o,yPt:r.inkBounds.yPt+s,widthPt:r.inkBounds.widthPt,heightPt:r.inkBounds.heightPt}}function iF(e,t,n){let r=Ag(e,`TableLayoutInput`);if(r.columnWidthsPt.some(e=>!Number.isFinite(e)||e<0))throw TypeError(`TableLayoutInput.columnWidthsPt must contain finite non-negative widths`);let i=new Map;r.rows.forEach(e=>e.cells.forEach(e=>{i.set(e.id,AP(e.verticalMerge===`continue`?[]:e.blocks))}));let a=GP(r),o=RP(r.rows,i,qP(r,a)),s=o.heights,c=r.columnWidthsPt.reduce((e,t)=>e+t,0),l=s.reduce((e,t)=>e+t,0),u=t.cursor.yPt,d=r.rows.map(e=>$P(e.alignment??r.alignment,Number.isFinite(e.indentPt)?e.indentPt:r.indentPt,r.bidiVisual,t,c)),f=d[0]??$P(r.alignment,r.indentPt,r.bidiVisual,t,c),p=QP(r,d,u,s,a),m=tF(p),h=[0];for(let e of r.columnWidthsPt)h.push((h.at(-1)??0)+e);let g=[0];for(let e of s)g.push((g.at(-1)??0)+e);let _=(e,t)=>(d[e]??f)+(r.bidiVisual?c-(h[t]??0):h[t]??0),v=r.rows.map((e,n)=>{let a=u+(g[n]??0),l=s[n]??0,p=d[n]??f,m=PP(r.rows,n),h=NP(e),v=e.cells.map(e=>{let o=e.verticalMerge===`restart`?IP(r.rows,n,e.columnStart,e.columnSpan):n,s=PP(r.rows,o),c=u+(g[o+1]??g[n+1]??0)-s.bottomPt,d=_(n,e.columnStart),f=_(n,Math.min(r.columnWidthsPt.length,e.columnStart+e.columnSpan)),p=Math.min(d,f),v=Math.max(d,f),{startPt:y,endPt:b}=HN(h,e.columnStart,e.columnSpan,r.columnWidthsPt.length),x=p+(r.bidiVisual?b:y),S=v-(r.bidiVisual?y:b),C=Math.max(0,S-x),w=a+m.topPt,T=e.verticalMerge===`restart`?Math.max(0,c-w):Math.max(0,l-m.topPt-m.bottomPt),E=i.get(e.id)??AP([]),D=Math.max(0,T-e.margins.topPt-e.margins.bottomPt),O=e.margins.topPt-Math.min(0,E.inkTopPt),k=E.inkHeightPt>=D?O:e.vAlign===`center`?e.margins.topPt+(D-E.inkHeightPt)/2-E.inkTopPt:e.vAlign===`bottom`?T-e.margins.bottomPt-E.inkHeightPt-E.inkTopPt:O,A={xPt:x+e.margins.leftPt,yPt:w+k,widthPt:Math.max(0,C-e.margins.leftPt-e.margins.rightPt),heightPt:D},j={xPt:x,yPt:w,widthPt:C,heightPt:T},M=e.verticalMerge!==`continue`&&r.rows.slice(n,o+1).every(e=>e.heightRule===`exact`)?hP(j,t.availableBounds):void 0,N=e.verticalMerge===`continue`?[]:E.blocks.map(e=>({...e,offsetPt:k+e.offsetPt})),P=_w([j,...N.map(e=>rF(e,A.xPt,j.yPt)).map(e=>M?nF(e,M):e).filter(e=>e!==null)])??j;return{kind:`table-cell`,id:e.id,source:e.source,flowDomainId:r.flowDomainId,ordinaryFlow:r.ordinaryFlow,flowBounds:j,inkBounds:P,...M?{clipBounds:M}:{},contentBounds:A,advancePt:T,verticalMerge:e.verticalMerge,vAlign:e.vAlign,...e.background?{background:e.background}:{},blocks:N}}),y={xPt:p,yPt:a,widthPt:c,heightPt:l},b=_w([y,...v.map(e=>e.inkBounds)])??y;return{kind:`table-row`,id:e.id,source:e.source,flowDomainId:r.flowDomainId,ordinaryFlow:r.ordinaryFlow,flowBounds:y,inkBounds:b,advancePt:l,heightPt:l,contentHeightPt:o.contentHeights[n]??0,...e.repeatedHeader?{repeatedHeader:!0}:{},cells:v}}),y=d.length>0?Math.min(...d):f,b=d.length>0?Math.max(...d.map(e=>e+c)):f+c,x={xPt:y,yPt:u,widthPt:Math.max(0,b-y),heightPt:l},S=_w([x,...v.map(e=>e.inkBounds)])??x;return Ag({layout:{kind:`table`,id:r.id,source:r.source,flowDomainId:r.flowDomainId,ordinaryFlow:r.ordinaryFlow,flowBounds:x,inkBounds:eF(S,p),advancePt:l,columnWidthsPt:r.columnWidthsPt,rows:v,borders:p,...m.length?{compoundBorderFrames:m}:{}},nextCursor:{xPt:t.cursor.xPt,yPt:t.cursor.yPt+l}},`TableLayoutResult`)}function aF(e,t){let n=e.findIndex((e,n)=>n>t&&e.type===`paragraph`&&e.framePr==null);if(n<0)throw Error(`A nested floating table requires a following regular paragraph anchor`);return n}function oF(e){if(!e)return null;let t=e.color??`000000`;return Object.freeze({widthPt:e.width,color:t.startsWith(`#`)?t:`#${t}`,authoredStyle:e.style})}function sF(e){return Object.freeze({top:oF(e.top),right:oF(e.right),bottom:oF(e.bottom),left:oF(e.left),insideH:oF(e.insideH),insideV:oF(e.insideV)})}function cF(e,t){if(e===`center`)return`center`;let n=e===`right`||e===`end`;return(t?!n:n)?`right`:`left`}function lF(e){return e.lines.some(e=>e.placements.some(e=>e.kind===`text`&&e.dependency===`page`))}function uF(e,t,n,r,i,a){let o=Array.isArray(i)?{story:`body`,storyInstance:`body`,path:i}:i,s=o.path,c=e=>({story:o.story,storyInstance:o.storyInstance,path:e}),l=a.layoutServices(r);if(!l)throw Error(`Retained table acquisition requires layout services`);let u=o.story===`body`&&o.storyInstance===`body`?`table:${s.join(`.`)}`:`${o.story}:${o.storyInstance}:table:${s.join(`.`)}`,d=a.tableFormat(e),f=e.bidiVisual===!0,p=d.firstRowException,m=p?.indentAuthored?p.indentPt??0:e.tblInd??0,h={},g=[],_=e.rows.map((n,i)=>{let o=d.rows[i],l=Math.max(0,Math.min(t.length,n.gridBefore??0)),p=n.cells.map((n,d)=>{let f=o?.cells[d]?.marginsPt??{top:n.marginTop??e.cellMarginTop,right:n.marginRight??e.cellMarginRight,bottom:n.marginBottom??e.cellMarginBottom,left:n.marginLeft??e.cellMarginLeft},p=l,m=Math.min(Math.max(1,n.colSpan),Math.max(0,t.length-p));l+=m;let _=t.slice(p,p+m).reduce((e,t)=>e+t,0),v=HN(o?.cellSpacingPt??0,p,m,t.length),y=[...s,i,d],b=`${u}:cell:${i}.${d}`,x=n.vMerge===!1?[]:lP({cell:n,table:e,cellTotalWidthPt:_,outerState:r,sourcePath:y},{resolveContentWidthPt:(e,t,n)=>Math.max(0,n-v.startPt-v.endPt-f.left-f.right),createCellState:a.createCellState,acquireParagraph:(e,t,n,r,o)=>a.acquireParagraph(e,t,n,r,`${u}:cell:${i}.${d}`,o,void 0,c(r)),acquireNestedTable:(e,t,r,i)=>{let o=uF(t,a.resolveColumns(t,r,e),r,e,c(i),a);h[o.layout.id]=o;let s=a.tableFormat(t).positioning;if(s){let r=i[i.length-1],c=s,l=t.overlap===`never`?`never`:`overlap`,u=a.registerFloatingTable(e,{child:o.layout,positioning:c,overlap:l}),d={hostCellId:b,sourceBlockIndex:r,anchorBlockIndex:aF(n.content,r),tableId:o.layout.id,overlap:l,positioning:c,...u==null?{}:{acquiredTextOffsetPt:Object.freeze({...u})}};g.push(d)}return o.layout},advanceState:a.advanceState});return{id:b,source:c(y),columnStart:p,columnSpan:m,verticalMerge:n.vMerge===!0?`restart`:n.vMerge===!1?`continue`:`none`,margins:{topPt:f.top,rightPt:f.right,bottomPt:f.bottom,leftPt:f.left},vAlign:n.vAlign,...n.background?{background:{color:n.background.startsWith(`#`)?n.background:`#${n.background}`}}:{},borders:sF(n.borders),blocks:x.flatMap((e,t)=>{let r=n.content[t];return r?.type===`table`&&a.tableFormat(r).ordinaryFlow===!1?[]:[{layout:e,sourceBlockIndex:t,...e.kind===`paragraph`&&lF(e)?{pageDependent:!0}:{},...cP(n.content,t)?{structuralTrailing:!0}:{}}]})}}),_=o?.height?.rule??`auto`;return{id:`${u}:row:${i}`,source:c([...s,i]),logicalRowIndex:i,cantSplit:o?.cantSplit??n.cantSplit===!0,heightPt:o?.height?.valuePt??null,heightRule:_,cellSpacingPt:o?.cellSpacingPt??0,exceptionBorders:o?.exception?.borders?sF(o.exception.borders):null,alignment:cF(o?.justification??e.jc,f),indentPt:m,cells:p,repeatedHeader:o?.repeatedHeader??n.isHeader===!0}}),v=Ag({kind:`table`,id:u,source:c([...s]),flowDomainId:u,ordinaryFlow:d.ordinaryFlow,alignment:cF(e.jc,f),indentPt:m,bidiVisual:f,columnWidthsPt:t,borders:sF(e.borders),rows:_},`RetainedTableAcquisition.input`),y={xPt:0,yPt:0,widthPt:n,heightPt:1},b=iF(v,{container:{id:u,kind:`tableCell`,bounds:y},cursor:{xPt:0,yPt:0},availableBounds:y},l).layout;return Object.freeze({input:v,layout:b,nestedById:Object.freeze(h),floatingTables:Ag(g,`RetainedTableAcquisition.floatingTables`)})}function dF(e,t,n){return t===n?e:Object.freeze({...e,left:e.right,right:e.left})}function fF(e,t,n){let r=dF(e.borders,e.bidiVisual,n),i=t.exceptionBorders==null?null:dF(t.exceptionBorders,e.bidiVisual,n);return i?Object.freeze({top:OP(i.top,r.top),right:OP(i.right,r.right),bottom:OP(i.bottom,r.bottom),left:OP(i.left,r.left),insideH:OP(i.insideH,r.insideH),insideV:OP(i.insideV,r.insideV)}):r}var pF=class{nodes=[Object.freeze({kind:`zero`})];interned=new Map([[`Z`,0]]);intern(e,t){let n=this.interned.get(e);if(n!==void 0)return n;let r=this.nodes.length;return this.nodes.push(Object.freeze(t)),this.interned.set(e,r),r}token(e,t){return this.intern(`T:${e}:${t}`,{kind:`token`})}add(e,t){if(e===0)return t;if(t===0)return e;let n=this.nodes[e],r=this.nodes[t];return n.kind===`sub`&&n.right===t?n.left:r.kind===`sub`&&r.right===e?r.left:this.intern(`A:${e}:${t}`,{kind:`add`,left:e,right:t})}subtract(e,t){if(e===t)return 0;if(t===0)return e;let n=this.nodes[t];return n.kind===`sub`&&n.left===e?n.right:this.intern(`S:${e}:${t}`,{kind:`sub`,left:e,right:t})}divide(e,t){return e===0?0:this.intern(`D:${e}:${t}`,{kind:`div`,value:e,divisor:t})}};function mF(e,t=0){return Object.freeze({position:e,sym:t,identity:`${e}|${t}`})}function hF(e,t,n){return mF(IN(t.position,n.position),e.add(t.sym,n.sym))}function gF(e,t,n){return mF(RN(t.position,n.position),e.subtract(t.sym,n.sym))}function _F(e,t,n){return mF(zN(t.position,n),e.divide(t.sym,n))}function vF(e,t,n){let r=[mF(`0/1`)];return t.columnWidthsPt.forEach((i,a)=>{let o=t.columnWidthKeys?.[a],s=MN(i)??`0/1`,c=o===null?mF(s,e.token(n,a)):mF(o??s);r.push(hF(e,r.at(-1),c))}),Object.freeze(r)}function yF(e,t,n,r){let i=gF(e,r,n);return t.alignment===`right`?i:t.alignment===`center`?_F(e,i,2n):mF(`0/1`)}function bF(e,t,n,r,i){return hF(e,i,r?gF(e,n,t):t)}function xF(e,t){if(e.length===0)throw RangeError(`Adjacent table group id must not be empty`);if(t.length===0)throw RangeError(`Adjacent table group requires at least one table`);if(t.some(e=>!e.ordinaryFlow))throw Error(`An absolutely positioned table cannot join an adjacent table group`);let n=t[0],r=n.bidiVisual,i=new pF,a=mF(`0/1`),o=t.map((e,t)=>vF(i,e,t)),s=o.map(e=>e.at(-1)??a),c=s.reduce((e,t)=>BN(t.position,e.position)>0?t:e,a),l=(e,t,n,a)=>{let o=bF(i,e,t,n,a);return r?gF(i,c,o):o},u=[];t.forEach((e,t)=>{let n=o[t],a=s[t],d=e.bidiVisual!==r;e.rows.forEach(t=>{let r=yF(i,t,a,c),o=n.map(t=>l(t,a,e.bidiVisual,r));u.push({input:e,row:t,groupBoundaries:o,descending:d})})});let d=new Map;for(let e of[a,c])d.set(e.identity,{boundary:e,count:1});for(let e of u){let t=new Map;for(let n of e.groupBoundaries){let e=t.get(n.identity);t.set(n.identity,{boundary:n,count:(e?.count??0)+1})}for(let[e,n]of t){let t=d.get(e);n.count>(t?.count??0)&&d.set(e,n)}}let f=new Map,p=e=>{let t=f.get(e);return t||(t={position:e,identities:new Map,edges:new Map,firstSeen:new Map},f.set(e,t)),t};for(let[e,t]of d)p(t.boundary.position).identities.set(e,t);let m=0;for(let e of u){let t=e.descending?[...e.groupBoundaries].reverse():e.groupBoundaries,n=null,r=null;for(let e of t){let t=p(e.position);if(t.firstSeen.has(e.identity)||t.firstSeen.set(e.identity,m++),n!==e.position&&(n=e.position,r=null),r!==null&&r!==e.identity){let n=t.edges.get(r);n||(n=new Set,t.edges.set(r,n)),n.add(e.identity)}r=e.identity}}for(let e of f.values())for(let t of e.identities.keys())e.firstSeen.has(t)||e.firstSeen.set(t,m++);let h=[...f.values()].sort((e,t)=>BN(e.position,t.position)),g=[],_=new Map;for(let e of h){let t=new Map([...e.identities.keys()].map(e=>[e,0]));for(let n of e.edges.values())for(let e of n)t.set(e,(t.get(e)??0)+1);let n=[],r=t=>{n.push(t);let r=n.length-1;for(;r>0;){let t=Math.floor((r-1)/2);if(e.firstSeen.get(n[t])<=e.firstSeen.get(n[r]))break;[n[t],n[r]]=[n[r],n[t]],r=t}},i=()=>{let t=n[0],r=n.pop();if(n.length>0){n[0]=r;let t=0;for(;;){let r=t*2+1,i=r+1;if(r>=n.length)break;let a=r;if(i<n.length&&e.firstSeen.get(n[i])<e.firstSeen.get(n[r])&&(a=i),e.firstSeen.get(n[t])<=e.firstSeen.get(n[a]))break;[n[t],n[a]]=[n[a],n[t]],t=a}}return t};for(let n of e.identities.keys())t.get(n)===0&&r(n);let a=[];for(;n.length>0;){let n=i();a.push(n);for(let i of e.edges.get(n)??[]){let e=t.get(i)-1;t.set(i,e),e===0&&r(i)}}if(a.length!==e.identities.size)throw Error(`Adjacent table symbolic boundary ordering cycle at ${e.position}`);for(let t of a){let{boundary:n,count:r}=e.identities.get(t);_.set(t,g.length);for(let e=0;e<r;e+=1)g.push(n)}}let v=g.slice(1).map((e,t)=>{let n=g[t];return e.sym===n.sym?RN(e.position,n.position):null}),y=g.slice(1).map((e,t)=>FN(RN(e.position,g[t].position))),b=(e,t)=>{let n=new Map,r=Array(e.length);return e.forEach((e,i)=>{let a=n.get(e.identity)??0;n.set(e.identity,a+1);let o=_.get(e.identity),s=d.get(e.identity).count;r[i]=t?o+(s-1-a):o+a}),r},x=0,S=u.map(e=>{let{input:t,row:n,groupBoundaries:i,descending:a}=e,o=b(i,a),s=o[0],c=o[i.length-1],l=n.cells.map(e=>{let n=o[e.columnStart],i=o[e.columnStart+e.columnSpan];if(n==null||i==null)throw RangeError(`Table cell ${e.id} exceeds its authored grid`);let a=Math.min(n,i),s=Math.max(n,i);if(s<=a)throw Error(`Table cell ${e.id} cannot be mapped into the logical group grid`);let c=dF(e.borders,t.bidiVisual,r);return Object.freeze({...e,columnStart:a,columnSpan:s-a,borders:c})});return Object.freeze({...n,logicalRowIndex:x++,exceptionBorders:null,sourceTableEdges:fF(t,n,r),indentPt:t.bidiVisual===r?n.indentPt:-n.indentPt,sourceOuterColumnStart:Math.min(s,c),sourceOuterColumnEnd:Math.max(s,c),cells:Object.freeze(l)})});return i.nodes.length,Object.freeze({kind:`adjacent-table-group-grid`,id:e,source:n.source,flowDomainId:`${n.flowDomainId}:adjacent-group:${e}`,alignment:n.alignment,indentPt:n.indentPt,bidiVisual:r,columnWidthsPt:Object.freeze(y),columnWidthKeys:Object.freeze(v),rows:Object.freeze(S)})}const SF=1e-4;function CF(){return Object.freeze({blockIndex:0,paragraphLineStart:0,nestedCursor:null,nestedFragmentIndex:0})}function wF(){return Object.freeze({rowIndex:0,rowFragmentIndex:0,cells:Object.freeze([])})}function TF(e){let t=0;for(;e.rows[t]?.repeatedHeader===!0;)t+=1;return t}function EF(e,t){let n=e.layout.rows[t];return n?e.input.rows[t]?.heightRule===`exact`?Math.max(0,n.heightPt):Math.max(0,n.heightPt,n.contentHeightPt):0}function DF(e,t,n,r){let i=e.layout.rows.flatMap(e=>e.cells).find(e=>e.id===t.id);if(!i)throw new Z(`INVALID_REFERENCE`,`nested table fragment lost parent cell geometry: ${t.id}`);let a=Object.freeze({xPt:0,yPt:0,widthPt:i.contentBounds.widthPt,heightPt:Math.max(0,r)});return Object.freeze({...n,availableHeightPt:a.heightPt,placement:Object.freeze({...n.placement,container:Object.freeze({...n.placement.container,bounds:a}),cursor:Object.freeze({xPt:0,yPt:0}),availableBounds:a})})}function OF(e,t,n,r){if(t===e.input.rows[n])return EF(e,n);let i=iF({...e.input,id:`${e.input.id}:row-occurrence:${r.page.occurrenceId}:${t.logicalRowIndex}`,rows:[t]},r.placement,r.services).layout;return Math.max(0,i.rows[0]?.heightPt??i.advancePt)}function kF(e,t,n,r){return t===e.input.rows[n]?Math.max(0,e.layout.rows[n]?.heightPt??0):OF(e,t,n,r)}function AF(e,t,n,r){let i=iF({...e.input,id:`${e.input.id}:completed-partial:${r.page.occurrenceId}:${t.logicalRowIndex}`,rows:[t,...e.input.rows.slice(n+1)]},r.placement,r.services).layout;return Math.max(0,i.rows[0]?.heightPt??0)}function jF(e){return e.cells.map(e=>e.blocks.map(e=>({kind:`whole`,blockIndex:e.sourceBlockIndex})))}function MF(e,t,n,r){let i=r.reacquirePageDependentBlock;return!i||!t.cells.some(e=>e.blocks.some(e=>e.pageDependent===!0))?t:{...t,cells:t.cells.map((e,a)=>({...e,blocks:e.blocks.map(e=>e.pageDependent===!0?{...e,layout:i({logicalRowIndex:t.logicalRowIndex,logicalCellIndex:a,sourceBlockIndex:e.sourceBlockIndex,ownership:n,page:r.page,acquired:e.layout})}:e)}))}}function NF(e){let t=e.positioning.horzSpecified&&(e.positioning.horzAnchor===`page`||e.positioning.horzAnchor===`margin`),n=e.positioning.vertAnchor===`page`||e.positioning.vertAnchor===`margin`;return t||n}function PF(e,t,n,r,i){return{...t,heightPt:null,heightRule:`auto`,cells:t.cells.map((t,a)=>{let o=n.cells[a]??CF();return{...t,blocks:t.blocks.slice(o.blockIndex).map((n,a)=>{if(a===0&&o.nestedCursor&&n.layout.kind===`table`){let a=e.nestedById[n.layout.id];if(a){let s=KF(a,o.nestedCursor,DF(e,t,r,r.freshPageHeightPt)),c=i.get(t.id);if(s.nextCursor&&c!==void 0&&n.sourceBlockIndex<c)throw Error(`Floating table anchor cannot follow an incomplete nested-table candidate`);if(s.fragment)return{...n,layout:s.fragment}}}return a!==0||o.paragraphLineStart===0||n.layout.kind!==`paragraph`?n:{...n,layout:VF(n.layout,o.paragraphLineStart,n.layout.lines.length)}})}})}}function FF(e,t,n,r,i,a,o,s,c){let l=i.floatingTableFrames,u=i.reacquirePageDependentBlock,d=e.input.rows[t.logicalRowIndex];if(!l||!u||!d)return{row:t,resolved:[],registry:a,nextParagraphId:o};let f=e.floatingTables.filter(e=>d.cells.some(t=>t.id===e.hostCellId)&&c(e));if(f.length===0)return{row:t,resolved:[],registry:a,nextParagraphId:o};let p=new Map;for(let e of f)p.set(e.hostCellId,Math.min(p.get(e.hostCellId)??1/0,e.anchorBlockIndex));let m={...i.placement,cursor:{...i.placement.cursor,yPt:i.placement.cursor.yPt+r}},h=PF(e,t,s,i,p),g=iF({...e.input,id:`${e.input.id}:float-probe:${i.page.occurrenceId}:${t.logicalRowIndex}`,rows:[h]},m,i.services).layout,_=i.finalPlacementTranslationPt??{xPt:0,yPt:0},v=(t,r,a)=>{let o=a.cells.findIndex(e=>e.id===t.hostCellId),s=r.rows[0]?.cells[o],c=a.cells[o]?.blocks.findIndex(e=>e.sourceBlockIndex===t.anchorBlockIndex)??-1,l=c<0?void 0:s?.blocks[c],u=e.nestedById[t.tableId]?.layout;return!s||!l||!u?null:Object.freeze({kind:`floating-table-placement`,occurrenceId:[i.page.occurrenceId,t.hostCellId,t.sourceBlockIndex,t.tableId].join(`:`),ownership:n,physicalPageIndex:i.page.physicalPageIndex,displayPageNumber:i.page.displayPageNumber,...t,columnBounds:Object.freeze({xPt:s.contentBounds.xPt+_.xPt,yPt:s.contentBounds.yPt+_.yPt,widthPt:s.contentBounds.widthPt,heightPt:s.contentBounds.heightPt}),anchorBounds:Object.freeze({xPt:s.contentBounds.xPt+_.xPt,yPt:s.flowBounds.yPt+l.offsetPt+_.yPt,widthPt:l.layout.flowBounds.widthPt,heightPt:l.layout.flowBounds.heightPt}),child:u})},y=n=>{let r=PF(e,n,s,i,p),c=n===t?g:iF({...e.input,id:`${e.input.id}:float-converge:${i.page.occurrenceId}:${t.logicalRowIndex}`,rows:[r]},m,i.services).layout,u=aN(a,o,i.floatingTableRegistry?.coordinateSpace??`logical-page-points`,i.floatingTableRegistry?.flowDomainId??e.input.flowDomainId),d=[];for(let e of f){let t=v(e,c,r);if(!t||i.floatingTableRegistry?.coordinateSpace!==`upright-physical-page-points`&&!NF(t))continue;let n=oN(t,{page:l.page,margin:l.margin,text:{xPt:t.columnBounds?.xPt??t.anchorBounds.xPt,yPt:t.anchorBounds.yPt,widthPt:t.columnBounds?.widthPt??t.anchorBounds.widthPt,heightPt:t.anchorBounds.heightPt}},u);d.push(n.placement),u=n.transaction}return{resolved:Object.freeze(d),transaction:u}},b=e=>({...t,cells:t.cells.map((r,a)=>({...r,blocks:r.blocks.map(o=>{let s=e.filter(e=>e.source.hostCellId===r.id&&e.source.anchorBlockIndex===o.sourceBlockIndex).map(e=>Object.freeze({xPt:e.exclusionBounds.xPt-e.source.anchorBounds.xPt,yPt:e.exclusionBounds.yPt-e.source.anchorBounds.yPt,widthPt:e.exclusionBounds.widthPt,heightPt:e.exclusionBounds.heightPt}));return s.length===0||o.layout.kind!==`paragraph`?o:{...o,layout:u({logicalRowIndex:t.logicalRowIndex,logicalCellIndex:a,sourceBlockIndex:o.sourceBlockIndex,ownership:n,page:i.page,acquired:o.layout,floatingTableExclusions:Object.freeze(s)})}})}))}),x=(e,t)=>JSON.stringify({blocks:e.cells.map(e=>e.blocks.map(e=>({sourceBlockIndex:e.sourceBlockIndex,layout:e.layout}))),placements:t}),S=y(t);if(S.resolved.length===0)return{row:t,resolved:[],registry:a,nextParagraphId:o};try{let e=Tb({seedState:x(t,S.resolved),step:e=>{let t=b(e?.resolution.resolved??S.resolved),n=y(t);return Object.freeze({candidate:t,resolution:n,state:x(t,n.resolved)})},stateOf:e=>e.state,limit:16}).value;return{row:e.candidate,resolved:e.resolution.resolved,registry:Object.freeze([...e.resolution.transaction.base,...e.resolution.transaction.delta]),nextParagraphId:e.resolution.transaction.nextParagraphId}}catch(e){throw e instanceof wb?new Z(`NON_CONVERGENCE`,`floating table final-frame reflow did not converge (${e.reason}; ${e.states.length} states)`):e}}function IF(e,t,n){let r=e.input.rows[t.logicalRowIndex]?.cells.findIndex(e=>e.id===n.hostCellId)??-1;return r>=0&&(t.ranges[r]?.some(e=>e.blockIndex===n.anchorBlockIndex&&(e.kind===`whole`||e.kind===`paragraph`&&e.lineStart===0||e.kind===`nested-table`&&e.childFragmentIndex===0))??!1)}function LF(e){return`${e.hostCellId}:${e.sourceBlockIndex}:${e.tableId}`}function RF(e,t){return new Set(e.floatingTables.filter(n=>IF(e,t,n)).map(LF))}function zF(e,t){return e.size===t.size&&[...e].every(e=>t.has(e))}function BF(e,t,n=0,r=!1,i=[]){return{input:e,logicalRowIndex:e.logicalRowIndex,fragmentIndex:n,ownership:t,ranges:jF(e),...r?{clipAtPageEnd:!0}:{},...i.length?{resolvedFloatingTables:i}:{}}}function VF(e,t,n){return Sj(e,{lineStart:t,lineEnd:n,continuesFromPrevious:t>0,continuesOnNext:n<e.lines.length})}function HF(e,t,n,r,i){let a=null,o=n;for(let s=n+1;s<=e.lines.length;s+=1){let c=VF(e,n,s),l={layout:c,sourceBlockIndex:t};if(MP([...r,l])>i+SF)break;a=c,o=s}return a?{block:{layout:a,sourceBlockIndex:t},range:{kind:`paragraph`,blockIndex:t,lineStart:n,lineEnd:o},lineEnd:o,advancePt:a.advancePt}:{block:null,range:null,lineEnd:n,advancePt:0}}function UF(e,t,n,r,i){if(t.verticalMerge===`continue`)return{input:t,range:[],next:n,complete:!0};let a=[],o=[],s=n.blockIndex,c=n.paragraphLineStart,l=n.nestedCursor,u=n.nestedFragmentIndex;for(;s<t.blocks.length;){let n=t.blocks[s],d=n.layout;if(d.kind===`paragraph`){if(n.structuralTrailing){a.push(n),o.push({kind:`whole`,blockIndex:n.sourceBlockIndex}),s+=1,c=0;continue}if(d.lines.length===0){if(MP([...a,n])>r+SF)break;a.push(n),o.push({kind:`whole`,blockIndex:n.sourceBlockIndex}),s+=1,c=0;continue}let e=HF(d,n.sourceBlockIndex,c,a,r);if(!e.block||!e.range)break;if(a.push({...e.block,...n.structuralTrailing?{structuralTrailing:!0}:{}}),o.push(e.range),e.lineEnd<d.lines.length){c=e.lineEnd;break}s+=1,c=0;continue}let f=e.nestedById[d.id];if(f){let c=Math.max(0,r-MP(a)),d=KF(f,l??wF(),DF(e,t,i,c));if(!d.fragment)break;if(a.push({layout:d.fragment,sourceBlockIndex:n.sourceBlockIndex}),o.push({kind:`nested-table`,blockIndex:n.sourceBlockIndex,childFragmentIndex:u}),d.nextCursor){l=d.nextCursor,u+=1;break}s+=1,l=null,u=0;continue}if(MP([...a,n])>r+SF)break;a.push(n),o.push({kind:`whole`,blockIndex:n.sourceBlockIndex}),s+=1}let d=s>=t.blocks.length;return{input:{...t,blocks:a},range:o,next:Object.freeze({blockIndex:s,paragraphLineStart:c,nestedCursor:l,nestedFragmentIndex:u}),complete:d}}function WF(e,t,n,r,i){let a=t.cells.map((e,t)=>n.cells[t]??CF()),o=Math.max(0,...t.cells.map(e=>e.margins.topPt+e.margins.bottomPt)),s=Math.max(0,t.cellSpacingPt)*2,c={...t,heightPt:null,heightRule:`auto`},l=JP({...e.input,rows:[c]})[0]??0,u=Math.max(0,r-o-s-l),d=t.cells.map((t,n)=>UF(e,t,a[n],u,i));if(!d.some((e,t)=>e.next.blockIndex!==a[t]?.blockIndex||e.next.paragraphLineStart!==a[t]?.paragraphLineStart||e.next.nestedFragmentIndex!==a[t]?.nestedFragmentIndex))return{selected:null,next:n,complete:!1};let f=d.every(e=>e.complete);return f&&n.rowFragmentIndex===0?{selected:BF(t,`source`),next:Object.freeze({rowIndex:n.rowIndex+1,rowFragmentIndex:0,cells:Object.freeze([])}),complete:!0}:{selected:{input:{...c,id:`${t.id}:fragment:${n.rowFragmentIndex}`,heightPt:null,heightRule:`auto`,cells:d.map((e,t)=>({...e.input,id:`${e.input.id}:fragment:${n.rowFragmentIndex}:${t}`}))},logicalRowIndex:t.logicalRowIndex,fragmentIndex:n.rowFragmentIndex,ownership:`source`,ranges:d.map(e=>e.range)},next:Object.freeze({rowIndex:f?n.rowIndex+1:n.rowIndex,rowFragmentIndex:f?0:n.rowFragmentIndex+1,cells:Object.freeze(f?[]:d.map(e=>e.next))}),complete:f}}function GF(e,t,n){let r=iF({...e.input,id:`${e.input.id}:fragment:${n.page.occurrenceId}`,rows:t.map(e=>e.input)},n.placement,n.services).layout,i=r.rows.map((e,r)=>{let i=t[r];return Object.freeze({...e,logicalRowIndex:i.logicalRowIndex,fragmentIndex:i.fragmentIndex,ownership:i.ownership,occurrenceId:n.page.occurrenceId,physicalPageIndex:n.page.physicalPageIndex,displayPageNumber:n.page.displayPageNumber,cells:Object.freeze(e.cells.map((e,n)=>{let a=i.input.cells[n]?.verticalMerge??`none`,o=i.input.cells[n],s=a===`continue`&&t.slice(0,r).some(e=>e.input.cells.some(e=>e.verticalMerge===`restart`&&e.columnStart===o?.columnStart&&e.columnSpan===o?.columnSpan));return Object.freeze({...e,contentRanges:Object.freeze([...i.ranges[n]??[]]),...a===`continue`&&!s?{visualMergeOwnership:`continuation`}:{}})}))})}),a=t.flatMap((t,r)=>{let a=e.input.rows[t.logicalRowIndex];return a?e.floatingTables.flatMap(o=>{let s=a.cells.findIndex(e=>e.id===o.hostCellId);if(s<0||!(t.ranges[s]?.some(e=>e.blockIndex===o.anchorBlockIndex&&(e.kind===`whole`||e.kind===`paragraph`&&e.lineStart===0))??!1))return[];let c=t.input.cells[s],l=i[r]?.cells[s],u=c?.blocks.findIndex(e=>e.sourceBlockIndex===o.anchorBlockIndex)??-1,d=u<0?void 0:l?.blocks[u],f=e.nestedById[o.tableId]?.layout;if(!l||!d||!f)throw Error(`Floating table occurrence references missing retained layout data`);let p=Object.freeze({xPt:l.contentBounds.xPt,yPt:l.flowBounds.yPt+d.offsetPt,widthPt:d.layout.flowBounds.widthPt,heightPt:d.layout.flowBounds.heightPt});return[Object.freeze({kind:`floating-table-placement`,occurrenceId:[n.page.occurrenceId,o.hostCellId,o.sourceBlockIndex,o.tableId].join(`:`),ownership:t.ownership,physicalPageIndex:n.page.physicalPageIndex,displayPageNumber:n.page.displayPageNumber,...o,anchorBounds:p,child:f})]}):[]}),o=Object.freeze(t.flatMap(e=>e.resolvedFloatingTables??[])),s=new Set(o.map(e=>e.occurrenceId)),c=t.some(e=>e.clipAtPageEnd===!0),l=c?Math.min(r.advancePt,n.availableHeightPt):r.advancePt,u=c?{...r.flowBounds,heightPt:l}:r.flowBounds;return Object.freeze({...r,flowBounds:u,...c?{inkBounds:u,clipBounds:u,advancePt:l}:{},columnWidthsPt:e.layout.columnWidthsPt,rows:Object.freeze(i),floatingTables:Object.freeze(a.filter(e=>!s.has(e.occurrenceId))),resolvedFloatingTables:o,...n.floatingTableRegistry?{resolvedFloatingTableCoordinateSpace:n.floatingTableRegistry.coordinateSpace}:{}})}function KF(e,t,n){if(t.rowIndex>=e.input.rows.length)return{fragment:null,nextCursor:null,requiresFreshPage:!1};let r=[],i=n.floatingTableRegistry;if(i&&i.flowDomainId.length===0)throw Error(`Floating table registry coordinate/domain mismatch`);let a=Object.freeze([...i?.entries??[]]),o=i?.nextParagraphId??0,s=Math.max(0,n.availableHeightPt),c=TF(e.input);if(t.rowIndex>=c&&t.rowIndex>0&&c>0)for(let i=0;i<c;i+=1){let c=FF(e,MF(e,e.input.rows[i],`repeated-header`,n),`repeated-header`,n.availableHeightPt-s,n,a,o,wF(),()=>!0),l=c.row,u=OF(e,l,i,n);if(u>s+SF)return{fragment:null,nextCursor:t,requiresFreshPage:!0};r.push(BF(l,`repeated-header`,0,!1,c.resolved)),a=c.registry,o=c.nextParagraphId,s-=u}let l=t,u=t.rowIndex,d=t.rowFragmentIndex===0&&t.cells.length===0&&e.layout.rows.slice(t.rowIndex).reduce((e,t)=>e+Math.max(0,t.heightPt),0)<=s+SF,f=!1;for(;u<e.input.rows.length;){let i=`source`,c=MF(e,e.input.rows[u],i,n),p=u===t.rowIndex?t:Object.freeze({rowIndex:u,rowFragmentIndex:0,cells:Object.freeze([])}),m=u!==t.rowIndex||t.rowFragmentIndex===0,h=m?FF(e,c,i,n.availableHeightPt-s,n,a,o,p,e=>{let t=c.cells.findIndex(t=>t.id===e.hostCellId),n=c.cells[t]?.blocks.findIndex(t=>t.sourceBlockIndex===e.anchorBlockIndex)??-1;if(n<0)return!1;let r=p.cells[t]??CF();return r.blockIndex<n||r.blockIndex===n&&r.paragraphLineStart===0}):{row:c,resolved:Object.freeze([]),registry:a,nextParagraphId:o},g=h.row,_=d||f?kF(e,g,u,n):OF(e,g,u,n);if(m&&_<=s+SF){r.push(BF(g,`source`,0,!1,h.resolved)),a=h.registry,o=h.nextParagraphId,s-=_,u+=1,l=u<e.input.rows.length?Object.freeze({rowIndex:u,rowFragmentIndex:0,cells:Object.freeze([])}):null;continue}if(g.cantSplit){if(r.some(e=>e.ownership===`source`))break;if(_+(n.availableHeightPt-s)<=n.freshPageHeightPt+SF||n.availableHeightPt+SF<n.freshPageHeightPt)return{fragment:null,nextCursor:t,requiresFreshPage:!0};if(gP({compatibility:n.compatibility,availableHeightPt:n.availableHeightPt,freshPageHeightPt:n.freshPageHeightPt,epsilonPt:SF})){r.push(BF(g,`source`,0,!0,h.resolved)),a=h.registry,o=h.nextParagraphId,l=u+1<e.input.rows.length?Object.freeze({rowIndex:u+1,rowFragmentIndex:0,cells:Object.freeze([])}):null;break}}if(n.oversizedRowPolicy===`atomic`&&r.every(e=>e.ownership===`repeated-header`)&&n.availableHeightPt+SF>=n.freshPageHeightPt&&_>n.freshPageHeightPt+SF){r.push(BF(g,`source`,0,!1,h.resolved)),a=h.registry,o=h.nextParagraphId,l=u+1<e.input.rows.length?Object.freeze({rowIndex:u+1,rowFragmentIndex:0,cells:Object.freeze([])}):null;break}let v=WF(e,c,p,s,n),y=null,b=new Set;for(;v.selected;){let t=RF(e,v.selected),r=JSON.stringify([...t].sort());if(b.has(r))throw Error(`Floating table selected ownership did not converge`);b.add(r),y=FF(e,c,i,n.availableHeightPt-s,n,a,o,p,e=>t.has(LF(e)));let l=WF(e,y.row,p,s,n);if(!l.selected){v=l;break}let u=RF(e,l.selected);if(v=l,zF(t,u))break;y=null}if(v.selected&&y===null)throw Error(`Floating table selected ownership did not converge`);if(v.selected){let t=y?.resolved??[];if(t.some(t=>!IF(e,v.selected,t.source)))throw Error(`Floating table transaction included an unowned occurrence`);let i=a.length,c=(y?.registry??a).slice(i);if(r.push({...v.selected,...t.length?{resolvedFloatingTables:Object.freeze(t)}:{}}),a=Object.freeze([...a,...c]),o+=c.length,l=v.next.rowIndex>=e.input.rows.length?null:v.next,v.complete&&v.next.rowIndex<e.input.rows.length){s=Math.max(0,s-AF(e,v.selected.input,u,n)),f=!0,u=v.next.rowIndex;continue}}break}if(r.filter(e=>e.ownership===`source`).length===0){if(!(n.availableHeightPt+SF<n.freshPageHeightPt))throw new Z(`NON_CONVERGENCE`,`Table pagination cannot advance from a fresh page`);return{fragment:null,nextCursor:t,requiresFreshPage:!0}}let p=GF(e,r,n);for(;p.advancePt>n.availableHeightPt+SF;){let t=r.at(-1),i=r.filter(e=>e.ownership===`source`).length;if(!(t?.ownership===`source`&&t.fragmentIndex===0&&t.ranges.every(e=>e.every(e=>e.kind===`whole`)))||i<=1)break;r.pop(),l=Object.freeze({rowIndex:t.logicalRowIndex,rowFragmentIndex:0,cells:Object.freeze([])}),p=GF(e,r,n)}return p.advancePt>n.availableHeightPt+SF&&n.availableHeightPt+SF<n.freshPageHeightPt&&p.advancePt<=n.freshPageHeightPt+SF?{fragment:null,nextCursor:t,requiresFreshPage:!0}:{fragment:p,nextCursor:l,requiresFreshPage:!1,floatingTablePlacements:p.resolvedFloatingTables,...i?{floatingTableRegistryDelta:(()=>{let e=a.slice(i.entries.length).filter(e=>p.resolvedFloatingTables.some(t=>t.occurrenceId===e.occurrenceId));return rN(i,e,i.nextParagraphId+e.length)})()}:{}}}function qF(e,t,n,r){let i=kk(e,n.flowDomainId),a=sj(t,{...n,exclusions:Object.freeze([...n.exclusions,...i.exclusions,...r?.exclusions??[]]),anchorCollisions:Object.freeze([...n.anchorCollisions??[],...i.collisions,...r?.collisions??[]])});return Ak(e,i,a.layout),a}function JF(e,t){return e.flatMap((e,n)=>e.kind===`shape`&&e.anchorOccurrenceId&&e.authoredWrap===void 0?[]:[{id:e.imageKey||`${t}:float:${n}`,wrap:e.authoredWrap??(e.mode===`topAndBottom`?`topAndBottom`:`square`),wrapSide:qy(e.side),bounds:{xPt:e.xLeft,yPt:e.yTop,widthPt:Math.max(0,e.xRight-e.xLeft),heightPt:Math.max(0,e.yBottom-e.yTop)},polygon:e.wrapPolygon??[{xPt:e.xLeft,yPt:e.yTop},{xPt:e.xRight,yPt:e.yTop},{xPt:e.xRight,yPt:e.yBottom},{xPt:e.xLeft,yPt:e.yBottom}],...e.kind===`table`&&!e.anchorOccurrenceId?{verticalOwnership:`page`}:{},...e.anchorOccurrenceId?{anchorOccurrenceId:e.anchorOccurrenceId,verticalOwnership:`page`}:{}}])}function YF(e){return e.flatMap(e=>e.kind!==`shape`||!e.anchorOccurrenceId?[]:[{occurrenceId:e.anchorOccurrenceId,bounds:{xPt:e.imageX,yPt:e.imageY,widthPt:e.imageW,heightPt:e.imageH},horizontalOwnership:`page`,verticalOwnership:`page`}])}function XF(e){if(e.occurrenceId.length===0)throw Error(`DrawingML collision occurrence ID must not be empty`);let{xPt:t,yPt:n,widthPt:r,heightPt:i}=e.bounds;if(![t,n,r,i].every(Number.isFinite)||r<0||i<0)throw Error(`DrawingML collision bounds are invalid: ${e.occurrenceId}`);if(e.horizontalOwnership!==`page`&&e.horizontalOwnership!==`host`||e.verticalOwnership!==`page`&&e.verticalOwnership!==`host`)throw Error(`DrawingML collision ownership is invalid: ${e.occurrenceId}`)}function ZF(e){return XF(e),Object.freeze({occurrenceId:e.occurrenceId,bounds:Object.freeze({...e.bounds}),horizontalOwnership:e.horizontalOwnership,verticalOwnership:e.verticalOwnership,...e.relativeHeight===void 0?{}:{relativeHeight:e.relativeHeight}})}function QF(e,t){return Object.freeze({coordinateSpace:t,flowDomainId:e,entries:Object.freeze([])})}function $F(e,t){return Object.freeze({coordinateSpace:e.coordinateSpace,flowDomainId:e.flowDomainId,baseEntries:e.entries,baseEntryCount:e.entries.length,entries:Object.freeze(t.map(ZF))})}function eI(e,t){if(t.coordinateSpace!==e.coordinateSpace)throw Error(`DrawingML collision registry coordinate space mismatch`);if(t.flowDomainId!==e.flowDomainId)throw Error(`DrawingML collision registry flow domain mismatch`);if(t.baseEntries!==e.entries||t.baseEntryCount!==e.entries.length)throw Error(`DrawingML collision registry delta is stale`);let n=new Set(e.entries.map(e=>e.occurrenceId));for(let e of t.entries){if(XF(e),n.has(e.occurrenceId))throw Error(`DrawingML collision occurrence committed twice: ${e.occurrenceId}`);n.add(e.occurrenceId)}}function tI(e,t){return eI(e,t),Object.freeze({coordinateSpace:e.coordinateSpace,flowDomainId:e.flowDomainId,entries:Object.freeze([...e.entries,...t.entries])})}function nI(e,t){return qO(e,t)}function rI(e){return Jy(e.wrapMode)&&nI(e.anchorYRelativeFrom??null,e.anchorYFromPara??!1)}function iI(e){let t=Mm(e);return t===`U`||t===`Tu`?`upright`:t===`Tr`?`rotate`:`sideways`}const aI=new Set([65294]);function oI(e){return aI.has(e)?{dx:.4,dy:-.4}:{dx:0,dy:0}}function sI(e){let t=[],n=``,r=null;for(let i of e){let e=iI(i.codePointAt(0)??0);r===null?(r=e,n=i):e===r?n+=i:(t.push({text:n,mode:r}),n=i,r=e)}return n!==``&&r!==null&&t.push({text:n,mode:r}),t}const cI=()=>!1;function lI(e,t,n){let r=e.textBaseline;e.textBaseline=`alphabetic`;let i=e.measureText(t);e.textBaseline=r;let a=i.fontBoundingBoxAscent,o=i.fontBoundingBoxDescent;return typeof a==`number`&&typeof o==`number`&&(a!==0||o!==0)?(a-o)/2:.38*n}function uI(e,t){let n=e.textAlign,r=e.textBaseline;e.textAlign=`center`,e.textBaseline=`middle`;let i=e.measureText(t);e.textAlign=n,e.textBaseline=r;let a=i.actualBoundingBoxAscent,o=i.actualBoundingBoxDescent;return typeof a==`number`&&typeof o==`number`?(a-o)/2:0}function dI(e){return iI(e)===`rotate`&&Fm(e)===null&&!Rm(e)}function fI(e){let t=Mm(e);return t===`Tu`||t===`Tr`}function pI(e,t){let n=e.textAlign,r=e.textBaseline;e.textAlign=`center`,e.textBaseline=`middle`;let i=e.measureText(t);e.textAlign=n,e.textBaseline=r;let a=i.actualBoundingBoxLeft,o=i.actualBoundingBoxRight;return typeof a!=`number`||typeof o!=`number`||!Number.isFinite(a)||!Number.isFinite(o)?null:{extentPx:a+o,shiftPx:(a-o)/2}}function mI(e,t,n,r,i,a,o){let s=e.textAlign,c=e.textBaseline,l=()=>(e.textAlign=n===`sideways`?`left`:`center`,e.textBaseline=n===`sideways`?`alphabetic`:`middle`,e.measureText(t)),u;try{u=o?Qm(e,l):l()}finally{e.textAlign=s,e.textBaseline=c}if(n===`upright`){if(!Number.isFinite(u.actualBoundingBoxLeft)||!Number.isFinite(u.actualBoundingBoxRight))return;let e=u.actualBoundingBoxLeft,t=u.actualBoundingBoxRight,n=a===`vertical-rl`?1:i,o=-(r.xPt-e)*n,s=-(r.xPt+t)*n;return Object.freeze({startPt:Math.min(o,s),endPt:Math.max(o,s)})}if(!Number.isFinite(u.actualBoundingBoxAscent)||!Number.isFinite(u.actualBoundingBoxDescent))return;let d=u.actualBoundingBoxAscent,f=u.actualBoundingBoxDescent,p=r.yPt-d,m=r.yPt+f;return Object.freeze({startPt:Math.min(p,m),endPt:Math.max(p,m)})}function hI(e,t,n,r,i){let a=e.measureText(t).width;if(fI(n)&&r(n)){let n=$m(e,t);return{naturalPx:n.cellAdvancePx,vert:n,rotateInkShiftPx:0}}if(i&&dI(n)){let n=pI(e,t);if(n!==null&&n.extentPx>a)return{naturalPx:n.extentPx,vert:null,rotateInkShiftPx:n.shiftPx}}return{naturalPx:a,vert:null,rotateInkShiftPx:0}}function gI(e,t,n,r,i=1,a=!1,o=cI,s=`vertical-rl`){let c=[],l=lI(e,t,n),u=0,d=0;for(let f of sI(t)){if(f.mode===`sideways`){let t=[...f.text].length,n=e.measureText(f.text).width*i+r*t,a={xPt:0,yPt:l},o=mI(e,f.text,`sideways`,a,i,s,!1);c.push({range:{start:d,end:d+f.text.length},text:f.text,orientation:`sideways`,originPt:u,advancePt:n,drawOffsetPt:a,verticalFeature:!1,...o?{blockAxisInkBounds:o}:{}}),u+=n,d+=f.text.length;continue}for(let t of f.text){let l=t.codePointAt(0)??0,f=iI(l),p=f===`rotate`?Fm(l):null,m=f===`rotate`&&p===null&&Rm(l),h=hI(e,t,l,o,a),g=h.naturalPx*i+r,_={start:d,end:d+t.length};if(h.vert!==null){let n={xPt:0,yPt:0},r=mI(e,t,`upright`,n,i,s,!0);c.push({range:_,text:t,orientation:`upright`,originPt:u+h.vert.originInCellPx*i,advancePt:g,drawOffsetPt:n,verticalFeature:!0,...r?{blockAxisInkBounds:r}:{}})}else if(f===`upright`||p!==null||m){let r=p===null?Nm(l):null,a=p??r,o=a===null?t:String.fromCodePoint(a),d=a===null?oI(l):{dx:0,dy:0},f=sx(r),m=d.dy===0&&!f?uI(e,o)/n:0,h={xPt:d.dx*n,yPt:(m+d.dy)*n},v=mI(e,o,`upright`,h,i,s,!1);c.push({range:_,text:o,orientation:`upright`,originPt:u+g/2,advancePt:g,drawOffsetPt:h,verticalFeature:!1,...v?{blockAxisInkBounds:v}:{}})}else{let n={xPt:0,yPt:0},r=mI(e,t,`rotate`,n,i,s,!1);c.push({range:_,text:t,orientation:`rotate`,originPt:u+g/2+i*h.rotateInkShiftPx,advancePt:g,drawOffsetPt:n,verticalFeature:!1,...r?{blockAxisInkBounds:r}:{}})}u+=g,d+=t.length}}return c}function _I(e,t,n){let r=0;for(let i of sI(t)){if(i.mode===`sideways`){r+=e.measureText(i.text).width;continue}for(let t of i.text){let i=hI(e,t,t.codePointAt(0)??0,n,!0);r+=i.naturalPx}}return r-e.measureText(t).width}function vI(e,t){return _I(e,t,t=>Zm(e,t))}function yI(e,t,n,r,i){return{x:t,y:i-(e+n),w:r,h:n}}function bI(e,t,n){lC(e.blocks.body);let r=e.acquisition,i=r.acquisitionInputs,a=r.effectiveTablePositioning,o=r.publicAnchorBridge,s=vx(e.fonts.familyClasses,e.fonts.familyPitches),c=(e,t,n)=>`${e}${t?`|clr:${t}`:``}${n?`|duo:${n.clr1}:${n.clr2}`:``}`;function l(e,t,n={},r,a={},s,c){let l=xC(r,t),u=s;return{ctx:e,verticalGlyphMeasurement:u_(u),acquisitionInputs:i,contentX:t.marginLeft,contentW:t.pageWidth-t.marginLeft-t.marginRight,y:0,pageH:t.pageHeight,pageIndex:0,totalPages:x_(u).totalPages,marginLeft:t.marginLeft,marginRight:t.marginRight,marginTop:NC(t.marginTop),marginBottom:NC(t.marginBottom),pageWidth:t.pageWidth,floats:[],floatParaSeq:0,layoutSettings:r,sectionLayout:l,storyContext:yN,docEastAsian:r.documentHasEastAsianText,fontFamilyClasses:n,resolvedLocalFonts:a,layoutServices:u,retainedTableAcquisition:{layoutServices:e=>e.layoutServices,tableFormat:i.tableFormatInput,resolveColumns:p,createCellState:(e,t,n)=>({...wN(e),contentX:0,contentW:t,y:0,containerShading:n.background??e.containerShading,floats:[],floatParaSeq:0,pageAnchorPrescanned:new Set}),acquireParagraph:(e,t,n,r,i,a,s,c)=>{let l=c??{story:`body`,storyInstance:`body`,path:[...r]},u=t.runs.filter((e,t)=>o(l,t)!==null);u.length>0&&T({...t,runs:u},e,e.y);let d=CN(e,t),f=qF(e,e.acquisitionInputs.paragraphAcquisitionInput(t,l),{id:`${l.story}:${l.storyInstance}:${l.path.join(`.`)}`,source:l,flowDomainId:i,ordinaryFlow:!0,context:d,placement:{startYPt:e.y,paragraphXPt:0,availableWidthPt:n,maximumYPt:e.pageH,suppressSpaceBefore:!0},measurer:{context:e.ctx,fontFamilyClasses:e.fontFamilyClasses},environment:_N(e),exclusions:JF(e.floats,i),anchorCollisions:YF(e.floats),anchorCellBounds:{xPt:0,yPt:0,widthPt:n,heightPt:e.pageH},containerShading:e.containerShading,...a?{paragraphBorderEdges:a}:{},trailingExtentPt:Math.max(d.spaceAfterPt,a?.bottom===`none`?0:ZS(t.borders)),continuesFromPrevious:!1,anchorFrames:bN(e),acquireCompleteStory:e.acquireCompleteTextBoxStory},s).layout;return t.spaceBefore===0?f:Object.freeze({...f,flowBounds:Object.freeze({...f.flowBounds,heightPt:f.flowBounds.heightPt+t.spaceBefore}),advancePt:f.advancePt+t.spaceBefore,spacing:Object.freeze({...f.spacing,beforePt:t.spaceBefore})})},registerFloatingTable:(e,t)=>{let n=!t.positioning.horzSpecified||t.positioning.horzAnchor!==`page`&&t.positioning.horzAnchor!==`margin`,r=t.positioning.vertAnchor!==`page`&&t.positioning.vertAnchor!==`margin`;if(!n||!r)return null;let i=e.pageH,a={xPt:e.contentX,yPt:e.y,widthPt:e.contentW,heightPt:t.child.advancePt},o=eN(t.positioning,{page:{xPt:0,yPt:0,widthPt:e.pageWidth,heightPt:i},margin:{xPt:e.marginLeft,yPt:e.marginTop,widthPt:Math.max(0,e.pageWidth-e.marginLeft-e.marginRight),heightPt:Math.max(0,i-e.marginTop-e.marginBottom)},text:a},t.child.columnWidthsPt.reduce((e,t)=>e+t,0),t.child.advancePt),s=JM(e,{x:o.x,y:o.y,w:o.w,h:o.h,dl:t.positioning.leftFromTextPt,dr:t.positioning.rightFromTextPt,dt:t.positioning.topFromTextPt,db:t.positioning.bottomFromTextPt,kind:`table`,mode:`square`,side:`bothSides`,imageKey:``,paraId:e.floatParaSeq++,avoidOverlap:!0,tableOverlap:t.overlap});return Object.freeze({xPt:s.imageX-a.xPt,yPt:s.imageY-a.yPt})},advanceState:(e,t)=>{e.y+=t}},retainedTablesBySourceIndex:new Map,currentDateMs:c?.currentDateMs,kinsoku:r.kinsoku,defaultTabPt:r.defaultTabPt,get verticalCJK(){return fN(this.sectionLayout.textDirection)},get verticalAllRotated(){return fN(this.sectionLayout.textDirection)&&pN(this.sectionLayout.textDirection)},verticalPhys:dN(t)?(()=>{let e=hN(t);return{pageWidth:e.pageWidth,pageHeight:e.pageHeight,marginLeft:e.marginLeft,marginRight:e.marginRight,marginTop:NC(e.marginTop),marginBottom:NC(e.marginBottom),physicalPageWidthPt:e.pageWidth}})():void 0}}function u(e,t,n){let r=e=>{let t=Object.freeze({top:null,right:null,bottom:null,left:null,insideH:null,insideV:null});return Object.freeze({kind:`table`,id:e.id,source:e.source,flowDomainId:e.flowDomainId,ordinaryFlow:!0,alignment:e.alignment,indentPt:e.indentPt,bidiVisual:e.bidiVisual,columnWidthsPt:e.columnWidthsPt,columnWidthKeys:e.columnWidthKeys,borders:t,rows:Object.freeze(e.rows.map(e=>Object.freeze({...e,exceptionBorders:e.sourceTableEdges})))})},i=t=>{if(t.story!==`body`||t.storyInstance!==`body`||t.path.length!==1)throw Error(`Body acquisition requires a top-level body source`);let n=e.blocks.resolve(t);if(!n||n.type!==`paragraph`&&n.type!==`table`)throw Error(`Body source does not identify a flow block: ${t.path.join(`.`)}`);return n},c=t=>e.blocks.resolve(t),u=(e,t,n,r,i,a,o=Object.freeze({boundary:null}),s)=>{let c=dC(t)??{top:`top`,bottom:`bottom`},l=SN(e,t);return sj(t,{id:`${n.story}:${n.storyInstance}:${n.path.join(`.`)}`,source:n,flowDomainId:r.flowDomainId,ordinaryFlow:!0,context:l,placement:{startYPt:e.y,paragraphXPt:r.availableBounds.xPt,availableWidthPt:i,maximumYPt:e.pageH,suppressSpaceBefore:a},measurer:{context:e.ctx,fontFamilyClasses:e.fontFamilyClasses},environment:_N(e),exclusions:JF(e.floats,r.flowDomainId),anchorCollisions:s??YF(e.floats),containerShading:e.containerShading,paragraphBorderEdges:c,trailingExtentPt:Math.max(l.spaceAfterPt,c.bottom===`none`?0:ZS(t.borders)),continuesFromPrevious:o.boundary!==null,...o.sourceRangeStart===void 0?{}:{sourceRangeStart:o.sourceRangeStart},anchorFrames:bN(e),acquireCompleteStory:e.acquireCompleteTextBoxStory},o.boundary===null?void 0:{boundary:o.boundary,...o.uniformRubyAdvancePt===void 0?{}:{uniformRubyAdvancePt:o.uniformRubyAdvancePt}})};return Object.freeze({openBodyLayoutSession(d,g,_){if(!t)throw Error(`Body layout acquisition requires a measurement context`);let v={...e.section,...d.section.geometry,textDirection:d.section.textDirection,vAlign:d.section.verticalAlignment},y=l(t,fN(v.textDirection)?mN(v):v,s,e.documentLayoutSettings,n,g,_),b=e.blocks.footnotes,x=e.blocks.endnotes,S=Ej(b);y.noteNumbers=new Map([...[...Tj(b,Dj(e.blocks.body,`footnote`))].map(([e,t])=>[`footnote:${e}`,t]),...[...Tj(x,Dj(e.blocks.body,`endnote`))].map(([e,t])=>[`endnote:${e}`,t])]);let C=d.initialLocation,w=e=>`body:page:${e}:registry`,D=Object.freeze({coordinateSpace:`logical-page-points`,flowDomainId:w(C.pageIndex),entries:Object.freeze([]),nextParagraphId:0}),O=QF(w(C.pageIndex),`logical-page-points`),k=(e,t)=>{let n=t.section.geometry;e.sectionLayout=t.section,e.pageIndex=t.pageIndex;let r=x_(g).resolveDestinationPage?.(t.pageIndex);e.displayPageNumber=r?.displayPageNumber??t.pageIndex+1,e.pageNumberFormat=r?.pageNumberFormat??e.pageNumberFormat,e.pageWidth=n.pageWidth,e.pageH=n.pageHeight,e.marginLeft=n.marginLeft,e.marginRight=n.marginRight,e.marginTop=NC(n.marginTop),e.marginBottom=NC(n.marginBottom),e.contentX=t.availableBounds.xPt,e.contentW=t.availableBounds.widthPt,e.y=t.cursorPt.yPt},A=e=>{C=e,k(y,e)};A(C);let j=(e,t,n,r,i=D.nextParagraphId)=>{let a=new Set(D.entries.map(e=>e.occurrenceId)),s=e.runs.flatMap((i,s)=>{if(i.type!==`shape`&&i.type!==`image`&&i.type!==`chart`)return[];let c=o(t,s);return!c||r&&!r.has(c.occurrenceId)||a.has(c.occurrenceId)||c.pageOwned&&n.pageAnchorPrescanned?.has(e)?[]:[{run:i,occurrenceId:c.occurrenceId}]});if(s.length===0)return Object.freeze([]);let c=n.floats.length;T({...e,runs:s.map(({run:e})=>e)},n,n.y);let l=n.floats.slice(c);if(l.length!==s.length)throw Error(`Public paragraph anchor acquisition did not retain every wrap float`);return Object.freeze(l.map((e,t)=>{let n=s[t].occurrenceId;return Object.freeze({kind:`shape`,occurrenceId:n,exclusionId:n,paragraphId:i,bounds:Object.freeze({xPt:e.imageX,yPt:e.imageY,widthPt:e.imageW,heightPt:e.imageH}),exclusionBounds:Object.freeze({xPt:e.xLeft,yPt:e.yTop,widthPt:e.xRight-e.xLeft,heightPt:e.yBottom-e.yTop}),wrap:s[t].run.wrapMode,wrapSide:e.side,wrapDistances:Object.freeze({topPt:e.distTop,rightPt:e.distRight,bottomPt:e.distBottom,leftPt:e.distLeft}),...e.wrapPolygon?{wrapPolygon:Object.freeze([...e.wrapPolygon])}:{}})}))},M=e=>{let t=new Map((e.anchorFrames??[]).flatMap(e=>{if(e.status!==`resolved`)return[];let t=e=>e.status===`resolved`&&(e.referenceFrame===`paragraph`||e.referenceFrame===`line`||e.referenceFrame===`character`);return t(e.axes.horizontal)||t(e.axes.vertical)?[[e.occurrenceId,e]]:[]}));if(t.size===0)return Object.freeze([]);let n=new Map(e.exclusions.flatMap(e=>e.anchorOccurrenceId?[[e.anchorOccurrenceId,e]]:[]));return Object.freeze((e.anchorCollisions??[]).flatMap(e=>{let r=t.get(e.occurrenceId);if(!r||r.geometry.wrap.kind===`none`)return[];let i=n.get(e.occurrenceId);if(!i)throw Error(`Wrapped anchor omitted exclusion geometry: ${e.occurrenceId}`);return[Object.freeze({kind:`shape`,occurrenceId:e.occurrenceId,exclusionId:e.occurrenceId,paragraphId:D.nextParagraphId,bounds:e.bounds,exclusionBounds:i.bounds,horizontalOwnership:e.horizontalOwnership,verticalOwnership:e.verticalOwnership,wrap:r.geometry.wrap.kind,wrapSide:r.geometry.wrap.side,wrapDistances:r.geometry.wrap.distances,...r.geometry.wrap.polygon?{wrapPolygon:r.geometry.wrap.polygon.points}:{}})]}))},N=e=>{if(e.acquired.kind!==`paragraph`)return e.acquired;let t=c(e.acquired.source);if(t.type!==`paragraph`)throw Error(`Table paragraph re-acquisition source kind mismatch`);let n={...wN(y),contentX:0,contentW:e.acquired.flowBounds.widthPt,y:e.acquired.flowBounds.yPt,floats:(e.floatingTableExclusions??[]).map((e,t)=>({kind:`table`,tableOverlap:`never`,mode:`square`,imageKey:`table-final-frame:${t}`,imageX:e.xPt,imageY:e.yPt,imageW:e.widthPt,imageH:e.heightPt,xLeft:e.xPt,xRight:e.xPt+e.widthPt,yTop:e.yPt,yBottom:e.yPt+e.heightPt,side:`bothSides`,distLeft:0,distRight:0,distTop:0,distBottom:0,paraId:t})),floatParaSeq:e.floatingTableExclusions?.length??0,pageAnchorPrescanned:new Set},r=wk(e.acquired);return y.retainedTableAcquisition.acquireParagraph(n,t,e.acquired.flowBounds.widthPt,e.acquired.source.path,e.acquired.flowDomainId,void 0,r)},P=Ej(e.blocks.endnotes),F=new Map,I=t=>{if(t.path.length!==0)throw Error(`Story acquisition requires a story-root source`);return e.blocks.storyRoot(t)},L=t=>{if(t.path.length===0||(t.path.length-1)%3!=0)throw Error(`Story block acquisition requires a canonical source path`);return e.blocks.resolve(t)},R=e=>{let t=JSON.stringify({source:e.source,pageIndex:e.pageIndex,section:e.section,container:e.container}),n=F.get(t);if(n)return n;let r=I(e.source),i=e.source.story===`footnote`||e.source.story===`endnote`?y.noteNumbers?.get(`${e.source.story}:${e.source.storyInstance}`):void 0,a=x_(g),s=a.resolveDestinationPage?.(e.pageIndex),c=fN(e.section.textDirection),l={...y,sectionLayout:e.section,pageIndex:e.pageIndex,totalPages:a.totalPages,displayPageNumber:s?.displayPageNumber??e.pageIndex+1,pageNumberFormat:s?.pageNumberFormat??y.pageNumberFormat,pageWidth:e.section.geometry.pageWidth,pageH:e.container.capacity===`unbounded`?2**53-1:e.section.geometry.pageHeight,marginLeft:e.section.geometry.marginLeft,marginRight:e.section.geometry.marginRight,marginTop:NC(e.section.geometry.marginTop),marginBottom:NC(e.section.geometry.marginBottom),contentX:e.container.bounds.xPt,contentW:e.container.bounds.widthPt,y:e.container.bounds.yPt,floats:[],floatParaSeq:0,retainedTablesBySourceIndex:new Map,pageAnchorPrescanned:new Set,noteReferenceNumber:i,verticalCJK:c,verticalAllRotated:c&&pN(e.section.textDirection),...c?{}:{verticalPhys:void 0},storyContext:{story:e.source.story,containers:[],lineNumberingEligible:!1}};E(r,0,l);let u=__(g);l.layoutServices=u;let d=r.flatMap((t,n)=>{let r={story:e.source.story,storyInstance:e.source.storyInstance,path:[n]};if(t.type===`unsupportedTextBoxBlock`)return[{type:`unsupportedTextBoxBlock`,qName:t.qName,sourcePath:t.sourcePath}];if(t.type===`paragraph`)return[{kind:`paragraph`,source:r}];if(t.type!==`table`)throw Error(`Unsupported ${e.source.story} story block: ${t.type}`);let i=l.retainedTableAcquisition,a=t;return[uF(a,p(a,e.container.bounds.widthPt,l),e.container.bounds.widthPt,l,r,i).input]}),f=null;Qj(u,{layoutParagraph(e,t){let n=L(e.source);if(n.type!==`paragraph`)throw Error(`Story paragraph source kind mismatch`);let i=e.source.path[0],a=i>0?r[i-1]:void 0,s=a?.type===`paragraph`?a:null,c=r[i+1],u=c?.type===`paragraph`?c:null,d=f?.spaceAfter??0,p=vk(f,n,d,n.spaceBefore),m=Math.max(t.container.bounds.yPt,t.cursor.yPt-p.overlap);l.y=m,l.contentX=t.container.bounds.xPt,l.contentW=t.container.bounds.widthPt;let h=n.runs.filter((t,n)=>o(e.source,n)!==null);h.length>0&&T(Object.freeze({...n,runs:Object.freeze(h)}),l,l.y);let g=CN(l,n),_=rC(s,n,u),v=qF(l,n,{id:`${e.source.story}:${e.source.storyInstance}:${e.source.path.join(`.`)}`,source:e.source,flowDomainId:t.container.id,ordinaryFlow:!0,context:g,placement:{startYPt:m,paragraphXPt:t.container.bounds.xPt,availableWidthPt:t.container.bounds.widthPt,maximumYPt:t.availableBounds.yPt+t.availableBounds.heightPt,suppressSpaceBefore:p.suppressBefore},measurer:{context:l.ctx,fontFamilyClasses:l.fontFamilyClasses},environment:_N(l),exclusions:JF(l.floats,t.container.id),anchorCollisions:YF(l.floats),containerShading:l.containerShading,paragraphBorderEdges:_,trailingExtentPt:Math.max(g.spaceAfterPt,_.bottom===`none`?0:ZS(n.borders)),continuesFromPrevious:!1,anchorFrames:bN(l),acquireCompleteStory:l.acquireCompleteTextBoxStory});f=n;let y={xPt:t.cursor.xPt,yPt:m+v.layout.advancePt};return l.y=y.yPt,{layout:v.layout,nextCursor:y}},layoutTable(e,t){f=null;let n=iF({...e,flowDomainId:t.container.id},t,u);return l.y=n.nextCursor.yPt,n}});let m=tM({source:e.source,container:e.container,blocks:Object.freeze(d)},u),h=Object.freeze({...m,blocks:Object.freeze(m.blocks.map((t,n)=>{if(t.kind!==`paragraph`&&t.kind!==`table`)throw Error(`Shared story emitted unsupported node: ${t.kind}`);return vD(t,{occurrenceId:`${e.container.id}:block:${n}`,destination:{coordinateSpace:`logical-page-points`,flowDomainId:e.container.id,translation:{xPt:0,yPt:0}}})}))});return F.set(t,h),h};y.acquireCompleteTextBoxStory=e=>{let t=e.coordinateSpace===`upright-physical`?{...y.sectionLayout,geometry:FC(y.sectionLayout.geometry),textDirection:`lrTb`}:y.sectionLayout;return R({source:e.source,pageIndex:y.pageIndex,section:t,container:e.container})};let z={hasPaginationFields:e.hasPaginationFields,measureParagraph(t){A(t.location);let n=i(t.input.source);if(n.type!==`paragraph`)throw Error(`Paragraph source kind mismatch`);if(n.framePr){if(t.continuation.boundary!==null)throw Error(`Body frame acquisition cannot continue across flow regions`);let r,i=uC(n);if(!i)throw Error(`Body frame acquisition requires an indexed adjacency group`);let a=h(n,i,y,m(e.blocks.body,n,y),e=>{r=e});if(!r)throw Error(`Body frame acquisition omitted its retained group`);let o=r.members.find(e=>e.paragraph===n);if(!o)throw Error(`Body frame acquisition omitted its retained member`);let s=n===i.members.at(-1)&&i.framePr.dropCap!==`none`?LD(lj(r)):0,c=n.framePr.vAnchor===`page`||n.framePr.vAnchor===`margin`,l=a.exclusionId??`frame:${t.input.source.path.join(`:`)}`,u=Object.freeze({kind:`frame`,occurrenceId:l,exclusionId:l,paragraphId:D.nextParagraphId,bounds:Object.freeze({xPt:a.x,yPt:a.y,widthPt:a.w,heightPt:a.h}),exclusionBounds:Object.freeze({xPt:a.exLeft,yPt:a.exTop,widthPt:a.exRight-a.exLeft,heightPt:a.exBottom-a.exTop})});return Object.freeze({layout:o.fragment,blockExtentPt:s,fragmentation:Object.freeze({kind:`indivisible`}),placement:Object.freeze({coordinateSpace:`logical-body`,xPt:o.fragment.flowBounds.xPt,yPt:o.fragment.flowBounds.yPt,sectionFlowOwnership:c?`page`:`host-flow`}),...n===i.owner?{retainedFootnoteReferenceIds:Object.freeze([...new Set(r.members.flatMap(e=>Mj(e.fragment)))])}:{},...c?{}:{relocationBlockExtentPt:Math.max(0,a.y+a.h-t.location.cursorPt.yPt)},...a.registerExclusion===!1?{}:{flowRegistryDelta:Object.freeze({floats:rN(D,Object.freeze([u]),D.nextParagraphId+1)})}})}let r={...y,floats:[...y.floats],pageAnchorPrescanned:new Set(y.pageAnchorPrescanned)};k(r,t.location);let a=t.continuation.boundary===null?j(n,t.input.source,r):Object.freeze([]),{measured:o,layout:s}=u(r,n,t.input.source,t.location,t.availableInlineExtentPt,t.suppressSpaceBefore,t.continuation,O.entries),c=o.lines.map(e=>{let t=e.layout.consumedEnd;if(!t)throw Error(`Measured line omitted its source boundary`);return t}),l=M(s),d=Object.freeze([...a,...l]),f=Ek(s);return Object.freeze({layout:s,blockExtentPt:s.advancePt,fragmentation:o.markOnly?Object.freeze({kind:`indivisible`}):Object.freeze({kind:`splittable`,lineEndBoundaries:Object.freeze(c)}),...o.markOnly?{markBelowBaselinePt:o.lastLineBelowBaselinePt}:{},...o.uniformRubyAdvancePt==null?{}:{uniformRubyAdvancePt:o.uniformRubyAdvancePt},...d.length===0&&f.length===0?{}:{flowRegistryDelta:Object.freeze({...d.length===0?{}:{floats:rN(D,d,D.nextParagraphId+d.length)},...f.length===0?{}:{drawingCollisions:$F(O,f)}})}})},measureTable(e){if(A(e.location),e.input.kind===`adjacent-table-group`){if(e.cursor&&e.cursor.kind!==`adjacent-table-group`)throw Error(`Adjacent table group acquisition received an ordinary table cursor`);let t=e.input.tables.map(t=>{let n=i(t.source);if(n.type!==`table`)throw Error(`Table source kind mismatch`);let r=t.source.path[0];return f(y,n,e.availableInlineExtentPt,r),TN(y,r).acquisition}),n=r(xF(e.input.logicalSequenceId,t.map(e=>e.input))),a={container:{id:e.location.flowDomainId,kind:`body`,bounds:{xPt:0,yPt:0,widthPt:e.availableInlineExtentPt,heightPt:e.freshPageBlockExtentPt}},cursor:{xPt:0,yPt:0},availableBounds:{xPt:0,yPt:0,widthPt:e.availableInlineExtentPt,heightPt:e.freshPageBlockExtentPt}},o=iF(n,a,g).layout,s={};t.forEach(e=>Object.entries(e.nestedById).forEach(([e,t])=>{if(s[e]&&s[e]!==t)throw Error(`Adjacent table group has duplicate nested table id: ${e}`);s[e]=t}));let c=Object.freeze({input:n,layout:o,nestedById:Object.freeze(s),floatingTables:Object.freeze(t.flatMap(e=>e.floatingTables))}),l=e.cursor?.cursor??Object.freeze({tableIndex:0,sourceRowIndex:0}),u=e.input.tables.slice(0,l.tableIndex).reduce((e,t)=>e+(t.rowCount??0),0)+l.sourceRowIndex,d=l.tableCursor??Object.freeze({...wF(),rowIndex:u});if(d.rowIndex!==u)throw Error(`Adjacent-table group and table-fragment cursors disagree`);let p=KF(c,d,{availableHeightPt:e.availableBlockExtentPt,freshPageHeightPt:e.freshPageBlockExtentPt,placement:a,services:g,compatibility:`word`,page:{physicalPageIndex:e.location.pageIndex,displayPageNumber:e.location.pageIndex+1,occurrenceId:`${n.id}:body:${e.location.pageIndex}`}});if(!p.fragment||p.requiresFreshPage)return Object.freeze({layout:c.layout,blockExtentPt:0,nextCursor:Object.freeze({kind:`adjacent-table-group`,cursor:l}),requiresFreshFlowRegion:!0});let m=p.nextCursor?(()=>{let t=0,n=0;for(;t<e.input.tables.length;){let r=e.input.tables[t].rowCount??0;if(p.nextCursor.rowIndex<n+r)break;n+=r,t+=1}return t>=e.input.tables.length?null:Object.freeze({tableIndex:t,sourceRowIndex:p.nextCursor.rowIndex-n,tableCursor:p.nextCursor})})():null;return Object.freeze({layout:p.fragment,blockExtentPt:p.fragment.advancePt,nextCursor:m?Object.freeze({kind:`adjacent-table-group`,cursor:m}):null,...p.floatingTableRegistryDelta?{flowRegistryDelta:Object.freeze({floats:p.floatingTableRegistryDelta})}:{}})}let t=i(e.input.source);if(t.type!==`table`)throw Error(`Table source kind mismatch`);let n=e.input.source.path[0];f(y,t,e.availableInlineExtentPt,n);let o=TN(y,n).acquisition;if(e.cursor&&e.cursor.kind!==`table`)throw Error(`Ordinary table acquisition received an adjacent-group cursor`);let s=e.cursor?.cursor??wF(),c=y.pageH,l=y.acquisitionInputs.tableFormatInput(t).positioning;if(l){let n=e.cursor?.kind===`table`&&e.cursor.floatingContinuationFrame===`fresh-text`?Object.freeze({...l,vertAnchor:`text`,yPt:0,yAlign:void 0}):l,r=o.layout.columnWidthsPt.reduce((e,t)=>e+t,0),i=Object.freeze({page:Object.freeze({xPt:0,yPt:0,widthPt:y.pageWidth,heightPt:c}),margin:Object.freeze({xPt:y.marginLeft,yPt:y.marginTop,widthPt:Math.max(0,y.pageWidth-y.marginLeft-y.marginRight),heightPt:Math.max(0,c-y.marginTop-y.marginBottom)}),text:Object.freeze({xPt:e.location.cursorPt.xPt,yPt:e.location.cursorPt.yPt,widthPt:e.availableInlineExtentPt,heightPt:o.layout.advancePt})}),a=eN(n,i,r,o.layout.advancePt);if(e.cursor?.kind!==`table`&&(n.vertAnchor===`page`||n.vertAnchor===`margin`)&&By({bounds:{xPt:a.x,yPt:a.y,widthPt:a.w,heightPt:a.h},blockers:D.entries.map(jy),overlapEpsilonPt:.01}).defer)return Object.freeze({layout:o.layout,blockExtentPt:0,nextCursor:Object.freeze({kind:`table`,cursor:s,floatingContinuationFrame:`authored`}),requiresFreshFlowRegion:!0});let u=(n.vertAnchor===`page`||n.vertAnchor===`margin`)&&o.layout.advancePt>e.freshPageBlockExtentPt,d=u?e.location.availableBounds.yPt+e.location.availableBounds.heightPt:n.vertAnchor===`page`?i.page.yPt+i.page.heightPt:n.vertAnchor===`margin`?i.margin.yPt+i.margin.heightPt:e.location.availableBounds.yPt+e.location.availableBounds.heightPt,f=u?e.freshPageBlockExtentPt:n.vertAnchor===`page`?i.page.heightPt:n.vertAnchor===`margin`?i.margin.heightPt:e.freshPageBlockExtentPt,p;try{p=Tb({step:r=>{if(r?.kind===`fresh-flow-region`||r?.kind===`candidate`&&r.resolved.placement.xPt===r.parentFrame.xPt&&r.resolved.placement.yPt===r.parentFrame.yPt)return r;let c=r?.resolved.placement??{xPt:a.x,yPt:a.y},l=Math.max(0,d-c.yPt),u=KF(o,s,{availableHeightPt:l,freshPageHeightPt:f,placement:{container:{id:`${e.location.flowDomainId}:floating-table`,kind:`body`,bounds:{xPt:0,yPt:0,widthPt:e.availableInlineExtentPt,heightPt:l}},cursor:{xPt:0,yPt:0},availableBounds:{xPt:0,yPt:0,widthPt:e.availableInlineExtentPt,heightPt:l}},services:g,compatibility:`word`,oversizedRowPolicy:`atomic`,page:{physicalPageIndex:e.location.pageIndex,displayPageNumber:y.displayPageNumber??e.location.pageIndex+1,occurrenceId:`${o.input.id}:fitting-outer:${e.location.pageIndex}:${s.rowIndex}:${s.rowFragmentIndex}`},floatingTableFrames:{page:i.page,margin:i.margin,column:i.text},floatingTableRegistry:D,finalPlacementTranslationPt:c,reacquirePageDependentBlock:N});if(!u.fragment||u.requiresFreshPage)return Object.freeze({kind:`fresh-flow-region`,result:u});let p=Object.freeze({kind:`floating-table-placement`,occurrenceId:`${o.input.id}:root:${e.location.pageIndex}:${s.rowIndex}:${s.rowFragmentIndex}`,ownership:`source`,physicalPageIndex:e.location.pageIndex,displayPageNumber:y.displayPageNumber??e.location.pageIndex+1,hostCellId:e.location.flowDomainId,sourceBlockIndex:e.input.source.path[0],anchorBlockIndex:e.input.source.path[0],tableId:u.fragment.id,overlap:t.overlap===`never`?`never`:`overlap`,positioning:n,anchorBounds:i.text,child:u.fragment}),m=u.floatingTableRegistryDelta?.entries??[],h=u.floatingTableRegistryDelta?.nextParagraphId??D.nextParagraphId,_=oN(p,i,aN(D.entries,h,D.coordinateSpace,D.flowDomainId)),v=JSON.stringify({parentFrame:{xPt:_.placement.xPt,yPt:_.placement.yPt},fragment:u.fragment,nestedEntries:m,resolvedBounds:_.placement.bounds});return Object.freeze({kind:`candidate`,parentFrame:Object.freeze({xPt:c.xPt,yPt:c.yPt}),result:u,fragment:u.fragment,resolved:_,nestedEntries:m,fingerprint:v})},stateOf:e=>e.kind===`fresh-flow-region`?`fresh-flow-region`:e.fingerprint,limit:16}).value}catch(e){throw e instanceof wb?new Z(`NON_CONVERGENCE`,e.reason===`cycle`?`Floating table parent/child transaction repeated an exact-state cycle`:`Floating table parent/child transaction reached the operational pass limit 16`):e}if(p.kind===`fresh-flow-region`)return Object.freeze({layout:o.layout,blockExtentPt:0,nextCursor:Object.freeze({kind:`table`,cursor:s,floatingContinuationFrame:`fresh-text`}),requiresFreshFlowRegion:!0});let{result:m,fragment:h,resolved:_,nestedEntries:v}=p,b=e.cursor?.kind===`table`&&e.cursor.floatingContinuationFrame!==void 0,x=e.location.availableBounds.yPt+e.location.availableBounds.heightPt,S=[...h.resolvedFloatingTables??[],_.placement].filter(e=>e.source.positioning.vertAnchor===`text`);return!b&&S.some(e=>e.exclusionBounds.yPt+e.exclusionBounds.heightPt>x)?Object.freeze({layout:h,blockExtentPt:0,nextCursor:Object.freeze({kind:`table`,cursor:s,floatingContinuationFrame:`fresh-text`}),requiresFreshFlowRegion:!0}):Object.freeze({layout:h,blockExtentPt:0,nextCursor:m.nextCursor?Object.freeze({kind:`table`,cursor:m.nextCursor,floatingContinuationFrame:`fresh-text`}):null,flowRegistryDelta:Object.freeze({floats:rN(D,Object.freeze([...v,..._.transaction.delta]),_.transaction.nextParagraphId)}),placement:Object.freeze({coordinateSpace:`logical-body`,xPt:_.placement.xPt,yPt:_.placement.yPt,sectionFlowOwnership:n.vertAnchor===`page`||n.vertAnchor===`margin`?`page`:`host-flow`})})}if(y.verticalPhys&&!a(t)){if(e.cursor)throw Error(`An upright physical table must remain atomic`);let t=y.verticalPhys,n=o.layout.columnWidthsPt.reduce((e,t)=>e+t,0);if(n>e.availableBlockExtentPt&&e.availableBlockExtentPt<e.freshPageBlockExtentPt)return Object.freeze({layout:o.layout,blockExtentPt:0,nextCursor:Object.freeze({kind:`table`,cursor:s}),requiresFreshFlowRegion:!0});let r=t.physicalPageWidthPt-e.location.cursorPt.yPt-n,i=e.location.cursorPt.xPt,a=Math.max(o.layout.advancePt,t.pageHeight-t.marginTop-t.marginBottom),c=`upright-physical-page:${e.location.pageIndex}`,l=KF(o,wF(),{availableHeightPt:a,freshPageHeightPt:a,placement:{container:{id:c,kind:`body`,bounds:{xPt:0,yPt:0,widthPt:n,heightPt:a}},cursor:{xPt:0,yPt:0},availableBounds:{xPt:0,yPt:0,widthPt:n,heightPt:a}},services:g,compatibility:`word`,oversizedRowPolicy:`atomic`,page:{physicalPageIndex:e.location.pageIndex,displayPageNumber:y.displayPageNumber??e.location.pageIndex+1,occurrenceId:`${o.input.id}:upright-page:${e.location.pageIndex}`},floatingTableFrames:{page:{xPt:0,yPt:0,widthPt:t.pageWidth,heightPt:t.pageHeight},margin:{xPt:t.marginLeft,yPt:t.marginTop,widthPt:Math.max(0,t.pageWidth-t.marginLeft-t.marginRight),heightPt:Math.max(0,t.pageHeight-t.marginTop-t.marginBottom)},column:{xPt:t.marginLeft,yPt:t.marginTop,widthPt:Math.max(0,t.pageWidth-t.marginLeft-t.marginRight),heightPt:Math.max(0,t.pageHeight-t.marginTop-t.marginBottom)}},floatingTableRegistry:Object.freeze({coordinateSpace:`upright-physical-page-points`,flowDomainId:c,entries:Object.freeze([]),nextParagraphId:0}),finalPlacementTranslationPt:{xPt:r,yPt:i},reacquirePageDependentBlock:N});if(!l.fragment||l.nextCursor||l.requiresFreshPage)throw Error(`Upright table final-frame layout must remain atomic`);return Object.freeze({layout:l.fragment,blockExtentPt:n,nextCursor:null,placement:Object.freeze({coordinateSpace:`upright-physical`,xPt:r+l.fragment.flowBounds.xPt,yPt:i+l.fragment.flowBounds.yPt,sectionFlowOwnership:`host-flow`})})}let u=KF(o,s,{availableHeightPt:e.availableBlockExtentPt,freshPageHeightPt:e.freshPageBlockExtentPt,placement:{container:{id:e.location.flowDomainId,kind:`body`,bounds:{xPt:0,yPt:0,widthPt:e.availableInlineExtentPt,heightPt:e.availableBlockExtentPt}},cursor:{xPt:0,yPt:0},availableBounds:{xPt:0,yPt:0,widthPt:e.availableInlineExtentPt,heightPt:e.availableBlockExtentPt}},services:g,compatibility:`word`,page:{physicalPageIndex:e.location.pageIndex,displayPageNumber:e.location.pageIndex+1,occurrenceId:`${o.input.id}:body:${e.location.pageIndex}`},floatingTableFrames:{page:{xPt:0,yPt:0,widthPt:y.pageWidth,heightPt:c},margin:{xPt:y.marginLeft,yPt:y.marginTop,widthPt:Math.max(0,y.pageWidth-y.marginLeft-y.marginRight),heightPt:Math.max(0,c-y.marginTop-y.marginBottom)},column:e.location.availableBounds},floatingTableRegistry:D,finalPlacementTranslationPt:{xPt:e.location.availableBounds.xPt,yPt:e.location.cursorPt.yPt},reacquirePageDependentBlock:N}),d=e.location.availableBounds.xPt+o.layout.flowBounds.xPt,p=d+o.layout.flowBounds.widthPt,m=u.fragment?.advancePt??0,h=zy({inlineStartPt:d,inlineEndPt:p,blockStartPt:e.location.cursorPt.yPt,blockExtentPt:m,blockers:D.entries.map(jy),overlapEpsilonPt:Dy}).blockStartPt;return h>e.location.cursorPt.yPt?Object.freeze({layout:o.layout,blockExtentPt:0,nextCursor:e.cursor??null,retryAtBlockStartPt:h}):!u.fragment||u.requiresFreshPage?Object.freeze({layout:o.layout,blockExtentPt:0,nextCursor:Object.freeze({kind:`table`,cursor:s}),requiresFreshFlowRegion:!0}):Object.freeze({layout:u.fragment,blockExtentPt:u.fragment.advancePt,nextCursor:u.nextCursor?Object.freeze({kind:`table`,cursor:u.nextCursor}):null,...u.floatingTableRegistryDelta?{flowRegistryDelta:Object.freeze({floats:u.floatingTableRegistryDelta})}:{}})},layoutStory:R,layoutNotes(e){let t=[],n=e.container.bounds.yPt,r=e.firstOnPage;for(let i of e.referenceIds){if(!(e.kind===`footnote`?S:P).has(i))continue;let a={story:e.kind,storyInstance:i,path:[]},o=r?6:0,s={...e.container,id:`${e.container.id}:${e.kind}:${i}`,bounds:{...e.container.bounds,yPt:n+o,heightPt:Math.max(0,e.container.bounds.yPt+e.container.bounds.heightPt-n-o)}},c;try{c=R({source:a,pageIndex:e.pageIndex,section:e.section,container:s})}catch(t){throw t instanceof qj&&t.containerId===s.id?new zE(e.kind,e.pageIndex,e.container.id):t}let l=Object.freeze(r?[Object.freeze({edge:`top`,from:Object.freeze({xPt:e.container.bounds.xPt,yPt:n+o/2}),to:Object.freeze({xPt:e.container.bounds.xPt+e.container.bounds.widthPt/3,yPt:n+o/2}),color:`#000000`,widthPt:.5,authoredStyle:`single`,style:`solid`})]:[]),u=o+c.advancePt,d=Object.freeze({xPt:e.container.bounds.xPt,yPt:n,widthPt:e.container.bounds.widthPt,heightPt:u}),f=Object.freeze({kind:`note`,id:`${e.kind}:${i}:page:${e.pageIndex}`,source:a,flowDomainId:e.container.id,ordinaryFlow:!0,flowBounds:d,inkBounds:Object.freeze({xPt:Math.min(d.xPt,c.inkBounds.xPt),yPt:Math.min(d.yPt,c.inkBounds.yPt),widthPt:Math.max(d.xPt+d.widthPt,c.inkBounds.xPt+c.inkBounds.widthPt)-Math.min(d.xPt,c.inkBounds.xPt),heightPt:Math.max(d.yPt+d.heightPt,c.inkBounds.yPt+c.inkBounds.heightPt)-Math.min(d.yPt,c.inkBounds.yPt)}),clipBounds:e.container.bounds,advancePt:u,separator:l,story:c});t.push(f),n+=u,r=!1}return Object.freeze(t)},measureFollowingBlock(e){let t={...y,floats:[...y.floats],retainedTablesBySourceIndex:new Map(y.retainedTablesBySourceIndex)};if(k(t,e.location),e.input.kind===`adjacent-table-group`){let n=e.input.tables.map(n=>{let r=i(n.source);if(r.type!==`table`)throw Error(`Following table source kind mismatch`);let a=n.source.path[0];return f(t,r,e.availableInlineExtentPt,a),TN(t,a).acquisition}),a=iF(r(xF(e.input.logicalSequenceId,n.map(e=>e.input))),{container:{id:e.location.flowDomainId,kind:`body`,bounds:e.location.availableBounds},cursor:e.location.cursorPt,availableBounds:e.location.availableBounds},g).layout;return Object.freeze({fullExtentPt:a.advancePt,leadContentExtentPt:a.rows[0]?.advancePt??a.advancePt,fullFootnoteReferenceIds:Mj(a),leadFootnoteReferenceIds:Mj({...a,rows:a.rows.slice(0,1)})})}let n=i(e.input.source);if(e.input.kind===`paragraph`){if(n.type!==`paragraph`)throw Error(`Following paragraph source kind mismatch`);let{layout:r}=u(t,n,e.input.source,e.location,e.availableInlineExtentPt,!1,void 0,O.entries),i=r.lines[0];return Object.freeze({fullExtentPt:r.advancePt,leadContentExtentPt:i?i.bounds.yPt+i.advancePt-r.flowBounds.yPt:r.advancePt,fullFootnoteReferenceIds:Mj(r),leadFootnoteReferenceIds:i?jj([i]):[]})}if(n.type!==`table`)throw Error(`Following table source kind mismatch`);let a=e.input.source.path[0];f(t,n,e.availableInlineExtentPt,a);let o=TN(t,a).acquisition.layout;return Object.freeze({fullExtentPt:o.advancePt,leadContentExtentPt:o.rows[0]?.advancePt??o.advancePt,fullFootnoteReferenceIds:Mj(o),leadFootnoteReferenceIds:Mj({...o,rows:o.rows.slice(0,1)})})},prescanPageAnchors(e){let t=e.location.section.geometry,n=NC(t.marginTop),r=NC(t.marginBottom),a=Object.freeze({page:Object.freeze({xPt:0,yPt:0,widthPt:t.pageWidth,heightPt:t.pageHeight}),margin:Object.freeze({xPt:t.marginLeft,yPt:n,widthPt:Math.max(0,t.pageWidth-t.marginLeft-t.marginRight),heightPt:Math.max(0,t.pageHeight-n-r)}),column:Object.freeze({xPt:e.location.availableBounds.xPt,yPt:n,widthPt:e.availableInlineExtentPt,heightPt:Math.max(0,t.pageHeight-n-r)}),paragraph:null,line:null,character:null,pageParity:e.location.pageIndex%2==0?`odd`:`even`}),s=new Set,c=e=>`${e.story}:${e.storyInstance}:${e.path.join(`.`)}`,l=new Map,u=e=>{let t=c(e);return l.has(t)||l.set(t,D.nextParagraphId+l.size),l.get(t)},d=e.anchors.flatMap(t=>{let n=i(t.paragraphSource);if(n.type!==`paragraph`)throw Error(`Page-anchor prescan source kind mismatch`);let r=n,c=r.runs.filter(e=>e.type===`anchorHost`&&e.anchorOccurrenceId===t.occurrenceId),l=r.runs.map((e,t)=>({run:e,runIndex:t})).filter(e=>(e.run.type===`image`||e.run.type===`chart`||e.run.type===`shape`||e.run.type===`unavailableDrawing`)&&e.run.anchorAcquisitionInput?.occurrenceId===t.occurrenceId).sort((e,t)=>(e.run.anchorAcquisitionInput.group?.sourceIndex??0)-(t.run.anchorAcquisitionInput.group?.sourceIndex??0)||e.runIndex-t.runIndex);if(c.length!==1||l.length===0){let r=n.runs.find((e,n)=>o(t.paragraphSource,n)?.occurrenceId===t.occurrenceId);if(r){if((r.type===`image`||r.type===`chart`||r.type===`shape`)&&r.wrapMode===`none`)return[];let i={...y,floats:[...y.floats],pageAnchorPrescanned:new Set(y.pageAnchorPrescanned)};k(i,e.location);let a=j(n,t.paragraphSource,i,new Set([t.occurrenceId]),u(t.paragraphSource));if(a.length!==1)throw Error(`Public page-anchor prescan occurrence mismatch: ${t.occurrenceId}`);return s.add(n),a}throw Error(`Page-anchor prescan occurrence acquisition mismatch: ${t.occurrenceId}`)}let d=gk({acquisition:l[0].run.anchorAcquisitionInput,frames:a});if(d.status!==`resolved`)throw Error(`Page-anchor prescan could not resolve occurrence: ${t.occurrenceId}`);let f=fN(e.location.section.textDirection)?(()=>{let t=nv(e.location.section.textDirection);return LA(d,uv(t,cv({widthPt:a.page.widthPt,heightPt:a.page.heightPt},t)))})():d,p=f.geometry.wrapBounds;if(p===null||f.geometry.wrap.kind===`none`)return[];let m=f.geometry.wrap.polygon?.points??Object.freeze([Object.freeze({xPt:p.xPt,yPt:p.yPt}),Object.freeze({xPt:p.xPt+p.widthPt,yPt:p.yPt}),Object.freeze({xPt:p.xPt+p.widthPt,yPt:p.yPt+p.heightPt}),Object.freeze({xPt:p.xPt,yPt:p.yPt+p.heightPt})]);return[Object.freeze({kind:`shape`,occurrenceId:t.occurrenceId,paragraphId:u(t.paragraphSource),bounds:f.geometry.objectFrame,exclusionBounds:p,wrap:f.geometry.wrap.kind,wrapSide:f.geometry.wrap.side,wrapDistances:f.geometry.wrap.distances,wrapPolygon:Object.freeze([...m])})]});return s.forEach(e=>y.pageAnchorPrescanned?.add(e)),d.length===0?null:Object.freeze({floats:Object.freeze({coordinateSpace:`logical-page-points`,flowDomainId:D.flowDomainId,baseEntries:D.entries,baseNextParagraphId:D.nextParagraphId,nextParagraphId:D.nextParagraphId+d.length,entries:Object.freeze(d)})})},measureLineNumberGlyph(n){let r=t.font;try{let r=e.fonts.defaultBodyFontSizePt,i=xx(!1,!1,r,null,{});t.font=i;let a=t.measureText(n);return Object.freeze({widthPt:a.width,ascentPt:a.fontBoundingBoxAscent??a.actualBoundingBoxAscent??r*.8,descentPt:a.fontBoundingBoxDescent??a.actualBoundingBoxDescent??r*.2,font:i})}finally{t.font=r}},resetPageAcquisition(e){y.floats=[],y.floatParaSeq=0,y.pageAnchorPrescanned=new Set,D=Object.freeze({coordinateSpace:`logical-page-points`,flowDomainId:w(e.pageIndex),entries:Object.freeze([]),nextParagraphId:0}),O=QF(w(e.pageIndex),`logical-page-points`),A(e)},moveAcquisitionCursor:A,flowRegistrySnapshot(){return Object.freeze({floats:D,drawingCollisions:O})},commitFlowRegistryDelta(e){if(!e.floats&&!e.drawingCollisions)throw Error(`Body flow registry delta must update at least one registry`);e.floats&&iN(e.floats,{coordinateSpace:D.coordinateSpace,flowDomainId:D.flowDomainId,entries:D.entries,nextParagraphId:D.nextParagraphId}),e.drawingCollisions&&eI(O,e.drawingCollisions);let t=e.drawingCollisions?tI(O,e.drawingCollisions):O,n=(e.floats?.entries??[]).map(e=>{let t=e.wrapDistances?.leftPt??e.bounds.xPt-e.exclusionBounds.xPt,n=e.wrapDistances?.topPt??e.bounds.yPt-e.exclusionBounds.yPt,r=e.wrapDistances?.rightPt??e.exclusionBounds.xPt+e.exclusionBounds.widthPt-e.bounds.xPt-e.bounds.widthPt,i=e.wrapDistances?.bottomPt??e.exclusionBounds.yPt+e.exclusionBounds.heightPt-e.bounds.yPt-e.bounds.heightPt,a={mode:e.wrap===`topAndBottom`?`topAndBottom`:`square`,...e.kind===`shape`?{anchorOccurrenceId:e.occurrenceId,acquisitionOccurrenceId:e.occurrenceId}:{},...e.wrap?{authoredWrap:e.wrap,wrapPolygon:e.wrapPolygon}:{},imageKey:e.exclusionId??(e.kind===`table`?`body:float:${e.paragraphId}`:``),imageX:e.bounds.xPt,imageY:e.bounds.yPt,imageW:e.bounds.widthPt,imageH:e.bounds.heightPt,xLeft:e.exclusionBounds.xPt,xRight:e.exclusionBounds.xPt+e.exclusionBounds.widthPt,yTop:e.exclusionBounds.yPt,yBottom:e.exclusionBounds.yPt+e.exclusionBounds.heightPt,side:e.wrapSide??`bothSides`,distLeft:t,distRight:r,distTop:n,distBottom:i,paraId:e.paragraphId};return e.kind===`table`?{...a,kind:`table`,tableOverlap:e.overlap}:{...a,kind:e.kind}});e.floats&&(y.floats.push(...n),D=Object.freeze({...D,entries:Object.freeze([...D.entries,...e.floats.entries]),nextParagraphId:e.floats.nextParagraphId}),y.floatParaSeq=e.floats.nextParagraphId),O=t}};return Object.freeze(z)}})}function d(e,t){return vN(t,CN(t,e))}function f(e,t,n,r){let i=e.retainedTablesBySourceIndex.get(r),a=p(t,n,e),o=e.retainedTableAcquisition,s=uF(t,a,n,e,[r],o),c=i?.contentWidthPt===n?Object.freeze({...s,layout:Object.freeze({...s.layout,columnWidthsPt:i.acquisition.layout.columnWidthsPt})}):s;e.retainedTablesBySourceIndex.set(r,Object.freeze({sourceIndex:r,acquisition:c,contentWidthPt:n,anchorYPt:e.y}));let l=c.layout.rows.map(e=>e.advancePt);return{colWidthsPt:a,rowContentHeightsPt:l,rowHeightsPt:l}}function p(e,t,n){let r=n.acquisitionInputs.tableFormatInput(e),i=Number.isFinite(e.tblInd)?e.tblInd??0:0,a=r.rows.map(e=>{let t=e.exception;return t?.indentAuthored?t.indentPt??0:i}),o=n.storyContext?.story,s=n.storyContext?.containers.length===0&&(o===`header`||o===`footer`||o===`body`&&n.sectionLayout?.columns.length===1),c=r.ordinaryFlow&&s&&!fN(n.sectionLayout.textDirection)&&[i,...a].some(e=>e<0),l=r.rows.length===0?[{justification:e.jc,indentPt:i}]:r.rows.map((t,n)=>({justification:t.justification??e.jc,indentPt:a[n]??i})),u=e.bidiVisual===!0,d=Math.min(n.pageWidth,...l.map(({justification:e,indentPt:r})=>{let i=e===`right`||e===`end`,a=e===`center`?`center`:(u?!i:i)?`right`:`left`,o=u?-r:r;if(a===`left`){let e=n.contentX+o;return n.pageWidth-e}if(a===`right`)return n.contentX+t+o;let s=n.contentX+t/2+o;return 2*Math.min(s,n.pageWidth-s)})),f=c?Math.max(t,d):t,p=(r.firstRowException?.layout===`fixed`?`fixed`:e.layout)===`fixed`&&n.storyContext?.containers.some(e=>e.kind===`tableCell`),m=(e,r=n.acquisitionInputs.tableFormatInput(e))=>{let i=new WeakMap;return e.rows.forEach((t,n)=>t.cells.forEach((t,a)=>{let o=r.rows[n]?.cells[a]?.marginsPt;i.set(t,o??A(t,e))})),r=>WS(r,i.get(r)??A(r,e),{paragraph:e=>{let r=CC(n.layoutSettings,n.sectionLayout,n.storyContext??yN,e),i=e.numbering?n.acquisitionInputs.numberingMarkerShapeInput(e.numbering,wx(e)):void 0,a=BS(r,{numbering:e.numbering,...i?{markerInput:i}:{},authoredFirstIndentPt:e.indentFirst,tabStops:e.tabStops,defaultTabPt:n.defaultTabPt,service:n.layoutServices?.text,clusterGeometry:!1}),o=a.numberingMarkerGeometry??(e.numbering&&i&&n.layoutServices?.text?US(e.numbering,i,{authoredFirstIndentPt:e.indentFirst,physicalIndentLeftPt:a.physicalIndentLeftPt,tabStops:e.tabStops,defaultTabPt:n.defaultTabPt},n.layoutServices.text,!1):void 0);return XS(e,a,t,{context:n.ctx,fontFamilyClasses:n.fontFamilyClasses},_N(n),o)},nestedTable:e=>nP(n.acquisitionInputs.tableColumnLayoutInput(e,t,m(e),t))})};return[...sP(n.acquisitionInputs.tableColumnLayoutInput(e,t,m(e,r),p?null:n.acquisitionInputs.tableParticipatesInOrdinaryFlow(e)?f:Math.max(t,n.pageWidth)))]}function m(e,t,n){let r=e.indexOf(t);for(let t=r+1;t<e.length;t++){let r=e[t];if(r.type!==`paragraph`)continue;let i=r;if(!i.framePr)return $x(i,1,d(i,n),SN(n,i).hasRuby,n.docEastAsian,n.ctx,n.fontFamilyClasses,i.lineSpacing,n.resolvedLocalFonts,n.layoutServices?.text,n.acquisitionInputs.paragraphMarkShapeInput(i),n.layoutSettings.compat.useFeLayout)}let i=t;return $x(i,1,d(i,n),SN(n,i).hasRuby,n.docEastAsian,n.ctx,n.fontFamilyClasses,i.lineSpacing,n.resolvedLocalFonts,n.layoutServices?.text,n.acquisitionInputs.paragraphMarkShapeInput(i),n.layoutSettings.compat.useFeLayout)}function h(e,t,n,r,i){let a={context:n.ctx,fontFamilyClasses:n.fontFamilyClasses},o=_N(n),s=t.members.map(dC),c=HM(t.framePr.hAnchor,n),l={contentXPt:n.contentX,contentWidthPt:n.contentW,pageHeightPt:n.pageH,yPt:n.y,anchorLineHeightPt:r},u=fj(t,{contexts:t.members.map(e=>SN(n,e)),inputs:t.members,borderEdges:s,borderExtentsPt:t.members.map((e,t)=>s[t]?.bottom===`none`?0:ZS(e.borders)),measurer:a,environment:o,containerShading:n.containerShading,maximumWidthPt:Math.max(0,c.right-c.left),acquisitionSession:n,placementSignature:[l.contentXPt,l.contentWidthPt,l.pageHeightPt,l.yPt,l.anchorLineHeightPt,n.pageWidth,n.marginLeft,n.marginRight,n.marginTop,n.marginBottom].join(`|`),place:(e,r)=>{let i=qM(t.framePr,n,l.yPt,e,r,l.anchorLineHeightPt);return Object.freeze({bounds:Object.freeze({xPt:i.x,yPt:i.y,widthPt:i.w,heightPt:i.h}),exclusionBounds:Object.freeze({xPt:i.exLeft,yPt:i.exTop,widthPt:i.exRight-i.exLeft,heightPt:i.exBottom-i.exTop})})},anchorFrames:bN(n)});i?.(u);let d={x:u.box.bounds.xPt,y:u.box.bounds.yPt,w:u.box.bounds.widthPt,h:u.box.bounds.heightPt,exLeft:u.box.exclusionBounds.xPt,exTop:u.box.exclusionBounds.yPt,exRight:u.box.exclusionBounds.xPt+u.box.exclusionBounds.widthPt,exBottom:u.box.exclusionBounds.yPt+u.box.exclusionBounds.heightPt,registerExclusion:!0,exclusionId:u.box.exclusionId};return e===t.owner?d:{...d,registerExclusion:!1}}function g(e,t,n){if(t.verticalPhys){let n=g(e,C(t),t.contentX);return yI(n.x,n.y,n.w,n.h,t.verticalPhys.physicalPageWidthPt)}let r=e.widthPt,i=e.heightPt,a=e.anchorXPt,o=e.anchorYPt,s=e.groupWidthPt??null,c=e.groupHeightPt??null;if(e.widthPct!=null){let n=sN(e.widthRelativeFrom,!1,t),i=(n.end-n.start)*e.widthPct;if(e.groupWidthPt!=null&&e.groupWidthPt>0){let t=i/e.groupWidthPt;r=e.widthPt*t,a=e.anchorXPt*t}else r=i;s=i}if(e.heightPct!=null){let r=cN(e.heightRelativeFrom,!1,n,t),a=(r.end-r.start)*e.heightPct;if(e.groupHeightPt!=null&&e.groupHeightPt>0){let t=a/e.groupHeightPt;i=e.heightPt*t,o=e.anchorYPt*t}else i=a;c=a}return{x:lN(e.anchorXAlign,e.anchorXFromMargin,a,r,t,e.anchorXRelativeFrom,e.pctPosH,s),y:uN(e.anchorYAlign,e.anchorYFromPara,o,i,n,t,e.anchorYRelativeFrom,e.pctPosV,c),w:r,h:i}}let _=(e,t,n)=>w(e,t,n),v=(e,t,n)=>g(e,t,n),y=e=>hN(e),b=e=>mN(e),x=(e,t,n)=>E(e,t,n);function S(e){let t=e.verticalPhys;return t?{...e,pageWidth:t.pageWidth,marginLeft:t.marginLeft,marginRight:t.marginRight,marginTop:t.marginTop,marginBottom:t.marginBottom,pageH:t.pageHeight}:e}function C(e){let t=e.verticalPhys;return t?{...S(e),contentX:t.marginLeft,contentW:t.pageWidth-t.marginLeft-t.marginRight,verticalCJK:!1,verticalAllRotated:!1,verticalPhys:void 0,floats:[]}:e}function w(e,t,n){let r=e.widthPt,i=e.heightPt,a=e.distLeft??0,o=e.distRight??0,s=e.distTop??0,c=e.distBottom??0;if(t.verticalPhys){let n=S(t),l=yI(lN(e.anchorXAlign,e.anchorXFromMargin??!1,e.anchorXPt??0,r,n,e.anchorXRelativeFrom??null,null,null),uN(e.anchorYAlign,e.anchorYFromPara??!1,e.anchorYPt??0,i,t.contentX,n,e.anchorYRelativeFrom??null,null,null),r,i,t.verticalPhys.physicalPageWidthPt);return{x:l.x,y:l.y,w:l.w,h:l.h,dl:s,dr:c,dt:o,db:a}}return{x:lN(e.anchorXAlign,e.anchorXFromMargin??!1,e.anchorXPt??0,r,t,e.anchorXRelativeFrom??null,null,null),y:uN(e.anchorYAlign,e.anchorYFromPara??!1,e.anchorYPt??0,i,n,t,e.anchorYRelativeFrom??null,null,null),w:r,h:i,dl:a,dr:o,dt:s,db:c}}function T(e,t,n){let r=t.floatParaSeq++,i=t.pageAnchorPrescanned?.has(e)??!1;for(let a of e.runs)if(a.type===`image`){let e=a;if(i&&rI(e))continue;D(e,t,n,r)}else if(a.type===`chart`){let e=a;if(i&&rI(e))continue;O(e,t,n,r)}else if(a.type===`shape`){let e=a;if(i&&rI(e))continue;k(e,t,n,r)}}function E(e,t,n){n.pageAnchorPrescanned||=new Set;for(let r=t;r<e.length;r++){let t=e[r];if(!t)continue;if(t.type===`pageBreak`)break;if(t.type===`sectionBreak`){let e=t;if(e.kind&&e.kind!==`continuous`)break;continue}if(t.type!==`paragraph`)continue;let i=t;if(n.pageAnchorPrescanned.has(i))continue;let a=!1;for(let e of i.runs)if(e.type===`image`){if(rI(e)){a=!0;break}}else if(e.type===`chart`){if(rI(e)){a=!0;break}}else if(e.type===`shape`&&rI(e)){a=!0;break}if(!a)continue;let o=n.floatParaSeq++;for(let e of i.runs)if(e.type===`image`){let t=e;if(!rI(t))continue;D(t,n,0,o)}else if(e.type===`chart`){let t=e;if(!rI(t))continue;O(t,n,0,o)}else if(e.type===`shape`){let t=e;if(!rI(t))continue;k(t,n,0,o)}n.pageAnchorPrescanned.add(i)}}function D(e,t,n,r){if(!e.anchor||!Jy(e.wrapMode))return;let i=e.wrapMode===`topAndBottom`?`topAndBottom`:`square`,a=w(e,t,n),{w:o,h:s,dl:l,dr:u,dt:d,db:f}=a,p=e.allowOverlap??!0,m=c(e.imagePath,e.colorReplaceFrom,e.duotone);JM(t,{x:a.x,y:a.y,w:o,h:s,dl:l,dr:u,dt:d,db:f,kind:`shape`,mode:i,side:e.wrapSide??`bothSides`,imageKey:m,paraId:r,avoidOverlap:!0,allowOverlap:p})}function O(e,t,n,r){if(!e.anchor||!Jy(e.wrapMode))return;let i=w(e,t,n),{w:a,h:o,dl:s,dr:c,dt:l,db:u}=i;a<=0||o<=0||JM(t,{x:i.x,y:i.y,w:a,h:o,dl:s,dr:c,dt:l,db:u,kind:`shape`,mode:e.wrapMode===`topAndBottom`?`topAndBottom`:`square`,side:e.wrapSide??`bothSides`,allowOverlap:e.allowOverlap??!0,avoidOverlap:!0,paraId:r,imageKey:``})}function k(e,t,n,r){if(!Jy(e.wrapMode))return;let{x:i,y:a,w:o,h:s}=g(e,t,n);if(o<=0||s<=0)return;let c=e.wrapMode===`topAndBottom`?`topAndBottom`:`square`,l=e.distLeft??0,u=e.distRight??0,d=e.distTop??0,f=e.distBottom??0,p=!!t.verticalPhys;JM(t,{x:i,y:a,w:o,h:s,dl:p?d:l,dr:p?f:u,dt:p?u:d,db:p?l:f,kind:`shape`,mode:c,side:e.wrapSide??`bothSides`,imageKey:``,paraId:r,avoidOverlap:!0,allowOverlap:!0})}function A(e,t){return{top:e.marginTop??t.cellMarginTop,bottom:e.marginBottom??t.cellMarginBottom,left:e.marginLeft??t.cellMarginLeft,right:e.marginRight??t.cellMarginRight}}let j=u(e,t,n);return Object.freeze({kernel:j,internals:Object.freeze({resolveColumnWidths:p,resolveAnchorBox:_,resolveShapeBox:v,physicalLayoutSection:y,verticalLayoutSection:b,preRegisterPageFloats:x})})}function*xI(e){e.textPath&&(yield{text:e.textPath.string,fontFamilies:[e.textPath.fontFamily],bold:e.textPath.bold,italic:e.textPath.italic});for(let t of e.textBlocks??[])yield*SI(t)}function*SI(e){if(e.numbering&&(yield{text:e.numbering.text,fontFamilies:[e.numbering.fontFamily,e.numbering.fontFamilyEastAsia],bold:!1,italic:!1}),e.runs?.length)for(let t of e.runs)yield{text:t.text,fontFamilies:[t.fontFamily,t.fontFamilyEastAsia,e.fontFamily],bold:t.bold??e.bold,italic:t.italic??e.italic};else yield{text:e.text,fontFamilies:[e.fontFamily],bold:e.bold,italic:e.italic}}function*CI(e){if(e.type===`text`){let t=e;yield{text:e.text,fontFamilies:[e.fontFamily,t.fontFamilyHighAnsi,e.fontFamilyEastAsia],bold:e.bold,italic:e.italic},yield{text:e.text,fontFamilies:[e.fontFamilyCs],bold:e.boldCs??!1,italic:e.italicCs??!1}}else if(e.type===`field`){let t=e;yield{text:t.fallbackText,fontFamilies:[t.fontFamily,t.fontFamilyHighAnsi,t.fontFamilyEastAsia],bold:t.bold,italic:t.italic},yield{text:t.fallbackText,fontFamilies:[t.fontFamilyCs],bold:t.boldCs??!1,italic:t.italicCs??!1}}else e.type===`shape`?yield*xI(e):e.type===`anchorHost`&&(yield{text:``,fontFamilies:[e.fontFamily,e.fontFamilyEastAsia],bold:e.bold,italic:e.italic})}function*wI(e){yield{text:``,fontFamilies:[e.defaultFontFamily,e.defaultFontFamilyEastAsia]},e.numbering&&(yield{text:e.numbering.text,fontFamilies:[e.numbering.fontFamily,e.numbering.fontFamilyEastAsia]});for(let t of e.runs)yield*CI(t)}function*TI(e){for(let t of e.rows)for(let e of t.cells)yield*DI(e.content)}function*EI(e){if(e)for(let t of[e.default,e.first,e.even])t&&(yield*DI(t.body))}function*DI(e){for(let t of e)t.type===`paragraph`?yield*wI(t):t.type===`table`?yield*TI(t):t.type===`sectionBreak`&&(yield*EI(t.headers),yield*EI(t.footers))}function*OI(e){yield*DI(e.body??[]),yield*EI(e.headers),yield*EI(e.footers);for(let t of[...e.footnotes??[],...e.endnotes??[]])yield*DI(t.content)}function kI(e){let t=new Set;for(let n of OI(e))for(let e of n.fontFamilies){let n=e?.trim();n&&t.add(n)}return[...t]}const AI={...U,...re};function*jI(e){for(let t of OI(e))yield t.text}function MI(e){let t=ne(e.majorFont)??ne(e.minorFont)??null;return[e.majorFont,e.minorFont,...ae(jI(e),t)]}function NI(e){return e.trim().toLocaleLowerCase(`en-US`)}function PI(e){return e==null||!Number.isFinite(e)?400:Math.min(900,Math.max(100,Math.round(e/100)*100))}function FI(e){return Object.freeze({...e,diagnostics:Object.freeze([...e.diagnostics])})}function II(e){return`"${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"`}function LI(e,t){return`${II(e)}, ${t}`}function RI(e,t={}){let n={embedded:0,local:1,google:2,substitute:3},r=e.filter(e=>e.requestedFamily.trim()&&e.resolvedFamily.trim()).map(e=>Object.freeze({...e,weight:PI(e.weight),style:e.style??`normal`})).sort((e,t)=>NI(e.requestedFamily).localeCompare(NI(t.requestedFamily))||n[e.source]-n[t.source]||e.resolvedFamily.localeCompare(t.resolvedFamily)||e.weight-t.weight||e.style.localeCompare(t.style)),i=new Map;for(let e of r){let t=NI(e.requestedFamily);i.set(t,[...i.get(t)??[],e])}let a=Object.freeze(Object.fromEntries(Object.entries(t.nativeFamilyLists??{}).filter(([e,t])=>e.trim()&&t.trim()).map(([e,t])=>[NI(e),t]).sort(([e],[t])=>e.localeCompare(t)))),o=xg(`fonts`,{faces:r,nativeFamilyLists:a});return Object.freeze({fingerprint:o,resolve(e){let t=e.requestedFamily?.trim()||e.genericFamily||`sans-serif`,n=PI(e.weight),r=e.style??`normal`,o=(i.get(NI(t))??[]).find(e=>e.weight===n&&e.style===r);if(o){let i=o.source===`substitute`?[{code:`UNSUPPORTED_FEATURE`,severity:`warning`,message:`ECMA-376 §17.8.2 implementation-dependent font substitution: ${t} resolved to ${o.resolvedFamily}`}]:[],a=LI(o.resolvedFamily,e.genericFamily??`sans-serif`);return FI({requestedFamily:t,resolvedFamily:o.resolvedFamily,route:te(a,`registered`),source:o.source,weight:n,style:r,diagnostics:i,genericFamily:e.genericFamily??`sans-serif`})}let s=e.genericFamily??`sans-serif`,c=e.requestedFamily?.trim();return FI(c?{requestedFamily:t,resolvedFamily:c,route:te(a[NI(c)]??LI(c,s),`native`),source:`native`,weight:n,style:r,diagnostics:[],genericFamily:s}:{requestedFamily:t,resolvedFamily:s,route:te(s,`generic`),source:`generic`,weight:n,style:r,diagnostics:[],genericFamily:s})}})}function zI(e,t){let n=Tv(t.localMetrics),r=Object.freeze(Object.fromEntries(Object.entries(e.fontFamilyCharsets).map(([e,t])=>[e.trim().toLowerCase(),t]))),i=e=>e.trim().replace(/^(['"])(.*)\1$/,`$2`),a=e=>i(e).toLocaleLowerCase(`en-US`),o=e=>{let t=e.style.trim().toLocaleLowerCase(`en-US`);return t===`normal`||t===`italic`?t:null},s=e=>{let t=e.weight.trim().toLocaleLowerCase(`en-US`);if(t===`normal`)return 400;if(t===`bold`)return 700;if(!/^\d+$/.test(t))return null;let n=Number(t);return n>=100&&n<=900?n:null},c=e=>e.flatMap(e=>{if(e.status!==`loaded`)return[];let t=s(e),n=o(e);return t==null||n==null?[]:[{family:a(e.family),displayFamily:i(e.family),weight:t,style:n}]}),l=new Map(c(t.embeddedFaces??[]).map(e=>[`${e.family}:${e.weight}:${e.style}`,e])),u=e.fonts.embeddedFonts.flatMap(e=>{let t=e.style===`bold`||e.style===`boldItalic`?700:400,n=e.style===`italic`||e.style===`boldItalic`?`italic`:`normal`,r=l.get(`${a(e.fontName)}:${t}:${n}`);return r?[{requestedFamily:e.fontName,resolvedFamily:r.displayFamily,source:`embedded`,weight:t,style:n}]:[]});for(let[e,t]of Object.entries(n))u.push({requestedFamily:t.requestedFamily??e,resolvedFamily:t.family,source:`local`,weight:t.weight??400,style:t.style??`normal`});if(t.useGoogleFonts){let n=c(t.googleFaces??[]),r=new Set;for(let t of e.fonts.preloadNames){if(!t)continue;let e=t.toLocaleLowerCase(`en-US`);if(r.has(e))continue;r.add(e);let i=AI[e],o=i?.loadFamily??t;if(i)for(let e of n.filter(e=>e.family===a(o)))u.push({requestedFamily:t,resolvedFamily:e.displayFamily,source:a(o)===a(t)?`google`:`substitute`,weight:e.weight,style:e.style})}}let d=t.measureContext,f=[...new Set([...Object.keys(e.fonts.familyClasses),...Object.keys(e.fonts.familyPitches),...e.fonts.renderedFamilies,...e.fonts.majorFamily?[e.fonts.majorFamily]:[],...e.fonts.minorFamily?[e.fonts.minorFamily]:[]])],p=Av({fonts:RI(u,{nativeFamilyLists:Object.fromEntries(f.map(t=>[t,bx(t,e.fonts.familyClasses,e.fonts.familyPitches)]))}),localMetrics:n,eastAsiaFontCharsets:r,genericFamilies:Object.fromEntries(f.map(t=>[t,Cv(t,e.fonts.familyClasses,e.fonts.familyPitches)])),measurer:{fingerprint:d?`canvas-text-metrics-v1`:`deterministic-text-metrics-v1`,measure(e){if(!d)return{advancePt:[...e.text].length*e.fontSizePt*.5,ascentPt:e.fontSizePt*.8,descentPt:e.fontSizePt*.2};let t=d.font,n=d.letterSpacing,r=d.fontKerning;try{d.font=W(e.fontRoute,e.fontSizePt,e.weight,e.style),d.letterSpacing=`${e.letterSpacingPt}px`,e.kerning!=null&&(d.fontKerning=e.kerning?`normal`:`none`);let t=d.measureText(e.text),n=Number.isFinite(t.actualBoundingBoxLeft)&&Number.isFinite(t.actualBoundingBoxRight),r={xMinPt:n?-t.actualBoundingBoxLeft:0,xMaxPt:n?t.actualBoundingBoxRight:t.width,ascentPt:t.actualBoundingBoxAscent,descentPt:t.actualBoundingBoxDescent};return{advancePt:t.width,ascentPt:t.fontBoundingBoxAscent??t.actualBoundingBoxAscent??0,descentPt:t.fontBoundingBoxDescent??t.actualBoundingBoxDescent??0,...Object.values(r).every(Number.isFinite)?{inkBounds:r,...n?{horizontalInkBoundsAreTight:!0}:{}}:{}}}finally{d.font=t,d.letterSpacing=n,e.kerning!=null&&(d.fontKerning=r)}}}}),m=t.mathResources??e.mathOccurrences.map(({display:e,source:t})=>({resourceKey:Tg(t,e?`display`:`inline`),widthEm:0,ascentEm:0,descentEm:0,available:!1,diagnostics:[{code:`UNSUPPORTED_FEATURE`,severity:`warning`,message:`The optional math renderer is unavailable; using the deterministic text fallback`}]})),h=e.imageMetadata,g=Object.freeze({text:p,images:qg(h),math:Jg(m),verticalGlyphFingerprint:t.verticalGlyphMeasurement.fingerprint}),_=e.mathOccurrences.map(({source:e,display:t})=>Tg(e,t?`display`:`inline`)),v=m.map(e=>e.resourceKey),y=_.filter(e=>!v.includes(e)),b=v.filter(e=>!_.includes(e));if(y.length||b.length)throw Error(`Math metadata membership mismatch: missing [${y.join(`, `)}]; extra [${b.join(`, `)}]`);return p_(g,t.mathDrawables??new Map,m.filter(e=>e.available!==!1).map(e=>e.resourceKey)),S_(g,e.paintResources),l_(g,t.verticalGlyphMeasurement),g}function BI(e,t){if(e===null)return null;let n=e.trim(),r=t&&n.endsWith(`%`)?n.slice(0,-1):n;if(r.length===0)return null;let i=Number(r);return Number.isFinite(i)?i:null}function VI(e){return e.value?.trim().endsWith(`%`)?`pct`:e.kind??`dxa`}function HI(e){if(!e)return null;let t=e.value?.trim()??``,n=VI(e);if(n===`dxa`){let t=BI(e.value??`0`,!1);return t===null?null:{kind:`dxa`,value:t/20}}if(n!==`pct`)return null;let r=BI(e.value??`0`,!0);return r===null?null:{kind:`pct`,value:t.endsWith(`%`)?r/100:r/5e3}}function UI(e){let t=HI(e);return t?.kind===`dxa`?t.value:null}function WI(e){return e.widthPt==null?e.widthPct==null?null:{kind:`pct`,value:e.widthPct/5e3}:{kind:`dxa`,value:e.widthPt}}function GI(e,t){let n=e.format.firstRowException?.preferredWidth??null;if(e.format.firstRowException?.preferredWidthAuthored)return n?.kind===`dxa`?n.value>0?n.value:null:n?.kind===`pct`&&n.value>0?n.value*t:null;let r=HI(e.lexical.table?.preferredWidth);return r?.kind===`dxa`?r.value>0?r.value:null:r?.kind===`pct`?r.value>0?r.value*t:null:e.semantic.widthPt!=null&&e.semantic.widthPt>0?e.semantic.widthPt:e.semantic.widthPct!=null&&e.semantic.widthPct>0?e.semantic.widthPct/5e3*t:null}const KI=Object.freeze({pt:`1/1`,in:`72/1`,cm:`3600/127`,mm:`360/127`,pc:`12/1`,pi:`12/1`});function qI(e){let t=e.replace(/[\u0009\u000a\u000d\u0020]+/g,` `).replace(/^ | $/g,``),n=/^([+-]?)([0-9]+)$/.exec(t);if(!n)return null;let[,r,i]=n;if(r===`-`&&/[1-9]/.test(i))return null;let a=i.replace(/^0+/,``)||`0`;return a.length>20||a.length===20&&a>`18446744073709551615`?null:t}const JI={key:`0/1`,widthPt:0};function YI(e){let t=FN(e);return Number.isFinite(t)?{key:e,widthPt:t}:JI}function XI(e,t){let n=Number(e);if(!Number.isFinite(n))return JI;let r=MN(n),i=r===null?0:FN(LN(r,t));return Number.isFinite(i)?{key:null,widthPt:i}:JI}function ZI(e){if(e==null)return JI;let t=qI(e);if(t!==null){let e=jN(t);return e===null?JI:YI(zN(e,20n))}let n=/^([0-9]+(?:\.[0-9]+)?)(mm|cm|in|pt|pc|pi)$/.exec(e);if(!n)return JI;let r=KI[n[2]],i=jN(n[1]);return i===null?XI(n[1],r):YI(LN(i,r))}function QI(e){let t=e.lexical.table?.grid;if(!t){let t=e.semantic.colWidths.map(e=>Number.isFinite(e)&&e>=0?{widthPt:e,key:MN(e)??`0/1`}:JI);return{widthsPt:t.map(e=>e.widthPt),widthKeys:t.map(e=>e.key)}}let n=Math.max(t.requiredColumnCount,t.columns.length),r=Array.from({length:n},(e,n)=>ZI(t.columns[n]?.width??null));return{widthsPt:r.map(e=>e.widthPt),widthKeys:r.map(e=>e.key)}}function $I(e,t){let n=HI(e);return n?.kind===`pct`?{kind:`dxa`,value:Math.max(0,n.value)*Math.max(0,t)}:n}function eL(e,t,n,r=t){let i=e.semantic,{widthsPt:a,widthKeys:o}=QI(e),s=e.format.firstRowException?.layout===`fixed`?`fixed`:e.lexical.table?.layout?.kind??i.layout,c=e.lexical.table?.grid.authored?e.lexical.table.grid.columns.length:null,l=i.rows.map(e=>{let t=Math.max(0,e.gridBefore??0);return c!==null&&t>c?0:t}),u=Math.max(c??0,e.lexical.table?.grid.requiredColumnCount??0,...i.rows.map((e,t)=>(l[t]??0)+e.cells.reduce((e,t)=>e+Math.max(1,t.colSpan),0)));return{layout:s===`fixed`?`fixed`:`autofit`,availableWidthPt:r===null?null:Math.max(0,r),gridWidthsPt:a,gridWidthKeys:o,tablePreferredWidthPt:GI(e,t),rows:i.rows.map((r,i)=>{let o=e.lexical.rows[i],d=l[i]??0,f=Math.max(0,r.gridAfter??0),p=d+r.cells.reduce((e,t)=>e+Math.max(1,t.colSpan),0),m=c!==null&&p+f>u?0:f,h=d;return{before:d>0?{columnSpan:d,preferredWidth:$I(o?.row?.beforeWidth,t)}:null,after:m>0?{columnSpan:m,preferredWidth:$I(o?.row?.afterWidth,t)}:null,cells:r.cells.map((t,r)=>{let c=o?.cells[r]??null,l=Math.max(1,t.colSpan),u=s===`fixed`?{minWidthPt:0,maxWidthPt:0}:n(i,r),d=HN(e.format.rows[i]?.cellSpacingPt??0,h,l,a.length),f=d.startPt+d.endPt,p={columnStart:h,columnSpan:l,preferredWidth:HI(c?.preferredWidth)??WI(t),minContentWidthPt:Math.max(0,u.minWidthPt)+f,maxContentWidthPt:Math.max(u.minWidthPt,u.maxWidthPt)+f};return h+=l,p})}})}}const tL=new WeakSet;function nL(e){return typeof e==`object`&&!!e&&tL.has(e)}function rL(e,t,n){let r=Object.keys(e).sort(),i=[...t].sort();if(r.length!==i.length||r.some((e,t)=>e!==i[t]))throw TypeError(`${n} has unexpected fields: ${r.join(`,`)}`)}function iL(e,t,n){let r=[...t].filter(t=>!e.has(t)),i=[...e].filter(e=>!t.has(e));if(r.length!==0||i.length!==0)throw TypeError(`${n} membership mismatch; missing=${r.join(`,`)} extra=${i.join(`,`)}`)}function aL(e,t){let n=e=>{e&&t.storyRoot(e)},r=e=>{if(e.story!==`body`||e.storyInstance!==`body`||e.path.length!==1||t.body[e.path[0]]===void 0)throw TypeError(`Unknown body layout occurrence source: ${Sg(e)}`)},i=e=>{for(let t of[e.headers.default,e.headers.first,e.headers.even,e.footers.default,e.footers.first,e.footers.even])n(t)};if(e.source.story!==`body`||e.source.storyInstance!==`body`||e.source.path.length!==0)throw TypeError(`Body layout input requires the canonical body root`);i(e.initialSection);for(let n of e.sequence)if(r(n.kind===`body-block`?n.block.source:n.source),n.kind===`body-block`){if(t.resolve(n.block.source).type!==n.block.kind)throw TypeError(`Body layout block source kind mismatch`)}else if(n.kind===`adjacent-table-group`){for(let e of n.tables)if(t.resolve(e.source).type!==`table`)throw TypeError(`Adjacent table source kind mismatch`)}else n.kind===`begin-section`&&i(n.section)}function oL(e,t,n,r,i){let a=new Set,o=new Map,s=new Set,c=new Set,l=new Map,u=(e,t=`image`)=>{if(a.has(e))throw TypeError(`Duplicate canonical image resource: ${e}`);a.add(e),o.set(e,t)};for(let n of t.paragraphs){let t=e.resolve(n.source);if(t.type===`paragraph`){if(n.publicAnchorBridges.length!==t.runs.length)throw TypeError(`Paragraph anchor bridge cardinality mismatch: ${Sg(n.source)}`);t.numbering?.picBulletImagePath&&u(wg(n.source,t.numbering.picBulletImagePath),`picture-bullet`),t.runs.forEach((e,t)=>{let r={...n.source,path:[...n.source.path,t]};if(e.type===`image`&&u(wg(r,e.imagePath)),e.type===`chart`){if(s.has(e.resourceKey))throw TypeError(`Duplicate canonical chart resource: ${e.resourceKey}`);s.add(e.resourceKey)}if(e.type===`math`){if(c.has(e.resourceKey))throw TypeError(`Duplicate canonical math resource: ${e.resourceKey}`);c.add(e.resourceKey),l.set(e.resourceKey,Sg(e.source))}if(e.type===`shape`&&e.textBoxInput?.kind===`compatibility`)for(let t of e.textBoxInput.paragraphs)t.image&&u(wg({...t.source,path:[...t.source.path,0]},t.image.imagePath));e.type===`shape`&&e.fill?.fillType===`image`&&u(wg(r,e.fill.imagePath))})}}let d=new Set(r.map(e=>e.resourceKey));if(d.size!==r.length)throw TypeError(`Duplicate image metadata resource`);iL(d,a,`Image metadata`);let f=new Set;for(let e of n){if(f.has(e.resourceKey))throw TypeError(`Duplicate math occurrence resource`);if(f.add(e.resourceKey),l.get(e.resourceKey)!==Sg(e.source))throw TypeError(`Math occurrence source mismatch: ${e.resourceKey}`)}iL(f,c,`Math occurrence`);let p=new Set,m=new Set,h=new Set,g=new Set;for(let e of i){if(p.has(e.resourceKey))throw TypeError(`Duplicate paint resource descriptor`);if(p.add(e.resourceKey),e.kind===`image`||e.kind===`picture-bullet`){if(m.add(e.resourceKey),o.get(e.resourceKey)!==e.kind)throw TypeError(`Image paint resource kind mismatch: ${e.resourceKey}`)}else e.kind===`chart`?h.add(e.resourceKey):g.add(e.resourceKey)}iL(p,new Set([...a,...s,...c]),`Paint resource`),iL(m,a,`Image paint resource`),iL(h,s,`Chart paint resource`),iL(g,c,`Math paint resource`)}function sL(e,t){let n=uL(e.blockRepository);aL(t,n),jg(e.acquisitionFacts,`layout source acquisition facts`),jg(e.section,`layout source section`),jg(e.documentLayoutFacts,`layout source document facts`),jg(e.fonts,`layout source font facts`),jg(e.fontFamilyCharsets,`layout source font charsets`),jg(e.mathOccurrences,`layout source math facts`),jg(e.imageMetadata,`layout source image facts`),jg(e.paintDescriptors,`layout source paint descriptors`),e.fatalParse&&jg(e.fatalParse,`layout source fatal parse fact`);for(let[t,r]of[[`block repository`,n],[`body blocks`,n.body],[`footnotes`,n.footnotes],[`endnotes`,n.endnotes],[`acquisition facts`,e.acquisitionFacts],[`paragraph facts`,e.acquisitionFacts.paragraphs],[`table facts`,e.acquisitionFacts.tables],[`section`,e.section],[`document facts`,e.documentLayoutFacts],[`font facts`,e.fonts],[`math facts`,e.mathOccurrences],[`image facts`,e.imageMetadata],[`paint descriptors`,e.paintDescriptors]])if(!Object.isFrozen(r))throw TypeError(`Layout source ${t} must be sealed`);let r=new Map;for(let t of e.acquisitionFacts.paragraphs){rL(t,[`source`,`publicAnchorBridges`,`numberingMarkerFallbackFontSizePt`],`Paragraph acquisition fact`);let e=Sg(t.source);if(r.has(e))throw TypeError(`Duplicate paragraph acquisition source: ${e}`);r.set(e,t)}let i=new Set,a=new WeakMap;for(let t of e.acquisitionFacts.tables){rL(t,[`source`,`input`],`Table acquisition fact`);let e=Sg(t.source);if(i.has(e))throw TypeError(`Duplicate table acquisition source: ${e}`);i.add(e);let r=n.resolve(t.source);if(r.type!==`table`)throw TypeError(`Table acquisition fact must identify a table`);a.set(r,t)}for(let e of n.sources){let t=n.resolve(e),a=Sg(e);if(t.type===`paragraph`&&!r.has(a))throw TypeError(`Missing paragraph acquisition source: ${a}`);if(t.type===`table`&&!i.has(a))throw TypeError(`Missing table acquisition source: ${a}`)}oL(n,e.acquisitionFacts,e.mathOccurrences,e.imageMetadata,e.paintDescriptors);let o=new WeakMap;for(let t of e.acquisitionFacts.paragraphs){let e=n.resolve(t.source);if(e.type!==`paragraph`)throw TypeError(`Paragraph acquisition fact must identify a paragraph`);for(let t of e.runs){if(t.type!==`shape`||t.textBoxInput?.kind!==`complete`)continue;let e;try{e=n.storyRoot(t.textBoxInput.source)}catch(e){throw TypeError(`Missing complete text-box story source: ${Sg(t.textBoxInput.source)}`,{cause:e})}if(e.length!==t.textBoxInput.blockCount)throw TypeError(`Complete text-box block count mismatch: ${Sg(t.textBoxInput.source)}`)}if(e.numbering&&e.numberingMarkerShapeInput&&t.numberingMarkerFallbackFontSizePt!==null){let n=o.get(e.numbering);n||(n=new Map,o.set(e.numbering,n)),n.set(t.numberingMarkerFallbackFontSizePt,e.numberingMarkerShapeInput)}}let s=Object.freeze({numberingMarkerShapeInput(e,t){let n=o.get(e)?.get(t);if(n)return n;throw Error(`Unknown numbering marker acquisition input`)},paragraphMarkShapeInput(e){return e.paragraphMarkShapeInput},tableFormatInput(e){let t=a.get(e);if(!t)throw Error(`Unknown table acquisition input`);return t.input.format},tableColumnLayoutInput(e,t,n,r){let i=a.get(e);if(!i)throw Error(`Unknown table acquisition input`);return eL(i.input,t,(t,r)=>n(e.rows[t].cells[r]),r)},tableParticipatesInOrdinaryFlow(e){let t=a.get(e);if(!t)throw Error(`Unknown table acquisition input`);return t.input.format.ordinaryFlow},paragraphAcquisitionInput(e,t){if(!r.get(Sg(t)))throw Error(`Unknown paragraph acquisition source: ${Sg(t)}`);let i=n.resolve(t);if(i.type!==`paragraph`)throw Error(`Paragraph source kind mismatch: ${Sg(t)}`);return i}}),c=Object.freeze({acquisitionInputs:s,effectiveTablePositioning(e){let t=a.get(e);if(!t)throw Error(`Unknown table acquisition input`);return t.input.format.positioning===null?null:e.tblpPr??null},publicAnchorBridge(e,t){let n=r.get(Sg(e));if(!n)throw Error(`Unknown paragraph acquisition source: ${Sg(e)}`);if(!Number.isSafeInteger(t)||t<0||t>=n.publicAnchorBridges.length)throw RangeError(`Unknown paragraph anchor bridge index: ${t}`);return n.publicAnchorBridges[t]??null}}),l=e=>{let t=new Set(e),n=Object.create(null);return Object.defineProperties(n,{size:{get:()=>t.size},has:{value:e=>t.has(e)},entries:{value:()=>t.entries()},keys:{value:()=>t.keys()},values:{value:()=>t.values()},forEach:{value:(e,r)=>{t.forEach(t=>e.call(r,t,t,n))}},[Symbol.iterator]:{value:()=>t[Symbol.iterator]()},[Symbol.toStringTag]:{value:`Set`}}),Object.freeze(n)},u=Object.freeze({...e.documentLayoutFacts,kinsoku:Object.freeze({enabled:e.documentLayoutFacts.kinsoku.enabled,lineStartForbidden:l(e.documentLayoutFacts.kinsoku.lineStartForbidden),lineEndForbidden:l(e.documentLayoutFacts.kinsoku.lineEndForbidden)})}),d=Object.freeze({blocks:n,bodyLayoutInput:t,section:e.section,documentLayoutSettings:u,fonts:e.fonts,fontFamilyCharsets:e.fontFamilyCharsets,mathOccurrences:e.mathOccurrences,imageMetadata:e.imageMetadata,hasPaginationFields:e.hasPaginationFields,requiresDomVerticalGlyphLayout:e.requiresDomVerticalGlyphLayout,fatalParse:e.fatalParse,acquisition:c,paintResources:Vg(e.paintDescriptors)});return tL.add(d),d}function cL(e){let{bodyLayoutInput:t,...n}=e;return sL(n,jg(t,`layout source body input`))}function lL(e){return`${e.story}:${e.storyInstance}`}function uL(e){jg(e.body,`layout source body blocks`),jg(e.stories,`layout source story blocks`),jg(e.footnotes,`layout source footnotes`),jg(e.endnotes,`layout source endnotes`);let t=new Map;for(let{source:n,body:r}of e.stories){if(n.path.length!==0)throw TypeError(`Story repository roots require an empty source path`);if(n.story!==`header`&&n.story!==`footer`&&n.story!==`textbox`)throw TypeError(`Unsupported repository story kind: ${n.story}`);let e=lL(n);if(t.has(e))throw TypeError(`Duplicate story source: ${e}`);t.set(e,r)}let n=(e,t)=>{let n=new Map;for(let r of e){if(n.has(r.id))throw TypeError(`Duplicate ${t} story source: ${r.id}`);n.set(r.id,r.content)}return n},r=n(e.footnotes,`footnote`),i=n(e.endnotes,`endnote`),a=n=>{if(n.path.length!==0)throw Error(`Story lookup requires a root-only source`);if(n.story===`body`&&n.storyInstance===`body`)return e.body;if(n.story===`footnote`){let e=r.get(n.storyInstance);if(e)return e}if(n.story===`endnote`){let e=i.get(n.storyInstance);if(e)return e}let a=t.get(lL(n));if(a)return a;throw Error(`Unknown ${n.story} story source: ${n.storyInstance}`)},o=new Map,s=[],c=(e,t,n=[])=>{e.forEach((e,r)=>{let i=[...n,r];if(e.type!==`paragraph`&&e.type!==`table`)return;let a={...t,path:i},l=Sg(a);if(o.has(l))throw TypeError(`Duplicate block source: ${l}`);o.set(l,e),s.push(Object.freeze({...a,path:Object.freeze([...i])})),e.type===`table`&&e.rows.forEach((e,n)=>e.cells.forEach((e,r)=>{c(e.content,t,[...i,n,r])}))})};c(e.body,{story:`body`,storyInstance:`body`,path:[]});for(let{source:t,body:n}of e.stories)c(n,t);for(let t of e.footnotes)c(t.content,{story:`footnote`,storyInstance:t.id,path:[]});for(let t of e.endnotes)c(t.content,{story:`endnote`,storyInstance:t.id,path:[]});return Object.freeze({body:e.body,footnotes:e.footnotes,endnotes:e.endnotes,sources:Object.freeze(s),resolve(e){let t=o.get(Sg(e));if(!t)throw Error(`Unknown block source: ${Sg(e)}`);return t},storyRoot:a})}function dL(e){let t=new Set((e.embeddedFonts??[]).map(e=>{let t=e.style===`bold`||e.style===`boldItalic`?700:400,n=e.style===`italic`||e.style===`boldItalic`?`italic`:`normal`;return`${sg(e.fontName)}:${t}:${n}`})),n=[],r=new Set,i=e=>{let i=e?.trim();if(!i)return;let a=sg(i);if(!(a===`meiryo`||i===`メイリオ`))return;let o=`${a}:400:normal`;t.has(o)||r.has(o)||(r.add(o),n.push({family:i,localNames:[`Meiryo`],lineHeightMultiplier:1.3}))};for(let t of OI(e))if(!(t.bold||t.italic))for(let e of t.fontFamilies)i(e);return n}function fL(e){return dg(dL(e))}function pL(e){let t=e.__typographyAcquisition;if(t!==void 0)return Ag({sourceText:`text`in e?e.text:e.fallbackText,...t},`DOCX run typography acquisition input`)}function mL(e){let t=e.__paragraphTypographyAcquisition;if(t!==void 0)return Ag(t,`DOCX paragraph typography acquisition input`)}function hL(e,t){let n=t[0].logicalTotalRows,r=0;for(let i of t){if(i.logicalTotalRows!==n||!Number.isInteger(i.rowCount)||i.rowCount<0||i.logicalRowOffset!==r)throw Error(`Parser-owned adjacent table sequence ${e} is inconsistent`);r+=i.rowCount}if(r!==n)throw Error(`Parser-owned adjacent table sequence ${e} is incomplete`)}function gL(e){let t=[],n=null,r=[],i=()=>{r.length>0&&hL(n,r),r.length===1?t.push(Object.freeze({kind:`body-element`,element:r[0].element})):r.length>1&&t.push(Object.freeze({kind:`adjacent-table-group`,logicalSequenceId:n,tables:Object.freeze(r.map(e=>e.element))})),n=null,r=[]};for(let{element:a,table:o}of e){if(a.type===`table`&&o!==null){r.length>0&&n!==o.logicalSequenceId&&i(),n=o.logicalSequenceId,r.push(Object.freeze({element:a,logicalRowOffset:o.logicalRowOffset,logicalTotalRows:o.logicalTotalRows,rowCount:o.rowCount}));continue}i(),t.push(Object.freeze({kind:`body-element`,element:a}))}return i(),Object.freeze(t)}function _L(e){switch(e){case`continuous`:case`nextColumn`:case`nextPage`:case`oddPage`:case`evenPage`:return e;default:return`nextPage`}}function vL(e,t,n){let r=n===null?null:`section:${n}`,i=n=>e[n]===null?null:{story:t,storyInstance:r===null?n:`${r}:${n}`,path:[]};return Object.freeze({default:i(`default`),first:i(`first`),even:i(`even`)})}function yL(e){return{...e.geometry,titlePage:e.titlePage,evenAndOddHeaders:!1,sectionStart:e.startType,columns:e.columns,textDirection:e.textDirection,docGridType:e.docGridType,docGridLinePitch:e.docGridLinePitch,docGridCharSpace:e.docGridCharSpace,pageNumType:e.pageNumType,vAlign:e.vAlign,lineNumbering:e.lineNumbering}}function bL(e,t){let n=e.markerBodyIndex;return Object.freeze({sectionOccurrenceId:e.sectionOccurrenceId,source:Object.freeze(n===null?{story:`body`,storyInstance:`body`,path:Object.freeze([])}:{story:`body`,storyInstance:`body`,path:Object.freeze([n])}),startType:_L(e.startType),context:Object.freeze(VC(yL(e),e.sectionBidi)),pageNumbering:Object.freeze({start:e.pageNumType?.start??null,format:e.pageNumType?.fmt??null}),titlePage:e.titlePage,evenAndOddHeaders:t.evenAndOddHeaders,headers:vL(e.headers,`header`,n),footers:vL(e.footers,`footer`,n),pageBordersAuthored:e.pageBordersAuthored,pageBorders:e.pageBorders,pageLayout:Object.freeze({physicalGeometry:Object.freeze({...e.geometry}),columns:e.columns,textDirection:e.textDirection??`lrTb`,gutterPt:e.gutterPt,rtlGutter:e.rtlGutter,...t.pageLayoutSettings})})}function xL(e){let t=new Map(e.sectionIndex.occurrences.map(t=>[t.sectionOccurrenceId,bL(t,e)])),n=e.sectionIndex.occurrences[0];if(!n)throw Error(`DOCX body requires a final section owner`);let r=t.get(n.sectionOccurrenceId),i=e.sequence.map(e=>{if(e.kind!==`begin-section`)return e;let n=t.get(e.section.sectionOccurrenceId);if(!n)throw Error(`Missing body section owner: ${e.section.sectionOccurrenceId}`);return Object.freeze({...e,section:n})});return Ag({source:{story:`body`,storyInstance:`body`,path:[]},initialSection:r,sequence:i.map((e,t)=>{if(e.kind!==`body-block`||e.block.kind!==`paragraph`)return e;let n=WD(i,t);return n===void 0?e:Object.freeze({...e,block:Object.freeze({...e.block,continuousSectionRole:n})})}),parserDiagnostics:e.parserDiagnostics??[],endnoteIds:e.endnoteIds??[],noteLayoutSettings:e.noteLayoutSettings},`DOCX body layout input`)}function SL(e){return!(e.runs??[]).some(e=>e.type===`text`?e.text.length>0:!0)}const CL=new WeakMap;function wL(e){return CL.get(e)??[]}function TL(e){let t=wL(e);if(t.length===0)return e.runs;let n=[],r=0;for(let i=0;i<=e.runs.length;i+=1){for(;t[r]?.publicRunIndex===i;)n.push(t[r].run),r+=1;i<e.runs.length&&n.push(e.runs[i])}return n}function EL(e){return wL(e).length>0}function DL(e){let t=e.__documentTypographySettings?.normalStyleFontSizePt;return Ag({normalStyleFontSizePt:typeof t==`number`&&Number.isFinite(t)&&t>0?t:10},`DOCX document typography settings input`)}function OL(e){let t=e.__pageLayoutSettings;return Ag({mirrorMargins:t?.mirrorMargins===!0,gutterAtTop:t?.gutterAtTop===!0,bookFoldPrinting:t?.bookFoldPrinting===!0,bookFoldRevPrinting:t?.bookFoldRevPrinting===!0,printTwoOnOne:t?.printTwoOnOne===!0},`DOCX page layout settings input`)}function kL(e){let t=e.__noteLayoutSettings;return Ag({footnotePosition:t?.footnotePosition??`pageBottom`,endnotePosition:t?.endnotePosition??`docEnd`},`DOCX note layout settings input`)}function AL(e){return Object.freeze(e?Object.fromEntries(Object.entries(e).filter(e=>typeof e[1]==`number`)):{})}function jL(e){return Object.freeze({...e,pageGeometry:AL(e.pageGeometry)})}const ML=new WeakMap,NL=new WeakMap,PL=new WeakMap,FL=new WeakMap,IL=new WeakMap;function LL(e){let t=PL.get(e);if(t)return t;let n=Ag({table:e.__tableLayout??null,rows:e.rows.map(e=>({row:e.__tableRowLayout??null,cells:e.cells.map(e=>e.__tableCellLayout??null)}))},`DOCX table acquisition input`);return PL.set(e,n),n}const RL=e=>e!=null&&Number.isFinite(e)?e:null;function zL(e){return Ag({colWidths:(e.colWidths??[]).map(e=>Number.isFinite(e)&&e>=0?e:0),layout:e.layout??null,widthPt:RL(e.widthPt),widthPct:RL(e.widthPct),rows:e.rows.map(e=>({gridBefore:RL(e.gridBefore)??0,gridAfter:RL(e.gridAfter)??0,cells:e.cells.map(e=>({colSpan:RL(e.colSpan)??1,widthPt:RL(e.widthPt),widthPct:RL(e.widthPct)}))}))},`DOCX table column semantic input`)}function BL(e){let t=IL.get(e);if(t)return t;let n=kg({semantic:zL(e),lexical:LL(e),format:$L(e)});return IL.set(e,n),n}function VL(e){return BL(e).format.ordinaryFlow}function HL(e){return BL(e).format.positioning===null?null:e.tblpPr??null}function UL(e){return{leftFromTextPt:e.leftFromText,rightFromTextPt:e.rightFromText,topFromTextPt:e.topFromText,bottomFromTextPt:e.bottomFromText,horzAnchor:e.horzAnchor,horzSpecified:e.horzSpecified,vertAnchor:e.vertAnchor,xPt:e.tblpX,yPt:e.tblpY,...e.tblpXSpec==null?{}:{xAlign:e.tblpXSpec},...e.tblpYSpec==null?{}:{yAlign:e.tblpYSpec}}}function WL(e,t){if(e===null)return null;let n=e.trim(),r=t&&n.endsWith(`%`)?n.slice(0,-1):n;if(r.length===0)return null;let i=Number(r);return Number.isFinite(i)?i:null}function GL(e){let t=WL(e??null,!1);return t===null?null:t/20}function KL(e){return e===`exact`||e===`atLeast`?e:`auto`}function qL(e){return{rule:bP(KL(e.rule),e.ruleAuthored),valuePt:GL(e.value)}}function JL(e){if(e.rowHeight===null||!Number.isFinite(e.rowHeight))return null;let t=KL(e.rowHeightRule);return{rule:t===`auto`?`atLeast`:t,valuePt:e.rowHeight}}function YL(...e){for(let t of e){if(!t)continue;let e=xP(VI(t),UI(t));if(e!==null)return e}return null}function XL(e,t,n){if(!e)return null;let r=VI(e);return SP({kind:r,dxaValuePt:r===`dxa`?GL(e.value??`0`):null,scope:t,edge:n})}function ZL(e,t,n,r,i,a,o){let s=e.bidiVisual===!0,c=(e,t)=>{let n=t===`left`?s?`end`:`start`:s?`start`:`end`;return{width:e?.[t]??e?.[n],edge:n}},l=(e,...t)=>{for(let n of t){let t=XL(n.width,n.scope,n.edge??e);if(t!==null)return t}return null},u=c(r,`left`),d=c(i,`left`),f=c(a,`left`),p=c(o,`left`),m=c(r,`right`),h=c(i,`right`),g=c(a,`right`),_=c(o,`right`),v=e=>!n&&e!=null&&Number.isFinite(e)?e:null;return{top:l(`top`,{width:r?.top,scope:`cell`})??v(t.marginTop)??l(`top`,{width:i?.top,scope:`exception`},{width:a?.top,scope:`table`},{width:o?.top,scope:`style`})??e.cellMarginTop,bottom:l(`bottom`,{width:r?.bottom,scope:`cell`})??v(t.marginBottom)??l(`bottom`,{width:i?.bottom,scope:`exception`},{width:a?.bottom,scope:`table`},{width:o?.bottom,scope:`style`})??e.cellMarginBottom,left:l(u.edge,{...u,scope:`cell`})??v(t.marginLeft)??l(d.edge,{...d,scope:`exception`},{...f,scope:`table`},{...p,scope:`style`})??e.cellMarginLeft,right:l(m.edge,{...m,scope:`cell`})??v(t.marginRight)??l(h.edge,{...h,scope:`exception`},{...g,scope:`table`},{..._,scope:`style`})??e.cellMarginRight}}function QL(e){if(!e)return null;let t=e.indent?VI(e.indent):null;return{preferredWidthAuthored:e.preferredWidth!=null,preferredWidth:HI(e.preferredWidth),layout:e.layout?.kind===`fixed`||e.layout?.kind===`autofit`?e.layout.kind:null,justification:e.justification,indentAuthored:e.indent!=null&&(t===`dxa`||t===`nil`),indentPt:t===`nil`?0:UI(e.indent),borders:e.borders}}function $L(e){let t=FL.get(e);if(t)return t;let n=LL(e),r=n.table?.ordinaryFlow??e.tblpPr==null,i=e.rows.map((t,r)=>{let i=n.rows[r]?.row??null,a=i?.exception??null;return{height:i?.height?qL(i.height):JL(t),cantSplit:t.cantSplit===!0,repeatedHeader:t.isHeader===!0,cellSpacingPt:YL(i?.cellSpacing,a?.cellSpacing,n.table?.cellSpacing,i?.styleCellSpacing)??0,justification:i?.justification??a?.justification??null,exception:QL(a),cells:t.cells.map((t,o)=>({marginsPt:ZL(e,t,n.rows[r]?.cells[o]!==null&&n.rows[r]?.cells[o]!==void 0,n.rows[r]?.cells[o]?.margins,a?.cellMargins,n.table?.cellMargins,i?.styleCellMargins)}))}}),a=Ag({effectiveStyleId:n.table?.effectiveStyleId??null,ordinaryFlow:r,logicalSequenceId:n.table?.logicalSequenceId??null,logicalRowOffset:n.table?.logicalRowOffset??0,logicalTotalRows:n.table?.logicalTotalRows??0,positioning:r||e.tblpPr==null?null:UL(e.tblpPr),rows:i,firstRowException:i[0]?.exception??null},`DOCX table format input`);return FL.set(e,a),a}function eR(e){return Object.freeze(e.map(e=>{if(e.type!==`table`)return Object.freeze({element:e,table:null});let t=$L(e);return t.logicalSequenceId==null?Object.freeze({element:e,table:null}):Object.freeze({element:e,table:Object.freeze({logicalSequenceId:t.logicalSequenceId,logicalRowOffset:t.logicalRowOffset??0,logicalTotalRows:t.logicalTotalRows??0,rowCount:e.rows.length})})}))}const tR=e=>Object.freeze({story:`body`,storyInstance:`body`,path:Object.freeze([e])}),nR=new Set([`paragraph`,`line`,`character`]);function rR(e,t,n){if(e.type!==`shape`&&e.type!==`image`&&e.type!==`chart`||mR(e)!==void 0||!Jy(e.wrapMode)||e.type!==`shape`&&!e.anchor||e.widthPt<=0||e.heightPt<=0)return null;let r=e.anchorXRelativeFrom??(e.anchorXFromMargin?`margin`:`page`),i=e.anchorYRelativeFrom??(e.anchorYFromPara?`paragraph`:`page`),a=`${t.story}:${t.storyInstance}:${t.path.join(`.`)}`;return Object.freeze({occurrenceId:e.type===`shape`?`public-shape:${a}:${n}`:`public-anchor:${a}:${n}`,pageOwned:!nR.has(r)&&!nR.has(i)})}function iR(e,t){let n=new Set([`paragraph`,`line`,`character`]),r=Object.freeze([...new Set(TL(e).flatMap((e,r)=>{let i=e;if(e.type!==`shape`&&e.type!==`image`&&e.type!==`chart`&&i.type!==`unavailableDrawing`)return[];let a=mR(i);if(!a){let e=i.type===`unavailableDrawing`?null:rR(i,t,r);return e?.pageOwned?[e.occurrenceId]:[]}return a.horizontal.relativeFromStatus!==`valid`||a.vertical.relativeFromStatus!==`valid`||a.horizontal.relativeFrom===null||a.vertical.relativeFrom===null||a.wrap.kind===`none`||n.has(a.horizontal.relativeFrom)||n.has(a.vertical.relativeFrom)?[]:[Dg(t,a.occurrenceId)]}))]);return Object.freeze({kind:`paragraph`,source:t,pageBreakBefore:e.pageBreakBefore===!0,keepLines:e.keepLines===!0,keepNext:e.keepNext===!0,widowControl:e.widowControl!==!1,spaceBeforePt:e.spaceBefore??0,spaceAfterPt:e.spaceAfter??0,contextualSpacing:e.contextualSpacing===!0,styleId:e.styleId??null,inkless:!EL(e)&&SL(e),...r.length===0?{}:{pageOwnedAnchorOccurrenceIds:r}})}function aR(e){return Object.freeze({kind:`table`,source:e})}function oR(e,t){let n=0;return Object.freeze(gL(eR(e)).map(e=>{if(e.kind===`adjacent-table-group`){let t=n;return n+=e.tables.length,Object.freeze({kind:`adjacent-table-group`,logicalSequenceId:e.logicalSequenceId,source:tR(t),tables:Object.freeze(e.tables.map((e,n)=>Object.freeze({...aR(tR(t+n)),rowCount:e.rows.length})))})}let r=e.element,i=n,a=tR(i);if(n+=1,r.type===`paragraph`)return r.markVanish===!0&&!EL(r)&&SL(r)?Object.freeze({kind:`consume-source`,source:a,reason:`hidden-paragraph`}):Object.freeze({kind:`body-block`,block:iR(r,a)});if(r.type===`table`)return Object.freeze({kind:`body-block`,block:aR(a)});if(r.type===`pageBreak`||r.type===`columnBreak`)return Object.freeze({kind:`authored-break`,source:a,break:r.type===`pageBreak`?`page`:`column`,...r.type===`pageBreak`&&r.parity!==void 0?{parity:r.parity}:{},...r.type===`pageBreak`&&r.sameParagraphAsPrevious===!0?{sameSourceParagraphAsPrevious:!0}:{}});if(r.type===`sectionBreak`)return Object.freeze({kind:`begin-section`,source:a,section:t(i)});throw Error(`Unsupported body layout source at ${i}`)}))}function sR(e,t,n,r=t){return eL(BL(e),t,(t,r)=>n(e.rows[t].cells[r]),r)}function cR(e,t,n){if(!t||typeof t!=`object`)return;let r=NL.get(e);r||(r=new WeakMap,NL.set(e,r)),r.set(t,n)}function lR(e){let t=new Map,n=0;e.body.forEach((e,r)=>{if(e.type!==`sectionBreak`)return;let i=e.__sectionPlacement;t.set(r,Ag({sectionId:i?.sectionId??`section:${n}`,sectionBidi:i?.sectionBidi===!0,vAlign:i?.vAlign??null,lineNumbering:i?.lineNumbering??null,docGridType:i?.docGridType??null,docGridLinePitch:i?.docGridLinePitch??null,docGridCharSpace:i?.docGridCharSpace??null,gutterPt:i?.gutterPt??null,rtlGutter:i?.rtlGutter??null,pageBordersAuthored:i?.pageBordersAuthored??!1,pageBorders:i?.pageBorders??null,pageGeometry:i?.pageGeometry??e.geom??{}},`DOCX ending-section placement input`)),n+=1});let r=e.section?.__sectionPlacement;return Object.freeze({endingSections:t,finalSection:Ag({sectionId:r?.sectionId??`section:${n}`,sectionBidi:r?.sectionBidi===!0,vAlign:r?.vAlign??e.section?.vAlign??null,lineNumbering:r?.lineNumbering??e.section?.lineNumbering??null,docGridType:r?.docGridType??e.section?.docGridType??null,docGridLinePitch:r?.docGridLinePitch??e.section?.docGridLinePitch??null,docGridCharSpace:r?.docGridCharSpace??e.section?.docGridCharSpace??null,gutterPt:r?.gutterPt??null,rtlGutter:r?.rtlGutter??null,pageBordersAuthored:r?.pageBordersAuthored??e.section?.pageBorders!=null,pageBorders:r?.pageBorders??e.section?.pageBorders??null,pageGeometry:r?.pageGeometry??(e.section?zC(e.section):{})},`DOCX final-section placement input`)})}const uR=Object.freeze({default:null,first:null,even:null});function dR(e){let t=[],n=lR(e),r=0;e.body.forEach((e,i)=>{if(e.type!==`sectionBreak`)return;let a=n.endingSections.get(i)??n.finalSection,o=t.length;t.push({sectionOccurrenceId:a.sectionId,ordinal:o,startBodyIndex:r,endBodyIndex:i,markerBodyIndex:i,final:!1,startType:e.kind??`nextPage`,columns:e.columns??null,authoredGeometry:AL(a.pageGeometry),textDirection:e.textDirection??null,pageNumType:e.pageNumType??null,headers:e.headers??uR,footers:e.footers??uR,titlePage:e.titlePage??!1,sectionBidi:a.sectionBidi,vAlign:a.vAlign,lineNumbering:a.lineNumbering,docGridType:a.docGridType,docGridLinePitch:a.docGridLinePitch,docGridCharSpace:a.docGridCharSpace,authoredGutterPt:a.gutterPt,rtlGutter:a.rtlGutter===!0,pageBordersAuthored:a.pageBordersAuthored,pageBorders:a.pageBorders,placement:jL(a)}),r=i+1});let i=n.finalSection;t.push({sectionOccurrenceId:i.sectionId,ordinal:t.length,startBodyIndex:r,endBodyIndex:e.body.length-1,markerBodyIndex:null,final:!0,startType:e.section.sectionStart??`nextPage`,columns:e.section.columns??null,authoredGeometry:i.pageGeometry==null?zC(e.section):AL(i.pageGeometry),textDirection:e.section.textDirection??null,pageNumType:e.section.pageNumType??null,headers:e.headers??uR,footers:e.footers??uR,titlePage:e.section.titlePage,sectionBidi:i.sectionBidi,vAlign:i.vAlign,lineNumbering:i.lineNumbering,docGridType:i.docGridType,docGridLinePitch:i.docGridLinePitch,docGridCharSpace:i.docGridCharSpace,authoredGutterPt:i.gutterPt,rtlGutter:i.rtlGutter===!0,pageBordersAuthored:i.pageBordersAuthored,pageBorders:i.pageBorders,placement:jL(i)});let a=Array(t.length),o=zC(e.section),s=null,c=null;for(let e=t.length-1;e>=0;--e){let n=t[e],r=n.startType===`continuous`&&s!==null?s:o,i=n.authoredGeometry,l={pageWidth:i.pageWidth??r.pageWidth,pageHeight:i.pageHeight??r.pageHeight,marginTop:i.marginTop??r.marginTop,marginRight:i.marginRight??r.marginRight,marginBottom:i.marginBottom??r.marginBottom,marginLeft:i.marginLeft??r.marginLeft,headerDistance:i.headerDistance??r.headerDistance,footerDistance:i.footerDistance??r.footerDistance},u=n.authoredGutterPt??(n.startType===`continuous`?c:null)??0,{authoredGeometry:d,authoredGutterPt:f,...p}=n;a[e]={...p,geometry:l,gutterPt:u},s=l,c=u}return Ag({bodyLength:e.body.length,occurrences:a},`DOCX body section index input`)}function fR(e){let t=dR(e),n=new Map;for(let e of t.occurrences)e.startBodyIndex!==0&&n.set(e.startBodyIndex-1,e);let r=oR(e.body,e=>{let t=n.get(e);if(!t)throw Error(`Missing incoming body section at ${e}`);return Object.freeze({sectionOccurrenceId:t.sectionOccurrenceId,startType:t.startType})});return Ag({sectionIndex:t,evenAndOddHeaders:e.section.evenAndOddHeaders,endnoteIds:(e.endnotes??[]).map(e=>e.id),noteLayoutSettings:kL(e),pageLayoutSettings:OL(e),parserDiagnostics:tv(e.diagnostics,e.body.length),sequence:r},`DOCX body layout acquisition input`)}function pR(e){let t=e.textPath;if(t)return Ag({string:t.string,...t.fontFamily===void 0?{}:{fontFamily:t.fontFamily},bold:t.bold??!1,italic:t.italic??!1,...t.textPathOk===void 0?{}:{textPathOk:t.textPathOk},...t.on===void 0?{}:{on:t.on},...t.fitShape===void 0?{}:{fitShape:t.fitShape},...t.fitPath===void 0?{}:{fitPath:t.fitPath},...t.trim===void 0?{}:{trim:t.trim},...t.xScale===void 0?{}:{xScale:t.xScale},...t.fontSizePt===void 0?{}:{fontSizePt:t.fontSizePt}},`DOCX VML text path acquisition input`)}function mR(e){let t=e.__anchorAcquisition;if(t!==void 0)return Ag(t,`DOCX anchor acquisition input`)}function hR(e,t){let n=SR(e).fontFacts,r=n?.rtl===!0||n?.cs===!0,i=r?n?.fontSizeCs??n?.fontSize??t:n?.fontSize??t,a=n?.fontFamily??e.fontFamily??null,o={ascii:a,highAnsi:n?.fontFamilyHighAnsi??a,eastAsia:n?.fontFamilyEastAsia??e.fontFamilyEastAsia??a,complexScript:n?.fontFamilyCs??a},s=n?.fontSlots;return Object.freeze({fontSizePt:i,fonts:Object.freeze({...s?.direct??o}),themeFonts:s?.theme?Object.freeze({...s.theme}):void 0,themeFontPresence:s?.themePresent?Object.freeze({...s.themePresent}):void 0,weight:(r?n?.boldCs??!1:n?.bold??!1)?700:400,style:(r?n?.italicCs??!1:n?.italic??!1)?`italic`:`normal`,complexScript:r,fontHint:n?.fontHint,eastAsiaLanguage:n?.langEastAsia,kerning:n?.kerning==null?void 0:i>=n.kerning})}function gR(e,t){let n=e.textBoxContent;return n===void 0?Ag({kind:`compatibility`,source:t,paragraphs:AO(e,t,hR)},`DOCX public text box acquisition input`):Ag({kind:`complete`,source:t,blockCount:n.length},`DOCX complete text box acquisition input`)}function _R(e){let t=CR(e).paragraphMarkFontFacts;if(!t)return;let n=t.rtl===!0||t.cs===!0,r=e.runs.find(e=>e.type===`text`||e.type===`field`)?.fontSize??e.defaultFontSize??10,i=n?t.fontSizeCs??t.fontSize??r:t.fontSize??r,a=t.fontFamily??e.defaultFontFamily??null,o={ascii:a,highAnsi:t.fontFamilyHighAnsi??a,eastAsia:t.fontFamilyEastAsia??e.defaultFontFamilyEastAsia??a,complexScript:t.fontFamilyCs??a};return Object.freeze({fontSizePt:i,fonts:Object.freeze({...t.fontSlots?.direct??o}),themeFonts:t.fontSlots?.theme?Object.freeze({...t.fontSlots.theme}):void 0,themeFontPresence:t.fontSlots?.themePresent?Object.freeze({...t.fontSlots.themePresent}):void 0,weight:(n?t.boldCs??!1:t.bold??!1)?700:400,style:(n?t.italicCs??!1:t.italic??!1)?`italic`:`normal`,complexScript:n,fontHint:t.fontHint,eastAsiaLanguage:t.langEastAsia,kerning:t.kerning==null?void 0:i>=t.kerning})}function vR(e,t){let n=e,{layoutLines:r,lineSlice:i,runs:a,paragraphMarkFontFacts:o,__paragraphTypographyAcquisition:s,__complexFieldBoundaries:c,...l}=e,u=mL(n),d=e.__complexFieldBoundaries?.map(e=>({occurrenceKey:[`complex-field`,t.story,t.storyInstance,t.path.slice(0,-1).join(`.`),String(e.occurrenceId)].join(`:`),boundary:e.boundary,runIndex:e.runIndex,fieldType:e.fieldType,instruction:e.instruction,...e.hyperlinkAnchor===void 0?{}:{hyperlinkAnchor:e.hyperlinkAnchor}})),f=l.numbering,p=f==null?null:(({fontFacts:e,...t})=>t)(f),m=structuredClone({...l,numbering:p}),h=wL(n),g=[];if(h.length===0)n.runs.forEach((e,t)=>{g.push({run:e,originalRun:n.runs[t]})});else{let e=0;for(let t=0;t<=n.runs.length;t+=1){for(;h[e]?.publicRunIndex===t;){let t=h[e].run;g.push({run:t,originalRun:t}),e+=1}t<n.runs.length&&g.push({run:n.runs[t],originalRun:n.runs[t]})}}let _=g.map(({run:e,originalRun:n},r)=>{let i=e;if(i.type===`unavailableDrawing`){let e=mR(n),r=e===void 0?void 0:Ag({...e,occurrenceId:Dg(t,e.occurrenceId)},`DOCX scoped unavailable drawing anchor acquisition input`),{__anchorAcquisition:a,...o}=i;return Object.freeze({...o,...r===void 0?{}:{anchorAcquisitionInput:r}})}if(e.type===`math`){let n=Object.freeze({...t,path:Object.freeze([...t.path,r])}),i=e;return Object.freeze({type:`math`,display:e.display,fontSize:e.fontSize,...e.jc===void 0?{}:{jc:e.jc},source:i.source??n,resourceKey:i.resourceKey??Tg(n,e.display?`display`:`inline`),fallbackText:Cb(e.nodes)})}if(e.type===`anchorHost`){let{__anchorOccurrenceId:n,...r}=e;return Object.freeze({...r,...n===void 0?{}:{anchorOccurrenceId:Dg(t,n)}})}if(e.type===`shape`||e.type===`image`||e.type===`chart`){let i=mR(n),a=i===void 0?void 0:Ag({...i,occurrenceId:Dg(t,i.occurrenceId)},`DOCX scoped anchor acquisition input`),{__anchorAcquisition:o,...s}=e;if(e.type!==`shape`){let n=e.type===`chart`?(({chart:e,...n})=>({...n,resourceKey:Eg({...t,path:[...t.path,r]})}))(s):s;return Object.freeze({...structuredClone(n),...a===void 0?{}:{anchorAcquisitionInput:a}})}let c=n,l=pR(c),u=Object.freeze({...t,path:Object.freeze([...t.path,r])}),d=gR(c,{story:`textbox`,storyInstance:`${u.story}:${u.storyInstance}:${u.path.join(`.`)}`,path:[]}),{textBoxContent:f,textBlocks:p,textPath:m,...h}=s;return Object.freeze({type:`shape`,...structuredClone(h),...l===void 0?{}:{vmlTextPathInput:l},...(d.kind===`complete`?d.blockCount:d.paragraphs.length)===0?{}:{textBoxInput:d},...a===void 0?{}:{anchorAcquisitionInput:a}})}if(e.type===`text`||e.type===`field`){let t=pL(n),{__typographyAcquisition:r,...i}=e;return Object.freeze({...structuredClone(i),...t===void 0?{}:{typographyInput:t}})}return Object.freeze(structuredClone(e))});return kg({...m,runs:_,...d?.length?{complexFieldBoundaries:d}:{},numberingMarkerShapeInput:e.numbering?hR(e.numbering,n.runs.find(e=>e.type===`text`||e.type===`field`)?.fontSize??e.defaultFontSize??10):void 0,paragraphMarkShapeInput:_R(e),...u===void 0?{}:{typographyInput:u}})}function yR(e){return xR(e,!1)}function bR(e){return xR(e,!0)}function xR(e,t){let n=[],r=(e,a,o,s)=>{if(e.type===`paragraph`){let i=!1,c=[],l=[],u=e.runs.some(e=>e.type===`unavailableDrawing`);TL(e).forEach((e,d)=>{if(e.type===`unavailableDrawing`){l.push(Object.freeze({publicRunIndex:c.length,run:Ag(e,`DOCX unavailable drawing parser sidecar`)})),u&&(i=!0);return}if(e.type===`math`){i=!0;let t=Object.freeze({story:a,storyInstance:o,path:Object.freeze([...s,d])}),r=Tg(t,e.display?`display`:`inline`);n.push(Object.freeze({nodes:e.nodes,display:e.display,source:t,resourceKey:r})),c.push(Object.freeze({...e,source:t,resourceKey:r}));return}if(e.type!==`shape`){c.push(e);return}let f=e,p=f.textBoxContent;if(p===void 0){c.push(e);return}let m={story:a,storyInstance:o,path:[...s,d]},h=`${m.story}:${m.storyInstance}:${m.path.join(`.`)}`,g=!1,_=t?p:Array(p.length);if(p.forEach((e,t)=>{if(e.type===`unsupportedTextBoxBlock`){_[t]=e;return}let n=r(e,`textbox`,h,[t]);n!==e&&(g=!0),_[t]=n}),!g){c.push(e);return}i=!0,t?(f.textBoxContent=_,c.push(e)):c.push({...e,textBoxContent:_})});let d=i?t?Object.assign(e,{runs:c}):{...e,runs:c}:e;return l.length>0&&CL.set(d,Object.freeze(l)),d}if(e.type===`table`){if(t)return e.rows.forEach((e,t)=>e.cells.forEach((e,n)=>{e.content=i(e.content,a,o,[...s,t,n])})),e;let n=!1,r=e.rows.map((e,t)=>{let r=!1,c=e.cells.map((e,n)=>{let c=i(e.content,a,o,[...s,t,n]);return c===e.content?e:(r=!0,{...e,content:c})});return r?(n=!0,{...e,cells:c}):e});return n?{...e,rows:r}:e}if(e.type!==`sectionBreak`)return e;let c=s.at(-1)??0,l=!1,u=(e,t)=>{if(!e)return e;let n=e;for(let r of[`default`,`first`,`even`]){let a=e[r];if(!a)continue;let o=i(a.body,t,`section:${c}:${r}`);o!==a.body&&(n===e&&(n={...e}),n[r]={...a,body:o},l=!0)}return n},d=u(e.headers,`header`),f=u(e.footers,`footer`);return l?{...e,headers:d,footers:f}:e},i=(e,n,i,a=[])=>{if(t){for(let t=0;t<e.length;t+=1)e[t]=r(e[t],n,i,[...a,t]);return e}let o=!1,s=e.map((e,t)=>{let s=r(e,n,i,[...a,t]);return s!==e&&(o=!0),s});return o?s:e},a=(e,t)=>{if(!e)return{default:null,first:null,even:null};let n=e;for(let r of[`default`,`first`,`even`]){let a=e[r];if(!a)continue;let o=i(a.body,t,r);o!==a.body&&(n===e&&(n={...e}),n[r]={...a,body:o})}return n},o=i(e.body,`body`,`body`),s=a(e.headers,`header`),c=a(e.footers,`footer`),l=(e,n)=>{if(!e)return e;if(t){for(let t of e)t.content=i(t.content,n,t.id);return e}let r=!1,a=e.map(e=>{let t=i(e.content,n,e.id);return t===e.content?e:(r=!0,{...e,content:t})});return r?a:e},u=l(e.footnotes,`footnote`),d=l(e.endnotes,`endnote`),f=o!==e.body||s!==e.headers||c!==e.footers||u!==e.footnotes||d!==e.endnotes?{...e,body:o,headers:s,footers:c,footnotes:u,endnotes:d}:e,p=lR(f);ML.set(f,p),cR(f.body,f.section,p);let m,h=()=>m??=fR(f),g=ER();return Object.freeze({document:f,mathOccurrences:Object.freeze(n),fontFamilyCharsets:Object.freeze({...wR(f).fontFamilyCharsets??{}}),get bodyLayoutInput(){return xL(h())},bodyModelGateway:Object.freeze({acquisitionInputs:g,get bodySectionIndex(){return h().sectionIndex},effectiveTablePositioning:HL,publicAnchorBridge:rR})})}function SR(e){return e}function CR(e){return e}function wR(e){return e}const TR=Object.freeze({numberingMarkerShapeInput:hR,paragraphMarkShapeInput:_R,tableFormatInput:$L,tableColumnLayoutInput:sR,tableParticipatesInOrdinaryFlow:VL,paragraphAcquisitionInput:vR});function ER(){let e=new WeakMap,t=(t,n)=>{let r=e.get(t);r||(r=new Map,e.set(t,r));let i=Sg(n),a=r.get(i);if(a)return a;let o=vR(t,n);return r.set(i,o),o};return Object.freeze({...TR,paragraphAcquisitionInput:t})}const DR=new Set([`tbRl`,`tbRlV`,`tbLrV`]);function OR(e){let t=[e],n=new Set;for(;t.length>0;){let e=t.pop();if(!(typeof e!=`object`||!e||n.has(e))){if(n.add(e),!Array.isArray(e)){let t=e;if(typeof t.textDirection==`string`&&DR.has(t.textDirection))return!0}t.push(...Object.values(e))}}return!1}const kR=new WeakMap;function AR(e){let t=BC(),n=e.section??{},r=(e,t)=>Number.isFinite(e)?e:t,i=e=>({default:e?.default??null,first:e?.first??null,even:e?.even??null});return{...e,body:e.body??[],section:{...t,...n,pageWidth:r(n.pageWidth,t.pageWidth),pageHeight:r(n.pageHeight,t.pageHeight),marginTop:r(n.marginTop,t.marginTop),marginRight:r(n.marginRight,t.marginRight),marginBottom:r(n.marginBottom,t.marginBottom),marginLeft:r(n.marginLeft,t.marginLeft),headerDistance:r(n.headerDistance,t.headerDistance),footerDistance:r(n.footerDistance,t.footerDistance)},headers:i(e.headers),footers:i(e.footers)}}function jR(e,t,n,r){if(e)for(let i of[`default`,`first`,`even`]){let a=e[i];a&&r(a.body,{story:t,storyInstance:n===null?i:`${n}:${i}`,path:[]})}}function MR(e,t,n,r=()=>{},i=()=>{}){let a=(e,o,s=[])=>{e.forEach((c,l)=>{let u=[...s,l];if(c.type===`paragraph`){let r={...o,path:u},s=t.paragraphAcquisitionInput(c,r),d=n(c,r,s);d&&(e[l]=d);let f=0;s.runs.forEach((e,t)=>{if(e.type===`unavailableDrawing`)return;let n=c.runs[f++];if(e.type!==`shape`||n?.type!==`shape`)return;let r=n.textBoxContent;if(!r)return;let s={story:`textbox`,storyInstance:`${o.story}:${o.storyInstance}:${u.join(`.`)}.${t}`,path:[]};i(r,s),a(r,s)})}else c.type===`table`?(r(c,{...o,path:u}),c.rows.forEach((e,t)=>e.cells.forEach((e,n)=>{a(e.content,o,[...u,t,n])}))):c.type===`sectionBreak`&&(jR(c.headers,`header`,`section:${l}`,a),jR(c.footers,`footer`,`section:${l}`,a))})};a(e.body,{story:`body`,storyInstance:`body`,path:[]}),jR(e.headers,`header`,null,a),jR(e.footers,`footer`,null,a);for(let t of e.footnotes??[])a(t.content,{story:`footnote`,storyInstance:t.id,path:[]});for(let t of e.endnotes??[])a(t.content,{story:`endnote`,storyInstance:t.id,path:[]})}function NR(e){let t=[],n=(e,n)=>{t.push({source:n,body:e})};return jR(e.headers,`header`,null,n),jR(e.footers,`footer`,null,n),e.body.forEach((e,t)=>{e.type===`sectionBreak`&&(jR(e.headers,`header`,`section:${t}`,n),jR(e.footers,`footer`,`section:${t}`,n))}),t}function PR(e){return NR(e).map(({body:e})=>e)}function FR(e){return e??Object.freeze([])}function IR(e,t,n,r=[]){let i=(e,t,r)=>e&&Object.fromEntries([`default`,`first`,`even`].map(i=>{let a=e[i];return[i,a?{...structuredClone(Object.fromEntries(Object.entries(a).filter(([e])=>e!==`body`))),body:IR(a.body,{story:t,storyInstance:`${r}:${i}`,path:[]},n)}:null]}));return e.map((e,a)=>{let o=[...r,a];if(e.type===`paragraph`){let e=n.get(Sg({...t,path:o}));if(!e)throw Error(`Missing canonical paragraph source: ${Sg({...t,path:o})}`);return e}if(e.type===`table`){let r=structuredClone(e),{__tableLayout:i,...a}=r;return{...a,rows:r.rows.map((e,r)=>{let{__tableRowLayout:i,...a}=e;return{...a,cells:e.cells.map((e,i)=>{let{__tableCellLayout:a,...s}=e;return{...s,content:IR(e.content,t,n,[...o,r,i])}})}})}}if(e.type!==`sectionBreak`)return structuredClone(e);let{__sectionPlacement:s,headers:c,footers:l,...u}=e;return{...structuredClone(u),headers:i(e.headers,`header`,`section:${a}`),footers:i(e.footers,`footer`,`section:${a}`)}})}function LR(e){let{__sectionPlacement:t,...n}=e;return structuredClone(n)}function RR(e){let t=e;return delete t.__sectionPlacement,t}function zR(e,t,n){return Object.fromEntries([`default`,`first`,`even`].map(r=>{let i=e[r];return[r,i?{...structuredClone(Object.fromEntries(Object.entries(i).filter(([e])=>e!==`body`))),body:IR(i.body,{story:t,storyInstance:r,path:[]},n)}:null]}))}function BR(e,t,n,r=[]){let i=(e,t,r)=>{if(!e)return e;for(let i of[`default`,`first`,`even`]){let a=e[i];a&&(a.body=BR(a.body,{story:t,storyInstance:`${r}:${i}`,path:[]},n))}return e},a=e;for(let e=0;e<a.length;e+=1){let o=a[e],s=[...r,e];if(o.type===`paragraph`){let r=n.get(Sg({...t,path:s}));if(!r)throw Error(`Missing canonical paragraph source: ${Sg({...t,path:s})}`);a[e]=r;continue}if(o.type===`table`){let r=o;delete r.__tableLayout,r.rows.forEach((e,r)=>{let i=e;delete i.__tableRowLayout,i.cells.forEach((e,i)=>{let a=e;delete a.__tableCellLayout,a.content=BR(a.content,t,n,[...s,r,i])})}),a[e]=r;continue}if(o.type!==`sectionBreak`)continue;let c=o;delete c.__sectionPlacement,c.headers=i(c.headers,`header`,`section:${e}`),c.footers=i(c.footers,`footer`,`section:${e}`)}return a}function VR(e,t,n){for(let r of[`default`,`first`,`even`]){let i=e[r];i&&(i.body=BR(i.body,{story:t,storyInstance:r,path:[]},n))}return e}function HR(e){let t=kR.get(e);if(t)return t;let n=yR(AR(e));return WR(n,n,!1,e)}function UR(e,t){return kR.get(e)||WR(bR(AR(e)),bR(AR(t)),!0,e)}function WR(e,t,n,r){let i=t.document,a=t.bodyModelGateway.acquisitionInputs,o=t.bodyLayoutInput,s=gC(i,DL(i)),c=Gg(i,a,t.mathOccurrences,e=>{let t=e.numbering;if(!t)throw Error(`Picture-bullet metadata requires numbering`);let n=a.numberingMarkerShapeInput(t,wx(e));return{widthPt:t.picBulletWidthPt??n.fontSizePt,heightPt:t.picBulletHeightPt??n.fontSizePt}}),l=FR(i.footnotes),u=FR(i.endnotes),d=Sk(i.body,l,[...PR(i),...u.map(e=>e.content)]),f=OR(i),p=i.parseError===void 0?null:{message:i.parseError,pageSize:{widthPt:i.section.pageWidth,heightPt:i.section.pageHeight}},m={familyClasses:{...i.fontFamilyClasses??{}},familyPitches:{...i.fontFamilyPitches??{}},majorFamily:i.majorFont??null,minorFamily:i.minorFont??null,embeddedFonts:[...i.embeddedFonts??[]],renderedFamilies:kI(i),preloadNames:MI(i),localMetricRequests:dL(i),defaultBodyFontSizePt:gN(i)},h=new Map,g=[],_=[],v=[];MR(i,a,(e,r,i)=>{let a=Sg(r);if(h.has(a))throw Error(`Duplicate paragraph source: ${a}`);h.set(a,i);let o=0,s=i.runs.map((n,i)=>{if(n.type===`unavailableDrawing`)return null;let a=e.runs[o++];return a?t.bodyModelGateway.publicAnchorBridge(a,r,i):null});return g.push(Object.freeze({source:kg({...r,path:[...r.path]}),publicAnchorBridges:Object.freeze(s),numberingMarkerFallbackFontSizePt:e.numbering?wx(e):null})),n?i:void 0},(e,t)=>{_.push(Object.freeze({source:kg({...t,path:[...t.path]}),input:BL(e)}))},(e,t)=>{v.push({body:e,source:t})}),Object.freeze({...a,paragraphAcquisitionInput(e,t){let n=h.get(Sg(t));if(!n)throw Error(`Unknown paragraph acquisition source: ${Sg(t)}`);return n}});let y=n?BR:IR,b=n?VR:zR,x={...i,body:y(i.body,{story:`body`,storyInstance:`body`,path:[]},h),headers:b(i.headers,`header`,h),footers:b(i.footers,`footer`,h),footnotes:l.map(({content:e,...t})=>({...structuredClone(t),content:y(e,{story:`footnote`,storyInstance:t.id,path:[]},h)})),endnotes:u.map(({content:e,...t})=>({...structuredClone(t),content:y(e,{story:`endnote`,storyInstance:t.id,path:[]},h)}))},S=v.map(({source:e,body:t})=>({source:e,body:y(t,e,h)}));kg(h);let C=cL({bodyLayoutInput:o,blockRepository:{body:x.body,stories:[...NR(x).map(({source:e,body:t})=>({source:e,body:t})),...S],footnotes:x.footnotes??[],endnotes:x.endnotes??[]},section:n?RR(i.section):LR(i.section),documentLayoutFacts:kg({...s,kinsoku:{enabled:s.kinsoku.enabled,lineStartForbidden:[...s.kinsoku.lineStartForbidden].sort((e,t)=>e-t),lineEndForbidden:[...s.kinsoku.lineEndForbidden].sort((e,t)=>e-t)}}),fonts:kg(m),fontFamilyCharsets:t.fontFamilyCharsets,acquisitionFacts:Object.freeze({paragraphs:Object.freeze(g),tables:Object.freeze(_)}),mathOccurrences:t.mathOccurrences,imageMetadata:c.imageMetadata,paintDescriptors:c.paintResources.descriptors,hasPaginationFields:d,requiresDomVerticalGlyphLayout:f,fatalParse:p===null?null:kg(p)}),w=Object.freeze({document:e.document,source:C});return kR.set(r,w),kR.set(e.document,w),w}function GR(e){return HR(e).source}function KR(e,t,n){return bI(e,t,n).kernel}function qR(e,t={}){let n=nL(e)?e:GR(e),r=t.measureContext??(()=>{if(typeof document<`u`){let e=document.createElement(`canvas`).getContext(`2d`);if(e!==null)return e}return typeof OffscreenCanvas<`u`?new OffscreenCanvas(1,1).getContext(`2d`):null})(),i=r===null?null:Object.freeze({get font(){return r.font},set font(e){r.font=e},get letterSpacing(){return r.letterSpacing},set letterSpacing(e){r.letterSpacing=e},get fontKerning(){return r.fontKerning},set fontKerning(e){r.fontKerning=e},measureText(e){return r.measureText(e)}}),a=r?.canvas,o=a?.ownerDocument?.defaultView?.HTMLCanvasElement,s=r!==null&&(typeof o==`function`&&a instanceof o||typeof HTMLCanvasElement<`u`&&a instanceof HTMLCanvasElement),c=Object.freeze({fingerprint:r===null?`vertical-glyph-measurement:deterministic-v1`:s?`vertical-glyph-measurement:dom-vert-probe-v2`:`vertical-glyph-measurement:no-dom-vert-probe-v1`,measureRunInkExtra(e){if(r===null)throw Error(`Vertical glyph measurement requires a concrete text context`);return Gm(r,()=>vI(r,e))},planRun(e){if(r===null)throw Error(`Vertical glyph planning requires a concrete text context`);return Gm(r,()=>{let t=r.font,n=r.fontKerning;r.font=e.font,r.fontKerning=e.fontKerning;try{return gI(r,e.text,e.fontSizePt,e.letterSpacingPt,e.charScale,e.growTrRotateInk,e=>Zm(r,e),e.writingMode)}finally{r.font=t,r.fontKerning=n}})}}),l=Tv(t.localMetrics),u=zI(n,{...t,localMetrics:l,measureContext:i,verticalGlyphMeasurement:c});return s_(u,n),a_(u,KR(n,i,l)),u}async function JR(e,t){if(Array.isArray(e))throw TypeError(`prepareMathRuns requires a document model so every story has an explicit structural source`);return VM(GR(e).mathOccurrences,t)}function YR(e,t,n,r){let i=r.layoutServices??qR(e,e.fatalParse===null?{measureContext:t.getContext(`2d`)}:{}),a=c_(i);if(a&&a!==e)throw Error(`Layout services belong to a different document source`);let o=r.defaultCurrentDateMs??Date.now();BM(i,o,()=>e);let s=nT(i,{currentDate:r.currentDate,defaultCurrentDateMs:o},n),c=PE(s.page,r.width);return{selection:s,paintOptions:{width:r.width,dpr:r.dpr,defaultTextColor:r.defaultTextColor,fetchImage:r.fetchImage,parseError:e.fatalParse!==null,registry:C_(i),privateResources:m_(i),textRuns:r.onTextRun?OT(s.layout,n,{scale:c}):[],onTextRun:r.onTextRun,threeD:r.threeD,regionMap:r.regionMap}}}async function XR(e,t,n,r={}){let i=YR(e,t,n,r);return RE(i.selection.layout,i.selection.page,t,i.paintOptions)}function ZR(e){let t=new Map;for(let n of e.pages)for(let e of n.bookmarkStarts)e.name!==``&&!t.has(e.name)&&t.set(e.name,n.pageIndex);return t}async function QR(e,t){let n=e.embeddedFonts;if(!n||n.length===0)return[];let r=(await Promise.all(n.map(async e=>{try{let n=await t(e.partPath);return{family:e.fontName,bytes:n,odttf:e.partPath.toLowerCase().endsWith(`.odttf`),fontKey:e.fontKey,weight:$R(e.style),style:ez(e.style)}}catch{return null}}))).filter(e=>e!==null);return r.length===0?[]:ee(r)}function $R(e){return e===`bold`||e===`boldItalic`?`bold`:`normal`}function ez(e){return e===`italic`||e===`boldItalic`?`italic`:`normal`}function tz(e,t=qR(e),n){let r=nL(e)?e:GR(e),i=c_(t);if(i&&i!==r)throw Error(`Layout services belong to a different document source`);return zM(r.bodyLayoutInput,t,n)}function nz(e,t,n){let r=c_(t);if(r&&r!==e)throw Error(`Layout services belong to a different document source`);let i=tT({source:e,services:t,defaultCurrentDateMs:n,buildLayout:n=>tz(e,t,n)});return Object.freeze({layoutServices:t,layoutVariants:i.store,defaultCurrentDateMs:n})}function rz(e,t){let n=Math.min(e.length,t);if(n>0&&n<e.length){let t=e.charCodeAt(n-1),r=e.charCodeAt(n);t>=55296&&t<=56319&&r>=56320&&r<=57343&&n--}return e.slice(0,n)}function iz(e){let t=e??16384;if(!Number.isFinite(t)||t<0)throw RangeError(`maxTextCharacters must be a finite non-negative number.`);return Math.min(65536,Math.floor(t))}function az(e,t){let n=iz(t),r=[],i=0,a=!1,o=!1,s=(e,t)=>{if(t&&o){if(i>=n)return a=!0,!1;r.push(`
|
|
7
|
-
`),i++}o=!0;let s=rz(e,Math.max(0,n-i));return r.push(s),i+=s.length,s.length<e.length?(a=!0,!1):!0};if(!s(`Chart type: ${e.chartType}`,!0)||e.title!==null&&!s(`Title: ${e.title}`,!0))return{text:r.join(``),truncated:a,textCharacters:i,maxTextCharacters:n};if(e.categories.length>0){if(!s(`Categories: `,!0))return{text:r.join(``),truncated:a,textCharacters:i,maxTextCharacters:n};for(let[t,o]of e.categories.entries())if(!s(`${t===0?``:`, `}${o}`,!1))return{text:r.join(``),truncated:a,textCharacters:i,maxTextCharacters:n}}for(let t of e.series){if(!s(`Series ${t.name||`(unnamed)`}: `,!0))break;for(let[e,o]of t.values.entries())if(!s(`${e===0?``:`, `}${o===null?``:o}`,!1))return{text:r.join(``),truncated:a,textCharacters:i,maxTextCharacters:n};if(a)break}return{text:r.join(``),truncated:a,textCharacters:i,maxTextCharacters:n}}function oz(e,t){let n=Math.min(e.length,t);if(n>0&&n<e.length){let t=e.charCodeAt(n-1),r=e.charCodeAt(n);t>=55296&&t<=56319&&r>=56320&&r<=57343&&n--}return e.slice(0,n)}function sz(e,t){let n=[],r=0,i=!1;for(let a of e){if(a.length===0)continue;if(r>0){if(r>=t){i=!0;break}n.push(`
|
|
8
|
-
`),r++}let e=oz(a,Math.max(0,t-r));if(n.push(e),r+=e.length,e.length<a.length){i=!0;break}}let a=n.join(``);return{...a.length===0?{}:{text:a},truncated:i}}function*cz(e){if(e.kind===`paragraph`){for(let t of e.lines){let e=t.placements.flatMap(e=>e.kind===`text`?[e.text]:[]).join(``);e&&(yield e)}return}if(e.kind===`table`){for(let t of e.rows)for(let e of t.cells)for(let t of e.blocks)yield*cz(t.layout);return}if(e.kind===`note`||e.kind===`textbox`)for(let t of e.story.blocks)yield*cz(t)}function*lz(e){for(let t of e.drawing.commands)(t.kind===`text`||t.kind===`watermark-text`)&&(yield t.text);for(let t of e.textBoxes)yield*cz(t)}function uz(e){let t=e??16384;if(!Number.isFinite(t)||t<0)throw RangeError(`maxTextCharacters must be a finite non-negative number.`);return Math.min(65536,Math.floor(t))}function dz(e){return{story:e.story,storyInstance:e.storyInstance,path:[...e.path]}}function fz(e){return`drawing`in e?e.drawing.inkBounds:e.placement.bounds}function pz(e){let t=fz(e),n=[oT(e.pointToPage,t),oT(e.pointToPage,{xPt:t.xPt+t.widthPt,yPt:t.yPt}),oT(e.pointToPage,{xPt:t.xPt,yPt:t.yPt+t.heightPt}),oT(e.pointToPage,{xPt:t.xPt+t.widthPt,yPt:t.yPt+t.heightPt})],r=Math.min(...n.map(e=>e.xPt)),i=Math.min(...n.map(e=>e.yPt)),a=Math.max(...n.map(e=>e.xPt)),o=Math.max(...n.map(e=>e.yPt));return{xPt:r,yPt:i,widthPt:a-r,heightPt:o-i}}function mz(e,t){return t.xPt>=e.xPt&&t.xPt<=e.xPt+e.widthPt&&t.yPt>=e.yPt&&t.yPt<=e.yPt+e.heightPt}function hz(e,t){let n=!1;for(let r=0,i=t.length-1;r<t.length;i=r++){let a=t[r],o=t[i];a.yPt>e.yPt!=o.yPt>e.yPt&&e.xPt<(o.xPt-a.xPt)*(e.yPt-a.yPt)/(o.yPt-a.yPt)+a.xPt&&(n=!n)}return n}function gz(e,t){return mz(e.inkBounds,t)?e.clip?e.clip.kind===`rect`?mz(e.clip.rect,t):hz(t,e.clip.points):!0:!1}function _z(e,t,n){for(let n of e.clips){let e=sT(n.pointToPage,t);if(!e||!mz(n.bounds,e))return!1}return`drawing`in e?gz(e.drawing,n):mz(e.placement.bounds,n)}function vz(e,t){return e.commands.find(e=>e.kind===`resource`&&e.resourceKind===t)}function yz(e){return vz(e,`chart`)?`chart`:e.commands.some(e=>e.kind===`drawingml-shape`||e.kind===`drawingml-image-fill`||e.kind===`fill-rect`||e.kind===`stroke-rect`||e.kind===`text`||e.kind===`watermark-text`)?`shape`:vz(e,`image`)?`image`:null}function bz(e,t,n,r,i,a){let o=`drawing`in e?yz(e.drawing):e.placement.resourceKind;if(!o)return null;let s,c=!1,l,u;if(o===`chart`){let t=`drawing`in e?vz(e.drawing,`chart`).resourceKey:e.placement.resourceKey,n=i.resolve(t,`chart`),r=az(n.model,a);s=r.text,c=r.truncated,u=n.model.series.length}else if(o===`image`){let t=`drawing`in e?vz(e.drawing,`image`).resourceKey:e.placement.resourceKey,n=i.descriptors.find(e=>e.resourceKey===t&&e.kind===`image`&&`mimeType`in e);if(!n)throw Error(`Unknown image paint resource: ${t}`);l=n.mimeType}else{let t=sz(lz(e),a);s=t.text,c=t.truncated}return{format:`docx`,kind:`element`,pageIndex:t,elementIndex:n,elementType:o,point:{...r},bounds:pz(e),source:dz(`drawing`in e?e.drawing.source:e.source),...s===void 0?{}:{text:s},...l===void 0?{}:{mimeType:l},...u===void 0?{}:{seriesCount:u},truncated:c,truncationReasons:c?[`text`]:[],textCharacters:s?.length??0,maxTextCharacters:a}}function xz(e,t,n,r,i={}){if(!Number.isFinite(n.xPt)||!Number.isFinite(n.yPt))throw RangeError(`DOCX hit-test point must contain finite page coordinates.`);let a=uz(i.maxTextCharacters),o=TT(e,t);for(let e=o.length-1;e>=0;e--){let i=o[e],s=sT(i.pointToPage,n);if(!s||!_z(i,n,s))continue;let c=bz(i,t,e,n,r,a);if(c)return c}return null}function Sz(e,t,n,r){return xz(nT(e,{currentDate:r.currentDate,defaultCurrentDateMs:r.defaultCurrentDateMs},t).layout,t,n,C_(e),r)}const Cz=1024*1024,wz=67108864;async function Tz(e,t,n={}){let r=[],i=[];return Ez(e,t,n,{acceptBody:e=>{let t=structuredClone(e);for(let t of e)r.push(t);for(let e of t)i.push(e)},complete:e=>{let t=structuredClone(e);return e.body=r,t.body=i,Object.freeze({document:e,ownedLayoutDocument:t})}})}async function Ez(e,t,n,r){let i=new pp(e,{...t,maxByteCredit:wz,timeoutMs:n.timeoutMs});try{for(;;){let e=await Oz(i,n.signal);try{let t=e.usage??i.usageCheckpoint;t&&n.onUsage?.(t);let a=Dz(e.payload);if(e.done!==(a.kind===`complete`))throw TypeError(`DOCX document unit terminal flag does not match its payload`);if(a.kind===`body`){r.acceptBody(a.body),await e.ack({signal:n.signal});continue}if(!Array.isArray(a.document.body)||a.document.body.length!==0)throw TypeError(`DOCX terminal document must not duplicate streamed body blocks`);let o=r.complete(a.document);return await e.ack({signal:n.signal}),o}finally{e.disposeTransferred()}}}catch(e){throw await i.cancel(`request-error`).catch(()=>void 0),e}}function Dz(e){let t=JSON.parse(new TextDecoder().decode(new Uint8Array(e)));if(!t||typeof t!=`object`)throw TypeError(`DOCX document unit must be an object`);let n=t;if(n.kind===`body`&&Array.isArray(n.body)||n.kind===`complete`&&n.document&&typeof n.document==`object`)return n;throw TypeError(`DOCX document unit has an unknown shape`)}async function Oz(e,t){try{return await e.pull(Cz,{signal:t})}catch(n){let r=kz(n);if(r===void 0)throw n;return e.pull(r,{signal:t})}}function kz(e){return mu(e,Cz,wz)}var Az=class{body;document;prepared=null;index=0;identity=null;completed=!1;constructor(e){this.body=e.body,e.body=[],this.document=e}open_document_cursor(e,t){if(this.identity)throw Error(`materialized DOCX cursor is already open`);this.identity={sessionId:t,operationId:e,generation:t}}pull_document_chunk(e,t,n,r){if(this.assertIdentity(t,n),this.completed)throw Error(`materialized DOCX cursor is complete`);if(e!==this.index)throw Error(`materialized DOCX cursor sequence mismatch`);if(!this.prepared){let t=this.body[this.index],n=t===void 0?{kind:`complete`,document:this.requireDocument()}:{kind:`body`,body:[t]};this.prepared={sequence:e,bytes:new TextEncoder().encode(JSON.stringify(n)),done:t===void 0}}if(this.prepared.bytes.byteLength>r)throw new du({requiredBytes:this.prepared.bytes.byteLength,offeredBytes:r});return this.prepared.bytes.slice()}document_chunk_done(){if(!this.prepared)throw Error(`materialized DOCX cursor has no prepared unit`);return this.prepared.done}acknowledge_document_chunk(e,t,n){if(this.assertIdentity(t,n),!this.prepared||e!==this.prepared.sequence||e!==this.index)throw Error(`materialized DOCX acknowledgement sequence mismatch`);let r=this.prepared.done;if(this.prepared=null,r){this.completed=!0,this.body=[],this.document=null;return}this.body[this.index]=void 0,this.index+=1}cancel_document_cursor(){this.prepared=null,this.body=[],this.document=null,this.completed=!0}close_document_session(){this.cancel_document_cursor()}assertIdentity(e,t){if(!this.identity||this.identity.operationId!==e||this.identity.generation!==t)throw Error(`materialized DOCX cursor identity mismatch`)}requireDocument(){if(!this.document)throw Error(`materialized DOCX terminal document is unavailable`);return this.document}};const jz=67108864;var Mz=class{coordinator=new mp;host=null;identity=null;constructor(e,t=e=>e(this.requireArchive())){this.archive=e,this.executeArchive=t}open(e){if(this.host)throw Error(`a DOCX document pull session is already active`);this.executeArchive(t=>{t.open_document_cursor(e.operationId,e.generation)});let t=0;this.identity=e,this.host=new hp({...e,maxByteCredit:jz,coordinator:this.coordinator,driver:{pull:n=>{let r;try{r=this.executeArchive(r=>r.pull_document_chunk(t,e.operationId,e.generation,n))}catch(e){throw pu(e,n,jz)||e}let i=Ru(r);return{payload:i,byteLength:i.byteLength,done:this.executeArchive(e=>e.document_chunk_done()),transfer:[i]}},measureChunk:({payload:e})=>e.byteLength,acknowledge:n=>{if(n!==t)throw Error(`DOCX document acknowledgement sequence mismatch`);this.executeArchive(n=>n.acknowledge_document_chunk(t,e.operationId,e.generation)),t+=1},cancel:()=>this.executeArchive(e=>e.cancel_document_cursor()),close:()=>this.executeArchive(e=>e.close_document_session()),resourceUsage:()=>{let e=this.executeArchive(e=>e.document_cursor_resource_usage?.());return e?yu(e):void 0}}})}dispatch(e,t){return!this.host||!this.identity?(t({protocol:up,kind:`error`,sessionId:e.sessionId,operationId:e.operationId,generation:e.generation,requestId:e.requestId,error:Fu(Error(`DOCX document pull session is not open`))}),Promise.resolve()):this.host.dispatch(e,t)}async reset(){if(this.host)try{this.archive()&&this.executeArchive(e=>e.close_document_session())}finally{this.host=null,this.identity=null,this.coordinator=new mp}}requireArchive(){let e=this.archive();if(!e)throw Error(`No docx loaded`);return e}};function Nz(e){return!!e&&typeof e==`object`&&e.protocol===`ooxml-pull-v1`}function Pz(e){let t=1;return{request(n){let r=n(t++);return new Promise((t,n)=>{e.dispatch(r,t).catch(n)})},forgetOrphaned(){},terminate(){}}}const Fz=new su(w,{freeArchive:e=>e.free(),reinit:T}),Iz=new Mz(()=>Fz.archive,e=>Fz.run(()=>{let t=Fz.archive;if(!t)throw Error(`No docx loaded`);return e(t)}));let Lz=0,Rz=null,zz=null,Bz={},Vz=[];const Hz=new yg({maxEntries:64,maxBytes:134217728}),Uz=(e,t)=>self.postMessage(e,t);function Wz(e,t){return Hz.get(e,t,async()=>{let n=Fz.archive;if(!n)throw Error(`No docx loaded`);let r=Fz.run(()=>n.extract_image(e));return new Blob([r],{type:t})})}self.onmessage=async e=>{let t=e.data;if(Nz(t)){try{if(!Rz)throw Error(`DOCX vertical fallback session is not open`);await Rz.dispatch(t,Uz)}catch(e){Uz({protocol:up,kind:`error`,sessionId:t.sessionId,operationId:t.operationId,generation:t.generation,requestId:t.requestId,error:Fu(e)})}return}if(t.type===`init`){Fz.setWasmInput(tu(t.wasmUrl)??t.wasmUrl);return}let n=t.id;try{if(await Fz.ensureReady(),t.type!==`parse`&&Fz.archive){let e=Fz.archive;Fz.run(()=>e.assert_healthy())}if(t.type===`parse`){await Iz.reset(),await Rz?.reset(),Rz=null,zz=null,Vz.length>0&&(fg(Vz),Vz=[]),Hz.clear(),Bz=await cp(t.renderers),tl(Wz),al(Wz);let[e,i,a]=lp(t.resourcePolicy),o=new Uint8Array(t.data);Fz.run(()=>{let t=new r(o,e,i,a);Fz.setArchive(t)}),Lz+=1;let s={sessionId:Lz,operationId:Lz,generation:Lz};Iz.open(s);let c,l;try{c=await Tz(Pz(Iz),s,{onUsage:e=>{l=e}})}finally{await Iz.reset().catch(()=>void 0)}if(OR(c.document)){let e=new Az(c.document);Rz=new Mz(()=>e),Lz+=1;let t={sessionId:Lz,operationId:Lz,generation:Lz};Rz.open(t),Uz({type:`mainThreadVerticalFallback`,id:n,...t,usage:l});return}let u=UR(c.document,c.ownedLayoutDocument),d=u.source,f=u.document,p=[];t.useGoogleFonts&&(p=await I(MI(f),AI));let m=[];f.embeddedFonts?.length&&(m=await QR(f,async e=>{let t=Fz.archive;if(!t)throw Error(`No docx loaded`);return Fz.run(()=>t.extract_image(e))}));let h=await fL(f);Vz=h.faces;let g=Bz.math&&d.mathOccurrences.length>0?await JR(f,Bz.math):void 0;zz=nz(d,qR(d,{localMetrics:h.metrics,useGoogleFonts:!!t.useGoogleFonts,embeddedFaces:m,googleFaces:p,mathResources:g?.records,mathDrawables:g?.drawables}),t.defaultCurrentDateMs);let _=zz.layoutVariants.defaultLayout,v=_.pages.map(e=>({widthPt:e.geometry.widthPt,heightPt:e.geometry.heightPt})),y={pageCount:_.pages.length,comments:f.comments??[],footnotes:f.footnotes??[],endnotes:f.endnotes??[],pageSizes:v,bookmarkPages:[...ZR(_)]},b=Fz.archive;if(!b)throw Error(`No docx loaded`);l=yu(Fz.run(()=>b.resource_usage())),Uz({type:`parsedMeta`,id:n,meta:y,usage:l});return}if(t.type===`renderPage`){if(!zz)throw Error(`Document not loaded`);let e=new OffscreenCanvas(1,1),r=c_(zz.layoutServices);if(!r)throw Error(`Document layout source is not initialized`);await XR(r,e,t.pageIndex,{...t.opts,fetchImage:Wz,layoutServices:zz.layoutServices,defaultCurrentDateMs:zz.defaultCurrentDateMs,threeD:Bz.threeD,regionMap:Bz.regionMap});let i=kT(zz.layoutServices,t.pageIndex,{...t.opts,defaultCurrentDateMs:zz.defaultCurrentDateMs}),a=e.transferToImageBitmap();Uz({type:`pageRendered`,id:n,bitmap:a,runs:i},[a]);return}if(t.type===`collectRuns`){if(!zz)throw Error(`Document not loaded`);Uz({type:`runsCollected`,id:n,runs:kT(zz.layoutServices,t.pageIndex,{...t.opts,defaultCurrentDateMs:zz.defaultCurrentDateMs})});return}if(t.type===`hitTestElement`){if(!zz)throw Error(`Document not loaded`);Uz({type:`elementHit`,id:n,context:Sz(zz.layoutServices,t.pageIndex,t.point,{...t.opts,defaultCurrentDateMs:zz.defaultCurrentDateMs})});return}if(t.type===`extractImage`){let e=Fz.archive;if(!e)throw Error(`No docx loaded`);let r=Fz.run(()=>e.extract_image(t.path).buffer);Uz({type:`imageExtracted`,id:n,bytes:r},[r]);return}if(t.type===`resourceUsage`){let e=Fz.archive;if(!e)throw Error(`No docx loaded`);Uz({type:`resourceUsage`,id:n,usage:yu(Fz.run(()=>e.resource_usage()))});return}if(t.type===`toMarkdown`){let e=Fz.archive;if(!e)throw Error(`No docx loaded`);Uz({type:`markdownRendered`,id:n,markdown:Fz.run(()=>e.to_markdown())});return}}catch(e){let t=e instanceof Error?e:Error(String(e)),r=t;Uz({type:`error`,id:n,...Fu(t),...r.code===void 0?{}:{code:r.code},...r.reason===void 0?{}:{reason:r.reason},...r.outgoingColumnIndex===void 0?{}:{outgoingColumnIndex:r.outgoingColumnIndex},...r.outgoingColumnCount===void 0?{}:{outgoingColumnCount:r.outgoingColumnCount},...r.incomingColumnCount===void 0?{}:{incomingColumnCount:r.incomingColumnCount}})}};
|