@synnaxlabs/pluto 0.47.1 → 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/dist/{Animated-NfnNvlbz.cjs → Animated--SNIwznU.cjs} +1 -1
  2. package/dist/{Animated-CUFx-eAB.js → Animated-CC7iS0zH.js} +21 -21
  3. package/dist/{Animated-CEx4LoLs.js → Animated-DfDp0-ep.js} +4 -4
  4. package/dist/{Animated-Bq6z2XkH.cjs → Animated-TMpTdCqK.cjs} +1 -1
  5. package/dist/{Box-D5Qv__kr.js → Box-CoQUaJk2.js} +2 -2
  6. package/dist/{Box-BvqALodh.cjs → Box-Ds_D3xR_.cjs} +1 -1
  7. package/dist/Button-BaMa3eGI.cjs +1 -0
  8. package/dist/Button-NgDHbsf8.js +306 -0
  9. package/dist/{Dialog-BnPvG5WQ.cjs → Dialog-BL8T9CVw.cjs} +1 -1
  10. package/dist/{Dialog-Bi1Sf3oc.js → Dialog-CBDFqieV.js} +4 -4
  11. package/dist/{Editable-CxgdRDPb.js → Editable-C7KPD0hC.js} +3 -3
  12. package/dist/{Editable-BXFY3-UW.cjs → Editable-CWt3zqDm.cjs} +1 -1
  13. package/dist/{Haul-BuI0PZpo.js → Haul-Be1j5BU3.js} +2 -2
  14. package/dist/{Haul-2Xa_nMgc.cjs → Haul-D1WaI_xE.cjs} +1 -1
  15. package/dist/{Items-CHAbP2ZL.cjs → Items-BYlg9bb-.cjs} +1 -1
  16. package/dist/{Items-Cmc6otoS.js → Items-mikdEpyC.js} +8 -8
  17. package/dist/{Menu-CQ_GMgB9.js → Menu-CcWs0t21.js} +9 -9
  18. package/dist/{Menu-BImhHf24.cjs → Menu-DJoh8bH7.cjs} +1 -1
  19. package/dist/{Provider-D0P_lzCo.js → Provider-DScd3hYf.js} +26 -26
  20. package/dist/{Provider-BV7nN39a.cjs → Provider-fx1wTnXk.cjs} +2 -2
  21. package/dist/Tags-DvPUmH2r.js +908 -0
  22. package/dist/Tags-KHafaGjR.cjs +1 -0
  23. package/dist/{Text-BnUGzpJq.js → Text-BbbqH88W.js} +491 -486
  24. package/dist/Text-CZrjPRjJ.cjs +1 -0
  25. package/dist/{Video-VlT7jSYk.cjs → Video-DRSEX8t7.cjs} +1 -1
  26. package/dist/{Video-CITi2j07.js → Video-_DrutSeT.js} +2 -2
  27. package/dist/button.cjs +1 -1
  28. package/dist/button.js +1 -1
  29. package/dist/color.cjs +1 -1
  30. package/dist/color.js +1 -1
  31. package/dist/css-C_YE-5Xa.cjs +8 -0
  32. package/dist/{css-D6ZBcSwh.js → css-Cn63X_Yv.js} +1161 -1111
  33. package/dist/css.cjs +1 -1
  34. package/dist/css.js +2 -2
  35. package/dist/{deep-DtdcJG4q.cjs → deep-7SxmCL0x.cjs} +1 -1
  36. package/dist/{deep-DRVLw7iw.js → deep-szN5DCOH.js} +1 -1
  37. package/dist/dialog.cjs +1 -1
  38. package/dist/dialog.js +1 -1
  39. package/dist/{dimensions-CGLhBwVq.cjs → dimensions-DFDTcQRG.cjs} +1 -1
  40. package/dist/{dimensions-BFCMI7yN.js → dimensions-Dclfavlh.js} +1 -1
  41. package/dist/{eraser-DvzR9kLf.js → eraser-Bpl4bpBx.js} +13 -13
  42. package/dist/{eraser-Dm5Du4PL.cjs → eraser-Bqibt23a.cjs} +2 -2
  43. package/dist/ether.cjs +1 -1
  44. package/dist/ether.js +7 -7
  45. package/dist/{_commonjsHelpers-BH3jXuIh.cjs → event-BxvV3arE.cjs} +1 -1
  46. package/dist/{_commonjsHelpers-ByX85dGu.js → event-nNH_pXSr.js} +17 -14
  47. package/dist/{external-CMBnwYR4.cjs → external-19BIaQc6.cjs} +1 -1
  48. package/dist/{external-Daiy-vZ3.js → external-1uZLLxz-.js} +771 -792
  49. package/dist/{external-DGNBXSAj.js → external-6rS2YiWR.js} +16066 -15782
  50. package/dist/{external-CAcL3DJP.js → external-8H4eB7TN.js} +8 -8
  51. package/dist/{external-Eaj0hgzm.cjs → external-AInsIJp-.cjs} +1 -1
  52. package/dist/{external-CTsR6bs9.cjs → external-B3jTkhc4.cjs} +4 -22
  53. package/dist/external-B8hxM_jw.cjs +79 -0
  54. package/dist/{external-BTlfU938.js → external-BOWnCKIe.js} +3 -3
  55. package/dist/{external-D7EEjQaR.js → external-Bi-OQCBH.js} +19 -18
  56. package/dist/{external-6vmyay3h.js → external-Bq4gfE5e.js} +6 -6
  57. package/dist/{external-6RyUkYAB.js → external-C0_sN1J0.js} +2 -2
  58. package/dist/{external-CSntN1is.cjs → external-CFZ33YbY.cjs} +1 -1
  59. package/dist/{external-CTrkvlmd.cjs → external-CFdDgpzj.cjs} +1 -1
  60. package/dist/{external-BcZE443U.cjs → external-CJFfVl_u.cjs} +1 -1
  61. package/dist/{external-BrQU-ZN8.cjs → external-CN15E8ls.cjs} +1 -1
  62. package/dist/{external-Bo9Dyf8v.js → external-Caetm5fI.js} +5 -5
  63. package/dist/external-CfEVFfhL.cjs +1 -0
  64. package/dist/{external-CtiE4JLk.js → external-D6TsHpoG.js} +10 -10
  65. package/dist/{external-Clec0nDH.cjs → external-D7WE6Leo.cjs} +1 -1
  66. package/dist/{external-OLyg-4Ab.cjs → external-DUGcSVbJ.cjs} +1 -1
  67. package/dist/{external-BSjAne2q.js → external-DwhfVdFp.js} +5 -5
  68. package/dist/{external-BhOvtmPt.js → external-X_eFMRtE.js} +2 -2
  69. package/dist/{external-Dl0l3iHN.cjs → external-pRQzznIG.cjs} +1 -1
  70. package/dist/{external-OzDazbiJ.js → external-y1Apm7j1.js} +14 -14
  71. package/dist/flex.cjs +1 -1
  72. package/dist/flex.js +1 -1
  73. package/dist/{fontString-yPlq8smc.cjs → fontString-BcSXNOgW.cjs} +1 -1
  74. package/dist/{fontString-CGd4NYXa.js → fontString-D7EMGjIw.js} +2 -2
  75. package/dist/header.cjs +1 -1
  76. package/dist/header.js +1 -1
  77. package/dist/{hooks-Bvv-S6WC.js → hooks-BmUn8s1r.js} +4 -4
  78. package/dist/{hooks-CoF3Fkrn.cjs → hooks-CutQY1o9.cjs} +1 -1
  79. package/dist/index.cjs +8 -40
  80. package/dist/index.js +9333 -9141
  81. package/dist/input.cjs +1 -1
  82. package/dist/input.js +1 -1
  83. package/dist/{jsx-runtime-OVHDjVDe.js → jsx-runtime-BbD0H88J.js} +108 -128
  84. package/dist/jsx-runtime-nZSsnGb7.cjs +6 -0
  85. package/dist/list.cjs +1 -1
  86. package/dist/list.js +1 -1
  87. package/dist/menu.cjs +1 -1
  88. package/dist/menu.js +1 -1
  89. package/dist/pluto.css +1 -1
  90. package/dist/{provider-C8In649C.js → provider-B6SgG_sT.js} +4910 -4821
  91. package/dist/provider-C9Beoajx.cjs +72 -0
  92. package/dist/src/button/Button.d.ts +2 -1
  93. package/dist/src/button/Button.d.ts.map +1 -1
  94. package/dist/src/channel/LinePlot.d.ts +4 -1
  95. package/dist/src/channel/LinePlot.d.ts.map +1 -1
  96. package/dist/src/channel/Select.d.ts +2 -2
  97. package/dist/src/channel/Select.d.ts.map +1 -1
  98. package/dist/src/cluster/index.d.ts +2 -0
  99. package/dist/src/cluster/index.d.ts.map +1 -0
  100. package/dist/src/cluster/queries.d.ts +6 -0
  101. package/dist/src/cluster/queries.d.ts.map +1 -0
  102. package/dist/src/cluster/queries.spec.d.ts +2 -0
  103. package/dist/src/cluster/queries.spec.d.ts.map +1 -0
  104. package/dist/src/color/GradientPicker.d.ts.map +1 -1
  105. package/dist/src/flux/retrieve.d.ts +9 -8
  106. package/dist/src/flux/retrieve.d.ts.map +1 -1
  107. package/dist/src/hardware/device/Select.d.ts +1 -1
  108. package/dist/src/hardware/device/Select.d.ts.map +1 -1
  109. package/dist/src/hardware/rack/Select.d.ts +1 -1
  110. package/dist/src/hardware/rack/Select.d.ts.map +1 -1
  111. package/dist/src/icon/registry.d.ts +1 -0
  112. package/dist/src/icon/registry.d.ts.map +1 -1
  113. package/dist/src/index.d.ts +1 -0
  114. package/dist/src/index.d.ts.map +1 -1
  115. package/dist/src/input/DateTime.d.ts.map +1 -1
  116. package/dist/src/input/DateTime.spec.d.ts +2 -0
  117. package/dist/src/input/DateTime.spec.d.ts.map +1 -0
  118. package/dist/src/label/Select.d.ts +3 -3
  119. package/dist/src/label/Select.d.ts.map +1 -1
  120. package/dist/src/menu/Item.d.ts.map +1 -1
  121. package/dist/src/schematic/symbol/Primitives.d.ts.map +1 -1
  122. package/dist/src/select/Dialog.d.ts +2 -3
  123. package/dist/src/select/Dialog.d.ts.map +1 -1
  124. package/dist/src/select/Multiple.d.ts.map +1 -1
  125. package/dist/src/select/MultipleTrigger.d.ts.map +1 -1
  126. package/dist/src/status/Select.d.ts +1 -1
  127. package/dist/src/status/Select.d.ts.map +1 -1
  128. package/dist/src/status/queries.d.ts +13 -0
  129. package/dist/src/status/queries.d.ts.map +1 -1
  130. package/dist/src/synnax/Provider.d.ts +2 -2
  131. package/dist/src/synnax/Provider.d.ts.map +1 -1
  132. package/dist/src/synnax/aether/provider.d.ts.map +1 -1
  133. package/dist/src/table/Table.d.ts.map +1 -1
  134. package/dist/src/tag/Tag.d.ts.map +1 -1
  135. package/dist/src/user/Avatar.d.ts +7 -0
  136. package/dist/src/user/Avatar.d.ts.map +1 -0
  137. package/dist/src/user/external.d.ts +3 -0
  138. package/dist/src/user/external.d.ts.map +1 -0
  139. package/dist/src/user/index.d.ts +1 -1
  140. package/dist/src/user/index.d.ts.map +1 -1
  141. package/dist/src/user/queries.d.ts +1 -0
  142. package/dist/src/user/queries.d.ts.map +1 -1
  143. package/dist/src/vis/draw2d/index.d.ts +2 -1
  144. package/dist/src/vis/draw2d/index.d.ts.map +1 -1
  145. package/dist/src/vis/measure/Measure.d.ts +4 -1
  146. package/dist/src/vis/measure/Measure.d.ts.map +1 -1
  147. package/dist/src/vis/measure/aether/measure.d.ts +27 -1
  148. package/dist/src/vis/measure/aether/measure.d.ts.map +1 -1
  149. package/dist/tabs.cjs +1 -1
  150. package/dist/tabs.js +1 -1
  151. package/dist/text.cjs +1 -1
  152. package/dist/text.js +2 -2
  153. package/dist/theming.cjs +1 -1
  154. package/dist/theming.js +2 -2
  155. package/dist/tree.cjs +1 -1
  156. package/dist/tree.js +1 -1
  157. package/dist/triggers.cjs +1 -1
  158. package/dist/triggers.js +1 -1
  159. package/dist/{units-BqIfn6VX.js → units-cBd5OJg4.js} +1 -1
  160. package/dist/units-zxke9Ng2.cjs +1 -0
  161. package/dist/value-Ce4T858D.cjs +53 -0
  162. package/dist/{value-ChGMEPP3.js → value-UJNdARAu.js} +2715 -2512
  163. package/dist/video.cjs +1 -1
  164. package/dist/video.js +1 -1
  165. package/package.json +23 -21
  166. package/dist/Button-BMeq9Z2I.cjs +0 -1
  167. package/dist/Button-CMRdj9Ti.js +0 -305
  168. package/dist/Tags-6IUFBvU-.js +0 -604
  169. package/dist/Tags-DtnStTuF.cjs +0 -1
  170. package/dist/Text-DY08sSZe.cjs +0 -1
  171. package/dist/css-HnNQMUzV.cjs +0 -8
  172. package/dist/external-DDzR-j7b.cjs +0 -1
  173. package/dist/external-Ddn3rc_Q.cjs +0 -85
  174. package/dist/jsx-runtime-Dszzpdy0.cjs +0 -22
  175. package/dist/provider-lNhTlIWj.cjs +0 -72
  176. package/dist/units-DCifOxd9.cjs +0 -1
  177. package/dist/value-B3LTg1lE.cjs +0 -53
@@ -0,0 +1,79 @@
1
+ "use strict";const Ae=require("./jsx-runtime-nZSsnGb7.cjs"),Fn=require("./Button-BaMa3eGI.cjs"),ge=require("./css-C_YE-5Xa.cjs"),wr=require("react"),PN=require("./Provider-fx1wTnXk.cjs"),Pa=require("./Text-CZrjPRjJ.cjs"),Js=require("./event-BxvV3arE.cjs"),za=require("./Tags-KHafaGjR.cjs"),kN=require("./Dialog-BL8T9CVw.cjs"),jb=require("./Animated-TMpTdCqK.cjs"),ar=require("./Box-Ds_D3xR_.cjs"),an=require("./Editable-CWt3zqDm.cjs");require("./types-D-yz1qsT.cjs");require("./provider-C9Beoajx.cjs");const Bl=require("./Items-BYlg9bb-.cjs"),ON=require("./useStaticData-BTwIe0Il.cjs");require("./eraser-Bqibt23a.cjs");require("./Haul-D1WaI_xE.cjs");const qb=({format:e="dateTime",suppliedTZ:t="UTC",displayTZ:r="local",children:n,...a})=>Ae.jsxRuntimeExports.jsx(an.Text,{...a,children:new ge.r(n,t).toString(e,r)}),BN=(e,t,r)=>e==="preview"&&r===!0?"var(--pluto-primary-z)":t,Rb=({ref:e,className:t,value:r,ghost:n,disabled:a,onChange:i,inputType:o,size:s,variant:u="text",style:l,color:c,borderColor:f,borderWidth:m,bordered:d,rounded:h,background:p,textColor:y,onClick:w,...D})=>Ae.jsxRuntimeExports.jsx(Fn.Button,{el:"label",variant:u,className:ge.CSS(ge.CSS.BE("input",o),t),ghost:n,disabled:a,size:s,preventClick:!0,style:l,color:c,borderColor:f,borderWidth:m,bordered:d,rounded:h,background:p,textColor:BN(u,y,r),onClick:w,children:u!=="preview"?Ae.jsxRuntimeExports.jsxs(Ae.jsxRuntimeExports.Fragment,{children:[Ae.jsxRuntimeExports.jsx("input",{className:ge.CSS.BE("input",o,"input"),type:"checkbox",ref:e,checked:r,onChange:v=>{v.stopPropagation(),i?.(v.target.checked)},value:"",disabled:a,onClick:w,...D}),Ae.jsxRuntimeExports.jsx("span",{className:ge.CSS.BE("input",o,"indicator"),onClick:w})]}):r?"True":"False"}),$N=e=>Ae.jsxRuntimeExports.jsx(Rb,{...e,inputType:"checkbox"}),Lb="cursor-style",uh=(e,t=document.head)=>{Hb();const r=document.createElement("style");r.innerHTML=`*{cursor: ${e} !important;}`,r.id=Lb,t.appendChild(r)},Hb=()=>{const e=document.getElementById(Lb);e?.remove()},lh=(e,t,r,n,a)=>{const{x:i,y:o}=n??ge.Q.construct(ge.jt.dims(a));if(ge.jt.width(t)>i&&ge.jt.width(t)>ge.jt.height(t)){const s=ge.jt.signedWidth(t)<0?i:-i;e+=(ge.jt.signedWidth(t)+s)*r.x,uh("ew-resize")}if(ge.jt.height(t)>o&&ge.jt.height(t)>ge.jt.width(t)){const s=ge.jt.signedHeight(t)<0?o:-o;e+=(ge.jt.signedHeight(t)+s)*r.y,uh("ns-resize")}return e},hc=({direction:e,className:t,dragScale:r={x:10,y:1},dragThreshold:n=15,dragDirection:a,onChange:i,value:o,resetValue:s,onDragEnd:u,...l})=>{const c=wr.useRef({dragging:!1,curr:o,prev:o}),f=wr.useRef(null);c.current.dragging||(c.current.prev=o);const m=wr.useMemo(()=>{const p=ge.Q.construct(r);return a==="x"?ge.Q.construct(p.x,0):a==="y"?ge.Q.construct(0,p.y):p},[r,a]),d=wr.useMemo(()=>n!=null?ge.Q.construct(n):null,[n]);PN.useVirtualCursorDragWebKit({ref:f,onMove:wr.useCallback(p=>{if(f.current==null)return;let y=c.current.prev;c.current.dragging=!0,y=lh(y,p,m,d,ge.jt.construct(f.current)),c.current.curr=y,i(y)},[i,m,d]),onEnd:wr.useCallback((p,y)=>{if(f.current==null)return;let w=c.current.prev;w=lh(w,p,m,d,ge.jt.construct(f.current)),c.current.prev=w,c.current.dragging=!1,Hb(),u?.(w),l.onBlur?.()},[l.onBlur,u,m,d])});const h=wr.useCallback(()=>{i(s??c.current.prev)},[i,s]);return Ae.jsxRuntimeExports.jsx(Fn.Button,{ref:f,variant:"outlined",className:ge.CSS(ge.CSS.BE("input","drag-btn"),e!=null&&ge.CSS.BEM("input","drag-btn","direction",e),t),tabIndex:-1,onDoubleClick:h,onClick:Js.preventDefault,contrast:0,textColor:9,...l,children:Ae.jsxRuntimeExports.jsx(Pa.Drag,{})})},_N={x:Number(ge.r.HOUR.valueOf()),y:Number(ge.r.days(.75).valueOf())},Gb=({value:e,onChange:t})=>{const r=new ge.r(e,"UTC");wr.useLayoutEffect(()=>{const i=r.sub(ge.r.utcOffset);if(i.remainder(ge.r.DAY).isZero)return;const o=i.sub(i.remainder(ge.r.DAY));t(Number(new ge.r(o,"local").valueOf()))},[e]);const n=i=>{let o;if(typeof i=="number")o=new ge.r(i,"UTC");else{if(i.length===0)return;o=new ge.r(i,"local")}t(Number(o.valueOf()))};return{value:r.toString("ISODate","local"),onChange:n}},IN=({ref:e,onChange:t,value:r,className:n,showDragHandle:a=!0,children:i,...o})=>{const{value:s,onChange:u}=Gb({value:r,onChange:t});return Ae.jsxRuntimeExports.jsxs(za.Text,{ref:e,value:s,className:ge.CSS(ge.CSS.B("input-date"),n),onChange:u,type:"date",...o,children:[a&&Ae.jsxRuntimeExports.jsx(hc,{value:r,onChange:u,dragScale:_N}),i]})};let zN={one:{},two:{},three:{},four:{}},jN={one:{},two:{},three:{}},qN={},RN=[];const Uf={methods:zN,model:jN,compute:qN,hooks:RN},LN=e=>Object.prototype.toString.call(e)==="[object Array]",HN={compute:function(e){const{world:t}=this,r=t.compute;return typeof e=="string"&&r.hasOwnProperty(e)?r[e](this):LN(e)?e.forEach(n=>{t.compute.hasOwnProperty(n)?r[n](this):console.warn("no compute:",e)}):typeof e=="function"?e(this):console.warn("no compute:",e),this}},GN=function(e){return this.fullPointer.forEach((r,n)=>{let a=this.update([r]);e(a,n)}),this},VN=function(e,t){let n=this.fullPointer.map((i,o)=>{let s=this.update([i]),u=e(s,o);return u===void 0?this.none():u});if(n.length===0)return t||this.update([]);if(n[0]!==void 0&&(typeof n[0]=="string"||typeof n[0]=="object"&&(n[0]===null||!n[0].isView)))return n;let a=[];return n.forEach(i=>{a=a.concat(i.fullPointer)}),this.toView(a)},UN=function(e){let t=this.fullPointer;return t=t.filter((n,a)=>{let i=this.update([n]);return e(i,a)}),this.update(t)},WN=function(e){let r=this.fullPointer.find((n,a)=>{let i=this.update([n]);return e(i,a)});return this.update([r])},JN=function(e){return this.fullPointer.some((r,n)=>{let a=this.update([r]);return e(a,n)})},KN=function(e=1){let t=this.fullPointer,r=Math.floor(Math.random()*t.length);return r+e>this.length&&(r=this.length-e,r=r<0?0:r),t=t.slice(r,r+e),this.update(t)},YN={forEach:GN,map:VN,filter:UN,find:WN,some:JN,random:KN},Yn={termList:function(){return this.methods.one.termList(this.docs)},terms:function(e){let t=this.match(".");return typeof e=="number"?t.eq(e):t},groups:function(e){if(e||e===0)return this.update(this._groups[e]||[]);let t={};return Object.keys(this._groups).forEach(r=>{t[r]=this.update(this._groups[r])}),t},eq:function(e){let t=this.pointer;return t||(t=this.docs.map((r,n)=>[n])),t[e]?this.update([t[e]]):this.none()},first:function(){return this.eq(0)},last:function(){let e=this.fullPointer.length-1;return this.eq(e)},firstTerms:function(){return this.match("^.")},lastTerms:function(){return this.match(".$")},slice:function(e,t){let r=this.pointer||this.docs.map((n,a)=>[a]);return r=r.slice(e,t),this.update(r)},all:function(){return this.update().toView()},fullSentences:function(){let e=this.fullPointer.map(t=>[t[0]]);return this.update(e).toView()},none:function(){return this.update([])},isDoc:function(e){if(!e||!e.isView)return!1;let t=this.fullPointer,r=e.fullPointer;return!t.length===r.length?!1:t.every((n,a)=>r[a]?n[0]===r[a][0]&&n[1]===r[a][1]&&n[2]===r[a][2]:!1)},wordCount:function(){return this.docs.reduce((e,t)=>(e+=t.filter(r=>r.text!=="").length,e),0)},isFull:function(){let e=this.pointer;if(!e)return!0;if(e.length===0||e[0][0]!==0)return!1;let t=0,r=0;return this.document.forEach(n=>t+=n.length),this.docs.forEach(n=>r+=n.length),t===r},getNth:function(e){return typeof e=="number"?this.eq(e):typeof e=="string"?this.if(e):this}};Yn.group=Yn.groups;Yn.fullSentence=Yn.fullSentences;Yn.sentence=Yn.fullSentences;Yn.lastTerm=Yn.lastTerms;Yn.firstTerm=Yn.firstTerms;const Wf=Object.assign({},Yn,HN,YN);Wf.get=Wf.eq;class oi{constructor(t,r,n={}){[["document",t],["world",Uf],["_groups",n],["_cache",null],["viewType","View"]].forEach(i=>{Object.defineProperty(this,i[0],{value:i[1],writable:!0})}),this.ptrs=r}get docs(){let t=this.document;return this.ptrs&&(t=Uf.methods.one.getDoc(this.ptrs,this.document)),t}get pointer(){return this.ptrs}get methods(){return this.world.methods}get model(){return this.world.model}get hooks(){return this.world.hooks}get isView(){return!0}get found(){return this.docs.length>0}get length(){return this.docs.length}get fullPointer(){let{docs:t,ptrs:r,document:n}=this;return(r||t.map((i,o)=>[o])).map(i=>{let[o,s,u,l,c]=i;return s=s||0,u=u||(n[o]||[]).length,n[o]&&n[o][s]&&(l=l||n[o][s].id,n[o][u-1]&&(c=c||n[o][u-1].id)),[o,s,u,l,c]})}update(t){let r=new oi(this.document,t);if(this._cache&&t&&t.length>0){let n=[];t.forEach((a,i)=>{let[o,s,u]=a;a.length===1?n[i]=this._cache[o]:s===0&&this.document[o].length===u&&(n[i]=this._cache[o])}),n.length>0&&(r._cache=n)}return r.world=this.world,r}toView(t){return new oi(this.document,t||this.pointer)}fromText(t){const{methods:r}=this;let n=r.one.tokenize.fromString(t,this.world),a=new oi(n);return a.world=this.world,a.compute(["normal","freeze","lexicon"]),this.world.compute.preTagger&&a.compute("preTagger"),a.compute("unfreeze"),a}clone(){let t=this.document.slice(0);t=t.map(n=>n.map(a=>(a=Object.assign({},a),a.tags=new Set(a.tags),a)));let r=this.update(this.pointer);return r.document=t,r._cache=this._cache,r}}Object.assign(oi.prototype,Wf);const ZN="14.14.4",ch=function(e){return e&&typeof e=="object"&&!Array.isArray(e)};function Vb(e,t){if(ch(t))for(const r in t)ch(t[r])?(e[r]||Object.assign(e,{[r]:{}}),Vb(e[r],t[r])):Object.assign(e,{[r]:t[r]});return e}function QN(e,t){for(const r in t)e[r]=e[r]||{},Object.assign(e[r],t[r]);return e}const XN=function(e,t){let r=e.two.models||{};Object.keys(t).forEach(n=>{t[n].pastTense&&(r.toPast&&(r.toPast.ex[n]=t[n].pastTense),r.fromPast&&(r.fromPast.ex[t[n].pastTense]=n)),t[n].presentTense&&(r.toPresent&&(r.toPresent.ex[n]=t[n].presentTense),r.fromPresent&&(r.fromPresent.ex[t[n].presentTense]=n)),t[n].gerund&&(r.toGerund&&(r.toGerund.ex[n]=t[n].gerund),r.fromGerund&&(r.fromGerund.ex[t[n].gerund]=n)),t[n].comparative&&(r.toComparative&&(r.toComparative.ex[n]=t[n].comparative),r.fromComparative&&(r.fromComparative.ex[t[n].comparative]=n)),t[n].superlative&&(r.toSuperlative&&(r.toSuperlative.ex[n]=t[n].superlative),r.fromSuperlative&&(r.fromSuperlative.ex[t[n].superlative]=n))})},eA=function(e,t,r,n){const{methods:a,model:i,compute:o,hooks:s}=t;e.methods&&QN(a,e.methods),e.model&&Vb(i,e.model),e.irregulars&&XN(i,e.irregulars),e.compute&&Object.assign(o,e.compute),s&&(t.hooks=s.concat(e.hooks||[])),e.api&&e.api(r),e.lib&&Object.keys(e.lib).forEach(u=>n[u]=e.lib[u]),e.tags&&n.addTags(e.tags),e.words&&n.addWords(e.words),e.frozen&&n.addWords(e.frozen,!0),e.mutate&&e.mutate(t,n)},tA=function(e){const t=typeof process>"u"||!process.env?self.env||{}:process.env;return t.DEBUG_TAGS=e==="tagger"||e===!0?!0:"",t.DEBUG_MATCH=e==="match"||e===!0?!0:"",t.DEBUG_CHUNKS=e==="chunker"||e===!0?!0:"",this},rA=e=>Object.prototype.toString.call(e)==="[object Object]",Jf=function(e){return Object.prototype.toString.call(e)==="[object Array]"},nA=function(e){return e.map(t=>t.terms.map(r=>(Jf(r.tags)&&(r.tags=new Set(r.tags)),r)))},aA=function(e){return e.map(t=>t.map(r=>({text:r,normal:r,pre:"",post:" ",tags:new Set})))},Ub=function(e,t,r){const{methods:n}=r;let a=new t([]);if(a.world=r,typeof e=="number"&&(e=String(e)),!e)return a;if(typeof e=="string"){let i=n.one.tokenize.fromString(e,r);return new t(i)}if(rA(e)&&e.isView)return new t(e.document,e.ptrs);if(Jf(e)){if(Jf(e[0])){let o=aA(e);return new t(o)}let i=nA(e);return new t(i)}return a};let $l=Object.assign({},Uf);const et=function(e,t){t&&et.addWords(t);let r=Ub(e,oi,$l);return e&&r.compute($l.hooks),r};Object.defineProperty(et,"_world",{value:$l,writable:!0});et.tokenize=function(e,t){const{compute:r}=this._world;t&&et.addWords(t);let n=Ub(e,oi,$l);return r.contractions&&n.compute(["alias","normal","machine","contractions"]),n};et.plugin=function(e){return eA(e,this._world,oi,this),this};et.extend=et.plugin;et.world=function(){return this._world};et.model=function(){return this._world.model};et.methods=function(){return this._world.methods};et.hooks=function(){return this._world.hooks};et.verbose=tA;et.version=ZN;const iA=function(e){return e.map(r=>{let n=new Set;return r.forEach(a=>{a.normal!==""&&n.add(a.normal),a.switch&&n.add(`%${a.switch}%`),a.implicit&&n.add(a.implicit),a.machine&&n.add(a.machine),a.root&&n.add(a.root),a.alias&&a.alias.forEach(o=>n.add(o));let i=Array.from(a.tags);for(let o=0;o<i.length;o+=1)n.add("#"+i[o])}),n})},oA={one:{cacheDoc:iA}},sA={cache:function(){return this._cache=this.methods.one.cacheDoc(this.document),this},uncache:function(){return this._cache=null,this}},uA=function(e){Object.assign(e.prototype,sA)},lA={cache:function(e){e._cache=e.methods.one.cacheDoc(e.document)}},cA={api:uA,compute:lA,methods:oA},fA={toLowerCase:function(){return this.termList().forEach(e=>{e.text=e.text.toLowerCase()}),this},toUpperCase:function(){return this.termList().forEach(e=>{e.text=e.text.toUpperCase()}),this},toTitleCase:function(){return this.termList().forEach(e=>{e.text=e.text.replace(/^ *[a-z\u00C0-\u00FF]/,t=>t.toUpperCase())}),this},toCamelCase:function(){return this.docs.forEach(e=>{e.forEach((t,r)=>{r!==0&&(t.text=t.text.replace(/^ *[a-z\u00C0-\u00FF]/,n=>n.toUpperCase())),r!==e.length-1&&(t.post="")})}),this}},fh=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e)||new RegExp("^\\p{Lu}$","u").test(e),mA=e=>e.replace(new RegExp("^\\p{Ll}","u"),t=>t.toUpperCase()),dA=e=>e.replace(new RegExp("^\\p{Lu}","u"),t=>t.toLowerCase()),Wb=(e,t,r)=>{if(r.forEach(n=>n.dirty=!0),e){let n=[t,0].concat(r);Array.prototype.splice.apply(e,n)}return e},Oo=function(e){const t=/ $/,r=/[-–—]/;let n=e[e.length-1];n&&!t.test(n.post)&&!r.test(n.post)&&(n.post+=" ")},mh=(e,t,r)=>{const n=/[-.?!,;:)–—'"]/g;let a=e[t-1];if(!a)return;let i=a.post;if(n.test(i)){let o=i.match(n).join(""),s=r[r.length-1];s.post=o+s.post,a.post=a.post.replace(n,"")}},hA=function(e,t,r){let n=e[t];if(t!==0||!fh(n.text))return;r[0].text=mA(r[0].text);let a=e[t];a.tags.has("ProperNoun")||a.tags.has("Acronym")||fh(a.text)&&a.text.length>1&&(a.text=dA(a.text))},pA=function(e,t,r,n){let[a,i,o]=t;i===0||o===n[a].length?Oo(r):(Oo(r),Oo([e[t[1]]])),hA(e,i,r),Wb(e,i,r)},gA=function(e,t,r,n){let[a,,i]=t,o=(n[a]||[]).length;i<o?(mh(e,i,r),Oo(r)):o===i&&(Oo(e),mh(e,i,r),n[a+1]&&(r[r.length-1].post+=" ")),Wb(e,t[2],r),t[4]=r[r.length-1].id};let ps=0;const dh=e=>(e=e.length<3?"0"+e:e,e.length<3?"0"+e:e),Jb=function(e){let[t,r]=e.index||[0,0];ps+=1,ps=ps>46655?0:ps,t=t>46655?0:t,r=r>1294?0:r;let n=dh(ps.toString(36));n+=dh(t.toString(36));let a=r.toString(36);a=a.length<2?"0"+a:a,n+=a;let i=parseInt(Math.random()*36,10);return n+=i.toString(36),e.normal+"|"+n.toUpperCase()},hh=function(e){e.has("@hasContraction")&&typeof e.contractions=="function"&&e.grow("@hasContraction").contractions().expand()},ph=e=>Object.prototype.toString.call(e)==="[object Array]",vA=function(e){return e=e.map(t=>(t.id=Jb(t),t)),e},yA=function(e,t){const{methods:r}=t;return typeof e=="string"?r.one.tokenize.fromString(e,t)[0]:typeof e=="object"&&e.isView?e.clone().docs[0]||[]:ph(e)?ph(e[0])?e[0]:e:[]},gh=function(e,t,r){const{document:n,world:a}=t;t.uncache();let i=t.fullPointer,o=t.fullPointer;t.forEach((u,l)=>{let c=u.fullPointer[0],[f]=c,m=n[f],d=yA(e,a);d.length!==0&&(d=vA(d),r?(hh(t.update([c]).firstTerm()),pA(m,c,d,n)):(hh(t.update([c]).lastTerm()),gA(m,c,d,n)),n[f]&&n[f][c[1]]&&(c[3]=n[f][c[1]].id),o[l]=c,c[2]+=d.length,i[l]=c)});let s=t.toView(i);return t.ptrs=o,s.compute(["id","index","freeze","lexicon"]),s.world.compute.preTagger&&s.compute("preTagger"),s.compute("unfreeze"),s},Ki={insertAfter:function(e){return gh(e,this,!1)},insertBefore:function(e){return gh(e,this,!0)}};Ki.append=Ki.insertAfter;Ki.prepend=Ki.insertBefore;Ki.insert=Ki.insertAfter;const bA=/\$[0-9a-z]+/g,rd={},wA=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e)||new RegExp("^\\p{Lu}$","u").test(e),xA=e=>e.replace(new RegExp("^\\p{Ll}","u"),t=>t.toUpperCase()),DA=e=>e.replace(new RegExp("^\\p{Lu}","u"),t=>t.toLowerCase()),NA=function(e,t,r){return e.forEach(n=>{let a=t(n);n.replaceWith(a,r)}),e},AA=function(e,t){if(typeof e!="string")return e;let r=t.groups();return e=e.replace(bA,n=>{let a=n.replace(/\$/,"");return r.hasOwnProperty(a)?r[a].text():n}),e};rd.replaceWith=function(e,t={}){let r=this.fullPointer,n=this;if(this.uncache(),typeof e=="function")return NA(n,e,t);let a=n.docs[0];if(!a)return n;let i=t.possessives&&a[a.length-1].tags.has("Possessive"),o=t.case&&wA(a[0].text);e=AA(e,n);let s=this.update(r);r=r.map(m=>m.slice(0,3));let u=(s.docs[0]||[]).map(m=>Array.from(m.tags)),l=s.docs[0][0].pre,c=s.docs[0][s.docs[0].length-1].post;if(typeof e=="string"&&(e=this.fromText(e).compute("id")),n.insertAfter(e),s.has("@hasContraction")&&n.contractions&&n.grow("@hasContraction+").contractions().expand(),n.delete(s),i){let m=n.docs[0],d=m[m.length-1];d.tags.has("Possessive")||(d.text+="'s",d.normal+="'s",d.tags.add("Possessive"))}if(l&&n.docs[0]&&(n.docs[0][0].pre=l),c&&n.docs[0]){let m=n.docs[0][n.docs[0].length-1];m.post.trim()||(m.post=c)}let f=n.toView(r).compute(["index","freeze","lexicon"]);if(f.world.compute.preTagger&&f.compute("preTagger"),f.compute("unfreeze"),t.tags&&f.terms().forEach((m,d)=>{m.tagSafe(u[d])}),!f.docs[0]||!f.docs[0][0])return f;if(t.case){let m=o?xA:DA;f.docs[0][0].text=m(f.docs[0][0].text)}return f};rd.replace=function(e,t,r){if(e&&!t)return this.replaceWith(e,r);let n=this.match(e);return n.found?(this.soften(),n.replaceWith(t,r)):this};const CA=function(e,t){let r=e.length-1,n=e[r],a=e[r-t];a&&n&&(a.post+=n.post,a.post=a.post.replace(/ +([.?!,;:])/,"$1"),a.post=a.post.replace(/[,;:]+([.?!])/,"$1"))},EA=function(e,t){t.forEach(r=>{let[n,a,i]=r,o=i-a;e[n]&&(i===e[n].length&&i>1&&CA(e[n],o),e[n].splice(a,o))});for(let r=e.length-1;r>=0;r-=1)if(e[r].length===0&&(e.splice(r,1),r===e.length&&e[r-1])){let n=e[r-1],a=n[n.length-1];a&&(a.post=a.post.trimEnd())}return e},SA=function(e,t){return e=e.map(r=>{let[n]=r;return t[n]&&t[n].forEach(a=>{let i=a[2]-a[1];r[1]<=a[1]&&r[2]>=a[2]&&(r[2]-=i)}),r}),e.forEach((r,n)=>{if(r[1]===0&&r[2]==0)for(let a=n+1;a<e.length;a+=1)e[a][0]-=1,e[a][0]<0&&(e[a][0]=0)}),e=e.filter(r=>r[2]-r[1]>0),e=e.map(r=>(r[3]=null,r[4]=null,r)),e},Kf={remove:function(e){const{indexN:t}=this.methods.one.pointer;this.uncache();let r=this.all(),n=this;e&&(r=this,n=this.match(e));let a=!r.ptrs;n.has("@hasContraction")&&n.contractions&&n.grow("@hasContraction").contractions().expand();let i=r.fullPointer,o=n.fullPointer.reverse(),s=EA(this.document,o),u=t(o);return i=SA(i,u),r.ptrs=i,r.document=s,r.compute("index"),a&&(r.ptrs=void 0),e?r.toView(i):(this.ptrs=[],r.none())}};Kf.delete=Kf.remove;const $s={pre:function(e,t){return e===void 0&&this.found?this.docs[0][0].pre:(this.docs.forEach(r=>{let n=r[0];t===!0?n.pre+=e:n.pre=e}),this)},post:function(e,t){if(e===void 0){let r=this.docs[this.docs.length-1];return r[r.length-1].post}return this.docs.forEach(r=>{let n=r[r.length-1];t===!0?n.post+=e:n.post=e}),this},trim:function(){if(!this.found)return this;let e=this.docs,t=e[0][0];t.pre=t.pre.trimStart();let r=e[e.length-1],n=r[r.length-1];return n.post=n.post.trimEnd(),this},hyphenate:function(){return this.docs.forEach(e=>{e.forEach((t,r)=>{r!==0&&(t.pre=""),e[r+1]&&(t.post="-")})}),this},dehyphenate:function(){const e=/[-–—]/;return this.docs.forEach(t=>{t.forEach(r=>{e.test(r.post)&&(r.post=" ")})}),this},toQuotations:function(e,t){return e=e||'"',t=t||'"',this.docs.forEach(r=>{r[0].pre=e+r[0].pre;let n=r[r.length-1];n.post=t+n.post}),this},toParentheses:function(e,t){return e=e||"(",t=t||")",this.docs.forEach(r=>{r[0].pre=e+r[0].pre;let n=r[r.length-1];n.post=t+n.post}),this}};$s.deHyphenate=$s.dehyphenate;$s.toQuotation=$s.toQuotations;const MA=(e,t)=>e.normal<t.normal?-1:e.normal>t.normal?1:0,TA=(e,t)=>{let r=e.normal.trim().length,n=t.normal.trim().length;return r<n?1:r>n?-1:0},FA=(e,t)=>e.words<t.words?1:e.words>t.words?-1:0,PA=(e,t)=>e[0]<t[0]?1:e[0]>t[0]?-1:e[1]>t[1]?1:-1,kA=function(e){let t={};return e.forEach(r=>{t[r.normal]=t[r.normal]||0,t[r.normal]+=1}),e.sort((r,n)=>{let a=t[r.normal],i=t[n.normal];return a<i?1:a>i?-1:0}),e},Hc={alpha:MA,length:TA,wordCount:FA,sequential:PA,byFreq:kA},OA=new Set(["index","sequence","seq","sequential","chron","chronological"]),BA=new Set(["freq","frequency","topk","repeats"]),$A=new Set(["alpha","alphabetical"]),_A=function(e,t){let r=e.fullPointer;return r=r.sort((n,a)=>(n=e.update([n]),a=e.update([a]),t(n,a))),e.ptrs=r,e},IA=function(e){let{docs:t,pointer:r}=this;if(this.uncache(),typeof e=="function")return _A(this,e);e=e||"alpha";let n=r||t.map((i,o)=>[o]),a=t.map((i,o)=>({index:o,words:i.length,normal:i.map(s=>s.machine||s.normal||"").join(" "),pointer:n[o]}));return OA.has(e)&&(e="sequential"),$A.has(e)&&(e="alpha"),BA.has(e)?(a=Hc.byFreq(a),this.update(a.map(i=>i.pointer))):typeof Hc[e]=="function"?(a=a.sort(Hc[e]),this.update(a.map(i=>i.pointer))):this},zA=function(){let e=this.pointer||this.docs.map((t,r)=>[r]);return e=[].concat(e),e=e.reverse(),this._cache&&(this._cache=this._cache.reverse()),this.update(e)},jA=function(){let e=new Set;return this.filter(r=>{let n=r.text("machine");return e.has(n)?!1:(e.add(n),!0)})},qA={unique:jA,reverse:zA,sort:IA},RA=e=>Object.prototype.toString.call(e)==="[object Array]",Kb=function(e,t){if(e.length>0){let r=e[e.length-1],n=r[r.length-1];/ /.test(n.post)===!1&&(n.post+=" ")}return e=e.concat(t),e},LA=function(e,t){if(e.document===t.document){let n=e.fullPointer.concat(t.fullPointer);return e.toView(n).compute("index")}return t.fullPointer.forEach(n=>{n[0]+=e.document.length}),e.document=Kb(e.document,t.docs),e.all()},HA={concat:function(e){if(typeof e=="string"){let t=this.fromText(e);if(!this.found||!this.ptrs)this.document=this.document.concat(t.document);else{let r=this.fullPointer,n=r[r.length-1][0];this.document.splice(n,0,...t.document)}return this.all().compute("index")}if(typeof e=="object"&&e.isView)return LA(this,e);if(RA(e)){let t=Kb(this.document,e);return this.document=t,this.all()}return this}},GA=function(){return this.ptrs=this.fullPointer,this},VA=function(){let e=this.ptrs;return!e||e.length<1?this:(e=e.map(t=>t.slice(0,3)),this.ptrs=e,this)},UA={harden:GA,soften:VA},WA=Object.assign({},fA,Ki,rd,Kf,$s,qA,HA,UA),JA=function(e){Object.assign(e.prototype,WA)},KA={id:function(e){let t=e.docs;for(let r=0;r<t.length;r+=1)for(let n=0;n<t[r].length;n+=1){let a=t[r][n];a.id=a.id||Jb(a)}}},YA={api:JA,compute:KA},ZA=[{word:"@",out:["at"]},{word:"arent",out:["are","not"]},{word:"alot",out:["a","lot"]},{word:"brb",out:["be","right","back"]},{word:"cannot",out:["can","not"]},{word:"dun",out:["do","not"]},{word:"can't",out:["can","not"]},{word:"shan't",out:["should","not"]},{word:"won't",out:["will","not"]},{word:"that's",out:["that","is"]},{word:"what's",out:["what","is"]},{word:"let's",out:["let","us"]},{word:"dunno",out:["do","not","know"]},{word:"gonna",out:["going","to"]},{word:"gotta",out:["have","got","to"]},{word:"gimme",out:["give","me"]},{word:"outta",out:["out","of"]},{word:"tryna",out:["trying","to"]},{word:"gtg",out:["got","to","go"]},{word:"im",out:["i","am"]},{word:"imma",out:["I","will"]},{word:"imo",out:["in","my","opinion"]},{word:"irl",out:["in","real","life"]},{word:"ive",out:["i","have"]},{word:"rn",out:["right","now"]},{word:"tbh",out:["to","be","honest"]},{word:"wanna",out:["want","to"]},{word:"c'mere",out:["come","here"]},{word:"c'mon",out:["come","on"]},{word:"shoulda",out:["should","have"]},{word:"coulda",out:["coulda","have"]},{word:"woulda",out:["woulda","have"]},{word:"musta",out:["must","have"]},{word:"tis",out:["it","is"]},{word:"twas",out:["it","was"]},{word:"y'know",out:["you","know"]},{word:"ne'er",out:["never"]},{word:"o'er",out:["over"]},{after:"ll",out:["will"]},{after:"ve",out:["have"]},{after:"re",out:["are"]},{after:"m",out:["am"]},{before:"c",out:["ce"]},{before:"m",out:["me"]},{before:"n",out:["ne"]},{before:"qu",out:["que"]},{before:"s",out:["se"]},{before:"t",out:["tu"]},{word:"shouldnt",out:["should","not"]},{word:"couldnt",out:["could","not"]},{word:"wouldnt",out:["would","not"]},{word:"hasnt",out:["has","not"]},{word:"wasnt",out:["was","not"]},{word:"isnt",out:["is","not"]},{word:"cant",out:["can","not"]},{word:"dont",out:["do","not"]},{word:"wont",out:["will","not"]},{word:"howd",out:["how","did"]},{word:"whatd",out:["what","did"]},{word:"whend",out:["when","did"]},{word:"whered",out:["where","did"]}],un=!0,QA={st:un,nd:un,rd:un,th:un,am:un,pm:un,max:un,"°":un,s:un,e:un,er:un,ère:un,ème:un},XA={one:{contractions:ZA,numberSuffixes:QA}},Gc=function(e,t,r){let[n,a]=t;!r||r.length===0||(r=r.map((i,o)=>(i.implicit=i.text,i.machine=i.text,i.pre="",i.post="",i.text="",i.normal="",i.index=[n,a+o],i)),r[0]&&(r[0].pre=e[n][a].pre,r[r.length-1].post=e[n][a].post,r[0].text=e[n][a].text,r[0].normal=e[n][a].normal),e[n].splice(a,1,...r))},e3=/'/,t3=new Set(["what","how","when","where","why"]),r3=new Set(["be","go","start","think","need"]),n3=new Set(["been","gone"]),a3=function(e,t){let r=e[t].normal.split(e3)[0];if(t3.has(r))return[r,"did"];if(e[t+1]){if(n3.has(e[t+1].normal))return[r,"had"];if(r3.has(e[t+1].normal))return[r,"would"]}return null},i3=function(e,t){return e[t].normal==="ain't"||e[t].normal==="aint"?null:[e[t].normal.replace(/n't/,""),"not"]},nd=/'/,o3=/(e|é|aison|sion|tion)$/,s3=/(age|isme|acle|ege|oire)$/,u3=(e,t)=>{let r=e[t].normal.split(nd)[1];return r&&r.endsWith("e")?["la",r]:["le",r]},l3=(e,t)=>{let r=e[t].normal.split(nd)[1];return r&&o3.test(r)&&!s3.test(r)?["du",r]:r&&r.endsWith("s")?["des",r]:["de",r]},c3=(e,t)=>["je",e[t].normal.split(nd)[1]],Vc={preJ:c3,preL:u3,preD:l3},f3=/^([0-9.]{1,4}[a-z]{0,2}) ?[-–—] ?([0-9]{1,4}[a-z]{0,2})$/i,m3=/^([0-9]{1,2}(:[0-9][0-9])?(am|pm)?) ?[-–—] ?([0-9]{1,2}(:[0-9][0-9])?(am|pm)?)$/i,d3=/^[0-9]{3}-[0-9]{4}$/,h3=function(e,t){let r=e[t],n=r.text.match(f3);return n!==null?r.tags.has("PhoneNumber")===!0||d3.test(r.text)?null:[n[1],"to",n[2]]:(n=r.text.match(m3),n!==null?[n[1],"to",n[4]]:null)},p3=/^([+-]?[0-9][.,0-9]*)([a-z°²³µ/]+)$/,g3=function(e,t,r){const n=r.model.one.numberSuffixes||{};let i=e[t].text.match(p3);if(i!==null){let o=i[2].toLowerCase().trim();return n.hasOwnProperty(o)?null:[i[1],o]}return null},vh=/'/,v3=/^[0-9][^-–—]*[-–—].*?[0-9]/,yh=function(e,t,r,n){let a=t.update();a.document=[e];let i=r+n;r>0&&(r-=1),e[i]&&(i+=1),a.ptrs=[[0,r,i]]},bh={t:(e,t)=>i3(e,t),d:(e,t)=>a3(e,t)},wh={j:(e,t)=>Vc.preJ(e,t),l:(e,t)=>Vc.preL(e,t),d:(e,t)=>Vc.preD(e,t)},y3=function(e,t,r,n){for(let a=0;a<e.length;a+=1){let i=e[a];if(i.word===t.normal)return i.out;if(n!==null&&n===i.after)return[r].concat(i.out);if(r!==null&&r===i.before&&n&&n.length>2)return i.out.concat(n)}return null},Uc=function(e,t){let r=t.fromText(e.join(" "));return r.compute(["id","alias"]),r.docs[0]},b3=function(e,t){for(let r=t+1;r<5&&e[r];r+=1)if(e[r].normal==="been")return["there","has"];return["there","is"]},w3=e=>{let{world:t,document:r}=e;const{model:n,methods:a}=t;let i=n.one.contractions||[];r.forEach((o,s)=>{for(let u=o.length-1;u>=0;u-=1){let l=null,c=null;if(vh.test(o[u].normal)===!0){let m=o[u].normal.split(vh);l=m[0],c=m[1]}let f=y3(i,o[u],l,c);if(!f&&bh.hasOwnProperty(c)&&(f=bh[c](o,u,t)),!f&&wh.hasOwnProperty(l)&&(f=wh[l](o,u)),l==="there"&&c==="s"&&(f=b3(o,u)),f){f=Uc(f,e),Gc(r,[s,u],f),yh(r[s],e,u,f.length);continue}if(v3.test(o[u].normal)){f=h3(o,u),f&&(f=Uc(f,e),Gc(r,[s,u],f),a.one.setTag(f,"NumberRange",t),f[2]&&f[2].tags.has("Time")&&a.one.setTag([f[0]],"Time",t,null,"time-range"),yh(r[s],e,u,f.length));continue}f=g3(o,u,t),f&&(f=Uc(f,e),Gc(r,[s,u],f),a.one.setTag([f[1]],"Unit",t,null,"contraction-unit"))}})},x3={contractions:w3},D3={model:XA,compute:x3,hooks:["contractions"]},xh=function(e){const t=e.world,{model:r,methods:n}=e.world,a=n.one.setTag,{frozenLex:i}=r.one,o=r.one._multiCache||{};e.docs.forEach(s=>{for(let u=0;u<s.length;u+=1){let l=s[u],c=l.machine||l.normal;if(o[c]!==void 0&&s[u+1]){let f=u+o[c]-1;for(let m=f;m>u;m-=1){let d=s.slice(u,m+1),h=d.map(p=>p.machine||p.normal).join(" ");if(i.hasOwnProperty(h)===!0){a(d,i[h],t,!1,"1-frozen-multi-lexicon"),d.forEach(p=>p.frozen=!0);continue}}}if(i[c]!==void 0&&i.hasOwnProperty(c)){a([l],i[c],t,!1,"1-freeze-lexicon"),l.frozen=!0;continue}}})},N3=function(e){return e.docs.forEach(t=>{t.forEach(r=>{delete r.frozen})}),e},A3={frozen:xh,freeze:xh,unfreeze:N3},Dh=e=>"\x1B[34m"+e+"\x1B[0m",Nh=e=>"\x1B[3m\x1B[2m"+e+"\x1B[0m",Ah=function(e){e.docs.forEach(t=>{console.log(Dh(`
2
+ ┌─────────`)),t.forEach(r=>{let n=` ${Nh("│")} `,a=r.implicit||r.text||"-";r.frozen===!0?n+=`${Dh(a)} ❄️`:n+=Nh(a),console.log(n)})})},C3={compute:A3,mutate:e=>{const t=e.methods.one;t.termMethods.isFrozen=r=>r.frozen===!0,t.debug.freeze=Ah,t.debug.frozen=Ah},api:function(e){e.prototype.freeze=function(){return this.docs.forEach(t=>{t.forEach(r=>{r.frozen=!0})}),this},e.prototype.unfreeze=function(){this.compute("unfreeze")},e.prototype.isFrozen=function(){return this.match("@isFrozen+")}},hooks:["freeze"]},E3=function(e,t,r){const{model:n,methods:a}=r,i=a.one.setTag,o=n.one._multiCache||{},{lexicon:s}=n.one||{};let u=e[t],l=u.machine||u.normal;if(o[l]!==void 0&&e[t+1]){let c=t+o[l]-1;for(let f=c;f>t;f-=1){let m=e.slice(t,f+1);if(m.length<=1)return!1;let d=m.map(h=>h.machine||h.normal).join(" ");if(s.hasOwnProperty(d)===!0){let h=s[d];return i(m,h,r,!1,"1-multi-lexicon"),h&&h.length===2&&(h[0]==="PhrasalVerb"||h[1]==="PhrasalVerb")&&i([m[1]],"Particle",r,!1,"1-phrasal-particle"),!0}}return!1}return null},Ch=/^(under|over|mis|re|un|dis|semi|pre|post)-?/,S3=new Set(["Verb","Infinitive","PastTense","Gerund","PresentTense","Adjective","Participle"]),M3=function(e,t,r){const{model:n,methods:a}=r,i=a.one.setTag,{lexicon:o}=n.one;let s=e[t],u=s.machine||s.normal;if(o[u]!==void 0&&o.hasOwnProperty(u))return i([s],o[u],r,!1,"1-lexicon"),!0;if(s.alias){let l=s.alias.find(c=>o.hasOwnProperty(c));if(l)return i([s],o[l],r,!1,"1-lexicon-alias"),!0}if(Ch.test(u)===!0){let l=u.replace(Ch,"");if(o.hasOwnProperty(l)&&l.length>3&&S3.has(o[l]))return i([s],o[l],r,!1,"1-lexicon-prefix"),!0}return null},T3=function(e){const t=e.world;e.docs.forEach(r=>{for(let n=0;n<r.length;n+=1)if(r[n].tags.size===0){let a=null;a=a||E3(r,n,t),a=a||M3(r,n,t)}})},F3={lexicon:T3},P3=function(e){let t={},r={};return Object.keys(e).forEach(n=>{let a=e[n];n=n.toLowerCase().trim(),n=n.replace(/'s\b/,"");let i=n.split(/ /);i.length>1&&(r[i[0]]===void 0||i.length>r[i[0]])&&(r[i[0]]=i.length),t[n]=t[n]||a}),delete t[""],delete t[null],delete t[" "],{lex:t,_multi:r}},k3={one:{expandLexicon:P3}},O3=function(e,t=!1){const r=this.world(),{methods:n,model:a}=r;if(!e)return;if(Object.keys(e).forEach(s=>{typeof e[s]=="string"&&e[s].startsWith("#")&&(e[s]=e[s].replace(/^#/,""))}),t===!0){let{lex:s,_multi:u}=n.one.expandLexicon(e,r);Object.assign(a.one._multiCache,u),Object.assign(a.one.frozenLex,s);return}if(n.two.expandLexicon){let{lex:s,_multi:u}=n.two.expandLexicon(e,r);Object.assign(a.one.lexicon,s),Object.assign(a.one._multiCache,u)}let{lex:i,_multi:o}=n.one.expandLexicon(e,r);Object.assign(a.one.lexicon,i),Object.assign(a.one._multiCache,o)},B3={addWords:O3},$3={one:{lexicon:{},_multiCache:{},frozenLex:{}}},_3={model:$3,methods:k3,compute:F3,lib:B3,hooks:["lexicon"]},I3=function(e,t){const{methods:r,model:n}=t;return r.one.tokenize.splitTerms(e,n).map(i=>r.one.tokenize.splitWhitespace(i,n)).map(i=>i.text.toLowerCase())},Yb=function(e,t){let r=[{}],n=[null],a=[0],i=[],o=0;e.forEach(function(s){let u=0,l=I3(s,t);for(let c=0;c<l.length;c++){let f=l[c];r[u]&&r[u].hasOwnProperty(f)?u=r[u][f]:(o++,r[u][f]=o,r[o]={},u=o,n[o]=null)}n[u]=[l.length]});for(let s in r[0])o=r[0][s],a[o]=0,i.push(o);for(;i.length;){let s=i.shift(),u=Object.keys(r[s]);for(let l=0;l<u.length;l+=1){let c=u[l],f=r[s][c];for(i.push(f),o=a[s];o>0&&!r[o].hasOwnProperty(c);)o=a[o];if(r.hasOwnProperty(o)){let m=r[o][c];a[f]=m,n[m]&&(n[f]=n[f]||[],n[f]=n[f].concat(n[m]))}else a[f]=0}}return{goNext:r,endAs:n,failTo:a}},z3=function(e,t,r){let n=0,a=[];for(let i=0;i<e.length;i++){let o=e[i][r.form]||e[i].normal;for(;n>0&&(t.goNext[n]===void 0||!t.goNext[n].hasOwnProperty(o));)n=t.failTo[n]||0;if(t.goNext[n].hasOwnProperty(o)&&(n=t.goNext[n][o],t.endAs[n])){let s=t.endAs[n];for(let u=0;u<s.length;u++){let l=s[u],c=e[i-l+1],[f,m]=c.index;a.push([f,m,m+l,c.id])}}}return a},j3=function(e,t){for(let r=0;r<e.length;r+=1)if(t.has(e[r])===!0)return!1;return!0},q3=function(e,t,r){let n=[];r.form=r.form||"normal";let a=e.docs;if(!t.goNext||!t.goNext[0])return console.error("Compromise invalid lookup trie"),e.none();let i=Object.keys(t.goNext[0]);for(let o=0;o<a.length;o++){if(e._cache&&e._cache[o]&&j3(i,e._cache[o])===!0)continue;let s=a[o],u=z3(s,t,r);u.length>0&&(n=n.concat(u))}return e.update(n)},R3=e=>Object.prototype.toString.call(e)==="[object Object]";function L3(e){e.prototype.lookup=function(t,r={}){if(!t)return this.none();typeof t=="string"&&(t=[t]);let n=R3(t)?t:Yb(t,this.world),a=q3(this,n,r);return a=a.settle(),a}}const Wc=(e,t)=>{for(let r=e.length-1;r>=0;r-=1)if(e[r]!==t)return e=e.slice(0,r+1),e;return e},H3=function(e){return e.goNext=e.goNext.map(t=>{if(Object.keys(t).length!==0)return t}),e.goNext=Wc(e.goNext,void 0),e.failTo=Wc(e.failTo,0),e.endAs=Wc(e.endAs,null),e},Yf={buildTrie:function(e){const t=Yb(e,this.world());return H3(t)}};Yf.compile=Yf.buildTrie;const G3={api:L3,lib:Yf},Eh=function(e,t){return t&&e.forEach(r=>{let n=r[0];t[n]&&(r[0]=t[n][0],r[1]+=t[n][1],r[2]+=t[n][1])}),e},Zb=function(e,t){let{ptrs:r,byGroup:n}=e;return r=Eh(r,t),Object.keys(n).forEach(a=>{n[a]=Eh(n[a],t)}),{ptrs:r,byGroup:n}},Ks=function(e,t,r){const n=r.methods.one;return typeof e=="number"&&(e=String(e)),typeof e=="string"&&(e=n.killUnicode(e,r),e=n.parseMatch(e,t,r)),e},Qb=e=>Object.prototype.toString.call(e)==="[object Object]",Ys=e=>e&&Qb(e)&&e.isView===!0,Zs=e=>e&&Qb(e)&&e.isNet===!0,V3=function(e,t,r){const n=this.methods.one;if(Ys(e))return this.intersection(e);if(Zs(e))return this.sweep(e,{tagger:!1}).view.settle();e=Ks(e,r,this.world);let a={regs:e,group:t},i=n.match(this.docs,a,this._cache),{ptrs:o,byGroup:s}=Zb(i,this.fullPointer),u=this.toView(o);return u._groups=s,u},U3=function(e,t,r){const n=this.methods.one;if(Ys(e))return this.intersection(e).eq(0);if(Zs(e))return this.sweep(e,{tagger:!1,matchOne:!0}).view;e=Ks(e,r,this.world);let a={regs:e,group:t,justOne:!0},i=n.match(this.docs,a,this._cache),{ptrs:o,byGroup:s}=Zb(i,this.fullPointer),u=this.toView(o);return u._groups=s,u},W3=function(e,t,r){const n=this.methods.one;if(Ys(e))return this.intersection(e).fullPointer.length>0;if(Zs(e))return this.sweep(e,{tagger:!1}).view.found;e=Ks(e,r,this.world);let a={regs:e,group:t,justOne:!0};return n.match(this.docs,a,this._cache).ptrs.length>0},J3=function(e,t,r){const n=this.methods.one;if(Ys(e))return this.filter(u=>u.intersection(e).found);if(Zs(e)){let u=this.sweep(e,{tagger:!1}).view.settle();return this.if(u)}e=Ks(e,r,this.world);let a={regs:e,group:t,justOne:!0},i=this.fullPointer,o=this._cache||[];i=i.filter((u,l)=>{let c=this.update([u]);return n.match(c.docs,a,o[l]).ptrs.length>0});let s=this.update(i);return this._cache&&(s._cache=i.map(u=>o[u[0]])),s},K3=function(e,t,r){const{methods:n}=this,a=n.one;if(Ys(e))return this.filter(s=>!s.intersection(e).found);if(Zs(e)){let s=this.sweep(e,{tagger:!1}).view.settle();return this.ifNo(s)}e=Ks(e,r,this.world);let i=this._cache||[],o=this.filter((s,u)=>{let l={regs:e,group:t,justOne:!0};return a.match(s.docs,l,i[u]).ptrs.length===0});return this._cache&&(o._cache=o.ptrs.map(s=>i[s[0]])),o},Y3={matchOne:U3,match:V3,has:W3,if:J3,ifNo:K3},Z3=function(e,t,r){const{indexN:n}=this.methods.one.pointer;let a=[],i=n(this.fullPointer);Object.keys(i).forEach(s=>{let u=i[s].sort((l,c)=>l[1]>c[1]?1:-1)[0];u[1]>0&&a.push([u[0],0,u[1]])});let o=this.toView(a);return e?o.match(e,t,r):o},Q3=function(e,t,r){const{indexN:n}=this.methods.one.pointer;let a=[],i=n(this.fullPointer),o=this.document;Object.keys(i).forEach(u=>{let l=i[u].sort((m,d)=>m[1]>d[1]?-1:1)[0],[c,,f]=l;f<o[c].length&&a.push([c,f,o[c].length])});let s=this.toView(a);return e?s.match(e,t,r):s},X3=function(e,t,r){typeof e=="string"&&(e=this.world.methods.one.parseMatch(e,r,this.world)),e[e.length-1].end=!0;let n=this.fullPointer;return this.forEach((a,i)=>{let o=a.before(e,t);if(o.found){let s=o.terms();n[i][1]-=s.length,n[i][3]=s.docs[0][0].id}}),this.update(n)},eC=function(e,t,r){typeof e=="string"&&(e=this.world.methods.one.parseMatch(e,r,this.world)),e[0].start=!0;let n=this.fullPointer;return this.forEach((a,i)=>{let o=a.after(e,t);if(o.found){let s=o.terms();n[i][2]+=s.length,n[i][4]=null}}),this.update(n)},tC=function(e,t,r){return this.growRight(e,t,r).growLeft(e,t,r)},rC={before:Z3,after:Q3,growLeft:X3,growRight:eC,grow:tC},Xb=function(e,t){return[e[0],e[1],t[2]]},nC=function(e){return Object.prototype.toString.call(e)==="[object Array]"},ad=(e,t,r)=>typeof e=="string"||nC(e)?t.match(e,r):e||t.none(),id=function(e,t){let[r,n,a]=e;return t.document[r]&&t.document[r][n]&&(e[3]=e[3]||t.document[r][n].id,t.document[r][a-1]&&(e[4]=e[4]||t.document[r][a-1].id)),e},Ho={};Ho.splitOn=function(e,t){const{splitAll:r}=this.methods.one.pointer;let n=ad(e,this,t).fullPointer,a=r(this.fullPointer,n),i=[];return a.forEach(o=>{i.push(o.passthrough),i.push(o.before),i.push(o.match),i.push(o.after)}),i=i.filter(o=>o),i=i.map(o=>id(o,this)),this.update(i)};Ho.splitBefore=function(e,t){const{splitAll:r}=this.methods.one.pointer;let n=ad(e,this,t).fullPointer,a=r(this.fullPointer,n);for(let o=0;o<a.length;o+=1)!a[o].after&&a[o+1]&&a[o+1].before&&a[o].match&&a[o].match[0]===a[o+1].before[0]&&(a[o].after=a[o+1].before,delete a[o+1].before);let i=[];return a.forEach(o=>{i.push(o.passthrough),i.push(o.before),o.match&&o.after?i.push(Xb(o.match,o.after)):i.push(o.match)}),i=i.filter(o=>o),i=i.map(o=>id(o,this)),this.update(i)};Ho.splitAfter=function(e,t){const{splitAll:r}=this.methods.one.pointer;let n=ad(e,this,t).fullPointer,a=r(this.fullPointer,n),i=[];return a.forEach(o=>{i.push(o.passthrough),o.before&&o.match?i.push(Xb(o.before,o.match)):(i.push(o.before),i.push(o.match)),i.push(o.after)}),i=i.filter(o=>o),i=i.map(o=>id(o,this)),this.update(i)};Ho.split=Ho.splitAfter;const aC=function(e,t){return!e||!t||e[0]!==t[0]?!1:e[2]===t[1]},Sh=function(e,t,r){const n=e.world,a=n.methods.one.parseMatch;t=t||".$",r=r||"^.";let i=a(t,{},n),o=a(r,{},n);i[i.length-1].end=!0,o[0].start=!0;let s=e.fullPointer,u=[s[0]];for(let l=1;l<s.length;l+=1){let c=u[u.length-1],f=s[l],m=e.update([c]),d=e.update([f]);aC(c,f)&&m.has(i)&&d.has(o)?u[u.length-1]=[c[0],c[1],f[2],c[3],f[4]]:u.push(f)}return e.update(u)},iC={joinIf:function(e,t){return Sh(this,e,t)},join:function(){return Sh(this)}},Zn=Object.assign({},Y3,rC,Ho,iC);Zn.lookBehind=Zn.before;Zn.lookBefore=Zn.before;Zn.lookAhead=Zn.after;Zn.lookAfter=Zn.after;Zn.notIf=Zn.ifNo;const oC=function(e){Object.assign(e.prototype,Zn)},sC=/(?:^|\s)([![^]*(?:<[^<]*>)?\/.*?[^\\/]\/[?\]+*$~]*)(?:\s|$)/,uC=/([!~[^]*(?:<[^<]*>)?\([^)]+[^\\)]\)[?\]+*$~]*)(?:\s|$)/,lC=/ /g,cC=e=>/^[![^]*(<[^<]*>)?\(/.test(e)&&/\)[?\]+*$~]*$/.test(e),Mh=e=>/^[![^]*(<[^<]*>)?\//.test(e)&&/\/[?\]+*$~]*$/.test(e),Th=function(e){return e=e.map(t=>t.trim()),e=e.filter(t=>t),e},fC=function(e){let t=e.split(sC),r=[];t.forEach(a=>{if(Mh(a)){r.push(a);return}r=r.concat(a.split(uC))}),r=Th(r);let n=[];return r.forEach(a=>{cC(a)||Mh(a)?n.push(a):n=n.concat(a.split(lC))}),n=Th(n),n},Fh=/\{([0-9]+)?(, *[0-9]*)?\}/,Ph=/&&/,mC=new RegExp(/^<\s*(\S+)\s*>/),kh=e=>e.charAt(0).toUpperCase()+e.substring(1),wn=e=>e.charAt(e.length-1),ln=e=>e.charAt(0),Fo=e=>e.substring(1),Po=e=>e.substring(0,e.length-1),gs=function(e){return e=Fo(e),e=Po(e),e},ew=function(e,t){let r={};for(let n=0;n<2;n+=1){if(wn(e)==="$"&&(r.end=!0,e=Po(e)),ln(e)==="^"&&(r.start=!0,e=Fo(e)),wn(e)==="?"&&(r.optional=!0,e=Po(e)),(ln(e)==="["||wn(e)==="]")&&(r.group=null,ln(e)==="["&&(r.groupStart=!0),wn(e)==="]"&&(r.groupEnd=!0),e=e.replace(/^\[/,""),e=e.replace(/\]$/,""),ln(e)==="<")){const a=mC.exec(e);a.length>=2&&(r.group=a[1],e=e.replace(a[0],""))}if(wn(e)==="+"&&(r.greedy=!0,e=Po(e)),e!=="*"&&wn(e)==="*"&&e!=="\\*"&&(r.greedy=!0,e=Po(e)),ln(e)==="!"&&(r.negative=!0,e=Fo(e)),ln(e)==="~"&&wn(e)==="~"&&e.length>2&&(e=gs(e),r.fuzzy=!0,r.min=t.fuzzy||.85,/\(/.test(e)===!1))return r.word=e,r;if(ln(e)==="/"&&wn(e)==="/")return e=gs(e),t.caseSensitive&&(r.use="text"),r.regex=new RegExp(e),r;if(Fh.test(e)===!0&&(e=e.replace(Fh,(a,i,o)=>(o===void 0?(r.min=Number(i),r.max=Number(i)):(o=o.replace(/, */,""),i===void 0?(r.min=0,r.max=Number(o)):(r.min=Number(i),r.max=Number(o||999))),r.greedy=!0,r.min||(r.optional=!0),""))),ln(e)==="("&&wn(e)===")"){Ph.test(e)?(r.choices=e.split(Ph),r.operator="and"):(r.choices=e.split("|"),r.operator="or"),r.choices[0]=Fo(r.choices[0]);let a=r.choices.length-1;r.choices[a]=Po(r.choices[a]),r.choices=r.choices.map(i=>i.trim()),r.choices=r.choices.filter(i=>i),r.choices=r.choices.map(i=>i.split(/ /g).map(o=>ew(o,t))),e=""}if(ln(e)==="{"&&wn(e)==="}"){if(e=gs(e),r.root=e,/\//.test(e)){let a=r.root.split(/\//);r.root=a[0],r.pos=a[1],r.pos==="adj"&&(r.pos="Adjective"),r.pos=r.pos.charAt(0).toUpperCase()+r.pos.substr(1).toLowerCase(),a[2]!==void 0&&(r.sense=a[2])}return r}if(ln(e)==="<"&&wn(e)===">")return e=gs(e),r.chunk=kh(e),r.greedy=!0,r;if(ln(e)==="%"&&wn(e)==="%")return e=gs(e),r.switch=e,r}return ln(e)==="#"?(r.tag=Fo(e),r.tag=kh(r.tag),r):ln(e)==="@"?(r.method=Fo(e),r):e==="."?(r.anything=!0,r):e==="*"?(r.anything=!0,r.greedy=!0,r.optional=!0,r):(e&&(e=e.replace("\\*","*"),e=e.replace("\\.","."),t.caseSensitive?r.use="text":e=e.toLowerCase(),r.word=e),r)},dC=/[a-z0-9][-–—][a-z]/i,hC=function(e,t){let r=t.model.one.prefixes;for(let n=e.length-1;n>=0;n-=1){let a=e[n];if(a.word&&dC.test(a.word)){let i=a.word.split(/[-–—]/g);if(r.hasOwnProperty(i[0]))continue;i=i.filter(o=>o).reverse(),e.splice(n,1),i.forEach(o=>{let s=Object.assign({},a);s.word=o,e.splice(n,0,s)})}}return e},Oh=function(e,t){let{all:r}=t.methods.two.transform.verb||{},n=e.root;return r?r(n,t.model):[]},Bh=function(e,t){let{all:r}=t.methods.two.transform.noun||{};return r?r(e.root,t.model):[e.root]},$h=function(e,t){let{all:r}=t.methods.two.transform.adjective||{};return r?r(e.root,t.model):[e.root]},pC=function(e,t){return e=e.map(r=>{if(r.root)if(t.methods.two&&t.methods.two.transform){let n=[];r.pos?r.pos==="Verb"?n=n.concat(Oh(r,t)):r.pos==="Noun"?n=n.concat(Bh(r,t)):r.pos==="Adjective"&&(n=n.concat($h(r,t))):(n=n.concat(Oh(r,t)),n=n.concat(Bh(r,t)),n=n.concat($h(r,t))),n=n.filter(a=>a),n.length>0&&(r.operator="or",r.fastOr=new Set(n))}else r.machine=r.root,delete r.id,delete r.root;return r}),e},gC=function(e){let t=0,r=null;for(let n=0;n<e.length;n++){const a=e[n];a.groupStart===!0&&(r=a.group,r===null&&(r=String(t),t+=1)),r!==null&&(a.group=r),a.groupEnd===!0&&(r=null)}return e},vC=function(e){return e.map(t=>{if(t.choices!==void 0){if(t.operator!=="or"||t.fuzzy===!0)return t;t.choices.every(n=>{if(n.length!==1)return!1;let a=n[0];return a.fuzzy===!0||a.start||a.end?!1:a.word!==void 0&&a.negative!==!0&&a.optional!==!0&&a.method!==!0})===!0&&(t.fastOr=new Set,t.choices.forEach(n=>{t.fastOr.add(n[0].word)}),delete t.choices)}return t})},yC=function(e){return e.map(t=>(t.fuzzy&&t.choices&&t.choices.forEach(r=>{r.length===1&&r[0].word&&(r[0].fuzzy=!0,r[0].min=t.min)}),t))},bC=function(e){return e=gC(e),e=vC(e),e=yC(e),e},wC=function(e,t,r){if(e==null||e==="")return[];t=t||{},typeof e=="number"&&(e=String(e));let n=fC(e);return n=n.map(a=>ew(a,t)),n=hC(n,r),n=pC(n,r),n=bC(n),n},xC=function(e,t){for(let r of t)if(e.has(r))return!0;return!1},DC=function(e,t){for(let r=0;r<e.length;r+=1){let n=e[r];if(!(n.optional===!0||n.negative===!0||n.fuzzy===!0)){if(n.word!==void 0&&t.has(n.word)===!1||n.tag!==void 0&&t.has("#"+n.tag)===!1)return!0;if(n.fastOr&&xC(n.fastOr,t)===!1)return!1}}return!1},NC=function(e,t){let r=e.length,n=t.length;if(r===0)return n;if(n===0)return r;let a=(n>r?n:r)+1;if(Math.abs(r-n)>(a||100))return a||100;let i=[];for(let m=0;m<a;m++)i[m]=[m],i[m].length=a;for(let m=0;m<a;m++)i[0][m]=m;let o,s,u,l,c,f;for(let m=1;m<=r;++m)for(s=e[m-1],o=1;o<=n;++o){if(m===o&&i[m][o]>4)return r;u=t[o-1],l=s===u?0:1,c=i[m-1][o]+1,(f=i[m][o-1]+1)<c&&(c=f),(f=i[m-1][o-1]+l)<c&&(c=f),m>1&&o>1&&s===t[o-2]&&e[m-2]===u&&(f=i[m-2][o-2]+l)<c?i[m][o]=f:i[m][o]=c}return i[r][n]},AC=function(e,t,r=3){if(e===t)return 1;if(e.length<r||t.length<r)return 0;const n=NC(e,t);let a=Math.max(e.length,t.length);return 1-(a===0?0:n/a)},CC=/([\u0022\uFF02\u0027\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F])/,EC=/([\u0022\uFF02\u0027\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4])/,_h=/^[-–—]$/,Ih=/ [-–—]{1,3} /,aa=(e,t)=>e.post.indexOf(t)!==-1,_s={hasQuote:e=>CC.test(e.pre)||EC.test(e.post),hasComma:e=>aa(e,","),hasPeriod:e=>aa(e,".")===!0&&aa(e,"...")===!1,hasExclamation:e=>aa(e,"!"),hasQuestionMark:e=>aa(e,"?")||aa(e,"¿"),hasEllipses:e=>aa(e,"..")||aa(e,"…"),hasSemicolon:e=>aa(e,";"),hasColon:e=>aa(e,":"),hasSlash:e=>/\//.test(e.text),hasHyphen:e=>_h.test(e.post)||_h.test(e.pre),hasDash:e=>Ih.test(e.post)||Ih.test(e.pre),hasContraction:e=>!!e.implicit,isAcronym:e=>e.tags.has("Acronym"),isKnown:e=>e.tags.size>0,isTitleCase:e=>new RegExp("^\\p{Lu}[a-z'\\u00C0-\\u00FF]","u").test(e.text),isUpperCase:e=>new RegExp("^\\p{Lu}+$","u").test(e.text)};_s.hasQuotation=_s.hasQuote;let Dr=function(){};const SC=function(e,t,r,n){if(t.anything===!0)return!0;if(t.start===!0&&r!==0||t.end===!0&&r!==n-1)return!1;if(t.id!==void 0&&t.id===e.id)return!0;if(t.word!==void 0)return t.use?t.word===e[t.use]:e.machine!==null&&e.machine===t.word||e.alias!==void 0&&e.alias.hasOwnProperty(t.word)||t.fuzzy===!0&&(t.word===e.root||AC(t.word,e.normal)>=t.min)||e.alias&&e.alias.some(a=>a===t.word)?!0:t.word===e.text||t.word===e.normal;if(t.tag!==void 0)return e.tags.has(t.tag)===!0;if(t.method!==void 0)return typeof _s[t.method]=="function"&&_s[t.method](e)===!0;if(t.pre!==void 0)return e.pre&&e.pre.includes(t.pre);if(t.post!==void 0)return e.post&&e.post.includes(t.post);if(t.regex!==void 0){let a=e.normal;return t.use&&(a=e[t.use]),t.regex.test(a)}if(t.chunk!==void 0)return e.chunk===t.chunk;if(t.switch!==void 0)return e.switch===t.switch;if(t.machine!==void 0)return e.normal===t.machine||e.machine===t.machine||e.root===t.machine;if(t.sense!==void 0)return e.sense===t.sense;if(t.fastOr!==void 0){if(t.pos&&!e.tags.has(t.pos))return null;let a=e.root||e.implicit||e.machine||e.normal;return t.fastOr.has(a)||t.fastOr.has(e.text)}return t.choices!==void 0?t.operator==="and"?t.choices.every(a=>Dr(e,a,r,n)):t.choices.some(a=>Dr(e,a,r,n)):!1};Dr=function(e,t,r,n){let a=SC(e,t,r,n);return t.negative===!0?!a:a};const MC=function(e,t){let r=Object.assign({},e.regs[e.r],{start:!1,end:!1}),n=e.t;for(;e.t<e.terms.length;e.t+=1){if(t&&Dr(e.terms[e.t],t,e.start_i+e.t,e.phrase_length))return e.t;let a=e.t-n+1;if(r.max!==void 0&&a===r.max)return e.t;if(Dr(e.terms[e.t],r,e.start_i+e.t,e.phrase_length)===!1)return r.min!==void 0&&a<r.min?null:e.t}return e.t},TC=function(e,t){let r=e.t;if(!t)return e.terms.length;for(;r<e.terms.length;r+=1)if(Dr(e.terms[r],t,e.start_i+r,e.phrase_length)===!0)return r;return null},FC=function(e,t){if(e.end===!0&&e.greedy===!0&&t.start_i+t.t<t.phrase_length-1){let r=Object.assign({},e,{end:!1});if(Dr(t.terms[t.t],r,t.start_i+t.t,t.phrase_length)===!0)return!0}return!1},pc=function(e,t){return e.groups[e.inGroup]||(e.groups[e.inGroup]={start:t,length:0}),e.groups[e.inGroup]},PC=function(e){let{regs:t}=e,r=t[e.r],n=TC(e,t[e.r+1]);if(n===null||n===0||r.min!==void 0&&n-e.t<r.min)return null;if(r.max!==void 0&&n-e.t>r.max)return e.t=e.t+r.max,!0;if(e.hasGroup===!0){const a=pc(e,e.t);a.length=n-e.t}return e.t=n,!0},kC=function(e){return Object.prototype.toString.call(e)==="[object Array]"},tw=function(e,t=0){let r=e.regs[e.r],n=!1;for(let a=0;a<r.choices.length;a+=1){let i=r.choices[a];if(!kC(i))return!1;if(n=i.every((o,s)=>{let u=0,l=e.t+s+t+u;if(e.terms[l]===void 0)return!1;let c=Dr(e.terms[l],o,l+e.start_i,e.phrase_length);if(c===!0&&o.greedy===!0)for(let f=1;f<e.terms.length;f+=1){let m=e.terms[l+f];if(m)if(Dr(m,o,e.start_i+f,e.phrase_length)===!0)u+=1;else break}return t+=u,c}),n){t+=i.length;break}}return n&&r.greedy===!0?tw(e,t):t},OC=function(e){let t=0;return e.regs[e.r].choices.every(a=>{let i=a.every((o,s)=>{let u=e.t+s;return e.terms[u]===void 0?!1:Dr(e.terms[u],o,u,e.phrase_length)});return i===!0&&a.length>t&&(t=a.length),i})===!0?t:!1},BC=function(e){const{regs:t}=e;let r=t[e.r],n=tw(e);if(n){if(r.negative===!0)return null;if(e.hasGroup===!0){const a=pc(e,e.t);a.length+=n}if(r.end===!0){let a=e.phrase_length;if(e.t+e.start_i+n!==a)return null}return e.t+=n,!0}else if(!r.optional)return null;return!0},$C=function(e){const{regs:t}=e;let r=t[e.r],n=OC(e);if(n){if(r.negative===!0)return null;if(e.hasGroup===!0){const a=pc(e,e.t);a.length+=n}if(r.end===!0){let a=e.phrase_length-1;if(e.t+e.start_i!==a)return null}return e.t+=n,!0}else if(!r.optional)return null;return!0},_C=function(e,t,r){let n=0;for(let a=e.t;a<e.terms.length;a+=1){let i=Dr(e.terms[a],t,e.start_i+e.t,e.phrase_length);if(i||r&&(i=Dr(e.terms[a],r,e.start_i+e.t,e.phrase_length),i)||(n+=1,t.max!==void 0&&n===t.max))break}return n===0||t.min&&t.min>n?!1:(e.t+=n,!0)},IC=function(e){const{regs:t}=e;let r=t[e.r],n=Object.assign({},r);if(n.negative=!1,Dr(e.terms[e.t],n,e.start_i+e.t,e.phrase_length))return!1;if(r.optional){let i=t[e.r+1];i&&(Dr(e.terms[e.t],i,e.start_i+e.t,e.phrase_length)?e.r+=1:i.optional&&t[e.r+2]&&Dr(e.terms[e.t],t[e.r+2],e.start_i+e.t,e.phrase_length)&&(e.r+=2))}return r.greedy?_C(e,n,t[e.r+1]):(e.t+=1,!0)},zC=function(e){const{regs:t}=e;let r=t[e.r],n=e.terms[e.t],a=Dr(n,t[e.r+1],e.start_i+e.t,e.phrase_length);if(r.negative||a){let i=e.terms[e.t+1];(!i||!Dr(i,t[e.r+1],e.start_i+e.t,e.phrase_length))&&(e.r+=1)}},jC=function(e){const{regs:t,phrase_length:r}=e;let n=t[e.r];return e.t=MC(e,t[e.r+1]),e.t===null||n.min&&n.min>e.t||n.end===!0&&e.start_i+e.t!==r?null:!0},qC=function(e){let t=e.terms[e.t],r=e.regs[e.r];if(t.implicit&&e.terms[e.t+1]){if(!e.terms[e.t+1].implicit)return;r.word===t.normal&&(e.t+=1),r.method==="hasContraction"&&(e.t+=1)}},RC=function(e,t){let r=e.regs[e.r];const n=pc(e,t);e.t>1&&r.greedy?n.length+=e.t-t:n.length++},Jc=function(e){const{regs:t}=e;let r=t[e.r],n=e.terms[e.t],a=e.t;return r.optional&&t[e.r+1]&&r.negative?!0:(r.optional&&t[e.r+1]&&zC(e),n.implicit&&e.terms[e.t+1]&&qC(e),e.t+=1,r.end===!0&&e.t!==e.terms.length&&r.greedy!==!0||r.greedy===!0&&!jC(e)?null:(e.hasGroup===!0&&RC(e,a),!0))},od=function(e,t,r,n){if(e.length===0||t.length===0)return null;let a={t:0,terms:e,r:0,regs:t,groups:{},start_i:r,phrase_length:n,inGroup:null};for(;a.r<t.length;a.r+=1){let s=t[a.r];if(a.hasGroup=!!s.group,a.hasGroup===!0?a.inGroup=s.group:a.inGroup=null,!a.terms[a.t]){if(t.slice(a.r).some(c=>!c.optional)===!1)break;return null}if(s.anything===!0&&s.greedy===!0){if(!PC(a))return null;continue}if(s.choices!==void 0&&s.operator==="or"){if(!BC(a))return null;continue}if(s.choices!==void 0&&s.operator==="and"){if(!$C(a))return null;continue}if(s.anything===!0){if(s.negative&&s.anything||!Jc(a))return null;continue}if(FC(s,a)===!0){if(!Jc(a))return null;continue}if(s.negative){if(!IC(a))return null;continue}if(Dr(a.terms[a.t],s,a.start_i+a.t,a.phrase_length)===!0){if(!Jc(a))return null;continue}if(s.optional!==!0)return null}let i=[null,r,a.t+r];if(i[1]===i[2])return null;let o={};return Object.keys(a.groups).forEach(s=>{let u=a.groups[s],l=r+u.start;o[s]=[null,l,l+u.length]}),{pointer:i,groups:o}},LC=function(e,t){let r=[],n={};return e.length===0?{ptrs:r,byGroup:n}:(typeof t=="number"&&(t=String(t)),t?e.forEach(a=>{a.groups[t]&&r.push(a.groups[t])}):e.forEach(a=>{r.push(a.pointer),Object.keys(a.groups).forEach(i=>{n[i]=n[i]||[],n[i].push(a.groups[i])})}),{ptrs:r,byGroup:n})},HC=function(e,t,r){return e=e.filter(n=>{let[a,i,o]=n.pointer,s=r[a].slice(i,o);for(let u=0;u<s.length;u+=1){let l=s.slice(u);if(od(l,t,u,s.length)!==null)return!1}return!0}),e},rw=function(e,t){return e.pointer[0]=t,Object.keys(e.groups).forEach(r=>{e.groups[r][0]=t}),e},GC=function(e,t,r){let n=od(e,t,0,e.length);return n?(n=rw(n,r),n):null},VC=function(e,t,r){r=r||[];let{regs:n,group:a,justOne:i}=t,o=[];if(!n||n.length===0)return{ptrs:[],byGroup:{}};const s=n.filter(u=>u.optional!==!0&&u.negative!==!0).length;e:for(let u=0;u<e.length;u+=1){let l=e[u];if(!(r[u]&&DC(n,r[u]))){if(n[0].start===!0){let c=GC(l,n,u);c&&o.push(c);continue}for(let c=0;c<l.length;c+=1){let f=l.slice(c);if(f.length<s)break;let m=od(f,n,c,l.length);if(m){if(m=rw(m,u),o.push(m),i===!0)break e;let d=m.pointer[2];Math.abs(d-1)>c&&(c=Math.abs(d-1))}}}}return n[n.length-1].end===!0&&(o=o.filter(u=>{let l=u.pointer[0];return e[l].length===u.pointer[2]})),t.notIf&&(o=HC(o,t.notIf,e)),o=LC(o,a),o.ptrs.forEach(u=>{let[l,c,f]=u;u[3]=e[l][c].id,u[4]=e[l][f-1].id}),o},UC={one:{termMethods:_s,parseMatch:wC,match:VC}},WC={parseMatch:function(e,t){const r=this.world();let n=r.methods.one.killUnicode;return n&&(e=n(e,r)),r.methods.one.parseMatch(e,t,r)}},JC={api:oC,methods:UC,lib:WC},KC=/^\../,YC=/^#./,ZC=e=>(e=e.replace(/&/g,"&amp;"),e=e.replace(/</g,"&lt;"),e=e.replace(/>/g,"&gt;"),e=e.replace(/"/g,"&quot;"),e=e.replace(/'/g,"&apos;"),e),QC=function(e){let t="",r="</span>";return e=ZC(e),KC.test(e)?t=`<span class="${e.replace(/^\./,"")}"`:YC.test(e)?t=`<span id="${e.replace(/^#/,"")}"`:(t=`<${e}`,r=`</${e}>`),t+=">",{start:t,end:r}},XC=function(e,t){let r={},n={};return Object.keys(t).forEach(a=>{let i=t[a],o=QC(a);typeof i=="string"&&(i=e.match(i)),i.docs.forEach(s=>{if(s.every(c=>c.implicit))return;let u=s[0].id;r[u]=r[u]||[],r[u].push(o.start);let l=s[s.length-1].id;n[l]=n[l]||[],n[l].push(o.end)})}),{starts:r,ends:n}},eE=function(e){let{starts:t,ends:r}=XC(this,e),n="";return this.docs.forEach(a=>{for(let i=0;i<a.length;i+=1){let o=a[i];t.hasOwnProperty(o.id)&&(n+=t[o.id].join("")),n+=o.pre||"",n+=o.text||"",r.hasOwnProperty(o.id)&&(n+=r[o.id].join("")),n+=o.post||""}}),n},tE={html:eE},nw=/[,:;)\]*.?~!\u0022\uFF02\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4—-]+$/,Zf=/^[(['"*~\uFF02\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F]+/,rE=/[,:;)('"\u201D\]]/,nE=/^[-–—]$/,aE=/ /,$i=function(e,t,r=!0){let n="";return e.forEach(a=>{let i=a.pre||"",o=a.post||"";t.punctuation==="some"&&(i=i.replace(Zf,""),nE.test(o)&&(o=" "),o=o.replace(rE,""),o=o.replace(/\?!+/,"?"),o=o.replace(/!+/,"!"),o=o.replace(/\?+/,"?"),o=o.replace(/\.{2,}/,""),a.tags.has("Abbreviation")&&(o=o.replace(/\./,""))),t.whitespace==="some"&&(i=i.replace(/\s/,""),o=o.replace(/\s+/," ")),t.keepPunct||(i=i.replace(Zf,""),o==="-"?o=" ":o=o.replace(nw,""));let s=a[t.form||"text"]||a.normal||"";t.form==="implicit"&&(s=a.implicit||a.text),t.form==="root"&&a.implicit&&(s=a.root||a.implicit||a.normal),(t.form==="machine"||t.form==="implicit"||t.form==="root")&&a.implicit&&(!o||!aE.test(o))&&(o+=" "),n+=i+s+o}),r===!1&&(n=n.trim()),t.lowerCase===!0&&(n=n.toLowerCase()),n},iE=function(e,t){let r="";if(!e||!e[0]||!e[0][0])return r;for(let n=0;n<e.length;n+=1)r+=$i(e[n],t,!0);if(t.keepSpace||(r=r.trim()),t.keepEndPunct===!1){e[0][0].tags.has("Emoticon")||(r=r.replace(Zf,""));let n=e[e.length-1];n[n.length-1].tags.has("Emoticon")||(r=r.replace(nw,"")),r.endsWith("'")&&!r.endsWith("s'")&&(r=r.replace(/'/,""))}return t.cleanWhitespace===!0&&(r=r.trim()),r},li={text:{form:"text"},normal:{whitespace:"some",punctuation:"some",case:"some",unicode:"some",form:"normal"},machine:{keepSpace:!1,whitespace:"some",punctuation:"some",case:"none",unicode:"some",form:"machine"},root:{keepSpace:!1,whitespace:"some",punctuation:"some",case:"some",unicode:"some",form:"root"},implicit:{form:"implicit"}};li.clean=li.normal;li.reduced=li.root;let aw=[],qi=0;for(;qi<64;)aw[qi]=0|Math.sin(++qi%Math.PI)*4294967296;const sd=function(e){let t,r,n,a=[t=1732584193,r=4023233417,~t,~r],i=[],o=decodeURI(encodeURI(e))+"€",s=o.length;for(e=--s/4+2|15,i[--e]=s*8;~s;)i[s>>2]|=o.charCodeAt(s)<<8*s--;for(qi=o=0;qi<e;qi+=16){for(s=a;o<64;s=[n=s[3],t+((n=s[0]+[t&r|~t&n,n&t|~n&r,t^r^n,r^(t|~n)][s=o>>4]+aw[o]+~~i[qi|[o,5*o+1,3*o+5,7*o][s]&15])<<(s=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*s+o++%4])|n>>>-s),t,r])t=s[1]|0,r=s[2];for(o=4;o;)a[--o]+=s[o]}for(e="";o<32;)e+=(a[o>>3]>>(1^o++)*4&15).toString(16);return e},oE={text:!0,terms:!0};let zh={case:"none",unicode:"some",form:"machine",punctuation:"some"};const Kc=function(e,t){return Object.assign({},e,t)},ja={text:e=>$i(e,{keepPunct:!0},!1),normal:e=>$i(e,Kc(li.normal,{keepPunct:!0}),!1),implicit:e=>$i(e,Kc(li.implicit,{keepPunct:!0}),!1),machine:e=>$i(e,zh,!1),root:e=>$i(e,Kc(zh,{form:"root"}),!1),hash:e=>sd($i(e,{keepPunct:!0},!1)),offset:e=>{let t=ja.text(e).length;return{index:e[0].offset.index,start:e[0].offset.start,length:t}},terms:e=>e.map(t=>{let r=Object.assign({},t);return r.tags=Array.from(t.tags),r}),confidence:(e,t,r)=>t.eq(r).confidence(),syllables:(e,t,r)=>t.eq(r).syllables(),sentence:(e,t,r)=>t.eq(r).fullSentence().text(),dirty:e=>e.some(t=>t.dirty===!0)};ja.sentences=ja.sentence;ja.clean=ja.normal;ja.reduced=ja.root;const sE=function(e,t){return t=t||{},typeof t=="string"&&(t={}),t=Object.assign({},oE,t),t.offset&&e.compute("offset"),e.docs.map((r,n)=>{let a={};return Object.keys(t).forEach(i=>{t[i]&&ja[i]&&(a[i]=ja[i](r,e,n))}),a})},Qf={json:function(e){let t=sE(this,e);return typeof e=="number"?t[e]:t}};Qf.data=Qf.json;const uE=()=>typeof window<"u"&&window.document,lE=function(e){let t=this.methods.one.debug||{};return e&&t.hasOwnProperty(e)?(t[e](this),this):uE()?(t.clientSide(this),this):(t.tags(this),this)},cE=function(e){let t=e.pre||"",r=e.post||"";return t+e.text+r},fE=function(e,t){let r={};return Object.keys(t).forEach(n=>{e.match(n).fullPointer.forEach(i=>{r[i[3]]={fn:t[n],end:i[2]}})}),r},iw=function(e,t){let r=fE(e,t),n="";return e.docs.forEach((a,i)=>{for(let o=0;o<a.length;o+=1){let s=a[o];if(r.hasOwnProperty(s.id)){let{fn:u,end:l}=r[s.id],c=e.update([[i,o,l]]);n+=a[o].pre||"",n+=u(c),o=l-1,n+=a[o].post||""}else n+=cE(s)}}),n},mE=e=>Object.prototype.toString.call(e)==="[object Object]",dE=function(e){let t={};return e.forEach(n=>{t[n]=t[n]||0,t[n]+=1}),Object.keys(t).map(n=>({normal:n,count:t[n]})).sort((n,a)=>n.count>a.count?-1:0)},hE=function(e){if(mE(e))return iw(this,e);if(e==="text")return this.text();if(e==="normal")return this.text("normal");if(e==="root")return this.text("root");if(e==="machine"||e==="reduced")return this.text("machine");if(e==="hash"||e==="md5")return sd(this.text());if(e==="json")return this.json();if(e==="offset"||e==="offsets")return this.compute("offset"),this.json({offset:!0});if(e==="array")return this.docs.map(r=>r.reduce((n,a)=>n+a.pre+a.text+a.post,"").trim()).filter(r=>r);if(e==="freq"||e==="frequency"||e==="topk")return dE(this.json({normal:!0}).map(t=>t.normal));if(e==="terms"){let t=[];return this.docs.forEach(r=>{let n=r.map(a=>a.text);n=n.filter(a=>a),t=t.concat(n)}),t}return e==="tags"?this.docs.map(t=>t.reduce((r,n)=>(r[n.implicit||n.normal]=Array.from(n.tags),r),{})):e==="debug"?this.debug():this.text()},pE={debug:lE,out:hE,wrap:function(e){return iw(this,e)}},gE=e=>Object.prototype.toString.call(e)==="[object Object]",vE={text:function(e){let t={};if(e&&typeof e=="string"&&li.hasOwnProperty(e)?t=Object.assign({},li[e]):e&&gE(e)&&(t=Object.assign({},e)),t.keepSpace===void 0&&!this.isFull()&&(t.keepSpace=!1),t.keepEndPunct===void 0&&this.pointer){let r=this.pointer[0];r&&r[1]?t.keepEndPunct=!1:t.keepEndPunct=!0}return t.keepPunct===void 0&&(t.keepPunct=!0),t.keepSpace===void 0&&(t.keepSpace=!0),iE(this.docs,t)}},yE=Object.assign({},pE,vE,Qf,tE),bE=function(e){Object.assign(e.prototype,yE)},wE=function(e){console.log("%c -=-=- ","background-color:#6699cc;"),e.forEach(t=>{console.groupCollapsed(t.text());let n=t.docs[0].map(a=>{let i=a.text||"-";a.implicit&&(i="["+a.implicit+"]");let o="["+Array.from(a.tags).join(", ")+"]";return{text:i,tags:o}});console.table(n,["text","tags"]),console.groupEnd()})},ga="\x1B[0m",mn={green:e=>"\x1B[32m"+e+ga,red:e=>"\x1B[31m"+e+ga,blue:e=>"\x1B[34m"+e+ga,magenta:e=>"\x1B[35m"+e+ga,cyan:e=>"\x1B[36m"+e+ga,yellow:e=>"\x1B[33m"+e+ga,black:e=>"\x1B[30m"+e+ga,dim:e=>"\x1B[2m"+e+ga,i:e=>"\x1B[3m"+e+ga},xE=function(e,t){return t.one.tagSet&&(e=e.map(r=>{if(!t.one.tagSet.hasOwnProperty(r))return r;const n=t.one.tagSet[r].color||"blue";return mn[n](r)})),e.join(", ")},DE=function(e){let{docs:t,model:r}=e;t.length===0&&console.log(mn.blue(`
3
+ ──────`)),t.forEach(n=>{console.log(mn.blue(`
4
+ ┌─────────`)),n.forEach(a=>{let i=[...a.tags||[]],o=a.text||"-";a.sense&&(o=`{${a.normal}/${a.sense}}`),a.implicit&&(o="["+a.implicit+"]"),o=mn.yellow(o);let s="'"+o+"'";if(a.reference){let l=e.update([a.reference]).text("normal");s+=` - ${mn.dim(mn.i("["+l+"]"))}`}s=s.padEnd(18);let u=mn.blue(" │ ")+mn.i(s)+" - "+xE(i,r);console.log(u)})}),console.log(`
5
+ `)},NE=function(e){let{docs:t}=e;console.log(""),t.forEach(r=>{let n=[];r.forEach(a=>{a.chunk==="Noun"?n.push(mn.blue(a.implicit||a.normal)):a.chunk==="Verb"?n.push(mn.green(a.implicit||a.normal)):a.chunk==="Adjective"?n.push(mn.yellow(a.implicit||a.normal)):a.chunk==="Pivot"?n.push(mn.red(a.implicit||a.normal)):n.push(a.implicit||a.normal)}),console.log(n.join(" "),`
6
+ `)}),console.log(`
7
+ `)},AE=(e,t,r)=>{let n=r*9,a=t.start+n,i=a+t.length,o=e.substring(0,a),s=e.substring(a,i),u=e.substring(i,e.length);return[o,s,u]},CE=function(e,t,r){let n=AE(e,t,r);return`${n[0]}${mn.blue(n[1])}${n[2]}`},EE=function(e){if(!e.found)return;let t={};e.fullPointer.forEach(r=>{t[r[0]]=t[r[0]]||[],t[r[0]].push(r)}),Object.keys(t).forEach(r=>{let a=e.update([[Number(r)]]).text();e.update(t[r]).json({offset:!0}).forEach((s,u)=>{a=CE(a,s.offset,u)}),console.log(a)}),console.log(`
8
+ `)},SE={tags:DE,clientSide:wE,chunks:NE,highlight:EE},ME={api:bE,methods:{one:{hash:sd,debug:SE}}},ow=function(e,t){if(e[0]!==t[0])return!1;let[,r,n]=e,[,a,i]=t;return r<=a&&n>a||a<=r&&i>r},TE=function(e){let t=e[0][1],r=e[0][2];return e.forEach(n=>{n[1]<t&&(t=n[1]),n[2]>r&&(r=n[2])}),[e[0][0],t,r]},gc=function(e){let t={};return e.forEach(r=>{t[r[0]]=t[r[0]]||[],t[r[0]].push(r)}),t},FE=function(e){let t={};for(let r=0;r<e.length;r+=1)t[e[r].join(",")]=e[r];return Object.values(t)},PE=function(e,t){let[r,n]=e,a=t[1],i=t[2],o={};if(n<a){let s=a<e[2]?a:e[2];o.before=[r,n,s]}return o.match=t,e[2]>i&&(o.after=[r,i,e[2]]),o},kE=function(e,t){return e[1]<=t[1]&&t[2]<=e[2]},sw=function(e,t){let r=gc(t),n=[];return e.forEach(a=>{let[i]=a,o=r[i]||[];if(o=o.filter(u=>kE(a,u)),o.length===0){n.push({passthrough:a});return}o=o.sort((u,l)=>u[1]-l[1]);let s=a;o.forEach((u,l)=>{let c=PE(s,u);o[l+1]?(n.push({before:c.before,match:c.match}),c.after&&(s=c.after)):n.push(c)})}),n},OE=20,BE=function(e,t,r){for(let n=0;n<OE;n+=1){if(t[r-n]){let a=t[r-n].findIndex(i=>i.id===e);if(a!==-1)return[r-n,a]}if(t[r+n]){let a=t[r+n].findIndex(i=>i.id===e);if(a!==-1)return[r+n,a]}}return null},$E=function(e,t){let[r,n,,,a]=e,i=t[r],o=i.findIndex(s=>s.id===a);return o===-1?(e[2]=t[r].length,e[4]=i.length?i[i.length-1].id:null):e[2]=o,t[r].slice(n,e[2]+1)},_E=function(e,t){let r=[];return e.forEach((n,a)=>{if(!n)return;let[i,o,s,u,l]=n,c=t[i]||[];if(o===void 0&&(o=0),s===void 0&&(s=c.length),u&&(!c[o]||c[o].id!==u)){let f=BE(u,t,i);if(f!==null){let m=s-o;c=t[f[0]].slice(f[1],f[1]+m);let d=c[0]?c[0].id:null;e[a]=[f[0],f[1],f[1]+m,d]}}else c=c.slice(o,s);c.length!==0&&o!==s&&(l&&c[c.length-1].id!==l&&(c=$E(n,t)),r.push(c))}),r=r.filter(n=>n.length>0),r},IE=function(e){let t=[];for(let r=0;r<e.length;r+=1)for(let n=0;n<e[r].length;n+=1)t.push(e[r][n]);return t},zE={one:{termList:IE,getDoc:_E,pointer:{indexN:gc,splitAll:sw}}},uw=function(e,t){let r=e.concat(t),n=gc(r),a=[];return r.forEach(i=>{let[o]=i;if(n[o].length===1){a.push(i);return}let s=n[o].filter(l=>ow(i,l));s.push(i);let u=TE(s);a.push(u)}),a=FE(a),a},lw=function(e,t){let r=[];return sw(e,t).forEach(a=>{a.passthrough&&r.push(a.passthrough),a.before&&r.push(a.before),a.after&&r.push(a.after)}),r},jE=function(e,t){let r=e[1]<t[1]?t[1]:e[1],n=e[2]>t[2]?t[2]:e[2];return r<n?[e[0],r,n]:null},qE=function(e,t){let r=gc(t),n=[];return e.forEach(a=>{let i=r[a[0]]||[];i=i.filter(o=>ow(a,o)),i.length!==0&&i.forEach(o=>{let s=jE(a,o);s&&n.push(s)})}),n},RE=function(e){return Object.prototype.toString.call(e)==="[object Array]"},ud=(e,t)=>typeof e=="string"||RE(e)?t.match(e):e||t.none(),Qs=function(e,t){return e.map(r=>{let[n,a]=r;return t[n]&&t[n][a]&&(r[3]=t[n][a].id),r})},ca={};ca.union=function(e){e=ud(e,this);let t=uw(this.fullPointer,e.fullPointer);return t=Qs(t,this.document),this.toView(t)};ca.and=ca.union;ca.intersection=function(e){e=ud(e,this);let t=qE(this.fullPointer,e.fullPointer);return t=Qs(t,this.document),this.toView(t)};ca.not=function(e){e=ud(e,this);let t=lw(this.fullPointer,e.fullPointer);return t=Qs(t,this.document),this.toView(t)};ca.difference=ca.not;ca.complement=function(){let e=this.all(),t=lw(e.fullPointer,this.fullPointer);return t=Qs(t,this.document),this.toView(t)};ca.settle=function(){let e=this.fullPointer;return e.forEach(t=>{e=uw(e,[t])}),e=Qs(e,this.document),this.update(e)};const LE=function(e){Object.assign(e.prototype,ca)},HE={methods:zE,api:LE},GE={buildNet:function(e){let r=this.methods().one.buildNet(e,this.world());return r.isNet=!0,r}},VE=function(e){e.prototype.sweep=function(t,r={}){const{world:n,docs:a}=this,{methods:i}=n;let o=i.one.bulkMatch(a,t,this.methods,r);r.tagger!==!1&&i.one.bulkTagger(o,a,this.world),o=o.map(u=>{let l=u.pointer,c=a[l[0]][l[1]],f=l[2]-l[1];return c.index&&(u.pointer=[c.index[0],c.index[1],l[1]+f]),u});let s=o.map(u=>u.pointer);return o=o.map(u=>(u.view=this.update([u.pointer]),delete u.regs,delete u.needs,delete u.pointer,delete u._expanded,u)),{view:this.update(s),found:o}}},Xf=function(e){return e.optional===!0||e.negative===!0?null:e.tag?"#"+e.tag:e.word?e.word:e.switch?`%${e.switch}%`:null},UE=function(e){let t=[];return e.forEach(r=>{t.push(Xf(r)),r.operator==="and"&&r.choices&&r.choices.forEach(n=>{n.forEach(a=>{t.push(Xf(a))})})}),t.filter(r=>r)},WE=function(e){let t=[],r=0;return e.forEach(n=>{n.operator==="or"&&!n.optional&&!n.negative&&(n.fastOr&&Array.from(n.fastOr).forEach(a=>{t.push(a)}),n.choices&&n.choices.forEach(a=>{a.forEach(i=>{let o=Xf(i);o&&t.push(o)})}),r+=1)}),{wants:t,count:r}},JE=function(e,t){const r=t.methods.one.parseMatch;return e.forEach(n=>{n.regs=r(n.match,{},t),typeof n.ifNo=="string"&&(n.ifNo=[n.ifNo]),n.notIf&&(n.notIf=r(n.notIf,{},t)),n.needs=UE(n.regs);let{wants:a,count:i}=WE(n.regs);n.wants=a,n.minWant=i,n.minWords=n.regs.filter(o=>!o.optional).length}),e},KE=function(e,t){e=JE(e,t);let r={};e.forEach(a=>{a.needs.forEach(i=>{r[i]=Array.isArray(r[i])?r[i]:[],r[i].push(a)}),a.wants.forEach(i=>{r[i]=Array.isArray(r[i])?r[i]:[],r[i].push(a)})}),Object.keys(r).forEach(a=>{let i={};r[a]=r[a].filter(o=>typeof i[o.match]=="boolean"?!1:(i[o.match]=!0,!0))});let n=e.filter(a=>a.needs.length===0&&a.wants.length===0);return{hooks:r,always:n}},YE=function(e,t){return e.map((r,n)=>{let a=[];Object.keys(t).forEach(o=>{e[n].has(o)&&(a=a.concat(t[o]))});let i={};return a=a.filter(o=>typeof i[o.match]=="boolean"?!1:(i[o.match]=!0,!0)),a})},ZE=function(e,t){return e.map((r,n)=>{let a=t[n];return r=r.filter(i=>i.needs.every(o=>a.has(o))),r=r.filter(i=>!(i.ifNo!==void 0&&i.ifNo.some(o=>a.has(o))===!0)),r=r.filter(i=>i.wants.length===0?!0:i.wants.filter(s=>a.has(s)).length>=i.minWant),r})},QE=function(e,t,r,n,a){let i=[];for(let o=0;o<e.length;o+=1)for(let s=0;s<e[o].length;s+=1){let u=e[o][s],l=n.one.match([t[o]],u);if(l.ptrs.length>0&&(l.ptrs.forEach(c=>{c[0]=o;let f=Object.assign({},u,{pointer:c});u.unTag!==void 0&&(f.unTag=u.unTag),i.push(f)}),a.matchOne===!0))return[i[0]]}return i},XE=function(e,t){return e.map((r,n)=>{let a=t[n].length;return r=r.filter(i=>a>=i.minWords),r})},eS=function(e,t,r,n={}){let a=r.one.cacheDoc(e),i=YE(a,t.hooks);return i=ZE(i,a),t.always.length>0&&(i=i.map(s=>s.concat(t.always))),i=XE(i,e),QE(i,e,a,r,n)},tS=function(e,t,r){let n=r.one.tagSet;if(!n.hasOwnProperty(t))return!0;let a=n[t].not||[];for(let i=0;i<e.length;i+=1){let o=e[i];for(let s=0;s<a.length;s+=1)if(o.tags.has(a[s])===!0)return!1}return!0},rS=function(e,t,r){const{model:n,methods:a}=r,{getDoc:i,setTag:o,unTag:s}=a.one,u=a.two.looksPlural;return e.length===0?e:((typeof process>"u"||!process.env?self.env||{}:process.env).DEBUG_TAGS&&console.log(`
9
+
10
+ \x1B[32m→ ${e.length} post-tagger:\x1B[0m`),e.map(c=>{if(!c.tag&&!c.chunk&&!c.unTag)return;let f=c.reason||c.match,m=i([c.pointer],t)[0];if(!(c.safe===!0&&(tS(m,c.tag,n)===!1||m[m.length-1].post==="-"))){if(c.tag!==void 0){if(o(m,c.tag,r,c.safe,`[post] '${f}'`),c.tag==="Noun"&&u){let d=m[m.length-1];u(d.text)?o([d],"Plural",r,c.safe,"quick-plural"):o([d],"Singular",r,c.safe,"quick-singular")}c.freeze===!0&&m.forEach(d=>d.frozen=!0)}c.unTag!==void 0&&s(m,c.unTag,r,c.safe,f),c.chunk&&m.forEach(d=>d.chunk=c.chunk)}}))},nS={buildNet:KE,bulkMatch:eS,bulkTagger:rS},aS={lib:GE,api:VE,methods:{one:nS}},cw=/ /,jh=function(e,t){t==="Noun"&&(e.chunk=t),t==="Verb"&&(e.chunk=t)},fw=function(e,t,r,n){if(e.tags.has(t)===!0||t===".")return null;e.frozen===!0&&(n=!0);let a=r[t];if(a){if(a.not&&a.not.length>0)for(let i=0;i<a.not.length;i+=1){if(n===!0&&e.tags.has(a.not[i]))return null;e.tags.delete(a.not[i])}if(a.parents&&a.parents.length>0)for(let i=0;i<a.parents.length;i+=1)e.tags.add(a.parents[i]),jh(e,a.parents[i])}return e.tags.add(t),e.dirty=!0,jh(e,t),!0},iS=function(e,t,r,n){let a=t.split(cw);e.forEach((i,o)=>{let s=a[o];s&&(s=s.replace(/^#/,""),fw(i,s,r,n))})},oS=function(e){return Object.prototype.toString.call(e)==="[object Array]"},sS=(e,t,r="")=>{const n=o=>"\x1B[33m\x1B[3m"+o+"\x1B[0m",a=o=>"\x1B[3m"+o+"\x1B[0m";let i=e.map(o=>o.text||"["+o.implicit+"]").join(" ");typeof t!="string"&&t.length>2&&(t=t.slice(0,2).join(", #")+" +"),t=typeof t!="string"?t.join(", #"):t,console.log(` ${n(i).padEnd(24)} \x1B[32m→\x1B[0m #${t.padEnd(22)} ${a(r)}`)},mw=function(e,t,r={},n,a){const i=r.model.one.tagSet||{};if(!t)return;const o=typeof process>"u"||!process.env?self.env||{}:process.env;if(o&&o.DEBUG_TAGS&&sS(e,t,a),oS(t)===!0){t.forEach(s=>mw(e,s,r,n));return}if(typeof t!="string"){console.warn(`compromise: Invalid tag '${t}'`);return}if(t=t.trim(),cw.test(t)){iS(e,t,i,n);return}t=t.replace(/^#/,"");for(let s=0;s<e.length;s+=1)fw(e[s],t,i,n)},uS=function(e,t,r){t=t.trim().replace(/^#/,"");for(let n=0;n<e.length;n+=1){let a=e[n];if(a.frozen===!0)continue;if(t==="*"){a.tags.clear();continue}let i=r[t];if(i&&i.children.length>0)for(let o=0;o<i.children.length;o+=1)a.tags.delete(i.children[o]);a.tags.delete(t)}},lS=function(e,t,r){if(!r.hasOwnProperty(t))return!0;let n=r[t].not||[];for(let a=0;a<n.length;a+=1)if(e.tags.has(n[a]))return!1;return!0},ti=function(e){return e.children=e.children||[],e._cache=e._cache||{},e.props=e.props||{},e._cache.parents=e._cache.parents||[],e._cache.children=e._cache.children||[],e},cS=/^ *(#|\/\/)/,fS=function(e){let t=e.trim().split(/->/),r=[];t.forEach((a=>{r=r.concat((function(i){if(!(i=i.trim()))return null;if(/^\[/.test(i)&&/\]$/.test(i)){let o=(i=(i=i.replace(/^\[/,"")).replace(/\]$/,"")).split(/,/);return o=o.map((s=>s.trim())).filter((s=>s)),o=o.map((s=>ti({id:s}))),o}return[ti({id:i})]})(a))})),r=r.filter((a=>a));let n=r[0];for(let a=1;a<r.length;a+=1)n.children.push(r[a]),n=r[a];return r[0]},Fa=(e,t)=>{let r=[],n=[e];for(;n.length>0;){let a=n.pop();r.push(a),a.children&&a.children.forEach((i=>{t&&t(a,i),n.push(i)}))}return r},ld=e=>Object.prototype.toString.call(e)==="[object Array]",vu=e=>(e=e||"").trim(),mS=function(e=[]){return typeof e=="string"?(function(r){let n=r.split(/\r?\n/),a=[];n.forEach((o=>{if(!o.trim()||cS.test(o))return;let s=(u=>{const l=/^( {2}|\t)/;let c=0;for(;l.test(u);)u=u.replace(l,""),c+=1;return c})(o);a.push({indent:s,node:fS(o)})}));let i=(function(o){let s={children:[]};return o.forEach(((u,l)=>{u.indent===0?s.children=s.children.concat(u.node):o[l-1]&&(function(c,f){let m=c[f].indent;for(;f>=0;f-=1)if(c[f].indent<m)return c[f];return c[0]})(o,l).node.children.push(u.node)})),s})(a);return i=ti(i),i})(e):ld(e)?(function(r){let n={};r.forEach((i=>{n[i.id]=i}));let a=ti({});return r.forEach((i=>{if((i=ti(i)).parent)if(n.hasOwnProperty(i.parent)){let o=n[i.parent];delete i.parent,o.children.push(i)}else console.warn(`[Grad] - missing node '${i.parent}'`);else a.children.push(i)})),a})(e):(Fa(t=e).forEach(ti),t);var t},dS=e=>"\x1B[31m"+e+"\x1B[0m",hS=e=>"\x1B[2m"+e+"\x1B[0m",em=function(e,t){let r="-> ";t&&(r=hS("→ "));let n="";return Fa(e).forEach(((a,i)=>{let o=a.id||"";if(t&&(o=dS(o)),i===0&&!a.id)return;let s=a._cache.parents.length;n+=" ".repeat(s)+r+o+`
11
+ `})),n},qh=function(e){let t=Fa(e);t.forEach((n=>{delete(n=Object.assign({},n)).children}));let r=t[0];return r&&!r.id&&Object.keys(r.props).length===0&&t.shift(),t},Rh={text:em,txt:em,array:qh,flat:qh},Lh=function(e,t){return t==="nested"||t==="json"?e:t==="debug"?(console.log(em(e,!0)),null):Rh.hasOwnProperty(t)?Rh[t](e):e},Yc=e=>{Fa(e,((t,r)=>{t.id&&(t._cache.parents=t._cache.parents||[],r._cache.parents=t._cache.parents.concat([t.id]))}))},pS=(e,t)=>(Object.keys(t).forEach((r=>{if(t[r]instanceof Set){let n=e[r]||new Set;e[r]=new Set([...n,...t[r]])}else if((n=>n&&typeof n=="object"&&!Array.isArray(n))(t[r])){let n=e[r]||{};e[r]=Object.assign({},t[r],n)}else ld(t[r])?e[r]=t[r].concat(e[r]||[]):e[r]===void 0&&(e[r]=t[r])})),e),gS=/\//;let vS=class wl{constructor(t={}){Object.defineProperty(this,"json",{enumerable:!1,value:t,writable:!0})}get children(){return this.json.children}get id(){return this.json.id}get found(){return this.json.id||this.json.children.length>0}props(t={}){let r=this.json.props||{};return typeof t=="string"&&(r[t]=!0),this.json.props=Object.assign(r,t),this}get(t){if(t=vu(t),!gS.test(t)){let n=this.json.children.find((a=>a.id===t));return new wl(n)}let r=((n,a)=>{let i=(o=>typeof o!="string"?o:(o=o.replace(/^\//,"")).split(/\//))(a=a||"");for(let o=0;o<i.length;o+=1){let s=n.children.find((u=>u.id===i[o]));if(!s)return null;n=s}return n})(this.json,t)||ti({});return new wl(r)}add(t,r={}){if(ld(t))return t.forEach((a=>this.add(vu(a),r))),this;t=vu(t);let n=ti({id:t,props:r});return this.json.children.push(n),new wl(n)}remove(t){return t=vu(t),this.json.children=this.json.children.filter((r=>r.id!==t)),this}nodes(){return Fa(this.json).map((t=>(delete(t=Object.assign({},t)).children,t)))}cache(){return(t=>{let r=Fa(t,((a,i)=>{a.id&&(a._cache.parents=a._cache.parents||[],a._cache.children=a._cache.children||[],i._cache.parents=a._cache.parents.concat([a.id]))})),n={};r.forEach((a=>{a.id&&(n[a.id]=a)})),r.forEach((a=>{a._cache.parents.forEach((i=>{n.hasOwnProperty(i)&&n[i]._cache.children.push(a.id)}))})),t._cache.children=Object.keys(n)})(this.json),this}list(){return Fa(this.json)}fillDown(){var t;return t=this.json,Fa(t,((r,n)=>{n.props=pS(n.props,r.props)})),this}depth(){Yc(this.json);let t=Fa(this.json),r=t.length>1?1:0;return t.forEach((n=>{if(n._cache.parents.length===0)return;let a=n._cache.parents.length+1;a>r&&(r=a)})),r}out(t){return Yc(this.json),Lh(this.json,t)}debug(){return Yc(this.json),Lh(this.json,"debug"),this}};const dw=function(e){let t=mS(e);return new vS(t)};dw.prototype.plugin=function(e){e(this)};const ho={Noun:"blue",Verb:"green",Negative:"green",Date:"red",Value:"red",Adjective:"magenta",Preposition:"cyan",Conjunction:"cyan",Determiner:"cyan",Hyphenated:"cyan",Adverb:"cyan"},yS=function(e){if(ho.hasOwnProperty(e.id))return ho[e.id];if(ho.hasOwnProperty(e.is))return ho[e.is];let t=e._cache.parents.find(r=>ho[r]);return ho[t]},bS=function(e){const t={};return e.forEach(r=>{let{not:n,also:a,is:i,novel:o}=r.props,s=r._cache.parents;a&&(s=s.concat(a)),t[r.id]={is:i,not:n,novel:o,also:a,parents:s,children:r._cache.children,color:yS(r)}}),Object.keys(t).forEach(r=>{let n=new Set(t[r].not);t[r].not.forEach(a=>{t[a]&&t[a].children.forEach(i=>n.add(i))}),t[r].not=Array.from(n)}),t},Hh=function(e){return e?typeof e=="string"?[e]:e:[]},wS=function(e,t){return Object.keys(e).forEach(r=>{e[r].isA&&(e[r].is=e[r].isA),e[r].notA&&(e[r].not=e[r].notA),e[r].is&&typeof e[r].is=="string"&&!t.hasOwnProperty(e[r].is)&&!e.hasOwnProperty(e[r].is)&&(e[e[r].is]={}),e[r].not&&typeof e[r].not=="string"&&!e.hasOwnProperty(e[r].not)&&!t.hasOwnProperty(e[r].not)&&!e.hasOwnProperty(e[r].not)&&(e[e[r].not]={})}),e},xS=function(e,t){return e=wS(e,t),Object.keys(e).forEach(r=>{e[r].children=Hh(e[r].children),e[r].not=Hh(e[r].not)}),Object.keys(e).forEach(r=>{(e[r].not||[]).forEach(a=>{e[a]&&e[a].not&&e[a].not.push(r)})}),e},DS=function(e){const t=Object.keys(e).map(n=>{let a=e[n];const i={not:new Set(a.not),also:a.also,is:a.is,novel:a.novel};return{id:n,parent:a.is,props:i,children:[]}});return dw(t).cache().fillDown().out("array")},NS=function(e){return Object.keys(e).forEach(t=>{e[t]=Object.assign({},e[t]),e[t].novel=!0}),e},AS=function(e,t){Object.keys(t).length>0&&(e=NS(e)),e=xS(e,t);let r=Object.assign({},t,e);const n=DS(r);return bS(n)},CS={one:{setTag:mw,unTag:uS,addTags:AS,canBe:lS}},Gh=function(e){return Object.prototype.toString.call(e)==="[object Array]"},ES={tag:function(e,t="",r){if(!this.found||!e)return this;let n=this.termList();if(n.length===0)return this;const{methods:a,verbose:i,world:o}=this;return i===!0&&console.log(" + ",e,t||""),Gh(e)?e.forEach(s=>a.one.setTag(n,s,o,r,t)):a.one.setTag(n,e,o,r,t),this.uncache(),this},tagSafe:function(e,t=""){return this.tag(e,t,!0)},unTag:function(e,t){if(!this.found||!e)return this;let r=this.termList();if(r.length===0)return this;const{methods:n,verbose:a,model:i}=this;a===!0&&console.log(" - ",e,t||"");let o=i.one.tagSet;return Gh(e)?e.forEach(s=>n.one.unTag(r,s,o)):n.one.unTag(r,e,o),this.uncache(),this},canBe:function(e){e=e.replace(/^#/,"");let t=this.model.one.tagSet,r=this.methods.one.canBe,n=[];this.document.forEach((i,o)=>{i.forEach((s,u)=>{r(s,e,t)||n.push([o,u,u+1])})});let a=this.update(n);return this.difference(a)}},SS=function(e){Object.assign(e.prototype,ES)},MS=function(e){const{model:t,methods:r}=this.world(),n=t.one.tagSet,a=r.one.addTags;let i=a(e,n);return t.one.tagSet=i,this},TS={addTags:MS},Vh=new Set(["Auxiliary","Possessive"]),FS=function(e,t){return e=e.sort((r,n)=>{if(Vh.has(r)||!t.hasOwnProperty(n))return 1;if(Vh.has(n)||!t.hasOwnProperty(r))return-1;let a=t[r].children||[],i=a.length;a=t[n].children||[];let o=a.length;return i-o}),e},PS=function(e){const{document:t,world:r}=e,n=r.model.one.tagSet;t.forEach(a=>{a.forEach(i=>{let o=Array.from(i.tags);i.tagRank=FS(o,n)})})},kS={model:{one:{tagSet:{}}},compute:{tagRank:PS},methods:CS,api:SS,lib:TS},OS=/([.!?\u203D\u2E18\u203C\u2047-\u2049\u3002]+\s)/g,BS=/^[.!?\u203D\u2E18\u203C\u2047-\u2049\u3002]+\s$/,$S=/((?:\r?\n|\r)+)/,_S=function(e){let t=[],r=e.split($S);for(let n=0;n<r.length;n++){let a=r[n].split(OS);for(let i=0;i<a.length;i++)a[i+1]&&BS.test(a[i+1])===!0&&(a[i]+=a[i+1],a[i+1]=""),a[i]!==""&&t.push(a[i])}return t},IS=/[a-z0-9\u00C0-\u00FF\u00a9\u00ae\u2000-\u3300\ud000-\udfff]/i,zS=/\S/,jS=function(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r];if(!(n===void 0||n==="")){if(zS.test(n)===!1||IS.test(n)===!1){if(t[t.length-1]){t[t.length-1]+=n;continue}else if(e[r+1]){e[r+1]=n+e[r+1];continue}}t.push(n)}}return t},qS=function(e,t){const r=t.methods.one.tokenize.isSentence,n=t.model.one.abbreviations||new Set;let a=[];for(let i=0;i<e.length;i++){let o=e[i];e[i+1]&&r(o,n)===!1?e[i+1]=o+(e[i+1]||""):o&&o.length>0&&(a.push(o),e[i]="")}return a},Uh=280,hw={'"':'"',""":""","“":"”","‟":"”","„":"”","⹂":"”","‚":"’","«":"»","‹":"›","‵":"′","‶":"″","‷":"‴","〝":"〞","〟":"〞"},RS=RegExp("["+Object.keys(hw).join("")+"]","g"),LS=RegExp("["+Object.values(hw).join("")+"]","g"),Wh=function(e){if(!e)return!1;let t=e.match(LS);return t!==null&&t.length===1},HS=function(e){let t=[];for(let r=0;r<e.length;r+=1){let a=e[r].match(RS);if(a!==null&&a.length===1){if(Wh(e[r+1])&&e[r+1].length<Uh){e[r]+=e[r+1],t.push(e[r]),e[r+1]="",r+=1;continue}if(Wh(e[r+2])){let i=e[r+1]+e[r+2];if(i.length<Uh){e[r]+=i,t.push(e[r]),e[r+1]="",e[r+2]="",r+=2;continue}}}t.push(e[r])}return t},GS=250,Jh=/\(/g,VS=/\)/g,US=function(e){let t=[];for(let r=0;r<e.length;r+=1){let a=e[r].match(Jh);if(a!==null&&a.length===1&&e[r+1]&&e[r+1].length<GS&&e[r+1].match(VS)!==null&&a.length===1&&!Jh.test(e[r+1])){e[r]+=e[r+1],t.push(e[r]),e[r+1]="",r+=1;continue}t.push(e[r])}return t},WS=/\S/,Kh=/^\s+/,JS=function(e,t){if(e=e||"",e=String(e),!e||typeof e!="string"||WS.test(e)===!1)return[];e=e.replace(" "," ");let r=_S(e),n=jS(r);if(n=qS(n,t),n=HS(n),n=US(n),n.length===0)return[e];for(let a=1;a<n.length;a+=1){let i=n[a].match(Kh);i!==null&&(n[a-1]+=i[0],n[a]=n[a].replace(Kh,""))}return n},KS=function(e,t){let r=e.split(/[-–—]/);if(r.length<=1)return!1;const{prefixes:n,suffixes:a}=t.one;return r[0].length===1&&/[a-z]/i.test(r[0])||n.hasOwnProperty(r[0])||(r[1]=r[1].trim().replace(/[.?!]$/,""),a.hasOwnProperty(r[1]))?!1:/^([a-z\u00C0-\u00FF`"'/]+)[-–—]([a-z0-9\u00C0-\u00FF].*)/i.test(e)===!0||/^[('"]?([0-9]{1,4})[-–—]([a-z\u00C0-\u00FF`"'/-]+[)'"]?$)/i.test(e)===!0},YS=function(e){let t=[];const r=e.split(/[-–—]/);let n="-",a=e.match(/[-–—]/);a&&a[0]&&(n=a);for(let i=0;i<r.length;i++)i===r.length-1?t.push(r[i]):t.push(r[i]+n);return t},ZS=function(e){const t=/^[0-9]{1,4}(:[0-9][0-9])?([a-z]{1,2})? ?[-–—] ?$/,r=/^[0-9]{1,4}([a-z]{1,2})? ?$/;for(let n=0;n<e.length-1;n+=1)e[n+1]&&t.test(e[n])&&r.test(e[n+1])&&(e[n]=e[n]+e[n+1],e[n+1]=null);return e},QS=new RegExp("\\p{L} ?\\/ ?\\p{L}+$","u"),XS=function(e){for(let t=1;t<e.length-1;t++)QS.test(e[t])&&(e[t-1]+=e[t]+e[t+1],e[t]=null,e[t+1]=null);return e},e4=/\S/,t4=/^[!?.]+$/,r4=/(\S+)/;let tm=[".","?","!",":",";","-","–","—","--","...","(",")","[","]",'"',"'","`","«","»","*","•"];tm=tm.reduce((e,t)=>(e[t]=!0,e),{});const n4=function(e){return Object.prototype.toString.call(e)==="[object Array]"},a4=function(e,t){let r=[],n=[];if(e=e||"",typeof e=="number"&&(e=String(e)),n4(e))return e;const a=e.split(r4);for(let o=0;o<a.length;o++){if(KS(a[o],t)===!0){n=n.concat(YS(a[o]));continue}n.push(a[o])}let i="";for(let o=0;o<n.length;o++){let s=n[o];e4.test(s)===!0&&tm.hasOwnProperty(s)===!1&&t4.test(s)===!1?(r.length>0?(r[r.length-1]+=i,r.push(s)):r.push(i+s),i=""):i+=s}return i&&(r.length===0&&(r[0]=""),r[r.length-1]+=i),r=XS(r),r=ZS(r),r=r.filter(o=>o),r},Yh=new RegExp("\\p{Letter}","u"),yu=/[\p{Number}\p{Currency_Symbol}]/u,i4=/^[a-z]\.([a-z]\.)+/i,o4=/[sn]['’]$/,s4=function(e,t){let{prePunctuation:r,postPunctuation:n,emoticons:a}=t.one,i=e,o="",s="",u=Array.from(e);if(a.hasOwnProperty(e.trim()))return{str:e.trim(),pre:o,post:" "};let l=u.length;for(let c=0;c<l;c+=1){let f=u[0];if(r[f]!==!0){if((f==="+"||f==="-")&&yu.test(u[1])||f==="'"&&f.length===3&&yu.test(u[1])||Yh.test(f)||yu.test(f))break;o+=u.shift()}}l=u.length;for(let c=0;c<l;c+=1){let f=u[u.length-1];if(n[f]!==!0){if(Yh.test(f)||yu.test(f))break;f==="."&&i4.test(i)===!0||f==="'"&&o4.test(i)===!0||(s=u.pop()+s)}}return e=u.join(""),e===""&&(i=i.replace(/ *$/,c=>(s=c||"","")),e=i,o=""),{str:e,pre:o,post:s}},u4=(e,t)=>{let{str:r,pre:n,post:a}=s4(e,t);return{text:r,pre:n,post:a,tags:new Set}},l4=function(e,t){const r=t.model.one.unicode||{};e=e||"";let n=e.split("");return n.forEach((a,i)=>{r[a]&&(n[i]=r[a])}),n.join("")},c4=function(e){e=e||"",e=e.toLowerCase(),e=e.trim();let t=e;return e=e.replace(/[,;.!?]+$/,""),e=e.replace(/\u2026/g,"..."),e=e.replace(/\u2013/g,"-"),/^[:;]/.test(e)===!1&&(e=e.replace(/\.{3,}$/g,""),e=e.replace(/[",.!:;?)]+$/g,""),e=e.replace(/^['"(]+/g,"")),e=e.replace(/[\u200B-\u200D\uFEFF]/g,""),e=e.trim(),e===""&&(e=t),e=e.replace(/([0-9]),([0-9])/g,"$1$2"),e},f4=/([A-Z]\.)+[A-Z]?,?$/,m4=/^[A-Z]\.,?$/,d4=/[A-Z]{2,}('s|,)?$/,h4=/([a-z]\.)+[a-z]\.?$/,p4=function(e){return f4.test(e)===!0||h4.test(e)===!0||m4.test(e)===!0||d4.test(e)===!0},g4=function(e){return p4(e)&&(e=e.replace(/\./g,"")),e},pw=function(e,t){const r=t.methods.one.killUnicode;let n=e.text||"";n=c4(n),n=r(n,t),n=g4(n),e.normal=n},v4=function(e,t){const{methods:r,model:n}=t,{splitSentences:a,splitTerms:i,splitWhitespace:o}=r.one.tokenize;return e=e||"",e=a(e,t).map(u=>{let l=i(u,n);return l=l.map(c=>o(c,n)),l.forEach(c=>{pw(c,t)}),l}),e},y4=/[ .][A-Z]\.? *$/i,b4=/(?:\u2026|\.{2,}) *$/,w4=new RegExp("\\p{L}","u"),x4=/\. *$/,D4=/^[A-Z]\. $/,N4=function(e,t){if(w4.test(e)===!1||y4.test(e)===!0||e.length===3&&D4.test(e)||b4.test(e)===!0)return!1;let n=e.replace(/[.!?\u203D\u2E18\u203C\u2047-\u2049] *$/,"").split(" "),a=n[n.length-1].toLowerCase();return!(t.hasOwnProperty(a)===!0&&x4.test(e)===!0)},A4={one:{killUnicode:l4,tokenize:{splitSentences:JS,isSentence:N4,splitTerms:a4,splitWhitespace:u4,fromString:v4}}},C4={"&":"and","@":"at","%":"percent",plz:"please",bein:"being"},E4=["approx","apt","bc","cyn","eg","esp","est","etc","ex","exp","prob","pron","gal","min","pseud","fig","jd","lat","lng","vol","fm","def","misc","plz","ea","ps","sec","pt","pref","pl","pp","qt","fr","sq","nee","ss","tel","temp","vet","ver","fem","masc","eng","adj","vb","rb","inf","situ","vivo","vitro","wr"],S4=["adj","adm","adv","asst","atty","bldg","brig","capt","cmdr","comdr","cpl","det","dr","esq","gen","gov","hon","jr","llb","lt","maj","messrs","mlle","mme","mr","mrs","ms","mstr","phd","prof","pvt","rep","reps","res","rev","sen","sens","sfc","sgt","sir","sr","supt","surg"],M4=["jan","feb","mar","apr","jun","jul","aug","sep","sept","oct","nov","dec"],T4=["ad","al","arc","ba","bl","ca","cca","col","corp","ft","fy","ie","lit","ma","md","pd","tce"],F4=["dept","univ","assn","bros","inc","ltd","co"],P4=["rd","st","dist","mt","ave","blvd","cl","cres","hwy","ariz","cal","calif","colo","conn","fla","fl","ga","ida","ia","kan","kans","minn","neb","nebr","okla","penna","penn","pa","dak","tenn","tex","ut","vt","va","wis","wisc","wy","wyo","usafa","alta","ont","que","sask"],k4=["dl","ml","gal","qt","pt","tbl","tsp","tbsp","km","dm","cm","mm","mi","td","hr","hrs","kg","hg","dg","cg","mg","µg","lb","oz","sq ft","hz","mps","mph","kmph","kb","mb","tb","lx","lm","fl oz","yb"];let O4=[[E4],[k4,"Unit"],[T4,"Noun"],[S4,"Honorific"],[M4,"Month"],[F4,"Organization"],[P4,"Place"]],gw={},xl={};O4.forEach(e=>{e[0].forEach(t=>{gw[t]=!0,xl[t]="Abbreviation",e[1]!==void 0&&(xl[t]=[xl[t],e[1]])})});const B4=["anti","bi","co","contra","de","extra","infra","inter","intra","macro","micro","mis","mono","multi","peri","pre","pro","proto","pseudo","re","sub","supra","trans","tri","un","out","ex"].reduce((e,t)=>(e[t]=!0,e),{}),$4={like:!0,ish:!0,less:!0,able:!0,elect:!0,type:!0,designate:!0};let Zh={"!":"¡","?":"¿Ɂ",'"':'“”"❝❞',"'":"‘‛❛❜’","-":"—–",a:"ªÀÁÂÃÄÅàáâãäåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧȺΆΑΔΛάαλАаѦѧӐӑӒӓƛæ",b:"ßþƀƁƂƃƄƅɃΒβϐϦБВЪЬвъьѢѣҌҍ",c:"¢©ÇçĆćĈĉĊċČčƆƇƈȻȼͻͼϲϹϽϾСсєҀҁҪҫ",d:"ÐĎďĐđƉƊȡƋƌ",e:"ÈÉÊËèéêëĒēĔĕĖėĘęĚěƐȄȅȆȇȨȩɆɇΈΕΞΣέεξϵЀЁЕеѐёҼҽҾҿӖӗễ",f:"ƑƒϜϝӺӻҒғſ",g:"ĜĝĞğĠġĢģƓǤǥǦǧǴǵ",h:"ĤĥĦħƕǶȞȟΉΗЂЊЋНнђћҢңҤҥҺһӉӊ",I:"ÌÍÎÏ",i:"ìíîïĨĩĪīĬĭĮįİıƖƗȈȉȊȋΊΐΪίιϊІЇіїi̇",j:"ĴĵǰȷɈɉϳЈј",k:"ĶķĸƘƙǨǩΚκЌЖКжкќҚқҜҝҞҟҠҡ",l:"ĹĺĻļĽľĿŀŁłƚƪǀǏǐȴȽΙӀӏ",m:"ΜϺϻМмӍӎ",n:"ÑñŃńŅņŇňʼnŊŋƝƞǸǹȠȵΝΠήηϞЍИЙЛПийлпѝҊҋӅӆӢӣӤӥπ",o:"ÒÓÔÕÖØðòóôõöøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱΌΘΟθοσόϕϘϙϬϴОФоѲѳӦӧӨөӪӫ",p:"ƤΡρϷϸϼРрҎҏÞ",q:"Ɋɋ",r:"ŔŕŖŗŘřƦȐȑȒȓɌɍЃГЯгяѓҐґ",s:"ŚśŜŝŞşŠšƧƨȘșȿЅѕ",t:"ŢţŤťŦŧƫƬƭƮȚțȶȾΓΤτϮТт",u:"ÙÚÛÜùúûüŨũŪūŬŭŮůŰűŲųƯưƱƲǓǔǕǖǗǘǙǚǛǜȔȕȖȗɄΰυϋύ",v:"νѴѵѶѷ",w:"ŴŵƜωώϖϢϣШЩшщѡѿ",x:"×ΧχϗϰХхҲҳӼӽӾӿ",y:"ÝýÿŶŷŸƳƴȲȳɎɏΎΥΫγψϒϓϔЎУучўѰѱҮүҰұӮӯӰӱӲӳ",z:"ŹźŻżŽžƵƶȤȥɀΖ"},vw={};Object.keys(Zh).forEach(function(e){Zh[e].split("").forEach(function(t){vw[t]=e})});const _4={"#":!0,"@":!0,_:!0,"°":!0,"​":!0,"‌":!0,"‍":!0,"\uFEFF":!0},I4={"%":!0,_:!0,"°":!0,"​":!0,"‌":!0,"‍":!0,"\uFEFF":!0},z4={"<3":!0,"</3":!0,"<\\3":!0,":^P":!0,":^p":!0,":^O":!0,":^3":!0},j4={one:{aliases:C4,abbreviations:gw,prefixes:B4,suffixes:$4,prePunctuation:_4,postPunctuation:I4,lexicon:xl,unicode:vw,emoticons:z4}},Qh=/\//,q4=/[a-z]\.[a-z]/i,R4=/[0-9]/,L4=function(e,t){let r=e.normal||e.text||e.machine;const n=t.model.one.aliases;if(n.hasOwnProperty(r)&&(e.alias=e.alias||[],e.alias.push(n[r])),Qh.test(r)&&!q4.test(r)&&!R4.test(r)){let a=r.split(Qh);a.length<=3&&a.forEach(i=>{i=i.trim(),i!==""&&(e.alias=e.alias||[],e.alias.push(i))})}return e},H4=new RegExp("^\\p{Letter}+-\\p{Letter}+$","u"),G4=function(e){let t=e.implicit||e.normal||e.text;t=t.replace(/['’]s$/,""),t=t.replace(/s['’]$/,"s"),t=t.replace(/([aeiou][ktrp])in'$/,"$1ing"),H4.test(t)&&(t=t.replace(/-/g,"")),t=t.replace(/^[#@]/,""),t!==e.normal&&(e.machine=t)},V4=function(e){let t=e.docs,r={};for(let n=0;n<t.length;n+=1)for(let a=0;a<t[n].length;a+=1){let i=t[n][a],o=i.machine||i.normal;r[o]=r[o]||0,r[o]+=1}for(let n=0;n<t.length;n+=1)for(let a=0;a<t[n].length;a+=1){let i=t[n][a],o=i.machine||i.normal;i.freq=r[o]}},U4=function(e){let t=0,r=0,n=e.document;for(let a=0;a<n.length;a+=1)for(let i=0;i<n[a].length;i+=1){let o=n[a][i];o.offset={index:r,start:t+o.pre.length,length:o.text.length},t+=o.pre.length+o.text.length+o.post.length,r+=1}},W4=function(e){let t=e.document;for(let r=0;r<t.length;r+=1)for(let n=0;n<t[r].length;n+=1)t[r][n].index=[r,n]},J4=function(e){let t=0,r=e.docs;for(let n=0;n<r.length;n+=1)for(let a=0;a<r[n].length;a+=1)r[n][a].normal!==""&&(t+=1,r[n][a].wordCount=t)},Zc=function(e,t){let r=e.docs;for(let n=0;n<r.length;n+=1)for(let a=0;a<r[n].length;a+=1)t(r[n][a],e.world)},K4={alias:e=>Zc(e,L4),machine:e=>Zc(e,G4),normal:e=>Zc(e,pw),freq:V4,offset:U4,index:W4,wordCount:J4},Y4={compute:K4,methods:A4,model:j4,hooks:["alias","machine","index","id"]},Z4=function(e){const t=e.model.one.typeahead,r=e.docs;if(r.length===0||Object.keys(t).length===0)return;let n=r[r.length-1]||[],a=n[n.length-1];if(!a.post&&t.hasOwnProperty(a.normal)){let i=t[a.normal];a.implicit=i,a.machine=i,a.typeahead=!0,e.compute.preTagger&&e.last().unTag("*").compute(["lexicon","preTagger"])}},Q4={typeahead:Z4},X4=function(){const e=this.docs;if(e.length===0)return this;let t=e[e.length-1]||[],r=t[t.length-1];return r.typeahead===!0&&r.machine&&(r.text=r.machine,r.normal=r.machine),this},eM=function(e){e.prototype.autoFill=X4},tM=function(e,t,r){let n={},a=[],i=r.prefixes||{};return e.forEach(o=>{o=o.toLowerCase().trim();let s=o.length;t.max&&s>t.max&&(s=t.max);for(let u=t.min;u<s;u+=1){let l=o.substring(0,u);if(!(t.safe&&r.model.one.lexicon.hasOwnProperty(l))){if(i.hasOwnProperty(l)===!0){a.push(l);continue}if(n.hasOwnProperty(l)===!0){a.push(l);continue}n[l]=o}}}),n=Object.assign({},i,n),a.forEach(o=>{delete n[o]}),n},rM=e=>Object.prototype.toString.call(e)==="[object Object]",nM={safe:!0,min:3},aM=function(e=[],t={}){let r=this.model();t=Object.assign({},nM,t),rM(e)&&(Object.assign(r.one.lexicon,e),e=Object.keys(e));let n=tM(e,t,this.world());return Object.keys(n).forEach(a=>{if(r.one.typeahead.hasOwnProperty(a)){delete r.one.typeahead[a];return}r.one.typeahead[a]=n[a]}),this},iM={typeahead:aM},oM={one:{typeahead:{}}},sM={model:oM,api:eM,lib:iM,compute:Q4,hooks:["typeahead"]};et.extend(YA);et.extend(ME);et.extend(JC);et.extend(HE);et.extend(kS);et.plugin(D3);et.extend(Y4);et.extend(C3);et.plugin(cA);et.extend(G3);et.extend(sM);et.extend(_3);et.extend(aS);const yw={addendum:"addenda",corpus:"corpora",criterion:"criteria",curriculum:"curricula",genus:"genera",memorandum:"memoranda",opus:"opera",ovum:"ova",phenomenon:"phenomena",referendum:"referenda",alga:"algae",alumna:"alumnae",antenna:"antennae",formula:"formulae",larva:"larvae",nebula:"nebulae",vertebra:"vertebrae",analysis:"analyses",axis:"axes",diagnosis:"diagnoses",parenthesis:"parentheses",prognosis:"prognoses",synopsis:"synopses",thesis:"theses",neurosis:"neuroses",appendix:"appendices",index:"indices",matrix:"matrices",ox:"oxen",sex:"sexes",alumnus:"alumni",bacillus:"bacilli",cactus:"cacti",fungus:"fungi",hippopotamus:"hippopotami",libretto:"libretti",modulus:"moduli",nucleus:"nuclei",octopus:"octopi",radius:"radii",stimulus:"stimuli",syllabus:"syllabi",cookie:"cookies",calorie:"calories",auntie:"aunties",movie:"movies",pie:"pies",rookie:"rookies",tie:"ties",zombie:"zombies",leaf:"leaves",loaf:"loaves",thief:"thieves",foot:"feet",goose:"geese",tooth:"teeth",beau:"beaux",chateau:"chateaux",tableau:"tableaux",bus:"buses",gas:"gases",circus:"circuses",crisis:"crises",virus:"viruses",database:"databases",excuse:"excuses",abuse:"abuses",avocado:"avocados",barracks:"barracks",child:"children",clothes:"clothes",echo:"echoes",embargo:"embargoes",epoch:"epochs",deer:"deer",halo:"halos",man:"men",woman:"women",mosquito:"mosquitoes",mouse:"mice",person:"people",quiz:"quizzes",rodeo:"rodeos",shoe:"shoes",sombrero:"sombreros",stomach:"stomachs",tornado:"tornados",tuxedo:"tuxedos",volcano:"volcanoes"},Xh={Comparative:"true¦bett1f0;arth0ew0in0;er",Superlative:"true¦earlier",PresentTense:"true¦bests,sounds",Condition:"true¦lest,unless",PastTense:"true¦began,came,d4had,kneel3l2m0sa4we1;ea0sg2;nt;eap0i0;ed;id",Participle:"true¦0:09;a06b01cZdXeat0fSgQhPoJprov0rHs7t6u4w1;ak0ithdra02o2r1;i02uY;k0v0;nd1pr04;ergoJoJ;ak0hHo3;e9h7lain,o6p5t4un3w1;o1um;rn;g,k;ol0reS;iQok0;ught,wn;ak0o1runk;ne,wn;en,wn;ewriNi1uJ;dd0s0;ut3ver1;do4se0t1;ak0h2;do2g1;roG;ne;ast0i7;iv0o1;ne,tt0;all0loBor1;bi3g2s1;ak0e0;iv0o9;dd0;ove,r1;a5eamt,iv0;hos0lu1;ng;e4i3lo2ui1;lt;wn;tt0;at0en,gun;r2w1;ak0ok0;is0;en",Gerund:"true¦accord0be0doin,go0result0stain0;ing",Expression:"true¦a0Yb0Uc0Sd0Oe0Mfarew0Lg0FhZjeez,lWmVnToOpLsJtIuFvEw7y0;a5e3i1u0;ck,p;k04p0;ee,pee;a0p,s;!h;!a,h,y;a5h2o1t0;af,f;rd up,w;atsoever,e1o0;a,ops;e,w;hoo,t;ery w06oi0L;gh,h0;! 0h,m;huh,oh;here nPsk,ut tut;h0ic;eesh,hh,it,oo;ff,h1l0ow,sst;ease,s,z;ew,ooey;h1i,mg,o0uch,w,y;h,o,ps;! 0h;hTmy go0wT;d,sh;a7evertheless,o0;!pe;eh,mm;ah,eh,m1ol0;!s;ao,fao;aCeBi9o2u0;h,mph,rra0zzC;h,y;l1o0;r6y9;la,y0;! 0;c1moCsmok0;es;ow;!p hip hoor0;ay;ck,e,llo,y;ha1i,lleluj0;ah;!ha;ah,ee4o1r0;eat scott,r;l1od0sh; grief,bye;ly;! whiz;ell;e0h,t cetera,ureka,ww,xcuse me;k,p;'oh,a0rat,uh;m0ng;mit,n0;!it;mon,o0;ngratulations,wabunga;a2oo1r0tw,ye;avo,r;!ya;h,m; 1h0ka,las,men,rgh,ye;!a,em,h,oy;la",Negative:"true¦n0;ever,o0;n,t",QuestionWord:"true¦how3wh0;at,e1ich,o0y;!m,se;n,re; come,'s",Reflexive:"true¦h4it5my5o1the0your2;ir1m1;ne3ur0;sel0;f,ves;er0im0;self",Plural:"true¦dick0gre0ones,records;ens","Unit|Noun":"true¦cEfDgChBinchAk9lb,m6newt5oz,p4qt,t1y0;ardEd;able1b0ea1sp;!l,sp;spo1;a,t,x;on9;!b,g,i1l,m,p0;h,s;!les;!b,elvin,g,m;!es;g,z;al,b;eet,oot,t;m,up0;!s",Value:"true¦a few",Imperative:"true¦bewa0come he0;re","Plural|Verb":"true¦leaves",Demonym:"true¦0:15;1:12;a0Vb0Oc0Dd0Ce08f07g04h02iYjVkTlPmLnIomHpEqatari,rCs7t5u4v3welAz2;am0Gimbabwe0;enezuel0ietnam0I;gAkrai1;aiwTex0hai,rinida0Ju2;ni0Prkmen;a5cotti4e3ingapoOlovak,oma0Spaniard,udRw2y0W;ede,iss;negal0Cr09;sh;mo0uT;o5us0Jw2;and0;a2eru0Fhilippi0Nortugu07uerto r0S;kist3lesti1na2raguay0;ma1;ani;ami00i2orweP;caragu0geri2;an,en;a3ex0Lo2;ngo0Drocc0;cedo1la2;gasy,y07;a4eb9i2;b2thua1;e0Cy0;o,t01;azakh,eny0o2uwaiI;re0;a2orda1;ma0Ap2;anO;celandic,nd4r2sraeli,ta01vo05;a2iB;ni0qi;i0oneU;aiAin2ondur0unO;di;amEe2hanai0reek,uatemal0;or2rm0;gi0;ilipino,ren8;cuadoVgyp4mira3ngli2sto1thiopi0urope0;shm0;ti;ti0;aPominUut3;a9h6o4roat3ub0ze2;ch;!i0;lom2ngol5;bi0;a6i2;le0n2;ese;lifor1m2na3;bo2eroo1;di0;angladeshi,el6o4r3ul2;gaE;azi9it;li2s1;vi0;aru2gi0;si0;fAl7merBngol0r5si0us2;sie,tr2;a2i0;li0;genti2me1;ne;ba1ge2;ri0;ni0;gh0r2;ic0;an",Organization:"true¦0:4Q;a3Tb3Bc2Od2He2Df27g1Zh1Ti1Pj1Nk1Ll1Gm12n0Po0Mp0Cqu0Br02sTtHuCv9w3xiaomi,y1;amaha,m1Bou1w1B;gov,tu3C;a4e2iki1orld trade organizati33;leaRped0O;lls fargo,st1;fie2Hinghou2R;l1rner br3U;gree3Jl street journ2Im1E;an halOeriz2Xisa,o1;dafo2Yl1;kswagMvo;b4kip,n2ps,s1;a tod3Aps;es3Mi1;lev3Fted natio3C;er,s; mobi32aco beRd bOe9gi frida3Lh3im horto3Amz,o1witt3D;shi49y1;ota,s r 05;e 1in lizzy;b3carpen3Jdaily ma3Dguess w2holli0s1w2;mashing pumpki35uprem0;ho;ea1lack eyed pe3Xyr0Q;ch bo3Dtl0;l2n3Qs1xas instrumen1U;co,la m1F;efoni0Kus;a8cientology,e5ieme2Ymirnoff,np,o3pice gir6quare0Ata1ubaru;rbuc1to34;ks;ny,undgard1;en;a2x pisto1;ls;g1Wrs;few2Minsbur31lesfor03msu2E;adiohead,b8e4o1yana3C;man empi1Xyal 1;b1dutch she4;ank;a3d 1max,vl20;bu1c2Ahot chili peppe2Ylobst2N;ll;ders dige1Ll madrid;c,s;ant3Aizn2Q;a8bs,e5fiz2Ihilip4i3r1;emier 1udenti1D;leagTo2K;nk floyd,zza hut; morrBs;psi2tro1uge0E;br33chi0Tn33;!co;lant2Un1yp16; 2ason27da2P;ld navy,pec,range juli2xf1;am;us;aAb9e6fl,h5i4o1sa,vid3wa;k2tre dame,vart1;is;ia;ke,ntendo,ss0QvZ;l,s;c,st1Otflix,w1; 1sweek;kids on the block,york0D;a,c;nd22s2t1;ional aca2Po,we0U;a,c02d0S;aDcdonalCe9i6lb,o3tv,y1;spa1;ce;b1Tnsanto,ody blu0t1;ley cr1or0T;ue;c2t1;as,subisO;helin,rosoft;dica2rcedes benz,talli1;ca;id,re;ds;cs milk,tt19z24;a3e1g,ittle caesa1P; ore09novo,x1;is,mark,us; 1bour party;pres0Dz boy;atv,fc,kk,lm,m1od1O;art;iffy lu0Roy divisi0Jpmorgan1sa;! cha09;bm,hop,k3n1tv;g,te1;l,rpol;ea;a5ewlett pack1Vi3o1sbc,yundai;me dep1n1P;ot;tac1zbollah;hi;lliburt08sbro;eneral 6hq,ithub,l5mb,o2reen d0Ou1;cci,ns n ros0;ldman sachs,o1;dye1g0H;ar;axo smith kli04encoW;electr0Nm1;oto0Z;a5bi,c barcelo4da,edex,i2leetwood m03o1rito l0G;rd,xcY;at,fa,nancial1restoZ; tim0;na;cebook,nnie mae;b0Asa,u3xxon1; m1m1;ob0J;!rosceptics;aiml0De5isney,o4u1;nkin donu2po0Zran dur1;an;ts;j,w jon0;a,f lepp12ll,peche mode,r spieg02stiny's chi1;ld;aJbc,hFiDloudflaCnn,o3r1;aigsli5eedence clearwater reviv1ossra09;al;c7inba6l4m1o0Est09;ca2p1;aq;st;dplSg1;ate;se;a c1o chanQ;ola;re;a,sco1tigroup;! systems;ev2i1;ck fil a,na daily;r1y;on;d2pital o1rls jr;ne;bury,ill1;ac;aEbc,eBf9l5mw,ni,o1p,rexiteeU;ei3mbardiIston 1;glo1pizza;be;ng;o2ue c1;roV;ckbuster video,omingda1;le; g1g1;oodriL;cht2e ge0rkshire hathaw1;ay;el;cardi,idu,nana republ3s1xt5y5;f,kin robbi1;ns;ic;bYcTdidSerosmith,iRlKmEnheuser busDol,ppleAr6s4u3v2y1;er;is,on;di,todesk;hland o1sociated E;il;b3g2m1;co;os;ys; compu1be0;te1;rs;ch;c,d,erican3t1;!r1;ak; ex1;pre1;ss; 5catel2ta1;ir;! lu1;ce1;nt;jazeera,qae1;da;g,rbnb;as;/dc,a3er,tivision1;! blizz1;ard;demy of scienc0;es;ba",Possessive:"true¦its,my,our0thy;!s","Noun|Verb":"true¦0:9W;1:AA;2:96;3:A3;4:9R;5:A2;6:9K;7:8N;8:7L;9:A8;A:93;B:8D;C:8X;a9Ob8Qc7Id6Re6Gf5Sg5Hh55i4Xj4Uk4Rl4Em40n3Vo3Sp2Squ2Rr21s0Jt02u00vVwGyFzD;ip,oD;ne,om;awn,e6Fie68;aOeMhJiHoErD;ap,e9Oink2;nd0rDuC;kDry,sh5Hth;!shop;ck,nDpe,re,sh;!d,g;e86iD;p,sD;k,p0t2;aDed,lco8W;r,th0;it,lk,rEsDt4ve,x;h,te;!ehou1ra9;aGen5FiFoD;iDmAte,w;ce,d;be,ew,sA;cuum,l4B;pDr7;da5gra6Elo6A;aReQhrPiOoMrGuEwiDy5Z;n,st;nDrn;e,n7O;aGeFiEoDu6;t,ub2;bu5ck4Jgg0m,p;at,k,nd;ck,de,in,nsDp,v7J;f0i8R;ll,ne,p,r4Yss,t94uD;ch,r;ck,de,e,le,me,p,re;e5Wow,u6;ar,e,ll,mp0st,xt;g,lDng2rg7Ps5x;k,ly;a0Sc0Ne0Kh0Fi0Dk0Cl0Am08n06o05pXquaBtKuFwD;ea88iD;ng,pe,t4;bGit,m,ppErD;fa3ge,pri1v2U;lDo6S;e6Py;!je8;aMeLiKoHrEuDy2;dy,ff,mb2;a85eEiDo5Pugg2;ke,ng;am,ss,t4;ckEop,p,rD;e,m;ing,pi2;ck,nk,t4;er,m,p;ck,ff,ge,in,ke,lEmp,nd,p2rDte,y;!e,t;k,l;aJeIiHlGoFrDur,y;ay,e56inDu3;g,k2;ns8Bt;a5Qit;ll,n,r87te;ed,ll;m,n,rk;b,uC;aDee1Tow;ke,p;a5Je4FiDo53;le,rk;eep,iDou4;ce,p,t;ateboa7Ii;de,gnDl2Vnk,p,ze;!al;aGeFiEoDuff2;ck,p,re,w;ft,p,v0;d,i3Ylt0;ck,de,pe,re,ve;aEed,nDrv1It;se,t2N;l,r4t;aGhedu2oBrD;aEeDibb2o3Z;en,w;pe,t4;le,n,r2M;cDfegua72il,mp2;k,rifi3;aZeHhy6LiGoEuD;b,in,le,n,s5X;a6ck,ll,oDpe,u5;f,t;de,ng,ot,p,s1W;aTcSdo,el,fQgPje8lOmMnLo17pJque6sFturn,vDwa6V;eDi27;al,r1;er74oFpe8tEuD;lt,me;!a55;l71rt;air,eaDly,o53;l,t;dezvo2Zt;aDedy;ke,rk;ea1i4G;a6Iist0r5N;act6Yer1Vo71uD;nd,se;a38o6F;ch,s6G;c1Dge,iEke,lly,nDp1Wt1W;ge,k,t;n,se;es6Biv0;a04e00hYiXlToNrEsy4uD;mp,n4rcha1sh;aKeIiHoDu4O;be,ceFdu3fi2grDje8mi1p,te6;amDe6W;!me;ed,ss;ce,de,nt;sDy;er6Cs;cti3i1;iHlFoEp,re,sDuCw0;e,i5Yt;l,p;iDl;ce,sh;nt,s5V;aEce,e32uD;g,mp,n7;ce,nDy;!t;ck,le,n17pe,tNvot;a1oD;ne,tograph;ak,eFnErDt;fu55mA;!c32;!l,r;ckJiInHrFsEtDu1y;ch,e9;s,te;k,tD;!y;!ic;nt,r,se;!a7;bje8ff0il,oErDutli3Qver4B;bAd0ie9;ze;a4ReFoDur1;d,tD;e,i3;ed,gle8tD;!work;aMeKiIoEuD;rd0;ck,d3Rld,nEp,uDve;nt,th;it5EkD;ey;lk,n4Brr5CsDx;s,ta2B;asuBn4UrDss;ge,it;il,nFp,rk3WsEtD;ch,t0;h,k,t0;da5n0oeuvB;aLeJiHoEuD;mp,st;aEbby,ck,g,oDve;k,t;d,n;cDe,ft,mAnIst;en1k;aDc0Pe4vK;ch,d,k,p,se;bFcEnd,p,t4uD;gh,n4;e,k;el,o2U;eEiDno4E;ck,d,ll,ss;el,y;aEo1OuD;i3mp;m,zz;mpJnEr46ssD;ue;c1Rdex,fluGha2k,se2HteDvoi3;nt,rD;e6fa3viD;ew;en3;a8le2A;aJeHiGoEuD;g,nt;l3Ano2Dok,pDr1u1;!e;ghli1Fke,nt,re,t;aDd7lp;d,t;ck,mGndFrEsh,tDu9;ch,e;bo3Xm,ne4Eve6;!le;!m0;aMear,ift,lKossJrFuD;arDe4Alp,n;antee,d;aFiEoDumb2;uCwth;ll,nd,p;de,sp;ip;aBoDue;ss,w;g,in,me,ng,s,te,ze;aZeWiRlNoJrFuD;ck,el,nDss,zz;c38d;aEoDy;st,wn;cDgme,me,nchi1;tuB;cFg,il,ld,rD;ce,e29mDwa31;!at;us;aFe0Vip,oDy;at,ck,od,wD;!er;g,ke,me,re,sh,vo1E;eGgFlEnDre,sh,t,x;an3i0Q;e,m,t0;ht,uB;ld;aEeDn3;d,l;r,tuB;ce,il,ll,rm,vo2W;cho,d7ffe8nMsKxFyeD;!baD;ll;cGerci1hFpDtra8;eriDo0W;en3me9;au6ibA;el,han7u1;caDtima5;pe;count0d,vy;a01eSiMoJrEuDye;b,el,mp,pli2X;aGeFiEoD;ne,p;ft,ll,nk,p,ve;am,ss;ft,g,in;cEd7ubt,wnloD;ad;k,u0E;ge6p,sFt4vD;e,iDor3;de;char7gui1h,liEpD;at4lay,u5;ke;al,bKcJfeIlGmaCposAsEtaD;il;e07iD;gn,re;ay,ega5iD;ght;at,ct;li04rea1;a5ut;b,ma7n3rDte;e,t;a0Eent0Dh06irc2l03oKrFuD;be,e,rDt;b,e,l,ve;aGeFoEuDy;sh;p,ss,wd;dAep;ck,ft,sh;at,de,in,lTmMnFordina5py,re,st,uDv0;gh,nDp2rt;s01t;ceHdu8fli8glomeIsFtDveN;a8rD;a6ol;e9tru8;ct;ntDrn;ra5;bHfoGmFpD;leDouCromi1;me9;aCe9it,u5;rt;at,iD;ne;lap1oD;r,ur;aEiDoud,ub;ck,p;im,w;aEeDip;at,ck,er;iGllen7nErD;ge,m,t;ge,nD;el;n,r;er,re;ke,ll,mp,noe,pGrXsFtEuDve;se,ti0I;alog,ch;h,t;!tuB;re;a03eZiXlToPrHuEyD;pa11;bb2ck2dgEff0mp,rDst,zz;den,n;et;anJeHiFoadEuD;i1sh;ca6;be,d7;ge;aDed;ch,k;ch,d;aFg,mb,nEoDrd0tt2x,ycott;k,st,t;d,e;rd,st;aFeCiDoYur;nk,tz;nd;me;as,d,ke,nd,opsy,tD;!ch,e;aFef,lt,nDt;d,efA;it;r,t;ck,il,lan3nIrFsEtt2;le;e,h;!gDk;aDe;in;!d,g,k;bu1c05dZge,iYlVnTppQrLsIttGucEwaD;rd;tiD;on;aDempt;ck;k,sD;i6ocia5;st;chFmD;!oD;ur;!iD;ve;eEroa4;ch;al;chDg0sw0;or;aEt0;er;rm;d,m,r;dreHvD;an3oD;ca5;te;ce;ss;cDe,he,t;eFoD;rd,u9;nt;nt,ss;se",Actor:"true¦0:7B;1:7G;2:6A;3:7F;4:7O;5:7K;a6Nb62c4Ud4Be41f3Sg3Bh30i2Uj2Qkin2Pl2Km26n1Zo1Sp0Vqu0Tr0JsQtJuHvEw8yo6;gi,ut6;h,ub0;aAe9i8o7r6;estl0it0;m2rk0;fe,nn0t2Bza2H;atherm2ld0;ge earn0it0nder0rri1;eter7i6oyF;ll5Qp,s3Z;an,ina2U;n6s0;c6Uder03;aoisea23e9herapi5iktok0o8r6ut1yco6S;a6endseLo43;d0mp,nscri0Bvel0;ddl0u1G;a0Qchn7en6na4st0;ag0;i3Oo0D;aiXcUeRhPiMki0mu26oJpGquaFtBu7wee6;p0theart;lt2per7r6;f0ge6Iviv1;h6inten0Ist5Ivis1;ero,um2;a8ep7r6;ang0eam0;bro2Nc2Ofa2Nmo2Nsi20;ff0tesm2;tt0;ec7ir2Do6;kesp59u0M;ia5Jt3;l7me6An,rcere6ul;r,ss;di0oi5;n7s6;sy,t0;g0n0;am2ephe1Iow6;girl,m2r2Q;cretInior cit3Fr6;gea4v6;a4it1;hol4Xi7reen6ulpt1;wr2C;e01on;l1nt;aEe9o8u6;l0nn6;er up,ingE;g40le mod3Zof0;a4Zc8fug2Ppo32searQv6;ere4Uolution6;ary;e6luYru22;ptio3T;bbi,dic5Vpp0;arter6e2Z;back;aYeWhSiRlOoKr8sycho7u6;nk,p31;logi5;aGeDiBo6;d9fess1g7ph47s6;pe2Ktitu51;en6ramm0;it1y;igy,uc0;est4Nme mini0Unce6s3E;!ss;a7si6;de4;ch0;ctiti39nk0P;dca0Oet,li6pula50rnst42;c2Itic6;al scie6i2;nti5;a6umb0;nn0y6;er,ma4Lwright;lgrim,one0;a8iloso7otogra7ra6ysi1V;se;ph0;ntom,rmaci5;r6ssi1T;form0s4O;i3El,nel3Yr8st1tr6wn;i6on;arWot;ent4Wi42tn0;ccupa4ffBp8r7ut6;ca5l0B;ac4Iganiz0ig2Fph2;er3t6;i1Jomet6;ri5;ic0spring;aBe9ie4Xo7u6;n,rser3J;b6mad,vi4V;le2Vo4D;i6mesis,phew;ce,ghb1;nny,rr3t1X;aEeDiAo7u6yst1Y;m8si16;der3gul,m7n6th0;arDk;!my;ni7s6;f02s0Jt0;on,st0;chan1Qnt1rcha4;gi9k0n8rtyr,t6y1;e,riar6;ch;ag0iac;ci2stra3I;a7e2Aieutena4o6;rd,s0v0;bor0d7ndlo6ss,urea3Fwy0ym2;rd;!y;!s28;e8o7u6;ggl0;gg0urna2U;st0;c3Hdol,llu3Ummigra4n6; l9c1Qfa4habi42nov3s7ve6;nt1stig3;pe0Nt6;a1Fig3ru0M;aw;airFeBistoAo8u6ygie1K;man6sba2H;!ita8;bo,st6usekN;age,e3P;ri2;ir,r6;m7o6;!ine;it;dress0sty2C;aLeIhostGirl26ladi3oCrand7u6;e5ru;c9daug0Jfa8m7pa6s2Y;!re4;a,o6;th0;hi1B;al7d6lf0;!de3A;ie,k6te26;eep0;!wr6;it0;isha,n6;i6tl04;us;mbl0rden0;aDella,iAo7r6;eela2Nie1P;e,re6ster pare4;be1Hm2r6st0;unn0;an2ZgZlmm17nanci0r6tt0;e6st la2H; marsh2OfigXm2;rm0th0;conoEdDlectriCm8n7x6;amin0cellency,i2A;emy,trepreneur,vironmenta1J;c8p6;er1loye6;e,r;ee;ci2;it1;mi5;aKeBi8ork,ri7u6we02;de,tche2H;ft0v0;ct3eti7plom2Hre6va;ct1;ci2ti2;aDcor3fencCi0InAput9s7tectLvel6;op0;ce1Ge6ign0;rt0;ee,y;iz6;en;em2;c1Ml0;d8nc0redev7ug6;ht0;il;!dy;a06e04fo,hXitizenWlToBr9u6;r3stomer6;! representat6;ive;e3it6;ic;lJmGnAord9rpor1Nu7w6;boy,ork0;n6ri0;ciTte1Q;in3;fidantAgressSs9t6;e0Kr6;ibut1o6;ll0;tab13ul1O;!e;edi2m6pos0rade;a0EeQissi6;on0;leag8on7um6;ni5;el;ue;e6own;an0r6;ic,k;!s;a9e7i6um;ld;erle6f;ad0;ir7nce6plFract0;ll1;m2wI;lebri6o;ty;dBptAr6shi0;e7pe6;nt0;r,t6;ak0;ain;et;aMeLiJlogg0oErBu6;dd0Fild0rgl9siness6;m2p7w6;om2;ers05;ar;i7o6;!k0th0;cklay0de,gadi0;hemi2oge8y6;!frie6;nd;ym2;an;cyc6sR;li5;atbox0ings;by,nk0r6;b0on7te6;nd0;!e07;c04dWge4nQpLrHsFtAu7yatull6;ah;nt7t6;h1oG;!ie;h8t6;e6orney;nda4;ie5le6;te;sis00tron6;aut,om0;chbis8isto7tis6;an,t;crU;hop;ost9p6;ari6rentiS;ti6;on;le;a9cest1im3nou8y6;bo6;dy;nc0;ly5rc6;hi5;mi8v6;entur0is1;er;ni7r6;al;str3;at1;or;counBquaintanArob9t6;ivi5or,re6;ss;st;at;ce;ta4;nt","Adj|Noun":"true¦0:16;a1Db17c0Ud0Re0Mf0Dg0Ah08i06ju05l02mWnUoSpNrIsBt7u4v1watershed;a1ision0Z;gabo4nilla,ria1;b0Vnt;ndergr1pstairs;adua14ou1;nd;a3e1oken,ri0;en,r1;min0rori13;boo,n;age,e5ilv0Flack,o3quat,ta2u1well;bordina0Xper5;b0Lndard;ciali0Yl1vereign;e,ve16;cret,n1ri0;ior;a4e2ou1ubbiL;nd,tiY;ar,bBl0Wnt0p1side11;resent0Vublican;ci0Qsh;a4eriodic0last0Zotenti0r1;emi2incip0o1;!fession0;er,um;rall4st,tie0U;ff1pposi0Hv0;ens0Oi0C;agg01ov1uts;el;a5e3iniatJo1;bi01der07r1;al,t0;di1tr0N;an,um;le,riG;attOi2u1;sh;ber0ght,qC;stice,veniT;de0mpressioYn1;cumbe0Edividu0no0Dsta0Eterim;alf,o1umdrum;bby,melF;en2old,ra1;ph0Bve;er0ious;a7e5i4l3u1;git03t1;ure;uid;ne;llow,m1;aFiL;ir,t,vo1;riOuriO;l3p00x1;c1ecutUpeV;ess;d1iK;er;ar2e1;mographUrivO;k,l2;hiGlassSo2rude,unn1;ing;m5n1operK;creCstitueOte2vertab1;le;mpor1nt;ary;ic,m2p1;anion,lex;er2u1;ni8;ci0;al;e5lank,o4r1;i2u1;te;ef;ttom,urgeois;st;cadem9d6l2ntarct9r1;ab,ct8;e3tern1;at1;ive;rt;oles1ult;ce1;nt;ic","Adj|Past":"true¦0:4Q;1:4C;2:4H;3:4E;a44b3Tc36d2Je29f20g1Wh1Si1Jj1Gkno1Fl1Am15n12o0Xp0Mqu0Kr08sLtEuAv9w4yellow0;a7ea6o4rinkl0;r4u3Y;n,ri0;k31th3;rp0sh0tZ;ari0e1O;n5p4s0;d1li1Rset;cov3derstood,i4;fi0t0;a8e3Rhr7i6ouTr4urn0wi4C;a4imm0ou2G;ck0in0pp0;ed,r0;eat2Qi37;m0nn0r4;get0ni2T;aOcKeIhGimFm0Hoak0pDt7u4;bsid3Ogge44s4;pe4ta2Y;ct0nd0;a8e7i2Eok0r5u4;ff0mp0nn0;ength2Hip4;ed,p0;am0reotyp0;in0t0;eci4ik0oH;al3Efi0;pRul1;a4ock0ut;d0r0;a4c1Jle2t31;l0s3Ut0;a6or5r4;at4e25;ch0;r0tt3;t4ut0;is2Mur1;aEe5o4;tt0;cAdJf2Bg9je2l8m0Knew0p7qu6s4;eTpe2t4;or0ri2;e3Dir0;e1lac0;at0e2Q;i0Rul1;eiv0o4ycl0;mme2Lrd0v3;in0lli0ti2A;a4ot0;li28;aCer30iBlAo9r5u4;mp0zzl0;e6i2Oo4;ce2Fd4lo1Anou30pos0te2v0;uc0;fe1CocCp0Iss0;i2Kli1L;ann0e2CuS;ck0erc0ss0;ck0i2Hr4st0;allLk0;bse7c6pp13rgan2Dver4;lo4whelm0;ok0;cupi0;rv0;aJe5o4;t0uri1A;ed0gle2;a6e5ix0o4ut0ys1N;di1Nt15u26;as0Clt0;n4rk0;ag0ufact0A;e6i5o4;ad0ck0st,v0;cens0m04st0;ft,v4;el0;tt0wn;a5o15u4;dg0s1B;gg0;llumSmpAn4sol1;br0cre1Ldebt0f8jZspir0t5v4;it0olv0;e4ox0Y;gr1n4re23;d0si15;e2l1o1Wuri1;li0o01r4;ov0;a6e1o4um03;ok0r4;ri0Z;mm3rm0;i6r5u4;a1Bid0;a0Ui0Rown;ft0;aAe9i8l6oc0Ir4;a4i0oz0Y;ctHg19m0;avo0Ju4;st3;ni08tt0x0;ar0;d0il0sc4;in1;dCl1mBn9quipp0s8x4;agger1c6p4te0T;a0Se4os0;ct0rie1D;it0;cap0tabliZ;cha0XgFha1As4;ur0;a0Zbarra0N;i0Buc1;aMeDi5r4;a01i0;gni08miniSre2s4;a9c6grun0Ft4;o4re0Hu17;rt0;iplWou4;nt0r4;ag0;bl0;cBdRf9l8p7ra6t5v4;elop0ot0;ail0ermQ;ng0;re07;ay0ight0;e4in0o0M;rr0;ay0enTor1;m5t0z4;ed,zl0;ag0p4;en0;aPeLhIlHo9r6u4;lt4r0stom03;iv1;a5owd0u4;sh0;ck0mp0;d0loAm7n4ok0v3;centr1f5s4troC;id3olid1;us0;b5pl4;ic1;in0;r0ur0;assi9os0utt3;ar5i4;ll0;g0m0;lebr1n6r4;ti4;fi0;tralJ;g0lcul1;aDewild3iCl9o7r5urn4;ed,t;ok4uis0;en;il0r0t4und;tl0;e5i4;nd0;ss0;as0;ffl0k0laMs0tt3;bPcNdKfIg0lFmaz0nDppBrm0ss9u5wa4;rd0;g5thor4;iz0;me4;nt0;o6u4;m0r0;li0re4;ci1;im1ticip1;at0;a5leg0t3;er0;rm0;fe2;ct0;ju5o7va4;nc0;st0;ce4knowledg0;pt0;and5so4;rb0;on0;ed",Singular:"true¦0:5J;1:5H;2:4W;3:4S;4:52;5:57;6:5L;7:56;8:5B;a52b4Lc3Nd35e2Xf2Og2Jh28in24j23k22l1Um1Ln1Ho1Bp0Rqu0Qr0FsZtMuHvCw9x r58yo yo;a9ha3Po3Q;f3i4Rt0Gy9;! arou39;arCeAideo ga2Qo9;cabu4Jl5C;gOr9t;di4Zt1Y;iety,ni4P;nBp30rAs 9;do43s5E;bani1in0;coordinat3Ader9;estima1to24we41; rex,aKeJhHiFoErBuAv9;! show;m2On2rntLto1D;agedy,ib9o4E;e,u9;n0ta46;ni1p2rq3L;c,er,m9;etF;ing9ree26;!y;am,mp3F;ct2le6x return;aNcMeKhor4QiJkHoGpin off,tDuBy9;ll9ner7st4T;ab2X;b9i1n28per bowl,rro1X;st3Ltot0;atAipe2Go1Lrate7udent9;! lo0I;i39u1;ft ser4Lmeo1I;elet5i9;ll,r3V;b38gn2Tte;ab2Jc9min3B;t,urity gua2N;e6ho2Y;bbatic0la3Jndwi0Qpi5;av5eDhetor2iAo9;de6om,w;tAv9;erb2C;e,u0;bDcBf9publ2r10spi1;er9orm3;e6r0;i9ord label;p2Ht0;a1u46;estion mark,ot2F;aPeMhoLiIlGoErAu9yram1F;ddi3HpErpo1Js3J;eBo9;bl3Zs9;pe3Jta1;dic1Rmi1Fp1Qroga8ss relea1F;p9rt0;py;a9ebisci1;q2Dte;cn2eAg9;!gy;!r;ne call,tocoK;anut,dAr9t0yo1;cen3Jsp3K;al,est0;nop4rAt9;e,hog5;adi11i2V;atme0bj3FcBpia1rde0thers,utspok5ve9wn3;n,r9;ti0Pview;cuAe9;an;pi3;arBitAot9umb3;a2Fhi2R;e,ra1;cot2ra8;aFeCiAo9ur0;nopo4p18rni2Nsq1Rti36uld;c,li11n0As9tt5;chief,si34;dAnu,t9;al,i3;al,ic;gna1mm0nd15rsupi0te9yf4;ri0;aDegCiBu9;ddi1n9;ch;me,p09; Be0M;bor14y9; 9er;up;eyno1itt5;el4ourn0;cBdices,itia8ni25sAtel0Lvert9;eb1J;e28titu1;en8i2T;aIeEighDoAu9;man right,s22;me9rmoFsp1Ftb0K;! r9;un; scho0YriY;a9i1N;d9v5; start,pho9;ne;ndful,sh brown,v5ze;aBelat0Ilaci3r9ul4yp1S;an9enadi3id;a1Cd slam,ny;df4r9;l2ni1I;aGeti1HiFlu1oCrAun9;er0;ee market,i9onti3;ga1;l4ur9;so9;me;ePref4;br2mi4;conoFffi7gg,lecto0Rmbas1EnCpidem2s1Zth2venBxAyel9;id;ampZempl0Nte6;i19t;er7terp9;ri9;se;my;eLiEoBr9ump tru0U;agonf4i9;er,ve thru;cAg7i4or,ssi3wn9;side;to0EumenE;aEgniDnn3sAvide9;nd;conte6incen8p9tri11;osi9;ti0C;ta0H;le0X;athBcAf9ni0terre6;ault 05err0;al,im0;!b9;ed;aWeThMiLlJoDr9;edit caBuc9;ib9;le;rd;efficDke,lCmmuniqLnsApi3rr0t0Xus9yo1;in;erv9uI;ato02;ic,lQ;ie6;er7i9oth;e6n2;ty,vil wM;aDeqCick5ocoBr9;istmas car9ysanthemum;ol;la1;ue;ndeli3racteri9;st2;iAllEr9;e0tifica1;liZ;hi3nFpErCt9ucus;erpi9hedr0;ll9;ar;!bohyd9ri3;ra1;it0;aAe,nib0t9;on;l,ry;aMeLiop2leJoHrDu9;nny,r9tterf4;g9i0;la9;ry;eakAi9;ck;fa9throB;st;dy,ro9wl;ugh;mi9;sh;an,l4;nkiArri3;er;ng;cSdMlInFppeti1rDsBtt2utop9;sy;ic;ce6pe9;ct;r9sen0;ay;ecAoma4tiA;ly;do1;i5l9;er7y;gy;en; hominDjAvan9;tage;ec8;ti9;ve;em;cCeAqui9;tt0;ta1;te;iAru0;al;de6;nt","Person|Noun":"true¦a0Eb07c03dWeUfQgOhLjHkiGlFmCnBolive,p7r4s3trini06v1wa0;ng,rd,tts;an,enus,iol0;a,et;ky,onPumm09;ay,e1o0uby;bin,d,se;ed,x;a2e1o0;l,tt04;aLnJ;dYge,tR;at,orm;a0eloW;t0x,ya;!s;a9eo,iH;ng,tP;a2e1o0;lGy;an,w3;de,smi4y;a0erb,iOolBuntR;ll,z0;el;ail,e0iLuy;ne;a1ern,i0lo;elds,nn;ith,n0;ny;a0dEmir,ula,ve;rl;a4e3i1j,ol0;ly;ck,x0;ie;an,ja;i0wn;sy;am,h0liff,rystal;a0in,ristian;mbers,ri0;ty;a4e3i2o,r0ud;an0ook;dy;ll;nedict,rg;k0nks;er;l0rt;fredo,ma","Actor|Verb":"true¦aCb8c5doctor,engineAfool,g3host,judge,m2nerd,p1recruit,scout,ushAvolunteAwi0;mp,tneA;arent,ilot;an,ime;eek,oof,r0uide;adu8oom;ha1o0;ach,nscript,ok;mpion,uffeur;o2u0;lly,tch0;er;ss;ddi1ffili0rchite1;ate;ct",MaleName:"true¦0:H6;1:FZ;2:DS;3:GQ;4:CZ;5:FV;6:GM;7:FP;8:GW;9:ET;A:C2;B:GD;aF8bE1cCQdBMeASfA1g8Yh88i7Uj6Sk6Bl5Mm48n3So3Ip33qu31r26s1Et0Ru0Ov0CwTxSyHzC;aCor0;cChC1karia,nAT;!hDkC;!aF6;!ar7CeF5;aJevgenBSoEuC;en,rFVsCu3FvEF;if,uf;nDs6OusC;ouf,s6N;aCg;s,tC;an,h0;hli,nCrosE1ss09;is,nC;!iBU;avi2ho5;aPeNiDoCyaEL;jcieBJlfgang,odrFutR;lFnC;f8TsC;lCt1;ow;bGey,frEhe4QlC;aE5iCy;am,e,s;ed8iC;d,ed;eAur;i,ndeD2rn2sC;!l9t1;lDyC;l1ne;lDtC;!er;aCHy;aKernDAiFladDoC;jteB0lodymyr;!iC;mFQsDB;cFha0ktBZnceDrgCOvC;a0ek;!nC;t,zo;!e4StBV;lCnC7sily;!entC;in9J;ghE2lCm70nax,ri,sm0;riCyss87;ch,k;aWeRhNiLoGrEuDyC;!l2roEDs1;n6r6E;avD0eCist0oy,um0;ntCRvBKy;bFdAWmCny;!asDmCoharu;aFFie,y;!z;iA6y;mCt4;!my,othy;adEeoDia0SomC;!as;!dor91;!de4;dFrC;enBKrC;anBJeCy;ll,nBI;!dy;dgh,ha,iCnn2req,tsu5V;cDAka;aYcotWeThPiMlobod0oKpenc2tEurDvenAEyCzym1;ed,lvest2;aj,e9V;anFeDuC;!aA;fan17phEQvCwaA;e77ie;!islaCl9;v,w;lom1rBuC;leymaDHta;dDgmu9UlCm1yabonga;as,v8B;!dhart8Yn9;aEeClo75;lCrm0;d1t1;h9Jne,qu1Jun,wn,yne;aDbastiEDk2Yl5Mpp,rgCth,ymoCU;e1Dio;m4n;!tC;!ie,y;eDPlFmEnCq67tosCMul;dCj2UtiA5;e01ro;!iATkeB6mC4u5;!ik,vato9K;aZeUheC8iRoGuDyC;an,ou;b99dDf4peAssC;!elEG;ol00y;an,bLc7MdJel,geIh0lHmGnEry,sDyC;!ce;ar7Ocoe,s;!aCnBU;ld,n;an,eo;a7Ef;l7Jr;e3Eg2n9olfo,riC;go;bBNeDH;cCl9;ar87c86h54kCo;!ey,ie,y;cFeA3gDid,ubByCza;an8Ln06;g85iC;naC6s;ep;ch8Kfa5hHin2je8HlGmFndEoHpha5sDul,wi36yC;an,mo8O;h9Im4;alDSol3O;iD0on;f,ph;ul;e9CinC;cy,t1;aOeLhilJiFrCyoG;aDeC;m,st1;ka85v2O;eDoC;tr;r8GtC;er,ro;!ipCl6H;!p6U;dCLrcy,tC;ar,e9JrC;!o7;b9Udra8So9UscAHtri62ulCv8I;!ie,o7;ctav6Ji2lImHndrBRrGsDtCum6wB;is,to;aDc6k6m0vCwaBE;al79;ma;i,vR;ar,er;aDeksandr,ivC;er,i2;f,v;aNeLguyBiFoCu3O;aDel,j4l0ma0rC;beAm0;h,m;cFels,g5i9EkDlC;es,s;!au,h96l78olaC;!i,y;hCkCol76;ol75;al,d,il,ls1vC;ilAF;hom,tC;e,hC;anCy;!a5i5;aYeViLoGuDyC;l4Nr1;hamDr84staC;fa,p6E;ed,mG;di10e,hamEis4JntDritz,sCussa;es,he;e,y;ad,ed,mC;ad,ed;cGgu5hai,kFlEnDtchC;!e8O;a9Pik;house,o7t1;ae73eC3ha8Iolaj;ah,hDkC;!ey,y;aDeC;al,l;el,l;hDlv3rC;le,ri8Ev4T;di,met;ay0c00gn4hWjd,ks2NlTmadZnSrKsXtDuric7VxC;imilBKwe8B;eHhEi69tCus,y69;!eo,hCia7;ew,i67;eDiC;as,eu,s;us,w;j,o;cHiGkFlEqu8Qsha83tCv3;iCy;!m,n;in,on;el,o7us;a6Yo7us;!elCin,o7us;!l8o;frAEi5Zny,u5;achDcoCik;lm;ai,y;amDdi,e5VmC;oud;adCm6W;ou;aulCi9P;ay;aWeOiMloyd,oJuDyC;le,nd1;cFdEiDkCth2uk;a7e;gi,s,z;ov7Cv6Hw6H;!as,iC;a6Een;g0nn52renDuCvA4we7D;!iS;!zo;am,n4oC;n5r;a9Yevi,la5KnHoFst2thaEvC;eCi;nte;bo;nCpo8V;!a82el,id;!nC;aAy;mEnd1rDsz73urenCwr6K;ce,t;ry,s;ar,beAont;aOeIhalHiFla4onr63rDu5SylC;e,s;istCzysztof;i0oph2;er0ngsl9p,rC;ilA9k,ollos;ed,id;en0iGnDrmCv4Z;it;!dDnCt1;e2Ny;ri4Z;r,th;cp2j4mEna8BrDsp6them,uC;ri;im,l;al,il;a03eXiVoFuC;an,lCst3;en,iC;an,en,o,us;aQeOhKkub4AnIrGsDzC;ef;eDhCi9Wue;!ua;!f,ph;dCge;i,on;!aCny;h,s,th6J;anDnC;!ath6Hie,n72;!nC;!es;!l,sCy;ph;o,qu3;an,mC;!i,m6V;d,ffFns,rCs4;a7JemDmai7QoCry;me,ni1H;i9Dy;!e73rC;ey,y;cKdBkImHrEsDvi2yC;dBs1;on,p2;ed,oDrCv67;e6Qod;d,s61;al,es5Wis1;a,e,oCub;b,v;ob,qu13;aTbNchiMgLke53lija,nuKonut,rIsEtCv0;ai,suC;ki;aDha0i8XmaCsac;el,il;ac,iaC;h,s;a,vinCw3;!g;k,nngu6X;nac1Xor;ka;ai,rahC;im;aReLoIuCyd6;beAgGmFsC;eyDsC;a3e3;in,n;ber5W;h,o;m2raDsse3wC;a5Pie;c49t1K;a0Qct3XiGnDrC;beAman08;dr7VrC;iCy2N;!k,q1R;n0Tt3S;bKlJmza,nIo,rEsDyC;a5KdB;an,s0;lEo67r2IuCv9;hi5Hki,tC;a,o;an,ey;k,s;!im;ib;a08e00iUlenToQrMuCyorgy;iHnFsC;!taC;f,vC;!e,o;n6tC;er,h2;do,lC;herDlC;auCerQ;me;aEegCov2;!g,orC;!io,y;dy,h7C;dfr9nza3XrDttfC;ri6C;an,d47;!n;acoGlEno,oCuseppe;rgiCvan6O;!o,s;be6Ies,lC;es;mo;oFrC;aDha4HrC;it,y;ld,rd8;ffErgC;!e7iCy;!os;!r9;bElBrCv3;eCla1Nr4Hth,y;th;e,rC;e3YielC;!i4;aXeSiQlOorrest,rCyod2E;aHedFiC;edDtC;s,z;ri18;!d42eri11riC;ck,k;nCs2;cEkC;ie,lC;in,yn;esLisC;!co,z3M;etch2oC;ri0yd;d5lConn;ip;deriFliEng,rC;dinaCg4nan0B;nd8;pe,x;co;bCdi,hd;iEriC;ce,zC;io;an,en,o;benez2dZfrYit0lTmMnJo3rFsteb0th0ugenEvCymBzra;an,eCge4D;ns,re3K;!e;gi,iDnCrol,v3w3;est8ie,st;cCk;!h,k;o0DriCzo;co,qC;ue;aHerGiDmC;aGe3A;lCrh0;!iC;a10o,s;s1y;nu5;beAd1iEliDm2t1viCwood;n,s;ot28s;!as,j5Hot,sC;ha;a3en;!dGg6mFoDua2QwC;a2Pin;arC;do;oZuZ;ie;a04eTiOmitrNoFrag0uEwDylC;an,l0;ay3Hig4D;a3Gdl9nc0st3;minFnDri0ugCvydGy2S;!lF;!a36nCov0;e1Eie,y;go,iDykC;as;cCk;!k;i,y;armuFetDll1mitri7neCon,rk;sh;er,m6riC;ch;id;andLepak,j0lbeAmetri4nIon,rGsEvDwCxt2;ay30ey;en,in;hawn,moC;nd;ek,riC;ck;is,nC;is,y;rt;re;an,le,mKnIrEvC;e,iC;!d;en,iEne0PrCyl;eCin,yl;l45n;n,o,us;!iCny;el,lo;iCon;an,en,on;a0Fe0Ch03iar0lRoJrFuDyrC;il,us;rtC;!is;aEistC;iaCob12;no;ig;dy,lInErC;ey,neliCy;s,us;nEor,rDstaC;nt3;ad;or;by,e,in,l3t1;aHeEiCyde;fCnt,ve;fo0Xt1;menDt4;us;s,t;rFuDyC;!t1;dCs;e,io;enC;ce;aHeGrisC;!toC;phCs;!eC;!r;st2t;d,rCs;b5leC;s,y;cDdrCs6;ic;il;lHmFrC;ey,lDroCy;ll;!o7t1;er1iC;lo;!eb,v3;a09eZiVjorn,laUoSrEuCyr1;ddy,rtKst2;er;aKeFiEuDyC;an,ce,on;ce,no;an,ce;nDtC;!t;dDtC;!on;an,on;dFnC;dDisC;lav;en,on;!foOl9y;bby,gd0rCyd;is;i0Lke;bElDshC;al;al,lL;ek;nIrCshoi;at,nEtC;!raC;m,nd;aDhaCie;rd;rd8;!iDjam3nCs1;ie,y;to;kaMlazs,nHrC;n9rDtC;!holomew;eCy;tt;ey;dCeD;ar,iC;le;ar1Nb1Dd16fon15gust3hm12i0Zja0Yl0Bm07nTputsiSrGsaFugustEveDyCziz;a0kh0;ry;o,us;hi;aMchiKiJjun,mHnEon,tCy0;em,hCie,ur8;ur;aDoC;!ld;ud,v;aCin;an,nd8;!el,ki;baCe;ld;ta;aq;aMdHgel8tCw6;hoFoC;iDnC;!i8y;ne;ny;er7rCy;eDzC;ej;!as,i,j,s,w;!s;s,tolC;iCy;!y;ar,iEmaCos;nu5r;el;ne,r,t;aVbSdBeJfHiGl01onFphonsEt1vC;aPin;on;e,o;so,zo;!sR;!onZrC;ed;c,jaHksFssaHxC;!andC;er,rC;e,os,u;andCei;ar,er,r;ndC;ro;en;eDrecC;ht;rt8;dd3in,n,sC;taC;ir;ni;dDm6;ar;an,en;ad,eC;d,t;in;so;aGi,olErDvC;ik;ian8;f8ph;!o;mCn;!a;dGeFraDuC;!bakr,lfazl;hCm;am;!l;allFel,oulaye,ulC;!lDrahm0;an;ah,o;ah;av,on",Uncountable:"true¦0:2E;1:2L;2:33;a2Ub2Lc29d22e1Rf1Ng1Eh16i11j0Yk0Wl0Rm0Hn0Do0Cp03rZsLt9uran2Jv7w3you gu0E;a5his17i4oo3;d,l;ldlife,ne;rm8t1;apor,ernacul29i3;neg28ol1Otae;eDhBiAo8r4un3yranny;a,gst1B;aff2Oea1Ko4ue nor3;th;o08u3;bleshoot2Ose1Tt;night,othpas1Vwn3;foEsfoE;me off,n;er3und1;e,mod2S;a,nnis;aDcCeBhAi9ki8o7p6t4u3weepstak0;g1Unshi2Hshi;ati08e3;am,el;ace2Keci0;ap,cc1meth2C;n,ttl0;lk;eep,ingl0or1C;lf,na1Gri0;ene1Kisso1C;d0Wfe2l4nd,t3;i0Iurn;m1Ut;abi0e4ic3;e,ke15;c3i01laxa11search;ogni10rea10;a9e8hys7luto,o5re3ut2;amble,mis0s3ten20;en1Zs0L;l3rk;i28l0EyH; 16i28;a24tr0F;nt3ti0M;i0s;bstetri24vercrowd1Qxyg09;a5e4owada3utella;ys;ptu1Ows;il poliZtional securi2;aAe8o5u3;m3s1H;ps;n3o1K;ey,o3;gamy;a3cha0Elancholy,rchandi1Htallurgy;sl0t;chine3g1Aj1Hrs,thema1Q; learn1Cry;aught1e6i5ogi4u3;ck,g12;c,s1M;ce,ghtn18nguis1LteratWv1;ath1isVss;ara0EindergartPn3;icke0Aowled0Y;e3upit1;a3llyfiGwel0G;ns;ce,gnor6mp5n3;forma00ter3;net,sta07;atiSort3rov;an18;a7e6isto09o3ung1;ckey,mework,ne4o3rseradi8spitali2use arrest;ky;s2y;adquarteXre;ir,libut,ppiHs3;hi3te;sh;ene8l6o5r3um,ymnas11;a3eZ;niUss;lf,re;ut3yce0F;en; 3ti0W;edit0Hpo3;ol;aNicFlour,o4urnit3;ure;od,rgive3uri1wl;ness;arCcono0LducaBlectr9n7quip8thi0Pvery6x3;ist4per3;ti0B;en0J;body,o08th07;joy3tertain3;ment;ici2o3;ni0H;tiS;nings,th;emi02i6o4raugh3ynas2;ts;pe,wnstai3;rs;abet0ce,s3;honZrepu3;te;aDelciChAivi07l8o3urrency;al,ld w6mmenta5n3ral,ttIuscoB;fusiHt 3;ed;ry;ar;assi01oth0;es;aos,e3;eMwK;us;d,rO;a8i6lood,owlHread5u3;ntGtt1;er;!th;lliarJs3;on;g3ss;ga3;ge;cKdviJeroGirFmBn6ppeal court,r4spi3thleL;rin;ithmet3sen3;ic;i6y3;o4th3;ing;ne;se;en5n3;es2;ty;ds;craft;bi8d3nau7;yna3;mi6;ce;id,ous3;ti3;cs",Infinitive:"true¦0:9G;1:9T;2:AD;3:90;4:9Z;5:84;6:AH;7:A9;8:92;9:A0;A:AG;B:AI;C:9V;D:8R;E:8O;F:97;G:6H;H:7D;a94b8Hc7Jd68e4Zf4Mg4Gh4Ai3Qj3Nk3Kl3Bm34nou48o2Vp2Equ2Dr1Es0CtZuTvRwI;aOeNiLors5rI;eJiI;ng,te;ak,st3;d5e8TthI;draw,er;a2d,ep;i2ke,nIrn;d1t;aIie;liADniAry;nJpI;ho8Llift;cov1dJear8Hfound8DlIplug,rav82tie,ve94;eaAo3X;erIo;cut,go,staAFvalA3w2G;aSeQhNoMrIu73;aIe72;ffi3Smp3nsI;aBfo7CpI;i8oD;pp3ugh5;aJiJrIwaD;eat5i2;nk;aImA0;ch,se;ck3ilor,keImp1r8L;! paD;a0Ic0He0Fh0Bi0Al08mugg3n07o05p02qu01tUuLwI;aJeeIim;p,t5;ll7Wy;bNccMffLggeCmmKppJrI;mouFpa6Zvi2;o0re6Y;ari0on;er,i4;e7Numb;li9KmJsiIveD;de,st;er9it;aMe8MiKrI;ang3eIi2;ng27w;fIng;f5le;b,gg1rI;t3ve;a4AiA;a4UeJit,l7DoI;il,of;ak,nd;lIot7Kw;icEve;atGeak,i0O;aIi6;m,y;ft,ng,t;aKi6CoJriIun;nk,v6Q;ot,rt5;ke,rp5tt1;eIll,nd,que8Gv1w;!k,m;aven9ul8W;dd5tis1Iy;a0FeKiJoI;am,t,ut;d,p5;a0Ab08c06d05f01group,hea00iZjoi4lXmWnVpTq3MsOtMup,vI;amp,eJiIo3B;sEve;l,rI;e,t;i8rI;ie2ofE;eLiKpo8PtIurfa4;o24rI;aHiBuctu8;de,gn,st;mb3nt;el,hra0lIreseF;a4e71;d1ew,o07;aHe3Fo2;a7eFiIo6Jy;e2nq41ve;mbur0nf38;r0t;inKleBocus,rJuI;el,rbiA;aBeA;an4e;aBu4;ei2k8Bla43oIyc3;gni39nci3up,v1;oot,uI;ff;ct,d,liIp;se,ze;tt3viA;aAenGit,o7;aWerUinpoiFlumm1LoTrLuI;b47ke,niArIt;poDsuI;aFe;eMoI;cKd,fe4XhibEmo7noJpo0sp1tru6vI;e,i6o5L;un4;la3Nu8;aGclu6dJf1occupy,sup0JvI;a6BeF;etermi4TiB;aGllu7rtr5Ksse4Q;cei2fo4NiAmea7plex,sIva6;eve8iCua6;mp1rItrol,ve;a6It6E;bOccuNmEpMutLverIwe;l07sJtu6Yu0wI;helm;ee,h1F;gr5Cnu2Cpa4;era7i4Ipo0;py,r;ey,seItaH;r2ss;aMe0ViJoIultiply;leCu6Pw;micJnIspla4;ce,g3us;!k;iIke,na9;m,ntaH;aPeLiIo0u3N;ke,ng1quIv5;eIi6S;fy;aKnIss5;d,gI;th5;rn,ve;ng2Gu1N;eep,idnJnI;e4Cow;ap;oHuI;gg3xtaI;po0;gno8mVnIrk;cTdRfQgeChPitia7ju8q1CsNtKun6EvI;a6eIo11;nt,rt,st;erJimi6BoxiPrI;odu4u6;aBn,pr03ru6C;iCpi8tIu8;all,il,ruB;abEibE;eCo3Eu0;iIul9;ca7;i7lu6;b5Xmer0pI;aLer4Uin9ly,oJrI;e3Ais6Bo2;rt,se,veI;riA;le,rt;aLeKiIoiCuD;de,jaInd1;ck;ar,iT;mp1ng,pp5raIve;ng5Mss;ath1et,iMle27oLrI;aJeIow;et;b,pp3ze;!ve5A;gg3ve;aTer45i5RlSorMrJuI;lf4Cndrai0r48;eJiIolic;ght5;e0Qsh5;b3XeLfeEgJsI;a3Dee;eIi2;!t;clo0go,shIwa4Z;ad3F;att1ee,i36;lt1st5;a0OdEl0Mm0FnXquip,rWsVtGvTxI;aRcPeDhOiNpJtIu6;ing0Yol;eKi8lIo0un9;aHoI;it,re;ct,di7l;st,t;a3oDu3B;e30lI;a10u6;lt,mi28;alua7oI;ke,l2;chew,pou0tab19;a0u4U;aYcVdTfSgQhan4joy,lPqOrNsuMtKvI;e0YisI;a9i50;er,i4rI;aHenGuC;e,re;iGol0F;ui8;ar9iC;a9eIra2ulf;nd1;or4;ang1oIu8;r0w;irc3lo0ou0ErJuI;mb1;oaGy4D;b3ct;bKer9pI;hasiIow1;ze;aKody,rI;a4oiI;d1l;lm,rk;ap0eBuI;ci40de;rIt;ma0Rn;a0Re04iKo,rIwind3;aw,ed9oI;wn;agno0e,ff1g,mi2Kne,sLvI;eIul9;rIst;ge,t;aWbVcQlod9mant3pNru3TsMtI;iIoDu37;lJngI;uiA;!l;ol2ua6;eJlIo0ro2;a4ea0;n0r0;a2Xe36lKoIu0S;uIv1;ra9;aIo0;im;a3Kur0;b3rm;af5b01cVduBep5fUliTmQnOpMrLsiCtaGvI;eIol2;lop;ch;a20i2;aDiBloIoD;re,y;oIy;te,un4;eJoI;liA;an;mEv1;a4i0Ao06raud,y;ei2iMla8oKrI;ee,yI;!pt;de,mIup3;missi34po0;de,ma7ph1;aJrief,uI;g,nk;rk;mp5rk5uF;a0Dea0h0Ai09l08oKrIurta1G;a2ea7ipp3uI;mb3;ales4e04habEinci6ll03m00nIrro6;cXdUfQju8no7qu1sLtKvI;eIin4;ne,r9y;aHin2Bribu7;er2iLoli2Epi8tJuI;lt,me;itu7raH;in;d1st;eKiJoIroFu0;rm;de,gu8rm;ss;eJoI;ne;mn,n0;eIlu6ur;al,i2;buCe,men4pI;eIi3ly;l,te;eBi6u6;r4xiC;ean0iT;rcumveFte;eJirp,oI;o0p;riAw;ncIre5t1ulk;el;a02eSi6lQoPrKuI;iXrIy;st,y;aLeaKiJoad5;en;ng;stfeLtX;ke;il,l11mba0WrrMth1;eIow;ed;!coQfrie1LgPhMliLqueaKstJtrIwild1;ay;ow;th;e2tt3;a2eJoI;ld;ad;!in,ui3;me;bysEckfi8ff3tI;he;b15c0Rd0Iff0Ggree,l0Cm09n03ppZrXsQttOuMvJwaE;it;eDoI;id;rt;gIto0X;meF;aIeCraB;ch,in;pi8sJtoI;niA;aKeIi04u8;mb3rt,ss;le;il;re;g0Hi0ou0rI;an9i2;eaKly,oiFrI;ai0o2;nt;r,se;aMi0GnJtI;icipa7;eJoIul;un4y;al;ly0;aJu0;se;lga08ze;iKlI;e9oIu6;t,w;gn;ix,oI;rd;a03jNmiKoJsoI;rb;pt,rn;niIt;st1;er;ouJuC;st;rn;cLhie2knowled9quiItiva7;es4re;ce;ge;eQliOoKrJusI;e,tom;ue;mIst;moJpI;any,liA;da7;ma7;te;pt;andPduBet,i6oKsI;coKol2;ve;liArt,uI;nd;sh;de;ct;on",Person:"true¦0:1Q;a29b1Zc1Md1Ee18f15g13h0Ri0Qj0Nk0Jl0Gm09n06o05p00rPsItCusain bolt,v9w4xzibit,y1;anni,oko on2uji,v1;an,es;en,o;a3ednesday adams,i2o1;lfram,o0Q;ll ferrell,z khalifa;lt disn1Qr1;hol,r0G;a2i1oltai06;n dies0Zrginia wo17;lentino rossi,n goG;a4h3i2ripp,u1yra banks;lZpac shakur;ger woods,mba07;eresa may,or;kashi,t1ylor;um,ya1B;a5carlett johanss0h4i3lobodan milosevic,no2ocr1Lpider1uperm0Fwami; m0Em0E;op dogg,w whi1H;egfried,nbad;akespeaTerlock holm1Sia labeouf;ddam hussa16nt1;a cla11ig9;aAe6i5o3u1za;mi,n dmc,paul,sh limbau1;gh;bin hood,d stew16nald1thko;in0Mo;han0Yngo starr,valdo;ese witherspo0i1mbrandt;ll2nh1;old;ey,y;chmaninoff,ffi,iJshid,y roma1H;a4e3i2la16o1uff daddy;cahont0Ie;lar,p19;le,rZ;lm17ris hilt0;leg,prah winfr0Sra;a2e1iles cra1Bostradam0J; yo,l5tt06wmQ;pole0s;a5e4i2o1ubar03;by,lie5net,rriss0N;randa ju1tt romn0M;ly;rl0GssiaB;cklemo1rkov,s0ta hari,ya angelou;re;ady gaga,e1ibera0Pu;bron jam0Xch wale1e;sa;anye west,e3i1obe bryant;d cudi,efer suther1;la0P;ats,sha;a2effers0fk,k rowling,rr tolki1;en;ck the ripp0Mwaharlal nehru,y z;liTnez,ron m7;a7e5i3u1;lk hog5mphrey1sa01;! bog05;l1tl0H;de; m1dwig,nry 4;an;ile selassFlle ber4m3rrison1;! 1;ford;id,mo09;ry;ast0iannis,o1;odwPtye;ergus0lorence nightinga08r1;an1ederic chopN;s,z;ff5m2nya,ustaXzeki1;el;eril lagasse,i1;le zatop1nem;ek;ie;a6e4i2octor w1rake;ho;ck w1ego maradoC;olf;g1mi lovaOnzel washingt0;as;l1nHrth vadR;ai lNt0;a8h5lint0o1thulhu;n1olio;an,fuci1;us;on;aucKop2ristian baMy1;na;in;millo,ptain beefhe4r1;dinal wols2son1;! palmF;ey;art;a8e5hatt,i3oHro1;ck,n1;te;ll g1ng crosby;atB;ck,nazir bhut2rtil,yon1;ce;to;nksy,rack ob1;ama;l 6r3shton kutch2vril lavig8yn ra1;nd;er;chimed2istot1;le;es;capo2paci1;no;ne",Adjective:"true¦0:AI;1:BS;2:BI;3:BA;4:A8;5:84;6:AV;7:AN;8:AF;9:7H;A:BQ;B:AY;C:BC;D:BH;E:9Y;aA2b9Ec8Fd7We79f6Ng6Eh61i4Xj4Wk4Tl4Im41n3Po36p2Oquart7Pr2Ds1Dt14uSvOwFye29;aMeKhIiHoF;man5oFrth7G;dADzy;despreB1n w97s86;acked1UoleF;!sa6;ather1PeFll o70ste1D;!k5;nt1Ist6Ate4;aHeGiFola5T;bBUce versa,gi3Lle;ng67rsa5R;ca1gBSluAV;lt0PnLpHrGsFttermoBL;ef9Ku3;b96ge1; Hb32pGsFtiAH;ca6ide d4R;er,i85;f52to da2;a0Fbeco0Hc0Bd04e02f01gu1XheaBGiXkn4OmUnTopp06pRrNsJtHus0wF;aFiel3K;nt0rra0P;app0eXoF;ld,uS;eHi37o5ApGuF;perv06spec39;e1ok9O;en,ttl0;eFu5;cogn06gul2RlGqu84sF;erv0olv0;at0en33;aFrecede0E;id,rallel0;am0otic0;aFet;rri0tF;ch0;nFq26vers3;sur0terFv7U;eFrupt0;st0;air,inish0orese98;mploy0n7Ov97xpF;ect0lain0;eHisFocume01ue;clFput0;os0;cid0rF;!a8Scov9ha8Jlyi8nea8Gprivileg0sMwF;aFei9I;t9y;hGircumcFonvin2U;is0;aFeck0;lleng0rt0;b20ppea85ssuGttend0uthorF;iz0;mi8;i4Ara;aLeIhoHip 25oGrF;anspare1encha1i2;geth9leADp notch,rpB;rny,ugh6H;ena8DmpGrFs6U;r49tia4;eCo8P;leFst4M;nt0;a0Dc09e07h06i04ki03l01mug,nobbi4XoVpRqueami4XtKuFymb94;bHccinAi generis,pFr5;erFre7N;! dup9b,vi70;du0li7Lp6IsFurb7J;eq9Atanda9X;aKeJi16o2QrGubboFy4Q;rn;aightFin5GungS; fFfF;or7V;adfa9Pri6;lwa6Ftu82;arHeGir6NlendBot Fry;on;c3Qe1S;k5se; call0lImb9phistic16rHuFviV;ndFth1B;proof;dBry;dFub6; o2A;e60ipF;pe4shod;ll0n d7R;g2HnF;ceEg6ist9;am3Se9;co1Zem5lfFn6Are7; suf4Xi43;aGholFient3A;ar5;rlFt4A;et;cr0me,tisfac7F;aOeIheumatoBiGoF;bu8Ztt7Gy3;ghtFv3; 1Sf6X;cJdu8PlInown0pro69sGtF;ard0;is47oF;lu2na1;e1Suc45;alcit8Xe1ondi2;bBci3mpa1;aSePicayu7laOoNrGuF;bl7Tnjabi;eKiIoF;b7VfGmi49pFxi2M;er,ort81;a7uD;maFor,sti7va2;!ry;ciDexis0Ima2CpaB;in55puli8G;cBid;ac2Ynt 3IrFti2;ma40tFv7W;!i3Z;i2YrFss7R;anoBtF; 5XiF;al,s5V;bSffQkPld OnMrLth9utKverF;!aIbMdHhGni75seas,t,wF;ei74rou74;a63e7A;ue;ll;do1Ger,si6A;d3Qg2Aotu5Z; bFbFe on o7g3Uli7;oa80;fashion0school;!ay; gua7XbFha5Uli7;eat;eHligGsF;ce7er0So1C;at0;diFse;a1e1;aOeNiMoGuF;anc0de; moEnHrthFt6V;!eFwe7L;a7Krn;chaGdescri7Iprof30sF;top;la1;ght5;arby,cessa4ighbor5wlyw0xt;k0usiaFv3;ti8;aQeNiLoHuF;dIltiF;facet0p6;deHlGnFot,rbBst;ochro4Xth5;dy;rn,st;ddle ag0nF;dbloZi,or;ag9diocEga,naGrFtropolit4Q;e,ry;ci8;cIgenta,inHj0Fkeshift,mmGnFri4Oscu61ver18;da5Dy;ali4Lo4U;!stream;abEho;aOeLiIoFumberi8;ngFuti1R;stan3RtF;erm,i4H;ghtGteraF;l,ry,te;heart0wei5O;ft JgFss9th3;al,eFi0M;nda4;nguBps0te5;apGind5noF;wi8;ut;ad0itte4uniW;ce co0Hgno6Mll0Cm04nHpso 2UrF;a2releF;va1; ZaYcoWdReQfOgrNhibi4Ri05nMoLsHtFvalu5M;aAeF;nDrdepe2K;a7iGolFuboI;ub6ve1;de,gF;nifica1;rdi5N;a2er;own;eriIiLluenVrF;ar0eq5H;pt,rt;eHiGoFul1O;or;e,reA;fiFpe26termi5E;ni2;mpFnsideCrreA;le2;ccuCdeq5Ene,ppr4J;fFsitu,vitro;ro1;mJpF;arHeGl15oFrop9;li2r11;n2LrfeA;ti3;aGeFi18;d4BnD;tuE;egGiF;c0YteC;al,iF;tiF;ma2;ld;aOelNiLoFuma7;a4meInHrrGsFur5;ti6;if4E;e58o3U; ma3GsF;ick;ghfalut2HspF;an49;li00pf33;i4llow0ndGrdFtM; 05coEworki8;sy,y;aLener44iga3Blob3oKrGuF;il1Nng ho;aFea1Fizzl0;cGtF;ef2Vis;ef2U;ld3Aod;iFuc2D;nf2R;aVeSiQlOoJrF;aGeFil5ug3;q43tf2O;gFnt3S;i6ra1;lk13oHrF; keeps,eFge0Vm9tu41;g0Ei2Ds3R;liF;sh;ag4Mowe4uF;e1or45;e4nF;al,i2;d Gmini7rF;ti6ve1;up;bl0lDmIr Fst pac0ux;oGreacF;hi8;ff;ed,ili0R;aXfVlTmQnOqu3rMthere3veryday,xF;aApIquisi2traHuF;be48lF;ta1;!va2L;edRlF;icF;it;eAstF;whi6; Famor0ough,tiE;rou2sui2;erGiF;ne1;ge1;dFe2Aoq34;er5;ficF;ie1;g9sF;t,ygF;oi8;er;aWeMiHoGrFue;ea4owY;ci6mina1ne,r31ti8ubQ;dact2Jfficult,m,sGverF;ge1se;creGePjoi1paCtF;a1inA;et,te; Nadp0WceMfiLgeneCliJmuEpeIreliAsGvoF;id,ut;pFtitu2ul1L;eCoF;nde1;ca2ghF;tf13;a1ni2;as0;facto;i5ngero0I;ar0Ce09h07i06l05oOrIuF;rmudgeon5stoma4teF;sy;ly;aIeHu1EystalF; cleFli7;ar;epy;fFv17z0;ty;erUgTloSmPnGrpoCunterclVveFy;rt;cLdJgr21jIsHtrF;aFi2;dic0Yry;eq1Yta1;oi1ug3;escenFuN;di8;a1QeFiD;it0;atoDmensuCpF;ass1SulF;so4;ni3ss3;e1niza1;ci1J;ockwiD;rcumspeAvil;eFintzy;e4wy;leGrtaF;in;ba2;diac,ef00;a00ePiLliJoGrFuck nak0;and new,isk,on22;gGldface,naF; fi05fi05;us;nd,tF;he;gGpartisFzarE;an;tiF;me;autifOhiNlLnHsFyoN;iWtselF;li8;eGiFt;gn;aFfi03;th;at0oF;v0w;nd;ul;ckwards,rF;e,rT; priori,b13c0Zd0Tf0Ng0Ihe0Hl09mp6nt06pZrTsQttracti0MuLvIwF;aGkF;wa1B;ke,re;ant garGeraF;ge;de;diIsteEtF;heFoimmu7;nt07;re;to4;hGlFtu2;eep;en;bitIchiv3roHtF;ifiFsy;ci3;ga1;ra4;ry;pFt;aHetizi8rF;oprF;ia2;llFre1;ed,i8;ng;iquFsy;at0e;ed;cohKiJkaHl,oGriFterX;ght;ne,of;li7;ne;ke,ve;olF;ic;ad;ain07gressiIi6rF;eeF;ab6;le;ve;fGraB;id;ectGlF;ue1;ioF;na2; JaIeGvF;erD;pt,qF;ua2;ma1;hoc,infinitum;cuCquiGtu3u2;al;esce1;ra2;erSjeAlPoNrKsGuF;nda1;e1olu2trF;aAuD;se;te;eaGuF;pt;st;aFve;rd;aFe;ze;ct;ra1;nt",Pronoun:"true¦elle,h3i2me,she,th0us,we,you;e0ou;e,m,y;!l,t;e,im",Preposition:"true¦aPbMcLdKexcept,fIinGmid,notwithstandiWoDpXqua,sCt7u4v2w0;/o,hereSith0;! whHin,oW;ersus,i0;a,s a vis;n1p0;!on;like,til;h1ill,oward0;!s;an,ereby,r0;ough0u;!oM;ans,ince,o that,uch G;f1n0ut;!to;!f;! 0to;effect,part;or,r0;om;espite,own,u3;hez,irca;ar1e0oBy;sides,tween;ri7;bo8cross,ft7lo6m4propos,round,s1t0;!op;! 0;a whole,long 0;as;id0ong0;!st;ng;er;ut",SportsTeam:"true¦0:18;1:1E;2:1D;3:14;a1Db15c0Sd0Kfc dallas,g0Ihouston 0Hindiana0Gjacksonville jagua0k0El0Am01new UoRpKqueens parkJreal salt lake,sBt6utah jazz,vancouver whitecaps,w4yW;ashington 4h10;natio1Mredski2wizar0W;ampa bay 7e6o4;ronto 4ttenham hotspur;blue ja0Mrapto0;nnessee tita2xasD;buccanee0ra0K;a8eattle 6porting kansas0Wt4; louis 4oke0V;c1Drams;marine0s4;eah13ounH;cramento Rn 4;antonio spu0diego 4francisco gJjose earthquak1;char08paB; ran07;a9h6ittsburgh 5ortland t4;imbe0rail blaze0;pirat1steele0;il4oenix su2;adelphia 4li1;eagl1philNunE;dr1;akland 4klahoma city thunder,rlando magic;athle0Lrai4;de0;england 8orleans 7york 4;g5je3knYme3red bul0Xy4;anke1;ian3;pelica2sain3;patrio3revolut4;ion;anchEeAi4ontreal impact;ami 8lwaukee b7nnesota 4;t5vi4;kings;imberwolv1wi2;rewe0uc0J;dolphi2heat,marli2;mphis grizz4ts;li1;a6eic5os angeles 4;clippe0dodFlaB;esterV; galaxy,ke0;ansas city 4nF;chiefs,roya0D; pace0polis col3;astr05dynamo,rocke3texa2;olden state warrio0reen bay pac4;ke0;allas 8e4i04od6;nver 6troit 4;lio2pisto2ti4;ge0;broncYnugge3;cowbo5maver4;icZ;ys;arEelLhAincinnati 8leveland 6ol4;orado r4umbus crew sc;api7ocki1;brow2cavalie0guar4in4;dia2;bengaVre4;ds;arlotte horAicago 4;b5cubs,fire,wh4;iteB;ea0ulQ;diff4olina panthe0; city;altimore Alackburn rove0oston 6rooklyn 4uffalo bilN;ne3;ts;cel5red4; sox;tics;rs;oriol1rave2;rizona Ast8tlanta 4;brav1falco2h4;awA;ns;es;on villa,r4;os;c6di4;amondbac4;ks;ardi4;na4;ls",Unit:"true¦a07b04cXdWexVfTgRhePinYjoule0BkMlJmDnan08oCp9quart0Bsq ft,t7volts,w6y2ze3°1µ0;g,s;c,f,n;dVear1o0;ttR; 0s 0;old;att,b;erNon0;!ne02;ascals,e1i0;cXnt00;rcent,tJ;hms,unceY;/s,e4i0m²,²,³;/h,cro2l0;e0liK;!²;grLsR;gCtJ;it1u0;menQx;erPreP;b5elvins,ilo1m0notO;/h,ph,²;!byGgrEmCs;ct0rtzL;aJogrC;allonJb0ig3rB;ps;a0emtEl oz,t4;hrenheit,radG;aby9;eci3m1;aratDe1m0oulombD;²,³;lsius,nti0;gr2lit1m0;et0;er8;am7;b1y0;te5;l,ps;c2tt0;os0;econd1;re0;!s","Noun|Gerund":"true¦0:3O;1:3M;2:3N;3:3D;4:32;5:2V;6:3E;7:3K;8:36;9:3J;A:3B;a3Pb37c2Jd27e23f1Vg1Sh1Mi1Ij1Gk1Dl18m13n11o0Wp0Pques0Sr0EsTtNunderMvKwFyDzB;eroi0oB;ni0o3P;aw2eB;ar2l3;aEed4hispe5i5oCrB;ap8est3i1;n0ErB;ki0r31;i1r2s9tc9;isualizi0oB;lunt1Vti0;stan4ta6;aFeDhin6iCraBy8;c6di0i2vel1M;mi0p8;aBs1;c9si0;l6n2s1;aUcReQhOiMkatKl2Wmo6nowJpeItFuCwB;ea5im37;b35f0FrB;fi0vB;e2Mi2J;aAoryt1KrCuB;d2KfS;etc9ugg3;l3n4;bCi0;ebBi0;oar4;gnBnAt1;a3i0;ip8oB;p8rte2u1;a1r27t1;hCo5reBulp1;a2Qe2;edu3oo3;i3yi0;aKeEi4oCuB;li0n2;oBwi0;fi0;aFcEhear7laxi0nDpor1sB;pon4tructB;r2Iu5;de5;or4yc3;di0so2;p8ti0;aFeacek20laEoCrBublis9;a1Teten4in1oces7;iso2siB;tio2;n2yi0;ckaAin1rB;ki0t1O;fEpeDrganiCvB;erco24ula1;si0zi0;ni0ra1;fe5;avi0QeBur7;gotia1twor6;aDeCi2oB;de3nito5;a2dita1e1ssaA;int0XnBrke1;ifUufactu5;aEeaDiBodAyi0;cen7f1mi1stB;e2i0;r2si0;n4ug9;iCnB;ea4it1;c6l3;ogAuB;dAgg3stif12;ci0llust0VmDnBro2;nova1sp0NterBven1;ac1vie02;agi2plo4;aDea1iCoBun1;l4w3;ki0ri0;nd3rB;roWvB;es1;aCene0Lli4rBui4;ee1ie0N;rde2the5;aHeGiDlCorBros1un4;e0Pmat1;ir1oo4;gh1lCnBs9;anZdi0;i0li0;e3nX;r0Zscina1;a1du01nCxB;erci7plo5;chan1di0ginB;ee5;aLeHiGoub1rCum8wB;el3;aDeCiB;bb3n6vi0;a0Qs7;wi0;rTscoDvi0;ba1coZlBvelo8;eCiB;ve5;ga1;nGti0;aVelebUhSlPoDrBur3yc3;aBos7yi0;f1w3;aLdi0lJmFnBo6pi0ve5;dDsCvinB;ci0;trBul1;uc1;muniDpB;lBo7;ai2;ca1;lBo5;ec1;c9ti0;ap8eaCimToBubT;ni0t9;ni0ri0;aBee5;n1t1;ra1;m8rCs1te5;ri0;vi0;aPeNitMlLoGrDuB;dge1il4llBr8;yi0;an4eat9oadB;cas1;di0;a1mEokB;i0kB;ee8;pi0;bi0;es7oa1;c9i0;gin2lonAt1;gi0;bysit1c6ki0tt3;li0;ki0;bando2cGdverti7gi0pproac9rgDssuCtB;trac1;mi0;ui0;hi0;si0;coun1ti0;ti0;ni0;ng",PhrasalVerb:"true¦0:92;1:96;2:8H;3:8V;4:8A;5:83;6:85;7:98;8:90;9:8G;A:8X;B:8R;C:8U;D:8S;E:70;F:97;G:8Y;H:81;I:7H;J:79;a9Fb7Uc6Rd6Le6Jf5Ig50h4Biron0j47k40l3Em31n2Yo2Wp2Cquiet Hr1Xs0KtZuXvacuu6QwNyammerBzK;ero Dip LonK;e0k0;by,ov9up;aQeMhLiKor0Mrit19;mp0n3Fpe0r5s5;ackAeel Di0S;aLiKn33;gh 3Wrd0;n Dr K;do1in,oJ;it 79k5lk Lrm 69sh Kt83v60;aw3do1o7up;aw3in,oC;rgeBsK;e 2herE;a00eYhViRoQrMuKypP;ckErn K;do1in,oJup;aLiKot0y 30;ckl7Zp F;ck HdK;e 5Y;n7Wp 3Es5K;ck MdLe Kghten 6me0p o0Rre0;aw3ba4do1in,up;e Iy 2;by,oG;ink Lrow K;aw3ba4in,up;ba4ov9up;aKe 77ll62;m 2r 5M;ckBke Llk K;ov9shit,u47;aKba4do1in,leave,o4Dup;ba4ft9pa69w3;a0Vc0Te0Mh0Ii0Fl09m08n07o06p01quar5GtQuOwK;earMiK;ngLtch K;aw3ba4o8K; by;cKi6Bm 2ss0;k 64;aReQiPoNrKud35;aigh2Det75iK;ke 7Sng K;al6Yup;p Krm2F;by,in,oG;c3Ln3Lr 2tc4O;p F;c3Jmp0nd LrKveAy 2O;e Ht 2L;ba4do1up;ar3GeNiMlLrKurB;ead0ingBuc5;a49it 6H;c5ll o3Cn 2;ak Fe1Xll0;a3Bber 2rt0und like;ap 5Vow Duggl5;ash 6Noke0;eep NiKow 6;cLp K;o6Dup;e 68;in,oK;ff,v9;de19gn 4NnKt 6Gz5;gKkE; al6Ale0;aMoKu5W;ot Kut0w 7M;aw3ba4f48oC;c2WdeEk6EveA;e Pll1Nnd Orv5tK; Ktl5J;do1foLin,o7upK;!on;ot,r5Z;aw3ba4do1in,o33up;oCto;al66out0rK;ap65ew 6J;ilAv5;aXeUiSoOuK;b 5Yle0n Kstl5;aLba4do1inKo2Ith4Nu5P;!to;c2Xr8w3;ll Mot LpeAuK;g3Ind17;a2Wf3Po7;ar8in,o7up;ng 68p oKs5;ff,p18;aKelAinEnt0;c6Hd K;o4Dup;c27t0;aZeYiWlToQrOsyc35uK;ll Mn5Kt K;aKba4do1in,oJto47up;pa4Dw3;a3Jdo1in,o21to45up;attleBess KiNop 2;ah2Fon;iLp Kr4Zu1Gwer 6N;do1in,o6Nup;nt0;aLuK;gEmp 6;ce u20y 6D;ck Kg0le 4An 6p5B;oJup;el 5NncilE;c53ir 39n0ss MtLy K;ba4oG; Hc2R;aw3ba4in,oJ;pKw4Y;e4Xt D;aLerd0oK;dAt53;il Hrrow H;aTeQiPoLuK;ddl5ll I;c1FnkeyMp 6uthAve K;aKdo1in,o4Lup;l4Nw3; wi4K;ss0x 2;asur5e3SlLss K;a21up;t 6;ke Ln 6rKs2Ax0;k 6ryA;do,fun,oCsure,up;a02eViQoLuK;ck0st I;aNc4Fg MoKse0;k Kse4D;aft9ba4do1forw37in56o0Zu46;in,oJ;d 6;e NghtMnLsKve 00;ten F;e 2k 2; 2e46;ar8do1in;aMt LvelK; oC;do1go,in,o7up;nEve K;in,oK;pKut;en;c5p 2sh LtchBughAy K;do1o59;in4Po7;eMick Lnock K;do1oCup;oCup;eLy K;in,up;l Ip K;aw3ba4do1f04in,oJto,up;aMoLuK;ic5mpE;ke3St H;c43zz 2;a01eWiToPuK;nLrrKsh 6;y 2;keLt K;ar8do1;r H;lKneErse3K;d Ke 2;ba4dKfast,o0Cup;ear,o1;de Lt K;ba4on,up;aw3o7;aKlp0;d Ml Ir Kt 2;fKof;rom;f11in,o03uW;cPm 2nLsh0ve Kz2P;at,it,to;d Lg KkerP;do1in,o2Tup;do1in,oK;ut,v9;k 2;aZeTive Rloss IoMrLunK; f0S;ab hold,in43ow 2U; Kof 2I;aMb1Mit,oLr8th1IuK;nd9;ff,n,v9;bo7ft9hQw3;aw3bKdo1in,oJrise,up,w3;a4ir2H;ar 6ek0t K;aLb1Fdo1in,oKr8up;ff,n,ut,v9;cLhKl2Fr8t,w3;ead;ross;d aKng 2;bo7;a0Ee07iYlUoQrMuK;ck Ke2N;ar8up;eLighten KownBy 2;aw3oG;eKshe27; 2z5;g 2lMol Krk I;aKwi20;bo7r8;d 6low 2;aLeKip0;sh0;g 6ke0mKrKtten H;e F;gRlPnNrLsKzzle0;h F;e Km 2;aw3ba4up;d0isK;h 2;e Kl 1T;aw3fPin,o7;ht ba4ure0;ePnLsK;s 2;cMd K;fKoG;or;e D;d04l 2;cNll Krm0t1G;aLbKdo1in,o09sho0Eth08victim;a4ehi2O;pa0C;e K;do1oGup;at Kdge0nd 12y5;in,o7up;aOi1HoNrK;aLess 6op KuN;aw3b03in,oC;gBwB; Ile0ubl1B;m 2;a0Ah05l02oOrLut K;aw3ba4do1oCup;ackBeep LoKy0;ss Dwd0;by,do1in,o0Uup;me NoLuntK; o2A;k 6l K;do1oG;aRbQforOin,oNtKu0O;hLoKrue;geth9;rough;ff,ut,v9;th,wK;ard;a4y;paKr8w3;rt;eaLose K;in,oCup;n 6r F;aNeLiK;ll0pE;ck Der Kw F;on,up;t 2;lRncel0rOsMtch LveE; in;o1Nup;h Dt K;doubt,oG;ry LvK;e 08;aw3oJ;l Km H;aLba4do1oJup;ff,n,ut;r8w3;a0Ve0MiteAl0Fo04rQuK;bblNckl05il0Dlk 6ndl05rLsKtMy FzzA;t 00;n 0HsK;t D;e I;ov9;anWeaUiLush K;oGup;ghQng K;aNba4do1forMin,oLuK;nd9p;n,ut;th;bo7lKr8w3;ong;teK;n 2;k K;do1in,o7up;ch0;arTg 6iRn5oPrNssMttlLunce Kx D;aw3ba4;e 6; ar8;e H;do1;k Dt 2;e 2;l 6;do1up;d 2;aPeed0oKurt0;cMw K;aw3ba4do1o7up;ck;k K;in,oC;ck0nk0stA; oQaNef 2lt0nd K;do1ov9up;er;up;r Lt K;do1in,oCup;do1o7;ff,nK;to;ck Pil0nMrgLsK;h D;ainBe D;g DkB; on;in,o7;aw3do1in,oCup;ff,ut;ay;ct FdQir0sk MuctionA; oG;ff;ar8o7;ouK;nd; o7;d K;do1oKup;ff,n;wn;o7up;ut",ProperNoun:"true¦aIbDc8dalhousHe7f5gosford,h4iron maiden,kirby,landsdowne,m2nis,r1s0wembF;herwood,paldiB;iel,othwe1;cgi0ercedes,issy;ll;intBudsB;airview,lorence,ra0;mpt9nco;lmo,uro;a1h0;arlt6es5risti;rl0talina;et4i0;ng;arb3e0;et1nt0rke0;ley;on;ie;bid,jax","Person|Place":"true¦a8d6h4jordan,k3orlando,s1vi0;ctor9rgin9;a0ydney;lvador,mara,ntia4;ent,obe;amil0ous0;ton;arw2ie0;go;lexandr1ust0;in;ia",LastName:"true¦0:BR;1:BF;2:B5;3:BH;4:AX;5:9Y;6:B6;7:BK;8:B0;9:AV;A:AL;B:8Q;C:8G;D:7K;E:BM;F:AH;aBDb9Zc8Wd88e81f7Kg6Wh64i60j5Lk4Vl4Dm39n2Wo2Op25quispe,r1Ls0Pt0Ev03wTxSyKzG;aIhGimmerm6A;aGou,u;ng,o;khar5ytsE;aKeun9BiHoGun;koya32shiBU;!lG;diGmaz;rim,z;maGng;da,g52mo83sGzaC;aChiBV;iao,u;aLeJiHoGright,u;jcA5lff,ng;lGmm0nkl0sniewsC;kiB1liams33s3;bGiss,lt0;b,er,st0;a6Vgn0lHtG;anabe,s3;k0sh,tG;e2Non;aLeKiHoGukD;gt,lk5roby5;dHllalGnogr3Kr1Css0val3S;ba,ob1W;al,ov4;lasHsel8W;lJn dIrgBEsHzG;qu7;ilyEqu7siljE;en b6Aijk,yk;enzueAIverde;aPeix1VhKi2j8ka43oJrIsui,uG;om5UrG;c2n0un1;an,emblA7ynisC;dorAMlst3Km4rrAth;atch0i8UoG;mHrG;are84laci79;ps3sG;en,on;hirDkah9Mnaka,te,varA;a06ch01eYhUiRmOoMtIuHvGzabo;en9Jobod3N;ar7bot4lliv2zuC;aIeHoG;i7Bj4AyanAB;ele,in2FpheBvens25;l8rm0;kol5lovy5re7Tsa,to,uG;ng,sa;iGy72;rn5tG;!h;l71mHnGrbu;at9cla9Egh;moBo7M;aIeGimizu;hu,vchG;en8Luk;la,r1G;gu9infe5YmGoh,pulveA7rra5P;jGyG;on5;evi6iltz,miHneid0roed0uGwarz;be3Elz;dHtG;!t,z;!t;ar4Th8ito,ka4OlJnGr4saCto,unde19v4;ch7dHtGz;a5Le,os;b53e16;as,ihDm4Po0Y;aVeSiPoJuHyG;a6oo,u;bio,iz,sG;so,u;bKc8Fdrigue67ge10j9YmJosevelt,sItHux,wG;e,li6;a9Ch;enb4Usi;a54e4L;erts15i93;bei4JcHes,vGzzo;as,e9;ci,hards12;ag2es,iHut0yG;es,nol5N;s,t0;dImHnGsmu97v6C;tan1;ir7os;ic,u;aUeOhMiJoHrGut8;asad,if6Zochazk27;lishc2GpGrti72u10we76;e3Aov51;cHe45nG;as,to;as70hl0;aGillips;k,m,n6I;a3Hde3Wete0Bna,rJtG;ersHrovGters54;!a,ic;!en,on;eGic,kiBss3;i9ra,tz,z;h86k,padopoulIrk0tHvG;ic,l4N;el,te39;os;bMconn2Ag2TlJnei6PrHsbor6XweBzG;dem7Rturk;ella4DtGwe6N;ega,iz;iGof7Hs8I;vGyn1R;ei9;aSri1;aPeNiJoGune50ym2;rHvGwak;ak4Qik5otn66;odahl,r4S;cholsZeHkolGls4Jx3;ic,ov84;ls1miG;!n1;ils3mG;co4Xec;gy,kaGray2sh,var38;jiGmu9shiG;ma;a07c04eZiWoMuHyeG;rs;lJnIrGssoli6S;atGp03r7C;i,ov4;oz,te58;d0l0;h2lOnNo0RrHsGza1A;er,s;aKeJiIoz5risHtG;e56on;!on;!n7K;au,i9no,t5J;!lA;r1Btgome59;i3El0;cracFhhail5kkeHlG;l0os64;ls1;hmeJiIj30lHn3Krci0ssiGyer2N;!er;n0Po;er,j0;dDti;cartHlG;aughl8e2;hy;dQe7Egnu68i0jer3TkPmNnMrItHyG;er,r;ei,ic,su21thews;iHkDquAroqu8tinG;ez,s;a5Xc,nG;!o;ci5Vn;a5UmG;ad5;ar5e6Kin1;rig77s1;aVeOiLoJuHyG;!nch;k4nGo;d,gu;mbarGpe3Fvr4we;di;!nGu,yana2B;coln,dG;b21holm,strom;bedEfeKhIitn0kaHn8rGw35;oy;!j;m11tG;in1on1;bvGvG;re;iGmmy,ng,rs2Qu,voie,ws3;ne,t1F;aZeYh2iWlUnez50oNrJuHvar2woG;k,n;cerGmar68znets5;a,o34;aHem0isGyeziu;h23t3O;m0sni4Fus3KvG;ch4O;bay57ch,rh0Usk16vaIwalGzl5;czGsC;yk;cIlG;!cGen4K;huk;!ev4ic,s;e8uiveG;rt;eff0kGl4mu9nnun1;ucF;ll0nnedy;hn,llKminsCne,pIrHstra3Qto,ur,yGzl5;a,s0;j0Rls22;l2oG;or;oe;aPenOha6im14oHuG;ng,r4;e32hInHrge32u6vG;anD;es,ss3;anHnsG;en,on,t3;nesGs1R;en,s1;kiBnings,s1;cJkob4EnGrv0E;kDsG;en,sG;en0Ion;ks3obs2A;brahimDglesi5Nke5Fl0Qno07oneIshikHto,vanoG;u,v54;awa;scu;aVeOiNjaltal8oIrist50uG;!aGb0ghAynh;m2ng;a6dz4fIjgaa3Hk,lHpUrGwe,x3X;ak1Gvat;mAt;er,fm3WmG;ann;ggiBtchcock;iJmingw4BnHrGss;nand7re9;deGriks1;rs3;kkiHnG;on1;la,n1;dz4g1lvoQmOns0ZqNrMsJuIwHyG;asFes;kiB;g1ng;anHhiG;mo14;i,ov0J;di6p0r10t;ue;alaG;in1;rs1;aVeorgUheorghe,iSjonRoLrJuGw3;errGnnar3Co,staf3Ctierr7zm2;a,eG;ro;ayli6ee2Lg4iffithGub0;!s;lIme0UnHodGrbachE;e,m2;calvAzale0S;dGubE;bGs0E;erg;aj,i;bs3l,mGordaO;en7;iev3U;gnMlJmaIndFo,rGsFuthi0;cGdn0za;ia;ge;eaHlG;agh0i,o;no;e,on;aVerQiLjeldsted,lKoIrHuG;chs,entAji41ll0;eem2iedm2;ntaGrt8urni0wl0;na;emi6orA;lipIsHtzgeraG;ld;ch0h0;ovG;!ic;hatDnanIrG;arGei9;a,i;deY;ov4;b0rre1D;dKinsJriksIsGvaB;cob3GpGtra3D;inoza,osiQ;en,s3;te8;er,is3warG;ds;aXePiNjurhuMoKrisco15uHvorakG;!oT;arte,boHmitru,nn,rGt3C;and,ic;is;g2he0Omingu7nErd1ItG;to;us;aGcki2Hmitr2Ossanayake,x3;s,z; JbnaIlHmirGrvisFvi,w2;!ov4;gado,ic;th;bo0groot,jo6lHsilGvriA;va;a cruz,e3uG;ca;hl,mcevsCnIt2WviG;dGes,s;ov,s3;ielsGku22;!en;ki;a0Be06hRiobQlarkPoIrGunningh1H;awfo0RivGuz;elli;h1lKntJoIrGs2Nx;byn,reG;a,ia;ke,p0;i,rer2K;em2liB;ns;!e;anu;aOeMiu,oIristGu6we;eGiaG;ns1;i,ng,p9uHwGy;!dH;dGng;huJ;!n,onGu6;!g;kJnIpm2ttHudhGv7;ry;erjee,o14;!d,g;ma,raboG;rty;bJl0Cng4rG;eghetHnG;a,y;ti;an,ota1C;cerAlder3mpbeLrIstGvadi0B;iGro;llo;doHl0Er,t0uGvalho;so;so,zo;ll;a0Fe01hYiXlUoNrKuIyG;rLtyG;qi;chan2rG;ke,ns;ank5iem,oGyant;oks,wG;ne;gdan5nIruya,su,uchaHyKziG;c,n5;rd;darGik;enG;ko;ov;aGond15;nco,zG;ev4;ancFshw16;a08oGuiy2;umGwmG;ik;ckRethov1gu,ktPnNrG;gJisInG;ascoGds1;ni;ha;er,mG;anG;!n;gtGit7nP;ss3;asF;hi;er,hG;am;b4ch,ez,hRiley,kk0ldw8nMrIshHtAu0;es;ir;bInHtlGua;ett;es,i0;ieYosa;dGik;a9yoG;padhyG;ay;ra;k,ng;ic;bb0Acos09d07g04kht05lZnPrLsl2tJyG;aHd8;in;la;chis3kiG;ns3;aImstro6sl2;an;ng;ujo,ya;dJgelHsaG;ri;ovG;!a;ersJov,reG;aGjEws;ss1;en;en,on,s3;on;eksejEiyEmeiIvG;ar7es;ez;da;ev;arwHuilG;ar;al;ams,l0;er;ta;as",Ordinal:"true¦eBf7nin5s3t0zeroE;enDhir1we0;lfCn7;d,t3;e0ixt8;cond,vent7;et0th;e6ie7;i2o0;r0urt3;tie4;ft1rst;ight0lev1;e0h,ie1;en0;th",Cardinal:"true¦bEeBf5mEnine7one,s4t0zero;en,h2rDw0;e0o;lve,n5;irt6ousands,ree;even2ix2;i3o0;r1ur0;!t2;ty;ft0ve;e2y;ight0lev1;!e0y;en;illions",Multiple:"true¦b3hundred,m3qu2se1t0;housand,r2;pt1xt1;adr0int0;illion",City:"true¦0:74;1:61;2:6G;3:6J;4:5S;a68b53c4Id48e44f3Wg3Hh39i31j2Wk2Fl23m1Mn1Co19p0Wq0Ur0Os05tRuQvLwDxiBy9z5;a7h5i4Muri4O;a5e5ongsh0;ng3H;greb,nzib5G;ang2e5okoha3Sunfu;katerin3Hrev0;a5n0Q;m5Hn;arsBeAi6roclBu5;h0xi,zh5P;c7n5;d5nipeg,terth4;hoek,s1L;hi5Zkl3A;l63xford;aw;a8e6i5ladivost5Molgogr6L;en3lni6S;ni22r5;o3saill4N;lenc4Wncouv3Sr3ughn;lan bat1Crumqi,trecht;aFbilisi,eEheDiBo9r7u5;l21n63r5;in,ku;i5ondh62;es51poli;kyo,m2Zron1Pulo5;n,uS;an5jua3l2Tmisoa6Bra3;j4Tshui; hag62ssaloni2H;gucigal26hr0l av1U;briz,i6llinn,mpe56ng5rtu,shk2R;i3Esh0;an,chu1n0p2Eyu0;aEeDh8kopje,owe1Gt7u5;ra5zh4X;ba0Ht;aten is55ockholm,rasbou67uttga2V;an8e6i5;jiazhua1llo1m5Xy0;f50n5;ya1zh4H;gh3Kt4Q;att45o1Vv44;cramen16int ClBn5o paulo,ppo3Rrajevo; 7aa,t5;a 5o domin3E;a3fe,m1M;antonio,die3Cfrancisco,j5ped3Nsalvad0J;o5u0;se;em,t lake ci5Fz25;lou58peters24;a9e8i6o5;me,t59;ga,o5yadh;! de janei3F;cife,ims,nn3Jykjavik;b4Sip4lei2Inc2Pwalpindi;ingdao,u5;ez2i0Q;aFeEhDiCo9r7u6yong5;ya1;eb59ya1;a5etor3M;g52to;rt5zn0; 5la4Co;au prin0Melizabe24sa03;ls3Prae5Atts26;iladelph3Gnom pe1Aoenix;ki1tah tik3E;dua,lerYnaji,r4Ot5;na,r32;ak44des0Km1Mr6s5ttawa;a3Vlo;an,d06;a7ew5ing2Fovosibir1Jyc; 5cast36;del24orlea44taip14;g8iro4Wn5pl2Wshv33v0;ch6ji1t5;es,o1;a1o1;a6o5p4;ya;no,sa0W;aEeCi9o6u5;mb2Ani26sc3Y;gadishu,nt6s5;c13ul;evideo,pelli1Rre2Z;ami,l6n14s5;kolc,sissauga;an,waukee;cca,d5lbour2Mmph41ndo1Cssi3;an,ell2Xi3;cau,drAkass2Sl9n8r5shh4A;aca6ib5rakesh,se2L;or;i1Sy;a4EchFdal0Zi47;mo;id;aDeAi8o6u5vSy2;anMckn0Odhia3;n5s angel26;d2g bea1N;brev2Be3Lma5nz,sb2verpo28;!ss27; ma39i5;c5pzig;est16; p6g5ho2Wn0Cusan24;os;az,la33;aHharFiClaipeBo9rak0Du7y5;iv,o5;to;ala lump4n5;mi1sh0;hi0Hlka2Xpavog4si5wlo2;ce;da;ev,n5rkuk;gst2sha5;sa;k5toum;iv;bHdu3llakuric0Qmpa3Fn6ohsiu1ra5un1Iwaguc0Q;c0Pj;d5o,p4;ah1Ty;a7e6i5ohannesV;l1Vn0;dd36rusalem;ip4k5;ar2H;bad0mph1OnArkutUs7taXz5;mir,tapala5;pa;fah0l6tanb5;ul;am2Zi2H;che2d5;ianap2Mo20;aAe7o5yder2W; chi mi5ms,nolulu;nh;f6lsin5rakli2;ki;ei;ifa,lifax,mCn5rb1Dva3;g8nov01oi;aFdanEenDhCiPlasgBo9raz,u5;a5jr23;dal6ng5yaquil;zh1J;aja2Oupe;ld coa1Bthen5;bu2S;ow;ent;e0Uoa;sk;lw7n5za;dhi5gt1E;nag0U;ay;aisal29es,o8r6ukuya5;ma;ankfu5esno;rt;rt5sh0; wor6ale5;za;th;d5indhov0Pl paso;in5mont2;bur5;gh;aBe8ha0Xisp4o7resd0Lu5;b5esseldorf,nkirk,rb0shanbe;ai,l0I;ha,nggu0rtmu13;hradSl6nv5troit;er;hi;donghIe6k09l5masc1Zr es sala1KugavpiY;i0lU;gu,je2;aJebu,hAleve0Vo5raio02uriti1Q;lo7n6penhag0Ar5;do1Ok;akKst0V;gUm5;bo;aBen8i6ongqi1ristchur5;ch;ang m7ca5ttago1;go;g6n5;ai;du,zho1;ng5ttogr14;ch8sha,zh07;gliari,i9lga8mayenJn6pe town,r5tanO;acCdiff;ber1Ac5;un;ry;ro;aWeNhKirmingh0WoJr9u5;chareTdapeTenos air7r5s0tu0;g5sa;as;es;a9is6usse5;ls;ba6t5;ol;ne;sil8tisla7zzav5;il5;le;va;ia;goZst2;op6ubaneshw5;ar;al;iCl9ng8r5;g6l5n;in;en;aluru,hazi;fa6grade,o horizon5;te;st;ji1rut;ghd0BkFn9ot8r7s6yan n4;ur;el,r07;celo3i,ranquil09;ou;du1g6ja lu5;ka;alo6k5;ok;re;ng;ers5u;field;a05b02cc01ddis aba00gartaZhmedXizawl,lSmPnHqa00rEsBt7uck5;la5;nd;he7l5;an5;ta;ns;h5unci2;dod,gab5;at;li5;ngt2;on;a8c5kaOtwerp;hora6o3;na;ge;h7p5;ol5;is;eim;aravati,m0s5;terd5;am; 7buquerq6eppo,giers,ma5;ty;ue;basrah al qadim5mawsil al jadid5;ah;ab5;ad;la;ba;ra;idj0u dha5;bi;an;lbo6rh5;us;rg",Region:"true¦0:2O;1:2L;2:2U;3:2F;a2Sb2Fc21d1Wes1Vf1Tg1Oh1Ki1Fj1Bk16l13m0Sn09o07pYqVrSsJtEuBverAw6y4zacatec2W;akut0o0Fu4;cat1k09;a5est 4isconsin,yomi1O;bengal,virgin0;rwick3shington4;! dc;acruz,mont;dmurt0t4;ah,tar4; 2Pa12;a6e5laxca1Vripu21u4;scaEva;langa2nnessee,x2J;bas10m4smQtar29;aulip2Hil nadu;a9elang07i7o5taf16u4ylh1J;ff02rr09s1E;me1Gno1Uuth 4;cZdY;ber0c4kkim,naloa;hu1ily;n5rawak,skatchew1xo4;ny; luis potosi,ta catari2;a4hodeA;j4ngp0C;asth1shahi;ingh29u4;e4intana roo;bec,en6retaro;aAe6rince edward4unjab; i4;sl0G;i,n5r4;ak,nambu0F;a0Rnsylv4;an0;ha0Pra4;!na;axa0Zdisha,h4klaho21ntar4reg7ss0Dx0I;io;aLeEo6u4;evo le4nav0X;on;r4tt18va scot0;f9mandy,th4; 4ampton3;c6d5yo4;rk3;ako1O;aroli2;olk;bras1Nva0Dw4; 6foundland4;! and labrad4;or;brunswick,hamp3jers5mexiTyork4;! state;ey;galPyarit;aAeghala0Mi6o4;nta2r4;dov0elos;ch6dlanDn5ss4zor11;issippi,ouri;as geraPneso18;ig1oac1;dhy12harasht0Gine,lac07ni5r4ssachusetts;anhao,i el,ylG;p4toba;ur;anca3e4incoln3ouisI;e4iR;ds;a6e5h4omi;aka06ul2;dah,lant1ntucky,ra01;bardino,lmyk0ns0Qr4;achay,el0nata0X;alis6har4iangxi;kh4;and;co;daho,llino7n4owa;d5gush4;et0;ia2;is;a6ert5i4un1;dalFm0D;ford3;mp3rya2waii;ansu,eorg0lou7oa,u4;an4izhou,jarat;ajuato,gdo4;ng;cester3;lori4uji1;da;sex;ageUe7o5uran4;go;rs4;et;lawaMrby3;aFeaEh9o4rim08umbr0;ahui7l6nnectic5rsi4ventry;ca;ut;i03orado;la;e5hattisgarh,i4uvash0;apRhuahua;chn5rke4;ss0;ya;ra;lGm4;bridge3peche;a9ihar,r8u4;ck4ryat0;ingham3;shi4;re;emen,itish columb0;h0ja cal8lk7s4v7;hkorto4que;st1;an;ar0;iforn0;ia;dygHguascalientes,lBndhr9r5ss4;am;izo2kans5un4;achal 7;as;na;a 4;pradesh;a6ber5t4;ai;ta;ba5s4;ka;ma;ea",Place:"true¦0:4T;1:4V;2:44;3:4B;4:3I;a4Eb3Gc2Td2Ge26f25g1Vh1Ji1Fk1Cl14m0Vn0No0Jp08r04sTtNuLvJw7y5;a5o0Syz;kut1Bngtze;aDeChitBi9o5upatki,ycom2P;ki26o5;d5l1B;b3Ps5;i4to3Y;c0SllowbroCn5;c2Qgh2;by,chur1P;ed0ntw3Gs22;ke6r3St5;erf1f1; is0Gf3V;auxha3Mirgin is0Jost5;ok;laanbaatar,pto5xb3E;n,wn;a9eotihuac43h7ive49o6ru2Nsarskoe selo,u5;l2Dzigo47;nto,rquay,tt2J;am3e 5orn3E;bronx,hamptons;hiti,j mah0Iu1N;aEcotts bluff,eCfo,herbroQoApring9t7u5yd2F;dbu1Wn5;der03set3B;aff1ock2Nr5;atf1oud;hi37w24;ho,uth5; 1Iam1Zwo3E;a5i2O;f2Tt0;int lawrence riv3Pkhal2D;ayleigh,ed7i5oc1Z;chmo1Eo gran4ver5;be1Dfr09si4; s39cliffe,hi2Y;aCe9h8i5ompeii,utn2;c6ne5tcai2T; 2Pc0G;keri13t0;l,x;k,lh2mbr6n5r2J;n1Hzance;oke;cif38pahanaumokuak30r5;k5then0;si4w1K;ak7r6x5;f1l2X;ange county,d,f1inoco;mTw1G;e8i1Uo5;r5tt2N;th5wi0E; 0Sam19;uschwanste1Pw5; eng6a5h2market,po36;rk;la0P;a8co,e6i5uc;dt1Yll0Z;adow5ko0H;lands;chu picchu,gad2Ridsto1Ql8n7ple6r5;kh2; g1Cw11;hatt2Osf2B;ibu,t0ve1Z;a8e7gw,hr,in5owlOynd02;coln memori5dl2C;al;asi4w3;kefr7mbe1On5s,x;ca2Ig5si05;f1l27t0;ont;azan kreml14e6itchen2Gosrae,rasnoyar5ul;sk;ns0Hs1U;ax,cn,lf1n6ps5st;wiN;d5glew0Lverness;ian27ochina;aDeBi6kg,nd,ov5unti2H;d,enweep;gh6llc5;reL;bu03l5;and5;!s;r5yw0C;ef1tf1;libu24mp6r5stings;f1lem,row;stead,t0;aDodavari,r5uelph;avenAe5imsS;at 8en5; 6f1Fwi5;ch;acr3vall1H;brita0Flak3;hur5;st;ng3y villa0W;airhavHco,ra;aAgli9nf17ppi8u7ver6x5;et1Lf1;glad3t0;rope,st0;ng;nt0;rls1Ls5;t 5;e5si4;nd;aCe9fw,ig8o7ryd6u5xb;mfri3nstab00rh2tt0;en;nca18rcKv19wnt0B;by;n6r5vonpo1D;ry;!h2;nu8r5;l6t5;f1moor;ingt0;be;aLdg,eIgk,hClBo5royd0;l6m5rnwa0B;pt0;c7lingw6osse5;um;ood;he0S;earwat0St;a8el6i5uuk;chen itza,mney ro07natSricahua;m0Zt5;enh2;mor5rlottetPth2;ro;dar 5ntervilA;breaks,faZg5;rove;ld9m8r5versh2;lis6rizo pla5;in;le;bLpbellf1;weQ;aZcn,eNingl01kk,lackLolt0r5uckV;aGiAo5;ckt0ok5wns cany0;lyn,s5;i4to5;ne;de;dge6gh5;am,t0;n6t5;own;or5;th;ceb6m5;lNpt0;rid5;ge;bu5pool,wa8;rn;aconsfEdf1lBr9verly7x5;hi5;ll; hi5;lls;wi5;ck; air,l5;ingh2;am;ie5;ld;ltimore,rnsl6tters5;ea;ey;bLct0driadic,frica,ginJlGmFn9rc8s7tl6yleOzor3;es;!ant8;hcroft,ia; de triomphe,t6;adyr,ca8dov9tarct5;ic5; oce5;an;st5;er;ericas,s;be6dersh5hambra,list0;ot;rt0;cou5;rt;bot7i5;ngd0;on;sf1;ord",Country:"true¦0:38;1:2L;2:3B;a2Xb2Ec22d1Ye1Sf1Mg1Ch1Ai14j12k0Zl0Um0Gn05om2pZqat1KrXsKtCu7v5wal4yemTz3;a25imbabwe;es,lis and futu2Y;a3enezue32ietnam;nuatu,tican city;gTk6nited 4ruXs3zbeE; 2Ca,sr;arab emirat0Kkingdom,states3;! of am2Y;!raiV;a8haCimor les0Co7rinidad 5u3;nis0rk3valu;ey,me2Zs and caic1V;and t3t3;oba1L;go,kel10nga;iw2ji3nz2T;ki2V;aDcotl1eCi9lov8o6pa2Dri lanka,u5w3yr0;az3edAitzerl1;il1;d2riname;lomon1Xmal0uth 3;afr2KkMsud2;ak0en0;erra leoFn3;gapo1Yt maart3;en;negLrb0ychellZ;int 3moa,n marino,udi arab0;hele26luc0mart21;epublic of ir0Eom2Euss0w3;an27;a4eIhilippinUitcairn1Mo3uerto riN;l1rtugF;ki2Dl4nama,pua new0Vra3;gu7;au,esti3;ne;aBe9i7or3;folk1Ith4w3;ay; k3ern mariana1D;or0O;caragua,ger3ue;!ia;p3ther1Aw zeal1;al;mib0u3;ru;a7exi6icro0Bo3yanm06;ldova,n3roc5zambA;a4gol0t3;enegro,serrat;co;cAdagasc01l7r5urit4yot3;te;an0i16;shall0Xtin3;ique;a4div3i,ta;es;wi,ys0;ao,ed02;a6e5i3uxembourg;b3echtenste12thu1G;er0ya;ban0Isotho;os,tv0;azakh1Fe4iriba04o3uwait,yrgyz1F;rXsovo;eling0Knya;a3erG;ma16p2;c7nd6r4s3taly,vory coast;le of m2rael;a3el1;n,q;ia,oJ;el1;aiTon3ungary;dur0Ng kong;aBermany,ha0QibraltAre8u3;a6ern5inea3ya0P;! biss3;au;sey;deloupe,m,tema0Q;e3na0N;ce,nl1;ar;bUmb0;a7i6r3;ance,ench 3;guia0Epoly3;nes0;ji,nl1;lklandUroeU;ast tim7cu6gypt,l salv6ngl1quatorial4ritr5st3thiop0;on0; guin3;ea;ad3;or;enmark,jibou5ominica4r con3;go;!n C;ti;aBentral african Ah8o5roat0u4yprRzech3; 9ia;ba,racao;c4lo3morQngo brazzaville,okGsta r04te de ivoiL;mb0;osE;i3ristmasG;le,na;republic;m3naUpe verde,ymanA;bod0ero3;on;aGeDhut2o9r5u3;lgar0r3;kina faso,ma,undi;azil,itish 3unei;virgin3; is3;lands;liv0nai5snia and herzegoviHtswaHuvet3; isl1;and;re;l3n8rmuG;ar3gium,ize;us;h4ngladesh,rbad3;os;am4ra3;in;as;fghaGlDmBn6r4ustr3zerbaij2;al0ia;genti3men0uba;na;dorra,g5t3;arct7igua and barbu3;da;o3uil3;la;er3;ica;b3ger0;an0;ia;ni3;st2;an",FirstName:"true¦aTblair,cQdOfrancoZgabMhinaLilya,jHkClBm6ni4quinn,re3s0;h0umit,yd;ay,e0iloh;a,lby;g9ne;co,ko0;!s;a1el0ina,org6;!okuhF;ds,naia,r1tt0xiB;i,y;ion,lo;ashawn,eif,uca;a3e1ir0rM;an;lsFn0rry;dall,yat5;i,sD;a0essIie,ude;i1m0;ie,mG;me;ta;rie0y;le;arcy,ev0;an,on;as1h0;arl8eyenne;ey,sidy;drien,kira,l4nd1ubr0vi;ey;i,r0;a,e0;a,y;ex2f1o0;is;ie;ei,is",WeekDay:"true¦fri2mon2s1t0wednesd3;hurs1ues1;aturd1und1;!d0;ay0;!s",Month:"true¦dec0february,july,nov0octo1sept0;em0;ber",Date:"true¦ago,on4som4t1week0yesterd5; end,ends;mr1o0;d2morrow;!w;ed0;ay",Duration:"true¦centurAd8h7m5q4se3w1y0;ear8r8;eek0k7;!end,s;ason,c5;tr,uarter;i0onth3;llisecond2nute2;our1r1;ay0ecade0;!s;ies,y",FemaleName:"true¦0:J7;1:JB;2:IJ;3:IK;4:J1;5:IO;6:JS;7:JO;8:HB;9:JK;A:H4;B:I2;C:IT;D:JH;E:IX;F:BA;G:I4;aGTbFLcDRdD0eBMfB4gADh9Ti9Gj8Dk7Cl5Wm48n3Lo3Hp33qu32r29s15t0Eu0Cv02wVxiTyOzH;aLeIineb,oHsof3;e3Sf3la,ra;h2iKlIna,ynH;ab,ep;da,ma;da,h2iHra;nab;aKeJi0FolB7uIvH;et8onDP;i0na;le0sen3;el,gm3Hn,rGLs8W;aoHme0nyi;m5XyAD;aMendDZhiDGiH;dele9lJnH;if48niHo0;e,f47;a,helmi0lHma;a,ow;ka0nB;aNeKiHusa5;ck84kIl8oleAviH;anFenJ4;ky,toriBK;da,lA8rHs0;a,nHoniH9;a,iFR;leHnesH9;nILrH;i1y;g9rHs6xHA;su5te;aYeUhRiNoLrIuHy2;i,la;acJ3iHu0J;c3na,sH;hFta;nHr0F;iFya;aJffaEOnHs6;a,gtiH;ng;!nFSra;aIeHomasi0;a,l9Oo8Ares1;l3ndolwethu;g9Fo88rIssH;!a,ie;eHi,ri7;sa,za;bOlMmKnIrHs6tia0wa0;a60yn;iHya;a,ka,s6;arFe2iHm77ra;!ka;a,iH;a,t6;at6it6;a0Ecarlett,e0AhWiSkye,neza0oQri,tNuIyH;bIGlvi1;ha,mayIJniAsIzH;an3Net8ie,y;anHi7;!a,e,nH;aCe;aIeH;fan4l5Dphan6E;cI5r5;b3fiAAm0LnHphi1;d2ia,ja,ya;er2lJmon1nIobh8QtH;a,i;dy;lETv3;aMeIirHo0risFDy5;a,lDM;ba,e0i5lJrH;iHr6Jyl;!d8Ifa;ia,lDZ;hd,iMki2nJrIu0w0yH;la,ma,na;i,le9on,ron,yn;aIda,ia,nHon;a,on;!ya;k6mH;!aa;lJrItaye82vH;da,inj;e0ife;en1i0ma;anA9bLd5Oh1SiBkKlJmInd2rHs6vannaC;aCi0;ant6i2;lDOma,ome;ee0in8Tu2;in1ri0;a05eZhXiUoHuthDM;bScRghQl8LnPsJwIxH;anB3ie,y;an,e0;aIeHie,lD;ann7ll1marDGtA;!lHnn1;iHyn;e,nH;a,dF;da,i,na;ayy8G;hel67io;bDRerAyn;a,cIkHmas,nFta,ya;ki,o;h8Xki;ea,iannGMoH;da,n1P;an0bJemFgi0iInHta,y0;a8Bee;han86na;a,eH;cHkaC;a,ca;bi0chIe,i0mo0nHquETy0;di,ia;aERelHiB;!e,le;een4ia0;aPeOhMiLoJrHute6A;iHudenCV;scil3LyamvaB;lHrt3;i0ly;a,paluk;ilome0oebe,ylH;is,lis;ggy,nelope,r5t2;ige,m0VnKo5rvaDMtIulH;a,et8in1;ricHt4T;a,e,ia;do2i07;ctav3dIfD3is6ksa0lHphD3umC5yunbileg;a,ga,iv3;eHvAF;l3t8;aWeUiMoIurHy5;!ay,ul;a,eJor,rIuH;f,r;aCeEma;ll1mi;aNcLhariBQkKlaJna,sHta,vi;anHha;ur;!y;a,iDZki;hoGk9YolH;a,e4P;!mh;hir,lHna,risDEsreE;!a,lBV;asuMdLh3i6Dl5nKomi7rgEVtH;aHhal4;lHs6;i1ya;cy,et8;e9iF0ya;nngu2X;a0Ackenz4e02iMoJrignayani,uriDJyH;a,rH;a,iOlNna,tG;bi0i2llBJnH;a,iH;ca,ka,qD9;a,cUdo4ZkaTlOmi,nMrItzi,yH;ar;aJiIlH;anET;am;!l,nB;dy,eHh,n4;nhGrva;aKdJe0iCUlH;iHy;cent,e;red;!gros;!e5;ae5hH;ae5el3Z;ag5DgNi,lKrH;edi7AiIjem,on,yH;em,l;em,sCG;an4iHliCF;nHsCJ;a,da;!an,han;b09cASd07e,g05ha,i04ja,l02n00rLsoum5YtKuIv84xBKyHz4;bell,ra,soBB;d7rH;a,eE;h8Gild1t4;a,cUgQiKjor4l7Un4s6tJwa,yH;!aHbe6Xja9lAE;m,nBL;a,ha,in1;!aJbCGeIja,lDna,sHt63;!a,ol,sa;!l1D;!h,mInH;!a,e,n1;!awit,i;arJeIie,oHr48ueri8;!t;!ry;et46i3B;el4Xi7Cy;dHon,ue5;akranAy;ak,en,iHlo3S;a,ka,nB;a,re,s4te;daHg4;!l3E;alDd4elHge,isDJon0;ei9in1yn;el,le;a0Ne0CiXoQuLyH;d3la,nH;!a,dIe2OnHsCT;!a,e2N;a,sCR;aD4cJel0Pis1lIna,pHz;e,iA;a,u,wa;iHy;a0Se,ja,l2NnB;is,l1UrItt1LuHvel4;el5is1;aKeIi7na,rH;aADi7;lHn1tA;ei;!in1;aTbb9HdSepa,lNnKsJvIzH;!a,be5Ret8z4;!ia;a,et8;!a,dH;a,sHy;ay,ey,i,y;a,iJja,lH;iHy;aA8e;!aH;!nF;ia,ya;!nH;!a,ne;aPda,e0iNjYla,nMoKsJtHx93y5;iHt4;c3t3;e2PlCO;la,nHra;a,ie,o2;a,or1;a,gh,laH;!ni;!h,nH;a,d2e,n5V;cOdon9DiNkes6mi9Gna,rMtJurIvHxmi,y5;ern1in3;a,e5Aie,yn;as6iIoH;nya,ya;fa,s6;a,isA9;a,la;ey,ie,y;a04eZhXiOlASoNrJyH;lHra;a,ee,ie;istHy6I;a,en,iIyH;!na;!e,n5F;nul,ri,urtnB8;aOerNlB7mJrHzzy;a,stH;en,in;!berlImernH;aq;eHi,y;e,y;a,stE;!na,ra;aHei2ongordzol;dij1w5;el7UiKjsi,lJnIrH;a,i,ri;d2na,za;ey,i,lBLs4y;ra,s6;biAcARdiat7MeBAiSlQmPnyakuma1DrNss6NtKviAyH;!e,lH;a,eH;e,i8T;!a6HeIhHi4TlDri0y;ar8Her8Hie,leErBAy;!lyn8Ori0;a,en,iHl5Xoli0yn;!ma,nFs95;a5il1;ei8Mi,lH;e,ie;a,tl6O;a0AeZiWoOuH;anMdLlHst88;es,iH;a8NeHs8X;!n9tH;!a,te;e5Mi3My;a,iA;!anNcelDdMelGhan7VleLni,sIva0yH;a,ce;eHie;fHlDph7Y;a,in1;en,n1;i7y;!a,e,n45;lHng;!i1DlH;!i1C;anNle0nKrJsH;i8JsH;!e,i8I;i,ri;!a,elGif2CnH;a,et8iHy;!e,f2A;a,eJiInH;a,eIiH;e,n1;!t8;cMda,mi,nIque4YsminFvie2y9zH;min7;a7eIiH;ce,e,n1s;!lHs82t0F;e,le;inIk6HlDquelH;in1yn;da,ta;da,lRmPnOo0rNsIvaHwo0zaro;!a0lu,na;aJiIlaHob89;!n9R;do2;belHdo2;!a,e,l3B;a7Ben1i0ma;di2es,gr72ji;a9elBogH;en1;a,e9iHo0se;a0na;aSeOiJoHus7Kyacin2C;da,ll4rten24snH;a,i9U;lImaH;ri;aIdHlaI;a,egard;ry;ath1BiJlInrietArmi9sH;sa,t1A;en2Uga,mi;di;bi2Fil8MlNnMrJsItHwa,yl8M;i5Tt4;n60ti;iHmo51ri53;etH;!te;aCnaC;a,ey,l4;a02eWiRlPoNrKunJwH;enHyne1R;!dolD;ay,el;acieIetHiselB;a,chE;!la;ld1CogooH;sh;adys,enHor3yn2K;a,da,na;aKgi,lIna,ov8EselHta;a,e,le;da,liH;an;!n0;mLnJorgIrH;ald5Si,m3Etrud7;et8i4X;a,eHna;s29vieve;ma;bIle,mHrnet,yG;al5Si5;iIrielH;a,l1;!ja;aTeQiPlorOoz3rH;anJeIiH;da,eB;da,ja;!cH;esIiHoi0P;n1s66;!ca;a,enc3;en,o0;lIn0rnH;anB;ec3ic3;jr,nArKtHy7;emIiHma,oumaA;ha,ma,n;eh;ah,iBrah,za0;cr4Rd0Re0Qi0Pk0Ol07mXn54rUsOtNuMvHwa;aKelIiH;!e,ta;inFyn;!a;!ngel4V;geni1ni47;h5Yien9ta;mLperanKtH;eIhHrel5;er;l31r7;za;a,eralB;iHma,ne4Lyn;cHka,n;a,ka;aPeNiKmH;aHe21ie,y;!li9nuH;elG;lHn1;e7iHy;a,e,ja;lHrald;da,y;!nue5;aWeUiNlMma,no2oKsJvH;a,iH;na,ra;a,ie;iHuiH;se;a,en,ie,y;a0c3da,e,f,nMsJzaH;!betHveA;e,h;aHe,ka;!beH;th;!a,or;anor,nH;!a,i;!in1na;ate1Rta;leEs6;vi;eIiHna,wi0;e,th;l,n;aYeMh3iLjeneKoH;lor5Vminiq4Ln3FrHtt4;a,eEis,la,othHthy;ea,y;ba;an09naCon9ya;anQbPde,eOiMlJmetr3nHsir5M;a,iH;ce,se;a,iIla,orHphi9;es,is;a,l6F;dHrdH;re;!d5Ena;!b2ForaCraC;a,d2nH;!a,e;hl3i0l0GmNnLphn1rIvi1WyH;le,na;a,by,cIia,lH;a,en1;ey,ie;a,et8iH;!ca,el1Aka,z;arHia;is;a0Re0Nh04i02lUoJristIynH;di,th3;al,i0;lPnMrIurH;tn1D;aJd2OiHn2Ori9;!nH;a,e,n1;!l4;cepci5Cn4sH;tanHuelo;ce,za;eHleE;en,t8;aJeoIotH;il54;!pat2;ir7rJudH;et8iH;a,ne;a,e,iH;ce,sZ;a2er2ndH;i,y;aReNloe,rH;isJyH;stH;al;sy,tH;a1Sen,iHy;an1e,n1;deJlseIrH;!i7yl;a,y;li9;nMrH;isKlImH;ai9;a,eHot8;n1t8;!sa;d2elGtH;al,elG;cIlH;es8i47;el3ilH;e,ia,y;itlYlXmilWndVrMsKtHy5;aIeIhHri0;er1IleErDy;ri0;a38sH;a37ie;a,iOlLmeJolIrH;ie,ol;!e,in1yn;lHn;!a,la;a,eIie,otHy;a,ta;ne,y;na,s1X;a0Ii0I;a,e,l1;isAl4;in,yn;a0Ke02iZlXoUrH;andi7eRiJoIyH;an0nn;nwDoke;an3HdgMgiLtH;n31tH;!aInH;ey,i,y;ny;d,t8;etH;!t7;an0e,nH;da,na;bbi7glarIlo07nH;iAn4;ka;ancHythe;a,he;an1Clja0nHsm3M;iAtH;ou;aWcVlinUniArPssOtJulaCvH;!erlH;ey,y;hJsy,tH;e,iHy7;e,na;!anH;ie,y;!ie;nItHyl;ha,ie;adIiH;ce;et8i9;ay,da;ca,ky;!triH;ce,z;rbJyaH;rmH;aa;a2o2ra;a2Ub2Od25g21i1Sj5l18m0Zn0Boi,r06sWtVuPvOwa,yIzH;ra,u0;aKes6gJlIn,seH;!l;in;un;!nH;a,na;a,i2K;drLguJrIsteH;ja;el3;stH;in1;a,ey,i,y;aahua,he0;hIi2Gja,miAs2DtrH;id;aMlIraqHt21;at;eIi7yH;!n;e,iHy;gh;!nH;ti;iJleIo6piA;ta;en,n1t8;aHelG;!n1J;a01dje5eZgViTjRnKohito,toHya;inet8nH;el5ia;te;!aKeIiHmJ;e,ka;!mHtt7;ar4;!belIliHmU;sa;!l1;a,eliH;ca;ka,sHta;a,sa;elHie;a,iH;a,ca,n1qH;ue;!tH;a,te;!bImHstasiMya;ar3;el;aLberKeliJiHy;e,l3naH;!ta;a,ja;!ly;hGiIl3nB;da;a,ra;le;aWba,ePiMlKthJyH;a,c3sH;a,on,sa;ea;iHys0N;e,s0M;a,cIn1sHza;a,e,ha,on,sa;e,ia,ja;c3is6jaKksaKna,sJxH;aHia;!nd2;ia,saH;nd2;ra;ia;i0nIyH;ah,na;a,is,naCoud;la;c6da,leEmNnLsH;haClH;inHyY;g,n;!h;a,o,slH;ey;ee;en;at6g4nIusH;ti0;es;ie;aWdiTelMrH;eJiH;anMenH;a,e,ne;an0;na;!aLeKiIyH;nn;a,n1;a,e;!ne;!iH;de;e,lDsH;on;yn;!lH;i9yn;ne;aKbIiHrL;!e,gaK;ey,i7y;!e;gaH;il;dKliyJradhIs6;ha;ya;ah;a,ya",Honorific:"true¦director1field marsh2lieutenant1rear0sergeant major,vice0; admir1; gener0;al","Adj|Gerund":"true¦0:3F;1:3H;2:31;3:2X;4:35;5:33;6:3C;7:2Z;8:36;9:29;a33b2Tc2Bd1Te1If19g12h0Zi0Rl0Nm0Gnu0Fo0Ap04rYsKtEuBvAw1Ayiel3;ar6e08;nBpA;l1Rs0B;fol3n1Zsett2;aEeDhrBi4ouc7rAwis0;e0Bif2oub2us0yi1;ea1SiA;l2vi1;l2mp0rr1J;nt1Vxi1;aMcreec7enten2NhLkyrocke0lo0Vmi2oJpHtDuBweA;e0Ul2;pp2ArA;gi1pri5roun3;aBea8iAri2Hun9;mula0r4;gge4rA;t2vi1;ark2eAraw2;e3llb2F;aAot7;ki1ri1;i9oc29;dYtisf6;aEeBive0oAus7;a4l2;assu4defi9fres7ig9juve07mai9s0vAwar3;ea2italiAol1G;si1zi1;gi1ll6mb2vi1;a6eDier23lun1VrAun2C;eBoA;mi5vo1Z;ce3s5vai2;n3rpleA;xi1;ffCpWutBverAwi1;arc7lap04p0Pri3whel8;goi1l6st1J;en3sA;et0;m2Jrtu4;aEeDiCoBuAyst0L;mb2;t1Jvi1;s5tiga0;an1Rl0n3smeri26;dAtu4;de9;aCeaBiAo0U;fesa0Tvi1;di1ni1;c1Fg19s0;llumiGmFnArri0R;cDfurHsCtBviA;go23ti1;e1Oimi21oxica0rig0V;pi4ul0;orpo20r0K;po5;na0;eaBorr02umilA;ia0;li1rtwar8;lFrA;atiDipCoBuelA;i1li1;undbrea10wi1;pi1;f6ng;a4ea8;a3etc7it0lEoCrBulfA;il2;ee1FighXust1L;rAun3;ebo3thco8;aCoA;a0wA;e4i1;mi1tte4;lectrJmHnExA;aCci0hBis0pA;an3lo3;aOila1B;c0spe1A;ab2coura0CdBergi13ga0Clive9ric7s02tA;hral2i0J;ea4u4;barras5er09pA;owe4;if6;aQeIiBrA;if0;sAzz6;aEgDhearCsen0tA;rAur11;ac0es5;te9;us0;ppoin0r8;biliGcDfi9gra3ligh0mBpres5sAvasG;erE;an3ea9orA;ali0L;a6eiBli9rA;ea5;vi1;ta0;maPri1s7un0zz2;aPhMlo5oAripp2ut0;mGnArrespon3;cer9fDspi4tA;inBrA;as0ibu0ol2;ui1;lic0u5;ni1;fDmCpA;eAromi5;l2ti1;an3;or0;aAil2;llenAnAr8;gi1;l8ptAri1;iva0;aff2eGin3lFoDrBuA;d3st2;eathtaAui5;ki1;gg2i2o8ri1unA;ci1;in3;co8wiA;lAtc7;de4;bsorVcOgonMlJmHnno6ppea2rFsA;pi4su4toA;nBun3;di1;is7;hi1;res0;li1;aFu5;si1;ar8lu4;ri1;mi1;iAzi1;zi1;cAhi1;eleDomA;moBpan6;yi1;da0;ra0;ti1;bi1;ng",Comparable:"true¦0:3C;1:3Q;2:3F;a3Tb3Cc33d2Te2Mf2Ag1Wh1Li1Fj1Ek1Bl13m0Xn0So0Rp0Iqu0Gr07sHtCug0vAw4y3za0Q;el10ouN;ary,e6hi5i3ry;ck0Cde,l3n1ry,se;d,y;ny,te;a3i3R;k,ry;a3erda2ulgar;gue,in,st;a6en2Xhi5i4ouZr3;anqu2Cen1ue;dy,g36me0ny;ck,rs28;ll,me,rt,wd3I;aRcaPeOhMiLkin0BlImGoEpDt6u4w3;eet,ift;b3dd0Wperfi21rre28;sta26t21;a8e7iff,r4u3;pUr1;a4ict,o3;ng;ig2Vn0N;a1ep,rn;le,rk,te0;e1Si2Vright0;ci1Yft,l3on,re;emn,id;a3el0;ll,rt;e4i3y;g2Mm0Z;ek,nd2T;ck24l0mp1L;a3iRrill,y;dy,l01rp;ve0Jxy;n1Jr3;ce,y;d,fe,int0l1Hv0V;a8e6i5o3ude;mantic,o19sy,u3;gh;pe,t1P;a3d,mo0A;dy,l;gg4iFndom,p3re,w;id;ed;ai2i3;ck,et;hoAi1Fl9o8r5u3;ny,r3;e,p11;egna2ic4o3;fouSud;ey,k0;liXor;ain,easa2;ny;dd,i0ld,ranL;aive,e5i4o3u14;b0Sisy,rm0Ysy;bb0ce,mb0R;a3r1w;r,t;ad,e5ild,o4u3;nda12te;ist,o1;a4ek,l3;low;s0ty;a8e7i6o3ucky;f0Jn4o15u3ve0w10y0N;d,sy;e0g;ke0l,mp,tt0Eve0;e1Qwd;me,r3te;ge;e4i3;nd;en;ol0ui19;cy,ll,n3;secu6t3;e3ima4;llege2rmedia3;te;re;aAe7i6o5u3;ge,m3ng1C;bYid;me0t;gh,l0;a3fXsita2;dy,rWv3;en0y;nd13ppy,r3;d3sh;!y;aFenEhCiBlAoofy,r3;a8e6i5o3ue0Z;o3ss;vy;m,s0;at,e3y;dy,n;nd,y;ad,ib,ooD;a2d1;a3o3;st0;tDuiS;u1y;aCeebBi9l8o6r5u3;ll,n3r0N;!ny;aCesh,iend0;a3nd,rmD;my;at,ir7;erce,nan3;ci9;le;r,ul3;ty;a6erie,sse4v3xtre0B;il;nti3;al;r4s3;tern,y;ly,th0;appZe9i5ru4u3;mb;nk;r5vi4z3;zy;ne;e,ty;a3ep,n9;d3f,r;!ly;agey,h8l7o5r4u3;dd0r0te;isp,uel;ar3ld,mmon,st0ward0zy;se;evKou1;e3il0;ap,e3;sy;aHiFlCoAr5u3;ff,r0sy;ly;a6i3oad;g4llia2;nt;ht;sh,ve;ld,un3;cy;a4o3ue;nd,o1;ck,nd;g,tt3;er;d,ld,w1;dy;bsu6ng5we3;so3;me;ry;rd",Adverb:"true¦a08b05d00eYfSheQinPjustOkinda,likewiZmMnJoEpCquite,r9s5t2u0very,well;ltima01p0; to,wards5;h1iny bit,o0wiO;o,t6;en,us;eldom,o0uch;!me1rt0; of;how,times,w0C;a1e0;alS;ndomRth05;ar excellenEer0oint blank; Lhaps;f3n0utright;ce0ly;! 0;ag05moX; courGten;ewJo0; longWt 0;onHwithstand9;aybe,eanwhiNore0;!ovT;! aboX;deed,steY;lla,n0;ce;or3u0;ck1l9rther0;!moK;ing; 0evK;exampCgood,suH;n mas0vI;se;e0irect2; 2fini0;te0;ly;juAtrop;ackward,y 0;far,no0; means,w; GbroFd nauseam,gEl7ny5part,s4t 2w0;ay,hi0;le;be7l0mo7wor7;arge,ea6; soon,i4;mo0way;re;l 3mo2ongsi1ready,so,togeth0ways;er;de;st;b1t0;hat;ut;ain;ad;lot,posteriori",Conjunction:"true¦aXbTcReNhowMiEjust00noBo9p8supposing,t5wh0yet;e1il0o3;e,st;n1re0thN; if,by,vM;evL;h0il,o;erefOo0;!uU;lus,rovided th9;r0therwiM;! not; mattEr,w0;! 0;since,th4w7;f4n0; 0asmuch;as mIcaForder t0;h0o;at;! 0;only,t0w0;hen;!ev3;ith2ven0;! 0;if,tB;er;o0uz;s,z;e0ut,y the time;cau1f0;ore;se;lt3nd,s 0;far1if,m0soon1t2;uch0; as;hou0;gh",Currency:"true¦$,aud,bQcOdJeurIfHgbp,hkd,iGjpy,kElDp8r7s3usd,x2y1z0¢,£,¥,ден,лв,руб,฿,₡,₨,€,₭,﷼;lotyQł;en,uanP;af,of;h0t5;e0il5;k0q0;elK;oubleJp,upeeJ;e2ound st0;er0;lingG;n0soF;ceEnies;empi7i7;n,r0wanzaCyatC;!onaBw;ls,nr;ori7ranc9;!os;en3i2kk,o0;b0ll2;ra5;me4n0rham4;ar3;e0ny;nt1;aht,itcoin0;!s",Determiner:"true¦aBboth,d9e6few,le5mu8neiDplenty,s4th2various,wh0;at0ich0;evC;a0e4is,ose;!t;everal,ome;!ast,s;a1l0very;!se;ch;e0u;!s;!n0;!o0y;th0;er","Adj|Present":"true¦a07b04cVdQeNfJhollIidRlEmCnarrIoBp9qua8r7s3t2uttFw0;aKet,ro0;ng,u08;endChin;e2hort,l1mooth,our,pa9tray,u0;re,speU;i2ow;cu6da02leSpaN;eplica01i02;ck;aHerfePr0;eseUime,omV;bscu1pen,wn;atu0e3odeH;re;a2e1ive,ow0;er;an;st,y;ow;a2i1oul,r0;ee,inge;rm;iIke,ncy,st;l1mpty,x0;emHpress;abo4ic7;amp,e2i1oub0ry,ull;le;ffu9re6;fu8libe0;raE;alm,l5o0;mpleCn3ol,rr1unterfe0;it;e0u7;ct;juga8sum7;ea1o0;se;n,r;ankru1lu0;nt;pt;li2pproxi0rticula1;ma0;te;ght","Person|Adj":"true¦b3du2earnest,frank,mi2r0san1woo1;an0ich,u1;dy;sty;ella,rown",Modal:"true¦c5lets,m4ought3sh1w0;ill,o5;a0o4;ll,nt;! to,a;ight,ust;an,o0;uld",Verb:"true¦born,cannot,gonna,has,keep tabs,msg","Person|Verb":"true¦b8ch7dr6foster,gra5ja9lan4ma2ni9ollie,p1rob,s0wade;kip,pike,t5ue;at,eg,ier2;ck,r0;k,shal;ce;ce,nt;ew;ase,u1;iff,l1ob,u0;ck;aze,ossom","Person|Date":"true¦a2j0sep;an0une;!uary;p0ugust,v0;ril"},Ri=36,rm="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",ep=rm.split("").reduce(function(e,t,r){return e[t]=r,e},{}),uM=function(e){if(rm[e]!==void 0)return rm[e];let t=1,r=Ri,n="";for(;e>=r;e-=r,t++,r*=Ri);for(;t--;){const a=e%Ri;n=String.fromCharCode((a<10?48:55)+a)+n,e=(e-a)/Ri}return n},lM=function(e){if(ep[e]!==void 0)return ep[e];let t=0,r=1,n=Ri,a=1;for(;r<e.length;t+=n,r++,n*=Ri);for(let i=e.length-1;i>=0;i--,a*=Ri){let o=e.charCodeAt(i)-48;o>10&&(o-=7),t+=o*a}return t},nm={toAlphaCode:uM,fromAlphaCode:lM},cM=function(e){const t=new RegExp("([0-9A-Z]+):([0-9A-Z]+)");for(let r=0;r<e.nodes.length;r++){const n=t.exec(e.nodes[r]);if(!n){e.symCount=r;break}e.syms[nm.fromAlphaCode(n[1])]=nm.fromAlphaCode(n[2])}e.nodes=e.nodes.slice(e.symCount,e.nodes.length)},fM=function(e,t,r){const n=nm.fromAlphaCode(t);return n<e.symCount?e.syms[n]:r+n+1-e.symCount},mM=function(e){const t=[],r=(n,a)=>{let i=e.nodes[n];i[0]==="!"&&(t.push(a),i=i.slice(1));const o=i.split(/([A-Z0-9,]+)/g);for(let s=0;s<o.length;s+=2){const u=o[s],l=o[s+1];if(!u)continue;const c=a+u;if(l===","||l===void 0){t.push(c);continue}const f=fM(e,l,n);r(f,c)}};return r(0,""),t},dM=function(e){const t={nodes:e.split(";"),syms:[],symCount:0};return e.match(":")&&cM(t),mM(t)},hM=function(e){if(!e)return{};const t=e.split("|").reduce((n,a)=>{const i=a.split("¦");return n[i[0]]=i[1],n},{}),r={};return Object.keys(t).forEach(function(n){const a=dM(t[n]);n==="true"&&(n=!0);for(let i=0;i<a.length;i++){const o=a[i];r.hasOwnProperty(o)===!0?Array.isArray(r[o])===!1?r[o]=[r[o],n]:r[o].push(n):r[o]=n}}),r},zn=["Possessive","Pronoun"];let pM={"20th century fox":"Organization","7 eleven":"Organization","motel 6":"Organization",g8:"Organization",vh1:"Organization","76ers":"SportsTeam","49ers":"SportsTeam",q1:"Date",q2:"Date",q3:"Date",q4:"Date",km2:"Unit",m2:"Unit",dm2:"Unit",cm2:"Unit",mm2:"Unit",mile2:"Unit",in2:"Unit",yd2:"Unit",ft2:"Unit",m3:"Unit",dm3:"Unit",cm3:"Unit",in3:"Unit",ft3:"Unit",yd3:"Unit","at&t":"Organization","black & decker":"Organization","h & m":"Organization","johnson & johnson":"Organization","procter & gamble":"Organization","ben & jerry's":"Organization","&":"Conjunction",i:["Pronoun","Singular"],he:["Pronoun","Singular"],she:["Pronoun","Singular"],it:["Pronoun","Singular"],they:["Pronoun","Plural"],we:["Pronoun","Plural"],was:["Copula","PastTense"],is:["Copula","PresentTense"],are:["Copula","PresentTense"],am:["Copula","PresentTense"],were:["Copula","PastTense"],her:zn,his:zn,hers:zn,their:zn,theirs:zn,themselves:zn,your:zn,our:zn,ours:zn,my:zn,its:zn,vs:["Conjunction","Abbreviation"],if:["Condition","Preposition"],closer:"Comparative",closest:"Superlative",much:"Adverb",may:"Modal",babysat:"PastTense",blew:"PastTense",drank:"PastTense",drove:"PastTense",forgave:"PastTense",skiied:"PastTense",spilt:"PastTense",stung:"PastTense",swam:"PastTense",swung:"PastTense",guaranteed:"PastTense",shrunk:"PastTense",nears:"PresentTense",nearing:"Gerund",neared:"PastTense",no:["Negative","Expression"]};const gM={"20th century fox":"Organization","7 eleven":"Organization","motel 6":"Organization","excuse me":"Expression","financial times":"Organization","guns n roses":"Organization","la z boy":"Organization","labour party":"Organization","new kids on the block":"Organization","new york times":"Organization","the guess who":"Organization","thin lizzy":"Organization","prime minister":"Actor","free market":"Singular","lay up":"Singular","living room":"Singular","living rooms":"Plural","spin off":"Singular","appeal court":"Uncountable","cold war":"Uncountable","gene pool":"Uncountable","machine learning":"Uncountable","nail polish":"Uncountable","time off":"Uncountable","take part":"Infinitive","bill gates":"Person","doctor who":"Person","dr who":"Person","he man":"Person","iron man":"Person","kid cudi":"Person","run dmc":"Person","rush limbaugh":"Person","snow white":"Person","tiger woods":"Person","brand new":"Adjective","en route":"Adjective","left wing":"Adjective","off guard":"Adjective","on board":"Adjective","part time":"Adjective","right wing":"Adjective","so called":"Adjective","spot on":"Adjective","straight forward":"Adjective","super duper":"Adjective","tip top":"Adjective","top notch":"Adjective","up to date":"Adjective","win win":"Adjective","brooklyn nets":"SportsTeam","chicago bears":"SportsTeam","houston astros":"SportsTeam","houston dynamo":"SportsTeam","houston rockets":"SportsTeam","houston texans":"SportsTeam","minnesota twins":"SportsTeam","orlando magic":"SportsTeam","san antonio spurs":"SportsTeam","san diego chargers":"SportsTeam","san diego padres":"SportsTeam","iron maiden":"ProperNoun","isle of man":"Country","united states":"Country","united states of america":"Country","prince edward island":"Region","cedar breaks":"Place","cedar falls":"Place","point blank":"Adverb","tiny bit":"Adverb","by the time":"Conjunction","no matter":"Conjunction","civil wars":"Plural","credit cards":"Plural","default rates":"Plural","free markets":"Plural","head starts":"Plural","home runs":"Plural","lay ups":"Plural","phone calls":"Plural","press releases":"Plural","record labels":"Plural","soft serves":"Plural","student loans":"Plural","tax returns":"Plural","tv shows":"Plural","video games":"Plural","took part":"PastTense","takes part":"PresentTense","taking part":"Gerund","taken part":"Participle","light bulb":"Noun","rush hour":"Noun","fluid ounce":"Unit","the rolling stones":"Organization"},vM=[":(",":)",":P",":p",":O",";(",";)",";P",";p",";O",":3",":|",":/",":\\",":$",":*",":@",":-(",":-)",":-P",":-p",":-O",":-3",":-|",":-/",":-\\",":-$",":-*",":-@",":^(",":^)",":^P",":^p",":^O",":^3",":^|",":^/",":^\\",":^$",":^*",":^@","):","(:","$:","*:",")-:","(-:","$-:","*-:",")^:","(^:","$^:","*^:","<3","</3","<\\3","=("],bu={a:[[/(antenn|formul|nebul|vertebr|vit)a$/i,"$1ae"],[/ia$/i,"ia"]],e:[[/(kn|l|w)ife$/i,"$1ives"],[/(hive)$/i,"$1s"],[/([m|l])ouse$/i,"$1ice"],[/([m|l])ice$/i,"$1ice"]],f:[[/^(dwar|handkerchie|hoo|scar|whar)f$/i,"$1ves"],[/^((?:ca|e|ha|(?:our|them|your)?se|she|wo)l|lea|loa|shea|thie)f$/i,"$1ves"]],i:[[/(octop|vir)i$/i,"$1i"]],m:[[/([ti])um$/i,"$1a"]],n:[[/^(oxen)$/i,"$1"]],o:[[/(al|ad|at|er|et|ed)o$/i,"$1oes"]],s:[[/(ax|test)is$/i,"$1es"],[/(alias|status)$/i,"$1es"],[/sis$/i,"ses"],[/(bu)s$/i,"$1ses"],[/(sis)$/i,"ses"],[/^(?!talis|.*hu)(.*)man$/i,"$1men"],[/(octop|vir|radi|nucle|fung|cact|stimul)us$/i,"$1i"]],x:[[/(matr|vert|ind|cort)(ix|ex)$/i,"$1ices"],[/^(ox)$/i,"$1en"]],y:[[/([^aeiouy]|qu)y$/i,"$1ies"]],z:[[/(quiz)$/i,"$1zes"]]},yM=/([xsz]|ch|sh)$/,bM=function(e){let t=e[e.length-1];if(bu.hasOwnProperty(t)===!0)for(let r=0;r<bu[t].length;r+=1){let n=bu[t][r][0];if(n.test(e)===!0)return e.replace(n,bu[t][r][1])}return null},vc=function(e="",t){let{irregularPlurals:r,uncountable:n}=t.two;if(n.hasOwnProperty(e))return e;if(r.hasOwnProperty(e))return r[e];let a=bM(e);return a!==null?a:yM.test(e)?e+"es":e+"s"},wM=/\|/;let Xo=pM,am={};const xM={two:{irregularPlurals:yw,uncountable:{}}};Object.keys(Xh).forEach(e=>{let t=hM(Xh[e]);if(!wM.test(e)){Object.keys(t).forEach(r=>{Xo[r]=e});return}Object.keys(t).forEach(r=>{if(am[r]=e,e==="Noun|Verb"){let n=vc(r,xM);am[n]="Plural|Verb"}})});vM.forEach(e=>Xo[e]="Emoticon");delete Xo[""];delete Xo[null];delete Xo[" "];const de="Singular",Vt={beforeTags:{Determiner:de,Possessive:de,Acronym:de,Noun:de,Adjective:de,PresentTense:de,Gerund:de,PastTense:de,Infinitive:de,Date:de,Ordinal:de,Demonym:de},afterTags:{Value:de,Modal:de,Copula:de,PresentTense:de,PastTense:de,Demonym:de,Actor:de},beforeWords:{the:de,with:de,without:de,of:de,for:de,any:de,all:de,on:de,cut:de,cuts:de,increase:de,decrease:de,raise:de,drop:de,save:de,saved:de,saves:de,make:de,makes:de,made:de,minus:de,plus:de,than:de,another:de,versus:de,neither:de,about:de,favorite:de,best:de,daily:de,weekly:de,linear:de,binary:de,mobile:de,lexical:de,technical:de,computer:de,scientific:de,security:de,government:de,popular:de,formal:de,no:de,more:de,one:de,let:de,her:de,his:de,their:de,our:de,us:de,sheer:de,monthly:de,yearly:de,current:de,previous:de,upcoming:de,last:de,next:de,main:de,initial:de,final:de,beginning:de,end:de,top:de,bottom:de,future:de,past:de,major:de,minor:de,side:de,central:de,peripheral:de,public:de,private:de},afterWords:{of:de,system:de,aid:de,method:de,utility:de,tool:de,reform:de,therapy:de,philosophy:de,room:de,authority:de,says:de,said:de,wants:de,wanted:de,is:de,did:de,do:de,can:de,wise:de}},De="Infinitive",$r={beforeTags:{Modal:De,Adverb:De,Negative:De,Plural:De},afterTags:{Determiner:De,Adverb:De,Possessive:De,Reflexive:De,Preposition:De,Cardinal:De,Comparative:De,Superlative:De},beforeWords:{i:De,we:De,you:De,they:De,to:De,please:De,will:De,have:De,had:De,would:De,could:De,should:De,do:De,did:De,does:De,can:De,must:De,us:De,me:De,let:De,even:De,when:De,help:De,he:De,she:De,it:De,being:De,bi:De,co:De,contra:De,de:De,inter:De,intra:De,mis:De,pre:De,out:De,counter:De,nobody:De,somebody:De,anybody:De,everybody:De},afterWords:{the:De,me:De,you:De,him:De,us:De,her:De,his:De,them:De,they:De,it:De,himself:De,herself:De,itself:De,myself:De,ourselves:De,themselves:De,something:De,anything:De,a:De,an:De,up:De,down:De,by:De,out:De,off:De,under:De,what:De,all:De,to:De,because:De,although:De,how:De,otherwise:De,together:De,though:De,into:De,yet:De,more:De,here:De,there:De,away:De}},DM={beforeTags:Object.assign({},$r.beforeTags,Vt.beforeTags,{}),afterTags:Object.assign({},$r.afterTags,Vt.afterTags,{}),beforeWords:Object.assign({},$r.beforeWords,Vt.beforeWords,{}),afterWords:Object.assign({},$r.afterWords,Vt.afterWords,{})},Ce="Adjective",ir={beforeTags:{Determiner:Ce,Possessive:Ce,Hyphenated:Ce},afterTags:{Adjective:Ce},beforeWords:{seem:Ce,seemed:Ce,seems:Ce,feel:Ce,feels:Ce,felt:Ce,stay:Ce,appear:Ce,appears:Ce,appeared:Ce,also:Ce,over:Ce,under:Ce,too:Ce,it:Ce,but:Ce,still:Ce,really:Ce,quite:Ce,well:Ce,very:Ce,truly:Ce,how:Ce,deeply:Ce,hella:Ce,profoundly:Ce,extremely:Ce,so:Ce,badly:Ce,mostly:Ce,totally:Ce,awfully:Ce,rather:Ce,nothing:Ce,something:Ce,anything:Ce,not:Ce,me:Ce,is:Ce,face:Ce,faces:Ce,faced:Ce,look:Ce,looks:Ce,looked:Ce,reveal:Ce,reveals:Ce,revealed:Ce,sound:Ce,sounded:Ce,sounds:Ce,remains:Ce,remained:Ce,prove:Ce,proves:Ce,proved:Ce,becomes:Ce,stays:Ce,tastes:Ce,taste:Ce,smells:Ce,smell:Ce,gets:Ce,grows:Ce,as:Ce,rings:Ce,radiates:Ce,conveys:Ce,convey:Ce,conveyed:Ce,of:Ce},afterWords:{too:Ce,also:Ce,or:Ce,enough:Ce,as:Ce}},Ge="Gerund",ri={beforeTags:{Adverb:Ge,Preposition:Ge,Conjunction:Ge},afterTags:{Adverb:Ge,Possessive:Ge,Person:Ge,Pronoun:Ge,Determiner:Ge,Copula:Ge,Preposition:Ge,Conjunction:Ge,Comparative:Ge},beforeWords:{been:Ge,keep:Ge,continue:Ge,stop:Ge,am:Ge,be:Ge,me:Ge,began:Ge,start:Ge,starts:Ge,started:Ge,stops:Ge,stopped:Ge,help:Ge,helps:Ge,avoid:Ge,avoids:Ge,love:Ge,loves:Ge,loved:Ge,hate:Ge,hates:Ge,hated:Ge},afterWords:{you:Ge,me:Ge,her:Ge,him:Ge,his:Ge,them:Ge,their:Ge,it:Ge,this:Ge,there:Ge,on:Ge,about:Ge,for:Ge,up:Ge,down:Ge}},bt="Gerund",Ua="Adjective",NM={beforeTags:Object.assign({},ir.beforeTags,ri.beforeTags,{Imperative:bt,Infinitive:Ua,Plural:bt}),afterTags:Object.assign({},ir.afterTags,ri.afterTags,{Noun:Ua}),beforeWords:Object.assign({},ir.beforeWords,ri.beforeWords,{is:Ua,are:bt,was:Ua,of:Ua,suggest:bt,suggests:bt,suggested:bt,recommend:bt,recommends:bt,recommended:bt,imagine:bt,imagines:bt,imagined:bt,consider:bt,considered:bt,considering:bt,resist:bt,resists:bt,resisted:bt,avoid:bt,avoided:bt,avoiding:bt,except:Ua,accept:Ua,assess:bt,explore:bt,fear:bt,fears:bt,appreciate:bt,question:bt,help:bt,embrace:bt,with:Ua}),afterWords:Object.assign({},ir.afterWords,ri.afterWords,{to:bt,not:bt,the:bt})},tp={beforeTags:{Determiner:void 0,Cardinal:"Noun",PhrasalVerb:"Adjective"},afterTags:{}},AM={beforeTags:Object.assign({},ir.beforeTags,Vt.beforeTags,tp.beforeTags),afterTags:Object.assign({},ir.afterTags,Vt.afterTags,tp.afterTags),beforeWords:Object.assign({},ir.beforeWords,Vt.beforeWords,{are:"Adjective",is:"Adjective",was:"Adjective",be:"Adjective",off:"Adjective",out:"Adjective"}),afterWords:Object.assign({},ir.afterWords,Vt.afterWords)};let Xe="PastTense",vs="Adjective";const wu={beforeTags:{Adverb:Xe,Pronoun:Xe,ProperNoun:Xe,Auxiliary:Xe,Noun:Xe},afterTags:{Possessive:Xe,Pronoun:Xe,Determiner:Xe,Adverb:Xe,Comparative:Xe,Date:Xe,Gerund:Xe},beforeWords:{be:Xe,who:Xe,get:vs,had:Xe,has:Xe,have:Xe,been:Xe,it:Xe,as:Xe,for:vs,more:vs,always:vs},afterWords:{by:Xe,back:Xe,out:Xe,in:Xe,up:Xe,down:Xe,before:Xe,after:Xe,for:Xe,the:Xe,with:Xe,as:Xe,on:Xe,at:Xe,between:Xe,to:Xe,into:Xe,us:Xe,them:Xe,his:Xe,her:Xe,their:Xe,our:Xe,me:Xe,about:vs}},CM={beforeTags:Object.assign({},ir.beforeTags,wu.beforeTags),afterTags:Object.assign({},ir.afterTags,wu.afterTags),beforeWords:Object.assign({},ir.beforeWords,wu.beforeWords),afterWords:Object.assign({},ir.afterWords,wu.afterWords)},EM={afterTags:{Noun:"Adjective",Conjunction:void 0}},SM={beforeTags:Object.assign({},ir.beforeTags,$r.beforeTags,{Adverb:void 0,Negative:void 0}),afterTags:Object.assign({},ir.afterTags,$r.afterTags,EM.afterTags),beforeWords:Object.assign({},ir.beforeWords,$r.beforeWords,{have:void 0,had:void 0,not:void 0,went:"Adjective",goes:"Adjective",got:"Adjective",be:"Adjective"}),afterWords:Object.assign({},ir.afterWords,$r.afterWords,{to:void 0,as:"Adjective"})},xu={beforeTags:{Copula:"Gerund",PastTense:"Gerund",PresentTense:"Gerund",Infinitive:"Gerund"},afterTags:{Value:"Gerund"},beforeWords:{are:"Gerund",were:"Gerund",be:"Gerund",no:"Gerund",without:"Gerund",you:"Gerund",we:"Gerund",they:"Gerund",he:"Gerund",she:"Gerund",us:"Gerund",them:"Gerund"},afterWords:{the:"Gerund",this:"Gerund",that:"Gerund",me:"Gerund",us:"Gerund",them:"Gerund"}},MM={beforeTags:Object.assign({},ri.beforeTags,Vt.beforeTags,xu.beforeTags),afterTags:Object.assign({},ri.afterTags,Vt.afterTags,xu.afterTags),beforeWords:Object.assign({},ri.beforeWords,Vt.beforeWords,xu.beforeWords),afterWords:Object.assign({},ri.afterWords,Vt.afterWords,xu.afterWords)},po="Singular",Mi="Infinitive",TM={beforeTags:Object.assign({},$r.beforeTags,Vt.beforeTags,{Adjective:po,Particle:po}),afterTags:Object.assign({},$r.afterTags,Vt.afterTags,{ProperNoun:Mi,Gerund:Mi,Adjective:Mi,Copula:po}),beforeWords:Object.assign({},$r.beforeWords,Vt.beforeWords,{is:po,was:po,of:po,have:null}),afterWords:Object.assign({},$r.afterWords,Vt.afterWords,{instead:Mi,about:Mi,his:Mi,her:Mi,to:null,by:null,in:null})},St="Person",or={beforeTags:{Honorific:St,Person:St},afterTags:{Person:St,ProperNoun:St,Verb:St},beforeWords:{hi:St,hey:St,yo:St,dear:St,hello:St},afterWords:{said:St,says:St,told:St,tells:St,feels:St,felt:St,seems:St,thinks:St,thought:St,spends:St,spendt:St,plays:St,played:St,sing:St,sang:St,learn:St,learned:St,wants:St,wanted:St}},Rt="Month",FM="Person",Du={beforeTags:{Date:Rt,Value:Rt},afterTags:{Date:Rt,Value:Rt},beforeWords:{by:Rt,in:Rt,on:Rt,during:Rt,after:Rt,before:Rt,between:Rt,until:Rt,til:Rt,sometime:Rt,of:Rt,this:Rt,next:Rt,last:Rt,previous:Rt,following:Rt,with:FM},afterWords:{sometime:Rt,in:Rt,of:Rt,until:Rt,the:Rt}},PM={beforeTags:Object.assign({},or.beforeTags,Du.beforeTags),afterTags:Object.assign({},or.afterTags,Du.afterTags),beforeWords:Object.assign({},or.beforeWords,Du.beforeWords),afterWords:Object.assign({},or.afterWords,Du.afterWords)},kM={beforeTags:Object.assign({},Vt.beforeTags,or.beforeTags),afterTags:Object.assign({},Vt.afterTags,or.afterTags),beforeWords:Object.assign({},Vt.beforeWords,or.beforeWords,{i:"Infinitive",we:"Infinitive"}),afterWords:Object.assign({},Vt.afterWords,or.afterWords)},OM={beforeTags:Object.assign({},Vt.beforeTags,or.beforeTags,$r.beforeTags),afterTags:Object.assign({},Vt.afterTags,or.afterTags,$r.afterTags),beforeWords:Object.assign({},Vt.beforeWords,or.beforeWords,$r.beforeWords),afterWords:Object.assign({},Vt.afterWords,or.afterWords,$r.afterWords)},Cr="Place",Nu={beforeTags:{Place:Cr},afterTags:{Place:Cr,Abbreviation:Cr},beforeWords:{in:Cr,by:Cr,near:Cr,from:Cr,to:Cr},afterWords:{in:Cr,by:Cr,near:Cr,from:Cr,to:Cr,government:Cr,council:Cr,region:Cr,city:Cr}},BM={beforeTags:Object.assign({},Nu.beforeTags,or.beforeTags),afterTags:Object.assign({},Nu.afterTags,or.afterTags),beforeWords:Object.assign({},Nu.beforeWords,or.beforeWords),afterWords:Object.assign({},Nu.afterWords,or.afterWords)},$M={beforeTags:Object.assign({},or.beforeTags,ir.beforeTags),afterTags:Object.assign({},or.afterTags,ir.afterTags),beforeWords:Object.assign({},or.beforeWords,ir.beforeWords),afterWords:Object.assign({},or.afterWords,ir.afterWords)};let xn="Unit";const _M={beforeTags:{Value:xn},afterTags:{},beforeWords:{per:xn,every:xn,each:xn,square:xn,cubic:xn,sq:xn,metric:xn},afterWords:{per:xn,squared:xn,cubed:xn,long:xn}},ko={"Actor|Verb":DM,"Adj|Gerund":NM,"Adj|Noun":AM,"Adj|Past":CM,"Adj|Present":SM,"Noun|Verb":TM,"Noun|Gerund":MM,"Person|Noun":kM,"Person|Date":PM,"Person|Verb":OM,"Person|Place":BM,"Person|Adj":$M,"Unit|Noun":_M},Au=(e,t)=>{let r=Object.keys(e).reduce((n,a)=>(n[a]=e[a]==="Infinitive"?"PresentTense":"Plural",n),{});return Object.assign(r,t)};ko["Plural|Verb"]={beforeWords:Au(ko["Noun|Verb"].beforeWords,{had:"Plural",have:"Plural"}),afterWords:Au(ko["Noun|Verb"].afterWords,{his:"PresentTense",her:"PresentTense",its:"PresentTense",in:null,to:null,is:"PresentTense",by:"PresentTense"}),beforeTags:Au(ko["Noun|Verb"].beforeTags,{Conjunction:"PresentTense",Noun:void 0,ProperNoun:"PresentTense"}),afterTags:Au(ko["Noun|Verb"].afterTags,{Gerund:"Plural",Noun:"PresentTense",Value:"PresentTense"})};const Dt="Adjective",dr="Infinitive",Ti="PresentTense",ot="Singular",hr="PastTense",go="Adverb",cn="Plural",Wt="Actor",Cu="Verb",Pr="Noun",IM="ProperNoun",jn="LastName",rp="Modal",kt="Place",Qc="Participle",zM=[null,null,{ea:ot,ia:Pr,ic:Dt,ly:go,"'n":Cu,"'t":Cu},{oed:hr,ued:hr,xed:hr," so":go,"'ll":rp,"'re":"Copula",azy:Dt,eer:Pr,end:Cu,ped:hr,ffy:Dt,ify:dr,ing:"Gerund",ize:dr,ibe:dr,lar:Dt,mum:Dt,nes:Ti,nny:Dt,ous:Dt,que:Dt,ger:Pr,ber:Pr,rol:ot,sis:ot,ogy:ot,oid:ot,ian:ot,zes:Ti,eld:hr,ken:Qc,ven:Qc,ten:Qc,ect:dr,ict:dr,ign:dr,oze:dr,ful:Dt,bal:Dt,ton:Pr,pur:kt},{amed:hr,aped:hr,ched:hr,lked:hr,rked:hr,reed:hr,nded:hr,mned:Dt,cted:hr,dged:hr,ield:ot,akis:jn,cede:dr,chuk:jn,czyk:jn,ects:Ti,iend:ot,ends:Cu,enko:jn,ette:ot,iary:ot,wner:ot,fies:Ti,fore:go,gate:dr,gone:Dt,ices:cn,ints:cn,ruct:dr,ines:cn,ions:cn,ners:cn,pers:cn,lers:cn,less:Dt,llen:Dt,made:Dt,nsen:jn,oses:Ti,ould:rp,some:Dt,sson:jn,ians:cn,tion:ot,tage:Pr,ique:ot,tive:Dt,tors:Pr,vice:ot,lier:ot,fier:ot,wned:hr,gent:ot,tist:Wt,pist:Wt,rist:Wt,mist:Wt,yist:Wt,vist:Wt,ists:Wt,lite:ot,site:ot,rite:ot,mite:ot,bite:ot,mate:ot,date:ot,ndal:ot,vent:ot,uist:Wt,gist:Wt,note:ot,cide:ot,ence:ot,wide:Dt,vide:dr,ract:dr,duce:dr,pose:dr,eive:dr,lyze:dr,lyse:dr,iant:Dt,nary:Dt,ghty:Dt,uent:Dt,erer:Wt,bury:kt,dorf:Pr,esty:Pr,wych:kt,dale:kt,folk:kt,vale:kt,abad:kt,sham:kt,wick:kt,view:kt},{elist:Wt,holic:ot,phite:ot,tized:hr,urned:hr,eased:hr,ances:cn,bound:Dt,ettes:cn,fully:go,ishes:Ti,ities:cn,marek:jn,nssen:jn,ology:Pr,osome:ot,tment:ot,ports:cn,rough:Dt,tches:Ti,tieth:"Ordinal",tures:cn,wards:go,where:go,archy:Pr,pathy:Pr,opoly:Pr,embly:Pr,phate:Pr,ndent:ot,scent:ot,onist:Wt,anist:Wt,alist:Wt,olist:Wt,icist:Wt,ounce:dr,iable:Dt,borne:Dt,gnant:Dt,inant:Dt,igent:Dt,atory:Dt,rient:ot,dient:ot,maker:Wt,burgh:kt,mouth:kt,ceter:kt,ville:kt,hurst:kt,stead:kt,endon:kt,brook:kt,shire:kt,worth:Pr,field:IM,ridge:kt},{auskas:jn,parent:ot,cedent:ot,ionary:ot,cklist:ot,brooke:kt,keeper:Wt,logist:Wt,teenth:"Value",worker:Wt,master:Wt,writer:Wt,brough:kt,cester:kt,ington:kt,cliffe:kt,ingham:kt},{chester:kt,logists:Wt,opoulos:jn,borough:kt,sdottir:jn}],fn="Adjective",Ot="Noun",ys="Verb",jM=[null,null,{},{neo:Ot,bio:Ot,"de-":ys,"re-":ys,"un-":ys,"ex-":Ot},{anti:Ot,auto:Ot,faux:fn,hexa:Ot,kilo:Ot,mono:Ot,nano:Ot,octa:Ot,poly:Ot,semi:fn,tele:Ot,"pro-":fn,"mis-":ys,"dis-":ys,"pre-":fn},{anglo:Ot,centi:Ot,ethno:Ot,ferro:Ot,grand:Ot,hepta:Ot,hydro:Ot,intro:Ot,macro:Ot,micro:Ot,milli:Ot,nitro:Ot,penta:Ot,quasi:fn,radio:Ot,tetra:Ot,"omni-":fn,"post-":fn},{pseudo:fn,"extra-":fn,"hyper-":fn,"inter-":fn,"intra-":fn,"deca-":fn},{electro:Ot}],Ht="Adjective",Eu="Infinitive",Su="PresentTense",va="Singular",Lr="PastTense",np="Adverb",ya="Expression",ap="Actor",ip="Verb",op="Noun",Mu="LastName",qM={a:[[/.[aeiou]na$/,op,"tuna"],[/.[oau][wvl]ska$/,Mu],[/.[^aeiou]ica$/,va,"harmonica"],[/^([hyj]a+)+$/,ya,"haha"]],c:[[/.[^aeiou]ic$/,Ht]],d:[[/[aeiou](pp|ll|ss|ff|gg|tt|rr|bb|nn|mm)ed$/,Lr,"popped"],[/.[aeo]{2}[bdgmnprvz]ed$/,Lr,"rammed"],[/.[aeiou][sg]hed$/,Lr,"gushed"],[/.[aeiou]red$/,Lr,"hired"],[/.[aeiou]r?ried$/,Lr,"hurried"],[/[^aeiou]ard$/,va,"steward"],[/[aeiou][^aeiou]id$/,Ht,""],[/.[vrl]id$/,Ht,"livid"],[/..led$/,Lr,"hurled"],[/.[iao]sed$/,Lr,""],[/[aeiou]n?[cs]ed$/,Lr,""],[/[aeiou][rl]?[mnf]ed$/,Lr,""],[/[aeiou][ns]?c?ked$/,Lr,"bunked"],[/[aeiou]gned$/,Lr],[/[aeiou][nl]?ged$/,Lr],[/.[tdbwxyz]ed$/,Lr],[/[^aeiou][aeiou][tvx]ed$/,Lr],[/.[cdflmnprstv]ied$/,Lr,"emptied"]],e:[[/.[lnr]ize$/,Eu,"antagonize"],[/.[^aeiou]ise$/,Eu,"antagonise"],[/.[aeiou]te$/,Eu,"bite"],[/.[^aeiou][ai]ble$/,Ht,"fixable"],[/.[^aeiou]eable$/,Ht,"maleable"],[/.[ts]ive$/,Ht,"festive"],[/[a-z]-like$/,Ht,"woman-like"]],h:[[/.[^aeiouf]ish$/,Ht,"cornish"],[/.v[iy]ch$/,Mu,"..ovich"],[/^ug?h+$/,ya,"ughh"],[/^uh[ -]?oh$/,ya,"uhoh"],[/[a-z]-ish$/,Ht,"cartoon-ish"]],i:[[/.[oau][wvl]ski$/,Mu,"polish-male"]],k:[[/^(k){2}$/,ya,"kkkk"]],l:[[/.[gl]ial$/,Ht,"familial"],[/.[^aeiou]ful$/,Ht,"fitful"],[/.[nrtumcd]al$/,Ht,"natal"],[/.[^aeiou][ei]al$/,Ht,"familial"]],m:[[/.[^aeiou]ium$/,va,"magnesium"],[/[^aeiou]ism$/,va,"schism"],[/^[hu]m+$/,ya,"hmm"],[/^\d+ ?[ap]m$/,"Date","3am"]],n:[[/.[lsrnpb]ian$/,Ht,"republican"],[/[^aeiou]ician$/,ap,"musician"],[/[aeiou][ktrp]in'$/,"Gerund","cookin'"]],o:[[/^no+$/,ya,"noooo"],[/^(yo)+$/,ya,"yoo"],[/^wo{2,}[pt]?$/,ya,"woop"]],r:[[/.[bdfklmst]ler$/,"Noun"],[/[aeiou][pns]er$/,va],[/[^i]fer$/,Eu],[/.[^aeiou][ao]pher$/,ap],[/.[lk]er$/,"Noun"],[/.ier$/,"Comparative"]],t:[[/.[di]est$/,"Superlative"],[/.[icldtgrv]ent$/,Ht],[/[aeiou].*ist$/,Ht],[/^[a-z]et$/,ip]],s:[[/.[^aeiou]ises$/,Su],[/.[rln]ates$/,Su],[/.[^z]ens$/,ip],[/.[lstrn]us$/,va],[/.[aeiou]sks$/,Su],[/.[aeiou]kes$/,Su],[/[aeiou][^aeiou]is$/,va],[/[a-z]'s$/,op],[/^yes+$/,ya]],v:[[/.[^aeiou][ai][kln]ov$/,Mu]],y:[[/.[cts]hy$/,Ht],[/.[st]ty$/,Ht],[/.[tnl]ary$/,Ht],[/.[oe]ry$/,va],[/[rdntkbhs]ly$/,np],[/.(gg|bb|zz)ly$/,Ht],[/...lly$/,np],[/.[gk]y$/,Ht],[/[bszmp]{2}y$/,Ht],[/.[ai]my$/,Ht],[/[ea]{2}zy$/,Ht],[/.[^aeiou]ity$/,va]]},kr="Verb",zt="Noun",RM={leftTags:[["Adjective",zt],["Possessive",zt],["Determiner",zt],["Adverb",kr],["Pronoun",kr],["Value",zt],["Ordinal",zt],["Modal",kr],["Superlative",zt],["Demonym",zt],["Honorific","Person"]],leftWords:[["i",kr],["first",zt],["it",kr],["there",kr],["not",kr],["because",zt],["if",zt],["but",zt],["who",kr],["this",zt],["his",zt],["when",zt],["you",kr],["very","Adjective"],["old",zt],["never",kr],["before",zt],["a",zt],["the",zt],["been",kr]],rightTags:[["Copula",zt],["PastTense",zt],["Conjunction",zt],["Modal",zt]],rightWords:[["there",kr],["me",kr],["man","Adjective"],["him",kr],["it",kr],["were",zt],["took",zt],["himself",kr],["went",zt],["who",zt],["jr","Person"]]},eo={Comparative:{fwd:"3:ser,ier¦1er:h,t,f,l,n¦1r:e¦2er:ss,or,om",both:"3er:ver,ear,alm¦3ner:hin¦3ter:lat¦2mer:im¦2er:ng,rm,mb¦2ber:ib¦2ger:ig¦1er:w,p,k,d¦ier:y",rev:"1:tter,yer¦2:uer,ver,ffer,oner,eler,ller,iler,ster,cer,uler,sher,ener,gher,aner,adder,nter,eter,rter,hter,rner,fter¦3:oser,ooler,eafer,user,airer,bler,maler,tler,eater,uger,rger,ainer,urer,ealer,icher,pler,emner,icter,nser,iser¦4:arser,viner,ucher,rosser,somer,ndomer,moter,oother,uarer,hiter¦5:nuiner,esser,emier¦ar:urther",ex:"worse:bad¦better:good¦4er:fair,gray,poor¦1urther:far¦3ter:fat,hot,wet¦3der:mad,sad¦3er:shy,fun¦4der:glad¦:¦4r:cute,dire,fake,fine,free,lame,late,pale,rare,ripe,rude,safe,sore,tame,wide¦5r:eerie,stale"},Gerund:{fwd:"1:nning,tting,rring,pping,eing,mming,gging,dding,bbing,kking¦2:eking,oling,eling,eming¦3:velling,siting,uiting,fiting,loting,geting,ialing,celling¦4:graming",both:"1:aing,iing,fing,xing,ying,oing,hing,wing¦2:tzing,rping,izzing,bting,mning,sping,wling,rling,wding,rbing,uping,lming,wning,mping,oning,lting,mbing,lking,fting,hting,sking,gning,pting,cking,ening,nking,iling,eping,ering,rting,rming,cting,lping,ssing,nting,nding,lding,sting,rning,rding,rking¦3:belling,siping,toming,yaking,uaking,oaning,auling,ooping,aiding,naping,euring,tolling,uzzing,ganing,haning,ualing,halling,iasing,auding,ieting,ceting,ouling,voring,ralling,garing,joring,oaming,oaking,roring,nelling,ooring,uelling,eaming,ooding,eaping,eeting,ooting,ooming,xiting,keting,ooking,ulling,airing,oaring,biting,outing,oiting,earing,naling,oading,eeding,ouring,eaking,aiming,illing,oining,eaning,onging,ealing,aining,eading¦4:thoming,melling,aboring,ivoting,weating,dfilling,onoring,eriting,imiting,tialling,rgining,otoring,linging,winging,lleting,louding,spelling,mpelling,heating,feating,opelling,choring,welling,ymaking,ctoring,calling,peating,iloring,laiting,utoring,uditing,mmaking,loating,iciting,waiting,mbating,voiding,otalling,nsoring,nselling,ocusing,itoring,eloping¦5:rselling,umpeting,atrolling,treating,tselling,rpreting,pringing,ummeting,ossoming,elmaking,eselling,rediting,totyping,onmaking,rfeiting,ntrolling¦5e:chmaking,dkeeping,severing,erouting,ecreting,ephoning,uthoring,ravening,reathing,pediting,erfering,eotyping,fringing,entoring,ombining,ompeting¦4e:emaking,eething,twining,rruling,chuting,xciting,rseding,scoping,edoring,pinging,lunging,agining,craping,pleting,eleting,nciting,nfining,ncoding,tponing,ecoding,writing,esaling,nvening,gnoring,evoting,mpeding,rvening,dhering,mpiling,storing,nviting,ploring¦3e:tining,nuring,saking,miring,haling,ceding,xuding,rining,nuting,laring,caring,miling,riding,hoking,piring,lading,curing,uading,noting,taping,futing,paring,hading,loding,siring,guring,vading,voking,during,niting,laning,caping,luting,muting,ruding,ciding,juring,laming,caling,hining,uoting,liding,ciling,duling,tuting,puting,cuting,coring,uiding,tiring,turing,siding,rading,enging,haping,buting,lining,taking,anging,haring,uiring,coming,mining,moting,suring,viding,luding¦2e:tring,zling,uging,oging,gling,iging,vring,fling,lging,obing,psing,pling,ubing,cling,dling,wsing,iking,rsing,dging,kling,ysing,tling,rging,eging,nsing,uning,osing,uming,using,ibing,bling,aging,ising,asing,ating¦2ie:rlying¦1e:zing,uing,cing,ving",rev:"ying:ie¦1ing:se,ke,te,we,ne,re,de,pe,me,le,c,he¦2ing:ll,ng,dd,ee,ye,oe,rg,us¦2ning:un¦2ging:og,ag,ug,ig,eg¦2ming:um¦2bing:ub,ab,eb,ob¦3ning:lan,can,hin,pin,win¦3ring:cur,lur,tir,tar,pur,car¦3ing:ait,del,eel,fin,eat,oat,eem,lel,ool,ein,uin¦3ping:rop,rap,top,uip,wap,hip,hop,lap,rip,cap¦3ming:tem,wim,rim,kim,lim¦3ting:mat,cut,pot,lit,lot,hat,set,pit,put¦3ding:hed,bed,bid¦3king:rek¦3ling:cil,pel¦3bing:rib¦4ning:egin¦4ing:isit,ruit,ilot,nsit,dget,rkel,ival,rcel¦4ring:efer,nfer¦4ting:rmit,mmit,ysit,dmit,emit,bmit,tfit,gret¦4ling:evel,xcel,ivel¦4ding:hred¦5ing:arget,posit,rofit¦5ring:nsfer¦5ting:nsmit,orget,cquit¦5ling:ancel,istil",ex:"3:adding,eating,aiming,aiding,airing,outing,gassing,setting,getting,putting,cutting,winning,sitting,betting,mapping,tapping,letting,bidding,hitting,tanning,netting,popping,fitting,capping,lapping,barring,banning,vetting,topping,rotting,tipping,potting,wetting,pitting,dipping,budding,hemming,pinning,jetting,kidding,padding,podding,sipping,wedding,bedding,donning,warring,penning,gutting,cueing,wadding,petting,ripping,napping,matting,tinning,binning,dimming,hopping,mopping,nodding,panning,rapping,ridding,sinning¦4:selling,falling,calling,waiting,editing,telling,rolling,heating,boating,hanging,beating,coating,singing,tolling,felling,polling,discing,seating,voiding,gelling,yelling,baiting,reining,ruining,seeking,spanning,stepping,knitting,emitting,slipping,quitting,dialing,omitting,clipping,shutting,skinning,abutting,flipping,trotting,cramming,fretting,suiting¦5:bringing,treating,spelling,stalling,trolling,expelling,rivaling,wringing,deterring,singeing,befitting,refitting¦6:enrolling,distilling,scrolling,strolling,caucusing,travelling¦7:installing,redefining,stencilling,recharging,overeating,benefiting,unraveling,programing¦9:reprogramming¦is:being¦2e:using,aging,owing¦3e:making,taking,coming,noting,hiring,filing,coding,citing,doping,baking,coping,hoping,lading,caring,naming,voting,riding,mining,curing,lining,ruling,typing,boring,dining,firing,hiding,piling,taping,waning,baling,boning,faring,honing,wiping,luring,timing,wading,piping,fading,biting,zoning,daring,waking,gaming,raking,ceding,tiring,coking,wining,joking,paring,gaping,poking,pining,coring,liming,toting,roping,wiring,aching¦4e:writing,storing,eroding,framing,smoking,tasting,wasting,phoning,shaking,abiding,braking,flaking,pasting,priming,shoring,sloping,withing,hinging¦5e:defining,refining,renaming,swathing,fringing,reciting¦1ie:dying,tying,lying,vying¦7e:sunbathing"},Participle:{fwd:"1:mt¦2:llen¦3:iven,aken¦:ne¦y:in",both:"1:wn¦2:me,aten¦3:seen,bidden,isen¦4:roven,asten¦3l:pilt¦3d:uilt¦2e:itten¦1im:wum¦1eak:poken¦1ine:hone¦1ose:osen¦1in:gun¦1ake:woken¦ear:orn¦eal:olen¦eeze:ozen¦et:otten¦ink:unk¦ing:ung",rev:"2:un¦oken:eak¦ought:eek¦oven:eave¦1ne:o¦1own:ly¦1den:de¦1in:ay¦2t:am¦2n:ee¦3en:all¦4n:rive,sake,take¦5n:rgive",ex:"2:been¦3:seen,run¦4:given,taken¦5:shaken¦2eak:broken¦1ive:dove¦2y:flown¦3e:hidden,ridden¦1eek:sought¦1ake:woken¦1eave:woven"},PastTense:{fwd:"1:tted,wed,gged,nned,een,rred,pped,yed,bbed,oed,dded,rd,wn,mmed¦2:eed,nded,et,hted,st,oled,ut,emed,eled,lded,ken,rt,nked,apt,ant,eped,eked¦3:eared,eat,eaded,nelled,ealt,eeded,ooted,eaked,eaned,eeted,mited,bid,uit,ead,uited,ealed,geted,velled,ialed,belled¦4:ebuted,hined,comed¦y:ied¦ome:ame¦ear:ore¦ind:ound¦ing:ung,ang¦ep:pt¦ink:ank,unk¦ig:ug¦all:ell¦ee:aw¦ive:ave¦eeze:oze¦old:eld¦ave:ft¦ake:ook¦ell:old¦ite:ote¦ide:ode¦ine:one¦in:un,on¦eal:ole¦im:am¦ie:ay¦and:ood¦1ise:rose¦1eak:roke¦1ing:rought¦1ive:rove¦1el:elt¦1id:bade¦1et:got¦1y:aid¦1it:sat¦3e:lid¦3d:pent",both:"1:aed,fed,xed,hed¦2:sged,xted,wled,rped,lked,kied,lmed,lped,uped,bted,rbed,rked,wned,rled,mped,fted,mned,mbed,zzed,omed,ened,cked,gned,lted,sked,ued,zed,nted,ered,rted,rmed,ced,sted,rned,ssed,rded,pted,ved,cted¦3:cled,eined,siped,ooned,uked,ymed,jored,ouded,ioted,oaned,lged,asped,iged,mured,oided,eiled,yped,taled,moned,yled,lit,kled,oaked,gled,naled,fled,uined,oared,valled,koned,soned,aided,obed,ibed,meted,nicked,rored,micked,keted,vred,ooped,oaded,rited,aired,auled,filled,ouled,ooded,ceted,tolled,oited,bited,aped,tled,vored,dled,eamed,nsed,rsed,sited,owded,pled,sored,rged,osed,pelled,oured,psed,oated,loned,aimed,illed,eured,tred,ioned,celled,bled,wsed,ooked,oiled,itzed,iked,iased,onged,ased,ailed,uned,umed,ained,auded,nulled,ysed,eged,ised,aged,oined,ated,used,dged,doned¦4:ntied,efited,uaked,caded,fired,roped,halled,roked,himed,culed,tared,lared,tuted,uared,routed,pited,naked,miled,houted,helled,hared,cored,caled,tired,peated,futed,ciled,called,tined,moted,filed,sided,poned,iloted,honed,lleted,huted,ruled,cured,named,preted,vaded,sured,talled,haled,peded,gined,nited,uided,ramed,feited,laked,gured,ctored,unged,pired,cuted,voked,eloped,ralled,rined,coded,icited,vided,uaded,voted,mined,sired,noted,lined,nselled,luted,jured,fided,puted,piled,pared,olored,cided,hoked,enged,tured,geoned,cotted,lamed,uiled,waited,udited,anged,luded,mired,uired,raded¦5:modelled,izzled,eleted,umpeted,ailored,rseded,treated,eduled,ecited,rammed,eceded,atrolled,nitored,basted,twined,itialled,ncited,gnored,ploded,xcited,nrolled,namelled,plored,efeated,redited,ntrolled,nfined,pleted,llided,lcined,eathed,ibuted,lloted,dhered,cceded¦3ad:sled¦2aw:drew¦2ot:hot¦2ke:made¦2ow:hrew,grew¦2ose:hose¦2d:ilt¦2in:egan¦1un:ran¦1ink:hought¦1ick:tuck¦1ike:ruck¦1eak:poke,nuck¦1it:pat¦1o:did¦1ow:new¦1ake:woke¦go:went",rev:"3:rst,hed,hut,cut,set¦4:tbid¦5:dcast,eread,pread,erbid¦ought:uy,eek¦1ied:ny,ly,dy,ry,fy,py,vy,by,ty,cy¦1ung:ling,ting,wing¦1pt:eep¦1ank:rink¦1ore:bear,wear¦1ave:give¦1oze:reeze¦1ound:rind,wind¦1ook:take,hake¦1aw:see¦1old:sell¦1ote:rite¦1ole:teal¦1unk:tink¦1am:wim¦1ay:lie¦1ood:tand¦1eld:hold¦2d:he,ge,re,le,leed,ne,reed,be,ye,lee,pe,we¦2ed:dd,oy,or,ey,gg,rr,us,ew,to¦2ame:ecome,rcome¦2ped:ap¦2ged:ag,og,ug,eg¦2bed:ub,ab,ib,ob¦2lt:neel¦2id:pay¦2ang:pring¦2ove:trive¦2med:um¦2ode:rride¦2at:ysit¦3ted:mit,hat,mat,lat,pot,rot,bat¦3ed:low,end,tow,und,ond,eem,lay,cho,dow,xit,eld,ald,uld,law,lel,eat,oll,ray,ank,fin,oam,out,how,iek,tay,haw,ait,vet,say,cay,bow¦3d:ste,ede,ode,ete,ree,ude,ame,oke,ote,ime,ute,ade¦3red:lur,cur,pur,car¦3ped:hop,rop,uip,rip,lip,tep,top¦3ded:bed,rod,kid¦3ade:orbid¦3led:uel¦3ned:lan,can,kin,pan,tun¦3med:rim,lim¦4ted:quit,llot¦4ed:pear,rrow,rand,lean,mand,anel,pand,reet,link,abel,evel,imit,ceed,ruit,mind,peal,veal,hool,head,pell,well,mell,uell,band,hear,weak¦4led:nnel,qual,ebel,ivel¦4red:nfer,efer,sfer¦4n:sake,trew¦4d:ntee¦4ded:hred¦4ned:rpin¦5ed:light,nceal,right,ndear,arget,hread,eight,rtial,eboot¦5d:edite,nvite¦5ted:egret¦5led:ravel",ex:"2:been,upped¦3:added,aged,aided,aimed,aired,bid,died,dyed,egged,erred,eyed,fit,gassed,hit,lied,owed,pent,pied,tied,used,vied,oiled,outed,banned,barred,bet,canned,cut,dipped,donned,ended,feed,inked,jarred,let,manned,mowed,netted,padded,panned,pitted,popped,potted,put,set,sewn,sowed,tanned,tipped,topped,vowed,weed,bowed,jammed,binned,dimmed,hopped,mopped,nodded,pinned,rigged,sinned,towed,vetted¦4:ached,baked,baled,boned,bored,called,caned,cared,ceded,cited,coded,cored,cubed,cured,dared,dined,edited,exited,faked,fared,filed,fined,fired,fuelled,gamed,gelled,hired,hoped,joked,lined,mined,named,noted,piled,poked,polled,pored,pulled,reaped,roamed,rolled,ruled,seated,shed,sided,timed,tolled,toned,voted,waited,walled,waned,winged,wiped,wired,zoned,yelled,tamed,lubed,roped,faded,mired,caked,honed,banged,culled,heated,raked,welled,banded,beat,cast,cooled,cost,dealt,feared,folded,footed,handed,headed,heard,hurt,knitted,landed,leaked,leapt,linked,meant,minded,molded,neared,needed,peaked,plodded,plotted,pooled,quit,read,rooted,sealed,seeded,seeped,shipped,shunned,skimmed,slammed,sparred,stemmed,stirred,suited,thinned,twinned,swayed,winked,dialed,abutted,blotted,fretted,healed,heeded,peeled,reeled¦5:basted,cheated,equalled,eroded,exiled,focused,opined,pleated,primed,quoted,scouted,shored,sloped,smoked,sniped,spelled,spouted,routed,staked,stored,swelled,tasted,treated,wasted,smelled,dwelled,honored,prided,quelled,eloped,scared,coveted,sweated,breaded,cleared,debuted,deterred,freaked,modeled,pleaded,rebutted,speeded¦6:anchored,defined,endured,impaled,invited,refined,revered,strolled,cringed,recast,thrust,unfolded¦7:authored,combined,competed,conceded,convened,excreted,extruded,redefined,restored,secreted,rescinded,welcomed¦8:expedited,infringed¦9:interfered,intervened,persevered¦10:contravened¦eat:ate¦is:was¦go:went¦are:were¦3d:bent,lent,rent,sent¦3e:bit,fled,hid,lost¦3ed:bled,bred¦2ow:blew,grew¦1uy:bought¦2tch:caught¦1o:did¦1ive:dove,gave¦2aw:drew¦2ed:fed¦2y:flew,laid,paid,said¦1ight:fought¦1et:got¦2ve:had¦1ang:hung¦2ad:led¦2ght:lit¦2ke:made¦2et:met¦1un:ran¦1ise:rose¦1it:sat¦1eek:sought¦1each:taught¦1ake:woke,took¦1eave:wove¦2ise:arose¦1ear:bore,tore,wore¦1ind:bound,found,wound¦2eak:broke¦2ing:brought,wrung¦1ome:came¦2ive:drove¦1ig:dug¦1all:fell¦2el:felt¦4et:forgot¦1old:held¦2ave:left¦1ing:rang,sang¦1ide:rode¦1ink:sank¦1ee:saw¦2ine:shone¦4e:slid¦1ell:sold,told¦4d:spent¦2in:spun¦1in:won"},PresentTense:{fwd:"1:oes¦1ve:as",both:"1:xes¦2:zzes,ches,shes,sses¦3:iases¦2y:llies,plies¦1y:cies,bies,ties,vies,nies,pies,dies,ries,fies¦:s",rev:"1ies:ly¦2es:us,go,do¦3es:cho,eto",ex:"2:does,goes¦3:gasses¦5:focuses¦is:are¦3y:relies¦2y:flies¦2ve:has"},Superlative:{fwd:"1st:e¦1est:l,m,f,s¦1iest:cey¦2est:or,ir¦3est:ver",both:"4:east¦5:hwest¦5lest:erful¦4est:weet,lgar,tter,oung¦4most:uter¦3est:ger,der,rey,iet,ong,ear¦3test:lat¦3most:ner¦2est:pt,ft,nt,ct,rt,ht¦2test:it¦2gest:ig¦1est:b,k,n,p,h,d,w¦iest:y",rev:"1:ttest,nnest,yest¦2:sest,stest,rmest,cest,vest,lmest,olest,ilest,ulest,ssest,imest,uest¦3:rgest,eatest,oorest,plest,allest,urest,iefest,uelest,blest,ugest,amest,yalest,ealest,illest,tlest,itest¦4:cerest,eriest,somest,rmalest,ndomest,motest,uarest,tiffest¦5:leverest,rangest¦ar:urthest¦3ey:riciest",ex:"best:good¦worst:bad¦5est:great¦4est:fast,full,fair,dull¦3test:hot,wet,fat¦4nest:thin¦1urthest:far¦3est:gay,shy,ill¦4test:neat¦4st:late,wide,fine,safe,cute,fake,pale,rare,rude,sore,ripe,dire¦6st:severe"},AdjToNoun:{fwd:"1:tistic,eable,lful,sful,ting,tty¦2:onate,rtable,geous,ced,seful,ctful¦3:ortive,ented¦arity:ear¦y:etic¦fulness:begone¦1ity:re¦1y:tiful,gic¦2ity:ile,imous,ilous,ime¦2ion:ated¦2eness:iving¦2y:trious¦2ation:iring¦2tion:vant¦3ion:ect¦3ce:mant,mantic¦3tion:irable¦3y:est,estic¦3m:mistic,listic¦3ess:ning¦4n:utious¦4on:rative,native,vative,ective¦4ce:erant",both:"1:king,wing¦2:alous,ltuous,oyful,rdous¦3:gorous,ectable,werful,amatic¦4:oised,usical,agical,raceful,ocused,lined,ightful¦5ness:stful,lding,itous,nuous,ulous,otous,nable,gious,ayful,rvous,ntous,lsive,peful,entle,ciful,osive,leful,isive,ncise,reful,mious¦5ty:ivacious¦5ties:ubtle¦5ce:ilient,adiant,atient¦5cy:icient¦5sm:gmatic¦5on:sessive,dictive¦5ity:pular,sonal,eative,entic¦5sity:uminous¦5ism:conic¦5nce:mperate¦5ility:mitable¦5ment:xcited¦5n:bitious¦4cy:brant,etent,curate¦4ility:erable,acable,icable,ptable¦4ty:nacious,aive,oyal,dacious¦4n:icious¦4ce:vient,erent,stent,ndent,dient,quent,ident¦4ness:adic,ound,hing,pant,sant,oing,oist,tute¦4icity:imple¦4ment:fined,mused¦4ism:otic¦4ry:dantic¦4ity:tund,eral¦4edness:hand¦4on:uitive¦4lity:pitable¦4sm:eroic,namic¦4sity:nerous¦3th:arm¦3ility:pable,bable,dable,iable¦3cy:hant,nant,icate¦3ness:red,hin,nse,ict,iet,ite,oud,ind,ied,rce¦3ion:lute¦3ity:ual,gal,volous,ial¦3ce:sent,fensive,lant,gant,gent,lent,dant¦3on:asive¦3m:fist,sistic,iastic¦3y:terious,xurious,ronic,tastic¦3ur:amorous¦3e:tunate¦3ation:mined¦3sy:rteous¦3ty:ain¦3ry:ave¦3ment:azed¦2ness:de,on,ue,rn,ur,ft,rp,pe,om,ge,rd,od,ay,ss,er,ll,oy,ap,ht,ld,ad,rt¦2inousness:umous¦2ity:neous,ene,id,ane¦2cy:bate,late¦2ation:ized¦2ility:oble,ible¦2y:odic¦2e:oving,aring¦2s:ost¦2itude:pt¦2dom:ee¦2ance:uring¦2tion:reet¦2ion:oted¦2sion:ending¦2liness:an¦2or:rdent¦1th:ung¦1e:uable¦1ness:w,h,k,f¦1ility:mble¦1or:vent¦1ement:ging¦1tiquity:ncient¦1ment:hed¦verty:or¦ength:ong¦eat:ot¦pth:ep¦iness:y",rev:"",ex:"5:forceful,humorous¦8:charismatic¦13:understanding¦5ity:active¦11ness:adventurous,inquisitive,resourceful¦8on:aggressive,automatic,perceptive¦7ness:amorous,fatuous,furtive,ominous,serious¦5ness:ample,sweet¦12ness:apprehensive,cantankerous,contemptuous,ostentatious¦13ness:argumentative,conscientious¦9ness:assertive,facetious,imperious,inventive,oblivious,rapacious,receptive,seditious,whimsical¦10ness:attractive,expressive,impressive,loquacious,salubrious,thoughtful¦3edom:boring¦4ness:calm,fast,keen,tame¦8ness:cheerful,gracious,specious,spurious,timorous,unctuous¦5sity:curious¦9ion:deliberate¦8ion:desperate¦6e:expensive¦7ce:fragrant¦3y:furious¦9ility:ineluctable¦6ism:mystical¦8ity:physical,proactive,sensitive,vertical¦5cy:pliant¦7ity:positive¦9ity:practical¦12ism:professional¦6ce:prudent¦3ness:red¦6cy:vagrant¦3dom:wise"}},LM=function(e,t={}){return t.hasOwnProperty(e)?t[e]:null},HM=function(e,t=[]){for(let r=0;r<t.length;r+=1)if(e.endsWith(t[r]))return e;return null},GM=function(e,t,r={}){t=t||{};let n=e.length-1;for(let a=n;a>=1;a-=1){let i=e.length-a,o=e.substring(i,e.length);if(t.hasOwnProperty(o)===!0)return e.slice(0,i)+t[o];if(r.hasOwnProperty(o)===!0)return e.slice(0,i)+r[o]}return t.hasOwnProperty("")?e+=t[""]:r.hasOwnProperty("")?e+=r[""]:null},hn=function(e="",t={}){let r=LM(e,t.ex);return r=r||HM(e,t.same),r=r||GM(e,t.fwd,t.both),r=r||e,r},sp=function(e){return Object.entries(e).reduce((t,r)=>(t[r[1]]=r[0],t),{})},es=function(e={}){return{reversed:!0,both:sp(e.both),ex:sp(e.ex),fwd:e.rev||{}}},up=/^([0-9]+)/,VM=function(e){let t={};return e.split("¦").forEach(r=>{let[n,a]=r.split(":");a=(a||"").split(","),a.forEach(i=>{t[i]=n})}),t},UM=function(e="",t=""){t=String(t);let r=t.match(up);if(r===null)return t;let n=Number(r[1])||0;return e.substring(0,n)+t.replace(up,"")},Tu=function(e){let t=VM(e);return Object.keys(t).reduce((r,n)=>(r[n]=UM(n,t[n]),r),{})},to=function(e={}){return typeof e=="string"&&(e=JSON.parse(e)),e.fwd=Tu(e.fwd||""),e.both=Tu(e.both||""),e.rev=Tu(e.rev||""),e.ex=Tu(e.ex||""),e},bw=to(eo.PastTense),ww=to(eo.PresentTense),xw=to(eo.Gerund),Dw=to(eo.Participle),WM=es(bw),JM=es(ww),KM=es(xw),YM=es(Dw),Nw=to(eo.Comparative),Aw=to(eo.Superlative),ZM=es(Nw),QM=es(Aw),XM=to(eo.AdjToNoun),Cw={fromPast:bw,fromPresent:ww,fromGerund:xw,fromParticiple:Dw,toPast:WM,toPresent:JM,toGerund:KM,toParticiple:YM,toComparative:Nw,toSuperlative:Aw,fromComparative:ZM,fromSuperlative:QM,adjToNoun:XM},eT=[[/^[\w.]+@[\w.]+\.[a-z]{2,3}$/,"Email"],[/^(https?:\/\/|www\.)+\w+\.[a-z]{2,3}/,"Url","http.."],[/^[a-z0-9./].+\.(com|net|gov|org|ly|edu|info|biz|dev|ru|jp|de|in|uk|br|io|ai)/,"Url",".com"],[/^[PMCE]ST$/,"Timezone","EST"],[/^ma?c'[a-z]{3}/,"LastName","mc'neil"],[/^o'[a-z]{3}/,"LastName","o'connor"],[/^ma?cd[aeiou][a-z]{3}/,"LastName","mcdonald"],[/^(lol)+[sz]$/,"Expression","lol"],[/^wo{2,}a*h?$/,"Expression","wooah"],[/^(hee?){2,}h?$/,"Expression","hehe"],[/^(un|de|re)\\-[a-z\u00C0-\u00FF]{2}/,"Verb","un-vite"],[/^(m|k|cm|km)\/(s|h|hr)$/,"Unit","5 k/m"],[/^(ug|ng|mg)\/(l|m3|ft3)$/,"Unit","ug/L"],[new RegExp("[^:/]\\/\\p{Letter}","u"),"SlashedTerm","love/hate"]],tT=[[new RegExp("^#[\\p{Number}_]*\\p{Letter}","u"),"HashTag"],[/^@\w{2,}$/,"AtMention"],[/^([A-Z]\.){2}[A-Z]?/i,["Acronym","Noun"],"F.B.I"],[/.{3}[lkmnp]in['‘’‛‵′`´]$/,"Gerund","chillin'"],[/.{4}s['‘’‛‵′`´]$/,"Possessive","flanders'"],[/^[\p{Emoji_Presentation}\p{Extended_Pictographic}]/u,"Emoji","emoji-class"]],rT=[[/^@1?[0-9](am|pm)$/i,"Time","3pm"],[/^@1?[0-9]:[0-9]{2}(am|pm)?$/i,"Time","3:30pm"],[/^'[0-9]{2}$/,"Year"],[/^[012]?[0-9](:[0-5][0-9])(:[0-5][0-9])$/,"Time","3:12:31"],[/^[012]?[0-9](:[0-5][0-9])?(:[0-5][0-9])? ?(am|pm)$/i,"Time","1:12pm"],[/^[012]?[0-9](:[0-5][0-9])(:[0-5][0-9])? ?(am|pm)?$/i,"Time","1:12:31pm"],[/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}/i,"Date","iso-date"],[/^[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,4}$/,"Date","iso-dash"],[/^[0-9]{1,4}\/[0-9]{1,2}\/([0-9]{4}|[0-9]{2})$/,"Date","iso-slash"],[/^[0-9]{1,4}\.[0-9]{1,2}\.[0-9]{1,4}$/,"Date","iso-dot"],[/^[0-9]{1,4}-[a-z]{2,9}-[0-9]{1,4}$/i,"Date","12-dec-2019"],[/^utc ?[+-]?[0-9]+$/,"Timezone","utc-9"],[/^(gmt|utc)[+-][0-9]{1,2}$/i,"Timezone","gmt-3"],[/^[0-9]{3}-[0-9]{4}$/,"PhoneNumber","421-0029"],[/^(\+?[0-9][ -])?[0-9]{3}[ -]?[0-9]{3}-[0-9]{4}$/,"PhoneNumber","1-800-"],[new RegExp("^[-+]?\\p{Currency_Symbol}[-+]?[0-9]+(,[0-9]{3})*(\\.[0-9]+)?([kmb]|bn)?\\+?$","u"),["Money","Value"],"$5.30"],[new RegExp("^[-+]?[0-9]+(,[0-9]{3})*(\\.[0-9]+)?\\p{Currency_Symbol}\\+?$","u"),["Money","Value"],"5.30£"],[/^[-+]?[$£]?[0-9]([0-9,.])+(usd|eur|jpy|gbp|cad|aud|chf|cny|hkd|nzd|kr|rub)$/i,["Money","Value"],"$400usd"],[/^[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?\+?$/,["Cardinal","NumericValue"],"5,999"],[/^[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?(st|nd|rd|r?th)$/,["Ordinal","NumericValue"],"53rd"],[/^\.[0-9]+\+?$/,["Cardinal","NumericValue"],".73th"],[/^[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?%\+?$/,["Percent","Cardinal","NumericValue"],"-4%"],[/^\.[0-9]+%$/,["Percent","Cardinal","NumericValue"],".3%"],[/^[0-9]{1,4}\/[0-9]{1,4}(st|nd|rd|th)?s?$/,["Fraction","NumericValue"],"2/3rds"],[/^[0-9.]{1,3}[a-z]{0,2}[-–—][0-9]{1,3}[a-z]{0,2}$/,["Value","NumberRange"],"3-4"],[/^[0-9]{1,2}(:[0-9][0-9])?(am|pm)? ?[-–—] ?[0-9]{1,2}(:[0-9][0-9])?(am|pm)$/,["Time","NumberRange"],"3-4pm"],[/^[0-9.]+([a-z°]{1,4})$/,"NumericValue","9km"]],nT=["academy","administration","agence","agences","agencies","agency","airlines","airways","army","assoc","associates","association","assurance","authority","autorite","aviation","bank","banque","board","boys","brands","brewery","brotherhood","brothers","bureau","cafe","co","caisse","capital","care","cathedral","center","centre","chemicals","choir","chronicle","church","circus","clinic","clinique","club","co","coalition","coffee","collective","college","commission","committee","communications","community","company","comprehensive","computers","confederation","conference","conseil","consulting","containers","corporation","corps","corp","council","crew","data","departement","department","departments","design","development","directorate","division","drilling","education","eglise","electric","electricity","energy","ensemble","enterprise","enterprises","entertainment","estate","etat","faculty","faction","federation","financial","fm","foundation","fund","gas","gazette","girls","government","group","guild","herald","holdings","hospital","hotel","hotels","inc","industries","institut","institute","institutes","insurance","international","interstate","investment","investments","investors","journal","laboratory","labs","llc","ltd","limited","machines","magazine","management","marine","marketing","markets","media","memorial","ministere","ministry","military","mobile","motor","motors","musee","museum","news","observatory","office","oil","optical","orchestra","organization","partners","partnership","petrol","petroleum","pharmacare","pharmaceutical","pharmaceuticals","pizza","plc","police","politburo","polytechnic","post","power","press","productions","quartet","radio","reserve","resources","restaurant","restaurants","savings","school","securities","service","services","societe","subsidiary","society","sons","subcommittee","syndicat","systems","telecommunications","telegraph","television","times","tribunal","tv","union","university","utilities","workers"].reduce((e,t)=>(e[t]=!0,e),{}),aT=["atoll","basin","bay","beach","bluff","bog","camp","canyon","canyons","cape","cave","caves","cliffs","coast","cove","coves","crater","crossing","creek","desert","dune","dunes","downs","estates","escarpment","estuary","falls","fjord","fjords","forest","forests","glacier","gorge","gorges","grove","gulf","gully","highland","heights","hollow","hill","hills","inlet","island","islands","isthmus","junction","knoll","lagoon","lake","lakeshore","marsh","marshes","mount","mountain","mountains","narrows","peninsula","plains","plateau","pond","rapids","ravine","reef","reefs","ridge","river","rivers","sandhill","shoal","shore","shoreline","shores","strait","straits","springs","stream","swamp","tombolo","trail","trails","trench","valley","vallies","village","volcano","waterfall","watershed","wetland","woods","acres","burough","county","district","municipality","prefecture","province","region","reservation","state","territory","borough","metropolis","downtown","uptown","midtown","city","town","township","hamlet","country","kingdom","enclave","neighbourhood","neighborhood","kingdom","ward","zone","airport","amphitheater","arch","arena","auditorium","bar","barn","basilica","battlefield","bridge","building","castle","centre","coliseum","cineplex","complex","dam","farm","field","fort","garden","gardens","gymnasium","hall","house","levee","library","manor","memorial","monument","museum","gallery","palace","pillar","pits","plantation","playhouse","quarry","sportsfield","sportsplex","stadium","terrace","terraces","theater","tower","park","parks","site","ranch","raceway","sportsplex","ave","st","street","rd","road","lane","landing","crescent","cr","way","tr","terrace","avenue"].reduce((e,t)=>(e[t]=!0,e),{}),Fu=[[/([^v])ies$/i,"$1y"],[/(ise)s$/i,"$1"],[/(kn|[^o]l|w)ives$/i,"$1ife"],[/^((?:ca|e|ha|(?:our|them|your)?se|she|wo)l|lea|loa|shea|thie)ves$/i,"$1f"],[/^(dwar|handkerchie|hoo|scar|whar)ves$/i,"$1f"],[/(antenn|formul|nebul|vertebr|vit)ae$/i,"$1a"],[/(octop|vir|radi|nucle|fung|cact|stimul)(i)$/i,"$1us"],[/(buffal|tomat|tornad)(oes)$/i,"$1o"],[/(ause)s$/i,"$1"],[/(ease)s$/i,"$1"],[/(ious)es$/i,"$1"],[/(ouse)s$/i,"$1"],[/(ose)s$/i,"$1"],[/(..ase)s$/i,"$1"],[/(..[aeiu]s)es$/i,"$1"],[/(vert|ind|cort)(ices)$/i,"$1ex"],[/(matr|append)(ices)$/i,"$1ix"],[/([xo]|ch|ss|sh)es$/i,"$1"],[/men$/i,"man"],[/(n)ews$/i,"$1ews"],[/([ti])a$/i,"$1um"],[/([^aeiouy]|qu)ies$/i,"$1y"],[/(s)eries$/i,"$1eries"],[/(m)ovies$/i,"$1ovie"],[/(cris|ax|test)es$/i,"$1is"],[/(alias|status)es$/i,"$1"],[/(ss)$/i,"$1"],[/(ic)s$/i,"$1"],[/s$/i,""]],iT=function(e){return Object.keys(e).reduce((t,r)=>(t[e[r]]=r,t),{})},Ew=function(e,t){const{irregularPlurals:r}=t.two;let n=iT(r);if(n.hasOwnProperty(e))return n[e];for(let a=0;a<Fu.length;a++)if(Fu[a][0].test(e)===!0)return e=e.replace(Fu[a][0],Fu[a][1]),e;return e},oT=function(e,t){let r=[e],n=vc(e,t);n!==e&&r.push(n);let a=Ew(e,t);return a!==e&&r.push(a),r},sT={toPlural:vc,toSingular:Ew,all:oT};let Li={Gerund:["ing"],Actor:["erer"],Infinitive:["ate","ize","tion","rify","then","ress","ify","age","nce","ect","ise","ine","ish","ace","ash","ure","tch","end","ack","and","ute","ade","ock","ite","ase","ose","use","ive","int","nge","lay","est","ain","ant","ent","eed","er","le","unk","ung","upt","en"],PastTense:["ept","ed","lt","nt","ew","ld"],PresentTense:["rks","cks","nks","ngs","mps","tes","zes","ers","les","acks","ends","ands","ocks","lays","eads","lls","els","ils","ows","nds","ays","ams","ars","ops","ffs","als","urs","lds","ews","ips","es","ts","ns"],Participle:["ken","wn"]};Li=Object.keys(Li).reduce((e,t)=>(Li[t].forEach(r=>e[r]=t),e),{});const Sw=function(e){let t=e.substring(e.length-3);if(Li.hasOwnProperty(t)===!0)return Li[t];let r=e.substring(e.length-2);return Li.hasOwnProperty(r)===!0?Li[r]:e.substring(e.length-1)==="s"?"PresentTense":null},uT=function(e,t){let r="",n={};t.one&&t.one.prefixes&&(n=t.one.prefixes);let[a,i]=e.split(/ /);return i&&n[a]===!0&&(r=a,a=i,i=""),{prefix:r,verb:a,particle:i}},lp={are:"be",were:"be",been:"be",is:"be",am:"be",was:"be",be:"be",being:"be"},im=function(e,t,r){const{fromPast:n,fromPresent:a,fromGerund:i,fromParticiple:o}=t.two.models;let{prefix:s,verb:u,particle:l}=uT(e,t),c="";if(r||(r=Sw(e)),lp.hasOwnProperty(e))c=lp[e];else if(r==="Participle")c=hn(u,o);else if(r==="PastTense")c=hn(u,n);else if(r==="PresentTense")c=hn(u,a);else if(r==="Gerund")c=hn(u,i);else return e;return l&&(c+=" "+l),s&&(c=s+" "+c),c},lT=e=>/ /.test(e)?e.split(/ /):[e,""],cd=function(e,t){const{toPast:r,toPresent:n,toGerund:a,toParticiple:i}=t.two.models;if(e==="be")return{Infinitive:e,Gerund:"being",PastTense:"was",PresentTense:"is"};let[o,s]=lT(e),u={Infinitive:o,PastTense:hn(o,r),PresentTense:hn(o,n),Gerund:hn(o,a),FutureTense:"will "+o},l=hn(o,i);if(l!==e&&l!==u.PastTense){let c=t.one.lexicon||{};(c[l]==="Participle"||c[l]==="Adjective")&&(e==="play"&&(l="played"),u.Participle=l)}return s&&Object.keys(u).forEach(c=>{u[c]+=" "+s}),u},cT=function(e,t){let r=cd(e,t);return delete r.FutureTense,Object.values(r).filter(n=>n)},fT={toInfinitive:im,conjugate:cd,all:cT},fd=function(e,t){const r=t.two.models.toSuperlative;return hn(e,r)},md=function(e,t){const r=t.two.models.toComparative;return hn(e,r)},mT=function(e,t){const r=t.two.models.fromComparative;return hn(e,r)},dT=function(e,t){const r=t.two.models.fromSuperlative;return hn(e,r)},hT=function(e,t){const r=t.two.models.adjToNoun;return hn(e,r)},Mw=function(e="",t=[]){const r=e.length;let n=r<=6?r-1:6;for(let a=n;a>=1;a-=1){let i=e.substring(r-a,e.length);if(t[i.length].hasOwnProperty(i)===!0){let o=e.slice(0,r-a),s=t[i.length][i];return o+s}}return null},vt="ically",pT=new Set(["analyt"+vt,"chem"+vt,"class"+vt,"clin"+vt,"crit"+vt,"ecolog"+vt,"electr"+vt,"empir"+vt,"frant"+vt,"grammat"+vt,"ident"+vt,"ideolog"+vt,"log"+vt,"mag"+vt,"mathemat"+vt,"mechan"+vt,"med"+vt,"method"+vt,"method"+vt,"mus"+vt,"phys"+vt,"phys"+vt,"polit"+vt,"pract"+vt,"rad"+vt,"satir"+vt,"statist"+vt,"techn"+vt,"technolog"+vt,"theoret"+vt,"typ"+vt,"vert"+vt,"whims"+vt]),gT=[null,{},{ly:""},{ily:"y",bly:"ble",ply:"ple"},{ally:"al",rply:"rp"},{ually:"ual",ially:"ial",cally:"cal",eally:"eal",rally:"ral",nally:"nal",mally:"mal",eeply:"eep",eaply:"eap"},{ically:"ic"}],vT=new Set(["early","only","hourly","daily","weekly","monthly","yearly","mostly","duly","unduly","especially","undoubtedly","conversely","namely","exceedingly","presumably","accordingly","overly","best","latter","little","long","low"]),cp={wholly:"whole",fully:"full",truly:"true",gently:"gentle",singly:"single",customarily:"customary",idly:"idle",publically:"public",quickly:"quick",superbly:"superb",cynically:"cynical",well:"good"},yT=function(e){return e.endsWith("ly")?pT.has(e)?e.replace(/ically/,"ical"):vT.has(e)?null:cp.hasOwnProperty(e)?cp[e]:Mw(e,gT)||e:null},bT=[null,{y:"ily"},{ly:"ly",ic:"ically"},{ial:"ially",ual:"ually",tle:"tly",ble:"bly",ple:"ply",ary:"arily"},{},{},{}],fp={cool:"cooly",whole:"wholly",full:"fully",good:"well",idle:"idly",public:"publicly",single:"singly",special:"especially"},Tw=function(e){if(fp.hasOwnProperty(e))return fp[e];let t=Mw(e,bT);return t||(t=e+"ly"),t},wT=function(e,t){let r=[e];return r.push(fd(e,t)),r.push(md(e,t)),r.push(Tw(e)),r=r.filter(n=>n),r=new Set(r),Array.from(r)},xT={toSuperlative:fd,toComparative:md,toAdverb:Tw,toNoun:hT,fromAdverb:yT,fromSuperlative:dT,fromComparative:mT,all:wT},DT={noun:sT,verb:fT,adjective:xT},mp={Singular:(e,t,r,n)=>{let a=n.one.lexicon,i=r.two.transform.noun.toPlural(e,n);a[i]||(t[i]=t[i]||"Plural")},Actor:(e,t,r,n)=>{let a=n.one.lexicon,i=r.two.transform.noun.toPlural(e,n);a[i]||(t[i]=t[i]||["Plural","Actor"])},Comparable:(e,t,r,n)=>{let a=n.one.lexicon,{toSuperlative:i,toComparative:o}=r.two.transform.adjective,s=i(e,n);a[s]||(t[s]=t[s]||"Superlative");let u=o(e,n);a[u]||(t[u]=t[u]||"Comparative"),t[e]="Adjective"},Demonym:(e,t,r,n)=>{let a=r.two.transform.noun.toPlural(e,n);t[a]=t[a]||["Demonym","Plural"]},Infinitive:(e,t,r,n)=>{let a=n.one.lexicon,i=r.two.transform.verb.conjugate(e,n);Object.entries(i).forEach(o=>{!a[o[1]]&&!t[o[1]]&&o[0]!=="FutureTense"&&(t[o[1]]=o[0])})},PhrasalVerb:(e,t,r,n)=>{let a=n.one.lexicon;t[e]=["PhrasalVerb","Infinitive"];let i=n.one._multiCache,[o,s]=e.split(" ");a[o]||(t[o]=t[o]||"Infinitive");let u=r.two.transform.verb.conjugate(o,n);delete u.FutureTense,Object.entries(u).forEach(l=>{if(l[0]==="Actor"||l[1]==="")return;!t[l[1]]&&!a[l[1]]&&(t[l[1]]=l[0]),i[l[1]]=2;let c=l[1]+" "+s;t[c]=t[c]||[l[0],"PhrasalVerb"]})},Multiple:(e,t)=>{t[e]=["Multiple","Cardinal"],t[e+"th"]=["Multiple","Ordinal"],t[e+"ths"]=["Multiple","Fraction"]},Cardinal:(e,t)=>{t[e]=["TextValue","Cardinal"]},Ordinal:(e,t)=>{t[e]=["TextValue","Ordinal"],t[e+"s"]=["TextValue","Fraction"]},Place:(e,t)=>{t[e]=["Place","ProperNoun"]},Region:(e,t)=>{t[e]=["Region","ProperNoun"]}},NT=function(e,t){const{methods:r,model:n}=t;let a={},i={};return Object.keys(e).forEach(o=>{let s=e[o];o=o.toLowerCase().trim(),o=o.replace(/'s\b/,"");let u=o.split(/ /);u.length>1&&(i[u[0]]===void 0||u.length>i[u[0]])&&(i[u[0]]=u.length),mp.hasOwnProperty(s)===!0&&mp[s](o,a,r,n),a[o]=a[o]||s}),delete a[""],delete a[null],delete a[" "],{lex:a,_multi:i}},AT=function(e,t){const r=/^[0-9]+$/;let n=e[t];if(!n)return!1;const a=new Set(["may","april","august","jan"]);if(n.normal==="like"||a.has(n.normal)||n.tags.has("Place")||n.tags.has("Date"))return!1;if(e[t-1]){let o=e[t-1];if(o.tags.has("Date")||a.has(o.normal)||o.tags.has("Adjective")||n.tags.has("Adjective"))return!1}let i=n.normal;return!((i.length===1||i.length===2||i.length===4)&&r.test(i))},CT=function(e){const t=/[,:;]/;let r=[];return e.forEach(n=>{let a=0;n.forEach((i,o)=>{t.test(i.post)&&AT(n,o+1)&&(r.push(n.slice(a,o+1)),a=o+1)}),a<n.length&&r.push(n.slice(a,n.length))}),r},dp={e:["mice","louse","antennae","formulae","nebulae","vertebrae","vitae"],i:["tia","octopi","viri","radii","nuclei","fungi","cacti","stimuli"],n:["men"],t:["feet"]},ET=new Set(["israelis","menus","logos"]),ST=["bus","mas","was","ias","xas","vas","cis","lis","nis","ois","ris","sis","tis","xis","aus","cus","eus","fus","gus","ius","lus","nus","das","ous","pus","rus","sus","tus","xus","aos","igos","ados","ogos","'s","ss"],Fw=function(e){if(!e||e.length<=3)return!1;if(ET.has(e))return!0;let t=e[e.length-1];return dp.hasOwnProperty(t)?dp[t].find(r=>e.endsWith(r)):!(t!=="s"||ST.find(r=>e.endsWith(r)))},om={two:{quickSplit:CT,expandLexicon:NT,transform:DT,looksPlural:Fw}},MT=function(e){const{irregularPlurals:t}=e.two,{lexicon:r}=e.one;return Object.entries(t).forEach(n=>{r[n[0]]=r[n[0]]||"Singular",r[n[1]]=r[n[1]]||"Plural"}),e};let sm={one:{lexicon:{}},two:{models:Cw}};const TT={"Actor|Verb":"Actor","Adj|Gerund":"Adjective","Adj|Noun":"Adjective","Adj|Past":"Adjective","Adj|Present":"Adjective","Noun|Verb":"Singular","Noun|Gerund":"Gerund","Person|Noun":"Noun","Person|Date":"Month","Person|Verb":"FirstName","Person|Place":"Person","Person|Adj":"Comparative","Plural|Verb":"Plural","Unit|Noun":"Noun"},Pw=function(e,t){const r={model:t,methods:om};let{lex:n,_multi:a}=om.two.expandLexicon(e,r);return Object.assign(t.one.lexicon,n),Object.assign(t.one._multiCache,a),t},FT=function(e,t){return Object.keys(e).forEach(r=>{e[r]==="Uncountable"&&(t.two.uncountable[r]=!0,e[r]="Uncountable")}),t},hp=function(e,t,r){let n=cd(e,sm);t[n.PastTense]=t[n.PastTense]||"PastTense",t[n.Gerund]=t[n.Gerund]||"Gerund",r===!0&&(t[n.PresentTense]=t[n.PresentTense]||"PresentTense")},pp=function(e,t,r){let n=fd(e,r);t[n]=t[n]||"Superlative";let a=md(e,r);t[a]=t[a]||"Comparative"},PT=function(e,t,r){let n=vc(e,r);t[n]=t[n]||"Plural"},kT=function(e,t){let r={};const n=t.one.lexicon;return Object.keys(e).forEach(a=>{const i=e[a];if(r[a]=TT[i],(i==="Noun|Verb"||i==="Person|Verb"||i==="Actor|Verb")&&hp(a,n,!1),i==="Adj|Present"&&(hp(a,n,!0),pp(a,n,t)),i==="Person|Adj"&&pp(a,n,t),i==="Adj|Gerund"||i==="Noun|Gerund"){let o=im(a,sm,"Gerund");n[o]||(r[o]="Infinitive")}if((i==="Noun|Gerund"||i==="Adj|Noun"||i==="Person|Noun")&&PT(a,n,t),i==="Adj|Past"){let o=im(a,sm,"PastTense");n[o]||(r[o]="Infinitive")}}),t=Pw(r,t),t},OT=function(e){return e=Pw(e.one.lexicon,e),e=FT(e.one.lexicon,e),e=kT(e.two.switches,e),e=MT(e),e};let um={one:{_multiCache:{},lexicon:Xo,frozenLex:gM},two:{irregularPlurals:yw,models:Cw,suffixPatterns:zM,prefixPatterns:jM,endsWith:qM,neighbours:RM,regexNormal:eT,regexText:tT,regexNumbers:rT,switches:am,clues:ko,uncountable:{},orgWords:nT,placeWords:aT}};um=OT(um);const BT=function(e,t,r,n){const a=n.methods.one.setTag;if(e.length>=3){const i=/:/;if(e[0].post.match(i)){let s=e[1];if(s.tags.has("Value")||s.tags.has("Email")||s.tags.has("PhoneNumber"))return;a([e[0]],"Expression",n,null,"2-punct-colon''")}}},$T=function(e,t,r,n){const a=n.methods.one.setTag;e[t].post==="-"&&e[t+1]&&a([e[t],e[t+1]],"Hyphenated",n,null,"1-punct-hyphen''")},gp=/^(under|over|mis|re|un|dis|semi)-?/,_T=function(e,t,r){const n=r.two.switches;let a=e[t];if(n.hasOwnProperty(a.normal)){a.switch=n[a.normal];return}if(gp.test(a.normal)){let i=a.normal.replace(gp,"");i.length>3&&n.hasOwnProperty(i)&&(a.switch=n[i])}},IT=(e,t,r="")=>{const n=o=>"\x1B[33m\x1B[3m"+o+"\x1B[0m",a=o=>"\x1B[3m"+o+"\x1B[0m";let i=e.text||"["+e.implicit+"]";typeof t!="string"&&t.length>2&&(t=t.slice(0,2).join(", #")+" +"),t=typeof t!="string"?t.join(", #"):t,console.log(` ${n(i).padEnd(24)} \x1B[32m→\x1B[0m #${t.padEnd(22)} ${a(r)}`)},tr=function(e,t,r){if(!t||t.length===0||e.frozen===!0)return;const n=typeof process>"u"||!process.env?self.env||{}:process.env;n&&n.DEBUG_TAGS&&IT(e,t,r),e.tags=e.tags||new Set,typeof t=="string"?e.tags.add(t):t.forEach(a=>e.tags.add(a))},zT=["Acronym","Abbreviation","ProperNoun","Uncountable","Possessive","Pronoun","Activity","Honorific","Month"],jT=function(e){!e.tags.has("Noun")||e.tags.has("Plural")||e.tags.has("Singular")||zT.find(t=>e.tags.has(t))||(Fw(e.normal)?tr(e,"Plural","3-plural-guess"):tr(e,"Singular","3-singular-guess"))},qT=function(e){let t=e.tags;if(t.has("Verb")&&t.size===1){let r=Sw(e.normal);r&&tr(e,r,"3-verb-tense-guess")}},Xs=function(e,t,r){let n=e[t],a=Array.from(n.tags);for(let i=0;i<a.length;i+=1)if(r.one.tagSet[a[i]]){let o=r.one.tagSet[a[i]].parents;tr(n,o,` -inferred by #${a[i]}`)}jT(n),qT(n)},RT=new RegExp("^\\p{Lu}[\\p{Ll}'’]","u"),LT=/[0-9]/,HT=["Date","Month","WeekDay","Unit","Expression"],GT=/[IVX]/,VT=/^[IVXLCDM]{2,}$/,UT=/^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/,WT={li:!0,dc:!0,md:!0,dm:!0,ml:!0},JT=function(e,t,r){let n=e[t];n.index=n.index||[0,0];let a=n.index[1],i=n.text||"";return a!==0&&RT.test(i)===!0&&LT.test(i)===!1?HT.find(o=>n.tags.has(o))||n.pre.match(/["']$/)||n.normal==="the"?null:(Xs(e,t,r),!n.tags.has("Noun")&&!n.frozen&&n.tags.clear(),tr(n,"ProperNoun","2-titlecase"),!0):i.length>=2&&VT.test(i)&&GT.test(i)&&UT.test(i)&&!WT[n.normal]?(tr(n,"RomanNumeral","2-xvii"),!0):null},vp=function(e="",t=[]){const r=e.length;let n=7;r<=n&&(n=r-1);for(let a=n;a>1;a-=1){let i=e.substring(r-a,r);if(t[i.length].hasOwnProperty(i)===!0)return t[i.length][i]}return null},KT=function(e,t,r){let n=e[t];if(n.tags.size===0){let a=vp(n.normal,r.two.suffixPatterns);if(a!==null)return tr(n,a,"2-suffix"),n.confidence=.7,!0;if(n.implicit&&(a=vp(n.implicit,r.two.suffixPatterns),a!==null))return tr(n,a,"2-implicit-suffix"),n.confidence=.7,!0}return null},yp=/['‘’‛‵′`´]/,Xc=function(e,t){for(let r=0;r<t.length;r+=1)if(t[r][0].test(e)===!0)return t[r];return null},YT=function(e="",t){let r=e[e.length-1];if(t.hasOwnProperty(r)===!0){let n=t[r]||[];for(let a=0;a<n.length;a+=1)if(n[a][0].test(e)===!0)return n[a]}return null},ZT=function(e,t,r,n){const a=n.methods.one.setTag;let{regexText:i,regexNormal:o,regexNumbers:s,endsWith:u}=r.two,l=e[t],c=l.machine||l.normal,f=l.text;yp.test(l.post)&&!yp.test(l.pre)&&(f+=l.post.trim());let m=Xc(f,i)||Xc(c,o);return!m&&/[0-9]/.test(c)&&(m=Xc(c,s)),!m&&l.tags.size===0&&(m=YT(c,u)),m?(a([l],m[1],n,null,`2-regex-'${m[2]||m[0]}'`),l.confidence=.6,!0):null},QT=function(e="",t=[]){const r=e.length;let n=7;n>r-3&&(n=r-3);for(let a=n;a>2;a-=1){let i=e.substring(0,a);if(t[i.length].hasOwnProperty(i)===!0)return t[i.length][i]}return null},XT=function(e,t,r){let n=e[t];if(n.tags.size===0){let a=QT(n.normal,r.two.prefixPatterns);if(a!==null)return tr(n,a,"2-prefix"),n.confidence=.5,!0}return null},eF=1400,tF=2100,rF=new Set(["in","on","by","until","for","to","during","throughout","through","within","before","after","of","this","next","last","circa","around","post","pre","budget","classic","plan","may"]),bp=function(e){if(!e)return!1;let t=e.normal||e.implicit;return!!(rF.has(t)||e.tags.has("Date")||e.tags.has("Month")||e.tags.has("WeekDay")||e.tags.has("Year")||e.tags.has("ProperNoun"))},wp=function(e){return e?!!(e.tags.has("Ordinal")||e.tags.has("Cardinal")&&e.normal.length<3||e.normal==="is"||e.normal==="was"):!1},xp=function(e){return e&&(e.tags.has("Date")||e.tags.has("Month")||e.tags.has("WeekDay")||e.tags.has("Year"))},nF=function(e,t){const r=e[t];if(r.tags.has("NumericValue")&&r.tags.has("Cardinal")&&r.normal.length===4){let n=Number(r.normal);if(n&&!isNaN(n)&&n>eF&&n<tF){let a=e[t-1],i=e[t+1];if(bp(a)||bp(i))return tr(r,"Year","2-tagYear");if(n>=1920&&n<2025){if(wp(a)||wp(i))return tr(r,"Year","2-tagYear-close");if(xp(e[t-2])||xp(e[t+2]))return tr(r,"Year","2-tagYear-far");if(a&&(a.tags.has("Determiner")||a.tags.has("Possessive"))&&i&&i.tags.has("Noun")&&!i.tags.has("Plural"))return tr(r,"Year","2-tagYear-noun")}}}return null},aF=function(e,t,r,n){const a=n.methods.one.setTag,i=e[t],o=["PastTense","PresentTense","Auxiliary","Modal","Particle"];i.tags.has("Verb")&&(o.find(u=>i.tags.has(u))||a([i],"Infinitive",n,null,"2-verb-type''"))},kw=/^[A-Z]('s|,)?$/,Ow=/^[A-Z-]+$/,Bw=/^[A-Z]+s$/,iF=/([A-Z]\.)+[A-Z]?,?$/,oF=/[A-Z]{2,}('s|,)?$/,sF=/([a-z]\.)+[a-z]\.?$/,$w={I:!0,A:!0},uF={la:!0,ny:!0,us:!0,dc:!0,gb:!0},lF=function(e,t){let r=e.text;if(Ow.test(r)===!1)if(r.length>3&&Bw.test(r)===!0)r=r.replace(/s$/,"");else return!1;return r.length>5||$w.hasOwnProperty(r)||t.one.lexicon.hasOwnProperty(e.normal)?!1:iF.test(r)===!0||sF.test(r)===!0||kw.test(r)===!0||oF.test(r)===!0},cF=function(e,t,r){let n=e[t];return n.tags.has("RomanNumeral")||n.tags.has("Acronym")||n.frozen?null:lF(n,r)?(n.tags.clear(),tr(n,["Acronym","Noun"],"3-no-period-acronym"),uF[n.normal]===!0&&tr(n,"Place","3-place-acronym"),Bw.test(n.text)===!0&&tr(n,"Plural","3-plural-acronym"),!0):!$w.hasOwnProperty(n.text)&&kw.test(n.text)?(n.tags.clear(),tr(n,["Acronym","Noun"],"3-one-letter-acronym"),!0):n.tags.has("Organization")&&n.text.length<=3?(tr(n,"Acronym","3-org-acronym"),!0):n.tags.has("Organization")&&Ow.test(n.text)&&n.text.length<=6?(tr(n,"Acronym","3-titlecase-acronym"),!0):null},Dp=function(e,t){if(!e)return null;let r=t.find(n=>e.normal===n[0]);return r?r[1]:null},Np=function(e,t){if(!e)return null;let r=t.find(n=>e.tags.has(n[0]));return r?r[1]:null},fF=function(e,t,r){const{leftTags:n,leftWords:a,rightWords:i,rightTags:o}=r.two.neighbours;let s=e[t];if(s.tags.size===0){let u=null;if(u=u||Dp(e[t-1],a),u=u||Dp(e[t+1],i),u=u||Np(e[t-1],n),u=u||Np(e[t+1],o),u)return tr(s,u,"3-[neighbour]"),Xs(e,t,r),e[t].confidence=.2,!0}return null},mF=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e),Ap=function(e,t,r){return!e||e.tags.has("FirstName")||e.tags.has("Place")?!1:e.tags.has("ProperNoun")||e.tags.has("Organization")||e.tags.has("Acronym")?!0:!r&&mF(e.text)?t===0?e.tags.has("Singular"):!0:!1},dF=function(e,t,r,n){const a=r.model.two.orgWords,i=r.methods.one.setTag;let o=e[t],s=o.machine||o.normal;if(a[s]===!0&&Ap(e[t-1],t-1,n)){i([e[t]],"Organization",r,null,"3-[org-word]");for(let u=t;u>=0&&Ap(e[u],u,n);u-=1)i([e[u]],"Organization",r,null,"3-[org-word]")}return null},hF=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e),pF=/'s$/,Cp=new Set(["athletic","city","community","eastern","federal","financial","great","historic","historical","local","memorial","municipal","national","northern","provincial","southern","state","western","spring","pine","sunset","view","oak","maple","spruce","cedar","willow"]),gF=new Set(["center","centre","way","range","bar","bridge","field","pit"]),Ep=function(e,t,r){if(!e)return!1;let n=e.tags;return n.has("Organization")||n.has("Possessive")||pF.test(e.normal)?!1:n.has("ProperNoun")||n.has("Place")?!0:!r&&hF(e.text)?t===0?n.has("Singular"):!0:!1},vF=function(e,t,r,n){const a=r.model.two.placeWords,i=r.methods.one.setTag;let o=e[t],s=o.machine||o.normal;if(a[s]===!0){for(let u=t-1;u>=0;u-=1)if(!Cp.has(e[u].normal)){if(Ep(e[u],u,n)){i(e.slice(u,t+1),"Place",r,null,"3-[place-of-foo]");continue}break}if(gF.has(s))return!1;for(let u=t+1;u<e.length;u+=1){if(Ep(e[u],u,n))return i(e.slice(t,u+1),"Place",r,null,"3-[foo-place]"),!0;if(!(e[u].normal==="of"||Cp.has(e[u].normal)))break}}return null},yF=function(e,t,r){let n=!1,a=e[t].tags;(a.size===0||a.size===1&&(a.has("Hyphenated")||a.has("HashTag")||a.has("Prefix")||a.has("SlashedTerm")))&&(n=!0),n&&(tr(e[t],"Noun","3-[fallback]"),Xs(e,t,r),e[t].confidence=.1)},bF=/^[A-Z][a-z]/,qn=(e,t)=>e[t].tags.has("ProperNoun")&&bF.test(e[t].text)?"Noun":null,Sp=(e,t,r)=>t===0&&!e[1]?r:null,wF=function(e,t){return!e[t+1]&&e[t-1]&&e[t-1].tags.has("Determiner")?"Noun":null},xF=function(e,t,r){return t===0&&e.length>3?r:null},Mp={"Adj|Gerund":(e,t)=>qn(e,t),"Adj|Noun":(e,t)=>qn(e,t)||wF(e,t),"Actor|Verb":(e,t)=>qn(e,t),"Adj|Past":(e,t)=>qn(e,t),"Adj|Present":(e,t)=>qn(e,t),"Noun|Gerund":(e,t)=>qn(e,t),"Noun|Verb":(e,t)=>t>0&&qn(e,t)||Sp(e,t,"Infinitive"),"Plural|Verb":(e,t)=>qn(e,t)||Sp(e,t,"PresentTense")||xF(e,t,"Plural"),"Person|Noun":(e,t)=>qn(e,t),"Person|Verb":(e,t)=>t!==0?qn(e,t):null,"Person|Adj":(e,t)=>t===0&&e.length>1||qn(e,t)?"Person":null},dd=typeof process>"u"||!process.env?self.env||{}:process.env,Tp=/^(under|over|mis|re|un|dis|semi)-?/,Fp=(e,t)=>{if(!e||!t)return null;let r=e.normal||e.implicit,n=null;return t.hasOwnProperty(r)&&(n=t[r]),n&&dd.DEBUG_TAGS&&console.log(`
12
+ \x1B[2m\x1B[3m ↓ - '${r}' \x1B[0m`),n},Pp=(e,t={},r)=>{if(!e||!t)return null;let a=Array.from(e.tags).sort((i,o)=>{let s=r[i]?r[i].parents.length:0,u=r[o]?r[o].parents.length:0;return s>u?-1:1}).find(i=>t[i]);return a&&dd.DEBUG_TAGS&&console.log(` \x1B[2m\x1B[3m ↓ - '${e.normal||e.implicit}' (#${a}) \x1B[0m`),a=t[a],a},DF=function(e,t,r,n){if(!r)return null;const a=e[t-1]?.text!=="also"?t-1:Math.max(0,t-2),i=n.one.tagSet;let o=Fp(e[t+1],r.afterWords);return o=o||Fp(e[a],r.beforeWords),o=o||Pp(e[a],r.beforeTags,i),o=o||Pp(e[t+1],r.afterTags,i),o},NF=function(e,t,r){const n=r.model,a=r.methods.one.setTag,{switches:i,clues:o}=n.two,s=e[t];let u=s.normal||s.implicit||"";if(Tp.test(u)&&!i[u]&&(u=u.replace(Tp,"")),s.switch){let l=s.switch;if(s.tags.has("Acronym")||s.tags.has("PhrasalVerb"))return;let c=DF(e,t,o[l],n);Mp[l]&&(c=Mp[l](e,t)||c),c?(a([s],c,r,null,`3-[switch] (${l})`),Xs(e,t,n)):dd.DEBUG_TAGS&&console.log(`
13
+ -> X - '${u}' : (${l}) `)}},AF={there:!0,this:!0,it:!0,him:!0,her:!0,us:!0},CF=function(e,t){const r=t.methods.one.setTag,n=t.model.one._multiCache||{};let a=e[0];if((a.switch==="Noun|Verb"||a.tags.has("Infinitive"))&&e.length>=2){if(e.length<4&&!AF[e[1].normal]||!a.tags.has("PhrasalVerb")&&n.hasOwnProperty(a.normal))return;(e[1].tags.has("Noun")||e[1].tags.has("Determiner"))&&(!e.slice(1,3).some(u=>u.tags.has("Verb"))||a.tags.has("#PhrasalVerb"))&&r([a],"Imperative",t,null,"3-[imperative]")}},EF=function(e){if(e.filter(r=>!r.tags.has("ProperNoun")).length<=3)return!1;const t=/^[a-z]/;return e.every(r=>!t.test(r.text))},SF=function(e,t,r){e.forEach(n=>{BT(n,0,t,r)})},MF=function(e,t,r,n){for(let a=0;a<e.length;a+=1)e[a].frozen!==!0&&(_T(e,a,t),n===!1&&JT(e,a,t),KT(e,a,t),ZT(e,a,t,r),XT(e,a,t),nF(e,a))},TF=function(e,t,r,n){for(let a=0;a<e.length;a+=1){let i=cF(e,a,t);Xs(e,a,t),i=i||fF(e,a,t),i=i||yF(e,a,t)}for(let a=0;a<e.length;a+=1)e[a].frozen!==!0&&(dF(e,a,r,n),vF(e,a,r,n),NF(e,a,r),aF(e,a,t,r),$T(e,a,t,r));CF(e,r)},FF=function(e){const{methods:t,model:r,world:n}=e;let a=e.docs;SF(a,r,n);let i=t.two.quickSplit(a);for(let o=0;o<i.length;o+=1){let s=i[o];const u=EF(s);MF(s,r,n,u),TF(s,r,n,u)}return i},kp={Possessive:e=>{let t=e.machine||e.normal||e.text;return t=t.replace(/'s$/,""),t},Plural:(e,t)=>{let r=e.machine||e.normal||e.text;return t.methods.two.transform.noun.toSingular(r,t.model)},Copula:()=>"is",PastTense:(e,t)=>{let r=e.machine||e.normal||e.text;return t.methods.two.transform.verb.toInfinitive(r,t.model,"PastTense")},Gerund:(e,t)=>{let r=e.machine||e.normal||e.text;return t.methods.two.transform.verb.toInfinitive(r,t.model,"Gerund")},PresentTense:(e,t)=>{let r=e.machine||e.normal||e.text;return e.tags.has("Infinitive")?r:t.methods.two.transform.verb.toInfinitive(r,t.model,"PresentTense")},Comparative:(e,t)=>{let r=e.machine||e.normal||e.text;return t.methods.two.transform.adjective.fromComparative(r,t.model)},Superlative:(e,t)=>{let r=e.machine||e.normal||e.text;return t.methods.two.transform.adjective.fromSuperlative(r,t.model)},Adverb:(e,t)=>{const{fromAdverb:r}=t.methods.two.transform.adjective;let n=e.machine||e.normal||e.text;return r(n)}},PF=function(e){const t=e.world,r=Object.keys(kp);e.docs.forEach(n=>{for(let a=0;a<n.length;a+=1){const i=n[a];for(let o=0;o<r.length;o+=1)if(i.tags.has(r[o])){const s=kp[r[o]];let u=s(i,t);i.normal!==u&&(i.root=u);break}}})},Op={Adverb:"RB",Comparative:"JJR",Superlative:"JJS",Adjective:"JJ",TO:"Conjunction",Modal:"MD",Auxiliary:"MD",Gerund:"VBG",PastTense:"VBD",Participle:"VBN",PresentTense:"VBZ",Infinitive:"VB",Particle:"RP",Verb:"VB",Pronoun:"PRP",Cardinal:"CD",Conjunction:"CC",Determiner:"DT",Preposition:"IN",QuestionWord:"WP",Expression:"UH",Possessive:"POS",ProperNoun:"NNP",Person:"NNP",Place:"NNP",Organization:"NNP",Singular:"NN",Plural:"NNS",Noun:"NN",There:"EX"},kF=function(e){if(e.tags.has("ProperNoun")&&e.tags.has("Plural"))return"NNPS";if(e.tags.has("Possessive")&&e.tags.has("Pronoun"))return"PRP$";if(e.normal==="there")return"EX";if(e.normal==="to")return"TO";let t=e.tagRank||[];for(let r=0;r<t.length;r+=1)if(Op.hasOwnProperty(t[r]))return Op[t[r]];return null},OF=function(e){e.compute("tagRank"),e.docs.forEach(t=>{t.forEach(r=>{r.penn=kF(r)})})},BF={preTagger:FF,root:PF,penn:OF},ef=["Person","Place","Organization"],$F={Noun:{not:["Verb","Adjective","Adverb","Value","Determiner"]},Singular:{is:"Noun",not:["Plural","Uncountable"]},ProperNoun:{is:"Noun"},Person:{is:"Singular",also:["ProperNoun"],not:["Place","Organization","Date"]},FirstName:{is:"Person"},MaleName:{is:"FirstName",not:["FemaleName","LastName"]},FemaleName:{is:"FirstName",not:["MaleName","LastName"]},LastName:{is:"Person",not:["FirstName"]},Honorific:{is:"Person",not:["FirstName","LastName","Value"]},Place:{is:"Singular",not:["Person","Organization"]},Country:{is:"Place",also:["ProperNoun"],not:["City"]},City:{is:"Place",also:["ProperNoun"],not:["Country"]},Region:{is:"Place",also:["ProperNoun"]},Address:{},Organization:{is:"ProperNoun",not:["Person","Place"]},SportsTeam:{is:"Organization"},School:{is:"Organization"},Company:{is:"Organization"},Plural:{is:"Noun",not:["Singular","Uncountable"]},Uncountable:{is:"Noun"},Pronoun:{is:"Noun",not:ef},Actor:{is:"Noun",not:["Place","Organization"]},Activity:{is:"Noun",not:["Person","Place"]},Unit:{is:"Noun",not:ef},Demonym:{is:"Noun",also:["ProperNoun"],not:ef},Possessive:{is:"Noun"},Reflexive:{is:"Pronoun"}},_F={Verb:{not:["Noun","Adjective","Adverb","Value","Expression"]},PresentTense:{is:"Verb",not:["PastTense","FutureTense"]},Infinitive:{is:"PresentTense",not:["Gerund"]},Imperative:{is:"Verb",not:["PastTense","Gerund","Copula"]},Gerund:{is:"PresentTense",not:["Copula"]},PastTense:{is:"Verb",not:["PresentTense","Gerund","FutureTense"]},FutureTense:{is:"Verb",not:["PresentTense","PastTense"]},Copula:{is:"Verb"},Modal:{is:"Verb",not:["Infinitive"]},Participle:{is:"PastTense"},Auxiliary:{is:"Verb",not:["PastTense","PresentTense","Gerund","Conjunction"]},PhrasalVerb:{is:"Verb"},Particle:{is:"PhrasalVerb",not:["PastTense","PresentTense","Copula","Gerund"]},Passive:{is:"Verb"}},IF={Value:{not:["Verb","Adjective","Adverb"]},Ordinal:{is:"Value",not:["Cardinal"]},Cardinal:{is:"Value",not:["Ordinal"]},Fraction:{is:"Value",not:["Noun"]},Multiple:{is:"TextValue"},RomanNumeral:{is:"Cardinal",not:["TextValue"]},TextValue:{is:"Value",not:["NumericValue"]},NumericValue:{is:"Value",not:["TextValue"]},Money:{is:"Cardinal"},Percent:{is:"Value"}},zF={Date:{not:["Verb","Adverb","Adjective"]},Month:{is:"Date",also:["Noun"],not:["Year","WeekDay","Time"]},WeekDay:{is:"Date",also:["Noun"]},Year:{is:"Date",not:["RomanNumeral"]},FinancialQuarter:{is:"Date",not:"Fraction"},Holiday:{is:"Date",also:["Noun"]},Season:{is:"Date"},Timezone:{is:"Date",also:["Noun"],not:["ProperNoun"]},Time:{is:"Date",not:["AtMention"]},Duration:{is:"Date",also:["Noun"]}},jF=["Noun","Verb","Adjective","Adverb","Value","QuestionWord"],qF={Adjective:{not:["Noun","Verb","Adverb","Value"]},Comparable:{is:"Adjective"},Comparative:{is:"Adjective"},Superlative:{is:"Adjective",not:["Comparative"]},NumberRange:{},Adverb:{not:["Noun","Verb","Adjective","Value"]},Determiner:{not:["Noun","Verb","Adjective","Adverb","QuestionWord","Conjunction"]},Conjunction:{not:jF},Preposition:{not:["Noun","Verb","Adjective","Adverb","QuestionWord","Determiner"]},QuestionWord:{not:["Determiner"]},Currency:{is:"Noun"},Expression:{not:["Noun","Adjective","Verb","Adverb"]},Abbreviation:{},Url:{not:["HashTag","PhoneNumber","Verb","Adjective","Value","AtMention","Email","SlashedTerm"]},PhoneNumber:{not:["HashTag","Verb","Adjective","Value","AtMention","Email"]},HashTag:{},AtMention:{is:"Noun",not:["HashTag","Email"]},Emoji:{not:["HashTag","Verb","Adjective","Value","AtMention"]},Emoticon:{not:["HashTag","Verb","Adjective","Value","AtMention","SlashedTerm"]},SlashedTerm:{not:["Emoticon","Url","Value"]},Email:{not:["HashTag","Verb","Adjective","Value","AtMention"]},Acronym:{not:["Plural","RomanNumeral","Pronoun","Date"]},Negative:{not:["Noun","Adjective","Value","Expression"]},Condition:{not:["Verb","Adjective","Noun","Value"]},There:{not:["Verb","Adjective","Noun","Value","Conjunction","Preposition"]},Prefix:{not:["Abbreviation","Acronym","ProperNoun"]},Hyphenated:{}};let RF=Object.assign({},$F,_F,IF,zF,qF);const LF={compute:BF,methods:om,model:um,tags:RF,hooks:["preTagger"]},HF=/[,)"';:\-–—.…]/,ba=function(e,t){if(!e.found)return;let r=e.termList();for(let n=0;n<r.length-1;n++){const a=r[n];if(HF.test(a.post))return}r[0].implicit=r[0].normal,r[0].text+=t,r[0].normal+=t,r.slice(1).forEach(n=>{n.implicit=n.normal,n.text="",n.normal=""});for(let n=0;n<r.length-1;n++)r[n].post=r[n].post.replace(/ /,"")},GF=function(){let e=this.not("@hasContraction"),t=e.match("(we|they|you) are");return ba(t,"'re"),t=e.match("(he|she|they|it|we|you) will"),ba(t,"'ll"),t=e.match("(he|she|they|it|we) is"),ba(t,"'s"),t=e.match("#Person is"),ba(t,"'s"),t=e.match("#Person would"),ba(t,"'d"),t=e.match("(is|was|had|would|should|could|do|does|have|has|can) not"),ba(t,"n't"),t=e.match("(i|we|they) have"),ba(t,"'ve"),t=e.match("(would|should|could) have"),ba(t,"'ve"),t=e.match("i am"),ba(t,"'m"),t=e.match("going to"),this},VF=new RegExp("^\\p{Lu}[\\p{Ll}'’]","u"),UF=function(e=""){return e=e.replace(/^ *[a-z\u00C0-\u00FF]/,t=>t.toUpperCase()),e},WF=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Contraction"}expand(){return this.docs.forEach(n=>{let a=VF.test(n[0].text);n.forEach((i,o)=>{i.text=i.implicit||"",delete i.implicit,o<n.length-1&&i.post===""&&(i.post+=" "),i.dirty=!0}),a&&(n[0].text=UF(n[0].text))}),this.compute("normal"),this}}e.prototype.contractions=function(){let r=this.match("@hasContraction+");return new t(this.document,r.pointer)},e.prototype.contract=GF},JF=function(e,t,r){let[n,a]=t;!r||r.length===0||(r=r.map((i,o)=>(i.implicit=i.text,i.machine=i.text,i.pre="",i.post="",i.text="",i.normal="",i.index=[n,a+o],i)),r[0]&&(r[0].pre=e[n][a].pre,r[r.length-1].post=e[n][a].post,r[0].text=e[n][a].text,r[0].normal=e[n][a].normal),e[n].splice(a,1,...r))},KF=/'/,YF=new Set(["been","become"]),ZF=new Set(["what","how","when","if","too"]);let QF=new Set(["too","also","enough"]);const XF=(e,t)=>{for(let r=t+1;r<e.length;r+=1){let n=e[r];if(YF.has(n.normal))return"has";if(ZF.has(n.normal)||n.tags.has("Gerund")||n.tags.has("Determiner")||n.tags.has("Adjective")||n.switch==="Adj|Past"&&e[r+1]&&(QF.has(e[r+1].normal)||e[r+1].tags.has("Preposition")))return"is";if(n.tags.has("PastTense"))return e[r+1]&&e[r+1].normal==="for"?"is":"has"}return"is"},e5=function(e,t){let r=e[t].normal.split(KF)[0];if(r==="let")return[r,"us"];if(r==="there"){let n=e[t+1];if(n&&n.tags.has("Plural"))return[r,"are"]}return XF(e,t)==="has"?[r,"has"]:[r,"is"]},t5=/'/,r5=new Set(["better","done","before","it","had"]),n5=new Set(["have","be"]),a5=(e,t)=>{for(let r=t+1;r<e.length;r+=1){let n=e[r];if(r5.has(n.normal))return"had";if(n5.has(n.normal))return"would";if(n.tags.has("PastTense")||n.switch==="Adj|Past")return"had";if(n.tags.has("PresentTense")||n.tags.has("Infinitive"))return"would";if(n.tags.has("#Determiner"))return"had";if(n.tags.has("Adjective"))return"would"}return!1},i5=function(e,t){let r=e[t].normal.split(t5)[0];return r==="how"||r==="what"?[r,"did"]:a5(e,t)==="had"?[r,"had"]:[r,"would"]},o5=function(e,t){for(let r=t-1;r>=0;r-=1)if(e[r].tags.has("Noun")||e[r].tags.has("Pronoun")||e[r].tags.has("Plural")||e[r].tags.has("Singular"))return e[r];return null},s5=function(e,t){if(e[t].normal==="ain't"||e[t].normal==="aint"){if(e[t+1]&&e[t+1].normal==="never")return["have"];let n=o5(e,t);if(n){if(n.normal==="we"||n.normal==="they")return["are","not"];if(n.normal==="i")return["am","not"];if(n.tags&&n.tags.has("Plural"))return["are","not"]}return["is","not"]}return[e[t].normal.replace(/n't/,""),"not"]},u5={that:!0,there:!0,let:!0,here:!0,everywhere:!0},l5={in:!0,by:!0,for:!0};let c5=new Set(["too","also","enough","about"]),f5=new Set(["is","are","did","were","could","should","must","had","have"]);const m5=(e,t)=>{let r=e[t];if(u5.hasOwnProperty(r.machine||r.normal))return!1;if(r.tags.has("Possessive"))return!0;if(r.tags.has("QuestionWord")||r.normal==="he's"||r.normal==="she's")return!1;let n=e[t+1];if(!n)return!0;if(r.normal==="it's")return!!n.tags.has("#Noun");if(n.switch=="Noun|Gerund"){let a=e[t+2];return a?a.tags.has("Copula")?!0:(a.normal==="on"||a.normal==="in",!1):!!(r.tags.has("Actor")||r.tags.has("ProperNoun"))}if(n.tags.has("Verb"))return n.tags.has("Infinitive")?!0:n.tags.has("Gerund")?!1:!!n.tags.has("PresentTense");if(n.switch==="Adj|Noun"){let a=e[t+2];if(!a)return!1;if(f5.has(a.normal))return!0;if(c5.has(a.normal))return!1}if(n.tags.has("Noun")){let a=n.machine||n.normal;return!(a==="here"||a==="there"||a==="everywhere"||n.tags.has("Possessive")||n.tags.has("ProperNoun")&&!r.tags.has("ProperNoun"))}if(e[t-1]&&l5[e[t-1].normal]===!0)return!0;if(n.tags.has("Adjective")){let a=e[t+2];if(!a)return!1;if(a.tags.has("Noun")&&!a.tags.has("Pronoun")){let i=n.normal;return!(i==="above"||i==="below"||i==="behind")}return a.switch==="Noun|Verb"}return!!n.tags.has("Value")},Bp=/'/,d5=function(e){e.forEach((t,r)=>{t.index&&(t.index[1]=r)})},h5=function(e,t,r,n){let a=t.update();a.document=[e];let i=r+n;r>0&&(r-=1),e[i]&&(i+=1),a.ptrs=[[0,r,i]],a.compute(["freeze","lexicon","preTagger","unfreeze"]),d5(e)},$p={d:(e,t)=>i5(e,t),t:(e,t)=>s5(e,t),s:(e,t,r)=>m5(e,t)?r.methods.one.setTag([e[t]],"Possessive",r,null,"2-contraction"):e5(e,t)},p5=function(e,t){let r=t.fromText(e.join(" "));return r.compute("id"),r.docs[0]},g5=e=>{let{world:t,document:r}=e;r.forEach((n,a)=>{for(let i=n.length-1;i>=0;i-=1){if(n[i].implicit)continue;let o=null;Bp.test(n[i].normal)===!0&&(o=n[i].normal.split(Bp)[1]);let s=null;if($p.hasOwnProperty(o)&&(s=$p[o](n,i,t)),s){s=p5(s,e),JF(r,[a,i],s),h5(r[a],e,i,s.length);continue}}})},v5={contractionTwo:g5},y5={compute:v5,api:WF,hooks:["contractionTwo"]},b5=[{match:"[(all|both)] #Determiner #Noun",group:0,tag:"Noun",reason:"all-noun"},{match:"#Copula [(just|alone)]$",group:0,tag:"Adjective",reason:"not-adverb"},{match:"#Singular is #Adverb? [#PastTense$]",group:0,tag:"Adjective",reason:"is-filled"},{match:"[#PastTense] #Singular is",group:0,tag:"Adjective",reason:"smoked-poutine"},{match:"[#PastTense] #Plural are",group:0,tag:"Adjective",reason:"baked-onions"},{match:"well [#PastTense]",group:0,tag:"Adjective",reason:"well-made"},{match:"#Copula [fucked up?]",group:0,tag:"Adjective",reason:"swears-adjective"},{match:"#Singular (seems|appears) #Adverb? [#PastTense$]",group:0,tag:"Adjective",reason:"seems-filled"},{match:"#Copula #Adjective? [(out|in|through)]$",group:0,tag:"Adjective",reason:"still-out"},{match:"^[#Adjective] (the|your) #Noun",group:0,notIf:"(all|even)",tag:"Infinitive",reason:"shut-the"},{match:"the [said] #Noun",group:0,tag:"Adjective",reason:"the-said-card"},{match:"[#Hyphenated (#Hyphenated && #PastTense)] (#Noun|#Conjunction)",group:0,tag:"Adjective",notIf:"#Adverb",reason:"faith-based"},{match:"[#Hyphenated (#Hyphenated && #Gerund)] (#Noun|#Conjunction)",group:0,tag:"Adjective",notIf:"#Adverb",reason:"self-driving"},{match:"[#PastTense (#Hyphenated && #PhrasalVerb)] (#Noun|#Conjunction)",group:0,tag:"Adjective",reason:"dammed-up"},{match:"(#Hyphenated && #Value) fold",tag:"Adjective",reason:"two-fold"},{match:"must (#Hyphenated && #Infinitive)",tag:"Adjective",reason:"must-win"},{match:"(#Hyphenated && #Infinitive) #Hyphenated",tag:"Adjective",notIf:"#PhrasalVerb",reason:"vacuum-sealed"},{match:"too much",tag:"Adverb Adjective",reason:"bit-4"},{match:"a bit much",tag:"Determiner Adverb Adjective",reason:"bit-3"},{match:"[(un|contra|extra|inter|intra|macro|micro|mid|mis|mono|multi|pre|sub|tri|ex)] #Adjective",group:0,tag:["Adjective","Prefix"],reason:"un-skilled"}],w5="(dark|bright|flat|light|soft|pale|dead|dim|faux|little|wee|sheer|most|near|good|extra|all)",_p="(hard|fast|late|early|high|right|deep|close|direct)",x5=[{match:"#Adverb [#Adverb] (and|or|then)",group:0,tag:"Adjective",reason:"kinda-sparkly-and"},{match:`[${w5}] #Adjective`,group:0,tag:"Adverb",reason:"dark-green"},{match:"#Copula [far too] #Adjective",group:0,tag:"Adverb",reason:"far-too"},{match:"#Copula [still] (in|#Gerund|#Adjective)",group:0,tag:"Adverb",reason:"was-still-walking"},{match:`#Plural ${_p}`,tag:"#PresentTense #Adverb",reason:"studies-hard"},{match:`#Verb [${_p}] !#Noun?`,group:0,notIf:"(#Copula|get|got|getting|become|became|becoming|feel|feels|feeling|#Determiner|#Preposition)",tag:"Adverb",reason:"shops-direct"},{match:"[#Plural] a lot",tag:"PresentTense",reason:"studies-a-lot"}],D5=[{match:"as [#Gerund] as",group:0,tag:"Adjective",reason:"as-gerund-as"},{match:"more [#Gerund] than",group:0,tag:"Adjective",reason:"more-gerund-than"},{match:"(so|very|extremely) [#Gerund]",group:0,tag:"Adjective",reason:"so-gerund"},{match:"(found|found) it #Adverb? [#Gerund]",group:0,tag:"Adjective",reason:"found-it-gerund"},{match:"a (little|bit|wee) bit? [#Gerund]",group:0,tag:"Adjective",reason:"a-bit-gerund"},{match:"#Gerund [#Gerund]",group:0,tag:"Adjective",notIf:"(impersonating|practicing|considering|assuming)",reason:"looking-annoying"},{match:"(looked|look|looks) #Adverb? [%Adj|Gerund%]",group:0,tag:"Adjective",notIf:"(impersonating|practicing|considering|assuming)",reason:"looked-amazing"},{match:"[%Adj|Gerund%] #Determiner",group:0,tag:"Gerund",reason:"developing-a"},{match:"#Possessive [%Adj|Gerund%] #Noun",group:0,tag:"Adjective",reason:"leading-manufacturer"},{match:"%Noun|Gerund% %Adj|Gerund%",tag:"Gerund #Adjective",reason:"meaning-alluring"},{match:"(face|embrace|reveal|stop|start|resume) %Adj|Gerund%",tag:"#PresentTense #Adjective",reason:"face-shocking"},{match:"(are|were) [%Adj|Gerund%] #Plural",group:0,tag:"Adjective",reason:"are-enduring-symbols"}],N5=[{match:"#Determiner [#Adjective] #Copula",group:0,tag:"Noun",reason:"the-adj-is"},{match:"#Adjective [#Adjective] #Copula",group:0,tag:"Noun",reason:"adj-adj-is"},{match:"(his|its) [%Adj|Noun%]",group:0,tag:"Noun",notIf:"#Hyphenated",reason:"his-fine"},{match:"#Copula #Adverb? [all]",group:0,tag:"Noun",reason:"is-all"},{match:"(have|had) [#Adjective] #Preposition .",group:0,tag:"Noun",reason:"have-fun"},{match:"#Gerund (giant|capital|center|zone|application)",tag:"Noun",reason:"brewing-giant"},{match:"#Preposition (a|an) [#Adjective]$",group:0,tag:"Noun",reason:"an-instant"},{match:"no [#Adjective] #Modal",group:0,tag:"Noun",reason:"no-golden"},{match:"[brand #Gerund?] new",group:0,tag:"Adverb",reason:"brand-new"},{match:"(#Determiner|#Comparative|new|different) [kind]",group:0,tag:"Noun",reason:"some-kind"},{match:"#Possessive [%Adj|Noun%] #Noun",group:0,tag:"Adjective",reason:"her-favourite"},{match:"must && #Hyphenated .",tag:"Adjective",reason:"must-win"},{match:"#Determiner [#Adjective]$",tag:"Noun",notIf:"(this|that|#Comparative|#Superlative)",reason:"the-south"},{match:"(#Noun && #Hyphenated) (#Adjective && #Hyphenated)",tag:"Adjective",notIf:"(this|that|#Comparative|#Superlative)",reason:"company-wide"},{match:"#Determiner [#Adjective] (#Copula|#Determiner)",notIf:"(#Comparative|#Superlative)",group:0,tag:"Noun",reason:"the-poor"},{match:"[%Adj|Noun%] #Noun",notIf:"(#Pronoun|#ProperNoun)",group:0,tag:"Adjective",reason:"stable-foundations"}],A5=[{match:"(slowly|quickly) [#Adjective]",group:0,tag:"Verb",reason:"slowly-adj"},{match:"does (#Adverb|not)? [#Adjective]",group:0,tag:"PresentTense",reason:"does-mean"},{match:"[(fine|okay|cool|ok)] by me",group:0,tag:"Adjective",reason:"okay-by-me"},{match:"i (#Adverb|do)? not? [mean]",group:0,tag:"PresentTense",reason:"i-mean"},{match:"will #Adjective",tag:"Auxiliary Infinitive",reason:"will-adj"},{match:"#Pronoun [#Adjective] #Determiner #Adjective? #Noun",group:0,tag:"Verb",reason:"he-adj-the"},{match:"#Copula [%Adj|Present%] to #Verb",group:0,tag:"Verb",reason:"adj-to"},{match:"#Copula [#Adjective] (well|badly|quickly|slowly)",group:0,tag:"Verb",reason:"done-well"},{match:"#Adjective and [#Gerund] !#Preposition?",group:0,tag:"Adjective",reason:"rude-and-x"},{match:"#Copula #Adverb? (over|under) [#PastTense]",group:0,tag:"Adjective",reason:"over-cooked"},{match:"#Copula #Adjective+ (and|or) [#PastTense]$",group:0,tag:"Adjective",reason:"bland-and-overcooked"},{match:"got #Adverb? [#PastTense] of",group:0,tag:"Adjective",reason:"got-tired-of"},{match:"(seem|seems|seemed|appear|appeared|appears|feel|feels|felt|sound|sounds|sounded) (#Adverb|#Adjective)? [#PastTense]",group:0,tag:"Adjective",reason:"felt-loved"},{match:"(seem|feel|seemed|felt) [#PastTense #Particle?]",group:0,tag:"Adjective",reason:"seem-confused"},{match:"a (bit|little|tad) [#PastTense #Particle?]",group:0,tag:"Adjective",reason:"a-bit-confused"},{match:"not be [%Adj|Past% #Particle?]",group:0,tag:"Adjective",reason:"do-not-be-confused"},{match:"#Copula just [%Adj|Past% #Particle?]",group:0,tag:"Adjective",reason:"is-just-right"},{match:"as [#Infinitive] as",group:0,tag:"Adjective",reason:"as-pale-as"},{match:"[%Adj|Past%] and #Adjective",group:0,tag:"Adjective",reason:"faled-and-oppressive"},{match:"or [#PastTense] #Noun",group:0,tag:"Adjective",notIf:"(#Copula|#Pronoun)",reason:"or-heightened-emotion"},{match:"(become|became|becoming|becomes) [#Verb]",group:0,tag:"Adjective",reason:"become-verb"},{match:"#Possessive [#PastTense] #Noun",group:0,tag:"Adjective",reason:"declared-intentions"},{match:"#Copula #Pronoun [%Adj|Present%]",group:0,tag:"Adjective",reason:"is-he-cool"},{match:"#Copula [%Adj|Past%] with",group:0,tag:"Adjective",notIf:"(associated|worn|baked|aged|armed|bound|fried|loaded|mixed|packed|pumped|filled|sealed)",reason:"is-crowded-with"},{match:"#Copula #Adverb? [%Adj|Present%]$",group:0,tag:"Adjective",reason:"was-empty$"}],C5=[{match:"[still] #Adjective",group:0,tag:"Adverb",reason:"still-advb"},{match:"[still] #Verb",group:0,tag:"Adverb",reason:"still-verb"},{match:"[so] #Adjective",group:0,tag:"Adverb",reason:"so-adv"},{match:"[way] #Comparative",group:0,tag:"Adverb",reason:"way-adj"},{match:"[way] #Adverb #Adjective",group:0,tag:"Adverb",reason:"way-too-adj"},{match:"[all] #Verb",group:0,tag:"Adverb",reason:"all-verb"},{match:"#Verb [like]",group:0,notIf:"(#Modal|#PhrasalVerb)",tag:"Adverb",reason:"verb-like"},{match:"(barely|hardly) even",tag:"Adverb",reason:"barely-even"},{match:"[even] #Verb",group:0,tag:"Adverb",reason:"even-walk"},{match:"[even] #Comparative",group:0,tag:"Adverb",reason:"even-worse"},{match:"[even] (#Determiner|#Possessive)",group:0,tag:"#Adverb",reason:"even-the"},{match:"even left",tag:"#Adverb #Verb",reason:"even-left"},{match:"[way] #Adjective",group:0,tag:"#Adverb",reason:"way-over"},{match:"#PresentTense [(hard|quick|bright|slow|fast|backwards|forwards)]",notIf:"#Copula",group:0,tag:"Adverb",reason:"lazy-ly"},{match:"[much] #Adjective",group:0,tag:"Adverb",reason:"bit-1"},{match:"#Copula [#Adverb]$",group:0,tag:"Adjective",reason:"is-well"},{match:"a [(little|bit|wee) bit?] #Adjective",group:0,tag:"Adverb",reason:"a-bit-cold"},{match:"[(super|pretty)] #Adjective",group:0,tag:"Adverb",reason:"super-strong"},{match:"(become|fall|grow) #Adverb? [#PastTense]",group:0,tag:"Adjective",reason:"overly-weakened"},{match:"(a|an) #Adverb [#Participle] #Noun",group:0,tag:"Adjective",reason:"completely-beaten"},{match:"#Determiner #Adverb? [close]",group:0,tag:"Adjective",reason:"a-close"},{match:"#Gerund #Adverb? [close]",group:0,tag:"Adverb",notIf:"(getting|becoming|feeling)",reason:"being-close"},{match:"(the|those|these|a|an) [#Participle] #Noun",group:0,tag:"Adjective",reason:"blown-motor"},{match:"(#PresentTense|#PastTense) [back]",group:0,tag:"Adverb",notIf:"(#PhrasalVerb|#Copula)",reason:"charge-back"},{match:"#Verb [around]",group:0,tag:"Adverb",notIf:"#PhrasalVerb",reason:"send-around"},{match:"[later] #PresentTense",group:0,tag:"Adverb",reason:"later-say"},{match:"#Determiner [well] !#PastTense?",group:0,tag:"Noun",reason:"the-well"},{match:"#Adjective [enough]",group:0,tag:"Adverb",reason:"high-enough"}],E5=[{match:"#Holiday (day|eve)",tag:"Holiday",reason:"holiday-day"},{match:"#Value of #Month",tag:"Date",reason:"value-of-month"},{match:"#Cardinal #Month",tag:"Date",reason:"cardinal-month"},{match:"#Month #Value to #Value",tag:"Date",reason:"value-to-value"},{match:"#Month the #Value",tag:"Date",reason:"month-the-value"},{match:"(#WeekDay|#Month) #Value",tag:"Date",reason:"date-value"},{match:"#Value (#WeekDay|#Month)",tag:"Date",reason:"value-date"},{match:"(#TextValue && #Date) #TextValue",tag:"Date",reason:"textvalue-date"},{match:"#Month #NumberRange",tag:"Date",reason:"aug 20-21"},{match:"#WeekDay #Month #Ordinal",tag:"Date",reason:"week mm-dd"},{match:"#Month #Ordinal #Cardinal",tag:"Date",reason:"mm-dd-yyy"},{match:"(#Place|#Demonmym|#Time) (standard|daylight|central|mountain)? time",tag:"Timezone",reason:"std-time"},{match:"(eastern|mountain|pacific|central|atlantic) (standard|daylight|summer)? time",tag:"Timezone",reason:"eastern-time"},{match:"#Time [(eastern|mountain|pacific|central|est|pst|gmt)]",group:0,tag:"Timezone",reason:"5pm-central"},{match:"(central|western|eastern) european time",tag:"Timezone",reason:"cet"}],S5=[{match:"[sun] the #Ordinal",tag:"WeekDay",reason:"sun-the-5th"},{match:"[sun] #Date",group:0,tag:"WeekDay",reason:"sun-feb"},{match:"#Date (on|this|next|last|during)? [sun]",group:0,tag:"WeekDay",reason:"1pm-sun"},{match:"(in|by|before|during|on|until|after|of|within|all) [sat]",group:0,tag:"WeekDay",reason:"sat"},{match:"(in|by|before|during|on|until|after|of|within|all) [wed]",group:0,tag:"WeekDay",reason:"wed"},{match:"(in|by|before|during|on|until|after|of|within|all) [march]",group:0,tag:"Month",reason:"march"},{match:"[sat] #Date",group:0,tag:"WeekDay",reason:"sat-feb"},{match:"#Preposition [(march|may)]",group:0,tag:"Month",reason:"in-month"},{match:"(this|next|last) (march|may) !#Infinitive?",tag:"#Date #Month",reason:"this-month"},{match:"(march|may) the? #Value",tag:"#Month #Date #Date",reason:"march-5th"},{match:"#Value of? (march|may)",tag:"#Date #Date #Month",reason:"5th-of-march"},{match:"[(march|may)] .? #Date",group:0,tag:"Month",reason:"march-and-feb"},{match:"#Date .? [(march|may)]",group:0,tag:"Month",reason:"feb-and-march"},{match:"#Adverb [(march|may)]",group:0,tag:"Verb",reason:"quickly-march"},{match:"[(march|may)] #Adverb",group:0,tag:"Verb",reason:"march-quickly"},{match:"#Value (am|pm)",tag:"Time",reason:"2-am"}],M5="(feel|sense|process|rush|side|bomb|bully|challenge|cover|crush|dump|exchange|flow|function|issue|lecture|limit|march|process)",T5=[{match:"(the|any) [more]",group:0,tag:"Singular",reason:"more-noun"},{match:"[more] #Noun",group:0,tag:"Adjective",reason:"more-noun"},{match:"(right|rights) of .",tag:"Noun",reason:"right-of"},{match:"a [bit]",group:0,tag:"Singular",reason:"bit-2"},{match:"a [must]",group:0,tag:"Singular",reason:"must-2"},{match:"(we|us) [all]",group:0,tag:"Noun",reason:"we all"},{match:"due to [#Verb]",group:0,tag:"Noun",reason:"due-to"},{match:"some [#Verb] #Plural",group:0,tag:"Noun",reason:"determiner6"},{match:"#Possessive #Ordinal [#PastTense]",group:0,tag:"Noun",reason:"first-thought"},{match:"(the|this|those|these) #Adjective [%Verb|Noun%]",group:0,tag:"Noun",notIf:"#Copula",reason:"the-adj-verb"},{match:"(the|this|those|these) #Adverb #Adjective [#Verb]",group:0,tag:"Noun",reason:"determiner4"},{match:"the [#Verb] #Preposition .",group:0,tag:"Noun",reason:"determiner1"},{match:"(a|an|the) [#Verb] of",group:0,tag:"Noun",reason:"the-verb-of"},{match:"#Determiner #Noun of [#Verb]",group:0,tag:"Noun",notIf:"#Gerund",reason:"noun-of-noun"},{match:"#PastTense #Preposition [#PresentTense]",group:0,notIf:"#Gerund",tag:"Noun",reason:"ended-in-ruins"},{match:"#Conjunction [u]",group:0,tag:"Pronoun",reason:"u-pronoun-2"},{match:"[u] #Verb",group:0,tag:"Pronoun",reason:"u-pronoun-1"},{match:"#Determiner [(western|eastern|northern|southern|central)] #Noun",group:0,tag:"Noun",reason:"western-line"},{match:"(#Singular && @hasHyphen) #PresentTense",tag:"Noun",reason:"hyphen-verb"},{match:"is no [#Verb]",group:0,tag:"Noun",reason:"is-no-verb"},{match:"do [so]",group:0,tag:"Noun",reason:"so-noun"},{match:"#Determiner [(shit|damn|hell)]",group:0,tag:"Noun",reason:"swears-noun"},{match:"to [(shit|hell)]",group:0,tag:"Noun",reason:"to-swears"},{match:"(the|these) [#Singular] (were|are)",group:0,tag:"Plural",reason:"singular-were"},{match:"a #Noun+ or #Adverb+? [#Verb]",group:0,tag:"Noun",reason:"noun-or-noun"},{match:"(the|those|these|a|an) #Adjective? [#PresentTense #Particle?]",group:0,tag:"Noun",notIf:"(seem|appear|include|#Gerund|#Copula)",reason:"det-inf"},{match:"#Noun #Actor",tag:"Actor",notIf:"(#Person|#Pronoun)",reason:"thing-doer"},{match:"#Gerund #Actor",tag:"Actor",reason:"gerund-doer"},{match:"co #Singular",tag:"Actor",reason:"co-noun"},{match:"[#Noun+] #Actor",group:0,tag:"Actor",notIf:"(#Honorific|#Pronoun|#Possessive)",reason:"air-traffic-controller"},{match:"(urban|cardiac|cardiovascular|respiratory|medical|clinical|visual|graphic|creative|dental|exotic|fine|certified|registered|technical|virtual|professional|amateur|junior|senior|special|pharmaceutical|theoretical)+ #Noun? #Actor",tag:"Actor",reason:"fine-artist"},{match:"#Noun+ (coach|chef|king|engineer|fellow|personality|boy|girl|man|woman|master)",tag:"Actor",reason:"dance-coach"},{match:"chief . officer",tag:"Actor",reason:"chief-x-officer"},{match:"chief of #Noun+",tag:"Actor",reason:"chief-of-police"},{match:"senior? vice? president of #Noun+",tag:"Actor",reason:"president-of"},{match:"#Determiner [sun]",group:0,tag:"Singular",reason:"the-sun"},{match:"#Verb (a|an) [#Value]$",group:0,tag:"Singular",reason:"did-a-value"},{match:"the [(can|will|may)]",group:0,tag:"Singular",reason:"the can"},{match:"#FirstName #Acronym? (#Possessive && #LastName)",tag:"Possessive",reason:"name-poss"},{match:"#Organization+ #Possessive",tag:"Possessive",reason:"org-possessive"},{match:"#Place+ #Possessive",tag:"Possessive",reason:"place-possessive"},{match:"#Possessive #PresentTense #Particle?",notIf:"(#Gerund|her)",tag:"Noun",reason:"possessive-verb"},{match:"(my|our|their|her|his|its) [(#Plural && #Actor)] #Noun",tag:"Possessive",reason:"my-dads"},{match:"#Value of a [second]",group:0,unTag:"Value",tag:"Singular",reason:"10th-of-a-second"},{match:"#Value [seconds]",group:0,unTag:"Value",tag:"Plural",reason:"10-seconds"},{match:"in [#Infinitive]",group:0,tag:"Singular",reason:"in-age"},{match:"a [#Adjective] #Preposition",group:0,tag:"Noun",reason:"a-minor-in"},{match:"#Determiner [#Singular] said",group:0,tag:"Actor",reason:"the-actor-said"},{match:`#Determiner #Noun [${M5}] !(#Preposition|to|#Adverb)?`,group:0,tag:"Noun",reason:"the-noun-sense"},{match:"[#PresentTense] (of|by|for) (a|an|the) #Noun #Copula",group:0,tag:"Plural",reason:"photographs-of"},{match:"#Infinitive and [%Noun|Verb%]",group:0,tag:"Infinitive",reason:"fight and win"},{match:"#Noun and [#Verb] and #Noun",group:0,tag:"Noun",reason:"peace-and-flowers"},{match:"the #Cardinal [%Adj|Noun%]",group:0,tag:"Noun",reason:"the-1992-classic"},{match:"#Copula the [%Adj|Noun%] #Noun",group:0,tag:"Adjective",reason:"the-premier-university"},{match:"i #Verb [me] #Noun",group:0,tag:"Possessive",reason:"scottish-me"},{match:"[#PresentTense] (music|class|lesson|night|party|festival|league|ceremony)",group:0,tag:"Noun",reason:"dance-music"},{match:"[wit] (me|it)",group:0,tag:"Presposition",reason:"wit-me"},{match:"#PastTense #Possessive [#Verb]",group:0,tag:"Noun",notIf:"(saw|made)",reason:"left-her-boots"},{match:"#Value [%Plural|Verb%]",group:0,tag:"Plural",notIf:"(one|1|a|an)",reason:"35-signs"},{match:"had [#PresentTense]",group:0,tag:"Noun",notIf:"(#Gerund|come|become)",reason:"had-time"},{match:"%Adj|Noun% %Noun|Verb%",tag:"#Adjective #Noun",notIf:"#ProperNoun #Noun",reason:"instant-access"},{match:"#Determiner [%Adj|Noun%] #Conjunction",group:0,tag:"Noun",reason:"a-rep-to"},{match:"#Adjective #Noun [%Plural|Verb%]$",group:0,tag:"Plural",notIf:"#Pronoun",reason:"near-death-experiences"},{match:"#Possessive #Noun [%Plural|Verb%]$",group:0,tag:"Plural",reason:"your-guild-colors"}],F5=[{match:"(this|that|the|a|an) [#Gerund #Infinitive]",group:0,tag:"Singular",reason:"the-planning-process"},{match:"(that|the) [#Gerund #PresentTense]",group:0,ifNo:"#Copula",tag:"Plural",reason:"the-paving-stones"},{match:"#Determiner [#Gerund] #Noun",group:0,tag:"Adjective",reason:"the-gerund-noun"},{match:"#Pronoun #Infinitive [#Gerund] #PresentTense",group:0,tag:"Noun",reason:"tipping-sucks"},{match:"#Adjective [#Gerund]",group:0,tag:"Noun",notIf:"(still|even|just)",reason:"early-warning"},{match:"[#Gerund] #Adverb? not? #Copula",group:0,tag:"Activity",reason:"gerund-copula"},{match:"#Copula [(#Gerund|#Activity)] #Copula",group:0,tag:"Gerund",reason:"are-doing-is"},{match:"[#Gerund] #Modal",group:0,tag:"Activity",reason:"gerund-modal"},{match:"#Singular for [%Noun|Gerund%]",group:0,tag:"Gerund",reason:"noun-for-gerund"},{match:"#Comparative (for|at) [%Noun|Gerund%]",group:0,tag:"Gerund",reason:"better-for-gerund"},{match:"#PresentTense the [#Gerund]",group:0,tag:"Noun",reason:"keep-the-touching"}],P5=[{match:"#Infinitive (this|that|the) [#Infinitive]",group:0,tag:"Noun",reason:"do-this-dance"},{match:"#Gerund #Determiner [#Infinitive]",group:0,tag:"Noun",reason:"running-a-show"},{match:"#Determiner (only|further|just|more|backward) [#Infinitive]",group:0,tag:"Noun",reason:"the-only-reason"},{match:"(the|this|a|an) [#Infinitive] #Adverb? #Verb",group:0,tag:"Noun",reason:"determiner5"},{match:"#Determiner #Adjective #Adjective? [#Infinitive]",group:0,tag:"Noun",reason:"a-nice-inf"},{match:"#Determiner #Demonym [#PresentTense]",group:0,tag:"Noun",reason:"mexican-train"},{match:"#Adjective #Noun+ [#Infinitive] #Copula",group:0,tag:"Noun",reason:"career-move"},{match:"at some [#Infinitive]",group:0,tag:"Noun",reason:"at-some-inf"},{match:"(go|goes|went) to [#Infinitive]",group:0,tag:"Noun",reason:"goes-to-verb"},{match:"(a|an) #Adjective? #Noun [#Infinitive] (#Preposition|#Noun)",group:0,notIf:"from",tag:"Noun",reason:"a-noun-inf"},{match:"(a|an) #Noun [#Infinitive]$",group:0,tag:"Noun",reason:"a-noun-inf2"},{match:"#Gerund #Adjective? for [#Infinitive]",group:0,tag:"Noun",reason:"running-for"},{match:"about [#Infinitive]",group:0,tag:"Singular",reason:"about-love"},{match:"#Plural on [#Infinitive]",group:0,tag:"Noun",reason:"on-stage"},{match:"any [#Infinitive]",group:0,tag:"Noun",reason:"any-charge"},{match:"no [#Infinitive]",group:0,tag:"Noun",reason:"no-doubt"},{match:"number of [#PresentTense]",group:0,tag:"Noun",reason:"number-of-x"},{match:"(taught|teaches|learns|learned) [#PresentTense]",group:0,tag:"Noun",reason:"teaches-x"},{match:"(try|use|attempt|build|make) [#Verb #Particle?]",notIf:"(#Copula|#Noun|sure|fun|up)",group:0,tag:"Noun",reason:"do-verb"},{match:"^[#Infinitive] (is|was)",group:0,tag:"Noun",reason:"checkmate-is"},{match:"#Infinitive much [#Infinitive]",group:0,tag:"Noun",reason:"get-much"},{match:"[cause] #Pronoun #Verb",group:0,tag:"Conjunction",reason:"cause-cuz"},{match:"the #Singular [#Infinitive] #Noun",group:0,tag:"Noun",notIf:"#Pronoun",reason:"cardio-dance"},{match:"#Determiner #Modal [#Noun]",group:0,tag:"PresentTense",reason:"should-smoke"},{match:"this [#Plural]",group:0,tag:"PresentTense",notIf:"(#Preposition|#Date)",reason:"this-verbs"},{match:"#Noun that [#Plural]",group:0,tag:"PresentTense",notIf:"(#Preposition|#Pronoun|way)",reason:"voice-that-rocks"},{match:"that [#Plural] to",group:0,tag:"PresentTense",notIf:"#Preposition",reason:"that-leads-to"},{match:"(let|make|made) (him|her|it|#Person|#Place|#Organization)+ [#Singular] (a|an|the|it)",group:0,tag:"Infinitive",reason:"let-him-glue"},{match:"#Verb (all|every|each|most|some|no) [#PresentTense]",notIf:"#Modal",group:0,tag:"Noun",reason:"all-presentTense"},{match:"(had|have|#PastTense) #Adjective [#PresentTense]",group:0,tag:"Noun",notIf:"better",reason:"adj-presentTense"},{match:"#Value #Adjective [#PresentTense]",group:0,tag:"Noun",notIf:"#Copula",reason:"one-big-reason"},{match:"#PastTense #Adjective+ [#PresentTense]",group:0,tag:"Noun",notIf:"(#Copula|better)",reason:"won-wide-support"},{match:"(many|few|several|couple) [#PresentTense]",group:0,tag:"Noun",notIf:"#Copula",reason:"many-poses"},{match:"#Determiner #Adverb #Adjective [%Noun|Verb%]",group:0,tag:"Noun",notIf:"#Copula",reason:"very-big-dream"},{match:"from #Noun to [%Noun|Verb%]",group:0,tag:"Noun",reason:"start-to-finish"},{match:"(for|with|of) #Noun (and|or|not) [%Noun|Verb%]",group:0,tag:"Noun",notIf:"#Pronoun",reason:"for-food-and-gas"},{match:"#Adjective #Adjective [#PresentTense]",group:0,tag:"Noun",notIf:"#Copula",reason:"adorable-little-store"},{match:"#Gerund #Adverb? #Comparative [#PresentTense]",group:0,tag:"Noun",notIf:"#Copula",reason:"higher-costs"},{match:"(#Noun && @hasComma) #Noun (and|or) [#PresentTense]",group:0,tag:"Noun",notIf:"#Copula",reason:"noun-list"},{match:"(many|any|some|several) [#PresentTense] for",group:0,tag:"Noun",reason:"any-verbs-for"},{match:"to #PresentTense #Noun [#PresentTense] #Preposition",group:0,tag:"Noun",reason:"gas-exchange"},{match:"#PastTense (until|as|through|without) [#PresentTense]",group:0,tag:"Noun",reason:"waited-until-release"},{match:"#Gerund like #Adjective? [#PresentTense]",group:0,tag:"Plural",reason:"like-hot-cakes"},{match:"some #Adjective [#PresentTense]",group:0,tag:"Noun",reason:"some-reason"},{match:"for some [#PresentTense]",group:0,tag:"Noun",reason:"for-some-reason"},{match:"(same|some|the|that|a) kind of [#PresentTense]",group:0,tag:"Noun",reason:"some-kind-of"},{match:"(same|some|the|that|a) type of [#PresentTense]",group:0,tag:"Noun",reason:"some-type-of"},{match:"#Gerund #Adjective #Preposition [#PresentTense]",group:0,tag:"Noun",reason:"doing-better-for-x"},{match:"(get|got|have) #Comparative [#PresentTense]",group:0,tag:"Noun",reason:"got-better-aim"},{match:"whose [#PresentTense] #Copula",group:0,tag:"Noun",reason:"whos-name-was"},{match:"#PhrasalVerb #Particle #Preposition [#PresentTense]",group:0,tag:"Noun",reason:"given-up-on-x"},{match:"there (are|were) #Adjective? [#PresentTense]",group:0,tag:"Plural",reason:"there-are"},{match:"#Value [#PresentTense] of",group:0,notIf:"(one|1|#Copula|#Infinitive)",tag:"Plural",reason:"2-trains"},{match:"[#PresentTense] (are|were) #Adjective",group:0,tag:"Plural",reason:"compromises-are-possible"},{match:"^[(hope|guess|thought|think)] #Pronoun #Verb",group:0,tag:"Infinitive",reason:"suppose-i"},{match:"#Possessive #Adjective [#Verb]",group:0,tag:"Noun",notIf:"#Copula",reason:"our-full-support"},{match:"[(tastes|smells)] #Adverb? #Adjective",group:0,tag:"PresentTense",reason:"tastes-good"},{match:"#Copula #Gerund [#PresentTense] !by?",group:0,tag:"Noun",notIf:"going",reason:"ignoring-commute"},{match:"#Determiner #Adjective? [(shed|thought|rose|bid|saw|spelt)]",group:0,tag:"Noun",reason:"noun-past"},{match:"how to [%Noun|Verb%]",group:0,tag:"Infinitive",reason:"how-to-noun"},{match:"which [%Noun|Verb%] #Noun",group:0,tag:"Infinitive",reason:"which-boost-it"},{match:"#Gerund [%Plural|Verb%]",group:0,tag:"Plural",reason:"asking-questions"},{match:"(ready|available|difficult|hard|easy|made|attempt|try) to [%Noun|Verb%]",group:0,tag:"Infinitive",reason:"ready-to-noun"},{match:"(bring|went|go|drive|run|bike) to [%Noun|Verb%]",group:0,tag:"Noun",reason:"bring-to-noun"},{match:"#Modal #Noun [%Noun|Verb%]",group:0,tag:"Infinitive",reason:"would-you-look"},{match:"#Copula just [#Infinitive]",group:0,tag:"Noun",reason:"is-just-spam"},{match:"^%Noun|Verb% %Plural|Verb%",tag:"Imperative #Plural",reason:"request-copies"},{match:"#Adjective #Plural and [%Plural|Verb%]",group:0,tag:"#Plural",reason:"pickles-and-drinks"},{match:"#Determiner #Year [#Verb]",group:0,tag:"Noun",reason:"the-1968-film"},{match:"#Determiner [#PhrasalVerb #Particle]",group:0,tag:"Noun",reason:"the-break-up"},{match:"#Determiner [%Adj|Noun%] #Noun",group:0,tag:"Adjective",notIf:"(#Pronoun|#Possessive|#ProperNoun)",reason:"the-individual-goals"},{match:"[%Noun|Verb%] or #Infinitive",group:0,tag:"Infinitive",reason:"work-or-prepare"},{match:"to #Infinitive [#PresentTense]",group:0,tag:"Noun",notIf:"(#Gerund|#Copula|help)",reason:"to-give-thanks"},{match:"[#Noun] me",group:0,tag:"Verb",reason:"kills-me"},{match:"%Plural|Verb% %Plural|Verb%",tag:"#PresentTense #Plural",reason:"removes-wrinkles"}],k5=[{match:"#Money and #Money #Currency?",tag:"Money",reason:"money-and-money"},{match:"#Value #Currency [and] #Value (cents|ore|centavos|sens)",group:0,tag:"money",reason:"and-5-cents"},{match:"#Value (mark|rand|won|rub|ore)",tag:"#Money #Currency",reason:"4-mark"},{match:"a pound",tag:"#Money #Unit",reason:"a-pound"},{match:"#Value (pound|pounds)",tag:"#Money #Unit",reason:"4-pounds"}],O5=[{match:"[(half|quarter)] of? (a|an)",group:0,tag:"Fraction",reason:"millionth"},{match:"#Adverb [half]",group:0,tag:"Fraction",reason:"nearly-half"},{match:"[half] the",group:0,tag:"Fraction",reason:"half-the"},{match:"#Cardinal and a half",tag:"Fraction",reason:"and-a-half"},{match:"#Value (halves|halfs|quarters)",tag:"Fraction",reason:"two-halves"},{match:"a #Ordinal",tag:"Fraction",reason:"a-quarter"},{match:"[#Cardinal+] (#Fraction && /s$/)",tag:"Fraction",reason:"seven-fifths"},{match:"[#Cardinal+ #Ordinal] of .",group:0,tag:"Fraction",reason:"ordinal-of"},{match:"[(#NumericValue && #Ordinal)] of .",group:0,tag:"Fraction",reason:"num-ordinal-of"},{match:"(a|one) #Cardinal?+ #Ordinal",tag:"Fraction",reason:"a-ordinal"},{match:"#Cardinal+ out? of every? #Cardinal",tag:"Fraction",reason:"out-of"}],B5=[{match:"#Cardinal [second]",tag:"Unit",reason:"one-second"},{match:"!once? [(a|an)] (#Duration|hundred|thousand|million|billion|trillion)",group:0,tag:"Value",reason:"a-is-one"},{match:"1 #Value #PhoneNumber",tag:"PhoneNumber",reason:"1-800-Value"},{match:"#NumericValue #PhoneNumber",tag:"PhoneNumber",reason:"(800) PhoneNumber"},{match:"#Demonym #Currency",tag:"Currency",reason:"demonym-currency"},{match:"#Value [(buck|bucks|grand)]",group:0,tag:"Currency",reason:"value-bucks"},{match:"[#Value+] #Currency",group:0,tag:"Money",reason:"15 usd"},{match:"[second] #Noun",group:0,tag:"Ordinal",reason:"second-noun"},{match:"#Value+ [#Currency]",group:0,tag:"Unit",reason:"5-yan"},{match:"#Value [(foot|feet)]",group:0,tag:"Unit",reason:"foot-unit"},{match:"#Value [#Abbreviation]",group:0,tag:"Unit",reason:"value-abbr"},{match:"#Value [k]",group:0,tag:"Unit",reason:"value-k"},{match:"#Unit an hour",tag:"Unit",reason:"unit-an-hour"},{match:"(minus|negative) #Value",tag:"Value",reason:"minus-value"},{match:"#Value (point|decimal) #Value",tag:"Value",reason:"value-point-value"},{match:"#Determiner [(half|quarter)] #Ordinal",group:0,tag:"Value",reason:"half-ordinal"},{match:"#Multiple+ and #Value",tag:"Value",reason:"magnitude-and-value"},{match:"#Value #Unit [(per|an) (hr|hour|sec|second|min|minute)]",group:0,tag:"Unit",reason:"12-miles-per-second"},{match:"#Value [(square|cubic)] #Unit",group:0,tag:"Unit",reason:"square-miles"}],$5=[{match:"#Copula [(#Noun|#PresentTense)] #LastName",group:0,tag:"FirstName",reason:"copula-noun-lastname"},{match:"(sister|pope|brother|father|aunt|uncle|grandpa|grandfather|grandma) #ProperNoun",tag:"Person",reason:"lady-titlecase",safe:!0},{match:"#FirstName [#Determiner #Noun] #LastName",group:0,tag:"Person",reason:"first-noun-last"},{match:"#ProperNoun (b|c|d|e|f|g|h|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z) #ProperNoun",tag:"Person",reason:"titlecase-acronym-titlecase",safe:!0},{match:"#Acronym #LastName",tag:"Person",reason:"acronym-lastname",safe:!0},{match:"#Person (jr|sr|md)",tag:"Person",reason:"person-honorific"},{match:"#Honorific #Acronym",tag:"Person",reason:"Honorific-TitleCase"},{match:"#Person #Person the? #RomanNumeral",tag:"Person",reason:"roman-numeral"},{match:"#FirstName [/^[^aiurck]$/]",group:0,tag:["Acronym","Person"],reason:"john-e"},{match:"#Noun van der? #Noun",tag:"Person",reason:"van der noun",safe:!0},{match:"(king|queen|prince|saint|lady) of #Noun",tag:"Person",reason:"king-of-noun",safe:!0},{match:"(prince|lady) #Place",tag:"Person",reason:"lady-place"},{match:"(king|queen|prince|saint) #ProperNoun",tag:"Person",notIf:"#Place",reason:"saint-foo"},{match:"al (#Person|#ProperNoun)",tag:"Person",reason:"al-borlen",safe:!0},{match:"#FirstName de #Noun",tag:"Person",reason:"bill-de-noun"},{match:"#FirstName (bin|al) #Noun",tag:"Person",reason:"bill-al-noun"},{match:"#FirstName #Acronym #ProperNoun",tag:"Person",reason:"bill-acronym-title"},{match:"#FirstName #FirstName #ProperNoun",tag:"Person",reason:"bill-firstname-title"},{match:"#Honorific #FirstName? #ProperNoun",tag:"Person",reason:"dr-john-Title"},{match:"#FirstName the #Adjective",tag:"Person",reason:"name-the-great"},{match:"#ProperNoun (van|al|bin) #ProperNoun",tag:"Person",reason:"title-van-title",safe:!0},{match:"#ProperNoun (de|du) la? #ProperNoun",tag:"Person",notIf:"#Place",reason:"title-de-title"},{match:"#Singular #Acronym #LastName",tag:"#FirstName #Person .",reason:"title-acro-noun",safe:!0},{match:"[#ProperNoun] #Person",group:0,tag:"Person",reason:"proper-person",safe:!0},{match:"#Person [#ProperNoun #ProperNoun]",group:0,tag:"Person",notIf:"#Possessive",reason:"three-name-person",safe:!0},{match:"#FirstName #Acronym? [#ProperNoun]",group:0,tag:"LastName",notIf:"#Possessive",reason:"firstname-titlecase"},{match:"#FirstName [#FirstName]",group:0,tag:"LastName",reason:"firstname-firstname"},{match:"#FirstName #Acronym #Noun",tag:"Person",reason:"n-acro-noun",safe:!0},{match:"#FirstName [(de|di|du|van|von)] #Person",group:0,tag:"LastName",reason:"de-firstname"},{match:"[(lieutenant|corporal|sergeant|captain|qeen|king|admiral|major|colonel|marshal|president|queen|king)+] #ProperNoun",group:0,tag:"Honorific",reason:"seargeant-john"},{match:"[(private|general|major|rear|prime|field|count|miss)] #Honorific? #Person",group:0,tag:["Honorific","Person"],reason:"ambg-honorifics"},{match:"#Honorific #FirstName [#Singular]",group:0,tag:"LastName",notIf:"#Possessive",reason:"dr-john-foo",safe:!0},{match:"[(his|her) (majesty|honour|worship|excellency|honorable)] #Person",group:0,tag:"Honorific",reason:"his-excellency"},{match:"#Honorific #Actor",tag:"Honorific",reason:"Lieutenant colonel"},{match:"(first|second|third|1st|2nd|3rd) #Actor",tag:"Honorific",reason:"first lady"},{match:"#Person #RomanNumeral",tag:"Person",reason:"louis-IV"}],_5=[{match:"#FirstName #Noun$",tag:". #LastName",notIf:"(#Possessive|#Organization|#Place|#Pronoun|@hasTitleCase)",reason:"firstname-noun"},{match:"%Person|Date% #Acronym? #ProperNoun",tag:"Person",reason:"jan-thierson"},{match:"%Person|Noun% #Acronym? #ProperNoun",tag:"Person",reason:"switch-person",safe:!0},{match:"%Person|Noun% #Organization",tag:"Organization",reason:"olive-garden"},{match:"%Person|Verb% #Acronym? #ProperNoun",tag:"Person",reason:"verb-propernoun",ifNo:"#Actor"},{match:"[%Person|Verb%] (will|had|has|said|says|told|did|learned|wants|wanted)",group:0,tag:"Person",reason:"person-said"},{match:"[%Person|Place%] (harbor|harbour|pier|town|city|place|dump|landfill)",group:0,tag:"Place",reason:"sydney-harbour"},{match:"(west|east|north|south) [%Person|Place%]",group:0,tag:"Place",reason:"east-sydney"},{match:"#Modal [%Person|Verb%]",group:0,tag:"Verb",reason:"would-mark"},{match:"#Adverb [%Person|Verb%]",group:0,tag:"Verb",reason:"really-mark"},{match:"[%Person|Verb%] (#Adverb|#Comparative)",group:0,tag:"Verb",reason:"drew-closer"},{match:"%Person|Verb% #Person",tag:"Person",reason:"rob-smith"},{match:"%Person|Verb% #Acronym #ProperNoun",tag:"Person",reason:"rob-a-smith"},{match:"[will] #Verb",group:0,tag:"Modal",reason:"will-verb"},{match:"(will && @isTitleCase) #ProperNoun",tag:"Person",reason:"will-name"},{match:"(#FirstName && !#Possessive) [#Singular] #Verb",group:0,safe:!0,tag:"LastName",reason:"jack-layton"},{match:"^[#Singular] #Person #Verb",group:0,safe:!0,tag:"Person",reason:"sherwood-anderson"},{match:"(a|an) [#Person]$",group:0,unTag:"Person",reason:"a-warhol"}],I5=[{match:"#Copula (pretty|dead|full|well|sure) (#Adjective|#Noun)",tag:"#Copula #Adverb #Adjective",reason:"sometimes-adverb"},{match:"(#Pronoun|#Person) (had|#Adverb)? [better] #PresentTense",group:0,tag:"Modal",reason:"i-better"},{match:"(#Modal|i|they|we|do) not? [like]",group:0,tag:"PresentTense",reason:"modal-like"},{match:"#Noun #Adverb? [left]",group:0,tag:"PastTense",reason:"left-verb"},{match:"will #Adverb? not? #Adverb? [be] #Gerund",group:0,tag:"Copula",reason:"will-be-copula"},{match:"will #Adverb? not? #Adverb? [be] #Adjective",group:0,tag:"Copula",reason:"be-copula"},{match:"[march] (up|down|back|toward)",notIf:"#Date",group:0,tag:"Infinitive",reason:"march-to"},{match:"#Modal [march]",group:0,tag:"Infinitive",reason:"must-march"},{match:"[may] be",group:0,tag:"Verb",reason:"may-be"},{match:"[(subject|subjects|subjected)] to",group:0,tag:"Verb",reason:"subject to"},{match:"[home] to",group:0,tag:"PresentTense",reason:"home to"},{match:"[open] #Determiner",group:0,tag:"Infinitive",reason:"open-the"},{match:"(were|was) being [#PresentTense]",group:0,tag:"PastTense",reason:"was-being"},{match:"(had|has|have) [been /en$/]",group:0,tag:"Auxiliary Participle",reason:"had-been-broken"},{match:"(had|has|have) [been /ed$/]",group:0,tag:"Auxiliary PastTense",reason:"had-been-smoked"},{match:"(had|has) #Adverb? [been] #Adverb? #PastTense",group:0,tag:"Auxiliary",reason:"had-been-adj"},{match:"(had|has) to [#Noun] (#Determiner|#Possessive)",group:0,tag:"Infinitive",reason:"had-to-noun"},{match:"have [#PresentTense]",group:0,tag:"PastTense",notIf:"(come|gotten)",reason:"have-read"},{match:"(does|will|#Modal) that [work]",group:0,tag:"PastTense",reason:"does-that-work"},{match:"[(sound|sounds)] #Adjective",group:0,tag:"PresentTense",reason:"sounds-fun"},{match:"[(look|looks)] #Adjective",group:0,tag:"PresentTense",reason:"looks-good"},{match:"[(start|starts|stop|stops|begin|begins)] #Gerund",group:0,tag:"Verb",reason:"starts-thinking"},{match:"(have|had) read",tag:"Modal #PastTense",reason:"read-read"},{match:"(is|was|were) [(under|over) #PastTense]",group:0,tag:"Adverb Adjective",reason:"was-under-cooked"},{match:"[shit] (#Determiner|#Possessive|them)",group:0,tag:"Verb",reason:"swear1-verb"},{match:"[damn] (#Determiner|#Possessive|them)",group:0,tag:"Verb",reason:"swear2-verb"},{match:"[fuck] (#Determiner|#Possessive|them)",group:0,tag:"Verb",reason:"swear3-verb"},{match:"#Plural that %Noun|Verb%",tag:". #Preposition #Infinitive",reason:"jobs-that-work"},{match:"[works] for me",group:0,tag:"PresentTense",reason:"works-for-me"},{match:"as #Pronoun [please]",group:0,tag:"Infinitive",reason:"as-we-please"},{match:"[(co|mis|de|inter|intra|pre|re|un|out|under|over|counter)] #Verb",group:0,tag:["Verb","Prefix"],notIf:"(#Copula|#PhrasalVerb)",reason:"co-write"},{match:"#PastTense and [%Adj|Past%]",group:0,tag:"PastTense",reason:"dressed-and-left"},{match:"[%Adj|Past%] and #PastTense",group:0,tag:"PastTense",reason:"dressed-and-left"},{match:"#Copula #Pronoun [%Adj|Past%]",group:0,tag:"Adjective",reason:"is-he-stoked"},{match:"to [%Noun|Verb%] #Preposition",group:0,tag:"Infinitive",reason:"to-dream-of"}],z5=[{match:"will (#Adverb|not)+? [have] (#Adverb|not)+? #Verb",group:0,tag:"Auxiliary",reason:"will-have-vb"},{match:"[#Copula] (#Adverb|not)+? (#Gerund|#PastTense)",group:0,tag:"Auxiliary",reason:"copula-walking"},{match:"[(#Modal|did)+] (#Adverb|not)+? #Verb",group:0,tag:"Auxiliary",reason:"modal-verb"},{match:"#Modal (#Adverb|not)+? [have] (#Adverb|not)+? [had] (#Adverb|not)+? #Verb",group:0,tag:"Auxiliary",reason:"would-have"},{match:"[(has|had)] (#Adverb|not)+? #PastTense",group:0,tag:"Auxiliary",reason:"had-walked"},{match:"[(do|does|did|will|have|had|has|got)] (not|#Adverb)+? #Verb",group:0,tag:"Auxiliary",reason:"have-had"},{match:"[about to] #Adverb? #Verb",group:0,tag:["Auxiliary","Verb"],reason:"about-to"},{match:"#Modal (#Adverb|not)+? [be] (#Adverb|not)+? #Verb",group:0,tag:"Auxiliary",reason:"would-be"},{match:"[(#Modal|had|has)] (#Adverb|not)+? [been] (#Adverb|not)+? #Verb",group:0,tag:"Auxiliary",reason:"had-been"},{match:"[(be|being|been)] #Participle",group:0,tag:"Auxiliary",reason:"being-driven"},{match:"[may] #Adverb? #Infinitive",group:0,tag:"Auxiliary",reason:"may-want"},{match:"#Copula (#Adverb|not)+? [(be|being|been)] #Adverb+? #PastTense",group:0,tag:"Auxiliary",reason:"being-walked"},{match:"will [be] #PastTense",group:0,tag:"Auxiliary",reason:"will-be-x"},{match:"[(be|been)] (#Adverb|not)+? #Gerund",group:0,tag:"Auxiliary",reason:"been-walking"},{match:"[used to] #PresentTense",group:0,tag:"Auxiliary",reason:"used-to-walk"},{match:"#Copula (#Adverb|not)+? [going to] #Adverb+? #PresentTense",group:0,tag:"Auxiliary",reason:"going-to-walk"},{match:"#Imperative [(me|him|her)]",group:0,tag:"Reflexive",reason:"tell-him"},{match:"(is|was) #Adverb? [no]",group:0,tag:"Negative",reason:"is-no"},{match:"[(been|had|became|came)] #PastTense",group:0,notIf:"#PhrasalVerb",tag:"Auxiliary",reason:"been-told"},{match:"[(being|having|getting)] #Verb",group:0,tag:"Auxiliary",reason:"being-born"},{match:"[be] #Gerund",group:0,tag:"Auxiliary",reason:"be-walking"},{match:"[better] #PresentTense",group:0,tag:"Modal",notIf:"(#Copula|#Gerund)",reason:"better-go"},{match:"even better",tag:"Adverb #Comparative",reason:"even-better"}],j5=[{match:"(#Verb && @hasHyphen) up",tag:"PhrasalVerb",reason:"foo-up"},{match:"(#Verb && @hasHyphen) off",tag:"PhrasalVerb",reason:"foo-off"},{match:"(#Verb && @hasHyphen) over",tag:"PhrasalVerb",reason:"foo-over"},{match:"(#Verb && @hasHyphen) out",tag:"PhrasalVerb",reason:"foo-out"},{match:"[#Verb (in|out|up|down|off|back)] (on|in)",notIf:"#Copula",tag:"PhrasalVerb Particle",reason:"walk-in-on"},{match:"(lived|went|crept|go) [on] for",group:0,tag:"PhrasalVerb",reason:"went-on"},{match:"#Verb (up|down|in|on|for)$",tag:"PhrasalVerb #Particle",notIf:"#PhrasalVerb",reason:"come-down$"},{match:"help [(stop|end|make|start)]",group:0,tag:"Infinitive",reason:"help-stop"},{match:"#PhrasalVerb (in && #Particle) #Determiner",tag:"#Verb #Preposition #Determiner",unTag:"PhrasalVerb",reason:"work-in-the"},{match:"[(stop|start|finish|help)] #Gerund",group:0,tag:"Infinitive",reason:"start-listening"},{match:"#Verb (him|her|it|us|himself|herself|itself|everything|something) [(up|down)]",group:0,tag:"Adverb",reason:"phrasal-pronoun-advb"}],tf="(i|we|they)",q5=[{match:"^do not? [#Infinitive #Particle?]",notIf:tf,group:0,tag:"Imperative",reason:"do-eat"},{match:"^please do? not? [#Infinitive #Particle?]",group:0,tag:"Imperative",reason:"please-go"},{match:"^just do? not? [#Infinitive #Particle?]",group:0,tag:"Imperative",reason:"just-go"},{match:"^[#Infinitive] it #Comparative",notIf:tf,group:0,tag:"Imperative",reason:"do-it-better"},{match:"^[#Infinitive] it (please|now|again|plz)",notIf:tf,group:0,tag:"Imperative",reason:"do-it-please"},{match:"^[#Infinitive] (#Adjective|#Adverb)$",group:0,tag:"Imperative",notIf:"(so|such|rather|enough)",reason:"go-quickly"},{match:"^[#Infinitive] (up|down|over) #Determiner",group:0,tag:"Imperative",reason:"turn-down"},{match:"^[#Infinitive] (your|my|the|a|an|any|each|every|some|more|with|on)",group:0,notIf:"like",tag:"Imperative",reason:"eat-my-shorts"},{match:"^[#Infinitive] (him|her|it|us|me|there)",group:0,tag:"Imperative",reason:"tell-him"},{match:"^[#Infinitive] #Adjective #Noun$",group:0,tag:"Imperative",reason:"avoid-loud-noises"},{match:"^[#Infinitive] (#Adjective|#Adverb)? and #Infinitive",group:0,tag:"Imperative",reason:"call-and-reserve"},{match:"^(go|stop|wait|hurry) please?$",tag:"Imperative",reason:"go"},{match:"^(somebody|everybody) [#Infinitive]",group:0,tag:"Imperative",reason:"somebody-call"},{match:"^let (us|me) [#Infinitive]",group:0,tag:"Imperative",reason:"lets-leave"},{match:"^[(shut|close|open|start|stop|end|keep)] #Determiner #Noun",group:0,tag:"Imperative",reason:"shut-the-door"},{match:"^[#PhrasalVerb #Particle] #Determiner #Noun",group:0,tag:"Imperative",reason:"turn-off-the-light"},{match:"^[go] to .",group:0,tag:"Imperative",reason:"go-to-toronto"},{match:"^#Modal you [#Infinitive]",group:0,tag:"Imperative",reason:"would-you-"},{match:"^never [#Infinitive]",group:0,tag:"Imperative",reason:"never-stop"},{match:"^come #Infinitive",tag:"Imperative",notIf:"on",reason:"come-have"},{match:"^come and? #Infinitive",tag:"Imperative . Imperative",notIf:"#PhrasalVerb",reason:"come-and-have"},{match:"^stay (out|away|back)",tag:"Imperative",reason:"stay-away"},{match:"^[(stay|be|keep)] #Adjective",group:0,tag:"Imperative",reason:"stay-cool"},{match:"^[keep it] #Adjective",group:0,tag:"Imperative",reason:"keep-it-cool"},{match:"^do not [#Infinitive]",group:0,tag:"Imperative",reason:"do-not-be"},{match:"[#Infinitive] (yourself|yourselves)",group:0,tag:"Imperative",reason:"allow-yourself"},{match:"[#Infinitive] what .",group:0,tag:"Imperative",reason:"look-what"},{match:"^[#Infinitive] #Gerund",group:0,tag:"Imperative",reason:"keep-playing"},{match:"^[#Infinitive] (to|for|into|toward|here|there)",group:0,tag:"Imperative",reason:"go-to"},{match:"^[#Infinitive] (and|or) #Infinitive",group:0,tag:"Imperative",reason:"inf-and-inf"},{match:"^[%Noun|Verb%] to",group:0,tag:"Imperative",reason:"commit-to"},{match:"^[#Infinitive] #Adjective? #Singular #Singular",group:0,tag:"Imperative",reason:"maintain-eye-contact"},{match:"do not (forget|omit|neglect) to [#Infinitive]",group:0,tag:"Imperative",reason:"do-not-forget"},{match:"^[(ask|wear|pay|look|help|show|watch|act|fix|kill|stop|start|turn|try|win)] #Noun",group:0,tag:"Imperative",reason:"pay-attention"}],R5=[{match:"(that|which) were [%Adj|Gerund%]",group:0,tag:"Gerund",reason:"that-were-growing"},{match:"#Gerund [#Gerund] #Plural",group:0,tag:"Adjective",reason:"hard-working-fam"}],L5=[{match:"(got|were|was|is|are|am) (#PastTense|#Participle)",tag:"Passive",reason:"got-walked"},{match:"(was|were|is|are|am) being (#PastTense|#Participle)",tag:"Passive",reason:"was-being"},{match:"(had|have|has) been (#PastTense|#Participle)",tag:"Passive",reason:"had-been"},{match:"will be being? (#PastTense|#Participle)",tag:"Passive",reason:"will-be-cleaned"},{match:"#Noun [(#PastTense|#Participle)] by (the|a) #Noun",group:0,tag:"Passive",reason:"suffered-by"}];let H5=[{match:"u r",tag:"#Pronoun #Copula",reason:"u r"},{match:"#Noun [(who|whom)]",group:0,tag:"Determiner",reason:"captain-who"},{match:"[had] #Noun+ #PastTense",group:0,tag:"Condition",reason:"had-he"},{match:"[were] #Noun+ to #Infinitive",group:0,tag:"Condition",reason:"were-he"},{match:"some sort of",tag:"Adjective Noun Conjunction",reason:"some-sort-of"},{match:"of some sort",tag:"Conjunction Adjective Noun",reason:"of-some-sort"},{match:"[such] (a|an|is)? #Noun",group:0,tag:"Determiner",reason:"such-skill"},{match:"[right] (before|after|in|into|to|toward)",group:0,tag:"#Adverb",reason:"right-into"},{match:"#Preposition [about]",group:0,tag:"Adjective",reason:"at-about"},{match:"(are|#Modal|see|do|for) [ya]",group:0,tag:"Pronoun",reason:"are-ya"},{match:"[long live] .",group:0,tag:"#Adjective #Infinitive",reason:"long-live"},{match:"[plenty] of",group:0,tag:"#Uncountable",reason:"plenty-of"},{match:"(always|nearly|barely|practically) [there]",group:0,tag:"Adjective",reason:"always-there"},{match:"[there] (#Adverb|#Pronoun)? #Copula",group:0,tag:"There",reason:"there-is"},{match:"#Copula [there] .",group:0,tag:"There",reason:"is-there"},{match:"#Modal #Adverb? [there]",group:0,tag:"There",reason:"should-there"},{match:"^[do] (you|we|they)",group:0,tag:"QuestionWord",reason:"do-you"},{match:"^[does] (he|she|it|#ProperNoun)",group:0,tag:"QuestionWord",reason:"does-he"},{match:"#Determiner #Noun+ [who] #Verb",group:0,tag:"Preposition",reason:"the-x-who"},{match:"#Determiner #Noun+ [which] #Verb",group:0,tag:"Preposition",reason:"the-x-which"},{match:"a [while]",group:0,tag:"Noun",reason:"a-while"},{match:"guess who",tag:"#Infinitive #QuestionWord",reason:"guess-who"},{match:"[fucking] !#Verb",group:0,tag:"#Gerund",reason:"f-as-gerund"}];const G5=[{match:"university of #Place",tag:"Organization",reason:"university-of-Foo"},{match:"#Noun (&|n) #Noun",tag:"Organization",reason:"Noun-&-Noun"},{match:"#Organization of the? #ProperNoun",tag:"Organization",reason:"org-of-place",safe:!0},{match:"#Organization #Country",tag:"Organization",reason:"org-country"},{match:"#ProperNoun #Organization",tag:"Organization",notIf:"#FirstName",reason:"titlecase-org"},{match:"#ProperNoun (ltd|co|inc|dept|assn|bros)",tag:"Organization",reason:"org-abbrv"},{match:"the [#Acronym]",group:0,tag:"Organization",reason:"the-acronym",safe:!0},{match:"government of the? [#Place+]",tag:"Organization",reason:"government-of-x"},{match:"(health|school|commerce) board",tag:"Organization",reason:"school-board"},{match:"(nominating|special|conference|executive|steering|central|congressional) committee",tag:"Organization",reason:"special-comittee"},{match:"(world|global|international|national|#Demonym) #Organization",tag:"Organization",reason:"global-org"},{match:"#Noun+ (public|private) school",tag:"School",reason:"noun-public-school"},{match:"#Place+ #SportsTeam",tag:"SportsTeam",reason:"place-sportsteam"},{match:"(dc|atlanta|minnesota|manchester|newcastle|sheffield) united",tag:"SportsTeam",reason:"united-sportsteam"},{match:"#Place+ fc",tag:"SportsTeam",reason:"fc-sportsteam"},{match:"#Place+ #Noun{0,2} (club|society|group|team|committee|commission|association|guild|crew)",tag:"Organization",reason:"place-noun-society"}],V5=[{match:"(west|north|south|east|western|northern|southern|eastern)+ #Place",tag:"Region",reason:"west-norfolk"},{match:"#City [(al|ak|az|ar|ca|ct|dc|fl|ga|id|il|nv|nh|nj|ny|oh|pa|sc|tn|tx|ut|vt|pr)]",group:0,tag:"Region",reason:"us-state"},{match:"portland [or]",group:0,tag:"Region",reason:"portland-or"},{match:"#ProperNoun+ (cliff|place|range|pit|place|point|room|grounds|ruins)",tag:"Place",reason:"foo-point"},{match:"in [#ProperNoun] #Place",group:0,tag:"Place",reason:"propernoun-place"},{match:"#Value #Noun (st|street|rd|road|crescent|cr|way|tr|terrace|avenue|ave)",tag:"Address",reason:"address-st"},{match:"(port|mount|mt) #ProperName",tag:"Place",reason:"port-name"}],U5=[{match:"[so] #Noun",group:0,tag:"Conjunction",reason:"so-conj"},{match:"[(who|what|where|why|how|when)] #Noun #Copula #Adverb? (#Verb|#Adjective)",group:0,tag:"Conjunction",reason:"how-he-is-x"},{match:"#Copula [(who|what|where|why|how|when)] #Noun",group:0,tag:"Conjunction",reason:"when-he"},{match:"#Verb [that] #Pronoun",group:0,tag:"Conjunction",reason:"said-that-he"},{match:"#Noun [that] #Copula",group:0,tag:"Conjunction",reason:"that-are"},{match:"#Noun [that] #Verb #Adjective",group:0,tag:"Conjunction",reason:"that-seem"},{match:"#Noun #Copula not? [that] #Adjective",group:0,tag:"Adverb",reason:"that-adj"},{match:"#Verb #Adverb? #Noun [(that|which)]",group:0,tag:"Preposition",reason:"that-prep"},{match:"@hasComma [which] (#Pronoun|#Verb)",group:0,tag:"Preposition",reason:"which-copula"},{match:"#Noun [like] #Noun",group:0,tag:"Preposition",reason:"noun-like"},{match:"^[like] #Determiner",group:0,tag:"Preposition",reason:"like-the"},{match:"a #Noun [like] (#Noun|#Determiner)",group:0,tag:"Preposition",reason:"a-noun-like"},{match:"#Adverb [like]",group:0,tag:"Verb",reason:"really-like"},{match:"(not|nothing|never) [like]",group:0,tag:"Preposition",reason:"nothing-like"},{match:"#Infinitive #Pronoun [like]",group:0,tag:"Preposition",reason:"treat-them-like"},{match:"[#QuestionWord] (#Pronoun|#Determiner)",group:0,tag:"Preposition",reason:"how-he"},{match:"[#QuestionWord] #Participle",group:0,tag:"Preposition",reason:"when-stolen"},{match:"[how] (#Determiner|#Copula|#Modal|#PastTense)",group:0,tag:"QuestionWord",reason:"how-is"},{match:"#Plural [(who|which|when)] .",group:0,tag:"Preposition",reason:"people-who"}],W5=[{match:"holy (shit|fuck|hell)",tag:"Expression",reason:"swears-expression"},{match:"^[(well|so|okay|now)] !#Adjective?",group:0,tag:"Expression",reason:"well-"},{match:"^come on",tag:"Expression",reason:"come-on"},{match:"(say|says|said) [sorry]",group:0,tag:"Expression",reason:"say-sorry"},{match:"^(ok|alright|shoot|hell|anyways)",tag:"Expression",reason:"ok-"},{match:"^(say && @hasComma)",tag:"Expression",reason:"say-"},{match:"^(like && @hasComma)",tag:"Expression",reason:"like-"},{match:"^[(dude|man|girl)] #Pronoun",group:0,tag:"Expression",reason:"dude-i"}];let J5=[].concat(L5,b5,x5,D5,N5,C5,S5,E5,T5,F5,P5,k5,O5,B5,$5,_5,I5,A5,z5,j5,q5,R5,H5,G5,V5,U5,W5);const K5={two:{matches:J5}};let rf=null;const Y5=function(e){const{world:t}=e,{model:r,methods:n}=t;rf=rf||n.one.buildNet(r.two.matches,t);let i=n.two.quickSplit(e.document).map(s=>{let u=s[0];return[u.index[0],u.index[1],u.index[1]+s.length]}),o=e.update(i);return o.cache(),o.sweep(rf),e.uncache(),e.unfreeze(),e},Z5=e=>e.compute(["freeze","lexicon","preTagger","postTagger","unfreeze"]),Q5={postTagger:Y5,tagger:Z5},X5=e=>Math.round(e*100)/100;function eP(e){e.prototype.confidence=function(){let t=0,r=0;return this.docs.forEach(n=>{n.forEach(a=>{r+=1,t+=a.confidence||1})}),r===0?1:X5(t/r)},e.prototype.tagger=function(){return this.compute(["tagger"])}}const tP={api:eP,compute:Q5,model:K5,hooks:["postTagger"]},rP=function(e){return Object.keys(e.hooks).filter(t=>!t.startsWith("#")&&!t.startsWith("%"))},nP=function(e,t){let r=rP(t);if(r.length===0)return e;e._cache||e.cache();let n=e._cache;return e.filter((a,i)=>r.some(o=>n[i].has(o)))},aP=function(e,t){let r=t;typeof t=="string"&&(r=this.buildNet([{match:t}]));let n=this.tokenize(e),a=nP(n,r);return a.found?(a.compute(["index","tagger"]),a.match(t)):n.none()},iP={lib:{lazy:aP}},oP=function(e,t){const r=e.methods.two.transform.verb.conjugate;let n=r(t,e.model);return e.has("#Gerund")?n.Gerund:e.has("#PastTense")?n.PastTense:e.has("#PresentTense")?n.PresentTense:e.has("#Gerund")?n.Gerund:t},sP=function(e,t){let r=t;return e.forEach(n=>{n.has("#Infinitive")||(r=oP(n,t)),n.replaceWith(r)}),e},uP=function(e,t){let r=t;if(e.has("#Plural")){const n=e.methods.two.transform.noun.toPlural;r=n(t,e.model)}e.replaceWith(r,{possessives:!0})},lP=function(e,t){const{toAdverb:r}=e.methods.two.transform.adjective;let a=r(t);a&&e.replaceWith(a)},cP=function(e,t){const{toComparative:r,toSuperlative:n}=e.methods.two.transform.adjective;let a=t;e.has("#Comparative")?a=r(a,e.model):e.has("#Superlative")&&(a=n(a,e.model)),a&&e.replaceWith(a)},fP=function(e,t,r){let n=e.split(/ /g).map(i=>i.toLowerCase().trim());n=n.filter(i=>i),n=n.map(i=>`{${i}}`).join(" ");let a=this.match(n);return r&&(a=a.if(r)),a.has("#Verb")?sP(a,t):a.has("#Noun")?uP(a,t):a.has("#Adverb")?lP(a,t):a.has("#Adjective")?cP(a,t):this},mP=function(e){e.prototype.swap=fP},dP={api:mP};et.plugin(LF);et.plugin(y5);et.plugin(tP);et.plugin(iP);et.plugin(dP);const vo=function(e){const{fromComparative:t,fromSuperlative:r}=e.methods.two.transform.adjective;let n=e.text("normal");return e.has("#Comparative")?t(n,e.model):e.has("#Superlative")?r(n,e.model):n},hP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Adjectives"}json(n={}){const{toAdverb:a,toNoun:i,toSuperlative:o,toComparative:s}=this.methods.two.transform.adjective;return n.normal=!0,this.map(u=>{let l=u.toView().json(n)[0]||{},c=vo(u);return l.adjective={adverb:a(c,this.model),noun:i(c,this.model),superlative:o(c,this.model),comparative:s(c,this.model)},l},[])}adverbs(){return this.before("#Adverb+$").concat(this.after("^#Adverb+"))}conjugate(n){const{toComparative:a,toSuperlative:i,toNoun:o,toAdverb:s}=this.methods.two.transform.adjective;return this.getNth(n).map(u=>{let l=vo(u);return{Adjective:l,Comparative:a(l,this.model),Superlative:i(l,this.model),Noun:o(l,this.model),Adverb:s(l,this.model)}},[])}toComparative(n){const{toComparative:a}=this.methods.two.transform.adjective;return this.getNth(n).map(i=>{let o=vo(i),s=a(o,this.model);return i.replaceWith(s)})}toSuperlative(n){const{toSuperlative:a}=this.methods.two.transform.adjective;return this.getNth(n).map(i=>{let o=vo(i),s=a(o,this.model);return i.replaceWith(s)})}toAdverb(n){const{toAdverb:a}=this.methods.two.transform.adjective;return this.getNth(n).map(i=>{let o=vo(i),s=a(o,this.model);return i.replaceWith(s)})}toNoun(n){const{toNoun:a}=this.methods.two.transform.adjective;return this.getNth(n).map(i=>{let o=vo(i),s=a(o,this.model);return i.replaceWith(s)})}}e.prototype.adjectives=function(r){let n=this.match("#Adjective");return n=n.getNth(r),new t(n.document,n.pointer)},e.prototype.superlatives=function(r){let n=this.match("#Superlative");return n=n.getNth(r),new t(n.document,n.pointer)},e.prototype.comparatives=function(r){let n=this.match("#Comparative");return n=n.getNth(r),new t(n.document,n.pointer)}},pP={api:hP},gP=function(e){return e.compute("root").text("root")},vP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Adverbs"}conjugate(n){return this.getNth(n).map(a=>{let i=gP(a);return{Adverb:a.text("normal"),Adjective:i}},[])}json(n={}){const a=this.methods.two.transform.adjective.fromAdverb;return n.normal=!0,this.map(i=>{let o=i.toView().json(n)[0]||{};return o.adverb={adjective:a(o.normal)},o},[])}}e.prototype.adverbs=function(r){let n=this.match("#Adverb");return n=n.getNth(r),new t(n.document,n.pointer)}},yP={api:vP},bP=function(e){let t=e.match("@hasComma");return t=t.filter(r=>{if(r.growLeft(".").wordCount()===1||r.growRight(". .").wordCount()===1)return!1;let n=r.grow(".");return n=n.ifNo("@hasComma @hasComma"),n=n.ifNo("@hasComma (and|or) ."),n=n.ifNo("(#City && @hasComma) #Country"),n=n.ifNo("(#WeekDay && @hasComma) #Date"),n=n.ifNo("(#Date+ && @hasComma) #Value"),n=n.ifNo("(#Adjective && @hasComma) #Adjective"),n.found}),e.splitAfter(t)},wP=function(e){let t=e.parentheses();return t=t.filter(r=>r.wordCount()>=3&&r.has("#Verb")&&r.has("#Noun")),e.splitOn(t)},xP=function(e){let t=e.quotations();return t=t.filter(r=>r.wordCount()>=3&&r.has("#Verb")&&r.has("#Noun")),e.splitOn(t)},DP=function(e){let t=this;t=wP(t),t=xP(t),t=bP(t),t=t.splitAfter("(@hasEllipses|@hasSemicolon|@hasDash|@hasColon)"),t=t.splitAfter("^#Pronoun (said|says)"),t=t.splitBefore("(said|says) #ProperNoun$"),t=t.splitBefore(". . if .{4}"),t=t.splitBefore("and while"),t=t.splitBefore("now that"),t=t.splitBefore("ever since"),t=t.splitBefore("(supposing|although)"),t=t.splitBefore("even (while|if|though)"),t=t.splitBefore("(whereas|whose)"),t=t.splitBefore("as (though|if)"),t=t.splitBefore("(til|until)");let r=t.match("#Verb .* [but] .* #Verb",0);r.found&&(t=t.splitBefore(r));let n=t.if("if .{2,9} then .").match("then");return t=t.splitBefore(n),typeof e=="number"&&(t=t.get(e)),t},NP=function(e){let t=[],r=null;return e.clauses().docs.forEach(i=>{i.forEach(o=>{!o.chunk||o.chunk!==r?(r=o.chunk,t.push([o.index[0],o.index[1],o.index[1]+1])):t[t.length-1][2]=o.index[1]+1}),r=null}),e.update(t)},AP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Chunks"}isVerb(){return this.filter(n=>n.has("<Verb>"))}isNoun(){return this.filter(n=>n.has("<Noun>"))}isAdjective(){return this.filter(n=>n.has("<Adjective>"))}isPivot(){return this.filter(n=>n.has("<Pivot>"))}debug(){return this.toView().debug("chunks"),this}update(n){let a=new t(this.document,n);return a._cache=this._cache,a}}e.prototype.chunks=function(r){let n=NP(this);return n=n.getNth(r),new t(this.document,n.pointer)},e.prototype.clauses=DP},Ip={this:"Noun",then:"Pivot"},CP=function(e){for(let t=0;t<e.length;t+=1)for(let r=0;r<e[t].length;r+=1){let n=e[t][r];if(Ip.hasOwnProperty(n.normal)===!0){n.chunk=Ip[n.normal];continue}if(n.tags.has("Verb")){n.chunk="Verb";continue}if(n.tags.has("Noun")||n.tags.has("Determiner")){n.chunk="Noun";continue}if(n.tags.has("Value")){n.chunk="Noun";continue}if(n.tags.has("QuestionWord")){n.chunk="Pivot";continue}}},EP=function(e){for(let t=0;t<e.length;t+=1)for(let r=0;r<e[t].length;r+=1){let n=e[t][r];if(n.chunk)continue;let a=e[t][r+1],i=e[t][r-1];if(n.tags.has("Adjective")){if(i&&i.tags.has("Copula")){n.chunk="Adjective";continue}if(i&&i.tags.has("Determiner")){n.chunk="Noun";continue}if(a&&a.tags.has("Noun")){n.chunk="Noun";continue}continue}if(n.tags.has("Adverb")||n.tags.has("Negative")){if(i&&i.tags.has("Adjective")){n.chunk="Adjective";continue}if(i&&i.tags.has("Verb")){n.chunk="Verb";continue}if(a&&a.tags.has("Adjective")){n.chunk="Adjective";continue}if(a&&a.tags.has("Verb")){n.chunk="Verb";continue}}}},SP=[{match:"[that] #Determiner #Noun",group:0,chunk:"Pivot"},{match:"#PastTense [that]",group:0,chunk:"Pivot"},{match:"[so] #Determiner",group:0,chunk:"Pivot"},{match:"#Copula #Adverb+? [#Adjective]",group:0,chunk:"Adjective"},{match:"#Adjective and #Adjective",chunk:"Adjective"},{match:"#Adverb+ and #Adverb #Verb",chunk:"Verb"},{match:"#Gerund #Adjective$",chunk:"Verb"},{match:"#Gerund to #Verb",chunk:"Verb"},{match:"#PresentTense and #PresentTense",chunk:"Verb"},{match:"#Adverb #Negative",chunk:"Verb"},{match:"(want|wants|wanted) to #Infinitive",chunk:"Verb"},{match:"#Verb #Reflexive",chunk:"Verb"},{match:"#Verb [to] #Adverb? #Infinitive",group:0,chunk:"Verb"},{match:"[#Preposition] #Gerund",group:0,chunk:"Verb"},{match:"#Infinitive [that] <Noun>",group:0,chunk:"Verb"},{match:"#Noun of #Determiner? #Noun",chunk:"Noun"},{match:"#Value+ #Adverb? #Adjective",chunk:"Noun"},{match:"the [#Adjective] #Noun",chunk:"Noun"},{match:"#Singular in #Determiner? #Singular",chunk:"Noun"},{match:"#Plural [in] #Determiner? #Noun",group:0,chunk:"Pivot"},{match:"#Noun and #Determiner? #Noun",notIf:"(#Possessive|#Pronoun)",chunk:"Noun"}];let nf=null;const MP=function(e,t,r){const{methods:n}=r;nf=nf||n.one.buildNet(SP,r),e.sweep(nf)},af=function(e,t){if((typeof process>"u"||!process.env?self.env||{}:process.env).DEBUG_CHUNKS){let n=(e.normal+"'").padEnd(8);console.log(` | '${n} → \x1B[34m${t.padEnd(12)}\x1B[0m \x1B[2m -fallback- \x1B[0m`)}e.chunk=t},TP=function(e){for(let t=0;t<e.length;t+=1)for(let r=0;r<e[t].length;r+=1){let n=e[t][r];n.chunk===void 0&&(n.tags.has("Conjunction")||n.tags.has("Preposition")?af(n,"Pivot"):n.tags.has("Adverb")?af(n,"Verb"):n.chunk="Noun")}},FP=function(e){let t=[],r=null;e.forEach(n=>{for(let a=0;a<n.length;a+=1){let i=n[a];r&&i.chunk===r?t[t.length-1].terms.push(i):(t.push({chunk:i.chunk,terms:[i]}),r=i.chunk)}}),t.forEach(n=>{n.chunk==="Verb"&&(n.terms.find(i=>i.tags.has("Verb"))||n.terms.forEach(i=>i.chunk=null))})},PP=function(e){const{document:t,world:r}=e;CP(t),EP(t),MP(e,t,r),TP(t),FP(t)},kP={chunks:PP},OP={compute:kP,api:AP,hooks:["chunks"]},Pu=/\./g,BP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Acronyms"}strip(){return this.docs.forEach(n=>{n.forEach(a=>{a.text=a.text.replace(Pu,""),a.normal=a.normal.replace(Pu,"")})}),this}addPeriods(){return this.docs.forEach(n=>{n.forEach(a=>{a.text=a.text.replace(Pu,""),a.normal=a.normal.replace(Pu,""),a.text=a.text.split("").join(".")+".",a.normal=a.normal.split("").join(".")+"."})}),this}}e.prototype.acronyms=function(r){let n=this.match("#Acronym");return n=n.getNth(r),new t(n.document,n.pointer)}},_w=/\(/,Iw=/\)/,$P=function(e,t){for(;t<e.length;t+=1)if(e[t].post&&Iw.test(e[t].post)){let[,r]=e[t].index;return r=r||0,r}return null},_P=function(e){let t=[];return e.docs.forEach(r=>{for(let n=0;n<r.length;n+=1){let a=r[n];if(a.pre&&_w.test(a.pre)){let i=$P(r,n);if(i!==null){let[o,s]=r[n].index;t.push([o,s,i+1,r[n].id]),n=i}}}}),e.update(t)},IP=function(e){return e.docs.forEach(t=>{t[0].pre=t[0].pre.replace(_w,"");let r=t[t.length-1];r.post=r.post.replace(Iw,"")}),e},zP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Possessives"}strip(){return IP(this)}}e.prototype.parentheses=function(r){let n=_P(this);return n=n.getNth(r),new t(n.document,n.pointer)}},zp=/'s$/,jP=function(e){let t=e.match("#Possessive+");return t.has("#Person")&&(t=t.growLeft("#Person+")),t.has("#Place")&&(t=t.growLeft("#Place+")),t.has("#Organization")&&(t=t.growLeft("#Organization+")),t},qP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Possessives"}strip(){return this.docs.forEach(n=>{n.forEach(a=>{a.text=a.text.replace(zp,""),a.normal=a.normal.replace(zp,"")})}),this}}e.prototype.possessives=function(r){let n=jP(this);return n=n.getNth(r),new t(n.document,n.pointer)}},_l={'"':'"',""":""","'":"'","“":"”","‘":"’","‟":"”","‛":"’","„":"”","⹂":"”","‚":"’","«":"»","‹":"›","‵":"′","‶":"″","‷":"‴","〝":"〞","`":"´","〟":"〞"},hd=RegExp("["+Object.keys(_l).join("")+"]"),RP=RegExp("["+Object.values(_l).join("")+"]"),LP=function(e,t){const r=e[t].pre.match(hd)[0]||"";if(!r||!_l[r])return null;const n=_l[r];for(;t<e.length;t+=1)if(e[t].post&&e[t].post.match(n))return t;return null},HP=function(e){let t=[];return e.docs.forEach(r=>{for(let n=0;n<r.length;n+=1){let a=r[n];if(a.pre&&hd.test(a.pre)){let i=LP(r,n);if(i!==null){let[o,s]=r[n].index;t.push([o,s,i+1,r[n].id]),n=i}}}}),e.update(t)},GP=function(e){e.docs.forEach(t=>{t[0].pre=t[0].pre.replace(hd,"");let r=t[t.length-1];r.post=r.post.replace(RP,"")})},VP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Possessives"}strip(){return GP(this)}}e.prototype.quotations=function(r){let n=HP(this);return n=n.getNth(r),new t(n.document,n.pointer)}},UP=function(e){let t=this.splitAfter("@hasComma");return t=t.match("#PhoneNumber+"),t=t.getNth(e),t},WP=[["hyphenated","@hasHyphen ."],["hashTags","#HashTag"],["emails","#Email"],["emoji","#Emoji"],["emoticons","#Emoticon"],["atMentions","#AtMention"],["urls","#Url"],["conjunctions","#Conjunction"],["prepositions","#Preposition"],["abbreviations","#Abbreviation"],["honorifics","#Honorific"]];let JP=[["emojis","emoji"],["atmentions","atMentions"]];const KP=function(e){WP.forEach(t=>{e.prototype[t[0]]=function(r){let n=this.match(t[1]);return typeof r=="number"?n.get(r):n}}),e.prototype.phoneNumbers=UP,JP.forEach(t=>{e.prototype[t[0]]=e.prototype[t[1]]})},YP=/\//,ZP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Slashes"}split(){return this.map(n=>{let i=n.text().split(YP);return n=n.replaceWith(i.join(" ")),n.growRight("("+i.join("|")+")+")})}}e.prototype.slashes=function(r){let n=this.match("#SlashedTerm");return n=n.getNth(r),new t(n.document,n.pointer)}},QP={api:function(e){BP(e),zP(e),qP(e),VP(e),KP(e),ZP(e)}},ku=function(e,t){e.docs.forEach(r=>{r.forEach(t)})},jp={case:e=>{ku(e,t=>{t.text=t.text.toLowerCase()})},unicode:e=>{const t=e.world,r=t.methods.one.killUnicode;ku(e,n=>n.text=r(n.text,t))},whitespace:e=>{ku(e,t=>{t.post=t.post.replace(/\s+/g," "),t.post=t.post.replace(/\s([.,?!:;])/g,"$1"),t.pre=t.pre.replace(/\s+/g,"")})},punctuation:e=>{ku(e,n=>{n.post=n.post.replace(/[–—-]/g," "),n.post=n.post.replace(/[,:;]/g,""),n.post=n.post.replace(/\.{2,}/g,""),n.post=n.post.replace(/\?{2,}/g,"?"),n.post=n.post.replace(/!{2,}/g,"!"),n.post=n.post.replace(/\?!+/g,"?")});let t=e.docs,r=t[t.length-1];if(r&&r.length>0){let n=r[r.length-1];n.post=n.post.replace(/ /g,"")}},contractions:e=>{e.contractions().expand()},acronyms:e=>{e.acronyms().strip()},parentheses:e=>{e.parentheses().strip()},possessives:e=>{e.possessives().strip()},quotations:e=>{e.quotations().strip()},emoji:e=>{e.emojis().remove()},honorifics:e=>{e.match("#Honorific+ #Person").honorifics().remove()},adverbs:e=>{e.adverbs().remove()},nouns:e=>{e.nouns().toSingular()},verbs:e=>{e.verbs().toInfinitive()},numbers:e=>{e.numbers().toNumber()},debullet:e=>{const t=/^\s*([-–—*•])\s*$/;return e.docs.forEach(r=>{t.test(r[0].pre)&&(r[0].pre=r[0].pre.replace(t,""))}),e}},of=e=>e.split("|").reduce((t,r)=>(t[r]=!0,t),{}),sf="unicode|punctuation|whitespace|acronyms",qp="|case|contractions|parentheses|quotations|emoji|honorifics|debullet",XP="|possessives|adverbs|nouns|verbs",ek={light:of(sf),medium:of(sf+qp),heavy:of(sf+qp+XP)};function tk(e){e.prototype.normalize=function(t="light"){return typeof t=="string"&&(t=ek[t]),Object.keys(t).forEach(r=>{jp.hasOwnProperty(r)&&jp[r](this,t[r])}),this}}const rk={api:tk},nk=function(e){let t=e.clauses().match("<Noun>"),r=t.match("@hasComma");return r=r.not("#Place"),r.found&&(t=t.splitAfter(r)),t=t.splitOn("#Expression"),t=t.splitOn("(he|she|we|you|they|i)"),t=t.splitOn("(#Noun|#Adjective) [(he|him|she|it)]",0),t=t.splitOn("[(he|him|she|it)] (#Determiner|#Value)",0),t=t.splitBefore("#Noun [(the|a|an)] #Adjective? #Noun",0),t=t.splitOn("[(here|there)] #Noun",0),t=t.splitOn("[#Noun] (here|there)",0),t=t.splitBefore("(our|my|their|your)"),t=t.splitOn("#Noun [#Determiner]",0),t=t.if("#Noun"),t},Rp=["after","although","as if","as long as","as","because","before","even if","even though","ever since","if","in order that","provided that","since","so that","than","that","though","unless","until","what","whatever","when","whenever","where","whereas","wherever","whether","which","whichever","who","whoever","whom","whomever","whose"],ak=function(e){if(e.before("#Preposition$").found)return!0;if(!e.before().found)return!1;for(let r=0;r<Rp.length;r+=1)if(e.has(Rp[r]))return!0;return!1},ik="(#Pronoun|#Place|#Value|#Person|#Uncountable|#Month|#WeekDay|#Holiday|#Possessive)",ok=function(e,t){if(e.has("#Plural")||e.has("#Noun and #Noun")||e.has("(we|they)"))return!0;if(t.has(ik)===!0||e.has("#Singular"))return!1;let r=t.text("normal");return r.length>3&&r.endsWith("s")&&!r.endsWith("ss")},sk=function(e){let t=e.clone();return t=t.match("#Noun+"),t=t.remove("(#Adjective|#Preposition|#Determiner|#Value)"),t=t.not("#Possessive"),t=t.first(),t.found?t:e},Ya=function(e){let t=sk(e);return{determiner:e.match("#Determiner").eq(0),adjectives:e.match("#Adjective"),number:e.values(),isPlural:ok(e,t),isSubordinate:ak(e),root:t}},Lp=e=>e.text(),uk=e=>e.json({terms:!1,normal:!0}).map(t=>t.normal),lk=function(e){let t=null;if(!e.found)return t;let r=e.values(0);return r.found?(r.parse()[0]||{}).num:t},ck=function(e){let t=Ya(e);return{root:Lp(t.root),number:lk(t.number),determiner:Lp(t.determiner),adjectives:uk(t.adjectives),isPlural:t.isPlural,isSubordinate:t.isSubordinate}},zw=function(e){return!e.has("^(#Uncountable|#ProperNoun|#Place|#Pronoun|#Acronym)+$")},fk={tags:!0},mk=function(e,t){if(t.isPlural===!0||(t.root.has("#Possessive")&&(t.root=t.root.possessives().strip()),!zw(t.root)))return e;const{methods:r,model:n}=e.world,{toPlural:a}=r.two.transform.noun;let i=t.root.text({keepPunct:!1}),o=a(i,n);e.match(t.root).replaceWith(o,fk).tag("Plural","toPlural"),t.determiner.has("(a|an)")&&e.remove(t.determiner);let s=t.root.after("not? #Adverb+? [#Copula]",0);return s.found&&(s.has("is")?e.replace(s,"are"):s.has("was")&&e.replace(s,"were")),e},dk={tags:!0},hk=function(e,t){if(t.isPlural===!1)return e;const{methods:r,model:n}=e.world,{toSingular:a}=r.two.transform.noun;let i=t.root.text("normal"),o=a(i,n);return e.replace(t.root,o,dk).tag("Singular","toPlural"),e},pk=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Nouns"}parse(n){return this.getNth(n).map(Ya)}json(n){let a=typeof n=="object"?n:{};return this.getNth(n).map(i=>{let o=i.toView().json(a)[0]||{};return a&&a.noun!==!1&&(o.noun=ck(i)),o},[])}conjugate(n){const a=this.world.methods.two.transform.noun;return this.getNth(n).map(i=>{let o=Ya(i),s=o.root.compute("root").text("root"),u={Singular:s};return zw(o.root)&&(u.Plural=a.toPlural(s,this.model)),u.Singular===u.Plural&&delete u.Plural,u},[])}isPlural(n){return this.filter(i=>Ya(i).isPlural).getNth(n)}isSingular(n){return this.filter(i=>!Ya(i).isPlural).getNth(n)}adjectives(n){let a=this.update([]);return this.forEach(i=>{let o=Ya(i).adjectives;o.found&&(a=a.concat(o))}),a.getNth(n)}toPlural(n){return this.getNth(n).map(a=>mk(a,Ya(a)))}toSingular(n){return this.getNth(n).map(a=>{let i=Ya(a);return hk(a,i)})}update(n){let a=new t(this.document,n);return a._cache=this._cache,a}}e.prototype.nouns=function(r){let n=nk(this);return n=n.getNth(r),new t(this.document,n.pointer)}},gk={api:pk},vk=function(e,t){let r=e.match("#Fraction+");return r=r.filter(n=>!n.lookBehind("#Value and$").found),r=r.notIf("#Value seconds"),r},yk=e=>{const t=[{reg:/^(minus|negative)[\s-]/i,mult:-1},{reg:/^(a\s)?half[\s-](of\s)?/i,mult:.5}];for(let r=0;r<t.length;r++)if(t[r].reg.test(e)===!0)return{amount:t[r].mult,str:e.replace(t[r].reg,"")};return{amount:1,str:e}},nr={ones:{zeroth:0,first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,zero:0,one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9},teens:{tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,ten:10,eleven:11,twelve:12,thirteen:13,fourteen:14,fifteen:15,sixteen:16,seventeen:17,eighteen:18,nineteen:19},tens:{twentieth:20,thirtieth:30,fortieth:40,fourtieth:40,fiftieth:50,sixtieth:60,seventieth:70,eightieth:80,ninetieth:90,twenty:20,thirty:30,forty:40,fourty:40,fifty:50,sixty:60,seventy:70,eighty:80,ninety:90},multiples:{hundredth:100,thousandth:1e3,millionth:1e6,billionth:1e9,trillionth:1e12,quadrillionth:1e15,quintillionth:1e18,sextillionth:1e21,septillionth:1e24,hundred:100,thousand:1e3,million:1e6,billion:1e9,trillion:1e12,quadrillion:1e15,quintillion:1e18,sextillion:1e21,septillion:1e24,grand:1e3}},bk=(e,t)=>{if(nr.ones.hasOwnProperty(e)){if(t.ones||t.teens)return!1}else if(nr.teens.hasOwnProperty(e)){if(t.ones||t.teens||t.tens)return!1}else if(nr.tens.hasOwnProperty(e)&&(t.ones||t.teens||t.tens))return!1;return!0},wk=function(e){let t="0.";for(let r=0;r<e.length;r++){let n=e[r];if(nr.ones.hasOwnProperty(n)===!0)t+=nr.ones[n];else if(nr.teens.hasOwnProperty(n)===!0)t+=nr.teens[n];else if(nr.tens.hasOwnProperty(n)===!0)t+=nr.tens[n];else if(/^[0-9]$/.test(n)===!0)t+=n;else return 0}return parseFloat(t)},xk=e=>(e=e.replace(/1st$/,"1"),e=e.replace(/2nd$/,"2"),e=e.replace(/3rd$/,"3"),e=e.replace(/([4567890])r?th$/,"$1"),e=e.replace(/^[$€¥£¢]/,""),e=e.replace(/[%$€¥£¢]$/,""),e=e.replace(/,/g,""),e=e.replace(/([0-9])([a-z\u00C0-\u00FF]{1,2})$/,"$1"),e),Dk=/^([0-9,. ]+)\/([0-9,. ]+)$/,Hp={"a few":3,"a couple":2,"a dozen":12,"two dozen":24,zero:0},Ou=e=>Object.keys(e).reduce((t,r)=>(t+=e[r],t),0),lm=function(e){if(Hp.hasOwnProperty(e)===!0)return Hp[e];if(e==="a"||e==="an")return 1;const t=yk(e);e=t.str;let r=null,n={},a=0,i=!1;const o=e.split(/[ -]/);for(let s=0;s<o.length;s++){let u=o[s];if(u=xk(u),!u||u==="and")continue;if(u==="-"||u==="negative"){i=!0;continue}if(u.charAt(0)==="-"&&(i=!0,u=u.substring(1)),u==="point")return a+=Ou(n),a+=wk(o.slice(s+1,o.length)),a*=t.amount,a;const l=u.match(Dk);if(l){const c=parseFloat(l[1].replace(/[, ]/g,"")),f=parseFloat(l[2].replace(/[, ]/g,""));f&&(a+=c/f||0);continue}if(nr.tens.hasOwnProperty(u)&&n.ones&&Object.keys(n).length===1&&(a=n.ones*100,n={}),bk(u,n)===!1)return null;if(/^[0-9.]+$/.test(u))n.ones=parseFloat(u);else if(nr.ones.hasOwnProperty(u)===!0)n.ones=nr.ones[u];else if(nr.teens.hasOwnProperty(u)===!0)n.teens=nr.teens[u];else if(nr.tens.hasOwnProperty(u)===!0)n.tens=nr.tens[u];else if(nr.multiples.hasOwnProperty(u)===!0){let c=nr.multiples[u];if(c===r)return null;if(c===100&&o[s+1]!==void 0){const f=o[s+1];nr.multiples[f]&&(c*=nr.multiples[f],s+=1)}r===null||c<r?(a+=(Ou(n)||1)*c,r=c,n={}):(a+=Ou(n),r=c,a=(a||1)*c,n={})}}return a+=Ou(n),a*=t.amount,a*=i?-1:1,a===0&&Object.keys(n).length===0?null:a},Gp=/s$/,Is=function(e){let t=e.text("reduced");return lm(t)};let Il={half:2,halve:2,quarter:4};const Nk=function(e){let r=e.text("reduced").match(/^([-+]?[0-9]+)\/([-+]?[0-9]+)(st|nd|rd|th)?s?$/);return r&&r[1]&&r[0]?{numerator:Number(r[1]),denominator:Number(r[2])}:null},Ak=function(e){let t=e.match("[<num>#Value+] out of every? [<den>#Value+]");if(t.found!==!0)return null;let{num:r,den:n}=t.groups();return!r||!n||(r=Is(r),n=Is(n),!r||!n)?null:typeof r=="number"&&typeof n=="number"?{numerator:r,denominator:n}:null},Ck=function(e){let t=e.match("[<num>(#Cardinal|a)+] [<den>#Fraction+]");if(t.found!==!0)return null;let{num:r,den:n}=t.groups();r.has("a")?r=1:r=Is(r);let a=n.text("reduced");return Gp.test(a)&&(a=a.replace(Gp,""),n=n.replaceWith(a)),Il.hasOwnProperty(a)?n=Il[a]:n=Is(n),typeof r=="number"&&typeof n=="number"?{numerator:r,denominator:n}:null},Ek=function(e){let t=e.match("^#Ordinal$");return t.found!==!0?null:e.lookAhead("^of .")?{numerator:1,denominator:Is(t)}:null},Sk=function(e){let t=e.text("reduced");return Il.hasOwnProperty(t)?{numerator:1,denominator:Il[t]}:null},Mk=e=>{let t=Math.round(e*1e3)/1e3;return t===0&&e!==0?e:t},Ca=function(e){e=e.clone();let t=Sk(e)||Nk(e)||Ak(e)||Ck(e)||Ek(e)||null;return t!==null&&t.numerator&&t.denominator&&(t.decimal=t.numerator/t.denominator,t.decimal=Mk(t.decimal)),t},pd=function(e){if(e<1e6)return String(e);let t;return typeof e=="number"?t=e.toFixed(0):t=e,t.indexOf("e+")===-1?t:t.replace(".","").split("e+").reduce(function(r,n){return r+Array(n-r.length+2).join(0)})},Bu=[["ninety",90],["eighty",80],["seventy",70],["sixty",60],["fifty",50],["forty",40],["thirty",30],["twenty",20]],Vp=["","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],Tk=[[1e24,"septillion"],[1e20,"hundred sextillion"],[1e21,"sextillion"],[1e20,"hundred quintillion"],[1e18,"quintillion"],[1e17,"hundred quadrillion"],[1e15,"quadrillion"],[1e14,"hundred trillion"],[1e12,"trillion"],[1e11,"hundred billion"],[1e9,"billion"],[1e8,"hundred million"],[1e6,"million"],[1e5,"hundred thousand"],[1e3,"thousand"],[100,"hundred"],[1,"one"]],Fk=function(e){let t=e,r=[];return Tk.forEach(n=>{if(e>=n[0]){let a=Math.floor(t/n[0]);t-=a*n[0],a&&r.push({unit:n[1],count:a})}}),r},Pk=function(e){let t=[];if(e>100)return t;for(let r=0;r<Bu.length;r++)e>=Bu[r][1]&&(e-=Bu[r][1],t.push(Bu[r][0]));return Vp[e]&&t.push(Vp[e]),t},kk=e=>{const t=["zero","one","two","three","four","five","six","seven","eight","nine"];let r=[],a=pd(e).match(/\.([0-9]+)/);if(!a||!a[0])return r;r.push("point");let i=a[0].split("");for(let o=0;o<i.length;o++)r.push(t[i[o]]);return r},zs=function(e){let t=e.num;if(t===0||t==="0")return"zero";t>1e21&&(t=pd(t));let r=[];t<0&&(r.push("minus"),t=Math.abs(t));let n=Fk(t);for(let a=0;a<n.length;a++){let i=n[a].unit;i==="one"&&(i="",r.length>1&&r.push("and")),r=r.concat(Pk(n[a].count)),r.push(i)}return r=r.concat(kk(t)),r=r.filter(a=>a),r.length===0&&(r[0]=""),r.join(" ")},Ok=function(e){if(!e.numerator||!e.denominator)return"";let t=zs({num:e.numerator}),r=zs({num:e.denominator});return`${t} out of ${r}`},Up={one:"first",two:"second",three:"third",five:"fifth",eight:"eighth",nine:"ninth",twelve:"twelfth",twenty:"twentieth",thirty:"thirtieth",forty:"fortieth",fourty:"fourtieth",fifty:"fiftieth",sixty:"sixtieth",seventy:"seventieth",eighty:"eightieth",ninety:"ninetieth"},jw=e=>{let t=zs(e).split(" "),r=t[t.length-1];return Up.hasOwnProperty(r)?t[t.length-1]=Up[r]:t[t.length-1]=r.replace(/y$/,"i")+"th",t.join(" ")},Bk=function(e){if(!e.numerator||!e.denominator)return"";let t=zs({num:e.numerator}),r=jw({num:e.denominator});return e.denominator===2&&(r="half"),t&&r?(e.numerator!==1&&(r+="s"),`${t} ${r}`):""},$k=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Fractions"}parse(n){return this.getNth(n).map(Ca)}get(n){return this.getNth(n).map(Ca)}json(n){return this.getNth(n).map(a=>{let i=a.toView().json(n)[0],o=Ca(a);return i.fraction=o,i},[])}toDecimal(n){return this.getNth(n).forEach(a=>{let{decimal:i}=Ca(a);a=a.replaceWith(String(i),!0),a.tag("NumericValue"),a.unTag("Fraction")}),this}toFraction(n){return this.getNth(n).forEach(a=>{let i=Ca(a);if(i&&typeof i.numerator=="number"&&typeof i.denominator=="number"){let o=`${i.numerator}/${i.denominator}`;this.replace(a,o)}}),this}toOrdinal(n){return this.getNth(n).forEach(a=>{let i=Ca(a),o=Bk(i);a.after("^#Noun").found&&(o+=" of"),a.replaceWith(o)}),this}toCardinal(n){return this.getNth(n).forEach(a=>{let i=Ca(a),o=Ok(i);a.replaceWith(o)}),this}toPercentage(n){return this.getNth(n).forEach(a=>{let{decimal:i}=Ca(a),o=i*100;o=Math.round(o*100)/100,a.replaceWith(`${o}%`)}),this}}e.prototype.fractions=function(r){let n=vk(this);return n=n.getNth(r),new t(this.document,n.pointer)}},_k="one|two|three|four|five|six|seven|eight|nine",Wa="twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety|fourty",Ik="eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen",uf=function(e){let t=e.match("#Value+");if(t.has("#NumericValue #NumericValue")&&(t.has("#Value @hasComma #Value")?t.splitAfter("@hasComma"):t.has("#NumericValue #Fraction")?t.splitAfter("#NumericValue #Fraction"):t=t.splitAfter("#NumericValue")),t.has("#Value #Value #Value")&&!t.has("#Multiple")&&t.has("("+Wa+") #Cardinal #Cardinal")&&(t=t.splitAfter("("+Wa+") #Cardinal")),t.has("#Value #Value")){t.has("#NumericValue #NumericValue")&&(t=t.splitOn("#Year")),t.has("("+Wa+") ("+Ik+")")&&(t=t.splitAfter("("+Wa+")"));let r=t.match("#Cardinal #Cardinal");if(r.found&&!t.has("(point|decimal|#Fraction)")&&!r.has("#Cardinal (#Multiple|point|decimal)")){let n=t.has(`(${_k}) (${Wa})`),a=r.has("("+Wa+") #Cardinal"),i=r.has("#Multiple #Value");!n&&!a&&!i&&r.terms().forEach(o=>{t=t.splitOn(o)})}t.match("#Ordinal #Ordinal").match("#TextValue").found&&!t.has("#Multiple")&&(t.has("("+Wa+") #Ordinal")||(t=t.splitAfter("#Ordinal"))),t=t.splitBefore("#Ordinal [#Cardinal]",0),t.has("#TextValue #NumericValue")&&!t.has("("+Wa+"|#Multiple)")&&(t=t.splitBefore("#TextValue #NumericValue"))}return t=t.splitAfter("#NumberRange"),t=t.splitBefore("#Year"),t},zk=function(e,t){e=e.replace(/,/g,"");let r=e.split(/([0-9.,]*)/),[n,a]=r,i=r.slice(2).join("");return a!==""&&t.length<2?(a=Number(a||e),typeof a!="number"&&(a=null),i=i||"",(i==="st"||i==="nd"||i==="rd"||i==="th")&&(i=""),{prefix:n||"",num:a,suffix:i}):null},Er=function(e){if(typeof e=="string")return{num:lm(e)};let t=e.text("reduced"),r=e.growRight("#Unit").match("#Unit$").text("machine"),n=/[0-9],[0-9]/.test(e.text("text"));if(e.terms().length===1&&!e.has("#Multiple")){let s=zk(t,e);if(s!==null)return s.hasComma=n,s.unit=r,s}let a=e.match("#Fraction{2,}$");a=a.found===!1?e.match("^#Fraction$"):a;let i=null;a.found&&(a.has("#Value and #Value #Fraction")&&(a=a.match("and #Value #Fraction")),i=Ca(a),e=e.not(a),e=e.not("and$"),t=e.text("reduced"));let o=0;return t&&(o=lm(t)||0),i&&i.decimal&&(o+=i.decimal),{hasComma:n,prefix:"",num:o,suffix:"",isOrdinal:e.has("#Ordinal"),isText:e.has("#TextValue"),isFraction:e.has("#Fraction"),isMoney:e.has("#Money"),unit:r}},jk=function(e){let t=e.num;if(!t&&t!==0)return null;let r=t%100;if(r>10&&r<20)return String(t)+"th";const n={0:"th",1:"st",2:"nd",3:"rd"};let a=pd(t),i=a.slice(a.length-1,a.length);return n[i]?a+=n[i]:a+="th",a},Wp={"¢":"cents",$:"dollars","£":"pounds","¥":"yen","€":"euros","₡":"colón","฿":"baht","₭":"kip","₩":"won","₹":"rupees","₽":"ruble","₺":"liras"},Jp={"%":"percent","°":"degrees"},Kp=function(e){let t={suffix:"",prefix:e.prefix};return Wp.hasOwnProperty(e.prefix)&&(t.suffix+=" "+Wp[e.prefix],t.prefix=""),Jp.hasOwnProperty(e.suffix)&&(t.suffix+=" "+Jp[e.suffix]),t.suffix&&e.num===1&&(t.suffix=t.suffix.replace(/s$/,"")),!t.suffix&&e.suffix&&(t.suffix+=" "+e.suffix),t},Fi=function(e,t){if(t==="TextOrdinal"){let{prefix:n,suffix:a}=Kp(e);return n+jw(e)+a}if(t==="Ordinal")return e.prefix+jk(e)+e.suffix;if(t==="TextCardinal"){let{prefix:n,suffix:a}=Kp(e);return n+zs(e)+a}let r=e.num;return e.hasComma&&(r=r.toLocaleString()),e.prefix+String(r)+e.suffix},qk=e=>Object.prototype.toString.call(e)==="[object Array]",Rk=function(e){if(typeof e=="string"||typeof e=="number"){let t={};return t[e]=!0,t}return qk(e)?e.reduce((t,r)=>(t[r]=!0,t),{}):e||{}},Lk=function(e,t={}){return t=Rk(t),e.filter(r=>{let{unit:n}=Er(r);return!!(n&&t[n]===!0)})},Hk=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Numbers"}parse(n){return this.getNth(n).map(Er)}get(n){return this.getNth(n).map(Er).map(a=>a.num)}json(n){let a=typeof n=="object"?n:{};return this.getNth(n).map(i=>{let o=i.toView().json(a)[0],s=Er(i);return o.number={prefix:s.prefix,num:s.num,suffix:s.suffix,hasComma:s.hasComma,unit:s.unit},o},[])}units(){return this.growRight("#Unit").match("#Unit$")}isUnit(n){return Lk(this,n)}isOrdinal(){return this.if("#Ordinal")}isCardinal(){return this.if("#Cardinal")}toNumber(){let n=this.map(a=>{if(!this.has("#TextValue"))return a;let i=Er(a);if(i.num===null)return a;let o=a.has("#Ordinal")?"Ordinal":"Cardinal",s=Fi(i,o);return a.replaceWith(s,{tags:!0}),a.tag("NumericValue")});return new t(n.document,n.pointer)}toLocaleString(){return this.forEach(a=>{let i=Er(a);if(i.num===null)return;let o=i.num.toLocaleString();if(a.has("#Ordinal")){let u=Fi(i,"Ordinal").match(/[a-z]+$/);u&&(o+=u[0]||"")}a.replaceWith(o,{tags:!0})}),this}toText(){let a=this.map(i=>{if(i.has("#TextValue"))return i;let o=Er(i);if(o.num===null)return i;let s=i.has("#Ordinal")?"TextOrdinal":"TextCardinal",u=Fi(o,s);return i.replaceWith(u,{tags:!0}),i.tag("TextValue"),i});return new t(a.document,a.pointer)}toCardinal(){let a=this.map(i=>{if(!i.has("#Ordinal"))return i;let o=Er(i);if(o.num===null)return i;let s=i.has("#TextValue")?"TextCardinal":"Cardinal",u=Fi(o,s);return i.replaceWith(u,{tags:!0}),i.tag("Cardinal"),i});return new t(a.document,a.pointer)}toOrdinal(){let a=this.map(i=>{if(i.has("#Ordinal"))return i;let o=Er(i);if(o.num===null)return i;let s=i.has("#TextValue")?"TextOrdinal":"Ordinal",u=Fi(o,s);return i.replaceWith(u,{tags:!0}),i.tag("Ordinal"),i});return new t(a.document,a.pointer)}isEqual(n){return this.filter(a=>Er(a).num===n)}greaterThan(n){return this.filter(a=>Er(a).num>n)}lessThan(n){return this.filter(a=>Er(a).num<n)}between(n,a){return this.filter(i=>{let o=Er(i).num;return o>n&&o<a})}set(n){if(n===void 0)return this;typeof n=="string"&&(n=Er(n).num);let i=this.map(o=>{let s=Er(o);if(s.num=n,s.num===null)return o;let u=o.has("#Ordinal")?"Ordinal":"Cardinal";o.has("#TextValue")&&(u=o.has("#Ordinal")?"TextOrdinal":"TextCardinal");let l=Fi(s,u);return s.hasComma&&u==="Cardinal"&&(l=Number(l).toLocaleString()),o=o.not("#Currency"),o.replaceWith(l,{tags:!0}),o});return new t(i.document,i.pointer)}add(n){if(!n)return this;typeof n=="string"&&(n=Er(n).num);let i=this.map(o=>{let s=Er(o);if(s.num===null)return o;s.num+=n;let u=o.has("#Ordinal")?"Ordinal":"Cardinal";s.isText&&(u=o.has("#Ordinal")?"TextOrdinal":"TextCardinal");let l=Fi(s,u);return o.replaceWith(l,{tags:!0}),o});return new t(i.document,i.pointer)}subtract(n,a){return this.add(n*-1,a)}increment(n){return this.add(1,n)}decrement(n){return this.add(-1,n)}update(n){let a=new t(this.document,n);return a._cache=this._cache,a}}t.prototype.toNice=t.prototype.toLocaleString,t.prototype.isBetween=t.prototype.between,t.prototype.minus=t.prototype.subtract,t.prototype.plus=t.prototype.add,t.prototype.equals=t.prototype.isEqual,e.prototype.numbers=function(r){let n=uf(this);return n=n.getNth(r),new t(this.document,n.pointer)},e.prototype.percentages=function(r){let n=uf(this);return n=n.filter(a=>a.has("#Percent")||a.after("^percent")),n=n.getNth(r),new t(this.document,n.pointer)},e.prototype.money=function(r){let n=uf(this);return n=n.filter(a=>a.has("#Money")||a.after("^#Currency")),n=n.getNth(r),new t(this.document,n.pointer)},e.prototype.values=e.prototype.numbers},Gk=function(e){$k(e),Hk(e)},Vk={api:Gk},Uk={people:!0,emails:!0,phoneNumbers:!0,places:!0},Wk=function(e={}){return e=Object.assign({},Uk,e),e.people!==!1&&this.people().replaceWith("██████████"),e.emails!==!1&&this.emails().replaceWith("██████████"),e.places!==!1&&this.places().replaceWith("██████████"),e.phoneNumbers!==!1&&this.phoneNumbers().replaceWith("███████"),this},Jk={api:function(e){e.prototype.redact=Wk}},Kk=function(e){let t=e.clauses();return/\.\.$/.test(e.out("text"))||e.has("^#QuestionWord")&&e.has("@hasComma")?!1:!!(e.has("or not$")||e.has("^#QuestionWord")||e.has("^(do|does|did|is|was|can|could|will|would|may) #Noun")||e.has("^(have|must) you")||t.has("(do|does|is|was) #Noun+ #Adverb? (#Adjective|#Infinitive)$"))},Yk=function(e){const t=/\?/,{document:r}=e;return e.filter(n=>{let a=n.docs[0]||[],i=a[a.length-1];return!i||r[i.index[0]].length!==a.length?!1:t.test(i.post)?!0:Kk(n)})},Zk="(after|although|as|because|before|if|since|than|that|though|when|whenever|where|whereas|wherever|whether|while|why|unless|until|once)",Qk="(that|which|whichever|who|whoever|whom|whose|whomever)",Xk=function(e){let t=e;return t.length===1||(t=t.if("#Verb"),t.length===1)||(t=t.ifNo(Zk),t=t.ifNo("^even (if|though)"),t=t.ifNo("^so that"),t=t.ifNo("^rather than"),t=t.ifNo("^provided that"),t.length===1)||(t=t.ifNo(Qk),t.length===1)||(t=t.ifNo("(^despite|^during|^before|^through|^throughout)"),t.length===1)||(t=t.ifNo("^#Gerund"),t.length===1)?t:(t.length===0&&(t=e),t.eq(0))},eO=function(e){let t=null;return e.has("#PastTense")?t="PastTense":e.has("#FutureTense")?t="FutureTense":e.has("#PresentTense")&&(t="PresentTense"),{tense:t}},Pi=function(e){let t=e.clauses(),n=Xk(t).chunks(),a=e.none(),i=e.none(),o=e.none();return n.forEach((s,u)=>{if(u===0&&!s.has("<Verb>")){a=s;return}if(!i.found&&s.has("<Verb>")){i=s;return}i.found&&(o=o.concat(s))}),i.found&&!a.found&&(a=i.before("<Noun>+").first()),{subj:a,verb:i,pred:o,grammar:eO(i)}},tO=function(e){let t=e.verbs(),r=t.eq(0);if(r.has("#PastTense"))return e;if(r.toPastTense(),t.length>1){t=t.slice(1),t=t.filter(a=>!a.lookBehind("to$").found),t=t.if("#PresentTense"),t=t.notIf("#Gerund");let n=e.match("to #Verb+ #Conjunction #Verb").terms();t=t.not(n),t.found&&t.verbs().toPastTense()}return e},rO=function(e){let t=e.verbs();return t.eq(0).toPresentTense(),t.length>1&&(t=t.slice(1),t=t.filter(n=>!n.lookBehind("to$").found),t=t.notIf("#Gerund"),t.found&&t.verbs().toPresentTense()),e},nO=function(e){let t=e.verbs();if(t.eq(0).toFutureTense(),e=e.fullSentence(),t=e.verbs(),t.length>1){t=t.slice(1);let n=t.filter(a=>a.lookBehind("to$").found?!1:a.has("#Copula #Gerund")?!0:a.has("#Gerund")?!1:a.has("#Copula")?!0:!(a.has("#PresentTense")&&!a.has("#Infinitive")&&a.lookBefore("(he|she|it|that|which)$").found));n.found&&n.forEach(a=>{if(a.has("#Copula")){a.match("was").replaceWith("is"),a.match("is").replaceWith("will be");return}a.toInfinitive()})}return e},aO=function(e){return e.verbs().first().toNegative().compute("chunks"),e},iO=function(e){return e.verbs().first().toPositive().compute("chunks"),e},oO=function(e){return e.verbs().toInfinitive(),e},sO=function(e){class t extends e{constructor(a,i,o){super(a,i,o),this.viewType="Sentences"}json(a={}){return this.map(i=>{let o=i.toView().json(a)[0]||{},{subj:s,verb:u,pred:l,grammar:c}=Pi(i);return o.sentence={subject:s.text("normal"),verb:u.text("normal"),predicate:l.text("normal"),grammar:c},o},[])}toPastTense(a){return this.getNth(a).map(i=>(Pi(i),tO(i)))}toPresentTense(a){return this.getNth(a).map(i=>(Pi(i),rO(i)))}toFutureTense(a){return this.getNth(a).map(i=>(Pi(i),i=nO(i),i))}toInfinitive(a){return this.getNth(a).map(i=>(Pi(i),oO(i)))}toNegative(a){return this.getNth(a).map(i=>(Pi(i),aO(i)))}toPositive(a){return this.getNth(a).map(i=>(Pi(i),iO(i)))}isQuestion(a){return this.questions(a)}isExclamation(a){return this.filter(o=>o.lastTerm().has("@hasExclamation")).getNth(a)}isStatement(a){return this.filter(o=>!o.isExclamation().found&&!o.isQuestion().found).getNth(a)}update(a){let i=new t(this.document,a);return i._cache=this._cache,i}}t.prototype.toPresent=t.prototype.toPresentTense,t.prototype.toPast=t.prototype.toPastTense,t.prototype.toFuture=t.prototype.toFutureTense;const r={sentences:function(n){let a=this.map(i=>i.fullSentence());return a=a.getNth(n),new t(this.document,a.pointer)},questions:function(n){return Yk(this).getNth(n)}};Object.assign(e.prototype,r)},uO={api:sO},lO=function(e){let t=e.splitAfter("@hasComma");t=t.match("#Honorific+? #Person+");let r=t.match("#Possessive").notIf("(his|her)");return t=t.splitAfter(r),t},Yp=function(e){let t={};t.firstName=e.match("#FirstName+"),t.lastName=e.match("#LastName+"),t.honorific=e.match("#Honorific+");let r=t.lastName,n=t.firstName;return(!n.found||!r.found)&&!n.found&&!r.found&&e.has("^#Honorific .$")&&(t.lastName=e.match(".$")),t},Sn="male",Hr="female",Zp={mr:Sn,mrs:Hr,miss:Hr,madam:Hr,king:Sn,queen:Hr,duke:Sn,duchess:Hr,baron:Sn,baroness:Hr,count:Sn,countess:Hr,prince:Sn,princess:Hr,sire:Sn,dame:Hr,lady:Hr,ayatullah:Sn,congressman:Sn,congresswoman:Hr,"first lady":Hr,mx:null},cO=function(e,t){let{firstName:r,honorific:n}=e;if(r.has("#FemaleName"))return Hr;if(r.has("#MaleName"))return Sn;if(n.found){let i=n.text("normal");if(i=i.replace(/\./g,""),Zp.hasOwnProperty(i))return Zp[i];if(/^her /.test(i))return Hr;if(/^his /.test(i))return Sn}let a=t.after();if(!a.has("#Person")&&a.has("#Pronoun")){let i=a.match("#Pronoun");if(i.has("(they|their)"))return null;let o=i.has("(he|his)"),s=i.has("(she|her|hers)");if(o&&!s)return Sn;if(s&&!o)return Hr}return null},fO=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="People"}parse(n){return this.getNth(n).map(Yp)}json(n){let a=typeof n=="object"?n:{};return this.getNth(n).map(i=>{let o=i.toView().json(a)[0],s=Yp(i);return o.person={firstName:s.firstName.text("normal"),lastName:s.lastName.text("normal"),honorific:s.honorific.text("normal"),presumed_gender:cO(s,i)},o},[])}presumedMale(){return this.filter(n=>n.has("(#MaleName|mr|mister|sr|jr|king|pope|prince|sir)"))}presumedFemale(){return this.filter(n=>n.has("(#FemaleName|mrs|miss|queen|princess|madam)"))}update(n){let a=new t(this.document,n);return a._cache=this._cache,a}}e.prototype.people=function(r){let n=lO(this);return n=n.getNth(r),new t(this.document,n.pointer)}},mO=function(e){let t=e.match("(#Place|#Address)+"),r=t.match("@hasComma");return r=r.filter(n=>n.has("(asia|africa|europe|america)$")?!0:!(n.has("(#City|#Region|#ProperNoun)$")&&n.after("^(#Country|#Region)").found)),t=t.splitAfter(r),t},dO=function(e){e.prototype.places=function(t){let r=mO(this);return r=r.getNth(t),new e(this.document,r.pointer)}},hO=function(e){e.prototype.organizations=function(t){return this.match("#Organization+").getNth(t)}},pO=function(e){let t=this.clauses(),r=t.people();return r=r.concat(t.places()),r=r.concat(t.organizations()),r=r.not("(someone|man|woman|mother|brother|sister|father)"),r=r.sort("seq"),r=r.getNth(e),r},gO=function(e){e.prototype.topics=pO},vO=function(e){fO(e),dO(e),hO(e),gO(e)},yO={api:vO},bO=function(e){let t=e.match("<Verb>");return t=t.not("#Conjunction"),t=t.not("#Preposition"),t=t.splitAfter("@hasComma"),t=t.splitAfter("[(do|did|am|was|is|will)] (is|was)",0),t=t.splitBefore("(#Verb && !#Copula) [being] #Verb",0),t=t.splitBefore("#Verb [to be] #Verb",0),t=t.splitAfter("[help] #PresentTense",0),t=t.splitBefore("(#PresentTense|#PastTense) [#Copula]$",0),t=t.splitBefore("(#PresentTense|#PastTense) [will be]$",0),t=t.splitBefore("(#PresentTense|#PastTense) [(had|has)]",0),t=t.not("#Reflexive$"),t=t.not("#Adjective"),t=t.splitAfter("[#PastTense] #PastTense",0),t=t.splitAfter("[#PastTense] #Auxiliary+ #PastTense",0),t=t.splitAfter("#Copula [#Gerund] #PastTense",0),t=t.if("#Verb"),t.has("(#Verb && !#Auxiliary) #Adverb+? #Copula")&&(t=t.splitBefore("#Copula")),t},wO=function(e){let t=e;return e.wordCount()>1&&(t=e.not("(#Negative|#Auxiliary|#Modal|#Adverb|#Prefix)")),t.length>1&&!t.has("#Phrasal #Particle")&&(t=t.last()),t=t.not("(want|wants|wanted) to"),t.found||(t=e.not("#Negative")),t},xO=function(e,t){let r={pre:e.none(),post:e.none()};if(!e.has("#Adverb"))return r;let n=e.splitOn(t);return n.length===3?{pre:n.eq(0).adverbs(),post:n.eq(2).adverbs()}:n.eq(0).isDoc(t)?(r.post=n.eq(1).adverbs(),r):(r.pre=n.eq(0).adverbs(),r)},DO=function(e,t){let r=e.splitBefore(t);if(r.length<=1)return e.none();let n=r.eq(0);return n=n.not("(#Adverb|#Negative|#Prefix)"),n},NO=function(e){return e.match("#Negative")},AO=function(e){if(!e.has("(#Particle|#PhrasalVerb)"))return{verb:e.none(),particle:e.none()};let t=e.match("#Particle$");return{verb:e.not(t),particle:t}},Gn=function(e){let t=e.clone();t.contractions().expand();const r=wO(t);return{root:r,prefix:t.match("#Prefix"),adverbs:xO(t,r),auxiliary:DO(t,r),negative:NO(t),phrasal:AO(r)}},Rn={tense:"PresentTense"},$u={conditional:!0},wa={tense:"FutureTense"},yo={progressive:!0},pr={tense:"PastTense"},bo={complete:!0,progressive:!1},Ja={passive:!0},CO={plural:!0},EO={plural:!1},SO=function(e){let t={};return e.forEach(r=>{Object.assign(t,r)}),t},Qp={imperative:[["#Imperative",[]]],"want-infinitive":[["^(want|wants|wanted) to #Infinitive$",[Rn]],["^wanted to #Infinitive$",[pr]],["^will want to #Infinitive$",[wa]]],"gerund-phrase":[["^#PastTense #Gerund$",[pr]],["^#PresentTense #Gerund$",[Rn]],["^#Infinitive #Gerund$",[Rn]],["^will #Infinitive #Gerund$",[wa]],["^have #PastTense #Gerund$",[pr]],["^will have #PastTense #Gerund$",[pr]]],"simple-present":[["^#PresentTense$",[Rn]],["^#Infinitive$",[Rn]]],"simple-past":[["^#PastTense$",[pr]]],"simple-future":[["^will #Adverb? #Infinitive",[wa]]],"present-progressive":[["^(is|are|am) #Gerund$",[Rn,yo]]],"past-progressive":[["^(was|were) #Gerund$",[pr,yo]]],"future-progressive":[["^will be #Gerund$",[wa,yo]]],"present-perfect":[["^(has|have) #PastTense$",[pr,bo]]],"past-perfect":[["^had #PastTense$",[pr,bo]],["^had #PastTense to #Infinitive",[pr,bo]]],"future-perfect":[["^will have #PastTense$",[wa,bo]]],"present-perfect-progressive":[["^(has|have) been #Gerund$",[pr,yo]]],"past-perfect-progressive":[["^had been #Gerund$",[pr,yo]]],"future-perfect-progressive":[["^will have been #Gerund$",[wa,yo]]],"passive-past":[["(got|were|was) #Passive",[pr,Ja]],["^(was|were) being #Passive",[pr,Ja]],["^(had|have) been #Passive",[pr,Ja]]],"passive-present":[["^(is|are|am) #Passive",[Rn,Ja]],["^(is|are|am) being #Passive",[Rn,Ja]],["^has been #Passive",[Rn,Ja]]],"passive-future":[["will have been #Passive",[wa,Ja,$u]],["will be being? #Passive",[wa,Ja,$u]]],"present-conditional":[["would be #PastTense",[Rn,$u]]],"past-conditional":[["would have been #PastTense",[pr,$u]]],"auxiliary-future":[["(is|are|am|was) going to (#Infinitive|#PresentTense)",[wa]]],"auxiliary-past":[["^did #Infinitive$",[pr,EO]],["^used to #Infinitive$",[pr,bo]]],"auxiliary-present":[["^(does|do) #Infinitive$",[Rn,bo,CO]]],"modal-past":[["^(could|must|should|shall) have #PastTense$",[pr]]],"modal-infinitive":[["^#Modal #Infinitive$",[]]],infinitive:[["^#Infinitive$",[]]]};let cm=[];Object.keys(Qp).map(e=>{Qp[e].forEach(t=>{cm.push({name:e,match:t[0],data:SO(t[1])})})});const MO=function(e,t){return e=e.clone(),t.adverbs.post&&t.adverbs.post.found&&e.remove(t.adverbs.post),t.adverbs.pre&&t.adverbs.pre.found&&e.remove(t.adverbs.pre),e.has("#Negative")&&(e=e.remove("#Negative")),e.has("#Prefix")&&(e=e.remove("#Prefix")),t.root.has("#PhrasalVerb #Particle")&&e.remove("#Particle$"),e=e.not("#Adverb"),e},TO=function(e){return!!(e.has("#Infinitive")&&e.growLeft("to").has("^to #Infinitive"))},Ea=function(e,t){let r={};e=MO(e,t);for(let n=0;n<cm.length;n+=1){let a=cm[n];if(e.has(a.match)===!0){r.form=a.name,Object.assign(r,a.data);break}}return r.form||e.has("^#Verb$")&&(r.form="infinitive"),r.tense||(r.tense=t.root.has("#PastTense")?"PastTense":"PresentTense"),r.copula=t.root.has("#Copula"),r.isInfinitive=TO(e),r},Xp=function(e){return e.length<=1?!1:(e.parse()[0]||{}).isSubordinate},FO=function(e){let t=e.clauses();return t=t.filter((r,n)=>!(r.has("^(if|unless|while|but|for|per|at|by|that|which|who|from)")||n>0&&r.has("^#Verb . #Noun+$")||n>0&&r.has("^#Adverb"))),t.length===0?e:t},PO=function(e){let t=e.before();t=FO(t);let r=t.nouns(),n=r.last(),a=n.match("(i|he|she|we|you|they)");if(a.found)return a.nouns();let i=r.if("^(that|this|those)");return i.found||r.found===!1&&(i=t.match("^(that|this|those)"),i.found)?i:(n=r.last(),Xp(n)&&(r.remove(n),n=r.last()),Xp(n)&&(r.remove(n),n=r.last()),n)},kO=function(e,t){return t.has("(are|were|does)")||e.has("(those|they|we)")?!0:e.found&&e.isPlural?e.isPlural().found:!1},la=function(e){let t=PO(e);return{subject:t,plural:kO(t,e)}},qt=e=>e,Ts=(e,t)=>{let r=la(e),n=r.subject;return n.has("i")||n.has("we")?!0:r.plural},OO=(e,t)=>{let{subject:r,plural:n}=la(e);return n||r.has("we")?"were":"was"},Fs=function(e,t){if(e.has("were"))return"are";let{subject:r,plural:n}=la(e);return r.has("i")?"am":r.has("we")||n?"are":"is"},gd=function(e,t){let r=la(e),n=r.subject;return n.has("i")||n.has("we")||r.plural?"do":"does"},pn=function(e){if(e.has("#Infinitive"))return"Infinitive";if(e.has("#Participle"))return"Participle";if(e.has("#PastTense"))return"PastTense";if(e.has("#Gerund"))return"Gerund";if(e.has("#PresentTense"))return"PresentTense"},fm=function(e,t){const{toInfinitive:r}=e.methods.two.transform.verb;let n=t.root.text({keepPunct:!1});return n=r(n,e.model,pn(e)),n&&e.replace(t.root,n),e},eg=e=>e.has("will not")?e.replace("will not","have not"):e.remove("will"),tg=function(e){if(!e||!e.isView)return[];const t={normal:!0,terms:!1,text:!1};return e.json(t).map(r=>r.normal)},rg=function(e){return!e||!e.isView?"":e.text("normal")},BO=function(e){const{toInfinitive:t}=e.methods.two.transform.verb;let r=e.text("normal");return t(r,e.model,pn(e))},$O=function(e){let t=Gn(e);e=e.clone().toView();const r=Ea(e,t);return{root:t.root.text(),preAdverbs:tg(t.adverbs.pre),postAdverbs:tg(t.adverbs.post),auxiliary:rg(t.auxiliary),negative:t.negative.found,prefix:rg(t.prefix),infinitive:BO(t.root),grammar:r}},_O={tags:!0},IO=function(e,t){const{toInfinitive:r}=e.methods.two.transform.verb,{root:n,auxiliary:a}=t;let i=a.terms().harden(),o=n.text("normal");if(o=r(o,e.model,pn(n)),o&&e.replace(n,o,_O).tag("Verb").firstTerm().tag("Infinitive"),i.found&&e.remove(i),t.negative.found){e.has("not")||e.prepend("not");let s=gd(e);e.prepend(s)}return e.fullSentence().compute(["freeze","lexicon","preTagger","postTagger","unfreeze","chunks"]),e},En={tags:!0},Sa={noAux:(e,t)=>(t.auxiliary.found&&(e=e.remove(t.auxiliary)),e),simple:(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,a=t.root;if(a.has("#Modal"))return e;let i=a.text({keepPunct:!1});return i=n(i,e.model,pn(a)),i=r(i,e.model).PastTense,i=i==="been"?"was":i,i==="was"&&(i=OO(e)),i&&e.replace(a,i,En),e},both:function(e,t){return t.negative.found?(e.replace("will","did"),e):(e=Sa.simple(e,t),e=Sa.noAux(e,t),e)},hasHad:e=>(e.replace("has","had",En),e),hasParticiple:(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,a=t.root;let i=a.text("normal");return i=n(i,e.model,pn(a)),r(i,e.model).Participle}},ng={infinitive:Sa.simple,"simple-present":Sa.simple,"simple-past":qt,"simple-future":Sa.both,"present-progressive":e=>(e.replace("are","were",En),e.replace("(is|are|am)","was",En),e),"past-progressive":qt,"future-progressive":(e,t)=>(e.match(t.root).insertBefore("was"),e.remove("(will|be)"),e),"present-perfect":Sa.hasHad,"past-perfect":qt,"future-perfect":(e,t)=>(e.match(t.root).insertBefore("had"),e.has("will")&&(e=eg(e)),e.remove("have"),e),"present-perfect-progressive":Sa.hasHad,"past-perfect-progressive":qt,"future-perfect-progressive":e=>(e.remove("will"),e.replace("have","had",En),e),"passive-past":e=>(e.replace("have","had",En),e),"passive-present":e=>(e.replace("(is|are)","was",En),e),"passive-future":(e,t)=>(t.auxiliary.has("will be")&&(e.match(t.root).insertBefore("had been"),e.remove("(will|be)")),t.auxiliary.has("will have been")&&(e.replace("have","had",En),e.remove("will")),e),"present-conditional":e=>(e.replace("be","have been"),e),"past-conditional":qt,"auxiliary-future":e=>(e.replace("(is|are|am)","was",En),e),"auxiliary-past":qt,"auxiliary-present":e=>(e.replace("(do|does)","did",En),e),"modal-infinitive":(e,t)=>(e.has("can")?e.replace("can","could",En):(Sa.simple(e,t),e.match("#Modal").insertAfter("have").tag("Auxiliary")),e),"modal-past":qt,"want-infinitive":e=>(e.replace("(want|wants)","wanted",En),e.remove("will"),e),"gerund-phrase":(e,t)=>(t.root=t.root.not("#Gerund$"),Sa.simple(e,t),eg(e),e)},zO=function(e,t,r){return ng.hasOwnProperty(r)&&(e=ng[r](e,t),e.fullSentence().compute(["tagger","chunks"])),e},mm=function(e,t){let r=la(e),n=r.subject;return n.has("(i|we|you)")?"have":r.plural===!1||n.has("he")||n.has("she")||n.has("#Person")?"has":"have"},dm=(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,{root:a,auxiliary:i}=t;if(a.has("#Modal"))return e;let o=a.text({keepPunct:!1});o=n(o,e.model,pn(a));let s=r(o,e.model);if(o=s.Participle||s.PastTense,o){e=e.replace(a,o);let u=mm(e);e.prepend(u).match(u).tag("Auxiliary"),e.remove(i)}return e},ag={infinitive:dm,"simple-present":dm,"simple-future":(e,t)=>e.replace("will",mm(e)),"present-perfect":qt,"past-perfect":qt,"future-perfect":(e,t)=>e.replace("will have",mm(e)),"present-perfect-progressive":qt,"past-perfect-progressive":qt,"future-perfect-progressive":qt},jO=function(e,t,r){return ag.hasOwnProperty(r)?(e=ag[r](e,t),e.fullSentence().compute(["tagger","chunks"]),e):(e=dm(e,t),e.fullSentence().compute(["tagger","chunks"]),e)},Ta={tags:!0},wo=(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,a=t.root;let i=a.text("normal");return i=n(i,e.model,pn(a)),Ts(e)===!1&&(i=r(i,e.model).PresentTense),a.has("#Copula")&&(i=Fs(e)),i&&(e=e.replace(a,i,Ta),e.not("#Particle").tag("PresentTense")),e},ig=(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,a=t.root;let i=a.text("normal");return i=n(i,e.model,pn(a)),Ts(e)===!1&&(i=r(i,e.model).Gerund),i&&(e=e.replace(a,i,Ta),e.not("#Particle").tag("Gerund")),e},qO=(e,t)=>{const{toInfinitive:r}=e.methods.two.transform.verb,n=t.root;let a=t.root.text("normal");return a=r(a,e.model,pn(n)),a&&(e=e.replace(t.root,a,Ta)),e},og={infinitive:wo,"simple-present":(e,t)=>{const{conjugate:r}=e.methods.two.transform.verb;let{root:n}=t;if(n.has("#Infinitive")){let i=la(e).subject;if(Ts(e)||i.has("i"))return e;let o=n.text("normal"),s=r(o,e.model).PresentTense;o!==s&&e.replace(n,s,Ta)}else return wo(e,t);return e},"simple-past":wo,"simple-future":(e,t)=>{const{root:r,auxiliary:n}=t;if(n.has("will")&&r.has("be")){let a=Fs(e);e.replace(r,a),e=e.remove("will"),e.replace("not "+a,a+" not")}else wo(e,t),e=e.remove("will");return e},"present-progressive":qt,"past-progressive":(e,t)=>{let r=Fs(e);return e.replace("(were|was)",r,Ta)},"future-progressive":e=>(e.match("will").insertBefore("is"),e.remove("be"),e.remove("will")),"present-perfect":(e,t)=>(wo(e,t),e=e.remove("(have|had|has)"),e),"past-perfect":(e,t)=>{let n=la(e).subject;return Ts(e)||n.has("i")?(e=fm(e,t),e.remove("had"),e):(e.replace("had","has",Ta),e)},"future-perfect":e=>(e.match("will").insertBefore("has"),e.remove("have").remove("will")),"present-perfect-progressive":qt,"past-perfect-progressive":e=>e.replace("had","has",Ta),"future-perfect-progressive":e=>(e.match("will").insertBefore("has"),e.remove("have").remove("will")),"passive-past":(e,t)=>{let r=Fs(e);return e.has("(had|have|has)")&&e.has("been")?(e.replace("(had|have|has)",r,Ta),e.replace("been","being"),e):e.replace("(got|was|were)",r)},"passive-present":qt,"passive-future":e=>(e.replace("will","is"),e.replace("be","being")),"present-conditional":qt,"past-conditional":e=>(e.replace("been","be"),e.remove("have")),"auxiliary-future":(e,t)=>(ig(e,t),e.remove("(going|to)"),e),"auxiliary-past":(e,t)=>{if(t.auxiliary.has("did")){let r=gd(e);return e.replace(t.auxiliary,r),e}return ig(e,t),e.replace(t.auxiliary,"is"),e},"auxiliary-present":qt,"modal-infinitive":qt,"modal-past":(e,t)=>(qO(e,t),e.remove("have")),"gerund-phrase":(e,t)=>(t.root=t.root.not("#Gerund$"),wo(e,t),e.remove("(will|have)")),"want-infinitive":(e,t)=>{let r="wants";return Ts(e)&&(r="want"),e.replace("(want|wanted|wants)",r,Ta),e.remove("will"),e}},RO=function(e,t,r){return og.hasOwnProperty(r)&&(e=og[r](e,t),e.fullSentence().compute(["tagger","chunks"])),e},qw={tags:!0},_u=(e,t)=>{const{toInfinitive:r}=e.methods.two.transform.verb,{root:n,auxiliary:a}=t;if(n.has("#Modal"))return e;let i=n.text("normal");return i=r(i,e.model,pn(n)),i&&(e=e.replace(n,i,qw),e.not("#Particle").tag("Verb")),e.prepend("will").match("will").tag("Auxiliary"),e.remove(a),e},sg=(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,{root:a,auxiliary:i}=t;let o=a.text("normal");return o=n(o,e.model,pn(a)),o&&(o=r(o,e.model).Gerund,e.replace(a,o,qw),e.not("#Particle").tag("PresentTense")),e.remove(i),e.prepend("will be").match("will be").tag("Auxiliary"),e},ug={infinitive:_u,"simple-present":_u,"simple-past":_u,"simple-future":qt,"present-progressive":sg,"past-progressive":sg,"future-progressive":qt,"present-perfect":e=>(e.match("(have|has)").replaceWith("will have"),e),"past-perfect":e=>e.replace("(had|has)","will have"),"future-perfect":qt,"present-perfect-progressive":e=>e.replace("has","will have"),"past-perfect-progressive":e=>e.replace("had","will have"),"future-perfect-progressive":qt,"passive-past":e=>e.has("got")?e.replace("got","will get"):e.has("(was|were)")?(e.replace("(was|were)","will be"),e.remove("being")):e.has("(have|has|had) been")?e.replace("(have|has|had) been","will be"):e,"passive-present":e=>(e.replace("being","will be"),e.remove("(is|are|am)"),e),"passive-future":qt,"present-conditional":e=>e.replace("would","will"),"past-conditional":e=>e.replace("would","will"),"auxiliary-future":qt,"auxiliary-past":e=>e.has("used")&&e.has("to")?(e.replace("used","will"),e.remove("to")):(e.replace("did","will"),e),"auxiliary-present":e=>e.replace("(do|does)","will"),"modal-infinitive":qt,"modal-past":qt,"gerund-phrase":(e,t)=>(t.root=t.root.not("#Gerund$"),_u(e,t),e.remove("(had|have)")),"want-infinitive":e=>(e.replace("(want|wants|wanted)","will want"),e)},LO=function(e,t,r){return e.has("will")||e.has("going to")||ug.hasOwnProperty(r)&&(e=ug[r](e,t),e.fullSentence().compute(["tagger","chunks"])),e},HO={tags:!0},GO=function(e,t){const{toInfinitive:r,conjugate:n}=e.methods.two.transform.verb,{root:a,auxiliary:i}=t;if(e.has("#Gerund"))return e;let o=a.text("normal");o=r(o,e.model,pn(a));let s=n(o,e.model).Gerund;if(s){let u=Fs(e);e.replace(a,s,HO),e.remove(i),e.prepend(u)}return e.replace("not is","is not"),e.replace("not are","are not"),e.fullSentence().compute(["tagger","chunks"]),e},lg={tags:!0},lf=function(e,t){let r=gd(e);return e.prepend(r+" not"),e},Dl=function(e){let t=e.match("be");return t.found?(t.prepend("not"),e):(t=e.match("(is|was|am|are|will|were)"),t.found&&t.append("not"),e)},Nl=e=>e.has("(is|was|am|are|will|were|be)"),cg={"simple-present":(e,t)=>Nl(e)===!0?Dl(e):(e=fm(e,t),e=lf(e),e),"simple-past":(e,t)=>Nl(e)===!0?Dl(e):(e=fm(e,t),e.prepend("did not"),e),imperative:e=>(e.prepend("do not"),e),infinitive:(e,t)=>Nl(e)===!0?Dl(e):lf(e),"passive-past":e=>{if(e.has("got"))return e.replace("got","get",lg),e.prepend("did not"),e;let t=e.match("(was|were|had|have)");return t.found&&t.append("not"),e},"auxiliary-past":e=>{if(e.has("used"))return e.prepend("did not"),e;let t=e.match("(did|does|do)");return t.found&&t.append("not"),e},"want-infinitive":(e,t)=>(e=lf(e),e=e.replace("wants","want",lg),e)},VO=function(e,t,r){if(e.has("#Negative"))return e;if(cg.hasOwnProperty(r))return e=cg[r](e,t),e;let n=e.matchOne("be");return n.found?(n.prepend("not"),e):Nl(e)===!0?Dl(e):(n=e.matchOne("(will|had|have|has|did|does|do|#Modal)"),n.found&&n.append("not"),e)},UO=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Verbs"}parse(n){return this.getNth(n).map(Gn)}json(n,a){return this.getNth(a).map(s=>{let u=s.toView().json(n)[0]||{};return u.verb=$O(s),u},[])}subjects(n){return this.getNth(n).map(a=>(Gn(a),la(a).subject))}adverbs(n){return this.getNth(n).map(a=>a.match("#Adverb"))}isSingular(n){return this.getNth(n).filter(a=>la(a).plural!==!0)}isPlural(n){return this.getNth(n).filter(a=>la(a).plural===!0)}isImperative(n){return this.getNth(n).filter(a=>a.has("#Imperative"))}toInfinitive(n){return this.getNth(n).map(a=>{let i=Gn(a),o=Ea(a,i);return IO(a,i,o.form)})}toPresentTense(n){return this.getNth(n).map(a=>{let i=Gn(a),o=Ea(a,i);return o.isInfinitive?a:RO(a,i,o.form)})}toPastTense(n){return this.getNth(n).map(a=>{let i=Gn(a),o=Ea(a,i);return o.isInfinitive?a:zO(a,i,o.form)})}toFutureTense(n){return this.getNth(n).map(a=>{let i=Gn(a),o=Ea(a,i);return o.isInfinitive?a:LO(a,i,o.form)})}toGerund(n){return this.getNth(n).map(a=>{let i=Gn(a),o=Ea(a,i);return o.isInfinitive?a:GO(a,i,o.form)})}toPastParticiple(n){return this.getNth(n).map(a=>{let i=Gn(a),o=Ea(a,i);return o.isInfinitive?a:jO(a,i,o.form)})}conjugate(n){const{conjugate:a,toInfinitive:i}=this.world.methods.two.transform.verb;return this.getNth(n).map(o=>{let s=Gn(o),u=Ea(o,s);u.form==="imperative"&&(u.form="simple-present");let l=s.root.text("normal");if(!s.root.has("#Infinitive")){let c=pn(s.root);l=i(l,o.model,c)||l}return a(l,o.model)},[])}isNegative(){return this.if("#Negative")}isPositive(){return this.ifNo("#Negative")}toPositive(){let n=this.match("do not #Verb");return n.found&&n.remove("do not"),this.remove("#Negative")}toNegative(n){return this.getNth(n).map(a=>{let i=Gn(a),o=Ea(a,i);return VO(a,i,o.form)})}update(n){let a=new t(this.document,n);return a._cache=this._cache,a}}t.prototype.toPast=t.prototype.toPastTense,t.prototype.toPresent=t.prototype.toPresentTense,t.prototype.toFuture=t.prototype.toFutureTense,e.prototype.verbs=function(r){let n=bO(this);return n=n.getNth(r),new t(this.document,n.pointer)}},WO={api:UO},hm=function(e,t){let r=t.match(e);if(r.found){let n=r.pronouns().refersTo();if(n.found)return n}return t.none()},fg=function(e){if(!e.found)return e;let[t]=e.fullPointer[0];return t&&t>0?e.update([[t-1]]):e.none()},JO=function(e,t){return t==="m"?e.filter(r=>!r.presumedFemale().found):t==="f"?e.filter(r=>!r.presumedMale().found):e},mg=function(e,t){let r=e.people();return r=JO(r,t),r.found||(r=e.nouns("#Actor"),r.found)?r.last():t==="f"?hm("(she|her|hers)",e):t==="m"?hm("(he|him|his)",e):e.none()},KO=function(e){let t=e.nouns(),r=t.isPlural().notIf("#Pronoun");if(r.found)return r.last();let n=hm("(they|their|theirs)",e);return n.found?n:(r=t.match("(somebody|nobody|everybody|anybody|someone|noone|everyone|anyone)"),r.found?r.last():e.none())},YO=function(e,t){if(t&&t.found){let r=e.docs[0][0];r.reference=t.ptrs[0]}},cf=function(e,t){let r=e.before(),n=t(r);return n.found||(r=fg(e),n=t(r),n.found)||(r=fg(r),n=t(r),n.found)?n:e.none()},ZO=function(e){e.pronouns().if("(he|him|his|she|her|hers|they|their|theirs|it|its)").forEach(r=>{let n=null;r.has("(he|him|his)")?n=cf(r,a=>mg(a,"m")):r.has("(she|her|hers)")?n=cf(r,a=>mg(a,"f")):r.has("(they|their|theirs)")&&(n=cf(r,KO)),n&&n.found&&YO(r,n)})},QO=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Pronouns"}hasReference(){return this.compute("coreference"),this.filter(n=>n.docs[0][0].reference)}refersTo(){return this.compute("coreference"),this.map(n=>{if(!n.found)return n.none();let a=n.docs[0][0];return a.reference?n.update([a.reference]):n.none()})}update(n){let a=new t(this.document,n);return a._cache=this._cache,a}}e.prototype.pronouns=function(r){let n=this.match("#Pronoun");return n=n.getNth(r),new t(n.document,n.pointer)}},XO={compute:{coreference:ZO},api:QO};et.plugin(pP);et.plugin(yP);et.plugin(OP);et.plugin(XO);et.plugin(QP);et.plugin(rk);et.plugin(gk);et.plugin(Vk);et.plugin(Jk);et.plugin(uO);et.plugin(yO);et.plugin(WO);const eB=function(e){let t=null;return e.has("^(between|within) #Date")||(e.has("#Month")&&(t=e.match("[#Month #Value] and? #Month",0).ifNo("@hasDash$"),t.found&&(e=e.splitAfter(t)),t=e.match("[#Value #Month] and? #Value #Month",0),t.found&&(e=e.splitAfter(t)),t=e.match("^[#Month] and? #Month #Ordinal?$",0),t.found&&(e=e.splitAfter(t)),t=e.match("[#Month #Value] #Month",0).ifNo("@hasDash$"),t.found&&(e=e.splitAfter(t))),e.has("#WeekDay")&&(t=e.match("^[#WeekDay] and? #WeekDay$",0).ifNo("@hasDash$"),t.found&&(e=e.splitAfter(t)),t=e.match("#WeekDay #WeekDay and? #WeekDay"),t.found&&(e=e.splitOn("#WeekDay")),t=e.match("[#WeekDay] (and|or|this|next)? #WeekDay",0).ifNo("@hasDash$"),t.found&&(e=e.splitAfter("#WeekDay"))),t=e.match("(this|next) #Duration [(today|tomorrow|yesterday)]",0),t.found&&(e=e.splitBefore(t)),t=e.match("[(today|tomorrow|yesterday)] #Value #Month",0),t.found&&(e=e.splitAfter(t)),t=e.match("[(today|tomorrow|yesterday)] (today|tomorrow|yesterday|#WeekDay)",0).ifNo("@hasDash$"),t.found&&(e=e.splitAfter(t)),t=e.match("#Year [and] #Year",0),t.found&&(e=e.splitAfter(t)),e=e.not("^and"),e=e.not("and$")),e},tB=function(e){let t=e.match("#Date+");t=t.filter(n=>{let a=n.has("^#Duration+$")||n.has("^#Value #Duration+$");return a===!0&&n.has("(#FinancialQuarter|quarter)")?!0:a===!1});let r=t.match("[#Cardinal #Duration (in|on|this|next|during|for)] #Date",0);return r.found&&(t=t.not(r)),r=t.match("[#Cardinal #Duration] #WeekDay",0),r.found&&(t=t.not(r)),r=t.match("#Date [for #Value #Duration]$",0),r.found&&(t=t.not(r)),r=t.match("[#Cardinal #Duration] #Date",0),r.found&&!t.has("#Cardinal #Duration] (ago|from|before|after|back)")&&(t=t.not(r)),r=t.match("for #Cardinal #Duration"),r.found&&(t=t.not(r)),t=t.notIf("^one (#WeekDay|#Month)$"),t=eB(t),t=t.notIf("(#Money|#Percentage)"),t=t.notIf("^per #Duration"),t},rB={second:!0,minute:!0,hour:!0,day:!0,week:!0,weekend:!0,month:!0,season:!0,quarter:!0,year:!0},dg={wk:"week",min:"minute",sec:"second",weekend:"week"},ff=function(e){let t=e.match("#Duration").text("normal");return t=t.replace(/s$/,""),dg.hasOwnProperty(t)&&(t=dg[t]),t},nB=function(e){let t={},r=e.none(),n=e.match("#DateShift+");if(n.found===!1)return{res:t,m:r};if(n.match("#Cardinal #Duration").forEach(a=>{let i=a.match("#Cardinal").numbers().get()[0];if(i&&typeof i=="number"){let o=ff(a);rB[o]===!0&&(t[o]=i)}}),n.has("(before|ago|hence|back)$")===!0&&Object.keys(t).forEach(a=>t[a]*=-1),r=n.match("#Cardinal #Duration"),n=n.not(r),r=n.match("[<unit>#Duration] [<dir>(after|before)]"),r.found){let a=r.groups("unit").text("reduced"),i=r.groups("dir").text("reduced");i==="after"?t[a]=1:i==="before"&&(t[a]=-1)}if(r=n.match("half (a|an) [#Duration]",0),r.found){let a=ff(r);t[a]=.5}if(r=n.match("a (few|couple) [#Duration]",0),r.found){let a=ff(r);t[a]=r.has("few")?3:2}return r=e.match("#DateShift+"),{result:t,m:r}},aB={minute:!0},iB=function(e){let t=e.match("[<num>#Value] [<unit>#Duration+] (of|in)");if(t.found){let r=t.groups(),n=r.num.numbers().get()[0],a=r.unit.text("reduced"),i={unit:a,num:Number(n)||0};return aB[a]||(i.num-=1),{result:i,m:t}}if(t=e.match("[<dir>(first|initial|last|final)] [<unit>#Duration+] (of|in)"),t.found){let r=t.groups(),n=r.dir.text("reduced"),a=r.unit.text("reduced");return n==="initial"&&(n="first"),n==="final"&&(n="last"),{result:{unit:a,dir:n},m:t}}return{result:null,m:e.none()}},oB=3600*1e3,hg=(e,t,r)=>{const[n,a]=e.split("/"),[i,o]=a.split(":");return Date.UTC(r,n-1,i,o)-t*oB},Rw=(e,t,r,n,a)=>{const i=new Date(e).getUTCFullYear(),o=hg(t,a,i),s=hg(r,n,i);return e>=o&&e<s},sB=e=>{let r=e.timezones[e.tz];if(r===void 0)return console.warn("Warning: couldn't find timezone "+e.tz),0;if(r.dst===void 0)return r.offset;let n=r.offset,a=r.offset+1;r.hem==="n"&&(a=n-1);let i=r.dst.split("->");return Rw(e.epoch,i[0],i[1],n,a)===!0?n:a},pg={"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,2/yakutsk,11/palau,japan,rok","9.5|s|04/06:03->10/05:04":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/13:01->10/02:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west,singapore","8|n":"2/brunei,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator,2/choibalsan,hongkong,prc,roc","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/ho_chi_minh,2/tomsk,2/vientiane,2/saigon","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu","6.5|n":"2/yangon,9/cocos,2/rangoon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/kathmandu,2/katmandu","5.5|n":"2/kolkata,2/colombo,2/calcutta","4|s":"9/reunion","4|n":"2/baku,2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,9/mahe,9/mauritius,2/volgograd","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|04/25:02->10/30:24":"0/cairo,egypt","3|n|04/12:04->10/25:02":"2/gaza,2/hebron","3|n|03/30:05->10/26:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kyiv,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,8/kiev,eet","3|n|03/30:04->10/26:03":"8/chisinau,8/tiraspol","3|n|03/30:02->10/25:24":"2/beirut","3|n|03/28:04->10/26:02":"2/jerusalem,2/tel_aviv,israel","3|n":"0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/amman,2/baghdad,2/bahrain,2/damascus,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su","3.5|n":"2/tehran,iran","2|s|03/30:04->10/26:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|03/30:04->10/26:03":"0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met","2|n":"0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|03/30:03->10/26:02":"3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet","1|n":"0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s":"11/apia,11/tongatapu","13|n":"11/enderbury,11/kanton,11/fakaofo","12|s|04/06:03->09/28:04":"12/mcmurdo,11/auckland,12/south_pole,nz","12|s":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis,kwajalein","12.75|s|04/06:03->04/06:02":"11/chatham,nz-chat","11|s|04/06:03->10/05:04":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape","11.5|n|04/06:03->10/05:04":"11/norfolk","10|s|04/06:03->10/05:04":"4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland","10|n":"2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap","10.5|s|04/06:01->10/05:02":"4/lord_howe,4/lhi","0|s|02/23:03->04/06:04":"0/casablanca,0/el_aaiun","0|n|03/30:02->10/26:01":"3/azores","0|n|03/30:01->10/25:24":"1/scoresbysund","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory","-9|n|03/09:04->11/02:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/09:04->11/02:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"11/pitcairn","-7|n|03/09:04->11/02:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n":"1/creston,1/dawson,1/dawson_creek,1/fort_nelson,1/hermosillo,1/mazatlan,1/phoenix,1/whitehorse,6/yukon,10/bajasur,us/arizona,mst","-6|s|04/05:22->09/06:24":"11/easter,7/easterisland","-6|n|04/07:02->10/27:02":"1/merida","-6|n|03/09:04->11/02:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/ciudad_juarez,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain","-6|n":"1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|03/09:04->11/02:02":"1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan,jamaica,est","-4|s|04/05:24->09/07:02":"1/santiago,7/continental","-4|s|03/22:24->10/05:02":"1/asuncion","-4|s":"1/campo_grande,1/cuiaba,1/la_paz,1/manaus,5/west","-4|n|03/09:04->11/02:02":"1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan","-4|n|03/09:02->11/02:01":"1/havana,cuba","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s":"1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/palmer,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/comodrivadavia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/argentina/rosario,1/rosario,5/east","-3|n|03/09:04->11/02:02":"1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic","-3|n":"1/araguaina,1/bahia,1/belem,1/cayenne,1/maceio,1/paramaribo,1/recife,1/santarem","-2|n|03/09:04->11/02:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/09:04->11/02:02":"1/st_johns,6/newfoundland","-1|n|03/30:01->10/25:24":"1/nuuk,1/godthab","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa,us/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii,hst"},uB=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];let Go={};Object.keys(pg).forEach(e=>{let t=e.split("|"),r={offset:Number(t[0]),hem:t[1]};t[2]&&(r.dst=t[2]),pg[e].split(",").forEach(a=>{a=a.replace(/(^[0-9]+)\//,(i,o)=>(o=Number(o),uB[o]+"/")),Go[a]=r})});Go.utc={offset:0,hem:"n"};for(let e=-14;e<=14;e+=.5){let t=e;t>0&&(t="+"+t);let r="etc/gmt"+t;Go[r]={offset:e*-1,hem:"n"},r="utc/gmt"+t,Go[r]={offset:e*-1,hem:"n"}}const lB="utc",cB=()=>{if(typeof Intl>"u"||typeof Intl.DateTimeFormat>"u")return null;let e=Intl.DateTimeFormat();if(typeof e>"u"||typeof e.resolvedOptions>"u")return null;let t=e.resolvedOptions().timeZone;return t?t.toLowerCase():null},fB=()=>{let e=cB();return e===null?lB:e},mB=/(-?[0-9]+)h(rs)?/i,dB=/(-?[0-9]+)/,hB=/utc([\-+]?[0-9]+)/i,pB=/gmt([\-+]?[0-9]+)/i,Iu=function(e){return e=Number(e),e>=-13&&e<=13?(e=e*-1,e=(e>0?"+":"")+e,"etc/gmt"+e):null},gB=function(e){let t=e.match(mB);if(t!==null||(t=e.match(hB),t!==null))return Iu(t[1]);if(t=e.match(pB),t!==null){let r=Number(t[1])*-1;return Iu(r)}return t=e.match(dB),t!==null?Iu(t[1]):null};let zu=fB();const gg=Object.keys(Go).reduce((e,t)=>{let r=t.split("/")[1]||"";return r=r.replace(/_/g," "),e[r]=t,e},{}),vB=e=>(e=e.replace(/ time/g,""),e=e.replace(/ (standard|daylight|summer)/g,""),e=e.replace(/\b(east|west|north|south)ern/g,"$1"),e=e.replace(/\b(africa|america|australia)n/g,"$1"),e=e.replace(/\beuropean/g,"europe"),e=e.replace(/islands/g,"island"),e),zl=(e,t)=>{if(!e)return t.hasOwnProperty(zu)||(console.warn(`Unrecognized IANA id '${zu}'. Setting fallback tz to UTC.`),zu="utc"),zu;typeof e!="string"&&console.error("Timezone must be a string - recieved: '",e,`'
14
+ `);let r=e.trim();if(r=r.toLowerCase(),t.hasOwnProperty(r)===!0||(r=vB(r),t.hasOwnProperty(r)===!0))return r;if(gg.hasOwnProperty(r)===!0)return gg[r];if(/[0-9]/.test(r)===!0){let n=gB(r);if(n)return n}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")};function eu(e){return e%4===0&&e%100!==0||e%400===0}function Lw(e){return Object.prototype.toString.call(e)==="[object Date]"&&!isNaN(e.valueOf())}function yB(e){return Object.prototype.toString.call(e)==="[object Array]"}function ei(e){return Object.prototype.toString.call(e)==="[object Object]"}function bB(e){return Object.prototype.toString.call(e)==="[object Boolean]"}function Je(e,t=2){let r="0";return e=e+"",e.length>=t?e:new Array(t-e.length+1).join(r)+e}function wB(e){return e?e[0].toUpperCase()+e.substr(1):""}function xa(e){let t=e%10,r=e%100;return t===1&&r!==11?e+"st":t===2&&r!==12?e+"nd":t===3&&r!==13?e+"rd":e+"th"}function jo(e){return e=String(e),e=e.replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)}function ro(e=""){return e=e.toLowerCase().trim(),e=e.replace(/ies$/,"y"),e=e.replace(/s$/,""),e=e.replace(/-/g,""),e==="day"||e==="days"?"date":e==="min"||e==="mins"?"minute":e}function bs(e){return typeof e=="number"?e:Lw(e)?e.getTime():e.epoch||e.epoch===0?e.epoch:null}function zi(e,t){return ei(e)===!1?t.clone().set(e):e}function Es(e,t=""){const r=e>0?"+":"-",n=Math.abs(e),a=Je(parseInt(""+n,10)),i=Je(n%1*60);return`${r}${a}${t}${i}`}const pm={year:new Date().getFullYear(),month:0,date:1},xB=(e,t,r)=>{if(t.length===0)return e;let n=["year","month","date","hour","minute","second","millisecond"];for(let a=0;a<n.length;a++){let i=t[a]||r[n[a]]||pm[n[a]]||0;e=e[n[a]](i)}return e},DB=(e,t,r)=>{if(Object.keys(t).length===0)return e;t=Object.assign({},pm,r,t);let n=Object.keys(t);for(let a=0;a<n.length;a++){let i=n[a];if(e[i]===void 0||typeof e[i]!="function"||t[i]===null||t[i]===void 0||t[i]==="")continue;let o=t[i]||r[i]||pm[i]||0;e=e[i](o)}return e},NB=function(e,t){return t>0&&t<25e8&&e.silent===!1&&(console.warn(" - Warning: You are setting the date to January 1970."),console.warn(" - did input seconds instead of milliseconds?")),e.epoch=t,e},AB={parseArray:xB,parseObject:DB,parseNumber:NB},ki=function(e){return e.epoch=Date.now(),Object.keys(e._today||{}).forEach(t=>{typeof e[t]=="function"&&(e=e[t](e._today[t]))}),e},jl={now:e=>ki(e),today:e=>ki(e),tonight:e=>(e=ki(e),e=e.hour(18),e),tomorrow:e=>(e=ki(e),e=e.add(1,"day"),e=e.startOf("day"),e),yesterday:e=>(e=ki(e),e=e.subtract(1,"day"),e=e.startOf("day"),e),christmas:e=>{let t=ki(e).year();return e=e.set([t,11,25,18,0,0]),e},"new years":e=>{let t=ki(e).year();return e=e.set([t,11,31,18,0,0]),e}};jl["new years eve"]=jl["new years"];const CB=function(e){return e=e.replace(/\b(mon|tues?|wed|wednes|thur?s?|fri|sat|satur|sun)(day)?\b/i,""),e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),e=e.replace(/,/g,""),e=e.replace(/ +/g," ").trim(),e};let At={millisecond:1};At.second=1e3;At.minute=6e4;At.hour=36e5;At.day=864e5;At.date=At.day;At.month=864e5*29.5;At.week=6048e5;At.year=3154e7;Object.keys(At).forEach(e=>{At[e+"s"]=At[e]});const ju=(e,t,r,n,a)=>{let i=e.d[r]();if(i===t)return;let o=a===null?null:e.d[a](),s=e.epoch,u=t-i;e.epoch+=At[n]*u,n==="day"&&Math.abs(u)>28&&t<28&&(e.epoch+=At.hour),a!==null&&o!==e.d[a]()&&(e.epoch=s);const l=At[n]/2;for(;e.d[r]()<t;)e.epoch+=l;for(;e.d[r]()>t;)e.epoch-=l;a!==null&&o!==e.d[a]()&&(e.epoch=s)},mf={year:{valid:e=>e>-4e3&&e<4e3,walkTo:(e,t)=>ju(e,t,"getFullYear","year",null)},month:{valid:e=>e>=0&&e<=11,walkTo:(e,t)=>{let r=e.d,n=r.getMonth(),a=e.epoch,i=r.getFullYear();if(n===t)return;let o=t-n;for(e.epoch+=At.day*(o*28),i!==e.d.getFullYear()&&(e.epoch=a);e.d.getMonth()<t;)e.epoch+=At.day;for(;e.d.getMonth()>t;)e.epoch-=At.day}},date:{valid:e=>e>0&&e<=31,walkTo:(e,t)=>ju(e,t,"getDate","day","getMonth")},hour:{valid:e=>e>=0&&e<24,walkTo:(e,t)=>ju(e,t,"getHours","hour","getDate")},minute:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>ju(e,t,"getMinutes","minute","getHours")},second:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>{e.epoch=e.seconds(t).epoch}},millisecond:{valid:e=>e>=0&&e<1e3,walkTo:(e,t)=>{e.epoch=e.milliseconds(t).epoch}}},wt=(e,t)=>{let r=Object.keys(mf),n=e.clone();for(let a=0;a<r.length;a++){let i=r[a],o=t[i];if(o===void 0&&(o=n[i]()),typeof o=="string"&&(o=parseInt(o,10)),!mf[i].valid(o)){e.epoch=null,e.silent===!1&&console.warn("invalid "+i+": "+o);return}mf[i].walkTo(e,o)}},Yi=[31,28,31,30,31,30,31,31,30,31,30,31];let js=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],qs=["january","february","march","april","may","june","july","august","september","october","november","december"];function EB(){const e={sep:8};for(let t=0;t<js.length;t++)e[js[t]]=t;for(let t=0;t<qs.length;t++)e[qs[t]]=t;return e}function ws(){return js}function SB(){return qs}function Hw(){return EB()}function MB(e){js=e.short||js,qs=e.long||qs}const Gw=(e,t)=>{if(!t)return e;t=t.trim().toLowerCase();let r=0;if(/^[+-]?[0-9]{2}:[0-9]{2}$/.test(t)&&(/:00/.test(t)===!0&&(t=t.replace(/:00/,"")),/:30/.test(t)===!0&&(t=t.replace(/:30/,".5"))),/^[+-]?[0-9]{4}$/.test(t)&&(t=t.replace(/30$/,".5")),r=parseFloat(t),Math.abs(r)>100&&(r=r/100),r===0||t==="Z"||t==="z")return e.tz="etc/gmt",e;r*=-1,r>=0&&(r="+"+r);let n="etc/gmt"+r;return e.timezones[n]&&(e.tz=n),e},TB=function(e=""){return e=String(e),e.length>3?e=e.substring(0,3):e.length===1?e=e+"00":e.length===2&&(e=e+"0"),Number(e)||0},Gr=(e,t="")=>{t=t.replace(/^\s+/,"").toLowerCase();let r=t.match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:.]?([0-9]{1,4})?/);if(r!==null){let[,n,a,i,o]=r;if(n=Number(n),n<0||n>24||(a=Number(a),r[2].length<2||a<0||a>59))return e.startOf("day");e=e.hour(n),e=e.minute(a),e=e.seconds(i||0),e=e.millisecond(TB(o));let s=t.match(/[0-9] ?(am|pm)\b/);return s!==null&&s[1]&&(e=e.ampm(s[1])),e}if(r=t.match(/([0-9]+) ?(am|pm)/),r!==null&&r[1]){let n=Number(r[1]);return n>12||n<1?e.startOf("day"):(e=e.hour(r[1]||0),e=e.ampm(r[2]),e=e.startOf("hour"),e)}return e=e.startOf("day"),e};let vg=Hw();const Vr=e=>{if(Yi.hasOwnProperty(e.month)!==!0)return!1;if(e.month===1)return eu(e.year)&&e.date<=29?!0:e.date<=28;let t=Yi[e.month]||0;return e.date<=t},ka=(e="",t)=>{if(e=e.trim(),/^'[0-9][0-9]$/.test(e)===!0){let n=Number(e.replace(/'/,""));return n>50?1900+n:2e3+n}let r=parseInt(e,10);return!r&&t&&(r=t.year),r=r||new Date().getFullYear(),r},si=function(e){return e=e.toLowerCase().trim(),e==="sept"?vg.sep:vg[e]},FB=[{reg:/^(-?0{0,2}[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9-+:]+)?$/i,parse:(e,t)=>{let r={year:t[1],month:parseInt(t[2],10)-1,date:t[3]};return Vr(r)===!1?(e.epoch=null,e):(Gw(e,t[5]),wt(e,r),e=Gr(e,t[4]),e)}},{reg:/^([0-9]{4})[\-/. ]([0-9]{1,2})[\-/. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let r={year:t[1],month:parseInt(t[2],10)-1,date:parseInt(t[3],10)};return r.month>=12&&(r.date=parseInt(t[2],10),r.month=parseInt(t[3],10)-1),Vr(r)===!1?(e.epoch=null,e):(wt(e,r),e=Gr(e,t[4]),e)}},{reg:/^([0-9]{4})[\-/. ]([a-z]+)[\-/. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let r={year:ka(t[1],e._today),month:si(t[2]),date:jo(t[3]||"")};return Vr(r)===!1?(e.epoch=null,e):(wt(e,r),e=Gr(e,t[4]),e)}}],PB=[{reg:/^([0-9]{1,2})[-/.]([0-9]{1,2})[\-/.]?([0-9]{4})?( [0-9]{1,2}:[0-9]{2}:?[0-9]{0,2} ?(am|pm|gmt))?$/i,parse:(e,t)=>{let r=parseInt(t[1],10)-1,n=parseInt(t[2],10);(e.british||r>=12)&&(n=parseInt(t[1],10),r=parseInt(t[2],10)-1);let a={date:n,month:r,year:ka(t[3],e._today)||new Date().getFullYear()};return Vr(a)===!1?(e.epoch=null,e):(wt(e,a),e=Gr(e,t[4]),e)}},{reg:/^([a-z]+)[\-/. ]([0-9]{1,2})[\-/. ]?([0-9]{4}|'[0-9]{2})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let r={year:ka(t[3],e._today),month:si(t[1]),date:jo(t[2]||"")};return Vr(r)===!1?(e.epoch=null,e):(wt(e,r),e=Gr(e,t[4]),e)}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:(e,t)=>{let r={year:ka(t[3],e._today),month:si(t[1]),date:jo(t[2]||"")};return Vr(r)===!1?(e.epoch=null,e):(wt(e,r),e=Gr(e,t[4]),e)}},{reg:/^([a-z]+) ([0-9]{1,2}) ([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2})( \+[0-9]{4})?( [0-9]{4})?$/i,parse:(e,t)=>{let[,r,n,a,i,o]=t,s={year:ka(o,e._today),month:si(r),date:jo(n||"")};return Vr(s)===!1?(e.epoch=null,e):(wt(e,s),e=Gw(e,i),e=Gr(e,a),e)}}],kB=[{reg:/^([0-9]{1,2})[-/]([a-z]+)[\-/]?([0-9]{4})?$/i,parse:(e,t)=>{let r={year:ka(t[3],e._today),month:si(t[2]),date:jo(t[1]||"")};return Vr(r)===!1?(e.epoch=null,e):(wt(e,r),e=Gr(e,t[4]),e)}},{reg:/^([0-9]{1,2})( [a-z]+)( [0-9]{4}| '[0-9]{2})? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2} ?(am|pm|gmt))?$/i,parse:(e,t)=>{let r={year:ka(t[3],e._today),month:si(t[2]),date:jo(t[1])};return!r.month||Vr(r)===!1?(e.epoch=null,e):(wt(e,r),e=Gr(e,t[4]),e)}},{reg:/^([0-9]{1,2})[. \-/]([a-z]+)[. \-/]([0-9]{4})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let r={date:Number(t[1]),month:si(t[2]),year:Number(t[3])};return Vr(r)===!1?(e.epoch=null,e):(wt(e,r),e=e.startOf("day"),e=Gr(e,t[4]),e)}}],OB=[{reg:/^([0-9]{4})[\-/]([0-9]{2})$/,parse:(e,t)=>{let r={year:t[1],month:parseInt(t[2],10)-1,date:1};return Vr(r)===!1?(e.epoch=null,e):(wt(e,r),e=Gr(e,t[4]),e)}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:(e,t)=>{let r={year:ka(t[2],e._today),month:si(t[1]),date:e._today.date||1};return Vr(r)===!1?(e.epoch=null,e):(wt(e,r),e=Gr(e,t[4]),e)}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:(e,t)=>{let r=t[1]||"";e=e.quarter(r);let n=t[3]||"";return n&&(n=n.trim(),e=e.year(n)),e}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:(e,t)=>{let r=t[1]||"";e=e.season(r);let n=t[3]||"";return n&&(n=n.trim(),e=e.year(n)),e}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:(e,t)=>{let r=t[0]||"";r=r.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1");let n=new Date,a={year:parseInt(r.trim(),10),month:n.getMonth(),date:n.getDate()};return Vr(a)===!1?(e.epoch=null,e):(wt(e,a),e=Gr(e),e)}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:(e,t)=>{let r=t[0]||"";r=r.replace(/,/g,"");let n=new Date,a={year:parseInt(r.trim(),10),month:n.getMonth(),date:n.getDate()};return Vr(a)===!1?(e.epoch=null,e):(wt(e,a),e=Gr(e),e)}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:(e,t)=>{let r=e._today;r.month&&!r.date&&(r.date=1);let n=new Date,a={year:ka(t[0],r),month:r.month||n.getMonth(),date:r.date||n.getDate()};return Vr(a)===!1?(e.epoch=null,e):(wt(e,a),e=Gr(e),e)}}],df=[].concat(FB,PB,kB,OB),BB=function(e,t,r){for(let n=0;n<df.length;n++){let a=t.match(df[n].reg);if(a){let i=df[n].parse(e,a,r);if(i!==null&&i.isValid())return i}}return e.silent===!1&&console.warn("Warning: couldn't parse date-string: '"+t+"'"),e.epoch=null,e},{parseArray:$B,parseObject:yg,parseNumber:_B}=AB,bg={year:new Date().getFullYear(),month:0,date:1},Vw=(e,t)=>{let r=e._today||bg;if(typeof t=="number")return _B(e,t);if(e.epoch=Date.now(),e._today&&ei(e._today)&&Object.keys(e._today).length>0){let n=yg(e,r,bg);n.isValid()&&(e.epoch=n.epoch)}return t==null||t===""?e:Lw(t)===!0?(e.epoch=t.getTime(),e):yB(t)===!0?(e=$B(e,t,r),e):ei(t)===!0?t.epoch?(e.epoch=t.epoch,e.tz=t.tz,e):(e=yg(e,t,r),e):typeof t!="string"?e:(t=CB(t),jl.hasOwnProperty(t)===!0?(e=jl[t](e),e):BB(e,t))};let gm=["sun","mon","tue","wed","thu","fri","sat"],vm=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function Rs(){return gm}function ql(){return vm}function IB(e){gm=e.short||gm,vm=e.long||vm}const wg={mo:1,tu:2,we:3,th:4,fr:5,sa:6,su:7,tues:2,weds:3,wedn:3,thur:4,thurs:4};let Uw=!0;function zB(){return Uw}function jB(e){Uw=e}const xg=e=>{let t=e.timezone().current.offset;return t?Es(t,":"):"Z"},Ma=e=>zB()?wB(e):e,qB=e=>e>=0?Je(e,4):(e=Math.abs(e),"-"+Je(e,4)),Bo={day:e=>Ma(e.dayName()),"day-short":e=>Ma(Rs()[e.day()]),"day-number":e=>e.day(),"day-ordinal":e=>xa(e.day()),"day-pad":e=>Je(e.day()),date:e=>e.date(),"date-ordinal":e=>xa(e.date()),"date-pad":e=>Je(e.date()),month:e=>Ma(e.monthName()),"month-short":e=>Ma(ws()[e.month()]),"month-number":e=>e.month(),"month-ordinal":e=>xa(e.month()),"month-pad":e=>Je(e.month()),"iso-month":e=>Je(e.month()+1),year:e=>{let t=e.year();return t>0?t:(t=Math.abs(t),t+" BC")},"year-short":e=>{let t=e.year();return t>0?`'${String(e.year()).substr(2,4)}`:(t=Math.abs(t),t+" BC")},"iso-year":e=>{let t=e.year(),r=t<0,n=Je(Math.abs(t),4);return r&&(n=Je(n,6),n="-"+n),n},time:e=>e.time(),"time-24":e=>`${e.hour24()}:${Je(e.minute())}`,hour:e=>e.hour12(),"hour-pad":e=>Je(e.hour12()),"hour-24":e=>e.hour24(),"hour-24-pad":e=>Je(e.hour24()),minute:e=>e.minute(),"minute-pad":e=>Je(e.minute()),second:e=>e.second(),"second-pad":e=>Je(e.second()),millisecond:e=>e.millisecond(),"millisecond-pad":e=>Je(e.millisecond(),3),ampm:e=>e.ampm(),AMPM:e=>e.ampm().toUpperCase(),quarter:e=>"Q"+e.quarter(),season:e=>e.season(),era:e=>e.era(),json:e=>e.json(),timezone:e=>e.timezone().name,offset:e=>xg(e),numeric:e=>`${e.year()}/${Je(e.month()+1)}/${Je(e.date())}`,"numeric-us":e=>`${Je(e.month()+1)}/${Je(e.date())}/${e.year()}`,"numeric-uk":e=>`${Je(e.date())}/${Je(e.month()+1)}/${e.year()}`,"mm/dd":e=>`${Je(e.month()+1)}/${Je(e.date())}`,iso:e=>{let t=e.format("iso-year"),r=Je(e.month()+1),n=Je(e.date()),a=Je(e.h24()),i=Je(e.minute()),o=Je(e.second()),s=Je(e.millisecond(),3),u=xg(e);return`${t}-${r}-${n}T${a}:${i}:${o}.${s}${u}`},"iso-short":e=>{let t=Je(e.month()+1),r=Je(e.date());return`${qB(e.year())}-${t}-${r}`},"iso-utc":e=>new Date(e.epoch).toISOString(),nice:e=>`${ws()[e.month()]} ${xa(e.date())}, ${e.time()}`,"nice-24":e=>`${ws()[e.month()]} ${xa(e.date())}, ${e.hour24()}:${Je(e.minute())}`,"nice-year":e=>`${ws()[e.month()]} ${xa(e.date())}, ${e.year()}`,"nice-day":e=>`${Rs()[e.day()]} ${Ma(ws()[e.month()])} ${xa(e.date())}`,"nice-full":e=>`${e.dayName()} ${Ma(e.monthName())} ${xa(e.date())}, ${e.time()}`,"nice-full-24":e=>`${e.dayName()} ${Ma(e.monthName())} ${xa(e.date())}, ${e.hour24()}:${Je(e.minute())}`},Dg={"day-name":"day","month-name":"month","iso 8601":"iso","time-h24":"time-24","time-12":"time","time-h12":"time",tz:"timezone","day-num":"day-number","month-num":"month-number","month-iso":"iso-month","year-iso":"iso-year","nice-short":"nice","nice-short-24":"nice-24",mdy:"numeric-us",dmy:"numeric-uk",ymd:"numeric","yyyy/mm/dd":"numeric","mm/dd/yyyy":"numeric-us","dd/mm/yyyy":"numeric-us","little-endian":"numeric-uk","big-endian":"numeric","day-nice":"nice-day"};Object.keys(Dg).forEach(e=>Bo[e]=Bo[Dg[e]]);const hf=(e,t="")=>{if(e.isValid()!==!0)return"";if(Bo.hasOwnProperty(t)){let r=Bo[t](e)||"";return t!=="json"&&(r=String(r),t.toLowerCase()!=="ampm"&&(r=Ma(r))),r}if(t.indexOf("{")!==-1){let r=/\{(.+?)\}/g;return t=t.replace(r,(n,a)=>{if(a=a.trim(),a!=="AMPM"&&(a=a.toLowerCase()),Bo.hasOwnProperty(a)){let i=String(Bo[a](e));return a.toLowerCase()!=="ampm"?Ma(i):i}return""}),t}return e.format("iso-short")},Rl={G:e=>e.era(),GG:e=>e.era(),GGG:e=>e.era(),GGGG:e=>e.era()==="AD"?"Anno Domini":"Before Christ",y:e=>e.year(),yy:e=>Je(Number(String(e.year()).substr(2,4))),yyy:e=>e.year(),yyyy:e=>e.year(),yyyyy:e=>"0"+e.year(),Q:e=>e.quarter(),QQ:e=>e.quarter(),QQQ:e=>e.quarter(),QQQQ:e=>e.quarter(),M:e=>e.month()+1,MM:e=>Je(e.month()+1),MMM:e=>e.format("month-short"),MMMM:e=>e.format("month"),w:e=>e.week(),ww:e=>Je(e.week()),d:e=>e.date(),dd:e=>Je(e.date()),D:e=>e.dayOfYear(),DD:e=>Je(e.dayOfYear()),DDD:e=>Je(e.dayOfYear(),3),E:e=>e.format("day-short"),EE:e=>e.format("day-short"),EEE:e=>e.format("day-short"),EEEE:e=>e.format("day"),EEEEE:e=>e.format("day")[0],e:e=>e.day(),ee:e=>e.day(),eee:e=>e.format("day-short"),eeee:e=>e.format("day"),eeeee:e=>e.format("day")[0],a:e=>e.ampm().toUpperCase(),aa:e=>e.ampm().toUpperCase(),aaa:e=>e.ampm().toUpperCase(),aaaa:e=>e.ampm().toUpperCase(),h:e=>e.h12(),hh:e=>Je(e.h12()),H:e=>e.hour(),HH:e=>Je(e.hour()),m:e=>e.minute(),mm:e=>Je(e.minute()),s:e=>e.second(),ss:e=>Je(e.second()),SSS:e=>Je(e.millisecond(),3),A:e=>e.epoch-e.startOf("day").epoch,z:e=>e.timezone().name,zz:e=>e.timezone().name,zzz:e=>e.timezone().name,zzzz:e=>e.timezone().name,Z:e=>Es(e.timezone().current.offset),ZZ:e=>Es(e.timezone().current.offset),ZZZ:e=>Es(e.timezone().current.offset),ZZZZ:e=>Es(e.timezone().current.offset,":")},Ha=(e,t,r)=>{let n=e,a=t;for(let i=0;i<r;i+=1)Rl[n]=Rl[a],n+=e,a+=t};Ha("q","Q",4);Ha("L","M",4);Ha("Y","y",4);Ha("c","e",4);Ha("k","H",2);Ha("K","h",2);Ha("S","s",2);Ha("v","z",4);Ha("V","Z",4);const RB=function(e){for(let t=0;t<e.length;t+=1)if(e[t]==="'")for(let r=t+1;r<e.length;r+=1){if(e[r]&&(e[t]+=e[r]),e[r]==="'"){e[r]=null;break}e[r]=null}return e.filter(t=>t)},LB=function(e){for(let t=0;t<e.length;t+=1){let r=e[t];for(let n=t+1;n<e.length&&e[n]===r;n+=1)e[t]+=e[n],e[n]=null}return e=e.filter(t=>t),e=e.map(t=>(t==="''"&&(t="'"),t)),e},HB=(e,t)=>{let r=t.split("");return r=RB(r),r=LB(r),r.reduce((n,a)=>(Rl[a]!==void 0?n+=Rl[a](e)||"":(/^'.+'$/.test(a)&&(a=a.replace(/'/g,"")),n+=a),n),"")},GB=["year","season","quarter","month","week","day","quarterHour","hour","minute"],Ng=function(e,t){let r=e.clone().startOf(t),a=e.clone().endOf(t).epoch-r.epoch,i=(e.epoch-r.epoch)/a;return parseFloat(i.toFixed(2))},VB=(e,t)=>{if(t)return t=ro(t),Ng(e,t);let r={};return GB.forEach(n=>{r[n]=Ng(e,n)}),r},UB=(e,t)=>{let r=e.progress();return t=ro(t),t==="quarterhour"&&(t="quarterHour"),r[t]!==void 0?(r[t]>.5&&(e=e.add(1,t)),e=e.startOf(t)):e.silent===!1&&console.warn("no known unit '"+t+"'"),e},Ag=(e,t,r)=>{let n=0;for(e=e.clone();e.isBefore(t);)e=e.add(1,r),n+=1;return e.isAfter(t,r)&&(n-=1),n},pf=(e,t,r)=>e.isBefore(t)?Ag(e,t,r):Ag(t,e,r)*-1,WB=(e,t)=>{let r=t.year()-e.year();return e=e.year(t.year()),e.isAfter(t)&&(r-=1),r},JB=function(e,t){let r=t.epoch-e.epoch,n={milliseconds:r,seconds:parseInt(r/1e3,10)};n.minutes=parseInt(n.seconds/60,10),n.hours=parseInt(n.minutes/60,10);let a=e.clone();return n.years=WB(a,t),a=e.add(n.years,"year"),n.months=n.years*12,a=e.add(n.months,"month"),n.months+=pf(a,t,"month"),n.quarters=n.years*4,n.quarters+=parseInt(n.months%12/3,10),n.weeks=n.years*52,a=e.add(n.weeks,"week"),n.weeks+=pf(a,t,"week"),n.days=n.weeks*7,a=e.add(n.days,"day"),n.days+=pf(a,t,"day"),n},KB=function(e){return Object.keys(e).forEach(t=>{e[t]*=-1}),e},YB=function(e,t,r){t=zi(t,e);let n=!1;if(e.isAfter(t)){let i=e;e=t,t=i,n=!0}let a=JB(e,t);return n&&(a=KB(a)),r?(r=ro(r),/s$/.test(r)!==!0&&(r+="s"),r==="dates"&&(r="days"),a[r]):a},xo=e=>Math.abs(e)||0,ZB=function(e){let t="P";return t+=xo(e.years)+"Y",t+=xo(e.months)+"M",t+=xo(e.days)+"DT",t+=xo(e.hours)+"H",t+=xo(e.minutes)+"M",t+=xo(e.seconds)+"S",t};function QB(e,t){const r=e.isBefore(t),n=r?t:e;let a=r?e:t;a=a.clone();const i={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(i).forEach(o=>{if(a.isSame(n,o))return;let s=a.diff(n,o);a=a.add(s,o),i[o]=s}),r&&Object.keys(i).forEach(o=>{i[o]!==0&&(i[o]*=-1)}),i}let rn={second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",day:"day",days:"days",month:"month",months:"months",year:"year",years:"years"};function Cg(e){return rn[e]||""}function XB(e={}){rn={second:e.second||rn.second,seconds:e.seconds||rn.seconds,minute:e.minute||rn.minute,minutes:e.minutes||rn.minutes,hour:e.hour||rn.hour,hours:e.hours||rn.hours,day:e.day||rn.day,days:e.days||rn.days,month:e.month||rn.month,months:e.months||rn.months,year:e.year||rn.year,years:e.years||rn.years}}let ym="past",bm="future",wm="present",xm="now",Dm="almost",Nm="over",Am=e=>`${e} ago`,Cm=e=>`in ${e}`;function gf(e){return Am(e)}function vf(e){return Cm(e)}function e$(){return ym}function t$(){return bm}function r$(){return wm}function yf(){return xm}function n$(){return Dm}function a$(){return Nm}function i$(e){Am=e.pastDistance||Am,Cm=e.futureDistance||Cm,ym=e.past||ym,bm=e.future||bm,wm=e.present||wm,xm=e.now||xm,Dm=e.almost||Dm,Nm=e.over||Nm}const Eg={months:{almost:10,over:4},days:{almost:25,over:10},hours:{almost:20,over:8},minutes:{almost:50,over:20},seconds:{almost:50,over:20}};function Sg(e,t){return e===1?e+" "+Cg(t.slice(0,-1)):e+" "+Cg(t)}const o$=function(e){let t=null,r=null,n=[],a=[];return Object.keys(e).forEach((i,o,s)=>{const u=Math.abs(e[i]);if(u===0)return;n.push(u+i[0]);const l=Sg(u,i);if(a.push(l),!t){if(t=l,r=l,o>4)return;const c=s[o+1],f=Math.abs(e[c]);f>Eg[c].almost?(t=Sg(u+1,i),r=n$()+" "+t):f>Eg[c].over&&(r=a$()+" "+l)}}),{qualified:r,rounded:t,abbreviated:n,englishValues:a}},s$=(e,t)=>{t=zi(t,e);const r=QB(e,t);if(Object.keys(r).every(f=>!r[f])===!0)return{diff:r,rounded:yf(),qualified:yf(),precise:yf(),abbreviated:[],iso:"P0Y0M0DT0H0M0S",direction:r$()};let a,i=t$(),{rounded:o,qualified:s,englishValues:u,abbreviated:l}=o$(r);a=u.splice(0,2).join(", "),e.isAfter(t)===!0?(o=gf(o),s=gf(s),a=gf(a),i=e$()):(o=vf(o),s=vf(s),a=vf(a));let c=ZB(r);return{diff:r,rounded:o,qualified:s,precise:a,abbreviated:l,iso:c,direction:i}},u$=[["spring",2,1],["summer",5,1],["fall",8,1],["autumn",8,1],["winter",11,1]],l$=[["fall",2,1],["autumn",2,1],["winter",5,1],["spring",8,1],["summer",11,1]],Vn={north:u$,south:l$},Hi=[null,[0,1],[3,1],[6,1],[9,1]],Wi={second:e=>(wt(e,{millisecond:0}),e),minute:e=>(wt(e,{second:0,millisecond:0}),e),quarterhour:e=>{let t=e.minutes();return t>=45?e=e.minutes(45):t>=30?e=e.minutes(30):t>=15?e=e.minutes(15):e=e.minutes(0),wt(e,{second:0,millisecond:0}),e},hour:e=>(wt(e,{minute:0,second:0,millisecond:0}),e),day:e=>(wt(e,{hour:0,minute:0,second:0,millisecond:0}),e),week:e=>{let t=e.clone();return e=e.day(e._weekStart),e.isAfter(t)&&(e=e.subtract(1,"week")),wt(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:e=>(wt(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e),quarter:e=>{let t=e.quarter();return Hi[t]&&wt(e,{month:Hi[t][0],date:Hi[t][1],hour:0,minute:0,second:0,millisecond:0}),e},season:e=>{let t=e.season(),r="north";e.hemisphere()==="South"&&(r="south");for(let n=0;n<Vn[r].length;n++)if(Vn[r][n][0]===t){let a=e.year();return t==="winter"&&e.month()<3&&(a-=1),wt(e,{year:a,month:Vn[r][n][1],date:Vn[r][n][2],hour:0,minute:0,second:0,millisecond:0}),e}return e},year:e=>(wt(e,{month:0,date:1,hour:0,minute:0,second:0,millisecond:0}),e),decade:e=>{e=e.startOf("year");let t=e.year(),r=parseInt(t/10,10)*10;return e=e.year(r),e},century:e=>{e=e.startOf("year");let t=e.year(),r=parseInt(t/100,10)*100;return e=e.year(r),e}};Wi.date=Wi.day;const c$=(e,t)=>{let r=e.clone();return t=ro(t),Wi[t]?Wi[t](r):t==="summer"||t==="winter"?(r=r.season(t),Wi.season(r)):r},f$=(e,t)=>{let r=e.clone();return t=ro(t),Wi[t]&&(r=Wi[t](r),r=r.add(1,t),r=r.subtract(1,"millisecond")),r},m$=function(e){return!!(Rs().find(t=>t===e)||ql().find(t=>t===e))},d$=function(e,t,r,n=1){if(!t||!r)return[];if(t=ro(t),r=e.clone().set(r),e.isAfter(r)){let o=e;e=r,r=o}if(e.diff(r,t)<n)return[];let a=e.clone();m$(t)?(a=a.next(t),t="week"):a.startOf(t).isBefore(e)&&(a=a.next(t));let i=[];for(;a.isBefore(r);)i.push(a),a=a.add(n,t);return i},h$=e=>e?e.split("->"):[],p$=e=>(e=e[0].toUpperCase()+e.substr(1),e=e.replace(/[/_-]([a-z])/gi,t=>t.toUpperCase()),e=e.replace(/_(of|es)_/i,t=>t.toLowerCase()),e=e.replace(/\/gmt/i,"/GMT"),e=e.replace(/\/Dumontdurville$/i,"/DumontDUrville"),e=e.replace(/\/Mcmurdo$/i,"/McMurdo"),e=e.replace(/\/Port-au-prince$/i,"/Port-au-Prince"),e),xs=e=>{let t=e.timezones,r=e.tz;if(t.hasOwnProperty(r)===!1&&(r=zl(e.tz,t)),r===null)return e.silent===!1&&console.warn("Warn: could not find given or local timezone - '"+e.tz+"'"),{current:{epochShift:0}};let n=t[r],a={name:p$(r),hasDst:!!n.dst,default_offset:n.offset,hemisphere:n.hem==="s"?"South":"North",current:{}};if(a.hasDst){let s=h$(n.dst);a.change={start:s[0],back:s[1]}}let i=n.offset,o=i;return a.hasDst===!0&&(a.hemisphere==="North"?o=i-1:o=n.offset+1),a.hasDst===!1?(a.current.offset=i,a.current.isDST=!1):Rw(e.epoch,a.change.start,a.change.back,i,o)===!0?(a.current.offset=i,a.current.isDST=a.hemisphere==="North"):(a.current.offset=o,a.current.isDST=a.hemisphere==="South"),a},g$=["century","decade","year","month","date","day","hour","minute","second","millisecond"],ci={set:function(e,t){let r=this.clone();return r=Vw(r,e),t&&(this.tz=zl(t)),r},timezone:function(){return xs(this)},isDST:function(){return xs(this).current.isDST},hasDST:function(){return xs(this).hasDst},offset:function(){return xs(this).current.offset*60},hemisphere:function(){return xs(this).hemisphere},format:function(e){return hf(this,e)},unixFmt:function(e){return HB(this,e)},startOf:function(e){return c$(this,e)},endOf:function(e){return f$(this,e)},leapYear:function(){let e=this.year();return eu(e)},progress:function(e){return VB(this,e)},nearest:function(e){return UB(this,e)},diff:function(e,t){return YB(this,e,t)},since:function(e){return e||(e=this.clone().set()),s$(this,e)},next:function(e){return this.add(1,e).startOf(e)},last:function(e){return this.subtract(1,e).startOf(e)},isValid:function(){return!this.epoch&&this.epoch!==0?!1:!isNaN(this.d.getTime())},goto:function(e){let t=this.clone();return t.tz=zl(e,t.timezones),t},every:function(e,t,r){if(typeof e=="object"&&typeof t=="string"){let n=t;t=e,e=n}return d$(this,e,t,r)},isAwake:function(){let e=this.hour();return!(e<8||e>22)},isAsleep:function(){return!this.isAwake()},daysInMonth:function(){switch(this.month()){case 0:return 31;case 1:return this.leapYear()?29:28;case 2:return 31;case 3:return 30;case 4:return 31;case 5:return 30;case 6:return 31;case 7:return 31;case 8:return 30;case 9:return 31;case 10:return 30;case 11:return 31;default:throw new Error("Invalid Month state.")}},log:function(){return console.log(""),console.log(hf(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(hf(this,"full-short")),this},json:function(){return g$.reduce((e,t)=>(e[t]=this[t](),e),{})},debug:function(){let e=this.timezone(),t=this.format("MM")+" "+this.format("date-ordinal")+" "+this.year();return t+=`
15
+ - `+this.format("time"),console.log(`
16
+
17
+ `,t+`
18
+ - `+e.name+" ("+e.current.offset+")"),this},from:function(e){return e=this.clone().set(e),e.since(this)},fromNow:function(){return this.clone().set(Date.now()).since(this)},weekStart:function(e){if(typeof e=="number")return this._weekStart=e,this;if(typeof e=="string"){e=e.toLowerCase().trim();let t=Rs().indexOf(e);t===-1&&(t=ql().indexOf(e)),t===-1&&(t=1),this._weekStart=t}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",e);return this}};ci.inDST=ci.isDST;ci.round=ci.nearest;ci.each=ci.every;const Ga=e=>(typeof e=="string"&&(e=parseInt(e,10)),e),bf=["year","month","date","hour","minute","second","millisecond"],vd=(e,t,r)=>{let n=bf.indexOf(r),a=bf.slice(n,bf.length);for(let i=0;i<a.length;i++){let o=t[a[i]]();e[a[i]](o)}return e},gi=function(e,t,r,n){return r===!0&&e.isBefore(t)?e=e.add(1,n):r===!1&&e.isAfter(t)&&(e=e.minus(1,n)),e},v$=function(e,t){t=Ga(t);let n=e.millisecond()-t;return e.epoch-n},y$=function(e,t,r){t=Ga(t);let n=e.clone(),i=(e.second()-t)*At.second;return e.epoch=e.epoch-i,e=gi(e,n,r,"minute"),e.epoch},Mg=function(e,t,r){t=Ga(t);let n=e.clone(),i=(e.minute()-t)*At.minute;return e.epoch-=i,vd(e,n,"second"),e=gi(e,n,r,"hour"),e.epoch},wf=function(e,t,r){t=Ga(t),t>=24?t=24:t<0&&(t=0);let n=e.clone(),a=e.hour()-t,i=a*At.hour;return e.epoch-=i,e.date()!==n.date()&&(e=n.clone(),a>1&&(a-=1),a<1&&(a+=1),i=a*At.hour,e.epoch-=i),wt(e,{hour:t}),vd(e,n,"minute"),e=gi(e,n,r,"day"),e.epoch},b$=function(e,t,r){let n=t.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!n){if(n=t.match(/([0-9]{1,2}) ?(am|pm)/),!n)return e.epoch;n.splice(2,0,"0"),n.splice(3,0,"")}let a=!1,i=parseInt(n[1],10),o=parseInt(n[2],10);o>=60&&(o=59),i>12&&(a=!0),a===!1&&(n[4]==="am"&&i===12&&(i=0),n[4]==="pm"&&i<12&&(i+=12)),n[3]=n[3]||"",n[3]=n[3].replace(/:/,"");let s=parseInt(n[3],10)||0,u=e.clone();return e=e.hour(i),e=e.minute(o),e=e.second(s),e=e.millisecond(0),e=gi(e,u,r,"day"),e.epoch},w$=function(e,t,r){if(t=Ga(t),t>28){let a=e.month(),i=Yi[a];a===1&&t===29&&eu(e.year())&&(i=29),t>i&&(t=i)}t<=0&&(t=1);let n=e.clone();return wt(e,{date:t}),e=gi(e,n,r,"month"),e.epoch},x$=function(e,t,r){typeof t=="string"&&(t==="sept"&&(t="sep"),t=Hw()[t.toLowerCase()]),t=Ga(t),t>=12&&(t=11),t<=0&&(t=0);let n=e.date();n>Yi[t]&&(n=Yi[t]);let a=e.clone();return wt(e,{month:t,d:n}),e=gi(e,a,r,"year"),e.epoch},xf=function(e,t){return typeof t=="string"&&/^'[0-9]{2}$/.test(t)&&(t=t.replace(/'/,"").trim(),t=Number(t),t>30?t=1900+t:t=2e3+t),t=Ga(t),wt(e,{year:t}),e.epoch},D$=function(e,t,r){let n=e.clone();return t=Ga(t),e=e.month(0),e=e.date(1),e=e.day("monday"),e.monthName()==="december"&&e.date()>=28&&(e=e.add(1,"week")),t-=1,e=e.add(t,"weeks"),e=gi(e,n,r,"year"),e.epoch},N$=function(e,t,r){t=Ga(t);let n=e.clone();return t-=1,t<=0?t=0:t>=365&&(eu(e.year())?t=365:t=364),e=e.startOf("year"),e=e.add(t,"day"),vd(e,n,"hour"),e=gi(e,n,r,"year"),e.epoch};let Em="am",Sm="pm";function A$(){return Em}function C$(){return Sm}function E$(e){Em=e.am||Em,Sm=e.pm||Sm}const S$={millisecond:function(e){if(e!==void 0){let t=this.clone();return t.epoch=v$(t,e),t}return this.d.getMilliseconds()},second:function(e,t){if(e!==void 0){let r=this.clone();return r.epoch=y$(r,e,t),r}return this.d.getSeconds()},minute:function(e,t){if(e!==void 0){let r=this.clone();return r.epoch=Mg(r,e,t),r}return this.d.getMinutes()},hour:function(e,t){let r=this.d;if(e!==void 0){let n=this.clone();return n.epoch=wf(n,e,t),n}return r.getHours()},hourFloat:function(e,t){if(e!==void 0){let i=this.clone(),o=e%1;o=o*60;let s=parseInt(e,10);return i.epoch=wf(i,s,t),i.epoch=Mg(i,o,t),i}let r=this.d,n=r.getHours(),a=r.getMinutes();return a=a/60,n+a},hour12:function(e,t){let r=this.d;if(e!==void 0){let a=this.clone();e=""+e;let i=e.match(/^([0-9]+)(am|pm)$/);if(i){let o=parseInt(i[1],10);i[2]==="pm"&&(o+=12),a.epoch=wf(a,o,t)}return a}let n=r.getHours();return n>12&&(n=n-12),n===0&&(n=12),n},time:function(e,t){if(e!==void 0){let r=this.clone();return e=e.toLowerCase().trim(),r.epoch=b$(r,e,t),r}return`${this.h12()}:${Je(this.minute())}${this.ampm()}`},ampm:function(e,t){let r=A$(),n=this.hour();if(n>=12&&(r=C$()),typeof e!="string")return r;let a=this.clone();return e=e.toLowerCase().trim(),n>=12&&e==="am"?(n-=12,a.hour(n,t)):n<12&&e==="pm"?(n+=12,a.hour(n,t)):a},dayTime:function(e,t){if(e!==void 0){const n={morning:"7:00",breakfast:"7:00",noon:"12:00",lunch:"12:00",afternoon:"14:00",evening:"18:00",dinner:"18:00",night:"23:00",midnight:"00:00"};let a=this.clone();return e=e||"",e=e.toLowerCase(),n.hasOwnProperty(e)===!0&&(a=a.time(n[e],t)),a}let r=this.hour();return r<6?"night":r<12?"morning":r<17?"afternoon":r<22?"evening":"night"},iso:function(e){return e!==void 0?this.set(e):this.format("iso")}},M$={date:function(e,t){if(e!==void 0){let r=this.clone();return e=parseInt(e,10),e&&(r.epoch=w$(r,e,t)),r}return this.d.getDate()},day:function(e,t){if(e===void 0)return this.d.getDay();let r=this.clone(),n=e;typeof e=="string"&&(e=e.toLowerCase(),wg.hasOwnProperty(e)?n=wg[e]:(n=Rs().indexOf(e),n===-1&&(n=ql().indexOf(e))));let i=this.d.getDay()-n;t===!0&&i>0&&(i=i-7),t===!1&&i<0&&(i=i+7);let o=this.subtract(i,"days");return wt(o,{hour:r.hour(),minute:r.minute(),second:r.second()}),o},dayName:function(e,t){if(e===void 0)return ql()[this.day()];let r=this.clone();return r=r.day(e,t),r}},Tg=e=>(e=e.minute(0),e=e.second(0),e=e.millisecond(1),e),T$={dayOfYear:function(e,t){if(e!==void 0){let i=this.clone();return i.epoch=N$(i,e,t),i}let r=0,n=this.d.getMonth(),a;for(let i=1;i<=n;i++)a=new Date,a.setDate(1),a.setFullYear(this.d.getFullYear()),a.setHours(1),a.setMinutes(1),a.setMonth(i),a.setHours(-2),r+=a.getDate();return r+this.d.getDate()},week:function(e,t){if(e!==void 0){let s=this.clone();return s.epoch=D$(this,e,t),s=Tg(s),s}let r=this.clone();r=r.month(0),r=r.date(1),r=Tg(r),r=r.day("monday"),r.month()===11&&r.date()>=25&&(r=r.add(1,"week"));let n=1;r.date()===1&&(n=0),r=r.minus(2,"hours");const a=this.epoch;if(r.epoch>a)return 1;let i=0,o=this.month()*4;for(r.epoch+=At.week*o,i+=o;i<=52;i++){if(r.epoch>a)return i+n;r=r.add(1,"week")}return 52},month:function(e,t){if(e!==void 0){let r=this.clone();return r.epoch=x$(r,e,t),r}return this.d.getMonth()},monthName:function(e,t){if(e!==void 0){let r=this.clone();return r=r.month(e,t),r}return SB()[this.month()]},quarter:function(e,t){if(e!==void 0&&(typeof e=="string"&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),Hi[e])){let n=this.clone(),a=Hi[e][0];return n=n.month(a,t),n=n.date(1,t),n=n.startOf("day"),n}let r=this.d.getMonth();for(let n=1;n<Hi.length;n++)if(r<Hi[n][0])return n-1;return 4},season:function(e,t){let r="north";if(this.hemisphere()==="South"&&(r="south"),e!==void 0){let a=this.clone();for(let i=0;i<Vn[r].length;i++)e===Vn[r][i][0]&&(a=a.month(Vn[r][i][1],t),a=a.date(1),a=a.startOf("day"));return a}let n=this.d.getMonth();for(let a=0;a<Vn[r].length-1;a++)if(n>=Vn[r][a][1]&&n<Vn[r][a+1][1])return Vn[r][a][0];return r==="north"?"winter":"summer"},year:function(e){if(e!==void 0){let t=this.clone();return t.epoch=xf(t,e),t}return this.d.getFullYear()},era:function(e){if(e!==void 0){let t=this.clone();e=e.toLowerCase();let r=t.d.getFullYear();return e==="bc"&&r>0&&(t.epoch=xf(t,r*-1)),e==="ad"&&r<0&&(t.epoch=xf(t,r*-1)),t}return this.d.getFullYear()<0?"BC":"AD"},decade:function(e){if(e!==void 0){if(e=String(e),e=e.replace(/([0-9])'?s$/,"$1"),e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),!e)return console.warn("Spacetime: Invalid decade input"),this;e.length===2&&/[0-9][0-9]/.test(e)&&(e="19"+e);let t=Number(e);return isNaN(t)?this:(t=Math.floor(t/10)*10,this.year(t))}return this.startOf("decade").year()},century:function(e){if(e!==void 0){typeof e=="string"&&(e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),e=e.replace(/([0-9]+) ?(b\.?c\.?|a\.?d\.?)/i,(n,a,i)=>(i.match(/b\.?c\.?/i)&&(a="-"+a),a)),e=e.replace(/c$/,""));let r=Number(e);return isNaN(e)?(console.warn("Spacetime: Invalid century input"),this):(r===0&&(r=1),r>=0?r=(r-1)*100:r=(r+1)*100,this.year(r))}let t=this.startOf("century").year();return t=Math.floor(t/100),t<0?t-1:t+1},millenium:function(e){if(e!==void 0){if(typeof e=="string"&&(e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),e=Number(e),isNaN(e)))return console.warn("Spacetime: Invalid millenium input"),this;e>0&&(e-=1);let r=e*1e3;return r===0&&(r=1),this.year(r)}let t=Math.floor(this.year()/1e3);return t>=0&&(t+=1),t}},Nr=Object.assign({},S$,M$,T$);Nr.milliseconds=Nr.millisecond;Nr.seconds=Nr.second;Nr.minutes=Nr.minute;Nr.hours=Nr.hour;Nr.hour24=Nr.hour;Nr.h12=Nr.hour12;Nr.h24=Nr.hour24;Nr.days=Nr.day;const F$=e=>{Object.keys(Nr).forEach(t=>{e.prototype[t]=Nr[t]})},Mm=function(e,t){return e===1&&eu(t)?29:Yi[e]},P$=(e,t)=>{if(e.month>0){let r=parseInt(e.month/12,10);e.year=t.year()+r,e.month=e.month%12}else if(e.month<0){let r=Math.abs(e.month),n=parseInt(r/12,10);r%12!==0&&(n+=1),e.year=t.year()-n,e.month=e.month%12,e.month=e.month+12,e.month===12&&(e.month=0)}return e},k$=(e,t,r)=>{e.year=t.year(),e.month=t.month();let n=t.date();for(e.date=n-Math.abs(r);e.date<1;){e.month-=1,e.month<0&&(e.month=11,e.year-=1);let a=Mm(e.month,e.year);e.date+=a}return e},O$=(e,t,r)=>{let n=t.year(),a=t.month(),i=Mm(a,n);for(;r>i;)r-=i,a+=1,a>=12&&(a-=12,n+=1),i=Mm(a,n);return e.month=a,e.date=r,e},B$=P$,$$=O$,_$=k$,Ln=["millisecond","second","minute","hour","date","month"];let fi={second:Ln.slice(0,1),minute:Ln.slice(0,2),quarterhour:Ln.slice(0,2),hour:Ln.slice(0,3),date:Ln.slice(0,4),month:Ln.slice(0,4),quarter:Ln.slice(0,4),season:Ln.slice(0,4),year:Ln,decade:Ln,century:Ln};fi.week=fi.hour;fi.season=fi.date;fi.quarter=fi.date;const I$={year:!0,quarter:!0,season:!0,month:!0,week:!0,date:!0},z$={month:!0,quarter:!0,season:!0,year:!0},j$=e=>{e.prototype.add=function(t,r){let n=this.clone();if(!r||t===0)return n;let a=this.clone();if(r=ro(r),r==="millisecond")return n.epoch+=t,n;r==="fortnight"&&(t*=2,r="week"),At[r]?n.epoch+=At[r]*t:r==="week"||r==="weekend"?n.epoch+=At.day*(t*7):r==="quarter"||r==="season"?n.epoch+=At.month*(t*3):r==="quarterhour"&&(n.epoch+=At.minute*15*t);let i={};if(fi[r]&&fi[r].forEach(o=>{i[o]=a[o]()}),I$[r]){const o=a.timezone().current.offset-n.timezone().current.offset;n.epoch+=o*3600*1e3}if(r==="month"&&(i.month=a.month()+t,i=B$(i,a)),r==="week"){let o=a.date()+t*7;o<=28&&o>1&&(i.date=o)}if(r==="weekend"&&n.dayName()!=="saturday")n=n.day("saturday",!0);else if(r==="date"){if(t<0)i=_$(i,a,t);else{let o=a.date()+t;i=$$(i,a,o)}t!==0&&a.isSame(n,"day")&&(i.date=a.date()+t)}else if(r==="quarter"){if(i.month=a.month()+t*3,i.year=a.year(),i.month<0){let o=Math.floor(i.month/12),s=i.month+Math.abs(o)*12;i.month=s,i.year+=o}else if(i.month>=12){let o=Math.floor(i.month/12);i.month=i.month%12,i.year+=o}i.date=a.date()}else if(r==="year"){let o=a.year()+t,s=n.year();if(s<o){let u=Math.floor(t/4)||1;n.epoch+=Math.abs(At.day*u)}else if(s>o){let u=Math.floor(t/4)||1;n.epoch+=At.day*u}}else r==="decade"?i.year=n.year()+10:r==="century"&&(i.year=n.year()+100);if(z$[r]){let o=Yi[i.month];i.date=a.date(),i.date>o&&(i.date=o)}return Object.keys(i).length>1&&wt(n,i),n},e.prototype.subtract=function(t,r){return this.clone().add(t*-1,r)},e.prototype.minus=e.prototype.subtract,e.prototype.plus=e.prototype.add},Ps={millisecond:e=>e.epoch,second:e=>[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second()].join("-"),minute:e=>[e.year(),e.month(),e.date(),e.hour(),e.minute()].join("-"),hour:e=>[e.year(),e.month(),e.date(),e.hour()].join("-"),day:e=>[e.year(),e.month(),e.date()].join("-"),week:e=>[e.year(),e.week()].join("-"),month:e=>[e.year(),e.month()].join("-"),quarter:e=>[e.year(),e.quarter()].join("-"),year:e=>e.year()};Ps.date=Ps.day;const q$=e=>{e.prototype.isSame=function(t,r,n=!0){let a=this;if(!r)return null;if(typeof t=="string"&&typeof r=="object"){let i=t;t=r,r=i}return(typeof t=="string"||typeof t=="number")&&(t=new e(t,this.timezone.name)),r=r.replace(/s$/,""),n===!0&&a.tz!==t.tz&&(t=t.clone(),t.tz=a.tz),Ps[r]?Ps[r](a)===Ps[r](t):null}},R$=e=>{const t={isAfter:function(r){r=zi(r,this);let n=bs(r);return n===null?null:this.epoch>n},isBefore:function(r){r=zi(r,this);let n=bs(r);return n===null?null:this.epoch<n},isEqual:function(r){r=zi(r,this);let n=bs(r);return n===null?null:this.epoch===n},isBetween:function(r,n,a=!1){r=zi(r,this),n=zi(n,this);let i=bs(r);if(i===null)return null;let o=bs(n);return o===null?null:a?this.isBetween(r,n)||this.isEqual(r)||this.isEqual(n):i<this.epoch&&this.epoch<o}};Object.keys(t).forEach(r=>{e.prototype[r]=t[r]})},L$=e=>{const t={i18n:function(r){return ei(r.days)&&IB(r.days),ei(r.months)&&MB(r.months),bB(r.useTitleCase)&&jB(r.useTitleCase),ei(r.ampm)&&E$(r.ampm),ei(r.distance)&&i$(r.distance),ei(r.units)&&XB(r.units),this}};Object.keys(t).forEach(r=>{e.prototype[r]=t[r]})};let Df=Go;const Zt=function(e,t,r={}){this.epoch=null,this.tz=zl(t,Df),this.silent=typeof r.silent<"u"?r.silent:!0,this.british=r.dmy||r.british,this._weekStart=1,r.weekStart!==void 0&&(this._weekStart=r.weekStart),this._today={},r.today!==void 0&&(this._today=r.today),Object.defineProperty(this,"d",{get:function(){let a=sB(this),o=(new Date(this.epoch).getTimezoneOffset()||0)+a*60;o=o*60*1e3;let s=this.epoch+o;return new Date(s)}}),Object.defineProperty(this,"timezones",{get:()=>Df,set:a=>(Df=a,a)});let n=Vw(this,e);this.epoch=n.epoch,n.tz&&(this.tz=n.tz)};Object.keys(ci).forEach(e=>{Zt.prototype[e]=ci[e]});Zt.prototype.clone=function(){return new Zt(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today,parsers:this.parsers})};Zt.prototype.toLocalDate=function(){return this.toNativeDate()};Zt.prototype.toNativeDate=function(){return new Date(this.epoch)};F$(Zt);j$(Zt);q$(Zt);R$(Zt);L$(Zt);const H$=(e,t)=>{let r=new Zt(null),n=new Zt(null);r=r.time(e),t?n=n.time(t):n=r.add(59,"minutes");let a=r.hour(),i=n.hour();return Object.keys(r.timezones).filter(s=>{if(s.indexOf("/")===-1)return!1;let u=new Zt(null,s),l=u.hour();return l>=a&&l<=i?!(l===a&&u.minute()<r.minute()||l===i&&u.minute()>n.minute()):!1})},G$="7.7.0",gt=(e,t,r)=>new Zt(e,t,r),yc=function(e){let t=e._today||{};return Object.keys(t).forEach(r=>{e=e[r](t[r])}),e};gt.now=(e,t)=>{let r=new Zt(new Date().getTime(),e,t);return r=yc(r),r};gt.today=(e,t)=>{let r=new Zt(new Date().getTime(),e,t);return r=yc(r),r.startOf("day")};gt.tomorrow=(e,t)=>{let r=new Zt(new Date().getTime(),e,t);return r=yc(r),r.add(1,"day").startOf("day")};gt.yesterday=(e,t)=>{let r=new Zt(new Date().getTime(),e,t);return r=yc(r),r.subtract(1,"day").startOf("day")};gt.extend=function(e={}){return Object.keys(e).forEach(t=>{Zt.prototype[t]=e[t]}),this};gt.timezones=function(){return new Zt().timezones};gt.max=function(e,t){let r=new Zt(null,e,t);return r.epoch=864e13,r};gt.min=function(e,t){let r=new Zt(null,e,t);return r.epoch=-864e13,r};gt.whereIts=H$;gt.version=G$;gt.plugin=gt.extend;const Fg={daybreak:"7:00am",breakfast:"8:00am",morning:"9:00am",noon:"12:00pm",midday:"12:00pm",afternoon:"2:00pm",lunchtime:"12:00pm",evening:"6:00pm",dinnertime:"6:00pm",night:"8:00pm",eod:"10:00pm",midnight:"12:00am",am:"9:00am",pm:"5:00pm","early day":"8:00am","late at night":"11:00pm"},$o={quarter:15,half:30},qu=function(e){let t=e.time("6:00am");return e.isBefore(t)?e.ampm("pm"):e},V$=function(e,t){let r=e.match("#Cardinal$"),n=e.not(r).match("(half|quarter|25|20|15|10|5)");r=r.text("reduced");let a=n.text("reduced");$o.hasOwnProperty(a)&&(a=$o[a]);let i=e.has("to");return t=t.hour(r),t=t.startOf("hour"),r<6&&(t=t.ampm("pm")),i?t=t.subtract(a,"minutes"):t=t.add(a,"minutes"),t},yd=function(e,t){let r=e.match("(at|by|for|before|this|after)? #Time+");r=r.not("^(at|by|for|before|this|after)"),r=r.not("sharp"),r=r.not("on the dot");let n=gt.now(t.timezone),a=n.clone(),i=r.not("in? the").text("reduced");if(i=i.replace(/^@/,""),Fg.hasOwnProperty(i))return{result:Fg[i],m:r};let o=r.match("^#Cardinal oclock (am|pm)?");if(o.found&&(n=n.hour(o.text("reduced")),n=n.startOf("hour"),n.isValid()&&!n.isEqual(a))){let u=o.match("(am|pm)");return u.found?n=n.ampm(u.text("reduced")):n=qu(n),{result:n.time(),m:o}}if(o=r.match("(half|quarter|25|20|15|10|5) (past|after|to) #Cardinal"),o.found&&(n=V$(o,n),n.isValid()&&!n.isEqual(a)))return n=qu(n),{result:n.time(),m:o};if(o=r.match("[<min>(half|quarter|25|20|15|10|5)] (past|after)"),o.found){let u=o.groups("min").text("reduced"),l=gt(t.today);if($o.hasOwnProperty(u)&&(u=$o[u]),l=l.next("hour").startOf("hour").minute(u),l.isValid()&&!l.isEqual(a))return{result:l.time(),m:o}}if(o=r.match("[<min>(half|quarter|25|20|15|10|5)] to"),o.found){let u=o.groups("min").text("reduced"),l=gt(t.today);if($o.hasOwnProperty(u)&&(u=$o[u]),l=l.next("hour").startOf("hour").minus(u,"minutes"),l.isValid()&&!l.isEqual(a))return{result:l.time(),m:o}}if(o=r.match("[<time>#Time] (in|at) the? [<desc>(morning|evening|night|nighttime)]"),o.found){let u=o.groups("time").text("normal");if(/^[0-9]{1,2}$/.test(u)?(n=n.hour(u),n=n.startOf("hour")):n=n.time(u),n.isValid()&&!n.isEqual(a)){let l=o.groups("desc").text("reduced");return(l==="evening"||l==="night")&&(n=n.ampm("pm")),{result:n.time(),m:o}}}if(o=r.match("this? [<desc>(morning|evening|tonight)] at [<time>(#Cardinal|#Time)]"),o.found){let u=o.groups(),l=u.time.text("reduced");if(/^[0-9]{1,2}$/.test(l)?(n=n.hour(l),n=n.startOf("hour")):n=n.time(l),n.isValid()&&!n.isEqual(a)){let c=u.desc.text("reduced");return c==="morning"&&(n=n.ampm("am")),(c==="evening"||c==="tonight")&&(n=n.ampm("pm")),{result:n.time(),m:o}}}if(o=r.match("^#Cardinal$"),o.found){let u=o.text("reduced");if(n=n.hour(u),n=n.startOf("hour"),n.isValid()&&!n.isEqual(a))return/(am|pm)/i.test(u)===!1&&(n=qu(n)),{result:n.time(),m:o}}let s=r.text("reduced");return n=n.time(s),n.isValid()&&!n.isEqual(a)?(/(am|pm)/i.test(s)===!1&&(n=qu(n)),{result:n.time(),m:r}):t.dayStart?{result:t.dayStart,m:e.none()}:{result:null,m:e.none()}},U$=function(e){if(e.has("(next|last|this)$"))return{result:null,m:e.none()};let t=e.match("^this? (next|upcoming|coming)");return t.found?{result:"next",m:t}:(t=e.match("^this? (past)"),t.found?{result:"this-past",m:t}:(t=e.match("^this? (last|previous)"),t.found?{result:"last",m:t}:(t=e.match("^(this|current)"),t.found?{result:"this",m:t}:{result:null,m:e.none()})))},W$=function(e){let t=e.match("[(start|beginning) of] .",0);return t.found?{result:"start",m:t}:(t=e.match("[end of] .",0),t.found?{result:"end",m:t}:(t=e.match("[(middle|midpoint|center) of] .",0),t.found?{result:"middle",m:t}:{result:null,m:t}))},Te="America/",_e="Asia/",jt="Europe/",Or="Africa/",Jt="Australia/",tn="Pacific/",J$={"british summer time":jt+"London",bst:jt+"London","british time":jt+"London","britain time":jt+"London","irish summer time":jt+"Dublin","irish time":jt+"Dublin",ireland:jt+"Dublin","central european time":jt+"Berlin",cet:jt+"Berlin","central european summer time":jt+"Berlin",cest:jt+"Berlin","central europe":jt+"Berlin","eastern european time":jt+"Riga",eet:jt+"Riga","eastern european summer time":jt+"Riga",eest:jt+"Riga","eastern europe time":jt+"Riga","western european time":jt+"Lisbon","western european summer time":jt+"Lisbon","western europe":jt+"Lisbon","turkey standard time":jt+"Istanbul",trt:jt+"Istanbul","turkish time":jt+"Istanbul",etc:Or+"Freetown",utc:Or+"Freetown","greenwich standard time":Or+"Freetown",gmt:Or+"Freetown","east africa time":Or+"Nairobi","east african time":Or+"Nairobi","eastern africa time":Or+"Nairobi","central africa time":Or+"Khartoum","central african time":Or+"Khartoum","south africa standard time":Or+"Johannesburg",sast:Or+"Johannesburg","southern africa":Or+"Johannesburg","south african":Or+"Johannesburg","west africa standard time":Or+"Lagos","western africa time":Or+"Lagos","west african time":Or+"Lagos","australian central standard time":Jt+"Adelaide",acst:Jt+"Adelaide","australian central daylight time":Jt+"Adelaide",acdt:Jt+"Adelaide","australia central":Jt+"Adelaide","australian eastern standard time":Jt+"Brisbane",aest:Jt+"Brisbane","australian eastern daylight time":Jt+"Brisbane",aedt:Jt+"Brisbane","australia east":Jt+"Brisbane","australian western standard time":Jt+"Perth",awst:Jt+"Perth","australian western daylight time":Jt+"Perth",awdt:Jt+"Perth","australia west":Jt+"Perth","australian central western standard time":Jt+"Eucla",acwst:Jt+"Eucla","australia central west":Jt+"Eucla","lord howe standard time":Jt+"Lord_Howe",lhst:Jt+"Lord_Howe","lord howe daylight time":Jt+"Lord_Howe",lhdt:Jt+"Lord_Howe","russian standard time":jt+"Moscow",msk:jt+"Moscow",russian:jt+"Moscow","central standard time":Te+"Chicago","central time":Te+"Chicago",cst:Te+"Havana","central daylight time":Te+"Chicago",cdt:Te+"Havana","mountain standard time":Te+"Denver","mountain time":Te+"Denver",mst:Te+"Denver","mountain daylight time":Te+"Denver",mdt:Te+"Denver","atlantic standard time":Te+"Halifax","atlantic time":Te+"Halifax",ast:_e+"Baghdad","atlantic daylight time":Te+"Halifax",adt:Te+"Halifax","eastern standard time":Te+"New_York",eastern:Te+"New_York","eastern time":Te+"New_York",est:Te+"New_York","eastern daylight time":Te+"New_York",edt:Te+"New_York","pacific time":Te+"Los_Angeles","pacific standard time":Te+"Los_Angeles",pst:Te+"Los_Angeles","pacific daylight time":Te+"Los_Angeles",pdt:Te+"Los_Angeles","alaskan standard time":Te+"Anchorage","alaskan time":Te+"Anchorage",ahst:Te+"Anchorage","alaskan daylight time":Te+"Anchorage",ahdt:Te+"Anchorage","hawaiian standard time":tn+"Honolulu","hawaiian time":tn+"Honolulu",hst:tn+"Honolulu","aleutian time":tn+"Honolulu","hawaii time":tn+"Honolulu","newfoundland standard time":Te+"St_Johns","newfoundland time":Te+"St_Johns",nst:Te+"St_Johns","newfoundland daylight time":Te+"St_Johns",ndt:Te+"St_Johns","brazil time":Te+"Sao_Paulo",brt:Te+"Sao_Paulo",brasília:Te+"Sao_Paulo",brasilia:Te+"Sao_Paulo","brazilian time":Te+"Sao_Paulo","argentina time":Te+"Buenos_Aires","argentinian time":Te+"Buenos_Aires","amazon time":Te+"Manaus",amt:Te+"Manaus","amazonian time":Te+"Manaus","easter island standard time":"Chile/Easterisland",east:"Chile/Easterisland","easter island summer time":"Chile/Easterisland",easst:"Chile/Easterisland","venezuelan standard time":Te+"Caracas","venezuelan time":Te+"Caracas",vet:Te+"Caracas","venezuela time":Te+"Caracas","paraguay time":Te+"Asuncion",pyt:Te+"Asuncion","paraguay summer time":Te+"Asuncion",pyst:Te+"Asuncion","cuba standard time":Te+"Havana","cuba time":Te+"Havana","cuba daylight time":Te+"Havana","cuban time":Te+"Havana","bolivia time":Te+"La_Paz","bolivian time":Te+"La_Paz","colombia time":Te+"Bogota",cot:Te+"Bogota","colombian time":Te+"Bogota","acre time":Te+"Eirunepe","peru time":Te+"Lima","chile standard time":Te+"Punta_Arenas","chile time":Te+"Punta_Arenas",clst:Te+"Punta_Arenas","chile summer time":Te+"Punta_Arenas",cldt:Te+"Punta_Arenas","uruguay time":Te+"Montevideo",uyt:Te+"Montevideo",ist:_e+"Jerusalem","arabic standard time":_e+"Baghdad","arabic time":_e+"Baghdad","arab time":_e+"Baghdad","iran standard time":_e+"Tehran","iran time":_e+"Tehran",irst:_e+"Tehran","iran daylight time":_e+"Tehran",irdt:_e+"Tehran",iranian:_e+"Tehran","pakistan standard time":_e+"Karachi","pakistan time":_e+"Karachi",pkt:_e+"Karachi","india standard time":_e+"Kolkata","indian time":_e+"Kolkata","indochina time":_e+"Bangkok",ict:_e+"Bangkok","south east asia":_e+"Bangkok","china standard time":_e+"Shanghai",ct:_e+"Shanghai","chinese time":_e+"Shanghai","alma-ata time":_e+"Almaty",almt:_e+"Almaty","oral time":_e+"Oral","orat time":_e+"Oral","yakutsk time":_e+"Yakutsk",yakt:_e+"Yakutsk","gulf standard time":_e+"Dubai","gulf time":_e+"Dubai",gst:_e+"Dubai",uae:_e+"Dubai","hong kong time":_e+"Hong_Kong",hkt:_e+"Hong_Kong","western indonesian time":_e+"Jakarta",wib:_e+"Jakarta","indonesia time":_e+"Jakarta","central indonesian time":_e+"Makassar",wita:_e+"Makassar","israel daylight time":_e+"Jerusalem",idt:_e+"Jerusalem","israel standard time":_e+"Jerusalem","israel time":_e+"Jerusalem",israeli:_e+"Jerusalem","krasnoyarsk time":_e+"Krasnoyarsk",krat:_e+"Krasnoyarsk","malaysia time":_e+"Kuala_Lumpur",myt:_e+"Kuala_Lumpur","singapore time":_e+"Singapore",sgt:_e+"Singapore","korea standard time":_e+"Seoul","korea time":_e+"Seoul",kst:_e+"Seoul","korean time":_e+"Seoul","uzbekistan time":_e+"Samarkand",uzt:_e+"Samarkand","vladivostok time":_e+"Vladivostok",vlat:_e+"Vladivostok","maldives time":"Indian/Maldives",mvt:"Indian/Maldives","mauritius time":"Indian/Mauritius",mut:"Indian/Mauritius","marshall islands time":tn+"Kwajalein",mht:tn+"Kwajalein","samoa standard time":tn+"Midway",sst:tn+"Midway","somoan time":tn+"Midway","chamorro standard time":tn+"Guam",chst:tn+"Guam","papua new guinea time":tn+"Bougainville",pgt:tn+"Bougainville"};let K$=gt().timezones,Y$=Object.keys(K$).reduce((e,t)=>(e[t]=t,e),{});const Pg=Object.assign({},J$,Y$),Z$=/(-?[0-9]+)h(rs)?/i,Q$=/(-?[0-9]+)/,X$=/utc([-+]?[0-9]+)/i,e_=/gmt([-+]?[0-9]+)/i,Ru=function(e){return e=Number(e),e>-13&&e<13?(e=e*-1,e=(e>0?"+":"")+e,"Etc/GMT"+e):null},t_=function(e){let t=e.match(Z$);if(t!==null||(t=e.match(X$),t!==null))return Ru(t[1]);if(t=e.match(e_),t!==null){let r=Number(t[1])*-1;return Ru(r)}return t=e.match(Q$),t!==null?Ru(t[1]):null},r_=function(e){let t=e.match("#Timezone+");t=t.not("(in|for|by|near|at)");let r=t.text("reduced");if(Pg.hasOwnProperty(r))return{result:Pg[r],m:t};let n=t_(r);return n?{result:n,m:t}:{result:null,m:e.none()}},n_=function(e){let t=e.match("#WeekDay");return t.found&&!e.has("^#WeekDay$")?e.has("(this|next|last) (next|upcoming|coming|past)? #WeekDay")?{result:null,m:e.none()}:{result:t.text("reduced"),m:t}:{result:null,m:e.none()}},a_=function(e){return e=e.not("[^the] !#Value",0),e=e.not("#Preposition$"),e=e.not("#Conjunction$"),e=e.not("sharp"),e=e.not("on the dot"),e=e.not("^(on|of)"),e=e.not("(next|last|this)$"),e},i_=function(e,t){let r=nB(e),n=r.result;e=e.not(r.m),r=iB(e);let a=r.result;e=e.not(r.m),r=r_(e);let i=r.result;e=e.not(r.m),r=yd(e,t);let o=r.result;e=e.not(r.m),r=n_(e);let s=r.result;e=e.not(r.m),r=W$(e);let u=r.result;e=e.not(r.m),r=U$(e);let l=r.result;return e=e.not(r.m),e=a_(e),{shift:n,counter:a,tz:i,time:o,weekDay:s,section:u,rel:l,doc:e}};let vn=class Ww{constructor(t,r,n){this.unit=r||"day",this.setTime=!1,n=n||{};let a={};n.today&&(a={date:n.today.date(),month:n.today.month(),year:n.today.year()}),t&&t.month==="sept"&&(t.month="sep");let i=gt(t,n.timezone,{today:a,dmy:n.dmy});Object.defineProperty(this,"d",{enumerable:!1,writable:!0,value:i}),Object.defineProperty(this,"context",{enumerable:!1,writable:!0,value:n})}clone(){let t=new Ww(this.d,this.unit,this.context);return t.setTime=this.setTime,t}log(){return console.log("--"),this.d.log(),console.log(`
19
+ `),this}applyShift(t={}){return Object.keys(t).forEach(r=>{this.d=this.d.add(t[r],r),(r==="hour"||r==="minute")&&(this.setTime=!0)}),this}applyTime(t){if(t){if(/^[0-9]{1,2}$/.test(t)?this.d=this.d.hour(t):this.d=this.d.time(t),!/[ap]m/.test(t)){let a=this.d.time("6:00am");this.d.isBefore(a)&&(this.d=this.d.ampm("pm"));let i=this.d.time("10:00pm");this.d.isAfter(i)&&(this.d=this.d.ampm("am"))}}else this.d=this.d.startOf("day");return this.setTime=!0,this}applyWeekDay(t){if(t){let r=this.d.epoch;this.d=this.d.day(t),this.d.epoch<r&&(this.d=this.d.add(1,"week"))}return this}applyRel(t){return t==="next"?this.next():t==="last"||t==="this-past"?this.last():this}applySection(t){return t==="start"?this.start():t==="end"?this.end():t==="middle"?this.middle():this}format(t){return this.d.format(t)}start(){return this.d=this.d.startOf(this.unit),this.context.dayStart&&(this.d=this.d.time(this.context.dayStart)),this}end(){if(this.d=this.d.endOf(this.unit),this.context.dayEnd){this.d=this.d.startOf("day");let t=this.d.time(this.context.dayEnd);if(t.isAfter(this.d))return this.d=t,this}return this}middle(){let t=this.d.diff(this.d.endOf(this.unit)),r=Math.round(t.minutes/2);return this.d=this.d.add(r,"minutes"),this}beforeEnd(){let t=this.d.startOf(this.unit).diff(this.d.endOf(this.unit)),r=Math.round(t.minutes/4);return this.d=this.d.endOf(this.unit),this.d=this.d.minus(r,"minutes"),this.context.dayStart&&(this.d=this.d.time(this.context.dayStart)),this}before(){return this.d=this.d.minus(1,this.unit),this.d=this.d.endOf(this.unit),this.context.dayEnd&&(this.d=this.d.time(this.context.dayEnd)),this}after(){return this.d=this.d.add(1,this.unit),this.d=this.d.startOf(this.unit),this}next(){return this.d=this.d.add(1,this.unit),this.d=this.d.startOf(this.unit),this}last(){return this.d=this.d.minus(1,this.unit),this.d=this.d.startOf(this.unit),this}};class Pn extends vn{constructor(t,r,n){super(t,r,n),this.unit="day",this.d.isValid()&&(this.d=this.d.startOf("day"))}middle(){return this.d=this.d.time("10am"),this}beforeEnd(){return this.d=this.d.time("2pm"),this}}class Un extends Pn{constructor(t,r,n){super(t,r,n),this.unit="day",this.d.isValid()&&(this.d=this.d.startOf("day"))}next(){return this.d=this.d.add(1,"year"),this}last(){return this.d=this.d.minus(1,"year"),this}}class Tm extends Pn{constructor(t,r,n){super(t,r,n),this.unit="day",this.isWeekDay=!0,typeof t=="string"?(this.d=gt(n.today,n.timezone),this.d=this.d.day(t),this.d.isBefore(n.today)&&(this.d=this.d.add(7,"days"))):this.d=t,this.weekDay=this.d.dayName(),this.d.isValid()&&(this.d=this.d.startOf("day"))}next(){return this.d=this.d.add(7,"days"),this.d=this.d.day(this.weekDay),this}last(){return this.d=this.d.minus(7,"days"),this.d=this.d.day(this.weekDay),this}before(){return this.d=this.d.minus(1,"day"),this.d=this.d.endOf("day"),this.context.dayEnd&&(this.d=this.d.time(this.context.dayEnd)),this}applyRel(t){if(t==="next"){let r=this.context.today.endOf("week").add(1,"week");return this.next(),this.d.isAfter(r)&&this.last(),this}if(t==="this-past")return this.last();if(t==="last"){let r=this.context.today.startOf("week");return this.last(),this.d.isBefore(r)===!1&&this.last(),this}return this}}class o_ extends Un{constructor(t,r,n){super(t,r,n),this.unit="day",this.d.isValid()&&(this.d=this.d.startOf("day"))}}class Al extends vn{constructor(t,r,n){super(t,r,n,!0),this.unit="hour",this.d.isValid()&&(this.d=this.d.startOf("hour"))}}class Jw extends vn{constructor(t,r,n){super(t,r,n,!0),this.unit="minute",this.d.isValid()&&(this.d=this.d.startOf("minute"))}}class sa extends vn{constructor(t,r,n){super(t,r,n,!0),this.unit="millisecond"}}class s_ extends vn{constructor(t,r,n){super(t,r,n),this.unit="month",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}}class ni extends vn{constructor(t,r,n){super(t,r,n),this.unit="month",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}next(){return this.d=this.d.add(1,"year"),this.d=this.d.startOf("month"),this}last(){return this.d=this.d.minus(1,"year"),this.d=this.d.startOf("month"),this}middle(){return this.d=this.d.add(15,"days"),this.d=this.d.startOf("day"),this}}class kg extends vn{constructor(t,r,n){super(t,r,n),this.unit="quarter",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}last(){return this.d=this.d.minus(1,"quarter"),this.d=this.d.startOf(this.unit),this}}class Fm extends vn{constructor(t,r,n){super(t,r,n),this.unit="quarter",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}next(){return this.d=this.d.add(1,"year"),this.d=this.d.startOf(this.unit),this}last(){return this.d=this.d.minus(1,"year"),this.d=this.d.startOf(this.unit),this}}class bd extends vn{constructor(t,r,n){super(t,r,n),this.unit="season",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}next(){return this.d=this.d.add(1,"year"),this.d=this.d.startOf(this.unit),this}last(){return this.d=this.d.minus(1,"year"),this.d=this.d.startOf(this.unit),this}}class Pm extends vn{constructor(t,r,n){super(t,r,n),this.unit="year",this.d.isValid()&&(this.d=this.d.startOf("year"))}}class Ls extends vn{constructor(t,r,n){super(t,r,n),this.unit="week",this.d.isValid()&&(this.d=this.d.startOf("week"))}clone(){return new Ls(this.d,this.unit,this.context)}middle(){return this.d=this.d.add(2,"days"),this}beforeEnd(){return this.d=this.d.day("friday"),this}}class Kw extends vn{constructor(t,r,n){super(t,r,n),this.unit="week",this.d.isValid()&&(this.d=this.d.day("saturday"),this.d=this.d.startOf("day"))}start(){return this.d=this.d.day("saturday").startOf("day"),this}next(){return this.d=this.d.add(1,this.unit),this.d=this.d.startOf("weekend"),this}last(){return this.d=this.d.minus(1,this.unit),this.d=this.d.startOf("weekend"),this}}const Jn={today:e=>new Pn(e.today,null,e),yesterday:e=>new Pn(e.today.minus(1,"day"),null,e),tomorrow:e=>new Pn(e.today.plus(1,"day"),null,e),eom:e=>{let t=e.today.endOf("month");return t=t.startOf("day"),new Pn(t,null,e)},eoy:e=>{let t=e.today.endOf("year");return t=t.startOf("day"),new Pn(t,null,e)},now:e=>new sa(e.today,null,e)};Jn.tommorrow=Jn.tomorrow;Jn.tmrw=Jn.tomorrow;Jn.anytime=Jn.today;Jn.sometime=Jn.today;const u_=function(e,t,r){let n=null;e.found===!1&&(r.time!==null&&(n=new sa(t.today,null,t)),r.shift&&Object.keys(r.shift).length>0&&(r.shift.hour||r.shift.minute?n=new sa(t.today,null,t):n=new Pn(t.today,null,t)));let a=e.text("reduced");return Jn.hasOwnProperty(a)===!0?Jn[a](t):a==="next"&&r.shift&&Object.keys(r.shift).length>0?Jn.tomorrow(t):n},Oi="january",Bi="february",Og="march",Lu="april",Do="may",l_="june",Hu="july",Gu="august",Nf="september",Ds="october",Ka="november",ia="december";var Vu={"new years eve":[ia,31],"new years":[Oi,1],"new years day":[Oi,1],"inauguration day":[Oi,20],"australia day":[Oi,26],"national freedom day":[Bi,1],"groundhog day":[Bi,2],"rosa parks day":[Bi,4],"valentines day":[Bi,14],"saint valentines day":[Bi,14],"st valentines day ":[Bi,14],"saint patricks day":[Og,17],"st patricks day":[Og,17],"april fools":[Lu,1],"april fools day":[Lu,1],"emancipation day":[Lu,16],"tax day":[Lu,15],"labour day":[Do,1],"cinco de mayo":[Do,5],"national nurses day":[Do,6],"harvey milk day":[Do,22],"victoria day":[Do,24],juneteenth:[l_,19],"canada day":[Hu,1],"independence day":[Hu,4],"independents day":[Hu,4],"bastille day":[Hu,14],"purple heart day":[Gu,7],"womens equality day":[Gu,26],"16 de septiembre":[Nf,16],"dieciseis de septiembre":[Nf,16],"grito de dolores":[Nf,16],halloween:[Ds,31],"all hallows eve":[Ds,31],"day of the dead":[Ds,31],"dia de muertos":[Ds,31],"veterans day":[Ka,11],"st andrews day":[Ka,30],"saint andrews day":[Ka,30],"all saints day":[Ka,1],"all sts day":[Ka,1],"armistice day":[Ka,11],"rememberance day":[Ka,11],"christmas eve":[ia,24],christmas:[ia,25],xmas:[ia,25],"boxing day":[ia,26],"st stephens day":[ia,26],"saint stephens day":[ia,26],epiphany:[Oi,6],"orthodox christmas day":[Oi,7],"orthodox new year":[Oi,14],"assumption of mary":[Gu,15],"all souls day":[Ka,2],"feast of the immaculate conception":[ia,8],"feast of our lady of guadalupe":[ia,12],kwanzaa:[ia,26],imbolc:[Bi,2],beltaine:[Do,1],lughnassadh:[Gu,1],samhain:[Ds,31]};const c_=function(e,t,r,n){if(Vu.hasOwnProperty(e)||Vu.hasOwnProperty(t)){let a=Vu[e]||Vu[t]||[],i=gt.now(n);if(i=i.year(r),i=i.startOf("year"),i=i.month(a[0]),i=i.date(a[1]),i.isValid())return i}return null};var f_=c_;const m_="january",d_="february",h_="march",p_="may",g_="june",v_="september",Bg="october",$g="november",No="monday",y_="thursday",b_="friday",_g="sunday";let Zi={"martin luther king day":[3,No,m_],"presidents day":[3,No,d_],"commonwealth day":[2,No,h_],"mothers day":[2,_g,p_],"fathers day":[3,_g,g_],"labor day":[1,No,v_],"columbus day":[2,No,Bg],"canadian thanksgiving":[2,No,Bg],thanksgiving:[4,y_,$g],"black friday":[4,b_,$g]};Zi["turday day"]=Zi.thanksgiving;Zi["indigenous peoples day"]=Zi["columbus day"];Zi["mlk day"]=Zi["martin luther king day"];var Uu=Zi;const w_=function(e,t,r,n){if(Uu.hasOwnProperty(e)||Uu.hasOwnProperty(t)){let a=Uu[e]||Uu[t]||[],i=gt.now(n);i=i.year(r),i=i.month(a[2]),i=i.startOf("month");let o=i.month();if(i=i.day(a[1]),i.month()!==o&&(i=i.add(1,"week")),a[0]>1&&(i=i.add(a[0]-1,"week")),i.isValid())return i}return null};var x_=w_;let Qi={easter:0,"ash wednesday":-46,"palm sunday":7,"maundy thursday":-3,"good friday":-2,"holy saturday":-1,"easter saturday":-1,"easter monday":1,"ascension day":39,"whit sunday":49,"whit monday":50,"trinity sunday":65,"corpus christi":60,"mardi gras":-47};Qi["easter sunday"]=Qi.easter;Qi.pentecost=Qi["whit sunday"];Qi.whitsun=Qi["whit sunday"];var Wu=Qi;const D_=function(e){let t=Math.floor,r=e%19,n=t(e/100),a=(n-t(n/4)-t((8*n+13)/25)+19*r+15)%30,i=a-t(a/28)*(1-t(29/(a+1))*t((21-r)/11)),o=(e+t(e/4)+i+2-n+t(n/4))%7,s=i-o,u=3+t((s+40)/44),l=s+28-31*t(u/4);return u=u===4?"April":"March",u+" "+l};var N_=D_;const A_=function(e,t,r,n){if(Wu.hasOwnProperty(e)||Wu.hasOwnProperty(t)){let a=Wu[e]||Wu[t]||[],i=N_(r);if(!i)return null;let o=gt(i,n);o=o.year(r);let s=o.add(a,"day");if(s.isValid())return s}return null};var C_=A_;const Ju={spring:[2003,2007,2044,2048,2052,2056,2060,2064,2068,2072,2076,2077,2080,2081,2084,2085,2088,2089,2092,2093,2096,2097],summer:[2021,2016,2020,2024,2028,2032,2036,2040,2041,2044,2045,2048,2049,2052,2053,2056,2057,2060,2061,2064,2065,2068,2069,2070,2072,2073,2074,2076,2077,2078,2080,2081,2082,2084,2085,2086,2088,2089,2090,2092,2093,2094,2096,2097,2098,2099],fall:[2002,2003,2004,2006,2007,2010,2011,2014,2015,2018,2019,2022,2023,2026,2027,2031,2035,2039,2043,2047,2051,2055,2059,2092,2096],winter:[2002,2003,2006,2007,2011,2015,2019,2023,2027,2031,2035,2039,2043,2080,2084,2088,2092,2096]},E_=[2080,2084,2088,2092,2096],S_=function(e){let t={spring:"March 20 "+e,summer:"June 21 "+e,fall:"Sept 22 "+e,winter:"Dec 21 "+e};return Ju.spring.indexOf(e)!==-1&&(t.spring="March 19 "+e),Ju.summer.indexOf(e)!==-1&&(t.summer="June 20 "+e),Ju.fall.indexOf(e)!==-1&&(t.fall="Sept 21 "+e),Ju.winter.indexOf(e)!==-1&&(t.winter="Dec 22 "+e),E_.indexOf(e)!==-1&&(t.winter="Dec 20 "+e),t};var M_=S_;let It={"spring equinox":"spring","summer solistice":"summer","fall equinox":"fall","winter solstice":"winter"};It["march equinox"]=It["spring equinox"];It["vernal equinox"]=It["spring equinox"];It.ostara=It["spring equinox"];It["june solstice"]=It["summer solistice"];It.litha=It["summer solistice"];It["autumn equinox"]=It["fall equinox"];It["autumnal equinox"]=It["fall equinox"];It["september equinox"]=It["fall equinox"];It["sept equinox"]=It["fall equinox"];It.mabon=It["fall equinox"];It["december solstice"]=It["winter solistice"];It["dec solstice"]=It["winter solistice"];It.yule=It["winter solistice"];var Ku=It;const T_=function(e,t,r,n){if(Ku.hasOwnProperty(e)||Ku.hasOwnProperty(t)){let a=Ku[e]||Ku[t],i=M_(r);if(!a||!i||!i[a])return null;let o=gt(i[a],n);if(o.isValid())return o}return null};var F_=T_;let P_={"isra and miraj":"april 13","lailat al-qadr":"june 10","eid al-fitr":"june 15","id al-Fitr":"june 15","eid ul-Fitr":"june 15",ramadan:"may 16","eid al-adha":"sep 22",muharram:"sep 12","prophets birthday":"nov 21"};var Yu=P_;const k_=-10.64,O_=function(e,t,r,n){if(Yu.hasOwnProperty(e)||Yu.hasOwnProperty(t)){let a=Yu[e]||Yu[t]||[];if(!a)return null;let i=gt(a+" 2018",n),s=(r-2018)*k_;if(i=i.add(s,"day"),i=i.startOf("day"),i=i.year(r),i.isValid())return i}return null};var B_=O_;const $_=gt.now().year(),Ig=function(e,t,r){t=t||$_,e=e||"",e=String(e),e=e.trim().toLowerCase(),e=e.replace(/'s/,"s");let n=e.replace(/ day$/,"");n=n.replace(/^the /,""),n=n.replace(/^orthodox /,"");let a=f_(e,n,t,r);return a!==null||(a=x_(e,n,t,r),a!==null)||(a=C_(e,n,t,r),a!==null)||(a=F_(e,n,t,r),a!==null)||(a=B_(e,n,t,r),a!==null)?a:null},__=function(e,t){let r=null,n=e.match("[<holiday>#Holiday+] [<year>#Year?]"),a=t.today.year();n.groups("year").found&&(a=Number(n.groups("year").text("reduced"))||a);let i=n.groups("holiday").text("reduced"),o=Ig(i,a,t.timezone);return o!==null&&(o.isBefore(t.today)&&a===t.today.year()&&(o=Ig(i,a+1,t.timezone)),r=new o_(o,null,t)),r},km={day:Pn,hour:Al,evening:Al,second:sa,milliscond:sa,instant:sa,minute:Jw,week:Ls,weekend:Kw,month:s_,quarter:kg,year:Pm,season:bd,yr:Pm,qtr:kg,wk:Ls,sec:sa,hr:Al};let I_=`^(${Object.keys(km).join("|")})$`;const z_=function(e,t){let r=e.match(I_);if(r.found===!0){let n=r.text("reduced");if(km.hasOwnProperty(n)){let a=km[n];return a?new a(null,n,t):null}}if(r=e.match("^#WeekDay$"),r.found===!0){let n=r.text("reduced");return new Tm(n,null,t)}return null},Zu=function(e){return{date:e.today.date(),month:e.today.month(),year:e.today.year()}},j_=function(e,t){let r=e.match("(spring|summer|winter|fall|autumn) [<year>#Year?]");if(r.found){let n=e.text("reduced"),a=gt(n,t.timezone,{today:Zu(t)}),i=new bd(a,null,t);if(i.d.isValid()===!0)return i}if(r=e.match("[<q>#FinancialQuarter] [<year>#Year?]"),r.found){let n=r.groups("q").text("reduced"),a=gt(n,t.timezone,{today:Zu(t)});if(r.groups("year")){let o=Number(r.groups("year").text())||t.today.year();a=a.year(o)}let i=new Fm(a,null,t);if(i.d.isValid()===!0)return i}if(r=e.match("[<q>#Value] quarter (of|in)? [<year>#Year?]"),r.found){let n=r.groups("q").text("reduced"),a=gt(`q${n}`,t.timezone,{today:Zu(t)});if(r.groups("year")){let o=Number(r.groups("year").text())||t.today.year();a=a.year(o)}let i=new Fm(a,null,t);if(i.d.isValid()===!0)return i}if(r=e.match("^#Year$"),r.found){let n=e.text("reduced"),a=gt(null,t.timezone,{today:Zu(t)});a=a.year(n);let i=new Pm(a,null,t);if(i.d.isValid()===!0)return i}return null},q_=function(e,t){let r=t.today.year(),n=e.match("[<date>#Value] of? [<month>#Month] [<year>#Year]");if(n.found||(n=e.match("[<month>#Month] the? [<date>#Value] [<year>#Year]")),n.found){let o={month:n.groups("month").text("reduced"),date:n.groups("date").text("reduced"),year:n.groups("year").text()||r},s=new Un(o,null,t);if(s.d.isValid()===!0)return s}if(n=e.match("[<month>#Month] of? [<year>#Year]"),n.found){let o={month:n.groups("month").text("reduced"),year:n.groups("year").text("reduced")||r},s=new ni(o,null,t);if(s.d.isValid()===!0)return s}if(n=e.match("[<month>#Month] [<date>#Value+]? of? the? [<rel>(this|next|last|current)] year"),n.found){let o=n.groups("rel").text("reduced"),s=r;o==="next"?s+=1:o==="last"&&(s-=1);let u={month:n.groups("month").text("reduced"),date:n.groups("date").numbers(0).get()[0],year:s};if(u.date===void 0){u.date=1;let c=new ni(u,null,t);if(c.d.isValid()===!0)return c}let l=new Un(u,null,t);if(l.d.isValid()===!0)return l}if(n=e.match("^the? [<date>#Value+]? of? [<rel>(this|next|last|current)] month"),n.found){let o=t.today.month(),s=n.groups("rel").text("reduced");s==="next"?o+=1:s==="last"&&(o-=1);let u={month:o,date:n.groups("date").numbers(0).get()[0]},l=new Un(u,null,t);if(l.d.isValid()===!0)return l}if(n=e.match("[<date>#Value] of? [<month>#Month]"),n.found||(n=e.match("[<month>#Month] the? [<date>#Value]")),n.found){let o={month:n.groups("month").text("reduced"),date:n.groups("date").text("reduced"),year:t.today.year()},s=new Un(o,null,t);if(s.d.month()<t.today.month()&&(o.year+=1,s=new Un(o,null,t)),s.d.isValid()===!0)return s}if(e.has("#Month")){let o={month:e.match("#Month").text("reduced"),date:1,year:t.today.year()},s=new ni(o,null,t);if(s.d.month()<t.today.month()&&(o.year+=1,s=new ni(o,null,t)),s.d.isValid()===!0)return s}if(n=e.match("#WeekDay [<date>#Value]"),n.found){let o={month:t.today.month(),date:n.groups("date").text("reduced"),year:t.today.year()},s=new Un(o,null,t);if(s.d.isValid()===!0)return s}if(n=e.match("the [<date>#Value]"),n.found){let o={month:t.today.month(),date:n.groups("date").text("reduced"),year:t.today.year()},s=new Un(o,null,t);if(s.d.isValid()===!0)return s.d.isBefore(t.today)&&(s.d=s.d.add(1,"month")),s}if(n=e.match("/[0-9]{4}-[0-9]{2}-[0-9]{2}t[0-9]{2}:/"),n.found){let o=e.text("reduced"),s=new sa(o,null,t);if(s.d.isValid()===!0)return s}let a=e.text("reduced");if(!a)return new sa(t.today,null,t);let i=new Pn(a,null,t);return i.d.isValid()===!1?null:i},R_=function(e,t,r){let n=null;return n=n||u_(e,t,r),n=n||__(e,t),n=n||z_(e,t),n=n||j_(e,t),n=n||q_(e,t),n},L_={day:Pn,week:Ls,weekend:Kw,month:ni,quarter:Fm,season:bd,hour:Al,minute:Jw},H_=function(e,t={}){let r=L_[t.unit];if(!r)return e;let n=e.d;t.dir==="first"||t.num===0?(n=e.start().d,n=n.startOf(t.unit)):t.dir==="last"?(n=n.endOf(e.unit),t.unit==="weekend"?n=n.day("saturday",!1):n=n.startOf(t.unit)):t.num&&(t.unit==="weekend"&&(n=n.day("saturday",!0).add(1,"day")),n=n.add(t.num,t.unit));let a=new r(n,null,e.context);return a.d.isValid()===!0?a:e},G_=function(e,t,r){if(!e&&r.weekDay&&(e=new Tm(r.weekDay,null,t),r.weekDay=null),!e)return null;if(r.shift){let n=r.shift;e.applyShift(n),n.hour||n.minute?e=new sa(e.d,null,e.context):(n.week||n.day||n.month)&&(e=new Pn(e.d,null,e.context))}return r.weekDay&&e.unit!=="day"&&(e.applyWeekDay(r.weekDay),e=new Tm(e.d,null,e.context)),r.rel&&e.applyRel(r.rel),r.section&&e.applySection(r.section),r.time&&e.applyTime(r.time),r.counter&&r.counter.unit&&(e=H_(e,r.counter)),e},V_=typeof process>"u"||!process.env?self.env||{}:process.env,U_=e=>{V_.DEBUG_DATE&&(console.log(`
20
+ ==== '${e.doc.text()}' =====`),Object.keys(e).forEach(t=>{t!=="doc"&&e[t]&&console.log(t,e[t])}),e.doc.debug())},Nt=function(e,t){let r=i_(e,t);if(e=r.doc,U_(r),r.tz){t=Object.assign({},t,{timezone:r.tz});let a=t.today.format("iso-short");t.today=t.today.goto(t.timezone).set(a)}let n=R_(e,t,r);return n=G_(n,t,r),n},zg={mon:"monday",tue:"tuesday",tues:"wednesday",wed:"wednesday",thu:"thursday",fri:"friday",sat:"saturday",sun:"sunday",monday:"monday",tuesday:"tuesday",wednesday:"wednesday",thursday:"thursday",friday:"friday",saturday:"saturday",sunday:"sunday"},Qu=function(e){return e.match("(every|each)").found?"AND":e.match("(any|a)").found?"OR":null},W_=function(e,t){let r=e.match("[<logic>(every|any|each)] [<skip>other?] [<unit>#Duration] (starting|beginning|commencing)?");if(r.found){let n={interval:{}},a=r.groups("unit").text("reduced");return n.interval[a]=1,n.choose=Qu(r),r.groups("skip").found&&(n.interval[a]=2),e=e.remove(r),{repeat:n}}if(r=e.match("[<logic>(every|any|each)] [<num>#Value] [<unit>#Duration] (starting|beginning|commencing)?"),r.found){let n={interval:{}},a=r.groups("unit");a.nouns().toSingular();let i=a.text("reduced");return n.interval[i]=r.groups("num").numbers().get()[0],n.choose=Qu(r),e=e.remove(r),{repeat:n}}if(r=e.match("[<logic>(every|any|each|a)] [<skip>other?] [<day>#WeekDay+] (starting|beginning|commencing)?"),r.found){let n={interval:{day:1},filter:{weekDays:{}}},a=r.groups("day").text("reduced");if(a=zg[a],a)return n.filter.weekDays[a]=!0,n.choose=Qu(r),e=e.remove(r),{repeat:n}}if(r=e.match("[<logic>(every|any|each|a)] [<day>(weekday|week day|weekend|weekend day)] (starting|beginning|commencing)?"),r.found){let n={interval:{day:1},filter:{weekDays:{}}},a=r.groups("day");return a.has("(weekday|week day)")?n.filter.weekDays={monday:!0,tuesday:!0,wednesday:!0,thursday:!0,friday:!0}:a.has("(weekend|weekend day)")&&(n.filter.weekDays={saturday:!0,sunday:!0}),n.choose=Qu(r),e=e.remove(r),{repeat:n}}if(r=e.match("[<day>(mondays|tuesdays|wednesdays|thursdays|fridays|saturdays|sundays)] (at|near|after)? [<time>#Time+?]"),r.found){let n={interval:{day:1},filter:{weekDays:{}}},a=r.groups("day").text("reduced");if(a=a.replace(/s$/,""),a=zg[a],a){n.filter.weekDays[a]=!0,n.choose="OR",e=e.remove(r);let i=r.groups("time");return i.found&&(n.time=yd(i,t)),{repeat:n}}}return null},ks=function(e){let t=e.start,r=e.end;if(t.d.isAfter(r.d)){if(t.isWeekDay&&r.isWeekDay)return e.end.next(),e;let n=t;e.start=r,e.end=n}return e},Af=function(e){let t=e.start,r=e.end;return t.d.isAfter(r.d)&&r.d.hour()<10&&(r.d=r.d.ampm("pm")),e},J_=[{match:"[<from>#Time+] (to|until|upto|through|thru|and) [<to>#Time+ #Date+]",desc:"3pm to 4pm january 5th",parse:(e,t)=>{let r=e.groups("from"),n=e.groups("to"),a=Nt(n,t);if(a){let i=a.clone();if(i.applyTime(r.text("implicit")),i){let o={start:i,end:a,unit:"time"};return/(am|pm)/.test(n)===!1&&(o=Af(o)),o=ks(o),o}}return null}},{match:"[<main>#Date+] from [<a>#Time] (to|until|upto|through|thru|and) [<b>#Time+]",desc:"january from 3pm to 4pm",parse:(e,t)=>{let r=e.groups("main"),n=e.groups("a"),a=e.groups("b");if(r=Nt(r,t),r){r.applyTime(n.text("implicit"));let i=r.clone();if(i.applyTime(a.text("implicit")),i){let o={start:r,end:i,unit:"time"};return/(am|pm)/.test(a.text())===!1&&(o=Af(o)),o=ks(o),o}}return null}},{match:"[<from>#Date+] (to|until|upto|through|thru|and) [<to>#Time+]",desc:"january from 3pm to 4pm",parse:(e,t)=>{let r=e.groups("from"),n=e.groups("to");if(r=Nt(r,t),r){let a=r.clone();if(a.applyTime(n.text("implicit")),a){let i={start:r,end:a,unit:"time"};return/(am|pm)/.test(n.text())===!1&&(i=Af(i)),i=ks(i),i}}return null}}],K_=[{match:"^during? #Month+ (or|and) #Month [<year>#Year]?",desc:"march or june",parse:(e,t)=>{let r=e.match("^during? [#Month]",0);e=e.not("(or|and)");let n=Nt(r,t);if(n){let a=[{start:n,end:n.clone().end(),unit:n.unit}],i=e.not(r);i.found&&i.match("#Month").forEach(s=>{let u=Nt(s,t);a.push({start:u,end:u.clone().end(),unit:u.unit})});let o=e.match("#Year$");return o.found&&(o=o.text("reduced"),a.forEach(s=>{s.start.d=s.start.d.year(o),s.end.d=s.end.d.year(o)})),a}return null}},{match:"^#Month #Value+ (or|and)? #Value$",desc:"jan 5 or 8",parse:(e,t)=>{e=e.not("(or|and)");let r=e.match("^#Month #Value"),n=Nt(r,t);if(n){let a=[{start:n,end:n.clone().end(),unit:n.unit}],i=e.not(r);return i.found&&i.match("#Value").forEach(o=>{let s=n.clone();s.d=s.d.date(o.text("reduced")),a.push({start:s,end:s.clone().end(),unit:s.unit})}),a}return null}},{match:"^#Month+ #Value #Value+$",desc:"jan 5 8",parse:(e,t)=>{let r=e.match("#Month"),n=e.match("#Year");e=e.not("#Year");let a=[];return e.match("#Value").forEach(i=>{i=i.clone();let o=i.prepend(r.text());n.found&&o.append(n);let s=Nt(o,t);s&&a.push({start:s,end:s.clone().end(),unit:s.unit})}),a}},{match:"^#Value+ (or|and)? #Value of #Month #Year?$",desc:"5 or 8 of Jan",parse:(e,t)=>{let r=e.match("#Month"),n=e.match("#Year");e=e.not("#Year");let a=[];return e.match("#Value").forEach(i=>{let o=i.append(r);n.found&&o.append(n);let s=Nt(o,t);s&&a.push({start:s,end:s.clone().end(),unit:s.unit})}),a}},{match:"^!(between|from|during)? [<from>#Date+] (and|or) [<to>#Date+]$",desc:"A or B",parse:(e,t)=>{let r=e.groups("from"),n=e.groups("to"),a=Nt(r,t),i=Nt(n,t);return a&&i?[{start:a,end:a.clone().end()},{start:i,end:i.clone().end()}]:null}}],Y_=[{match:"between [<start>#Month] and [<end>#Month] [<year>#Year?]",desc:"between march and jan",parse:(e,t)=>{let{start:r,end:n,year:a}=e.groups(),i=a&&a.found?Number(a.text("reduced")):t.today.year(),o={month:r.text("reduced"),year:i},s=new ni(o,null,t).start();o={month:n.text("reduced"),year:i};let u=new ni(o,null,t).start();return s.d.isAfter(u.d)?{start:u,end:s}:{start:s,end:u}}},{match:"between [<start>.+] and [<end>.+]",desc:"between friday and sunday",parse:(e,t)=>{let r=e.groups("start");r=Nt(r,t);let n=e.groups("end");return n=Nt(n,t),r&&n?(n=n.before(),{start:r,end:n}):null}},{match:"[<from>#Month #Value] (to|through|thru) [<to>#Month #Value] [<year>#Year?]",desc:"june 5 to june 7",parse:(e,t)=>{let r=e.groups(),n=r.from;if(r.year&&(n=n.append(r.year)),n=Nt(n,t),n){let a=r.to;if(r.year&&(a=a.append(r.year)),a=Nt(a,t),a)return n.d.isAfter(a.d)&&(a.d=a.d.add(1,"year")),{start:n,end:a.end()}}return null}},{match:"[<month>#Month] [<from>#Value] (to|through|thru) [<to>#Value] of? [<year>#Year]",desc:"january 5 to 7 1998",parse:(e,t)=>{let{month:r,from:n,to:a,year:i}=e.groups(),o=i.clone(),s=n.prepend(r).append(i);if(s=Nt(s,t),s){let u=a.prepend(r).append(o);return u=Nt(u,t),{start:s,end:u.end()}}return null}},{match:"[<from>#Value] (to|through|thru) [<to>#Value of? #Month #Date+?]",desc:"5 to 7 of january 1998",parse:(e,t)=>{let r=e.groups("to");if(r=Nt(r,t),r){let n=e.groups("from"),a=r.clone();return a.d=a.d.date(n.text("implicit")),{start:a,end:r.end()}}return null}},{match:"[<from>#Month #Value] (to|through|thru) [<to>#Value]",desc:"january 5 to 7",parse:(e,t)=>{let r=e.groups("from");if(r=Nt(r,t),r){let n=e.groups("to"),a=r.clone();return a.d=a.d.date(n.text("implicit")),{start:r,end:a.end()}}return null}},{match:"from? [<from>#Month] (to|until|upto|through|thru) [<to>#Month] [<year>#Year]",desc:"january to may 2020",parse:(e,t)=>{let r=e.groups("from"),n=e.groups("year").numbers().get()[0],a=e.groups("to");if(r=Nt(r,t),a=Nt(a,t),r.d=r.d.year(n),a.d=a.d.year(n),r&&a){let i={start:r,end:a.end()};return i=ks(i),i}return null}},{match:"^in [<min>#Value] to [<max>#Value] [<unit>(days|weeks|months|years)]",desc:"in 2 to 4 weeks",parse:(e,t)=>{const{min:r,max:n,unit:a}=e.groups();let i=new Un(t.today,null,t),o=i.clone();const s=a.text("implicit");return i=i.applyShift({[s]:r.numbers().get()[0]}),o=o.applyShift({[s]:n.numbers().get()[0]}),{start:i,end:o.end()}}},{match:"[<min>#Value] to [<max>#Value] [<unit>(days|weeks|months|years)] (ago|before|earlier|prior)",desc:"2 to 4 weeks ago",parse:(e,t)=>{const{min:r,max:n,unit:a}=e.groups();let i=new Un(t.today,null,t),o=i.clone();const s=a.text("implicit");return i=i.applyShift({[s]:-n.numbers().get()[0]}),o=o.applyShift({[s]:-r.numbers().get()[0]}),{start:i,end:o.end()}}},{match:"^until [<to>#Date+]",desc:"until christmas",parse:(e,t)=>{let r=e.groups("to");return r=Nt(r,t),r?{start:new Un(t.today,null,t),end:r.start()}:null}},{match:"[<part>(1st|initial|2nd|latter)] half of [<month>#Month] [<year>#Year?]",desc:"second half of march",parse:(e,t)=>{const{part:r,month:n,year:a}=e.groups();let i={month:n.text("reduced"),date:1,year:a&&a.found?a.text("reduced"):t.today.year()},o=new ni(i,null,t);return r.has("(1st|initial)")?{start:o.start(),end:o.clone().middle()}:{start:o.middle(),end:o.clone().end()}}}],Z_=function(e,t){return e=e.applyShift(t.punt),e},Q_=[{match:"from? [<from>.+] (to|until|upto|through|thru) [<to>.+]",desc:"from A to B",parse:(e,t)=>{let r=e.groups("from"),n=e.groups("to");if(r=Nt(r,t),n=Nt(n,t),r&&n){let a={start:r,end:n.end()};return a=ks(a),a}return null}},{match:"^due? (by|before) [.+]",desc:"before june",parse:(e,t)=>{e=e.group(0);let r=Nt(e,t);if(r){let n=new vn(t.today,null,t);n.d.isAfter(r.d)&&(n=r.clone().applyShift({weeks:-2}));let a=r.clone().applyShift({day:-1});return{start:n,end:a.end()}}return null}},{match:"^(on|in|at|@|during) [.+]",desc:"in june",parse:(e,t)=>{e=e.group(0);let r=Nt(e,t);return r?{start:r,end:r.clone().end(),unit:r.unit}:null}},{match:"^(after|following) [.+]",desc:"after june",parse:(e,t)=>{e=e.group(0);let r=Nt(e,t);return r?(r=r.after(),{start:r.clone(),end:Z_(r.clone(),t)}):null}},{match:"^(middle|center|midpoint) of [.+]",desc:"middle of",parse:(e,t)=>{e=e.group(0);let r=Nt(e,t),n=r.clone().middle(),a=r.beforeEnd();return r?{start:n,end:a}:null}},{match:".+ after #Time+$",desc:"tuesday after 5pm",parse:(e,t)=>{let r=Nt(e,t);if(r){let n=r.clone(),a=r.end();return{start:n,end:a,unit:"time"}}return null}},{match:".+ before #Time+$",desc:"tuesday before noon",parse:(e,t)=>{let r=Nt(e,t);if(r){let n=r.clone(),a=r.start();if(r)return{start:a,end:n,unit:"time"}}return null}}],jg=[].concat(J_,K_,Y_,Q_),X_=typeof process>"u"||!process.env?self.env||{}:process.env,e6=e=>{X_.DEBUG_DATE&&console.log(`
21
+ \x1B[32m ${e} \x1B[0m`)},t6=function(e){return Object.prototype.toString.call(e)==="[object Array]"},r6=function(e,t){let r={start:null,end:null};if(!e.found)return r;let n=Nt(e,t);if(n){let a=n.clone().end();r={start:n,end:a,unit:n.setTime?"time":n.unit}}return r},n6=function(e,t){for(let r=0;r<jg.length;r+=1){let n=jg[r],a=e.match(n.match);if(a.found){e6(` ---[${n.desc}]---`);let i=n.parse(a,t);if(i!==null)return t6(i)||(i=[i]),i}}return null},a6=function(e,t){let r=W_(e,t)||{},n=n6(e,t);return n||(n=[r6(e,t)]),n=n.map(a=>Object.assign({},r,a)),n.forEach(a=>{a.start&&a.end&&a.start.d.epoch>a.end.d.epoch&&(a.start=a.start.start())}),n},i6=function(e){return e.numbers||console.warn(`
22
+ Compromise warning: compromise/three must be used with compromise-dates plugin
23
+ `),e=e.clone(),e.numbers().toNumber(),e.contractions().expand(),e.replace("week end","weekend",!0).tag("Date"),e.replace("up to","upto",!0).tag("Date"),e.has("once (a|an) #Duration")===!1&&e.match("[(a|an)] #Duration",0).replaceWith("1",{tags:!0}).compute("lexicon"),e.match("@hasDash").insertAfter("to").tag("Date"),e},_i=function(e,t){return t=t||{},t.timezone===!1&&(t.timezone="UTC"),t.today=t.today||gt.now(t.timezone),t.today=gt(t.today,t.timezone),e=i6(e),a6(e,t)},o6=function(e){let r=e.end.d.add(1,"millisecond").since(e.start.d).diff;return delete r.milliseconds,delete r.seconds,r},qg=function(e){if(!e.start)return{start:null,end:null,timezone:null,duration:{}};let t=e.end?o6(e):{};return{start:e.start.format("iso"),end:e.end?e.end.format("iso"):null,timezone:e.start.d.format("timezone"),duration:t}},Cf=function(e,t){let r=e.fromText(t),n=_i(r,e.opts)[0];return!n||!n.start||!n.start.d?null:n.start.d},s6=function(e){class t extends e{constructor(n,a,i,o={}){super(n,a,i),this.viewType="Dates",this.opts=Object.assign({},o)}get(n){let a=[];return this.forEach(i=>{_i(i,this.opts).forEach(o=>{let s=qg(o);s.start&&a.push(s)})}),typeof n=="number"?a[n]:a}json(n={}){return this.map(a=>{let i=a.toView().json(n)[0]||{};if(n&&n.dates!==!1){let o=_i(a,this.opts);o.length>0&&(i.dates=qg(o[0]))}return i},[])}format(n){let i=this.map(o=>{let s=_i(o,this.opts)[0]||{};if(s.start){let u=s.start.d,l=u.format(n);if(s.end){let c=s.end.d;u.isSame(c,"day")===!1&&(l+=" to "+c.format(n))}o.replaceWith(l)}return o});return new t(this.document,i.pointer,null,this.opts)}isBefore(n){let a=Cf(this,n);return this.filter(i=>{let o=_i(i,this.opts)[0]||{};return o.start&&o.start.d&&o.start.d.isBefore(a)})}isAfter(n){let a=Cf(this,n);return this.filter(i=>{let o=_i(i,this.opts)[0]||{};return o.start&&o.start.d&&o.start.d.isAfter(a)})}isSame(n,a){let i=Cf(this,a);return this.filter(o=>{let s=_i(o,this.opts)[0]||{};return s.start&&s.start.d&&s.start.d.isSame(i,n)})}}e.prototype.dates=function(r){let n=tB(this);return new t(this.document,n.pointer,null,r)}},u6=function(e){e=e.clone();let t=e.match("#Time+").match("[<hour>#Cardinal] [<min>(thirty|fifteen)]");if(t.found){let r=t.groups("hour"),n=t.groups("min"),a=r.values().get()[0];if(a>0&&a<=12){let i=n.values().get()[0],o=`${a}:${i}`;t.replaceWith(o)}}if(!e.numbers)console.warn(`Warning: compromise .numbers() not loaded.
24
+ This plugin requires >= v14`);else{let r=e.numbers();r.toNumber(),r.toCardinal(!1)}return e.contractions&&e.contractions().expand(),e.adverbs().remove(),e.replace("week end","weekend",!0).tag("Date"),e.replace("up to","upto",!0).tag("Date"),e.has("once (a|an) #Duration")===!1&&e.match("[(a|an)] #Duration",0).replaceWith("1").compute("lexicon"),e.match("@hasDash").insertAfter("to").tag("Date"),e},l6=function(e){return e.match("#Time+ (am|pm)?")},Ef=function(e,t={}){e=u6(e);let r=yd(e,t);if(!r.result)return{time:null,"24h":null};let n=gt.now().time(r.result);return{time:r.result,"24h":n.format("time-24"),hour:n.hour(),minute:n.minute()}},Rg=(e,t)=>typeof t=="number"?e.eq(t):e,c6=function(e){class t extends e{constructor(n,a,i,o){super(n,a,i),this.viewType="Times",this.opts=o||{}}format(n){let i=this.map(o=>{let s=Ef(o)||{};if(s.time){let u=gt.now().time(s.time),l=s.time;n==="24h"?l=u.format("time-24"):l=u.format(n),o=o.not("#Preposition"),o.replaceWith(l)}return o});return new t(this.document,i.pointer,null,this.opts)}get(n){return Rg(this,n).map(Ef)}json(n={}){return this.map(a=>{let i=a.toView().json(n)[0]||{};return n&&n.time!==!1&&(i.time=Ef(a)),i},[])}}e.prototype.times=function(r){let n=l6(this);return n=Rg(n,r),new t(this.document,n.pointer)}},Lg={century:!0,day:!0,decade:!0,hour:!0,millisecond:!0,minute:!0,month:!0,second:!0,weekend:!0,week:!0,year:!0,quarter:!0,season:!0};let Gi={m:"minute",h:"hour",hr:"hour",min:"minute",sec:"second","week end":"weekend",wk:"week",yr:"year",qtr:"quarter"};Object.keys(Gi).forEach(e=>{Gi[e+"s"]=Gi[e]});const Hg=function(e){let t={},r=e.match("#Value+ #Duration");if(r.found)r.forEach(n=>{let a=n.numbers().get()[0],i=n.terms().last().text("reduced");i=i.replace(/ies$/,"y"),i=i.replace(/s$/,""),Gi.hasOwnProperty(i)&&(i=Gi[i]),Lg.hasOwnProperty(i)&&a!==null&&(t[i]=a)});else if(e.match("(#Duration && /[0-9][a-z]+$/)").found){let a=e.text(),i=a.match(/([0-9]+)/),o=a.match(/([a-z]+)/);i&&o&&(i=i[0]||null,o=o[0]||null,Gi.hasOwnProperty(o)&&(o=Gi[o]),Lg.hasOwnProperty(o)&&i!==null&&(t[o]=Number(i)))}return t},f6=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.context={}}json(n={}){return this.map(a=>{let i=a.toView().json(n)[0]||{};return n&&n.duration!==!1&&(i.duration=Hg(a)),i},[])}get(n){let a=[];return this.forEach(i=>{let o=Hg(i);a.push(o)}),typeof n=="number"?a[n]:a}}e.prototype.durations=function(r){let n=this.match("#Value+ #Duration (and? #Value+ #Duration)?");return n=n.notIf("#DateShift"),typeof r=="number"&&(n=n.eq(r)),new t(this.document,n.pointer)}},m6=function(e){s6(e),c6(e),f6(e)},Gg="(start|end|middle|starting|ending|midpoint|beginning)",Da=(e,t)=>{e.found===!0&&e.forEach(r=>{let n=r.text("reduced"),a=parseInt(n,10);a&&a>1e3&&a<3e3&&r.tag("Year",t)})},Xu=(e,t)=>{e.found===!0&&e.forEach(r=>{let n=r.text("reduced"),a=parseInt(n,10);a&&a>1900&&a<2030&&r.tag("Year",t)})},d6=function(e){e.match("(march|april|may) (and|to|or|through|until)? (march|april|may)").tag("Date").match("(march|april|may)").tag("Month","march|april|may");let t=e.if("#Cardinal");if(t.found===!0){let n=t.match("#Date #Value [#Cardinal]",0);Da(n,"date-value-year"),n=t.match("#Date [#Cardinal]",0),Xu(n,"date-year"),n=t.match(`${Gg} of [#Cardinal]`),Xu(n,"section-year"),n=t.match("#Month #Value [#Cardinal]",0),Da(n,"month-value-year"),n=t.match("#Month #Value to #Value [#Cardinal]",0),Da(n,"month-range-year"),n=t.match("(in|of|by|during|before|starting|ending|for|year|since) [#Cardinal]",0),Da(n,"in-year-1"),n=t.match("(q1|q2|q3|q4) [#Cardinal]",0),Da(n,"in-year-2"),n=t.match("#Ordinal quarter of? [#Cardinal]",0),Da(n,"in-year-3"),n=t.match("the year [#Cardinal]",0),Da(n,"in-year-4"),n=t.match("it (is|was) [#Cardinal]",0),Xu(n,"in-year-5"),t.match(`${Gg} of #Year`).tag("Date");let a=t.match("between [#Cardinal] and [#Cardinal]");Da(a.groups("0"),"between-year-and-year-1"),Da(a.groups("1"),"between-year-and-year-2")}let r=e.match("^/^20[012][0-9]$/$");return Xu(r,"2020-ish"),e},Dn=function(e,t){e.found&&(e.tag("Date",t),e.numbers().lessThan(31).ifNo("#Year").tag("#Time",t))},h6=function(e){let t=e.if("#Date");if(t.found){let r=t.if("#NumberRange");if(r.found){let a=r.match("[#NumberRange+] (on|by|at)? #WeekDay",0);Dn(a,"3-4-tuesday"),a=r.match("[#NumberRange+] (on|by|at)? #Month #Value",0),Dn(a,"3-4 mar 3"),a=r.match("[#NumberRange] to (#NumberRange && #Time)",0),Dn(a,"3-4pm"),a=r.match("(#NumberRange && #Time) to [#NumberRange]",0),Dn(a,"3pm-4")}let n=t.match("(from|between) #Cardinal and #Cardinal (in|on)? (#WeekDay|tomorrow|yesterday)");Dn(n,"from 9-5 tues"),n=e.match("#Cardinal to #Cardinal (#WeekDay|tomorrow|yesterday)"),Dn(n,"9-5 tues"),n=t.match("(from|between) [#NumericValue] (to|and) #Time",0).tag("Time","4-to-5pm"),Dn(n,"from 9-5pm"),n=t.match("(#WeekDay|tomorrow|yesterday) (from|between)? (#Cardinal|#Time) (and|to) (#Cardinal|#Time)"),Dn(n,"tues 3-5"),n=t.match("#Month #Value+ (from|between) [<time>(#Cardinal|#Time) (and|to) (#Cardinal|#Time)]").group("time"),Dn(n,"sep 4 from 9-5"),n=t.match("#Time to #Cardinal on? #Date"),Dn(n,"3pm-4 wed"),n=t.match("#Cardinal to #Time on? #Date"),Dn(n,"3-4pm wed"),n=t.match("#Cardinal to #Cardinal on? (#WeekDay|#Month #Value)"),Dn(n,"3-4 wed")}return e},p6=["act","aft","akst","anat","art","azot","azt","bnt","bot","bt","cast","cat","cct","chast","chut","ckt","cvt","cxt","davt","eat","ect","fjt","fkst","fnt","gamt","get","gft","gilt","gyt","hast","hncu","hneg","hnnomx","hnog","hnpm","hnpmx","hntn","hovt","iot","irkt","jst","kgt","kost","lint","magt","mart","mawt","mmt","nct","nft","novt","npt","nrt","nut","nzst","omst","pet","pett","phot","phst","pont","pwt","ret","sakt","samt","sbt","sct","sret","srt","syot","taht","tft","tjt","tkt","tlt","tmt","tot","tvt","ulat","vut","wakt","wat","wet","wft","wit","wst","yekt"].reduce((e,t)=>(e[t]=!0,e),{}),g6=function(e){let t=e.match("#Time [#Acronym]",0);if(t.found){let r=t.text("reduced");p6[r]===!0&&t.tag("Timezone","tz-abbr")}},v6="fix-tagger",y6=function(e){if(e.has("#Date")){let t=e.match("#Date+ by #Date+");t.found&&!t.has("^due")&&t.match("^#Date+").unTag("Date","by-monday");let r=e.match("#Date+");r.has("^between")&&!r.has("and .")&&r.unTag("Date",v6),r.has("(minutes|seconds|weeks|hours|days|months)")&&!r.has("#Value #Duration")&&r.match("(minutes|seconds|weeks|hours|days|months)").unTag("Date","log-hours"),r.has("about #Holiday")&&r.match("about").unTag("#Date","about-thanksgiving"),r.match("#Date+").match("^the").unTag("Date")}return e},Sf="(in|by|before|during|on|until|after|of|within|all)",Vg="(last|next|this|previous|current|upcoming|coming)",Mf="(start|end|middle|starting|ending|midpoint|beginning|mid)",Tf="(spring|summer|winter|fall|autumn)",Ug="(yesterday|today|tomorrow)";let b6=[{match:"in the (night|evening|morning|afternoon|day|daytime)",tag:"Time",reason:"in-the-night"},{match:"(#Value|#Time) (am|pm)",tag:"Time",reason:"value-ampm"},{match:"(tue|thu)",tag:"WeekDay",reason:"misc-weekday"},{match:"#Month #Date+",tag:"Date",reason:"correction-numberRange"},{match:"#Value of #Month",tag:"Date",unTag:"Time",reason:"value-of-month"},{match:"#Cardinal #Month",tag:"Date",reason:"cardinal-month"},{match:"#Month #Value (and|or|to)? #Value+",tag:"Date",reason:"value-to-value"},{match:"#Month the #Value",tag:"Date",reason:"month-the-value"},{match:"[(march|may)] to? #Date",group:0,tag:"Month",reason:"march-to"},{match:"^(march|may)$",tag:"Month",reason:"single-march"},{match:"#Month or #Month",tag:"Date",reason:"month-or-month"},{match:"(#WeekDay|#Month) #Value",ifNo:"#Money",tag:"Date",reason:"date-value"},{match:"#Value (#WeekDay|#Month)",ifNo:"#Money",tag:"Date",reason:"value-date"},{match:"#Value (#WeekDay|#Duration) back",tag:"#Date",reason:"3-back"},{match:"for #Value #Duration",tag:"Date",reason:"for-x-duration"},{match:"#Value #Duration (before|ago|hence|back)",tag:"Date",reason:"val-duration-past"},{match:`${Sf}? #Value #Duration`,tag:"Date",reason:"value-duration"},{match:"in? #Value to #Value #Duration time?",tag:"Date",reason:"6-to-8-years"},{match:"#Value #Duration old",unTag:"Date",reason:"val-years-old"},{match:`${Sf}? ${Vg} ${Tf}`,tag:"Date",reason:"thisNext-season"},{match:`the? ${Mf} of ${Tf}`,tag:"Date",reason:"section-season"},{match:`${Tf} ${Sf}? #Cardinal`,tag:"Date",reason:"season-year"},{match:"#Date the? #Ordinal",tag:"Date",reason:"correction"},{match:`${Vg} #Date`,tag:"Date",reason:"thisNext-date"},{match:"due? (by|before|after|until) #Date",tag:"Date",reason:"by"},{match:"(last|next|this|previous|current|upcoming|coming|the) #Date",tag:"Date",reason:"next-feb"},{match:`#Preposition? the? ${Mf} of #Date`,tag:"Date",reason:"section-of"},{match:"#Ordinal #Duration in #Date",tag:"Date",reason:"duration-in"},{match:"(early|late) (at|in)? the? #Date",tag:"Time",reason:"early-evening"},{match:"#Date [(by|before|after|at|@|about) #Cardinal]",group:0,tag:"Time",reason:"date-before-Cardinal"},{match:"#Date (#Preposition|to) #Date",ifNo:"#Duration",tag:"Date",reason:"date-prep-date"},{match:"(by|before|after|at|@|about) #Time",tag:"Time",reason:"preposition-time"},{match:"(in|after) /^[0-9]+(min|sec|wk)s?/",tag:"Date",reason:"shift-units"},{match:"#Date [(now|night|sometime)]",group:0,tag:"Time",reason:"date-now"},{match:"(from|starting|until|by) now",tag:"Date",reason:"for-now"},{match:"(each|every) night",tag:"Date",reason:"for-now"},{match:"#Date [(am|pm)]",group:0,tag:"Time",reason:"date-am"},{match:`[${Mf}] #Date`,group:0,tag:"Date",reason:"mid-sept"},{match:"#Month #Value to #Value of? #Year?",tag:"Date",reason:"june 5 to 7th"},{match:"#Value to #Value of? #Month #Year?",tag:"Date",reason:"5 to 7th june"},{match:"#Value #Duration of #Date",tag:"Date",reason:"third week of may"},{match:"#Value+ #Duration (after|before|into|later|afterwards|ago)?",tag:"Date",reason:"two days after"},{match:"#Value #Date",tag:"Date",reason:"two days"},{match:"#Date #Value",tag:"Date",reason:"june 5th"},{match:"#Date #Preposition #Value",tag:"Date",reason:"tuesday at 5"},{match:"#Date (after|before|during|on|in) #Value",tag:"Date",reason:"tomorrow before 3"},{match:"#Value (year|month|week|day) and a half",tag:"Date",reason:"a year and a half"},{match:"#Value and a half (years|months|weeks|days)",tag:"Date",reason:"5 and a half years"},{match:"on the #Ordinal",tag:"Date",reason:"on the fifth"},{match:"#Month #Value+ (and|or) #Value",tag:"Date",reason:"date-or-date"},{match:"#Value+ (and|or) #Value of #Month ",tag:"Date",reason:"date-and-date"},{match:"(spring|summer|winter|fall|autumn|springtime|wintertime|summertime)",tag:"Season",reason:"date-tag1"},{match:"(q1|q2|q3|q4)",tag:"FinancialQuarter",reason:"date-tag2"},{match:"(this|next|last|current) quarter",tag:"FinancialQuarter",reason:"date-tag3"},{match:"(this|next|last|current) season",tag:"Season",reason:"date-tag4"},{match:"#Date #Preposition #Date",tag:"Date",reason:"friday to sunday"},{match:"(once|twice) (a|an|each) #Date",tag:"Date",reason:"once a day"},{match:"a #Duration",tag:"Date",reason:"a year"},{match:"(between|from) #Date",tag:"Date",reason:"between x and y"},{match:"(to|until|upto) #Date",tag:"Date",reason:"between x and y2"},{match:"between #Date+ and #Date+",tag:"Date",reason:"between x and y3"},{match:"#Month and #Month #Year",tag:"Date",reason:"x and y4"},{match:"the? #Date after next one?",tag:"Date",reason:"day after next"},{match:"(about|approx|approximately|around) #Date",tag:"Date",reason:"approximately june"},{match:"(by|until|on|in|at|during|over|every|each|due) the? #Date",ifNo:"#PhrasalVerb",tag:"Date",reason:"until june"},{match:"(by|until|after|before|during|on|in|following|since) (next|this|last)? #Date",ifNo:"#PhrasalVerb",tag:"Date",reason:"until last june"},{match:"this? (last|next|past|this|previous|current|upcoming|coming|the) #Date",tag:"Date",reason:"next september"},{match:"(starting|beginning|ending) #Date",tag:"Date",reason:"starting this june"},{match:"the? (start|end|middle|beginning) of (last|next|this|the) #Date",tag:"Date",reason:"start of june"},{match:"(the|this) #Date",tag:"Date",reason:"this coming june"},{match:"#Date up to #Date",tag:"Date",reason:"january up to june"},{match:"#Cardinal oclock",tag:"Time",reason:"2 oclock"},{match:"#Value (in|at) the? (morning|evening|night|nighttime)",tag:"Time",reason:"3 in the morning"},{match:"(5|10|15|20|five|ten|fifteen|quarter|twenty|half) (after|past) #Cardinal",tag:"Time",reason:"ten to seven"},{match:"(at|by|before) (5|10|15|20|five|ten|fifteen|twenty|quarter|half) (after|past|to)",tag:"Time",reason:"at-20-past"},{match:"#Date [at #Cardinal]",group:0,ifNo:"#Year",tag:"Time",reason:" tuesday at 4"},{match:"half an (hour|minute|second)",tag:"Date",reason:"half an hour"},{match:"(in|for|by|near|at) #Timezone",tag:"Date",reason:"in eastern time"},{match:"#Time to #Time",tag:"Date",reason:"3pm to 4pm"},{match:"#Time [(sharp|on the dot)]",group:0,tag:"Time",reason:"4pm sharp"},{match:"(at|around|near|#Date) [#Cardinal (thirty|fifteen) (am|pm)?]",group:0,tag:"Time",reason:"around four thirty"},{match:"#Cardinal (thirty|fifteen) (am|pm)",tag:"Time",reason:"four thirty am"},{match:"[#Cardinal (thirty|fifteen)] #Date",group:0,tag:"Time",reason:"four thirty tomorrow"},{match:"(anytime|sometime) (before|after|near) [#Cardinal]",group:0,tag:"Time",reason:"antime-after-3"},{match:"(#Cardinal|a|an) #Duration (before|after|ago|from|hence|back)",tag:"DateShift",reason:"nine weeks frow now"},{match:"in (around|about|maybe|perhaps)? #Cardinal #Duration",tag:"DateShift",reason:"in two weeks"},{match:"in (a|an) #Duration",tag:"DateShift",reason:"in a week"},{match:"[(a|an) #Duration from] #Date",group:0,tag:"DateShift",reason:"an hour from now"},{match:"(a|an) #Duration ago",tag:"DateShift",reason:"a month ago"},{match:"in half (a|an) #Duration",tag:"DateShift",reason:"in half an hour"},{match:"in a (few|couple) of? #Duration",tag:"DateShift",reason:"in a few weeks"},{match:"[#Duration (after|before)] #Date",group:0,tag:"DateShift",reason:"day after tomorrow"},{match:"#Month #Ordinal and #Ordinal",tag:"Date",reason:"ord-and-ord"},{match:"every other #Duration",tag:"Date",reason:"every-other"},{match:"(every|any|each|a) (day|weekday|week day|weekend|weekend day)",tag:"Date",reason:"any-weekday"},{match:"(every|any|each|a) (#WeekDay)",tag:"Date",reason:"any-wednesday"},{match:"(every|any|each|a) (#Duration)",tag:"Date",reason:"any-week"},{match:"[(wed|sat)] (#Month|#Year|on|between|during|from)",group:0,tag:"WeekDay",reason:"wed"},{match:"^day$",unTag:"Date",reason:"spa-day"},{match:"(in|of|by|for)? (#Possessive && #Date)",unTag:"Date",reason:"tomorrows meeting"},{match:`${Ug} [#Value]$`,unTag:"Date",group:0,reason:"yesterday-7"},{match:`^[#Value] ${Ug}$`,group:0,unTag:"Date",reason:"7 yesterday"},{match:"on #Cardinal$",unTag:"Date",reason:"on 5"},{match:"[this] tomorrow",group:0,unTag:"Date",reason:"this-tomorrow"},{match:"(q1|q2|q3|q4) #Year",tag:"Date",reason:"q2 2016"},{match:"^[#Value] (this|next|last)",group:0,unTag:"Date",reason:"4 next"},{match:"(last|this|next) #Duration [#Value]",group:0,unTag:"Date",reason:"this month 7"},{match:"[!#Month] #Value (last|this|next) #Date",group:0,unTag:"Date",reason:"7 this month"},{match:"(in|over) the #Duration #Date+?",unTag:"Date",reason:"over-the-duration"},{match:"#Ordinal quarter of? #Year",unTag:"Fraction"},{match:"(from|by|before) now",unTag:"Time",tag:"Date"},{match:"#Value of? (this|next|last) #Date",tag:"Date"},{match:"(first|initial|second|latter) half of #Month",tag:"Date"}],Ff=null;const Wg=function(e){let{world:t}=e;Ff=Ff||t.methods.one.buildNet(b6,t),e.sweep(Ff)},w6=function(e){return e.cache(),Wg(e),Wg(e),d6(e),h6(e),g6(e),y6(e),e.uncache(),e.match("#Cardinal #Duration and? #DateShift").tag("DateShift","three days before"),e.match("#DateShift and #Cardinal #Duration").tag("DateShift","three days and two weeks"),e.match("#Time [(sharp|on the dot)]").tag("Time","4pm sharp"),e},x6={dates:w6},D6={FinancialQuarter:{is:"Date",not:["Fraction"]},Season:{is:"Date"},Year:{is:"Date",not:["RomanNumeral"]},Holiday:{is:"Date",also:"Noun"},DateShift:{is:"Date",not:["Timezone","Holiday"]}},Be="America/",pt="Asia/",Kt="Europe/",Nn="Africa/",gr="Australia/",oa="Pacific/",N6={"british summer time":Kt+"London",bst:Kt+"London","british time":Kt+"London","britain time":Kt+"London","irish summer time":Kt+"Dublin","irish time":Kt+"Dublin","central european time":Kt+"Berlin",cet:Kt+"Berlin","central european summer time":Kt+"Berlin",cest:Kt+"Berlin","central europe":Kt+"Berlin","eastern european time":Kt+"Riga",eet:Kt+"Riga","eastern european summer time":Kt+"Riga",eest:Kt+"Riga","eastern europe time":Kt+"Riga","western european time":Kt+"Lisbon","western european summer time":Kt+"Lisbon","turkey standard time":Kt+"Istanbul","turkish time":Kt+"Istanbul",utc:Nn+"Freetown","greenwich standard time":Nn+"Freetown",gmt:Nn+"Freetown","east africa time":Nn+"Nairobi","east african time":Nn+"Nairobi","eastern africa time":Nn+"Nairobi","central africa time":Nn+"Khartoum","central african time":Nn+"Khartoum","south africa standard time":Nn+"Johannesburg","west africa standard time":Nn+"Lagos","western africa time":Nn+"Lagos","west african time":Nn+"Lagos","australian central standard time":gr+"Adelaide",acst:gr+"Adelaide","australian central daylight time":gr+"Adelaide",acdt:gr+"Adelaide","australian eastern standard time":gr+"Brisbane",aest:gr+"Brisbane","australian eastern daylight time":gr+"Brisbane",aedt:gr+"Brisbane","australian western standard time":gr+"Perth",awst:gr+"Perth","australian western daylight time":gr+"Perth",awdt:gr+"Perth","australian central western standard time":gr+"Eucla",acwst:gr+"Eucla","lord howe standard time":gr+"Lord_Howe",lhst:gr+"Lord_Howe","lord howe daylight time":gr+"Lord_Howe",lhdt:gr+"Lord_Howe","russian standard time":Kt+"Moscow",msk:Kt+"Moscow","central standard time":Be+"Chicago","central time":Be+"Chicago",cst:Be+"Havana","central daylight time":Be+"Chicago",cdt:Be+"Havana","mountain standard time":Be+"Denver","mountain time":Be+"Denver",mst:Be+"Denver","mountain daylight time":Be+"Denver",mdt:Be+"Denver","atlantic standard time":Be+"Halifax","atlantic time":Be+"Halifax",ast:pt+"Baghdad","atlantic daylight time":Be+"Halifax",adt:Be+"Halifax","eastern standard time":Be+"New_York","eastern time":Be+"New_York",est:Be+"New_York","eastern daylight time":Be+"New_York",edt:Be+"New_York","pacific time":Be+"Los_Angeles","pacific standard time":Be+"Los_Angeles",pst:Be+"Los_Angeles","pacific daylight time":Be+"Los_Angeles",pdt:Be+"Los_Angeles","alaskan standard time":Be+"Anchorage","alaskan time":Be+"Anchorage",ahst:Be+"Anchorage","alaskan daylight time":Be+"Anchorage",ahdt:Be+"Anchorage","hawaiian standard time":oa+"Honolulu","hawaiian time":oa+"Honolulu",hst:oa+"Honolulu","aleutian time":oa+"Honolulu","hawaii time":oa+"Honolulu","newfoundland standard time":Be+"St_Johns","newfoundland time":Be+"St_Johns","newfoundland daylight time":Be+"St_Johns","brazil time":Be+"Sao_Paulo","brazilian time":Be+"Sao_Paulo","argentina time":Be+"Buenos_Aires","argentinian time":Be+"Buenos_Aires","amazon time":Be+"Manaus","amazonian time":Be+"Manaus","easter island standard time":"Chile/Easterisland","easter island summer time":"Chile/Easterisland",easst:"Chile/Easterisland","venezuelan standard time":Be+"Caracas","venezuelan time":Be+"Caracas","venezuela time":Be+"Caracas","paraguay time":Be+"Asuncion","paraguay summer time":Be+"Asuncion","cuba standard time":Be+"Havana","cuba time":Be+"Havana","cuba daylight time":Be+"Havana","cuban time":Be+"Havana","bolivia time":Be+"La_Paz","bolivian time":Be+"La_Paz","colombia time":Be+"Bogota","colombian time":Be+"Bogota","acre time":Be+"Eirunepe","peru time":Be+"Lima","chile standard time":Be+"Punta_Arenas","chile time":Be+"Punta_Arenas",clst:Be+"Punta_Arenas","chile summer time":Be+"Punta_Arenas",cldt:Be+"Punta_Arenas","uruguay time":Be+"Montevideo",uyt:Be+"Montevideo","arabic standard time":pt+"Baghdad","iran standard time":pt+"Tehran","iran time":pt+"Tehran","iran daylight time":pt+"Tehran","pakistan standard time":pt+"Karachi","pakistan time":pt+"Karachi","india standard time":pt+"Kolkata","indian time":pt+"Kolkata","indochina time":pt+"Bangkok","china standard time":pt+"Shanghai","alma-ata time":pt+"Almaty","oral time":pt+"Oral","orat time":pt+"Oral","yakutsk time":pt+"Yakutsk",yakt:pt+"Yakutsk","gulf standard time":pt+"Dubai","gulf time":pt+"Dubai","hong kong time":pt+"Hong_Kong","western indonesian time":pt+"Jakarta","indonesia time":pt+"Jakarta","central indonesian time":pt+"Makassar","israel daylight time":pt+"Jerusalem","israel standard time":pt+"Jerusalem","israel time":pt+"Jerusalem","krasnoyarsk time":pt+"Krasnoyarsk","malaysia time":pt+"Kuala_Lumpur","singapore time":pt+"Singapore","korea standard time":pt+"Seoul","korea time":pt+"Seoul",kst:pt+"Seoul","korean time":pt+"Seoul","uzbekistan time":pt+"Samarkand","vladivostok time":pt+"Vladivostok","maldives time":"Indian/Maldives","mauritius time":"Indian/Mauritius","marshall islands time":oa+"Kwajalein","samoa standard time":oa+"Midway","somoan time":oa+"Midway","chamorro standard time":oa+"Guam","papua new guinea time":oa+"Bougainville"};let A6=gt().timezones,C6=Object.keys(A6).reduce((e,t)=>(e[t]=t,e),{});const E6=Object.assign({},N6,C6),S6=["weekday","summer","winter","autumn","all day","eod","eom","eoy","standard time","daylight time","tommorrow"],M6=["centuries","century","day","days","decade","decades","hour","hours","hr","hrs","millisecond","milliseconds","minute","minutes","min","mins","month","months","seconds","sec","secs","week end","week ends","weekend","weekends","week","weeks","wk","wks","year","years","yr","yrs","quarter","qtr","qtrs","season","seasons"],T6=["all hallows eve","all saints day","all sts day","april fools","armistice day","australia day","bastille day","boxing day","canada day","christmas eve","christmas","cinco de mayo","day of the dead","dia de muertos","dieciseis de septiembre","emancipation day","grito de dolores","groundhog day","halloween","harvey milk day","inauguration day","independence day","independents day","juneteenth","labour day","national freedom day","national nurses day","new years eve","new years","purple heart day","rememberance day","rosa parks day","saint andrews day","saint patricks day","saint stephens day","saint valentines day","st andrews day","st patricks day","st stephens day","st valentines day ","valentines day","valentines","veterans day","victoria day","womens equality day","xmas","epiphany","orthodox christmas day","orthodox new year","assumption of mary","all souls day","feast of the immaculate conception","feast of our lady of guadalupe","kwanzaa","imbolc","beltaine","lughnassadh","samhain","martin luther king day","mlk day","presidents day","mardi gras","tax day","commonwealth day","mothers day","memorial day","fathers day","columbus day","indigenous peoples day","canadian thanksgiving","election day","thanksgiving","t-day","turkey day","black friday","cyber monday","ash wednesday","palm sunday","maundy thursday","good friday","holy saturday","easter","easter sunday","easter monday","orthodox good friday","orthodox holy saturday","orthodox easter","orthodox easter monday","ascension day","pentecost","whitsunday","whit sunday","whit monday","trinity sunday","corpus christi","advent","tu bishvat","tu bshevat","purim","passover","yom hashoah","lag baomer","shavuot","tisha bav","rosh hashana","yom kippur","sukkot","shmini atzeret","simchat torah","chanukah","hanukkah","isra and miraj","lailat al-qadr","eid al-fitr","id al-Fitr","eid ul-Fitr","ramadan","eid al-adha","muharram","the prophets birthday","ostara","march equinox","vernal equinox","litha","june solistice","summer solistice","mabon","september equinox","fall equinox","autumnal equinox","yule","december solstice","winter solstice","chinese new year","diwali"],F6=["noon","midnight","morning","tonight","evening","afternoon","breakfast time","lunchtime","dinnertime","midday","eod","oclock","oclock","at night"];let Yw={"a couple":"Value",thur:"WeekDay",thurs:"WeekDay"};const tu=function(e,t){e.forEach(r=>{Yw[r]=t})};tu(Object.keys(E6),"Timezone");tu(S6,"Date");tu(M6,"Duration");tu(T6,"Holiday");tu(F6,"Time");const P6=[[/^[0-9]+(min|sec|hr|d)s?$/i,"Duration","30min"],[/^[0-9]{4}-[0-9]{2}$/,"Date","2012-06"],[/^[0-9]{2}h[0-9]{2}$/i,"Time","13h30"],[/^@[0-9]+:[0-9]{2}$/,"Time","@5:30"],[/^@[1-9]+(am|pm)$/,"Time","@5pm"],[/^(?:0[1-9]|[12]\d|3[01])\/(?:0[1-9]|[12]\d|3[01])$/,"Date","03/02"]],k6="3.7.1",Jg=e=>e?gt(e).format("{nice-day} {year}"):"-",Ns="\x1B[0m",Pf={magenta:e=>"\x1B[35m"+e+Ns,cyan:e=>"\x1B[36m"+e+Ns,yellow:e=>"\x1B[33m"+e+Ns,dim:e=>"\x1B[2m"+e+Ns,i:e=>"\x1B[3m"+e+Ns},O6=function(e){e.dates().forEach(t=>{let r=t.dates().get()[0];console.log(`
25
+ ────────`),t.debug("highlight");let n="";r&&r.start&&(n=" "+Pf.magenta(Jg(r.start))),r&&r.end&&(n+=Pf.dim(" → ")+Pf.cyan(Jg(r.end))),console.log(n+`
26
+ `)})},B6={tags:D6,words:Yw,compute:x6,api:m6,mutate:e=>{e.model.two.regexText=e.model.two.regexText||[],e.model.two.regexText=e.model.two.regexText.concat(P6),e.methods.one.debug=e.methods.one.debug||{},e.methods.one.debug.dates=O6},hooks:["dates"],version:k6};function er(){return er=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},er.apply(null,arguments)}var Zw={relTol:1e-12,absTol:1e-15,matrix:"Matrix",number:"number",numberFallback:"number",precision:64,predictable:!1,randomSeed:null,legacySubset:!1};function Ur(e,t){if(Ll(e,t))return e[t];throw typeof e[t]=="function"&&wd(e,t)?new Error('Cannot access method "'+t+'" as a property'):new Error('No access to property "'+t+'"')}function Vo(e,t,r){if(Ll(e,t))return e[t]=r,r;throw new Error('No access to property "'+t+'"')}function Ll(e,t){return!_6(e)&&!Array.isArray(e)?!1:Fe(I6,t)?!0:!(t in Object.prototype||t in Function.prototype)}function $6(e,t){if(!wd(e,t))throw new Error('No access to method "'+t+'"');return e[t]}function wd(e,t){return e==null||typeof e[t]!="function"||Fe(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e)?!1:Fe(z6,t)?!0:!(t in Object.prototype||t in Function.prototype)}function _6(e){return typeof e=="object"&&e&&e.constructor===Object}var I6={length:!0,name:!0},z6={toString:!0,valueOf:!0,toLocaleString:!0};class bc{constructor(t){this.wrappedObject=t,this[Symbol.iterator]=this.entries}keys(){return Object.keys(this.wrappedObject).filter(t=>this.has(t)).values()}get(t){return Ur(this.wrappedObject,t)}set(t,r){return Vo(this.wrappedObject,t,r),this}has(t){return Ll(this.wrappedObject,t)&&t in this.wrappedObject}entries(){return Xw(this.keys(),t=>[t,this.get(t)])}forEach(t){for(var r of this.keys())t(this.get(r),r,this)}delete(t){Ll(this.wrappedObject,t)&&delete this.wrappedObject[t]}clear(){for(var t of this.keys())this.delete(t)}get size(){return Object.keys(this.wrappedObject).length}}class Qw{constructor(t,r,n){this.a=t,this.b=r,this.bKeys=n,this[Symbol.iterator]=this.entries}get(t){return this.bKeys.has(t)?this.b.get(t):this.a.get(t)}set(t,r){return this.bKeys.has(t)?this.b.set(t,r):this.a.set(t,r),this}has(t){return this.b.has(t)||this.a.has(t)}keys(){return new Set([...this.a.keys(),...this.b.keys()])[Symbol.iterator]()}entries(){return Xw(this.keys(),t=>[t,this.get(t)])}forEach(t){for(var r of this.keys())t(this.get(r),r,this)}delete(t){return this.bKeys.has(t)?this.b.delete(t):this.a.delete(t)}clear(){this.a.clear(),this.b.clear()}get size(){return[...this.keys()].length}}function Xw(e,t){return{next:()=>{var r=e.next();return r.done?r:{value:t(r.value),done:!1}}}}function Hs(){return new Map}function qo(e){if(!e)return Hs();if(rx(e))return e;if(xc(e))return new bc(e);throw new Error("createMap can create maps from objects or Maps")}function j6(e){if(e instanceof bc)return e.wrappedObject;var t={};for(var r of e.keys()){var n=e.get(r);Vo(t,r,n)}return t}function ze(e){return typeof e=="number"}function Ze(e){return!e||typeof e!="object"||typeof e.constructor!="function"?!1:e.isBigNumber===!0&&typeof e.constructor.prototype=="object"&&e.constructor.prototype.isBigNumber===!0||typeof e.constructor.isDecimal=="function"&&e.constructor.isDecimal(e)===!0}function Os(e){return typeof e=="bigint"}function $a(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function ru(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function dn(e){return e&&e.constructor.prototype.isUnit===!0||!1}function Yt(e){return typeof e=="string"}var Mt=Array.isArray;function Re(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function gn(e){return Array.isArray(e)||Re(e)}function Hl(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function Vi(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function xd(e){return e&&e.constructor.prototype.isRange===!0||!1}function wc(e){return e&&e.constructor.prototype.isIndex===!0||!1}function q6(e){return typeof e=="boolean"}function R6(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function ex(e){return e&&e.constructor.prototype.isHelp===!0||!1}function tx(e){return typeof e=="function"}function L6(e){return e instanceof Date}function H6(e){return e instanceof RegExp}function xc(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!$a(e)&&!ru(e))}function rx(e){return e?e instanceof Map||e instanceof bc||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}function G6(e){return e===null}function V6(e){return e===void 0}function qa(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Tn(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function U6(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function W6(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function J6(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function ct(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function Om(e){return ct(e)||Xt(e)&&e.args.length===1&&ct(e.args[0])&&"-+~".includes(e.op)}function nu(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function mi(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function ts(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ct(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function Dc(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function Xt(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ra(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function K6(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function Y6(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function xr(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function nx(e){return e&&e.constructor.prototype.isChain===!0||!1}function Ft(e){var t=typeof e;return t==="object"?e===null?"null":Ze(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function Ve(e){var t=typeof e;if(t==="number"||t==="bigint"||t==="string"||t==="boolean"||e===null||e===void 0)return e;if(typeof e.clone=="function")return e.clone();if(Array.isArray(e))return e.map(function(r){return Ve(r)});if(e instanceof Date)return new Date(e.valueOf());if(Ze(e))return e;if(xc(e))return Z6(e,Ve);if(t==="function")return e;throw new TypeError("Cannot clone: unknown type of value (value: ".concat(e,")"))}function Z6(e,t){var r={};for(var n in e)Fe(e,n)&&(r[n]=t(e[n]));return r}function ax(e,t){for(var r in t)Fe(t,r)&&(e[r]=t[r]);return e}function La(e,t){var r,n,a;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(n=0,a=e.length;n<a;n++)if(!La(e[n],t[n]))return!1;return!0}else{if(typeof e=="function")return e===t;if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(r in e)if(!(r in t)||!La(e[r],t[r]))return!1;for(r in t)if(!(r in e))return!1;return!0}else return e===t}}function Q6(e,t,r){var n=!0,a;Object.defineProperty(e,t,{get:function(){return n&&(a=r(),n=!1),a},set:function(o){a=o,n=!1},configurable:!0,enumerable:!0})}function Fe(e,t){return e&&Object.hasOwnProperty.call(e,t)}function X6(e,t){for(var r={},n=0;n<t.length;n++){var a=t[n],i=e[a];i!==void 0&&(r[a]=i)}return r}var e9=["Matrix","Array"],t9=["number","BigNumber","bigint","Fraction"],ce=function(t){if(t)throw new Error(`The global config is readonly.
27
+ Please create a mathjs instance if you want to change the default configuration.
28
+ Example:
29
+
30
+ import { create, all } from 'mathjs';
31
+ const mathjs = create(all);
32
+ mathjs.config({ number: 'BigNumber' });
33
+ `);return Object.freeze(Zw)};er(ce,Zw,{MATRIX_OPTIONS:e9,NUMBER_OPTIONS:t9});function Kg(){return!0}function An(){return!1}function Ao(){}const Yg="Argument is not a typed-function.";function ix(){function e(O){return typeof O=="object"&&O!==null&&O.constructor===Object}const t=[{name:"number",test:function(O){return typeof O=="number"}},{name:"string",test:function(O){return typeof O=="string"}},{name:"boolean",test:function(O){return typeof O=="boolean"}},{name:"Function",test:function(O){return typeof O=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(O){return O instanceof Date}},{name:"RegExp",test:function(O){return O instanceof RegExp}},{name:"Object",test:e},{name:"null",test:function(O){return O===null}},{name:"undefined",test:function(O){return O===void 0}}],r={name:"any",test:Kg,isAny:!0};let n,a,i=0,o={createCount:0};function s(O){const q=n.get(O);if(q)return q;let U='Unknown type "'+O+'"';const ee=O.toLowerCase();let re;for(re of a)if(re.toLowerCase()===ee){U+='. Did you mean "'+re+'" ?';break}throw new TypeError(U)}function u(O){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any";const U=q?s(q).index:a.length,ee=[];for(let ae=0;ae<O.length;++ae){if(!O[ae]||typeof O[ae].name!="string"||typeof O[ae].test!="function")throw new TypeError("Object with properties {name: string, test: function} expected");const ye=O[ae].name;if(n.has(ye))throw new TypeError('Duplicate type name "'+ye+'"');ee.push(ye),n.set(ye,{name:ye,test:O[ae].test,isAny:O[ae].isAny,index:U+ae,conversionsTo:[]})}const re=a.slice(U);a=a.slice(0,U).concat(ee).concat(re);for(let ae=U+ee.length;ae<a.length;++ae)n.get(a[ae]).index=ae}function l(){n=new Map,a=[],i=0,u([r],!1)}l(),u(t);function c(){let O;for(O of a)n.get(O).conversionsTo=[];i=0}function f(O){const q=a.filter(U=>{const ee=n.get(U);return!ee.isAny&&ee.test(O)});return q.length?q:["any"]}function m(O){return O&&typeof O=="function"&&"_typedFunctionData"in O}function d(O,q,U){if(!m(O))throw new TypeError(Yg);const ee=U&&U.exact,re=Array.isArray(q)?q.join(","):q,ae=x(re),ye=y(ae);if(!ee||ye in O.signatures){const ut=O._typedFunctionData.signatureMap.get(ye);if(ut)return ut}const me=ae.length;let Ne;if(ee){Ne=[];let ut;for(ut in O.signatures)Ne.push(O._typedFunctionData.signatureMap.get(ut))}else Ne=O._typedFunctionData.signatures;for(let ut=0;ut<me;++ut){const ht=ae[ut],yt=[];let rt;for(rt of Ne){const Lt=N(rt.params,ut);if(!(!Lt||ht.restParam&&!Lt.restParam)){if(!Lt.hasAny){const T=v(Lt);if(ht.types.some(J=>!T.has(J.name)))continue}yt.push(rt)}}if(Ne=yt,Ne.length===0)break}let he;for(he of Ne)if(he.params.length<=me)return he;throw new TypeError("Signature not found (signature: "+(O.name||"unnamed")+"("+y(ae,", ")+"))")}function h(O,q,U){return d(O,q,U).implementation}function p(O,q){const U=s(q);if(U.test(O))return O;const ee=U.conversionsTo;if(ee.length===0)throw new Error("There are no conversions to "+q+" defined.");for(let re=0;re<ee.length;re++)if(s(ee[re].from).test(O))return ee[re].convert(O);throw new Error("Cannot convert "+O+" to "+q)}function y(O){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:",";return O.map(U=>U.name).join(q)}function w(O){const q=O.indexOf("...")===0,ee=(q?O.length>3?O.slice(3):"any":O).split("|").map(me=>s(me.trim()));let re=!1,ae=q?"...":"";return{types:ee.map(function(me){return re=me.isAny||re,ae+=me.name+"|",{name:me.name,typeIndex:me.index,test:me.test,isAny:me.isAny,conversion:null,conversionIndex:-1}}),name:ae.slice(0,-1),hasAny:re,hasConversion:!1,restParam:q}}function D(O){const q=O.types.map(ye=>ye.name),U=$(q);let ee=O.hasAny,re=O.name;const ae=U.map(function(ye){const me=s(ye.from);return ee=me.isAny||ee,re+="|"+ye.from,{name:ye.from,typeIndex:me.index,test:me.test,isAny:me.isAny,conversion:ye,conversionIndex:ye.index}});return{types:O.types.concat(ae),name:re,hasAny:ee,hasConversion:ae.length>0,restParam:O.restParam}}function v(O){return O.typeSet||(O.typeSet=new Set,O.types.forEach(q=>O.typeSet.add(q.name))),O.typeSet}function x(O){const q=[];if(typeof O!="string")throw new TypeError("Signatures must be strings");const U=O.trim();if(U==="")return q;const ee=U.split(",");for(let re=0;re<ee.length;++re){const ae=w(ee[re].trim());if(ae.restParam&&re!==ee.length-1)throw new SyntaxError('Unexpected rest parameter "'+ee[re]+'": only allowed for the last parameter');if(ae.types.length===0)return null;q.push(ae)}return q}function g(O){const q=_(O);return q?q.restParam:!1}function b(O){if(!O||O.types.length===0)return Kg;if(O.types.length===1)return s(O.types[0].name).test;if(O.types.length===2){const q=s(O.types[0].name).test,U=s(O.types[1].name).test;return function(re){return q(re)||U(re)}}else{const q=O.types.map(function(U){return s(U.name).test});return function(ee){for(let re=0;re<q.length;re++)if(q[re](ee))return!0;return!1}}}function C(O){let q,U,ee;if(g(O)){q=V(O).map(b);const re=q.length,ae=b(_(O)),ye=function(me){for(let Ne=re;Ne<me.length;Ne++)if(!ae(me[Ne]))return!1;return!0};return function(Ne){for(let he=0;he<q.length;he++)if(!q[he](Ne[he]))return!1;return ye(Ne)&&Ne.length>=re+1}}else return O.length===0?function(ae){return ae.length===0}:O.length===1?(U=b(O[0]),function(ae){return U(ae[0])&&ae.length===1}):O.length===2?(U=b(O[0]),ee=b(O[1]),function(ae){return U(ae[0])&&ee(ae[1])&&ae.length===2}):(q=O.map(b),function(ae){for(let ye=0;ye<q.length;ye++)if(!q[ye](ae[ye]))return!1;return ae.length===q.length})}function N(O,q){return q<O.length?O[q]:g(O)?_(O):null}function A(O,q){const U=N(O,q);return U?v(U):new Set}function E(O){return O.conversion===null||O.conversion===void 0}function S(O,q){const U=new Set;return O.forEach(ee=>{const re=A(ee.params,q);let ae;for(ae of re)U.add(ae)}),U.has("any")?["any"]:Array.from(U)}function F(O,q,U){let ee,re;const ae=O||"unnamed";let ye=U,me;for(me=0;me<q.length;me++){const ht=[];if(ye.forEach(yt=>{const rt=N(yt.params,me),Lt=b(rt);(me<yt.params.length||g(yt.params))&&Lt(q[me])&&ht.push(yt)}),ht.length===0){if(re=S(ye,me),re.length>0){const yt=f(q[me]);return ee=new TypeError("Unexpected type of argument in function "+ae+" (expected: "+re.join(" or ")+", actual: "+yt.join(" | ")+", index: "+me+")"),ee.data={category:"wrongType",fn:ae,index:me,actual:yt,expected:re},ee}}else ye=ht}const Ne=ye.map(function(ht){return g(ht.params)?1/0:ht.params.length});if(q.length<Math.min.apply(null,Ne))return re=S(ye,me),ee=new TypeError("Too few arguments in function "+ae+" (expected: "+re.join(" or ")+", index: "+q.length+")"),ee.data={category:"tooFewArgs",fn:ae,index:q.length,expected:re},ee;const he=Math.max.apply(null,Ne);if(q.length>he)return ee=new TypeError("Too many arguments in function "+ae+" (expected: "+he+", actual: "+q.length+")"),ee.data={category:"tooManyArgs",fn:ae,index:q.length,expectedLength:he},ee;const ut=[];for(let ht=0;ht<q.length;++ht)ut.push(f(q[ht]).join("|"));return ee=new TypeError('Arguments of type "'+ut.join(", ")+'" do not match any of the defined signatures of function '+ae+"."),ee.data={category:"mismatch",actual:ut},ee}function k(O){let q=a.length+1;for(let U=0;U<O.types.length;U++)E(O.types[U])&&(q=Math.min(q,O.types[U].typeIndex));return q}function B(O){let q=i+1;for(let U=0;U<O.types.length;U++)E(O.types[U])||(q=Math.min(q,O.types[U].conversionIndex));return q}function L(O,q){if(O.hasAny){if(!q.hasAny)return 1}else if(q.hasAny)return-1;if(O.restParam){if(!q.restParam)return 1}else if(q.restParam)return-1;if(O.hasConversion){if(!q.hasConversion)return 1}else if(q.hasConversion)return-1;const U=k(O)-k(q);if(U<0)return-1;if(U>0)return 1;const ee=B(O)-B(q);return ee<0?-1:ee>0?1:0}function M(O,q){const U=O.params,ee=q.params,re=_(U),ae=_(ee),ye=g(U),me=g(ee);if(ye&&re.hasAny){if(!me||!ae.hasAny)return 1}else if(me&&ae.hasAny)return-1;let Ne=0,he=0,ut;for(ut of U)ut.hasAny&&++Ne,ut.hasConversion&&++he;let ht=0,yt=0;for(ut of ee)ut.hasAny&&++ht,ut.hasConversion&&++yt;if(Ne!==ht)return Ne-ht;if(ye&&re.hasConversion){if(!me||!ae.hasConversion)return 1}else if(me&&ae.hasConversion)return-1;if(he!==yt)return he-yt;if(ye){if(!me)return 1}else if(me)return-1;const rt=(U.length-ee.length)*(ye?-1:1);if(rt!==0)return rt;const Lt=[];let T=0;for(let le=0;le<U.length;++le){const ve=L(U[le],ee[le]);Lt.push(ve),T+=ve}if(T!==0)return T;let J;for(J of Lt)if(J!==0)return J;return 0}function $(O){if(O.length===0)return[];const q=O.map(s);O.length>1&&q.sort((re,ae)=>re.index-ae.index);let U=q[0].conversionsTo;if(O.length===1)return U;U=U.concat([]);const ee=new Set(O);for(let re=1;re<q.length;++re){let ae;for(ae of q[re].conversionsTo)ee.has(ae.from)||(U.push(ae),ee.add(ae.from))}return U}function H(O,q){let U=q;if(O.some(re=>re.hasConversion)){const re=g(O),ae=O.map(j);U=function(){const me=[],Ne=re?arguments.length-1:arguments.length;for(let he=0;he<Ne;he++)me[he]=ae[he](arguments[he]);return re&&(me[Ne]=arguments[Ne].map(ae[Ne])),q.apply(this,me)}}let ee=U;if(g(O)){const re=O.length-1;ee=function(){return U.apply(this,W(arguments,0,re).concat([W(arguments,re)]))}}return ee}function j(O){let q,U,ee,re;const ae=[],ye=[];switch(O.types.forEach(function(me){me.conversion&&(ae.push(s(me.conversion.from).test),ye.push(me.conversion.convert))}),ye.length){case 0:return function(Ne){return Ne};case 1:return q=ae[0],ee=ye[0],function(Ne){return q(Ne)?ee(Ne):Ne};case 2:return q=ae[0],U=ae[1],ee=ye[0],re=ye[1],function(Ne){return q(Ne)?ee(Ne):U(Ne)?re(Ne):Ne};default:return function(Ne){for(let he=0;he<ye.length;he++)if(ae[he](Ne))return ye[he](Ne);return Ne}}}function Y(O){function q(U,ee,re){if(ee<U.length){const ae=U[ee];let ye=[];if(ae.restParam){const me=ae.types.filter(E);me.length<ae.types.length&&ye.push({types:me,name:"..."+me.map(Ne=>Ne.name).join("|"),hasAny:me.some(Ne=>Ne.isAny),hasConversion:!1,restParam:!0}),ye.push(ae)}else ye=ae.types.map(function(me){return{types:[me],name:me.name,hasAny:me.isAny,hasConversion:me.conversion,restParam:!1}});return Q(ye,function(me){return q(U,ee+1,re.concat([me]))})}else return[re]}return q(O,0,[])}function te(O,q){const U=Math.max(O.length,q.length);for(let me=0;me<U;me++){const Ne=A(O,me),he=A(q,me);let ut=!1,ht;for(ht of he)if(Ne.has(ht)){ut=!0;break}if(!ut)return!1}const ee=O.length,re=q.length,ae=g(O),ye=g(q);return ae?ye?ee===re:re>=ee:ye?ee>=re:ee===re}function K(O){return O.map(q=>Pe(q)?be(q.referToSelf.callback):Me(q)?oe(q.referTo.references,q.referTo.callback):q)}function P(O,q,U){const ee=[];let re;for(re of O){let ae=U[re];if(typeof ae!="number")throw new TypeError('No definition for referenced signature "'+re+'"');if(ae=q[ae],typeof ae!="function")return!1;ee.push(ae)}return ee}function X(O,q,U){const ee=K(O),re=new Array(ee.length).fill(!1);let ae=!0;for(;ae;){ae=!1;let ye=!0;for(let me=0;me<ee.length;++me){if(re[me])continue;const Ne=ee[me];if(Pe(Ne))ee[me]=Ne.referToSelf.callback(U),ee[me].referToSelf=Ne.referToSelf,re[me]=!0,ye=!1;else if(Me(Ne)){const he=P(Ne.referTo.references,ee,q);he?(ee[me]=Ne.referTo.callback.apply(this,he),ee[me].referTo=Ne.referTo,re[me]=!0,ye=!1):ae=!0}}if(ye&&ae)throw new SyntaxError("Circular reference detected in resolving typed.referTo")}return ee}function z(O){const q=/\bthis(\(|\.signatures\b)/;Object.keys(O).forEach(U=>{const ee=O[U];if(q.test(ee.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function ie(O,q){if(o.createCount++,Object.keys(q).length===0)throw new SyntaxError("No signatures provided");o.warnAgainstDeprecatedThis&&z(q);const U=[],ee=[],re={},ae=[];let ye;for(ye in q){if(!Object.prototype.hasOwnProperty.call(q,ye))continue;const Et=x(ye);if(!Et)continue;U.forEach(function(hs){if(te(hs,Et))throw new TypeError('Conflicting signatures "'+y(hs)+'" and "'+y(Et)+'".')}),U.push(Et);const en=ee.length;ee.push(q[ye]);const TN=Et.map(D);let gu;for(gu of Y(TN)){const hs=y(gu);ae.push({params:gu,name:hs,fn:en}),gu.every(FN=>!FN.hasConversion)&&(re[hs]=en)}}ae.sort(M);const me=X(ee,re,ds);let Ne;for(Ne in re)Object.prototype.hasOwnProperty.call(re,Ne)&&(re[Ne]=me[re[Ne]]);const he=[],ut=new Map;for(Ne of ae)ut.has(Ne.name)||(Ne.fn=me[Ne.fn],he.push(Ne),ut.set(Ne.name,Ne));const ht=he[0]&&he[0].params.length<=2&&!g(he[0].params),yt=he[1]&&he[1].params.length<=2&&!g(he[1].params),rt=he[2]&&he[2].params.length<=2&&!g(he[2].params),Lt=he[3]&&he[3].params.length<=2&&!g(he[3].params),T=he[4]&&he[4].params.length<=2&&!g(he[4].params),J=he[5]&&he[5].params.length<=2&&!g(he[5].params),le=ht&&yt&&rt&&Lt&&T&&J;for(let Et=0;Et<he.length;++Et)he[Et].test=C(he[Et].params);const ve=ht?b(he[0].params[0]):An,qe=yt?b(he[1].params[0]):An,Ye=rt?b(he[2].params[0]):An,Rr=Lt?b(he[3].params[0]):An,mo=T?b(he[4].params[0]):An,Lc=J?b(he[5].params[0]):An,oN=ht?b(he[0].params[1]):An,sN=yt?b(he[1].params[1]):An,uN=rt?b(he[2].params[1]):An,lN=Lt?b(he[3].params[1]):An,cN=T?b(he[4].params[1]):An,fN=J?b(he[5].params[1]):An;for(let Et=0;Et<he.length;++Et)he[Et].implementation=H(he[Et].params,he[Et].fn);const mN=ht?he[0].implementation:Ao,dN=yt?he[1].implementation:Ao,hN=rt?he[2].implementation:Ao,pN=Lt?he[3].implementation:Ao,gN=T?he[4].implementation:Ao,vN=J?he[5].implementation:Ao,yN=ht?he[0].params.length:-1,bN=yt?he[1].params.length:-1,wN=rt?he[2].params.length:-1,xN=Lt?he[3].params.length:-1,DN=T?he[4].params.length:-1,NN=J?he[5].params.length:-1,AN=le?6:0,CN=he.length,EN=he.map(Et=>Et.test),SN=he.map(Et=>Et.implementation),MN=function(){for(let en=AN;en<CN;en++)if(EN[en](arguments))return SN[en].apply(this,arguments);return o.onMismatch(O,arguments,he)};function ds(Et,en){return arguments.length===yN&&ve(Et)&&oN(en)?mN.apply(this,arguments):arguments.length===bN&&qe(Et)&&sN(en)?dN.apply(this,arguments):arguments.length===wN&&Ye(Et)&&uN(en)?hN.apply(this,arguments):arguments.length===xN&&Rr(Et)&&lN(en)?pN.apply(this,arguments):arguments.length===DN&&mo(Et)&&cN(en)?gN.apply(this,arguments):arguments.length===NN&&Lc(Et)&&fN(en)?vN.apply(this,arguments):MN.apply(this,arguments)}try{Object.defineProperty(ds,"name",{value:O})}catch{}return ds.signatures=re,ds._typedFunctionData={signatures:he,signatureMap:ut},ds}function se(O,q,U){throw F(O,q,U)}function V(O){return W(O,0,O.length-1)}function _(O){return O[O.length-1]}function W(O,q,U){return Array.prototype.slice.call(O,q,U)}function ne(O,q){for(let U=0;U<O.length;U++)if(q(O[U]))return O[U]}function Q(O,q){return Array.prototype.concat.apply([],O.map(q))}function ue(){const O=V(arguments).map(U=>y(x(U))),q=_(arguments);if(typeof q!="function")throw new TypeError("Callback function expected as last argument");return oe(O,q)}function oe(O,q){return{referTo:{references:O,callback:q}}}function be(O){if(typeof O!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:O}}}function Me(O){return O&&typeof O.referTo=="object"&&Array.isArray(O.referTo.references)&&typeof O.referTo.callback=="function"}function Pe(O){return O&&typeof O.referToSelf=="object"&&typeof O.referToSelf.callback=="function"}function Ee(O,q){if(!O)return q;if(q&&q!==O){const U=new Error("Function names do not match (expected: "+O+", actual: "+q+")");throw U.data={actual:q,expected:O},U}return O}function Oe(O){let q;for(const U in O)Object.prototype.hasOwnProperty.call(O,U)&&(m(O[U])||typeof O[U].signature=="string")&&(q=Ee(q,O[U].name));return q}function Ie(O,q){let U;for(U in q)if(Object.prototype.hasOwnProperty.call(q,U)){if(U in O&&q[U]!==O[U]){const ee=new Error('Signature "'+U+'" is defined twice');throw ee.data={signature:U,sourceFunction:q[U],destFunction:O[U]},ee}O[U]=q[U]}}const R=o;o=function(O){const q=typeof O=="string",U=q?1:0;let ee=q?O:"";const re={};for(let ae=U;ae<arguments.length;++ae){const ye=arguments[ae];let me={},Ne;if(typeof ye=="function"?(Ne=ye.name,typeof ye.signature=="string"?me[ye.signature]=ye:m(ye)&&(me=ye.signatures)):e(ye)&&(me=ye,q||(Ne=Oe(ye))),Object.keys(me).length===0){const he=new TypeError("Argument to 'typed' at index "+ae+" is not a (typed) function, nor an object with signatures as keys and functions as values.");throw he.data={index:ae,argument:ye},he}q||(ee=Ee(ee,Ne)),Ie(re,me)}return ie(ee||"",re)},o.create=ix,o.createCount=R.createCount,o.onMismatch=se,o.throwMismatchError=se,o.createError=F,o.clear=l,o.clearConversions=c,o.addTypes=u,o._findType=s,o.referTo=ue,o.referToSelf=be,o.convert=p,o.findSignature=d,o.find=h,o.isTypedFunction=m,o.warnAgainstDeprecatedThis=!0,o.addType=function(O,q){let U="any";q!==!1&&n.has("Object")&&(U="Object"),o.addTypes([O],U)};function Z(O){if(!O||typeof O.from!="string"||typeof O.to!="string"||typeof O.convert!="function")throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");if(O.to===O.from)throw new SyntaxError('Illegal to define conversion from "'+O.from+'" to itself.')}return o.addConversion=function(O){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{override:!1};Z(O);const U=s(O.to),ee=U.conversionsTo.find(re=>re.from===O.from);if(ee)if(q&&q.override)o.removeConversion({from:ee.from,to:O.to,convert:ee.convert});else throw new Error('There is already a conversion from "'+O.from+'" to "'+U.name+'"');U.conversionsTo.push({from:O.from,convert:O.convert,index:i++})},o.addConversions=function(O,q){O.forEach(U=>o.addConversion(U,q))},o.removeConversion=function(O){Z(O);const q=s(O.to),U=ne(q.conversionsTo,re=>re.from===O.from);if(!U)throw new Error("Attempt to remove nonexistent conversion from "+O.from+" to "+O.to);if(U.convert!==O.convert)throw new Error("Conversion to remove does not match existing conversion");const ee=q.conversionsTo.indexOf(U);q.conversionsTo.splice(ee,1)},o.resolve=function(O,q){if(!m(O))throw new TypeError(Yg);const U=O._typedFunctionData.signatures;for(let ee=0;ee<U.length;++ee)if(U[ee].test(q))return U[ee];return null},o}const Gl=ix();function I(e,t,r,n){function a(i){var o=X6(i,t.map(a9));return r9(e,t,i),r(o)}return a.isFactory=!0,a.fn=e,a.dependencies=t.slice().sort(),n&&(a.meta=n),a}function r9(e,t,r){var n=t.filter(i=>!n9(i)).every(i=>r[i]!==void 0);if(!n){var a=t.filter(i=>r[i]===void 0);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(a.map(i=>'"'.concat(i,'"')).join(", "),"."))}}function n9(e){return e&&e[0]==="?"}function a9(e){return e&&e[0]==="?"?e.slice(1):e}function ke(e){return typeof e=="boolean"?!0:Number.isFinite(e)?e===Math.round(e):!1}function vi(e,t){if(t.number==="bigint")try{BigInt(e)}catch{return t.numberFallback}return t.number}var ai=Math.sign||function(e){return e>0?1:e<0?-1:0},i9=Math.log2||function(t){return Math.log(t)/Math.LN2},o9=Math.log10||function(t){return Math.log(t)/Math.LN10},s9=Math.log1p||function(e){return Math.log(e+1)},u9=Math.cbrt||function(t){if(t===0)return t;var r=t<0,n;return r&&(t=-t),Number.isFinite(t)?(n=Math.exp(Math.log(t)/3),n=(t/(n*n)+2*n)/3):n=t,r?-n:n},l9=Math.expm1||function(t){return t>=2e-4||t<=-2e-4?Math.exp(t)-1:t+t*t/2+t*t*t/6};function kf(e,t,r){var n={2:"0b",8:"0o",16:"0x"},a=n[t],i="";if(r){if(r<1)throw new Error("size must be in greater than 0");if(!ke(r))throw new Error("size must be an integer");if(e>2**(r-1)-1||e<-(2**(r-1)))throw new Error("Value must be in range [-2^".concat(r-1,", 2^").concat(r-1,"-1]"));if(!ke(e))throw new Error("Value must be an integer");e<0&&(e=e+2**r),i="i".concat(r)}var o="";return e<0&&(e=-e,o="-"),"".concat(o).concat(a).concat(e.toString(t)).concat(i)}function Ji(e,t){if(typeof t=="function")return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var{notation:r,precision:n,wordSize:a}=ox(t);switch(r){case"fixed":return sx(e,n);case"exponential":return ux(e,n);case"engineering":return c9(e,n);case"bin":return kf(e,2,a);case"oct":return kf(e,8,a);case"hex":return kf(e,16,a);case"auto":return f9(e,n,t).replace(/((\.\d*?)(0+))($|e)/,function(){var i=arguments[2],o=arguments[4];return i!=="."?i+o:o});default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function ox(e){var t="auto",r,n;if(e!==void 0)if(ze(e))r=e;else if(Ze(e))r=e.toNumber();else if(xc(e))e.precision!==void 0&&(r=Zg(e.precision,()=>{throw new Error('Option "precision" must be a number or BigNumber')})),e.wordSize!==void 0&&(n=Zg(e.wordSize,()=>{throw new Error('Option "wordSize" must be a number or BigNumber')})),e.notation&&(t=e.notation);else throw new Error("Unsupported type of options, number, BigNumber, or object expected");return{notation:t,precision:r,wordSize:n}}function au(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw new SyntaxError("Invalid number "+e);var r=t[1],n=t[2],a=parseFloat(t[4]||"0"),i=n.indexOf(".");a+=i!==-1?i-1:n.length-1;var o=n.replace(".","").replace(/^0*/,function(s){return a-=s.length,""}).replace(/0*$/,"").split("").map(function(s){return parseInt(s)});return o.length===0&&(o.push(0),a++),{sign:r,coefficients:o,exponent:a}}function c9(e,t){if(isNaN(e)||!Number.isFinite(e))return String(e);var r=au(e),n=Nc(r,t),a=n.exponent,i=n.coefficients,o=a%3===0?a:a<0?a-3-a%3:a-a%3;if(ze(t))for(;t>i.length||a-o+1>i.length;)i.push(0);else for(var s=Math.abs(a-o)-(i.length-1),u=0;u<s;u++)i.push(0);for(var l=Math.abs(a-o),c=1;l>0;)c++,l--;var f=i.slice(c).join(""),m=ze(t)&&f.length||f.match(/[1-9]/)?"."+f:"",d=i.slice(0,c).join("")+m+"e"+(a>=0?"+":"")+o.toString();return n.sign+d}function sx(e,t){if(isNaN(e)||!Number.isFinite(e))return String(e);var r=au(e),n=typeof t=="number"?Nc(r,r.exponent+1+t):r,a=n.coefficients,i=n.exponent+1,o=i+(t||0);return a.length<o&&(a=a.concat(Ro(o-a.length))),i<0&&(a=Ro(-i+1).concat(a),i=1),i<a.length&&a.splice(i,0,i===0?"0.":"."),n.sign+a.join("")}function ux(e,t){if(isNaN(e)||!Number.isFinite(Number(e)))return String(e);var r=au(e),n=t?Nc(r,t):r,a=n.coefficients,i=n.exponent;a.length<t&&(a=a.concat(Ro(t-a.length)));var o=a.shift();return n.sign+o+(a.length>0?"."+a.join(""):"")+"e"+(i>=0?"+":"")+i}function f9(e,t,r){if(isNaN(e)||!Number.isFinite(e))return String(e);var n=Qg(r?.lowerExp,-3),a=Qg(r?.upperExp,5),i=au(e),o=t?Nc(i,t):i;if(o.exponent<n||o.exponent>=a)return ux(e,t);var s=o.coefficients,u=o.exponent;s.length<t&&(s=s.concat(Ro(t-s.length))),s=s.concat(Ro(u-s.length+1+(s.length<t?t-s.length:0))),s=Ro(-u).concat(s);var l=u>0?u:0;return l<s.length-1&&s.splice(l+1,0,"."),o.sign+s.join("")}function Nc(e,t){for(var r={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},n=r.coefficients;t<=0;)n.unshift(0),r.exponent++,t++;if(n.length>t){var a=n.splice(t,n.length-t);if(a[0]>=5){var i=t-1;for(n[i]++;n[i]===10;)n.pop(),i===0&&(n.unshift(0),r.exponent++,i++),i--,n[i]++}}return r}function Ro(e){for(var t=[],r=0;r<e;r++)t.push(0);return t}function m9(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}function Ar(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e-8,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if(r<=0)throw new Error("Relative tolerance must be greater than 0");if(n<0)throw new Error("Absolute tolerance must be at least 0");return isNaN(e)||isNaN(t)?!1:!Number.isFinite(e)||!Number.isFinite(t)?e===t:e===t?!0:Math.abs(e-t)<=Math.max(r*Math.max(Math.abs(e),Math.abs(t)),n)}var d9=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)},h9=Math.asinh||function(e){return Math.log(Math.sqrt(e*e+1)+e)},p9=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2},g9=Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2},v9=Math.sinh||function(e){return(Math.exp(e)-Math.exp(-e))/2},y9=Math.tanh||function(e){var t=Math.exp(2*e);return(t-1)/(t+1)};function b9(e,t){var r=!0,n=t>0?!0:t<0?!1:1/t===1/0;return r^n?-e:e}function Zg(e,t){if(ze(e))return e;if(Ze(e))return e.toNumber();t()}function Qg(e,t){return ze(e)?e:Ze(e)?e.toNumber():t}var lx=function(){return lx=Gl.create,Gl},w9=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],x9=I("typed",w9,function(t){var{BigNumber:r,Complex:n,DenseMatrix:a,Fraction:i}=t,o=lx();return o.clear(),o.addTypes([{name:"number",test:ze},{name:"Complex",test:$a},{name:"BigNumber",test:Ze},{name:"bigint",test:Os},{name:"Fraction",test:ru},{name:"Unit",test:dn},{name:"identifier",test:s=>Yt&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDD4A-\uDD65\uDD6F-\uDD85\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC4\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDDD0-\uDDED\uDDF0\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDD4A-\uDD65\uDD6F-\uDD85\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC4\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDDD0-\uDDED\uDDF0\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])*$/.test(s)},{name:"string",test:Yt},{name:"Chain",test:nx},{name:"Array",test:Mt},{name:"Matrix",test:Re},{name:"DenseMatrix",test:Hl},{name:"SparseMatrix",test:Vi},{name:"Range",test:xd},{name:"Index",test:wc},{name:"boolean",test:q6},{name:"ResultSet",test:R6},{name:"Help",test:ex},{name:"function",test:tx},{name:"Date",test:L6},{name:"RegExp",test:H6},{name:"null",test:G6},{name:"undefined",test:V6},{name:"AccessorNode",test:qa},{name:"ArrayNode",test:Tn},{name:"AssignmentNode",test:U6},{name:"BlockNode",test:W6},{name:"ConditionalNode",test:J6},{name:"ConstantNode",test:ct},{name:"FunctionNode",test:mi},{name:"FunctionAssignmentNode",test:nu},{name:"IndexNode",test:ts},{name:"Node",test:Ct},{name:"ObjectNode",test:Dc},{name:"OperatorNode",test:Xt},{name:"ParenthesisNode",test:Ra},{name:"RangeNode",test:K6},{name:"RelationalNode",test:Y6},{name:"SymbolNode",test:xr},{name:"Map",test:rx},{name:"Object",test:xc}]),o.addConversions([{from:"number",to:"BigNumber",convert:function(u){if(r||el(u),m9(u)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+u+"). Use function bignumber(x) to convert to BigNumber.");return new r(u)}},{from:"number",to:"Complex",convert:function(u){return n||tl(u),new n(u,0)}},{from:"BigNumber",to:"Complex",convert:function(u){return n||tl(u),new n(u.toNumber(),0)}},{from:"bigint",to:"number",convert:function(u){if(u>Number.MAX_SAFE_INTEGER)throw new TypeError("Cannot implicitly convert bigint to number: value exceeds the max safe integer value (value: "+u+")");return Number(u)}},{from:"bigint",to:"BigNumber",convert:function(u){return r||el(u),new r(u.toString())}},{from:"bigint",to:"Fraction",convert:function(u){return i||rl(u),new i(u)}},{from:"Fraction",to:"BigNumber",convert:function(u){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(u){return n||tl(u),new n(u.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(u){i||rl(u);var l=new i(u);if(l.valueOf()!==u)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+u+"). Use function fraction(x) to convert to Fraction.");return l}},{from:"string",to:"number",convert:function(u){var l=Number(u);if(isNaN(l))throw new Error('Cannot convert "'+u+'" to a number');return l}},{from:"string",to:"BigNumber",convert:function(u){r||el(u);try{return new r(u)}catch{throw new Error('Cannot convert "'+u+'" to BigNumber')}}},{from:"string",to:"bigint",convert:function(u){try{return BigInt(u)}catch{throw new Error('Cannot convert "'+u+'" to BigInt')}}},{from:"string",to:"Fraction",convert:function(u){i||rl(u);try{return new i(u)}catch{throw new Error('Cannot convert "'+u+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(u){n||tl(u);try{return new n(u)}catch{throw new Error('Cannot convert "'+u+'" to Complex')}}},{from:"boolean",to:"number",convert:function(u){return+u}},{from:"boolean",to:"BigNumber",convert:function(u){return r||el(u),new r(+u)}},{from:"boolean",to:"bigint",convert:function(u){return BigInt(+u)}},{from:"boolean",to:"Fraction",convert:function(u){return i||rl(u),new i(+u)}},{from:"boolean",to:"string",convert:function(u){return String(u)}},{from:"Array",to:"Matrix",convert:function(u){return a||D9(),new a(u)}},{from:"Matrix",to:"Array",convert:function(u){return u.valueOf()}}]),o.onMismatch=(s,u,l)=>{var c=o.createError(s,u,l);if(["wrongType","mismatch"].includes(c.data.category)&&u.length===1&&gn(u[0])&&l.some(m=>!m.params.includes(","))){var f=new TypeError("Function '".concat(s,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(s,")'."));throw f.data=c.data,f}throw c},o.onMismatch=(s,u,l)=>{var c=o.createError(s,u,l);if(["wrongType","mismatch"].includes(c.data.category)&&u.length===1&&gn(u[0])&&l.some(m=>!m.params.includes(","))){var f=new TypeError("Function '".concat(s,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(s,")'."));throw f.data=c.data,f}throw c},o});function el(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function tl(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function D9(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function rl(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var N9="ResultSet",A9=[],C9=I(N9,A9,()=>{function e(t){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this.entries=t||[]}return e.prototype.type="ResultSet",e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return"["+this.entries.map(String).join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},e.fromJSON=function(t){return new e(t.entries)},e},{isClass:!0});var _o=9e15,yi=1e9,Bm="0123456789abcdef",Vl="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Ul="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",$m={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-_o,maxE:_o,crypto:!1},cx,Oa,Ke=!0,Ac="[DecimalError] ",di=Ac+"Invalid argument: ",fx=Ac+"Precision limit exceeded",mx=Ac+"crypto unavailable",dx="[object Decimal]",Ir=Math.floor,ur=Math.pow,E9=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,S9=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,M9=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,hx=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Kn=1e7,He=7,T9=9007199254740991,F9=Vl.length-1,_m=Ul.length-1,pe={toStringTag:dx};pe.absoluteValue=pe.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),je(e)};pe.ceil=function(){return je(new this.constructor(this),this.e+1,2)};pe.clampedTo=pe.clamp=function(e,t){var r,n=this,a=n.constructor;if(e=new a(e),t=new a(t),!e.s||!t.s)return new a(NaN);if(e.gt(t))throw Error(di+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new a(n)};pe.comparedTo=pe.cmp=function(e){var t,r,n,a,i=this,o=i.d,s=(e=new i.constructor(e)).d,u=i.s,l=e.s;if(!o||!s)return!u||!l?NaN:u!==l?u:o===s?0:!o^u<0?1:-1;if(!o[0]||!s[0])return o[0]?u:s[0]?-l:0;if(u!==l)return u;if(i.e!==e.e)return i.e>e.e^u<0?1:-1;for(n=o.length,a=s.length,t=0,r=n<a?n:a;t<r;++t)if(o[t]!==s[t])return o[t]>s[t]^u<0?1:-1;return n===a?0:n>a^u<0?1:-1};pe.cosine=pe.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+He,n.rounding=1,r=P9(n,bx(n,r)),n.precision=e,n.rounding=t,je(Oa==2||Oa==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};pe.cubeRoot=pe.cbrt=function(){var e,t,r,n,a,i,o,s,u,l,c=this,f=c.constructor;if(!c.isFinite()||c.isZero())return new f(c);for(Ke=!1,i=c.s*ur(c.s*c,1/3),!i||Math.abs(i)==1/0?(r=Sr(c.d),e=c.e,(i=(e-r.length+1)%3)&&(r+=i==1||i==-2?"0":"00"),i=ur(r,1/3),e=Ir((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?r="5e"+e:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new f(r),n.s=c.s):n=new f(i.toString()),o=(e=f.precision)+3;;)if(s=n,u=s.times(s).times(s),l=u.plus(c),n=_t(l.plus(c).times(s),l.plus(u),o+2,1),Sr(s.d).slice(0,o)===(r=Sr(n.d)).slice(0,o))if(r=r.slice(o-3,o+1),r=="9999"||!a&&r=="4999"){if(!a&&(je(s,e+1,0),s.times(s).times(s).eq(c))){n=s;break}o+=4,a=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(je(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return Ke=!0,je(n,e,f.rounding,t)};pe.decimalPlaces=pe.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-Ir(this.e/He))*He,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};pe.dividedBy=pe.div=function(e){return _t(this,new this.constructor(e))};pe.dividedToIntegerBy=pe.divToInt=function(e){var t=this,r=t.constructor;return je(_t(t,new r(e),0,1,1),r.precision,r.rounding)};pe.equals=pe.eq=function(e){return this.cmp(e)===0};pe.floor=function(){return je(new this.constructor(this),this.e+1,3)};pe.greaterThan=pe.gt=function(e){return this.cmp(e)>0};pe.greaterThanOrEqualTo=pe.gte=function(e){var t=this.cmp(e);return t==1||t===0};pe.hyperbolicCosine=pe.cosh=function(){var e,t,r,n,a,i=this,o=i.constructor,s=new o(1);if(!i.isFinite())return new o(i.s?1/0:NaN);if(i.isZero())return s;r=o.precision,n=o.rounding,o.precision=r+Math.max(i.e,i.sd())+4,o.rounding=1,a=i.d.length,a<32?(e=Math.ceil(a/3),t=(1/Ec(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=Uo(o,1,i.times(t),new o(1),!0);for(var u,l=e,c=new o(8);l--;)u=i.times(i),i=s.minus(u.times(c.minus(u.times(c))));return je(i,o.precision=r,o.rounding=n,!0)};pe.hyperbolicSine=pe.sinh=function(){var e,t,r,n,a=this,i=a.constructor;if(!a.isFinite()||a.isZero())return new i(a);if(t=i.precision,r=i.rounding,i.precision=t+Math.max(a.e,a.sd())+4,i.rounding=1,n=a.d.length,n<3)a=Uo(i,2,a,a,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,a=a.times(1/Ec(5,e)),a=Uo(i,2,a,a,!0);for(var o,s=new i(5),u=new i(16),l=new i(20);e--;)o=a.times(a),a=a.times(s.plus(o.times(u.times(o).plus(l))))}return i.precision=t,i.rounding=r,je(a,t,r,!0)};pe.hyperbolicTangent=pe.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,_t(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};pe.inverseCosine=pe.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,a=t.rounding;return r!==-1?r===0?e.isNeg()?ua(t,n,a):new t(0):new t(NaN):e.isZero()?ua(t,n+4,a).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=a,e.times(2))};pe.inverseHyperbolicCosine=pe.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,Ke=!1,r=r.times(r).minus(1).sqrt().plus(r),Ke=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};pe.inverseHyperbolicSine=pe.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,Ke=!1,r=r.times(r).plus(1).sqrt().plus(r),Ke=!0,n.precision=e,n.rounding=t,r.ln())};pe.inverseHyperbolicTangent=pe.atanh=function(){var e,t,r,n,a=this,i=a.constructor;return a.isFinite()?a.e>=0?new i(a.abs().eq(1)?a.s/0:a.isZero()?a:NaN):(e=i.precision,t=i.rounding,n=a.sd(),Math.max(n,e)<2*-a.e-1?je(new i(a),e,t,!0):(i.precision=r=n-a.e,a=_t(a.plus(1),new i(1).minus(a),r+e,1),i.precision=e+4,i.rounding=1,a=a.ln(),i.precision=e,i.rounding=t,a.times(.5))):new i(NaN)};pe.inverseSine=pe.asin=function(){var e,t,r,n,a=this,i=a.constructor;return a.isZero()?new i(a):(t=a.abs().cmp(1),r=i.precision,n=i.rounding,t!==-1?t===0?(e=ua(i,r+4,n).times(.5),e.s=a.s,e):new i(NaN):(i.precision=r+6,i.rounding=1,a=a.div(new i(1).minus(a.times(a)).sqrt().plus(1)).atan(),i.precision=r,i.rounding=n,a.times(2)))};pe.inverseTangent=pe.atan=function(){var e,t,r,n,a,i,o,s,u,l=this,c=l.constructor,f=c.precision,m=c.rounding;if(l.isFinite()){if(l.isZero())return new c(l);if(l.abs().eq(1)&&f+4<=_m)return o=ua(c,f+4,m).times(.25),o.s=l.s,o}else{if(!l.s)return new c(NaN);if(f+4<=_m)return o=ua(c,f+4,m).times(.5),o.s=l.s,o}for(c.precision=s=f+10,c.rounding=1,r=Math.min(28,s/He+2|0),e=r;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(Ke=!1,t=Math.ceil(s/He),n=1,u=l.times(l),o=new c(l),a=l;e!==-1;)if(a=a.times(u),i=o.minus(a.div(n+=2)),a=a.times(u),o=i.plus(a.div(n+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===i.d[e]&&e--;);return r&&(o=o.times(2<<r-1)),Ke=!0,je(o,c.precision=f,c.rounding=m,!0)};pe.isFinite=function(){return!!this.d};pe.isInteger=pe.isInt=function(){return!!this.d&&Ir(this.e/He)>this.d.length-2};pe.isNaN=function(){return!this.s};pe.isNegative=pe.isNeg=function(){return this.s<0};pe.isPositive=pe.isPos=function(){return this.s>0};pe.isZero=function(){return!!this.d&&this.d[0]===0};pe.lessThan=pe.lt=function(e){return this.cmp(e)<0};pe.lessThanOrEqualTo=pe.lte=function(e){return this.cmp(e)<1};pe.logarithm=pe.log=function(e){var t,r,n,a,i,o,s,u,l=this,c=l.constructor,f=c.precision,m=c.rounding,d=5;if(e==null)e=new c(10),t=!0;else{if(e=new c(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(r=l.d,l.s<0||!r||!r[0]||l.eq(1))return new c(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)i=!0;else{for(a=r[0];a%10===0;)a/=10;i=a!==1}if(Ke=!1,s=f+d,o=ii(l,s),n=t?Wl(c,s+10):ii(e,s),u=_t(o,n,s,1),Gs(u.d,a=f,m))do if(s+=10,o=ii(l,s),n=t?Wl(c,s+10):ii(e,s),u=_t(o,n,s,1),!i){+Sr(u.d).slice(a+1,a+15)+1==1e14&&(u=je(u,f+1,0));break}while(Gs(u.d,a+=10,m));return Ke=!0,je(u,f,m)};pe.minus=pe.sub=function(e){var t,r,n,a,i,o,s,u,l,c,f,m,d=this,h=d.constructor;if(e=new h(e),!d.d||!e.d)return!d.s||!e.s?e=new h(NaN):d.d?e.s=-e.s:e=new h(e.d||d.s!==e.s?d:NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(l=d.d,m=e.d,s=h.precision,u=h.rounding,!l[0]||!m[0]){if(m[0])e.s=-e.s;else if(l[0])e=new h(d);else return new h(u===3?-0:0);return Ke?je(e,s,u):e}if(r=Ir(e.e/He),c=Ir(d.e/He),l=l.slice(),i=c-r,i){for(f=i<0,f?(t=l,i=-i,o=m.length):(t=m,r=c,o=l.length),n=Math.max(Math.ceil(s/He),o)+2,i>n&&(i=n,t.length=1),t.reverse(),n=i;n--;)t.push(0);t.reverse()}else{for(n=l.length,o=m.length,f=n<o,f&&(o=n),n=0;n<o;n++)if(l[n]!=m[n]){f=l[n]<m[n];break}i=0}for(f&&(t=l,l=m,m=t,e.s=-e.s),o=l.length,n=m.length-o;n>0;--n)l[o++]=0;for(n=m.length;n>i;){if(l[--n]<m[n]){for(a=n;a&&l[--a]===0;)l[a]=Kn-1;--l[a],l[n]+=Kn}l[n]-=m[n]}for(;l[--o]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(e.d=l,e.e=Cc(l,r),Ke?je(e,s,u):e):new h(u===3?-0:0)};pe.modulo=pe.mod=function(e){var t,r=this,n=r.constructor;return e=new n(e),!r.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||r.d&&!r.d[0]?je(new n(r),n.precision,n.rounding):(Ke=!1,n.modulo==9?(t=_t(r,e.abs(),0,3,1),t.s*=e.s):t=_t(r,e,0,n.modulo,1),t=t.times(e),Ke=!0,r.minus(t))};pe.naturalExponential=pe.exp=function(){return Im(this)};pe.naturalLogarithm=pe.ln=function(){return ii(this)};pe.negated=pe.neg=function(){var e=new this.constructor(this);return e.s=-e.s,je(e)};pe.plus=pe.add=function(e){var t,r,n,a,i,o,s,u,l,c,f=this,m=f.constructor;if(e=new m(e),!f.d||!e.d)return!f.s||!e.s?e=new m(NaN):f.d||(e=new m(e.d||f.s===e.s?f:NaN)),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(l=f.d,c=e.d,s=m.precision,u=m.rounding,!l[0]||!c[0])return c[0]||(e=new m(f)),Ke?je(e,s,u):e;if(i=Ir(f.e/He),n=Ir(e.e/He),l=l.slice(),a=i-n,a){for(a<0?(r=l,a=-a,o=c.length):(r=c,n=i,o=l.length),i=Math.ceil(s/He),o=i>o?i+1:o+1,a>o&&(a=o,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(o=l.length,a=c.length,o-a<0&&(a=o,r=c,c=l,l=r),t=0;a;)t=(l[--a]=l[a]+c[a]+t)/Kn|0,l[a]%=Kn;for(t&&(l.unshift(t),++n),o=l.length;l[--o]==0;)l.pop();return e.d=l,e.e=Cc(l,n),Ke?je(e,s,u):e};pe.precision=pe.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(di+e);return r.d?(t=px(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};pe.round=function(){var e=this,t=e.constructor;return je(new t(e),e.e+1,t.rounding)};pe.sine=pe.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+He,n.rounding=1,r=O9(n,bx(n,r)),n.precision=e,n.rounding=t,je(Oa>2?r.neg():r,e,t,!0)):new n(NaN)};pe.squareRoot=pe.sqrt=function(){var e,t,r,n,a,i,o=this,s=o.d,u=o.e,l=o.s,c=o.constructor;if(l!==1||!s||!s[0])return new c(!l||l<0&&(!s||s[0])?NaN:s?o:1/0);for(Ke=!1,l=Math.sqrt(+o),l==0||l==1/0?(t=Sr(s),(t.length+u)%2==0&&(t+="0"),l=Math.sqrt(t),u=Ir((u+1)/2)-(u<0||u%2),l==1/0?t="5e"+u:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),n=new c(t)):n=new c(l.toString()),r=(u=c.precision)+3;;)if(i=n,n=i.plus(_t(o,i,r+2,1)).times(.5),Sr(i.d).slice(0,r)===(t=Sr(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!a&&t=="4999"){if(!a&&(je(i,u+1,0),i.times(i).eq(o))){n=i;break}r+=4,a=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(je(n,u+1,1),e=!n.times(n).eq(o));break}return Ke=!0,je(n,u,c.rounding,e)};pe.tangent=pe.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=_t(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,je(Oa==2||Oa==4?r.neg():r,e,t,!0)):new n(NaN)};pe.times=pe.mul=function(e){var t,r,n,a,i,o,s,u,l,c=this,f=c.constructor,m=c.d,d=(e=new f(e)).d;if(e.s*=c.s,!m||!m[0]||!d||!d[0])return new f(!e.s||m&&!m[0]&&!d||d&&!d[0]&&!m?NaN:!m||!d?e.s/0:e.s*0);for(r=Ir(c.e/He)+Ir(e.e/He),u=m.length,l=d.length,u<l&&(i=m,m=d,d=i,o=u,u=l,l=o),i=[],o=u+l,n=o;n--;)i.push(0);for(n=l;--n>=0;){for(t=0,a=u+n;a>n;)s=i[a]+d[n]*m[a-n-1]+t,i[a--]=s%Kn|0,t=s/Kn|0;i[a]=(i[a]+t)%Kn|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=Cc(i,r),Ke?je(e,f.precision,f.rounding):e};pe.toBinary=function(e,t){return Dd(this,2,e,t)};pe.toDecimalPlaces=pe.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(sn(e,0,yi),t===void 0?t=n.rounding:sn(t,0,8),je(r,e+r.e+1,t))};pe.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=fa(n,!0):(sn(e,0,yi),t===void 0?t=a.rounding:sn(t,0,8),n=je(new a(n),e+1,t),r=fa(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};pe.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?r=fa(a):(sn(e,0,yi),t===void 0?t=i.rounding:sn(t,0,8),n=je(new i(a),e+a.e+1,t),r=fa(n,!1,e+n.e+1)),a.isNeg()&&!a.isZero()?"-"+r:r};pe.toFraction=function(e){var t,r,n,a,i,o,s,u,l,c,f,m,d=this,h=d.d,p=d.constructor;if(!h)return new p(d);if(l=r=new p(1),n=u=new p(0),t=new p(n),i=t.e=px(h)-d.e-1,o=i%He,t.d[0]=ur(10,o<0?He+o:o),e==null)e=i>0?t:l;else{if(s=new p(e),!s.isInt()||s.lt(l))throw Error(di+s);e=s.gt(t)?i>0?t:l:s}for(Ke=!1,s=new p(Sr(h)),c=p.precision,p.precision=i=h.length*He*2;f=_t(s,t,0,1,1),a=r.plus(f.times(n)),a.cmp(e)!=1;)r=n,n=a,a=l,l=u.plus(f.times(a)),u=a,a=t,t=s.minus(f.times(a)),s=a;return a=_t(e.minus(r),n,0,1,1),u=u.plus(a.times(l)),r=r.plus(a.times(n)),u.s=l.s=d.s,m=_t(l,n,i,1).minus(d).abs().cmp(_t(u,r,i,1).minus(d).abs())<1?[l,n]:[u,r],p.precision=c,Ke=!0,m};pe.toHexadecimal=pe.toHex=function(e,t){return Dd(this,16,e,t)};pe.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:sn(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(Ke=!1,r=_t(r,e,0,t,1).times(e),Ke=!0,je(r)):(e.s=r.s,r=e),r};pe.toNumber=function(){return+this};pe.toOctal=function(e,t){return Dd(this,8,e,t)};pe.toPower=pe.pow=function(e){var t,r,n,a,i,o,s=this,u=s.constructor,l=+(e=new u(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new u(ur(+s,l));if(s=new u(s),s.eq(1))return s;if(n=u.precision,i=u.rounding,e.eq(1))return je(s,n,i);if(t=Ir(e.e/He),t>=e.d.length-1&&(r=l<0?-l:l)<=T9)return a=gx(u,s,r,n),e.s<0?new u(1).div(a):je(a,n,i);if(o=s.s,o<0){if(t<e.d.length-1)return new u(NaN);if((e.d[t]&1)==0&&(o=1),s.e==0&&s.d[0]==1&&s.d.length==1)return s.s=o,s}return r=ur(+s,l),t=r==0||!isFinite(r)?Ir(l*(Math.log("0."+Sr(s.d))/Math.LN10+s.e+1)):new u(r+"").e,t>u.maxE+1||t<u.minE-1?new u(t>0?o/0:0):(Ke=!1,u.rounding=s.s=1,r=Math.min(12,(t+"").length),a=Im(e.times(ii(s,n+r)),n),a.d&&(a=je(a,n+5,1),Gs(a.d,n,i)&&(t=n+10,a=je(Im(e.times(ii(s,t+r)),t),t+5,1),+Sr(a.d).slice(n+1,n+15)+1==1e14&&(a=je(a,n+1,0)))),a.s=o,Ke=!0,u.rounding=i,je(a,n,i))};pe.toPrecision=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=fa(n,n.e<=a.toExpNeg||n.e>=a.toExpPos):(sn(e,1,yi),t===void 0?t=a.rounding:sn(t,0,8),n=je(new a(n),e,t),r=fa(n,e<=n.e||n.e<=a.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};pe.toSignificantDigits=pe.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(sn(e,1,yi),t===void 0?t=n.rounding:sn(t,0,8)),je(new n(r),e,t)};pe.toString=function(){var e=this,t=e.constructor,r=fa(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};pe.truncated=pe.trunc=function(){return je(new this.constructor(this),this.e+1,1)};pe.valueOf=pe.toJSON=function(){var e=this,t=e.constructor,r=fa(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Sr(e){var t,r,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)n=e[t]+"",r=He-n.length,r&&(i+=Qa(r)),i+=n;o=e[t],n=o+"",r=He-n.length,r&&(i+=Qa(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}function sn(e,t,r){if(e!==~~e||e<t||e>r)throw Error(di+e)}function Gs(e,t,r,n){var a,i,o,s;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=He,a=0):(a=Math.ceil((t+1)/He),t%=He),i=ur(10,He-t),s=e[a]%i|0,n==null?t<3?(t==0?s=s/100|0:t==1&&(s=s/10|0),o=r<4&&s==99999||r>3&&s==49999||s==5e4||s==0):o=(r<4&&s+1==i||r>3&&s+1==i/2)&&(e[a+1]/i/100|0)==ur(10,t-2)-1||(s==i/2||s==0)&&(e[a+1]/i/100|0)==0:t<4?(t==0?s=s/1e3|0:t==1?s=s/100|0:t==2&&(s=s/10|0),o=(n||r<4)&&s==9999||!n&&r>3&&s==4999):o=((n||r<4)&&s+1==i||!n&&r>3&&s+1==i/2)&&(e[a+1]/i/1e3|0)==ur(10,t-3)-1,o}function Cl(e,t,r){for(var n,a=[0],i,o=0,s=e.length;o<s;){for(i=a.length;i--;)a[i]*=t;for(a[0]+=Bm.indexOf(e.charAt(o++)),n=0;n<a.length;n++)a[n]>r-1&&(a[n+1]===void 0&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}function P9(e,t){var r,n,a;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),a=(1/Ec(4,r)).toString()):(r=16,a="2.3283064365386962890625e-10"),e.precision+=r,t=Uo(e,1,t.times(a),new e(1));for(var i=r;i--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=r,t}var _t=(function(){function e(n,a,i){var o,s=0,u=n.length;for(n=n.slice();u--;)o=n[u]*a+s,n[u]=o%i|0,s=o/i|0;return s&&n.unshift(s),n}function t(n,a,i,o){var s,u;if(i!=o)u=i>o?1:-1;else for(s=u=0;s<i;s++)if(n[s]!=a[s]){u=n[s]>a[s]?1:-1;break}return u}function r(n,a,i,o){for(var s=0;i--;)n[i]-=s,s=n[i]<a[i]?1:0,n[i]=s*o+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o,s,u){var l,c,f,m,d,h,p,y,w,D,v,x,g,b,C,N,A,E,S,F,k=n.constructor,B=n.s==a.s?1:-1,L=n.d,M=a.d;if(!L||!L[0]||!M||!M[0])return new k(!n.s||!a.s||(L?M&&L[0]==M[0]:!M)?NaN:L&&L[0]==0||!M?B*0:B/0);for(u?(d=1,c=n.e-a.e):(u=Kn,d=He,c=Ir(n.e/d)-Ir(a.e/d)),S=M.length,A=L.length,w=new k(B),D=w.d=[],f=0;M[f]==(L[f]||0);f++);if(M[f]>(L[f]||0)&&c--,i==null?(b=i=k.precision,o=k.rounding):s?b=i+(n.e-a.e)+1:b=i,b<0)D.push(1),h=!0;else{if(b=b/d+2|0,f=0,S==1){for(m=0,M=M[0],b++;(f<A||m)&&b--;f++)C=m*u+(L[f]||0),D[f]=C/M|0,m=C%M|0;h=m||f<A}else{for(m=u/(M[0]+1)|0,m>1&&(M=e(M,m,u),L=e(L,m,u),S=M.length,A=L.length),N=S,v=L.slice(0,S),x=v.length;x<S;)v[x++]=0;F=M.slice(),F.unshift(0),E=M[0],M[1]>=u/2&&++E;do m=0,l=t(M,v,S,x),l<0?(g=v[0],S!=x&&(g=g*u+(v[1]||0)),m=g/E|0,m>1?(m>=u&&(m=u-1),p=e(M,m,u),y=p.length,x=v.length,l=t(p,v,y,x),l==1&&(m--,r(p,S<y?F:M,y,u))):(m==0&&(l=m=1),p=M.slice()),y=p.length,y<x&&p.unshift(0),r(v,p,x,u),l==-1&&(x=v.length,l=t(M,v,S,x),l<1&&(m++,r(v,S<x?F:M,x,u))),x=v.length):l===0&&(m++,v=[0]),D[f++]=m,l&&v[0]?v[x++]=L[N]||0:(v=[L[N]],x=1);while((N++<A||v[0]!==void 0)&&b--);h=v[0]!==void 0}D[0]||D.shift()}if(d==1)w.e=c,cx=h;else{for(f=1,m=D[0];m>=10;m/=10)f++;w.e=f+c*d-1,je(w,s?i+w.e+1:i,o,h)}return w}})();function je(e,t,r,n){var a,i,o,s,u,l,c,f,m,d=e.constructor;e:if(t!=null){if(f=e.d,!f)return e;for(a=1,s=f[0];s>=10;s/=10)a++;if(i=t-a,i<0)i+=He,o=t,c=f[m=0],u=c/ur(10,a-o-1)%10|0;else if(m=Math.ceil((i+1)/He),s=f.length,m>=s)if(n){for(;s++<=m;)f.push(0);c=u=0,a=1,i%=He,o=i-He+1}else break e;else{for(c=s=f[m],a=1;s>=10;s/=10)a++;i%=He,o=i-He+a,u=o<0?0:c/ur(10,a-o-1)%10|0}if(n=n||t<0||f[m+1]!==void 0||(o<0?c:c%ur(10,a-o-1)),l=r<4?(u||n)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(i>0?o>0?c/ur(10,a-o):0:f[m-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,l?(t-=e.e+1,f[0]=ur(10,(He-t%He)%He),e.e=-t||0):f[0]=e.e=0,e;if(i==0?(f.length=m,s=1,m--):(f.length=m+1,s=ur(10,He-i),f[m]=o>0?(c/ur(10,a-o)%ur(10,o)|0)*s:0),l)for(;;)if(m==0){for(i=1,o=f[0];o>=10;o/=10)i++;for(o=f[0]+=s,s=1;o>=10;o/=10)s++;i!=s&&(e.e++,f[0]==Kn&&(f[0]=1));break}else{if(f[m]+=s,f[m]!=Kn)break;f[m--]=0,s=1}for(i=f.length;f[--i]===0;)f.pop()}return Ke&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function fa(e,t,r){if(!e.isFinite())return yx(e);var n,a=e.e,i=Sr(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+Qa(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):a<0?(i="0."+Qa(-a-1)+i,r&&(n=r-o)>0&&(i+=Qa(n))):a>=o?(i+=Qa(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+Qa(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=Qa(n))),i}function Cc(e,t){var r=e[0];for(t*=He;r>=10;r/=10)t++;return t}function Wl(e,t,r){if(t>F9)throw Ke=!0,r&&(e.precision=r),Error(fx);return je(new e(Vl),t,1,!0)}function ua(e,t,r){if(t>_m)throw Error(fx);return je(new e(Ul),t,r,!0)}function px(e){var t=e.length-1,r=t*He+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Qa(e){for(var t="";e--;)t+="0";return t}function gx(e,t,r,n){var a,i=new e(1),o=Math.ceil(n/He+4);for(Ke=!1;;){if(r%2&&(i=i.times(t),e0(i.d,o)&&(a=!0)),r=Ir(r/2),r===0){r=i.d.length-1,a&&i.d[r]===0&&++i.d[r];break}t=t.times(t),e0(t.d,o)}return Ke=!0,i}function Xg(e){return e.d[e.d.length-1]&1}function vx(e,t,r){for(var n,a,i=new e(t[0]),o=0;++o<t.length;){if(a=new e(t[o]),!a.s){i=a;break}n=i.cmp(a),(n===r||n===0&&i.s===r)&&(i=a)}return i}function Im(e,t){var r,n,a,i,o,s,u,l=0,c=0,f=0,m=e.constructor,d=m.rounding,h=m.precision;if(!e.d||!e.d[0]||e.e>17)return new m(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(Ke=!1,u=h):u=t,s=new m(.03125);e.e>-2;)e=e.times(s),f+=5;for(n=Math.log(ur(2,f))/Math.LN10*2+5|0,u+=n,r=i=o=new m(1),m.precision=u;;){if(i=je(i.times(e),u,1),r=r.times(++c),s=o.plus(_t(i,r,u,1)),Sr(s.d).slice(0,u)===Sr(o.d).slice(0,u)){for(a=f;a--;)o=je(o.times(o),u,1);if(t==null)if(l<3&&Gs(o.d,u-n,d,l))m.precision=u+=10,r=i=s=new m(1),c=0,l++;else return je(o,m.precision=h,d,Ke=!0);else return m.precision=h,o}o=s}}function ii(e,t){var r,n,a,i,o,s,u,l,c,f,m,d=1,h=10,p=e,y=p.d,w=p.constructor,D=w.rounding,v=w.precision;if(p.s<0||!y||!y[0]||!p.e&&y[0]==1&&y.length==1)return new w(y&&!y[0]?-1/0:p.s!=1?NaN:y?0:p);if(t==null?(Ke=!1,c=v):c=t,w.precision=c+=h,r=Sr(y),n=r.charAt(0),Math.abs(i=p.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Sr(p.d),n=r.charAt(0),d++;i=p.e,n>1?(p=new w("0."+r),i++):p=new w(n+"."+r.slice(1))}else return l=Wl(w,c+2,v).times(i+""),p=ii(new w(n+"."+r.slice(1)),c-h).plus(l),w.precision=v,t==null?je(p,v,D,Ke=!0):p;for(f=p,u=o=p=_t(p.minus(1),p.plus(1),c,1),m=je(p.times(p),c,1),a=3;;){if(o=je(o.times(m),c,1),l=u.plus(_t(o,new w(a),c,1)),Sr(l.d).slice(0,c)===Sr(u.d).slice(0,c))if(u=u.times(2),i!==0&&(u=u.plus(Wl(w,c+2,v).times(i+""))),u=_t(u,new w(d),c,1),t==null)if(Gs(u.d,c-h,D,s))w.precision=c+=h,l=o=p=_t(f.minus(1),f.plus(1),c,1),m=je(p.times(p),c,1),a=s=1;else return je(u,w.precision=v,D,Ke=!0);else return w.precision=v,u;u=l,a+=2}}function yx(e){return String(e.s*e.s/0)}function El(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(a=t.length;t.charCodeAt(a-1)===48;--a);if(t=t.slice(n,a),t){if(a-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%He,r<0&&(n+=He),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=He;n<a;)e.d.push(+t.slice(n,n+=He));t=t.slice(n),n=He-t.length}else n-=a;for(;n--;)t+="0";e.d.push(+t),Ke&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function k9(e,t){var r,n,a,i,o,s,u,l,c;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),hx.test(t))return El(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(S9.test(t))r=16,t=t.toLowerCase();else if(E9.test(t))r=2;else if(M9.test(t))r=8;else throw Error(di+t);for(i=t.search(/p/i),i>0?(u=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),o=i>=0,n=e.constructor,o&&(t=t.replace(".",""),s=t.length,i=s-i,a=gx(n,new n(r),i,i*2)),l=Cl(t,r,Kn),c=l.length-1,i=c;l[i]===0;--i)l.pop();return i<0?new n(e.s*0):(e.e=Cc(l,c),e.d=l,Ke=!1,o&&(e=_t(e,a,s*4)),u&&(e=e.times(Math.abs(u)<54?ur(2,u):hi.pow(2,u))),Ke=!0,e)}function O9(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Uo(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Ec(5,r)),t=Uo(e,2,t,t);for(var a,i=new e(5),o=new e(16),s=new e(20);r--;)a=t.times(t),t=t.times(i.plus(a.times(o.times(a).minus(s))));return t}function Uo(e,t,r,n,a){var i,o,s,u,l=e.precision,c=Math.ceil(l/He);for(Ke=!1,u=r.times(r),s=new e(n);;){if(o=_t(s.times(u),new e(t++*t++),l,1),s=a?n.plus(o):n.minus(o),n=_t(o.times(u),new e(t++*t++),l,1),o=s.plus(n),o.d[c]!==void 0){for(i=c;o.d[i]===s.d[i]&&i--;);if(i==-1)break}i=s,s=n,n=o,o=i}return Ke=!0,o.d.length=c+1,o}function Ec(e,t){for(var r=e;--t;)r*=e;return r}function bx(e,t){var r,n=t.s<0,a=ua(e,e.precision,1),i=a.times(.5);if(t=t.abs(),t.lte(i))return Oa=n?4:1,t;if(r=t.divToInt(a),r.isZero())Oa=n?3:2;else{if(t=t.minus(r.times(a)),t.lte(i))return Oa=Xg(r)?n?2:3:n?4:1,t;Oa=Xg(r)?n?1:4:n?3:2}return t.minus(a).abs()}function Dd(e,t,r,n){var a,i,o,s,u,l,c,f,m,d=e.constructor,h=r!==void 0;if(h?(sn(r,1,yi),n===void 0?n=d.rounding:sn(n,0,8)):(r=d.precision,n=d.rounding),!e.isFinite())c=yx(e);else{for(c=fa(e),o=c.indexOf("."),h?(a=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):a=t,o>=0&&(c=c.replace(".",""),m=new d(1),m.e=c.length-o,m.d=Cl(fa(m),10,a),m.e=m.d.length),f=Cl(c,10,a),i=u=f.length;f[--u]==0;)f.pop();if(!f[0])c=h?"0p+0":"0";else{if(o<0?i--:(e=new d(e),e.d=f,e.e=i,e=_t(e,m,r,n,0,a),f=e.d,i=e.e,l=cx),o=f[r],s=a/2,l=l||f[r+1]!==void 0,l=n<4?(o!==void 0||l)&&(n===0||n===(e.s<0?3:2)):o>s||o===s&&(n===4||l||n===6&&f[r-1]&1||n===(e.s<0?8:7)),f.length=r,l)for(;++f[--r]>a-1;)f[r]=0,r||(++i,f.unshift(1));for(u=f.length;!f[u-1];--u);for(o=0,c="";o<u;o++)c+=Bm.charAt(f[o]);if(h){if(u>1)if(t==16||t==8){for(o=t==16?4:3,--u;u%o;u++)c+="0";for(f=Cl(c,a,t),u=f.length;!f[u-1];--u);for(o=1,c="1.";o<u;o++)c+=Bm.charAt(f[o])}else c=c.charAt(0)+"."+c.slice(1);c=c+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)c="0"+c;c="0."+c}else if(++i>u)for(i-=u;i--;)c+="0";else i<u&&(c=c.slice(0,i)+"."+c.slice(i))}c=(t==16?"0x":t==2?"0b":t==8?"0o":"")+c}return e.s<0?"-"+c:c}function e0(e,t){if(e.length>t)return e.length=t,!0}function B9(e){return new this(e).abs()}function $9(e){return new this(e).acos()}function _9(e){return new this(e).acosh()}function I9(e,t){return new this(e).plus(t)}function z9(e){return new this(e).asin()}function j9(e){return new this(e).asinh()}function q9(e){return new this(e).atan()}function R9(e){return new this(e).atanh()}function L9(e,t){e=new this(e),t=new this(t);var r,n=this.precision,a=this.rounding,i=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ua(this,i,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ua(this,n,a):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ua(this,i,1).times(.5),r.s=e.s):t.s<0?(this.precision=i,this.rounding=1,r=this.atan(_t(e,t,i,1)),t=ua(this,i,1),this.precision=n,this.rounding=a,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(_t(e,t,i,1)),r}function H9(e){return new this(e).cbrt()}function G9(e){return je(e=new this(e),e.e+1,2)}function V9(e,t,r){return new this(e).clamp(t,r)}function U9(e){if(!e||typeof e!="object")throw Error(Ac+"Object expected");var t,r,n,a=e.defaults===!0,i=["precision",1,yi,"rounding",0,8,"toExpNeg",-_o,0,"toExpPos",0,_o,"maxE",0,_o,"minE",-_o,0,"modulo",0,9];for(t=0;t<i.length;t+=3)if(r=i[t],a&&(this[r]=$m[r]),(n=e[r])!==void 0)if(Ir(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(di+r+": "+n);if(r="crypto",a&&(this[r]=$m[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(mx);else this[r]=!1;else throw Error(di+r+": "+n);return this}function W9(e){return new this(e).cos()}function J9(e){return new this(e).cosh()}function wx(e){var t,r,n;function a(i){var o,s,u,l=this;if(!(l instanceof a))return new a(i);if(l.constructor=a,t0(i)){l.s=i.s,Ke?!i.d||i.e>a.maxE?(l.e=NaN,l.d=null):i.e<a.minE?(l.e=0,l.d=[0]):(l.e=i.e,l.d=i.d.slice()):(l.e=i.e,l.d=i.d?i.d.slice():i.d);return}if(u=typeof i,u==="number"){if(i===0){l.s=1/i<0?-1:1,l.e=0,l.d=[0];return}if(i<0?(i=-i,l.s=-1):l.s=1,i===~~i&&i<1e7){for(o=0,s=i;s>=10;s/=10)o++;Ke?o>a.maxE?(l.e=NaN,l.d=null):o<a.minE?(l.e=0,l.d=[0]):(l.e=o,l.d=[i]):(l.e=o,l.d=[i]);return}if(i*0!==0){i||(l.s=NaN),l.e=NaN,l.d=null;return}return El(l,i.toString())}if(u==="string")return(s=i.charCodeAt(0))===45?(i=i.slice(1),l.s=-1):(s===43&&(i=i.slice(1)),l.s=1),hx.test(i)?El(l,i):k9(l,i);if(u==="bigint")return i<0?(i=-i,l.s=-1):l.s=1,El(l,i.toString());throw Error(di+i)}if(a.prototype=pe,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=U9,a.clone=wx,a.isDecimal=t0,a.abs=B9,a.acos=$9,a.acosh=_9,a.add=I9,a.asin=z9,a.asinh=j9,a.atan=q9,a.atanh=R9,a.atan2=L9,a.cbrt=H9,a.ceil=G9,a.clamp=V9,a.cos=W9,a.cosh=J9,a.div=K9,a.exp=Y9,a.floor=Z9,a.hypot=Q9,a.ln=X9,a.log=e8,a.log10=r8,a.log2=t8,a.max=n8,a.min=a8,a.mod=i8,a.mul=o8,a.pow=s8,a.random=u8,a.round=l8,a.sign=c8,a.sin=f8,a.sinh=m8,a.sqrt=d8,a.sub=h8,a.sum=p8,a.tan=g8,a.tanh=v8,a.trunc=y8,e===void 0&&(e={}),e&&e.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function K9(e,t){return new this(e).div(t)}function Y9(e){return new this(e).exp()}function Z9(e){return je(e=new this(e),e.e+1,3)}function Q9(){var e,t,r=new this(0);for(Ke=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return Ke=!0,new this(1/0);r=t}return Ke=!0,r.sqrt()}function t0(e){return e instanceof hi||e&&e.toStringTag===dx||!1}function X9(e){return new this(e).ln()}function e8(e,t){return new this(e).log(t)}function t8(e){return new this(e).log(2)}function r8(e){return new this(e).log(10)}function n8(){return vx(this,arguments,-1)}function a8(){return vx(this,arguments,1)}function i8(e,t){return new this(e).mod(t)}function o8(e,t){return new this(e).mul(t)}function s8(e,t){return new this(e).pow(t)}function u8(e){var t,r,n,a,i=0,o=new this(1),s=[];if(e===void 0?e=this.precision:sn(e,1,yi),n=Math.ceil(e/He),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(n));i<n;)a=t[i],a>=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:s[i++]=a%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);i<n;)a=t[i]+(t[i+1]<<8)+(t[i+2]<<16)+((t[i+3]&127)<<24),a>=214e7?crypto.randomBytes(4).copy(t,i):(s.push(a%1e7),i+=4);i=n/4}else throw Error(mx);else for(;i<n;)s[i++]=Math.random()*1e7|0;for(n=s[--i],e%=He,n&&e&&(a=ur(10,He-e),s[i]=(n/a|0)*a);s[i]===0;i--)s.pop();if(i<0)r=0,s=[0];else{for(r=-1;s[0]===0;r-=He)s.shift();for(n=1,a=s[0];a>=10;a/=10)n++;n<He&&(r-=He-n)}return o.e=r,o.d=s,o}function l8(e){return je(e=new this(e),e.e+1,this.rounding)}function c8(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function f8(e){return new this(e).sin()}function m8(e){return new this(e).sinh()}function d8(e){return new this(e).sqrt()}function h8(e,t){return new this(e).sub(t)}function p8(){var e=0,t=arguments,r=new this(t[e]);for(Ke=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return Ke=!0,je(r,this.precision,this.rounding)}function g8(e){return new this(e).tan()}function v8(e){return new this(e).tanh()}function y8(e){return je(e=new this(e),e.e+1,1)}pe[Symbol.for("nodejs.util.inspect.custom")]=pe.toString;pe[Symbol.toStringTag]="Decimal";var hi=pe.constructor=wx($m);Vl=new hi(Vl);Ul=new hi(Ul);var b8="BigNumber",w8=["?on","config"],x8=I(b8,w8,e=>{var{on:t,config:r}=e,n=hi.clone({precision:r.precision,modulo:hi.EUCLID});return n.prototype=Object.create(n.prototype),n.prototype.type="BigNumber",n.prototype.isBigNumber=!0,n.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},n.fromJSON=function(a){return new n(a.value)},t&&t("config",function(a,i){a.precision!==i.precision&&n.config({precision:a.precision})}),n},{isClass:!0});const Br=Math.cosh||function(e){return Math.abs(e)<1e-9?1-e:(Math.exp(e)+Math.exp(-e))*.5},Cn=Math.sinh||function(e){return Math.abs(e)<1e-9?e:(Math.exp(e)-Math.exp(-e))*.5},D8=function(e){const t=Math.PI/4;if(-t>e||e>t)return Math.cos(e)-1;const r=e*e;return r*(r*(r*(r*(r*(r*(r*(r/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},Of=function(e,t){return e=Math.abs(e),t=Math.abs(t),e<t&&([e,t]=[t,e]),e<1e8?Math.sqrt(e*e+t*t):(t/=e,e*Math.sqrt(1+t*t))},Co=function(){throw SyntaxError("Invalid Param")};function Bf(e,t){const r=Math.abs(e),n=Math.abs(t);return e===0?Math.log(n):t===0?Math.log(r):r<3e3&&n<3e3?Math.log(e*e+t*t)*.5:(e=e*.5,t=t*.5,.5*Math.log(e*e+t*t)+Math.LN2)}const N8={re:0,im:0},Ii=function(e,t){const r=N8;if(e==null)r.re=r.im=0;else if(t!==void 0)r.re=e,r.im=t;else switch(typeof e){case"object":if("im"in e&&"re"in e)r.re=e.re,r.im=e.im;else if("abs"in e&&"arg"in e){if(!isFinite(e.abs)&&isFinite(e.arg))return fe.INFINITY;r.re=e.abs*Math.cos(e.arg),r.im=e.abs*Math.sin(e.arg)}else if("r"in e&&"phi"in e){if(!isFinite(e.r)&&isFinite(e.phi))return fe.INFINITY;r.re=e.r*Math.cos(e.phi),r.im=e.r*Math.sin(e.phi)}else e.length===2?(r.re=e[0],r.im=e[1]):Co();break;case"string":r.im=r.re=0;const n=e.replace(/_/g,"").match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g);let a=1,i=0;n===null&&Co();for(let o=0;o<n.length;o++){const s=n[o];s===" "||s===" "||s===`
34
+ `||(s==="+"?a++:s==="-"?i++:s==="i"||s==="I"?(a+i===0&&Co(),n[o+1]!==" "&&!isNaN(n[o+1])?(r.im+=parseFloat((i%2?"-":"")+n[o+1]),o++):r.im+=parseFloat((i%2?"-":"")+"1"),a=i=0):((a+i===0||isNaN(s))&&Co(),n[o+1]==="i"||n[o+1]==="I"?(r.im+=parseFloat((i%2?"-":"")+s),o++):r.re+=parseFloat((i%2?"-":"")+s),a=i=0))}a+i>0&&Co();break;case"number":r.im=0,r.re=e;break;default:Co()}return isNaN(r.re)||isNaN(r.im),r};function fe(e,t){if(!(this instanceof fe))return new fe(e,t);const r=Ii(e,t);this.re=r.re,this.im=r.im}fe.prototype={re:0,im:0,sign:function(){const e=Of(this.re,this.im);return new fe(this.re/e,this.im/e)},add:function(e,t){const r=Ii(e,t),n=this.isInfinite(),a=!(isFinite(r.re)&&isFinite(r.im));return n||a?n&&a?fe.NAN:fe.INFINITY:new fe(this.re+r.re,this.im+r.im)},sub:function(e,t){const r=Ii(e,t),n=this.isInfinite(),a=!(isFinite(r.re)&&isFinite(r.im));return n||a?n&&a?fe.NAN:fe.INFINITY:new fe(this.re-r.re,this.im-r.im)},mul:function(e,t){const r=Ii(e,t),n=this.isInfinite(),a=!(isFinite(r.re)&&isFinite(r.im)),i=this.re===0&&this.im===0,o=r.re===0&&r.im===0;return n&&o||a&&i?fe.NAN:n||a?fe.INFINITY:r.im===0&&this.im===0?new fe(this.re*r.re,0):new fe(this.re*r.re-this.im*r.im,this.re*r.im+this.im*r.re)},div:function(e,t){const r=Ii(e,t),n=this.isInfinite(),a=!(isFinite(r.re)&&isFinite(r.im)),i=this.re===0&&this.im===0,o=r.re===0&&r.im===0;if(i&&o||n&&a)return fe.NAN;if(o||n)return fe.INFINITY;if(i||a)return fe.ZERO;if(r.im===0)return new fe(this.re/r.re,this.im/r.re);if(Math.abs(r.re)<Math.abs(r.im)){const s=r.re/r.im,u=r.re*s+r.im;return new fe((this.re*s+this.im)/u,(this.im*s-this.re)/u)}else{const s=r.im/r.re,u=r.im*s+r.re;return new fe((this.re+this.im*s)/u,(this.im-this.re*s)/u)}},pow:function(e,t){const r=Ii(e,t),n=this.re===0&&this.im===0;if(r.re===0&&r.im===0)return fe.ONE;if(r.im===0){if(this.im===0&&this.re>0)return new fe(Math.pow(this.re,r.re),0);if(this.re===0)switch((r.re%4+4)%4){case 0:return new fe(Math.pow(this.im,r.re),0);case 1:return new fe(0,Math.pow(this.im,r.re));case 2:return new fe(-Math.pow(this.im,r.re),0);case 3:return new fe(0,-Math.pow(this.im,r.re))}}if(n&&r.re>0)return fe.ZERO;const i=Math.atan2(this.im,this.re),o=Bf(this.re,this.im);let s=Math.exp(r.re*o-r.im*i),u=r.im*o+r.re*i;return new fe(s*Math.cos(u),s*Math.sin(u))},sqrt:function(){const e=this.re,t=this.im;if(t===0)return e>=0?new fe(Math.sqrt(e),0):new fe(0,Math.sqrt(-e));const r=Of(e,t);let n=Math.sqrt(.5*(r+Math.abs(e))),a=Math.abs(t)/(2*n);return e>=0?new fe(n,t<0?-a:a):new fe(a,t<0?-n:n)},exp:function(){const e=Math.exp(this.re);return this.im===0?new fe(e,0):new fe(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){const e=this.re,t=this.im;return new fe(Math.expm1(e)*Math.cos(t)+D8(t),Math.exp(e)*Math.sin(t))},log:function(){const e=this.re,t=this.im;return t===0&&e>0?new fe(Math.log(e),0):new fe(Bf(e,t),Math.atan2(t,e))},abs:function(){return Of(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){const e=this.re,t=this.im;return new fe(Math.sin(e)*Br(t),Math.cos(e)*Cn(t))},cos:function(){const e=this.re,t=this.im;return new fe(Math.cos(e)*Br(t),-Math.sin(e)*Cn(t))},tan:function(){const e=2*this.re,t=2*this.im,r=Math.cos(e)+Br(t);return new fe(Math.sin(e)/r,Cn(t)/r)},cot:function(){const e=2*this.re,t=2*this.im,r=Math.cos(e)-Br(t);return new fe(-Math.sin(e)/r,Cn(t)/r)},sec:function(){const e=this.re,t=this.im,r=.5*Br(2*t)+.5*Math.cos(2*e);return new fe(Math.cos(e)*Br(t)/r,Math.sin(e)*Cn(t)/r)},csc:function(){const e=this.re,t=this.im,r=.5*Br(2*t)-.5*Math.cos(2*e);return new fe(Math.sin(e)*Br(t)/r,-Math.cos(e)*Cn(t)/r)},asin:function(){const e=this.re,t=this.im,r=new fe(t*t-e*e+1,-2*e*t).sqrt(),n=new fe(r.re-t,r.im+e).log();return new fe(n.im,-n.re)},acos:function(){const e=this.re,t=this.im,r=new fe(t*t-e*e+1,-2*e*t).sqrt(),n=new fe(r.re-t,r.im+e).log();return new fe(Math.PI/2-n.im,n.re)},atan:function(){const e=this.re,t=this.im;if(e===0){if(t===1)return new fe(0,1/0);if(t===-1)return new fe(0,-1/0)}const r=e*e+(1-t)*(1-t),n=new fe((1-t*t-e*e)/r,-2*e/r).log();return new fe(-.5*n.im,.5*n.re)},acot:function(){const e=this.re,t=this.im;if(t===0)return new fe(Math.atan2(1,e),0);const r=e*e+t*t;return r!==0?new fe(e/r,-t/r).atan():new fe(e!==0?e/0:0,t!==0?-t/0:0).atan()},asec:function(){const e=this.re,t=this.im;if(e===0&&t===0)return new fe(0,1/0);const r=e*e+t*t;return r!==0?new fe(e/r,-t/r).acos():new fe(e!==0?e/0:0,t!==0?-t/0:0).acos()},acsc:function(){const e=this.re,t=this.im;if(e===0&&t===0)return new fe(Math.PI/2,1/0);const r=e*e+t*t;return r!==0?new fe(e/r,-t/r).asin():new fe(e!==0?e/0:0,t!==0?-t/0:0).asin()},sinh:function(){const e=this.re,t=this.im;return new fe(Cn(e)*Math.cos(t),Br(e)*Math.sin(t))},cosh:function(){const e=this.re,t=this.im;return new fe(Br(e)*Math.cos(t),Cn(e)*Math.sin(t))},tanh:function(){const e=2*this.re,t=2*this.im,r=Br(e)+Math.cos(t);return new fe(Cn(e)/r,Math.sin(t)/r)},coth:function(){const e=2*this.re,t=2*this.im,r=Br(e)-Math.cos(t);return new fe(Cn(e)/r,-Math.sin(t)/r)},csch:function(){const e=this.re,t=this.im,r=Math.cos(2*t)-Br(2*e);return new fe(-2*Cn(e)*Math.cos(t)/r,2*Br(e)*Math.sin(t)/r)},sech:function(){const e=this.re,t=this.im,r=Math.cos(2*t)+Br(2*e);return new fe(2*Br(e)*Math.cos(t)/r,-2*Cn(e)*Math.sin(t)/r)},asinh:function(){let e=this.im;this.im=-this.re,this.re=e;const t=this.asin();return this.re=-this.im,this.im=e,e=t.re,t.re=-t.im,t.im=e,t},acosh:function(){const e=this.acos();if(e.im<=0){const t=e.re;e.re=-e.im,e.im=t}else{const t=e.im;e.im=-e.re,e.re=t}return e},atanh:function(){const e=this.re,t=this.im,r=e>1&&t===0,n=1-e,a=1+e,i=n*n+t*t,o=i!==0?new fe((a*n-t*t)/i,(t*n+a*t)/i):new fe(e!==-1?e/0:0,t!==0?t/0:0),s=o.re;return o.re=Bf(o.re,o.im)/2,o.im=Math.atan2(o.im,s)/2,r&&(o.im=-o.im),o},acoth:function(){const e=this.re,t=this.im;if(e===0&&t===0)return new fe(0,Math.PI/2);const r=e*e+t*t;return r!==0?new fe(e/r,-t/r).atanh():new fe(e!==0?e/0:0,t!==0?-t/0:0).atanh()},acsch:function(){const e=this.re,t=this.im;if(t===0)return new fe(e!==0?Math.log(e+Math.sqrt(e*e+1)):1/0,0);const r=e*e+t*t;return r!==0?new fe(e/r,-t/r).asinh():new fe(e!==0?e/0:0,t!==0?-t/0:0).asinh()},asech:function(){const e=this.re,t=this.im;if(this.isZero())return fe.INFINITY;const r=e*e+t*t;return r!==0?new fe(e/r,-t/r).acosh():new fe(e!==0?e/0:0,t!==0?-t/0:0).acosh()},inverse:function(){if(this.isZero())return fe.INFINITY;if(this.isInfinite())return fe.ZERO;const e=this.re,t=this.im,r=e*e+t*t;return new fe(e/r,-t/r)},conjugate:function(){return new fe(this.re,-this.im)},neg:function(){return new fe(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new fe(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new fe(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new fe(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){const r=Ii(e,t);return Math.abs(r.re-this.re)<=fe.EPSILON&&Math.abs(r.im-this.im)<=fe.EPSILON},clone:function(){return new fe(this.re,this.im)},toString:function(){let e=this.re,t=this.im,r="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(e)<fe.EPSILON&&(e=0),Math.abs(t)<fe.EPSILON&&(t=0),t===0?r+e:(e!==0?(r+=e,r+=" ",t<0?(t=-t,r+="-"):r+="+",r+=" "):t<0&&(t=-t,r+="-"),t!==1&&(r+=t),r+"i"))},toVector:function(){return[this.re,this.im]},valueOf:function(){return this.im===0?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return this.im===0&&this.re===0},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!this.isFinite()}};fe.ZERO=new fe(0,0);fe.ONE=new fe(1,0);fe.I=new fe(0,1);fe.PI=new fe(Math.PI,0);fe.E=new fe(Math.E,0);fe.INFINITY=new fe(1/0,1/0);fe.NAN=new fe(NaN,NaN);fe.EPSILON=1e-15;var A8="Complex",C8=[],E8=I(A8,C8,()=>(Object.defineProperty(fe,"name",{value:"Complex"}),fe.prototype.constructor=fe,fe.prototype.type="Complex",fe.prototype.isComplex=!0,fe.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},fe.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},fe.prototype.format=function(e){var t="",r=this.im,n=this.re,a=Ji(this.re,e),i=Ji(this.im,e),o=ze(e)?e:e?e.precision:null;if(o!==null){var s=Math.pow(10,-o);Math.abs(n/r)<s&&(n=0),Math.abs(r/n)<s&&(r=0)}return r===0?t=a:n===0?r===1?t="i":r===-1?t="-i":t=i+"i":r<0?r===-1?t=a+" - i":t=a+" - "+i.substring(1)+"i":r===1?t=a+" + i":t=a+" + "+i+"i",t},fe.fromPolar=function(e){switch(arguments.length){case 1:{var t=arguments[0];if(typeof t=="object")return fe(t);throw new TypeError("Input has to be an object with r and phi keys.")}case 2:{var r=arguments[0],n=arguments[1];if(ze(r)){if(dn(n)&&n.hasBase("ANGLE")&&(n=n.toNumber("rad")),ze(n))return new fe({r,phi:n});throw new TypeError("Phi is not a number nor an angle unit.")}else throw new TypeError("Radius r is not a number.")}default:throw new SyntaxError("Wrong number of arguments in function fromPolar")}},fe.prototype.valueOf=fe.prototype.toString,fe.fromJSON=function(e){return new fe(e)},fe.compare=function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0},fe),{isClass:!0});typeof BigInt>"u"&&(BigInt=function(e){if(isNaN(e))throw new Error("");return e});const $e=BigInt(0),st=BigInt(1),br=BigInt(2),Bs=BigInt(3),Io=BigInt(5),nn=BigInt(10);BigInt(Number.MAX_SAFE_INTEGER);const S8=2e3,Se={s:st,n:$e,d:st};function Na(e,t){try{e=BigInt(e)}catch{throw Za()}return e*t}function Hn(e){return typeof e=="bigint"?e:Math.floor(e)}function Gt(e,t){if(t===$e)throw Nd();const r=Object.create(Mn.prototype);r.s=e<$e?-st:st,e=e<$e?-e:e;const n=ji(e,t);return r.n=e/n,r.d=t/n,r}const M8=[br*br,br,br*br,br,br*br,br*Bs,br,br*Bs];function Eo(e){const t=Object.create(null);if(e<=st)return t[e]=st,t;const r=n=>{t[n]=(t[n]||$e)+st};for(;e%br===$e;)r(br),e/=br;for(;e%Bs===$e;)r(Bs),e/=Bs;for(;e%Io===$e;)r(Io),e/=Io;for(let n=0,a=br+Io;a*a<=e;){for(;e%a===$e;)r(a),e/=a;a+=M8[n],n=n+1&7}return e>st&&r(e),t}const yr=function(e,t){let r=$e,n=st,a=st;if(e!=null)if(t!==void 0){if(typeof e=="bigint")r=e;else{if(isNaN(e))throw Za();if(e%1!==0)throw r0();r=BigInt(e)}if(typeof t=="bigint")n=t;else{if(isNaN(t))throw Za();if(t%1!==0)throw r0();n=BigInt(t)}a=r*n}else if(typeof e=="object"){if("d"in e&&"n"in e)r=BigInt(e.n),n=BigInt(e.d),"s"in e&&(r*=BigInt(e.s));else if(0 in e)r=BigInt(e[0]),1 in e&&(n=BigInt(e[1]));else if(typeof e=="bigint")r=e;else throw Za();a=r*n}else if(typeof e=="number"){if(isNaN(e))throw Za();if(e<0&&(a=-st,e=-e),e%1===0)r=BigInt(e);else{let i=1,o=0,s=1,u=1,l=1,c=1e7;for(e>=1&&(i=10**Math.floor(1+Math.log10(e)),e/=i);s<=c&&l<=c;){let f=(o+u)/(s+l);if(e===f){s+l<=c?(r=o+u,n=s+l):l>s?(r=u,n=l):(r=o,n=s);break}else e>f?(o+=u,s+=l):(u+=o,l+=s),s>c?(r=u,n=l):(r=o,n=s)}r=BigInt(r)*BigInt(i),n=BigInt(n)}}else if(typeof e=="string"){let i=0,o=$e,s=$e,u=$e,l=st,c=st,f=e.replace(/_/g,"").match(/\d+|./g);if(f===null)throw Za();if(f[i]==="-"?(a=-st,i++):f[i]==="+"&&i++,f.length===i+1?s=Na(f[i++],a):f[i+1]==="."||f[i]==="."?(f[i]!=="."&&(o=Na(f[i++],a)),i++,(i+1===f.length||f[i+1]==="("&&f[i+3]===")"||f[i+1]==="'"&&f[i+3]==="'")&&(s=Na(f[i],a),l=nn**BigInt(f[i].length),i++),(f[i]==="("&&f[i+2]===")"||f[i]==="'"&&f[i+2]==="'")&&(u=Na(f[i+1],a),c=nn**BigInt(f[i+1].length)-st,i+=3)):f[i+1]==="/"||f[i+1]===":"?(s=Na(f[i],a),l=Na(f[i+2],st),i+=3):f[i+3]==="/"&&f[i+1]===" "&&(o=Na(f[i],a),s=Na(f[i+2],a),l=Na(f[i+4],st),i+=5),f.length<=i)n=l*c,a=r=u+n*o+c*s;else throw Za()}else if(typeof e=="bigint")r=e,a=e,n=st;else throw Za();if(n===$e)throw Nd();Se.s=a<$e?-st:st,Se.n=r<$e?-r:r,Se.d=n<$e?-n:n};function T8(e,t,r){let n=st;for(;t>$e;e=e*e%r,t>>=st)t&st&&(n=n*e%r);return n}function F8(e,t){for(;t%br===$e;t/=br);for(;t%Io===$e;t/=Io);if(t===st)return $e;let r=nn%t,n=1;for(;r!==st;n++)if(r=r*nn%t,n>S8)return $e;return BigInt(n)}function P8(e,t,r){let n=st,a=T8(nn,r,t);for(let i=0;i<300;i++){if(n===a)return BigInt(i);n=n*nn%t,a=a*nn%t}return 0}function ji(e,t){if(!e)return t;if(!t)return e;for(;;){if(e%=t,!e)return t;if(t%=e,!t)return e}}function Mn(e,t){if(yr(e,t),this instanceof Mn)e=ji(Se.d,Se.n),this.s=Se.s,this.n=Se.n/e,this.d=Se.d/e;else return Gt(Se.s*Se.n,Se.d)}const Nd=function(){return new Error("Division by Zero")},Za=function(){return new Error("Invalid argument")},r0=function(){return new Error("Parameters must be integer")};Mn.prototype={s:st,n:$e,d:st,abs:function(){return Gt(this.n,this.d)},neg:function(){return Gt(-this.s*this.n,this.d)},add:function(e,t){return yr(e,t),Gt(this.s*this.n*Se.d+Se.s*this.d*Se.n,this.d*Se.d)},sub:function(e,t){return yr(e,t),Gt(this.s*this.n*Se.d-Se.s*this.d*Se.n,this.d*Se.d)},mul:function(e,t){return yr(e,t),Gt(this.s*Se.s*this.n*Se.n,this.d*Se.d)},div:function(e,t){return yr(e,t),Gt(this.s*Se.s*this.n*Se.d,this.d*Se.n)},clone:function(){return Gt(this.s*this.n,this.d)},mod:function(e,t){if(e===void 0)return Gt(this.s*this.n%this.d,st);if(yr(e,t),$e===Se.n*this.d)throw Nd();return Gt(this.s*(Se.d*this.n)%(Se.n*this.d),Se.d*this.d)},gcd:function(e,t){return yr(e,t),Gt(ji(Se.n,this.n)*ji(Se.d,this.d),Se.d*this.d)},lcm:function(e,t){return yr(e,t),Se.n===$e&&this.n===$e?Gt($e,st):Gt(Se.n*this.n,ji(Se.n,this.n)*ji(Se.d,this.d))},inverse:function(){return Gt(this.s*this.d,this.n)},pow:function(e,t){if(yr(e,t),Se.d===st)return Se.s<$e?Gt((this.s*this.d)**Se.n,this.n**Se.n):Gt((this.s*this.n)**Se.n,this.d**Se.n);if(this.s<$e)return null;let r=Eo(this.n),n=Eo(this.d),a=st,i=st;for(let o in r)if(o!=="1"){if(o==="0"){a=$e;break}if(r[o]*=Se.n,r[o]%Se.d===$e)r[o]/=Se.d;else return null;a*=BigInt(o)**r[o]}for(let o in n)if(o!=="1"){if(n[o]*=Se.n,n[o]%Se.d===$e)n[o]/=Se.d;else return null;i*=BigInt(o)**n[o]}return Se.s<$e?Gt(i,a):Gt(a,i)},log:function(e,t){if(yr(e,t),this.s<=$e||Se.s<=$e)return null;const r=Object.create(null),n=Eo(Se.n),a=Eo(Se.d),i=Eo(this.n),o=Eo(this.d);for(const l in a)n[l]=(n[l]||$e)-a[l];for(const l in o)i[l]=(i[l]||$e)-o[l];for(const l in n)l!=="1"&&(r[l]=!0);for(const l in i)l!=="1"&&(r[l]=!0);let s=null,u=null;for(const l in r){const c=n[l]||$e,f=i[l]||$e;if(c===$e){if(f!==$e)return null;continue}let m=f,d=c;const h=ji(m,d);if(m/=h,d/=h,s===null&&u===null)s=m,u=d;else if(m*u!==s*d)return null}return s!==null&&u!==null?Gt(s,u):null},equals:function(e,t){return yr(e,t),this.s*this.n*Se.d===Se.s*Se.n*this.d},lt:function(e,t){return yr(e,t),this.s*this.n*Se.d<Se.s*Se.n*this.d},lte:function(e,t){return yr(e,t),this.s*this.n*Se.d<=Se.s*Se.n*this.d},gt:function(e,t){return yr(e,t),this.s*this.n*Se.d>Se.s*Se.n*this.d},gte:function(e,t){return yr(e,t),this.s*this.n*Se.d>=Se.s*Se.n*this.d},compare:function(e,t){yr(e,t);let r=this.s*this.n*Se.d-Se.s*Se.n*this.d;return($e<r)-(r<$e)},ceil:function(e){return e=nn**BigInt(e||0),Gt(Hn(this.s*e*this.n/this.d)+(e*this.n%this.d>$e&&this.s>=$e?st:$e),e)},floor:function(e){return e=nn**BigInt(e||0),Gt(Hn(this.s*e*this.n/this.d)-(e*this.n%this.d>$e&&this.s<$e?st:$e),e)},round:function(e){return e=nn**BigInt(e||0),Gt(Hn(this.s*e*this.n/this.d)+this.s*((this.s>=$e?st:$e)+br*(e*this.n%this.d)>this.d?st:$e),e)},roundTo:function(e,t){yr(e,t);const r=this.n*Se.d,n=this.d*Se.n,a=r%n;let i=Hn(r/n);return a+a>=n&&i++,Gt(this.s*i*Se.n,Se.d)},divisible:function(e,t){return yr(e,t),Se.n===$e?!1:this.n*Se.d%(Se.n*this.d)===$e},valueOf:function(){return Number(this.s*this.n)/Number(this.d)},toString:function(e=15){let t=this.n,r=this.d,n=F8(t,r),a=P8(t,r,n),i=this.s<$e?"-":"";if(i+=Hn(t/r),t%=r,t*=nn,t&&(i+="."),n){for(let o=a;o--;)i+=Hn(t/r),t%=r,t*=nn;i+="(";for(let o=n;o--;)i+=Hn(t/r),t%=r,t*=nn;i+=")"}else for(let o=e;t&&o--;)i+=Hn(t/r),t%=r,t*=nn;return i},toFraction:function(e=!1){let t=this.n,r=this.d,n=this.s<$e?"-":"";if(r===st)n+=t;else{const a=Hn(t/r);e&&a>$e&&(n+=a,n+=" ",t%=r),n+=t,n+="/",n+=r}return n},toLatex:function(e=!1){let t=this.n,r=this.d,n=this.s<$e?"-":"";if(r===st)n+=t;else{const a=Hn(t/r);e&&a>$e&&(n+=a,t%=r),n+="\\frac{",n+=t,n+="}{",n+=r,n+="}"}return n},toContinued:function(){let e=this.n,t=this.d;const r=[];for(;t;){r.push(Hn(e/t));const n=e%t;e=t,t=n}return r},simplify:function(e=.001){const t=BigInt(Math.ceil(1/e)),r=this.abs(),n=r.toContinued();for(let a=1;a<n.length;a++){let i=Gt(n[a-1],st);for(let s=a-2;s>=0;s--)i=i.inverse().add(n[s]);let o=i.sub(r);if(o.n*t<o.d)return i.mul(this.s)}return this}};var k8="Fraction",O8=[],B8=I(k8,O8,()=>(Object.defineProperty(Mn,"name",{value:"Fraction"}),Mn.prototype.constructor=Mn,Mn.prototype.type="Fraction",Mn.prototype.isFraction=!0,Mn.prototype.toJSON=function(){return{mathjs:"Fraction",n:String(this.s*this.n),d:String(this.d)}},Mn.fromJSON=function(e){return new Mn(e)},Mn),{isClass:!0}),$8="Range",_8=[],I8=I($8,_8,()=>{function e(t,r,n){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");var a=t!=null,i=r!=null,o=n!=null;if(a){if(Ze(t))t=t.toNumber();else if(typeof t!="number"&&!Os(t))throw new TypeError("Parameter start must be a number or bigint")}if(i){if(Ze(r))r=r.toNumber();else if(typeof r!="number"&&!Os(r))throw new TypeError("Parameter end must be a number or bigint")}if(o){if(Ze(n))n=n.toNumber();else if(typeof n!="number"&&!Os(n))throw new TypeError("Parameter step must be a number or bigint")}if(this.start=a?parseFloat(t):0,this.end=i?parseFloat(r):0,this.step=o?parseFloat(n):1,o&&Ar(this.step,0))throw new Error("Step must not be zero")}return e.prototype.type="Range",e.prototype.isRange=!0,e.parse=function(t){if(typeof t!="string")return null;var r=t.split(":"),n=r.map(function(i){return parseFloat(i)}),a=n.some(function(i){return isNaN(i)});if(a)return null;switch(n.length){case 2:return new e(n[0],n[1]);case 3:return new e(n[0],n[2],n[1]);default:return null}},e.prototype.clone=function(){return new e(this.start,this.end,this.step)},e.prototype.size=function(){var t=0,r=this.start,n=this.step,a=this.end,i=a-r;return ai(n)===ai(i)?t=Math.ceil(i/n):i===0&&(t=0),isNaN(t)&&(t=0),[t]},e.prototype.min=function(){var t=this.size()[0];if(t>0)return this.step>0?this.start:this.start+(t-1)*this.step},e.prototype.max=function(){var t=this.size()[0];if(t>0)return this.step>0?this.start+(t-1)*this.step:this.start},e.prototype.forEach=function(t){var r=this.start,n=this.step,a=this.end,i=0;if(n>0)for(;r<a;)t(r,[i],this),r+=n,i++;else if(n<0)for(;r>a;)t(r,[i],this),r+=n,i++},e.prototype.map=function(t){var r=[];return this.forEach(function(n,a,i){r[a[0]]=t(n,a,i)}),r},e.prototype.toArray=function(){var t=[];return this.forEach(function(r,n){t[n[0]]=r}),t},e.prototype.valueOf=function(){return this.toArray()},e.prototype.format=function(t){var r=Ji(this.start,t);return this.step!==1&&(r+=":"+Ji(this.step,t)),r+=":"+Ji(this.end,t),r},e.prototype.toString=function(){return this.format()},e.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},e.fromJSON=function(t){return new e(t.start,t.end,t.step)},e},{isClass:!0}),z8="Matrix",j8=[],q8=I(z8,j8,()=>{function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(t,r){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(t,r,n){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(t){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(t,r,n){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(t,r){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(t,r){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(t,r){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(t){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(t){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0});function $f(e,t,r){var n=e.constructor,a=new n(2),i="";if(r){if(r<1)throw new Error("size must be in greater than 0");if(!ke(r))throw new Error("size must be an integer");if(e.greaterThan(a.pow(r-1).sub(1))||e.lessThan(a.pow(r-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(r-1,", 2^").concat(r-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(a.pow(r))),i="i".concat(r)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw new Error("Base ".concat(t," not supported "))}}function R8(e,t){if(typeof t=="function")return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var{notation:r,precision:n,wordSize:a}=ox(t);switch(r){case"fixed":return H8(e,n);case"exponential":return n0(e,n);case"engineering":return L8(e,n);case"bin":return $f(e,2,a);case"oct":return $f(e,8,a);case"hex":return $f(e,16,a);case"auto":{var i=a0(t?.lowerExp,-3),o=a0(t?.upperExp,5);if(e.isZero())return"0";var s,u=e.toSignificantDigits(n),l=u.e;return l>=i&&l<o?s=u.toFixed():s=n0(e,n),s.replace(/((\.\d*?)(0+))($|e)/,function(){var c=arguments[2],f=arguments[4];return c!=="."?c+f:f})}default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function L8(e,t){var r=e.e,n=r%3===0?r:r<0?r-3-r%3:r-r%3,a=e.mul(Math.pow(10,-n)),i=a.toPrecision(t);if(i.includes("e")){var o=e.constructor;i=new o(i).toFixed()}return i+"e"+(r>=0?"+":"")+n.toString()}function n0(e,t){return t!==void 0?e.toExponential(t-1):e.toExponential()}function H8(e,t){return e.toFixed(t)}function a0(e,t){return ze(e)?e:Ze(e)?e.toNumber():t}function G8(e,t){var r=e.length-t.length,n=e.length;return e.substring(r,n)===t}function at(e,t){var r=V8(e,t);return t&&typeof t=="object"&&"truncate"in t&&r.length>t.truncate?r.substring(0,t.truncate-3)+"...":r}function V8(e,t){if(typeof e=="number")return Ji(e,t);if(Ze(e))return R8(e,t);if(U8(e))return!t||t.fraction!=="decimal"?"".concat(e.s*e.n,"/").concat(e.d):e.toString();if(Array.isArray(e))return xx(e,t);if(Yt(e))return zo(e);if(typeof e=="function")return e.syntax?String(e.syntax):"function";if(e&&typeof e=="object"){if(typeof e.format=="function")return e.format(t);if(e&&e.toString(t)!=={}.toString())return e.toString(t);var r=Object.keys(e).map(n=>zo(n)+": "+at(e[n],t));return"{"+r.join(", ")+"}"}return String(e)}function zo(e){for(var t=String(e),r="",n=0;n<t.length;){var a=t.charAt(n);r+=a in i0?i0[a]:a,n++}return'"'+r+'"'}var i0={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"};function kn(e){var t=String(e);return t=t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),t}function xx(e,t){if(Array.isArray(e)){for(var r="[",n=e.length,a=0;a<n;a++)a!==0&&(r+=", "),r+=xx(e[a],t);return r+="]",r}else return at(e,t)}function U8(e){return e&&typeof e=="object"&&typeof e.s=="bigint"&&typeof e.n=="bigint"&&typeof e.d=="bigint"||!1}function zm(e,t){if(!Yt(e))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+Ft(e)+", index: 0)");if(!Yt(t))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+Ft(t)+", index: 1)");return e===t?0:e>t?1:-1}function nt(e,t,r){if(!(this instanceof nt))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=r,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=new Error().stack}nt.prototype=new RangeError;nt.prototype.constructor=RangeError;nt.prototype.name="DimensionError";nt.prototype.isDimensionError=!0;function Qn(e,t,r){if(!(this instanceof Qn))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=r),this.min!==void 0&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":this.max!==void 0&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}Qn.prototype=new RangeError;Qn.prototype.constructor=RangeError;Qn.prototype.name="IndexError";Qn.prototype.isIndexError=!0;function Ue(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function Dx(e,t,r){var n,a=e.length;if(a!==t[r])throw new nt(a,t[r]);if(r<t.length-1){var i=r+1;for(n=0;n<a;n++){var o=e[n];if(!Array.isArray(o))throw new nt(t.length-1,t.length,"<");Dx(e[n],t,i)}}else for(n=0;n<a;n++)if(Array.isArray(e[n]))throw new nt(t.length+1,t.length,">")}function o0(e,t){var r=t.length===0;if(r){if(Array.isArray(e))throw new nt(e.length,0)}else Dx(e,t,0)}function Jl(e,t){var r=e.isMatrix?e._size:Ue(e),n=t._sourceSize;n.forEach((a,i)=>{if(a!==null&&a!==r[i])throw new nt(a,r[i])})}function Bt(e,t){if(e!==void 0){if(!ze(e)||!ke(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof t=="number"&&e>=t)throw new Qn(e,t)}}function Wo(e){for(var t=0;t<e._dimensions.length;++t){var r=e._dimensions[t];if(r._data&&Mt(r._data)){if(r._size[0]===0)return!0}else if(r.isRange){if(r.start===r.end)return!0}else if(Yt(r)&&r.length===0)return!0}return!1}function Jo(e,t,r){if(!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new Error("Resizing to scalar is not supported");t.forEach(function(a){if(!ze(a)||!ke(a)||a<0)throw new TypeError("Invalid size, must contain positive integers (size: "+at(t)+")")}),(ze(e)||Ze(e))&&(e=[e]);var n=r!==void 0?r:0;return jm(e,t,0,n),e}function jm(e,t,r,n){var a,i,o=e.length,s=t[r],u=Math.min(o,s);if(e.length=s,r<t.length-1){var l=r+1;for(a=0;a<u;a++)i=e[a],Array.isArray(i)||(i=[i],e[a]=i),jm(i,t,l,n);for(a=u;a<s;a++)i=[],e[a]=i,jm(i,t,l,n)}else{for(a=0;a<u;a++)for(;Array.isArray(e[a]);)e[a]=e[a][0];for(a=u;a<s;a++)e[a]=n}}function Ad(e,t){var r=mt(e,!0),n=r.length;if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new nt(0,n,"!=");t=Cd(t,n);var a=Nx(t);if(n!==a)throw new nt(a,n,"!=");try{return W8(r,t)}catch(i){throw i instanceof nt?new nt(a,n,"!="):i}}function Cd(e,t){var r=Nx(e),n=e.slice(),a=-1,i=e.indexOf(a),o=e.indexOf(a,i+1)>=0;if(o)throw new Error("More than one wildcard in sizes");var s=i>=0,u=t%r===0;if(s)if(u)n[i]=-t/r;else throw new Error("Could not replace wildcard, since "+t+" is no multiple of "+-r);return n}function Nx(e){return e.reduce((t,r)=>t*r,1)}function W8(e,t){for(var r=e,n,a=t.length-1;a>0;a--){var i=t[a];n=[];for(var o=r.length/i,s=0;s<o;s++)n.push(r.slice(s*i,(s+1)*i));r=n}return r}function Kl(e,t){for(var r=Ue(e);Array.isArray(e)&&e.length===1;)e=e[0],r.shift();for(var n=r.length;r[n-1]===1;)n--;return n<r.length&&(e=Ax(e,n,0),r.length=n),e}function Ax(e,t,r){var n,a;if(r<t){var i=r+1;for(n=0,a=e.length;n<a;n++)e[n]=Ax(e[n],t,i)}else for(;Array.isArray(e);)e=e[0];return e}function Cx(e,t,r,n){var a=n||Ue(e);if(r)for(var i=0;i<r;i++)e=[e],a.unshift(1);for(e=Ex(e,t,0);a.length<t;)a.push(1);return e}function Ex(e,t,r){var n,a;if(Array.isArray(e)){var i=r+1;for(n=0,a=e.length;n<a;n++)e[n]=Ex(e[n],t,i)}else for(var o=r;o<t;o++)e=[e];return e}function mt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!Array.isArray(e))return e;if(typeof t!="boolean")throw new TypeError("Boolean expected for second argument of flatten");var r=[];return t?a(e):n(e),r;function n(i){for(var o=0;o<i.length;o++){var s=i[o];Array.isArray(s)?n(s):r.push(s)}}function a(i){if(Array.isArray(i[0]))for(var o=0;o<i.length;o++)a(i[o]);else for(var s=0;s<i.length;s++)r.push(i[s])}}function ui(e,t){return Array.prototype.map.call(e,t)}function Sx(e,t){Array.prototype.forEach.call(e,t)}function s0(e,t){if(Ue(e).length!==1)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,t)}function u0(e,t){if(Ue(e).length!==1)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,r=>t.test(r))}function l0(e,t){return Array.prototype.join.call(e,t)}function Ko(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(e.length===0)return e;var t=[],r=0;t[0]={value:e[0],identifier:0};for(var n=1;n<e.length;n++)e[n]===e[n-1]?r++:r=0,t.push({value:e[n],identifier:r});return t}function Yl(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(e.length===0)return e;for(var t=[],r=0;r<e.length;r++)t.push(e[r].value);return t}function Sc(e,t){for(var r,n=0,a=0;a<e.length;a++){var i=e[a],o=Array.isArray(i);if(a===0&&o&&(n=i.length),o&&i.length!==n)return;var s=o?Sc(i,t):t(i);if(r===void 0)r=s;else if(r!==s)return"mixed"}return r}function Mx(e,t,r,n){if(n<r){if(e.length!==t.length)throw new nt(e.length,t.length);for(var a=[],i=0;i<e.length;i++)a[i]=Mx(e[i],t[i],r,n+1);return a}else return e.concat(t)}function Tx(){var e=Array.prototype.slice.call(arguments,0,-1),t=Array.prototype.slice.call(arguments,-1);if(e.length===1)return e[0];if(e.length>1)return e.slice(1).reduce(function(r,n){return Mx(r,n,t,0)},e[0]);throw new Error("Wrong number of arguments in function concat")}function Zl(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n=t.map(m=>m.length),a=Math.max(...n),i=new Array(a).fill(null),o=0;o<t.length;o++)for(var s=t[o],u=n[o],l=0;l<u;l++){var c=a-u+l;s[l]>i[c]&&(i[c]=s[l])}for(var f=0;f<t.length;f++)Fx(t[f],i);return i}function Fx(e,t){for(var r=t.length,n=e.length,a=0;a<n;a++){var i=r-n+a;if(e[a]<t[i]&&e[a]>1||e[a]>t[i])throw new Error("shape mismatch: mismatch is found in arg with shape (".concat(e,") not possible to broadcast dimension ").concat(n," with size ").concat(e[a]," to size ").concat(t[i]))}}function Ui(e,t){var r=Ue(e);if(La(r,t))return e;Fx(r,t);var n=Zl(r,t),a=n.length,i=[...Array(a-r.length).fill(1),...r],o=K8(e);r.length<a&&(o=Ad(o,i),r=Ue(o));for(var s=0;s<a;s++)r[s]<n[s]&&(o=J8(o,n[s],s),r=Ue(o));return o}function J8(e,t,r){return Tx(...Array(t).fill(e),r)}function Ql(e,t){if(!Array.isArray(e))throw new Error("Array expected");var r=Ue(e);if(t.length!==r.length)throw new nt(t.length,r.length);for(var n=0;n<t.length;n++)Bt(t[n],r[n]);return t.reduce((a,i)=>a[i],e)}function qm(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(e.length===0)return[];if(r)return i(e);var n=[];return a(e,0);function a(o,s){if(Array.isArray(o)){for(var u=o.length,l=Array(u),c=0;c<u;c++)n[s]=c,l[c]=a(o[c],s+1);return l}else return t(o,n.slice(0,s),e)}function i(o){if(Array.isArray(o)){for(var s=o.length,u=Array(s),l=0;l<s;l++)u[l]=i(o[l]);return u}else return t(o)}}function Px(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(e.length===0)return;if(r){i(e);return}var n=[];a(e,0);function a(o,s){if(Array.isArray(o))for(var u=o.length,l=0;l<u;l++)n[s]=l,a(o[l],s+1);else t(o,n.slice(0,s),e)}function i(o){if(Array.isArray(o))for(var s=o.length,u=0;u<s;u++)i(o[u]);else t(o)}}function K8(e){return er([],e)}function Xi(e,t,r,n){if(Gl.isTypedFunction(e)){var a;if(n)a=1;else{var i=t.isMatrix?t.size():Ue(t),o=i.length?i[i.length-1]===0:!0;if(o)return{isUnary:n,fn:e};var s=i.map(()=>0),u=t.isMatrix?t.get(s):Ql(t,s);a=Q8(e,u,s,t)}var l;if(t.isMatrix&&t.dataType!=="mixed"&&t.dataType!==void 0){var c=Y8(e,a);l=c!==void 0?c:e}else l=e;return a>=1&&a<=3?{isUnary:a===1,fn:function(){for(var m=arguments.length,d=new Array(m),h=0;h<m;h++)d[h]=arguments[h];return c0(l,d.slice(0,a),r,e.name)}}:{isUnary:!1,fn:function(){for(var m=arguments.length,d=new Array(m),h=0;h<m;h++)d[h]=arguments[h];return c0(l,d,r,e.name)}}}return n===void 0?{isUnary:Z8(e),fn:e}:{isUnary:n,fn:e}}function Y8(e,t){var r=[];if(Object.entries(e.signatures).forEach(n=>{var[a,i]=n;a.split(",").length===t&&r.push(i)}),r.length===1)return r[0]}function Z8(e){if(e.length!==1)return!1;var t=e.toString();if(/arguments/.test(t))return!1;var r=t.match(/\(.*?\)/);return!/\.\.\./.test(r)}function Q8(e,t,r,n){for(var a=[t,r,n],i=3;i>0;i--){var o=a.slice(0,i);if(Gl.resolve(e,o)!==null)return i}}function c0(e,t,r,n){try{return e(...t)}catch(a){X8(a,t,r,n)}}function X8(e,t,r,n){var a;if(e instanceof TypeError&&((a=e.data)===null||a===void 0?void 0:a.category)==="wrongType"){var i=[];throw i.push("value: ".concat(Ft(t[0]))),t.length>=2&&i.push("index: ".concat(Ft(t[1]))),t.length>=3&&i.push("array: ".concat(Ft(t[2]))),new TypeError("Function ".concat(r," cannot apply callback arguments ")+"".concat(n,"(").concat(i.join(", "),") at index ").concat(JSON.stringify(t[1])))}else throw new TypeError("Function ".concat(r," cannot apply callback arguments ")+"to function ".concat(n,": ").concat(e.message))}var eI="DenseMatrix",tI=["Matrix","config"],rI=I(eI,tI,e=>{var{Matrix:t,config:r}=e;function n(f,m){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(m&&!Yt(m))throw new Error("Invalid datatype: "+m);if(Re(f))f.type==="DenseMatrix"?(this._data=Ve(f._data),this._size=Ve(f._size),this._datatype=m||f._datatype):(this._data=f.toArray(),this._size=f.size(),this._datatype=m||f._datatype);else if(f&&Mt(f.data)&&Mt(f.size))this._data=f.data,this._size=f.size,o0(this._data,this._size),this._datatype=m||f.datatype;else if(Mt(f))this._data=c(f),this._size=Ue(this._data),o0(this._data,this._size),this._datatype=m;else{if(f)throw new TypeError("Unsupported type of data ("+Ft(f)+")");this._data=[],this._size=[0],this._datatype=m}}n.prototype=new t,n.prototype.createDenseMatrix=function(f,m){return new n(f,m)},Object.defineProperty(n,"name",{value:"DenseMatrix"}),n.prototype.constructor=n,n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return Sc(this._data,Ft)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(f,m){return new n(f,m)},n.prototype.subset=function(f,m,d){switch(arguments.length){case 1:return a(this,f);case 2:case 3:return o(this,f,m,d);default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.get=function(f){return Ql(this._data,f)},n.prototype.set=function(f,m,d){if(!Mt(f))throw new TypeError("Array expected");if(f.length<this._size.length)throw new nt(f.length,this._size.length,"<");var h,p,y,w=f.map(function(v){return v+1});l(this,w,d);var D=this._data;for(h=0,p=f.length-1;h<p;h++)y=f[h],Bt(y,D.length),D=D[y];return y=f[f.length-1],Bt(y,D.length),D[y]=m,this};function a(f,m){if(!wc(m))throw new TypeError("Invalid index");var d=r.legacySubset?m.size().every(g=>g===1):m.isScalar();if(d)return f.get(m.min());var h=m.size();if(h.length!==f._size.length)throw new nt(h.length,f._size.length);for(var p=m.min(),y=m.max(),w=0,D=f._size.length;w<D;w++)Bt(p[w],f._size[w]),Bt(y[w],f._size[w]);var v=new n,x=i(f._data,m);return v._size=x.size,v._datatype=f._datatype,v._data=x.data,r.legacySubset?v.reshape(m.size()):v}function i(f,m){var d=m.size().length-1,h=Array(d);return{data:p(f),size:h.filter(y=>y!==null)};function p(y){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=m.dimension(w);function v(x,g){return ze(x)?g(x):x.map(g).valueOf()}return ze(D)?h[w]=null:h[w]=D.size()[0],w<d?v(D,x=>(Bt(x,y.length),p(y[x],w+1))):v(D,x=>(Bt(x,y.length),y[x]))}}function o(f,m,d,h){if(!m||m.isIndex!==!0)throw new TypeError("Invalid index");var p=m.size(),y=m.isScalar(),w;if(Re(d)?(w=d.size(),d=d.valueOf()):w=Ue(d),y){if(w.length!==0)throw new TypeError("Scalar expected");f.set(m.min(),d,h)}else{if(!La(w,p)){if(w.length===0)d=Ui([d],p);else try{d=Ui(d,p)}catch{}w=Ue(d)}if(p.length<f._size.length)throw new nt(p.length,f._size.length,"<");if(w.length<p.length){for(var D=0,v=0;p[D]===1&&w[D]===1;)D++;for(;p[D]===1;)v++,D++;d=Cx(d,p.length,v,w)}if(!La(p,w))throw new nt(p,w,">");var x=m.max().map(function(g){return g+1});l(f,x,h),s(f._data,m,d)}return f}function s(f,m,d){var h=m.size().length-1;p(f,d);function p(y,w){var D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,v=m.dimension(D),x=(b,C)=>{Bt(b,y.length),p(y[b],w[C[0]],D+1)},g=(b,C)=>{Bt(b,y.length),y[b]=w[C[0]]};D<h?ze(v)?x(v,[0]):v.forEach(x):ze(v)?g(v,[0]):v.forEach(g)}}n.prototype.resize=function(f,m,d){if(!gn(f))throw new TypeError("Array or Matrix expected");var h=f.valueOf().map(y=>Array.isArray(y)&&y.length===1?y[0]:y),p=d?this.clone():this;return u(p,h,m)};function u(f,m,d){if(m.length===0){for(var h=f._data;Mt(h);)h=h[0];return h}return f._size=m.slice(0),f._data=Jo(f._data,f._size,d),f}n.prototype.reshape=function(f,m){var d=m?this.clone():this;d._data=Ad(d._data,f);var h=d._size.reduce((p,y)=>p*y);return d._size=Cd(f,h),d};function l(f,m,d){for(var h=f._size.slice(0),p=!1;h.length<m.length;)h.push(0),p=!0;for(var y=0,w=m.length;y<w;y++)m[y]>h[y]&&(h[y]=m[y],p=!0);p&&u(f,h,d)}n.prototype.clone=function(){var f=new n({data:Ve(this._data),size:Ve(this._size),datatype:this._datatype});return f},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(f){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=this,h=d._size.length-1;if(h<0)return d.clone();var p=Xi(f,d,"map",m),y=p.fn,w=d.create(void 0,d._datatype);if(w._size=d._size,m||p.isUnary)return w._data=C(d._data),w;if(h===0){for(var D=d.valueOf(),v=Array(D.length),x=0;x<D.length;x++)v[x]=y(D[x],[x],d);return w._data=v,w}var g=[];return w._data=b(d._data),w;function b(N){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,E=Array(N.length);if(A<h)for(var S=0;S<N.length;S++)g[A]=S,E[S]=b(N[S],A+1);else for(var F=0;F<N.length;F++)g[A]=F,E[F]=y(N[F],g.slice(),d);return E}function C(N){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,E=Array(N.length);if(A<h)for(var S=0;S<N.length;S++)E[S]=C(N[S],A+1);else for(var F=0;F<N.length;F++)E[F]=y(N[F]);return E}},n.prototype.forEach=function(f){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=this,h=d._size.length-1;if(h<0)return;var p=Xi(f,d,"map",m),y=p.fn;if(m||p.isUnary){x(d._data);return}if(h===0){for(var w=0;w<d._data.length;w++)y(d._data[w],[w],d);return}var D=[];v(d._data);function v(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(b<h)for(var C=0;C<g.length;C++)D[b]=C,v(g[C],b+1);else for(var N=0;N<g.length;N++)D[b]=N,y(g[N],D.slice(),d)}function x(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(b<h)for(var C=0;C<g.length;C++)x(g[C],b+1);else for(var N=0;N<g.length;N++)y(g[N])}},n.prototype[Symbol.iterator]=function*(){var f=this._size.length-1;if(!(f<0)){if(f===0){for(var m=0;m<this._data.length;m++)yield{value:this._data[m],index:[m]};return}for(var d=Array(f+1).fill(0),h=this._size.reduce((v,x)=>v*x,1),p=0;p<h;p++){for(var y=this._data,w=0;w<f;w++)y=y[d[w]];yield{value:y[d[f]],index:d.slice()};for(var D=f;D>=0&&(d[D]++,!(d[D]<this._size[D]));D--)d[D]=0}}},n.prototype.rows=function(){var f=[],m=this.size();if(m.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");var d=this._data;for(var h of d)f.push(new n([h],this._datatype));return f},n.prototype.columns=function(){var f=this,m=[],d=this.size();if(d.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");for(var h=this._data,p=function(D){var v=h.map(x=>[x[D]]);m.push(new n(v,f._datatype))},y=0;y<d[1];y++)p(y);return m},n.prototype.toArray=function(){return Ve(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(f){return at(this._data,f)},n.prototype.toString=function(){return at(this._data)},n.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.prototype.diagonal=function(f){if(f){if(Ze(f)&&(f=f.toNumber()),!ze(f)||!ke(f))throw new TypeError("The parameter k must be an integer number")}else f=0;for(var m=f>0?f:0,d=f<0?-f:0,h=this._size[0],p=this._size[1],y=Math.min(h-d,p-m),w=[],D=0;D<y;D++)w[D]=this._data[D+d][D+m];return new n({data:w,size:[y],datatype:this._datatype})},n.diagonal=function(f,m,d,h){if(!Mt(f))throw new TypeError("Array expected, size parameter");if(f.length!==2)throw new Error("Only two dimensions matrix are supported");if(f=f.map(function(N){if(Ze(N)&&(N=N.toNumber()),!ze(N)||!ke(N)||N<1)throw new Error("Size values must be positive integers");return N}),d){if(Ze(d)&&(d=d.toNumber()),!ze(d)||!ke(d))throw new TypeError("The parameter k must be an integer number")}else d=0;var p=d>0?d:0,y=d<0?-d:0,w=f[0],D=f[1],v=Math.min(w-y,D-p),x;if(Mt(m)){if(m.length!==v)throw new Error("Invalid value array length");x=function(A){return m[A]}}else if(Re(m)){var g=m.size();if(g.length!==1||g[0]!==v)throw new Error("Invalid matrix length");x=function(A){return m.get([A])}}else x=function(){return m};h||(h=Ze(x(0))?x(0).mul(0):0);var b=[];if(f.length>0){b=Jo(b,f,h);for(var C=0;C<v;C++)b[C+y][C+p]=x(C)}return new n({data:b,size:[w,D]})},n.fromJSON=function(f){return new n(f)},n.prototype.swapRows=function(f,m){if(!ze(f)||!ke(f)||!ze(m)||!ke(m))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return Bt(f,this._size[0]),Bt(m,this._size[0]),n._swapRows(f,m,this._data),this},n._swapRows=function(f,m,d){var h=d[f];d[f]=d[m],d[m]=h};function c(f){return Re(f)?c(f.valueOf()):Mt(f)?f.map(c):f}return n},{isClass:!0}),f0="clone",nI=["typed"],aI=I(f0,nI,e=>{var{typed:t}=e;return t(f0,{any:Ve})});function kx(e){var t=e.length,r=e[0].length,n,a,i=[];for(a=0;a<r;a++){var o=[];for(n=0;n<t;n++)o.push(e[n][a]);i.push(o)}return i}function rs(e){for(var t=0;t<e.length;t++)if(gn(e[t]))return!0;return!1}function pi(e,t){Re(e)?e.forEach(r=>t(r),!1,!0):Px(e,t,!0)}function Qe(e,t,r){if(!r)return Re(e)?e.map(a=>t(a),!1,!0):qm(e,t,!0);var n=a=>a===0?a:t(a);return Re(e)?e.map(a=>n(a),!1,!0):qm(e,n,!0)}function Mc(e,t,r){var n=Array.isArray(e)?Ue(e):e.size();if(t<0||t>=n.length)throw new Qn(t,n.length);return Re(e)?e.create(Xl(e.valueOf(),t,r),e.datatype()):Xl(e,t,r)}function Xl(e,t,r){var n,a,i,o;if(t<=0)if(Array.isArray(e[0])){for(o=kx(e),a=[],n=0;n<o.length;n++)a[n]=Xl(o[n],t-1,r);return a}else{for(i=e[0],n=1;n<e.length;n++)i=r(i,e[n]);return i}else{for(a=[],n=0;n<e.length;n++)a[n]=Xl(e[n],t-1,r);return a}}function m0(e,t,r,n,a,i,o,s,u,l,c){var f=e._values,m=e._index,d=e._ptr,h,p,y,w;if(n)for(p=d[t],y=d[t+1],h=p;h<y;h++)w=m[h],r[w]!==i?(r[w]=i,o.push(w),n[w]=f[h]):(n[w]=s(n[w],f[h]),a[w]=i);else for(p=d[t],y=d[t+1],h=p;h<y;h++)w=m[h],r[w]!==i?(r[w]=i,o.push(w)):a[w]=i}var d0="isInteger",iI=["typed","equal"],oI=I(d0,iI,e=>{var{typed:t,equal:r}=e;return t(d0,{number:n=>Number.isFinite(n)?r(n,Math.round(n)):!1,BigNumber:n=>n.isFinite()?r(n.round(),n):!1,bigint:n=>!0,Fraction:n=>n.d===1n,"Array | Matrix":t.referToSelf(n=>a=>Qe(a,n))})}),Xn="number",ns="number, number";function Ox(e){return Math.abs(e)}Ox.signature=Xn;function Bx(e,t){return e+t}Bx.signature=ns;function $x(e,t){return e-t}$x.signature=ns;function _x(e,t){return e*t}_x.signature=ns;function Ix(e){return-e}Ix.signature=Xn;function zx(e){return e}zx.signature=Xn;function Ss(e){return u9(e)}Ss.signature=Xn;function jx(e){return e*e*e}jx.signature=Xn;function qx(e){return Math.exp(e)}qx.signature=Xn;function Rx(e){return l9(e)}Rx.signature=Xn;function Lx(e,t){if(!ke(e)||!ke(t))throw new Error("Parameters in function lcm must be integer numbers");if(e===0||t===0)return 0;for(var r,n=e*t;t!==0;)r=t,t=e%r,e=r;return Math.abs(n/e)}Lx.signature=ns;function h0(e,t){return t?Math.log(e)/Math.log(t):Math.log(e)}function ec(e){return o9(e)}ec.signature=Xn;function Rm(e){return i9(e)}Rm.signature=Xn;function p0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,r=t<0;if(r&&(t=-t),t===0)throw new Error("Root must be non-zero");if(e<0&&Math.abs(t)%2!==1)throw new Error("Root must be odd when a is negative.");if(e===0)return r?1/0:0;if(!isFinite(e))return r?0:e;var n=Math.pow(Math.abs(e),1/t);return n=e<0?-n:n,r?1/n:n}function Lm(e){return ai(e)}Lm.signature=Xn;function Hx(e){return e*e}Hx.signature=Xn;function Gx(e,t){var r,n,a,i=0,o=1,s=1,u=0;if(!ke(e)||!ke(t))throw new Error("Parameters in function xgcd must be integer numbers");for(;t;)n=Math.floor(e/t),a=e-n*t,r=i,i=o-n*i,o=r,r=s,s=u-n*s,u=r,e=t,t=a;var l;return e<0?l=[-e,-o,-u]:l=[e,e?o:0,u],l}Gx.signature=ns;function Vx(e,t){return e*e<1&&t===1/0||e*e>1&&t===-1/0?0:Math.pow(e,t)}Vx.signature=ns;function As(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!ke(t)||t<0||t>15)throw new Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(sx(e,t))}var sI="number",as="number, number";function Ux(e,t){if(!ke(e)||!ke(t))throw new Error("Integers expected in function bitAnd");return e&t}Ux.signature=as;function Wx(e){if(!ke(e))throw new Error("Integer expected in function bitNot");return~e}Wx.signature=sI;function Jx(e,t){if(!ke(e)||!ke(t))throw new Error("Integers expected in function bitOr");return e|t}Jx.signature=as;function Kx(e,t){if(!ke(e)||!ke(t))throw new Error("Integers expected in function bitXor");return e^t}Kx.signature=as;function Yx(e,t){if(!ke(e)||!ke(t))throw new Error("Integers expected in function leftShift");return e<<t}Yx.signature=as;function Zx(e,t){if(!ke(e)||!ke(t))throw new Error("Integers expected in function rightArithShift");return e>>t}Zx.signature=as;function Qx(e,t){if(!ke(e)||!ke(t))throw new Error("Integers expected in function rightLogShift");return e>>>t}Qx.signature=as;function Ba(e,t){if(t<e)return 1;if(t===e)return t;var r=t+e>>1;return Ba(e,r)*Ba(r+1,t)}function Xx(e,t){if(!ke(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!ke(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(t>e)throw new TypeError("k must be less than or equal to n");for(var r=e-t,n=1,a=t<r?r+1:t+1,i=2,o=t<r?t:r,s=a;s<=e;++s)for(n*=s;i<=o&&n%i===0;)n/=i,++i;return i<=o&&(n/=Ba(i,o)),n}Xx.signature="number, number";var uI=Math.PI,lI=2*Math.PI,cI=Math.E,fI=1.618033988749895,mI="number",Ed="number, number";function e2(e){return!e}e2.signature=mI;function Hm(e,t){return!!(e||t)}Hm.signature=Ed;function Gm(e,t){return!!e!=!!t}Gm.signature=Ed;function Vm(e,t){return!!(e&&t)}Vm.signature=Ed;function tc(e){var t;if(ke(e))return e<=0?Number.isFinite(e)?1/0:NaN:e>171?1/0:Ba(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*tc(1-e));if(e>=171.35)return 1/0;if(e>85){var r=e*e,n=r*e,a=n*e,i=a*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*r)-139/(51840*n)-571/(2488320*a)+163879/(209018880*i)+5246819/(75246796800*i*e))}--e,t=Lo[0];for(var o=1;o<Lo.length;++o)t+=Lo[o]/(e+o);var s=e+t2+.5;return Math.sqrt(2*Math.PI)*Math.pow(s,e+.5)*Math.exp(-s)*t}tc.signature="number";var t2=4.7421875,Lo=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22],r2=.9189385332046728,dI=5,hI=7,g0=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];function rc(e){if(e<0)return NaN;if(e===0)return 1/0;if(!Number.isFinite(e))return e;if(e<.5)return Math.log(Math.PI/Math.sin(Math.PI*e))-rc(1-e);e=e-1;for(var t=e+dI+.5,r=g0[0],n=hI-1;n>=1;n--)r+=g0[n]/(e+n);return r2+(e+.5)*Math.log(t)-t+Math.log(r)}rc.signature="number";var zr="number";function n2(e){return d9(e)}n2.signature=zr;function a2(e){return Math.atan(1/e)}a2.signature=zr;function i2(e){return Number.isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}i2.signature=zr;function o2(e){return Math.asin(1/e)}o2.signature=zr;function s2(e){var t=1/e;return Math.log(t+Math.sqrt(t*t+1))}s2.signature=zr;function u2(e){return Math.acos(1/e)}u2.signature=zr;function l2(e){var t=1/e,r=Math.sqrt(t*t-1);return Math.log(r+t)}l2.signature=zr;function c2(e){return h9(e)}c2.signature=zr;function f2(e){return p9(e)}f2.signature=zr;function m2(e){return 1/Math.tan(e)}m2.signature=zr;function d2(e){var t=Math.exp(2*e);return(t+1)/(t-1)}d2.signature=zr;function h2(e){return 1/Math.sin(e)}h2.signature=zr;function p2(e){return e===0?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*ai(e)}p2.signature=zr;function g2(e){return 1/Math.cos(e)}g2.signature=zr;function v2(e){return 2/(Math.exp(e)+Math.exp(-e))}v2.signature=zr;function y2(e){return v9(e)}y2.signature=zr;var Sd="number";function b2(e){return e<0}b2.signature=Sd;function w2(e){return e>0}w2.signature=Sd;function x2(e){return Number.isNaN(e)}x2.signature=Sd;function Bn(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e-9,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if(r<=0)throw new Error("Relative tolerance must be greater than 0");if(n<0)throw new Error("Absolute tolerance must be at least 0");return e.isNaN()||t.isNaN()?!1:!e.isFinite()||!t.isFinite()?e.eq(t):e.eq(t)?!0:e.minus(t).abs().lte(e.constructor.max(e.constructor.max(e.abs(),t.abs()).mul(r),n))}var v0="isNegative",pI=["typed","config"],gI=I(v0,pI,e=>{var{typed:t,config:r}=e;return t(v0,{number:n=>Ar(n,0,r.relTol,r.absTol)?!1:b2(n),BigNumber:n=>Bn(n,new n.constructor(0),r.relTol,r.absTol)?!1:n.isNeg()&&!n.isZero()&&!n.isNaN(),bigint:n=>n<0n,Fraction:n=>n.s<0n,Unit:t.referToSelf(n=>a=>t.find(n,a.valueType())(a.value)),"Array | Matrix":t.referToSelf(n=>a=>Qe(a,n))})}),y0="isNumeric",vI=["typed"],yI=I(y0,vI,e=>{var{typed:t}=e;return t(y0,{"number | BigNumber | bigint | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":t.referToSelf(r=>n=>Qe(n,r))})}),b0="hasNumericValue",bI=["typed","isNumeric"],wI=I(b0,bI,e=>{var{typed:t,isNumeric:r}=e;return t(b0,{boolean:()=>!0,string:function(a){return a.trim().length>0&&!isNaN(Number(a))},any:function(a){return r(a)}})}),w0="isPositive",xI=["typed","config"],DI=I(w0,xI,e=>{var{typed:t,config:r}=e;return t(w0,{number:n=>Ar(n,0,r.relTol,r.absTol)?!1:w2(n),BigNumber:n=>Bn(n,new n.constructor(0),r.relTol,r.absTol)?!1:!n.isNeg()&&!n.isZero()&&!n.isNaN(),bigint:n=>n>0n,Fraction:n=>n.s>0n&&n.n>0n,Unit:t.referToSelf(n=>a=>t.find(n,a.valueType())(a.value)),"Array | Matrix":t.referToSelf(n=>a=>Qe(a,n))})}),x0="isZero",NI=["typed","equalScalar"],AI=I(x0,NI,e=>{var{typed:t,equalScalar:r}=e;return t(x0,{"number | BigNumber | Complex | Fraction":n=>r(n,0),bigint:n=>n===0n,Unit:t.referToSelf(n=>a=>t.find(n,a.valueType())(a.value)),"Array | Matrix":t.referToSelf(n=>a=>Qe(a,n))})}),D0="isNaN",CI=["typed"],EI=I(D0,CI,e=>{var{typed:t}=e;return t(D0,{number:x2,BigNumber:function(n){return n.isNaN()},bigint:function(n){return!1},Fraction:function(n){return!1},Complex:function(n){return n.isNaN()},Unit:function(n){return Number.isNaN(n.value)},"Array | Matrix":t.referToSelf(r=>n=>Qe(n,r))})}),N0="isBounded",SI=["typed"],MI=I(N0,SI,e=>{var{typed:t}=e;return t(N0,{number:r=>Number.isFinite(r),"BigNumber | Complex":r=>r.isFinite(),"bigint | Fraction":()=>!0,"null | undefined":()=>!1,Unit:t.referToSelf(r=>n=>r(n.value)),"Array | Matrix":t.referToSelf(r=>n=>(Array.isArray(n)||(n=n.valueOf()),n.every(a=>r(a))))})}),A0="isFinite",TI=["typed","isBounded","map"],FI=I(A0,TI,e=>{var{typed:t,isBounded:r,map:n}=e;return t(A0,{"Array | Matrix":a=>n(a,r),any:a=>r(a)})}),C0="typeOf",PI=["typed"],kI=I(C0,PI,e=>{var{typed:t}=e;return t(C0,{any:Ft})});function OI(e,t,r,n){return Ar(e.re,t.re,r,n)&&Ar(e.im,t.im,r,n)}var is=I("compareUnits",["typed"],e=>{var{typed:t}=e;return{"Unit, Unit":t.referToSelf(r=>(n,a)=>{if(!n.equalBase(a))throw new Error("Cannot compare units with different base");return t.find(r,[n.valueType(),a.valueType()])(n.value,a.value)})}}),nc="equalScalar",BI=["typed","config"],$I=I(nc,BI,e=>{var{typed:t,config:r}=e,n=is({typed:t});return t(nc,{"boolean, boolean":function(i,o){return i===o},"number, number":function(i,o){return Ar(i,o,r.relTol,r.absTol)},"BigNumber, BigNumber":function(i,o){return i.eq(o)||Bn(i,o,r.relTol,r.absTol)},"bigint, bigint":function(i,o){return i===o},"Fraction, Fraction":function(i,o){return i.equals(o)},"Complex, Complex":function(i,o){return OI(i,o,r.relTol,r.absTol)}},n)});I(nc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(nc,{"number, number":function(a,i){return Ar(a,i,r.relTol,r.absTol)}})});var _I="SparseMatrix",II=["typed","equalScalar","Matrix"],zI=I(_I,II,e=>{var{typed:t,equalScalar:r,Matrix:n}=e;function a(p,y){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(y&&!Yt(y))throw new Error("Invalid datatype: "+y);if(Re(p))i(this,p,y);else if(p&&Mt(p.index)&&Mt(p.ptr)&&Mt(p.size))this._values=p.values,this._index=p.index,this._ptr=p.ptr,this._size=p.size,this._datatype=y||p.datatype;else if(Mt(p))o(this,p,y);else{if(p)throw new TypeError("Unsupported type of data ("+Ft(p)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=y}}function i(p,y,w){y.type==="SparseMatrix"?(p._values=y._values?Ve(y._values):void 0,p._index=Ve(y._index),p._ptr=Ve(y._ptr),p._size=Ve(y._size),p._datatype=w||y._datatype):o(p,y.valueOf(),w||y._datatype)}function o(p,y,w){p._values=[],p._index=[],p._ptr=[],p._datatype=w;var D=y.length,v=0,x=r,g=0;if(Yt(w)&&(x=t.find(r,[w,w])||r,g=t.convert(0,w)),D>0){var b=0;do{p._ptr.push(p._index.length);for(var C=0;C<D;C++){var N=y[C];if(Mt(N)){if(b===0&&v<N.length&&(v=N.length),b<N.length){var A=N[b];x(A,g)||(p._values.push(A),p._index.push(C))}}else b===0&&v<1&&(v=1),x(N,g)||(p._values.push(N),p._index.push(C))}b++}while(b<v)}for(;p._ptr.length<=v;)p._ptr.push(p._index.length);p._size=[D,v]}a.prototype=new n,a.prototype.createSparseMatrix=function(p,y){return new a(p,y)},Object.defineProperty(a,"name",{value:"SparseMatrix"}),a.prototype.constructor=a,a.prototype.type="SparseMatrix",a.prototype.isSparseMatrix=!0,a.prototype.getDataType=function(){return Sc(this._values,Ft)},a.prototype.storage=function(){return"sparse"},a.prototype.datatype=function(){return this._datatype},a.prototype.create=function(p,y){return new a(p,y)},a.prototype.density=function(){var p=this._size[0],y=this._size[1];return p!==0&&y!==0?this._index.length/(p*y):0},a.prototype.subset=function(p,y,w){if(!this._values)throw new Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return s(this,p);case 2:case 3:return u(this,p,y,w);default:throw new SyntaxError("Wrong number of arguments")}};function s(p,y){if(!wc(y))throw new TypeError("Invalid index");var w=y.isScalar();if(w)return p.get(y.min());var D=y.size();if(D.length!==p._size.length)throw new nt(D.length,p._size.length);var v,x,g,b,C=y.min(),N=y.max();for(v=0,x=p._size.length;v<x;v++)Bt(C[v],p._size[v]),Bt(N[v],p._size[v]);var A=p._values,E=p._index,S=p._ptr,F=y.dimension(0),k=y.dimension(1),B=[],L=[];function M(te,K){L[te]=K[0],B[te]=!0}Number.isInteger(F)?M(F,[0]):F.forEach(M);var $=A?[]:void 0,H=[],j=[];function Y(te){for(j.push(H.length),g=S[te],b=S[te+1];g<b;g++)v=E[g],B[v]===!0&&(H.push(L[v]),$&&$.push(A[g]))}return Number.isInteger(k)?Y(k):k.forEach(Y),j.push(H.length),new a({values:$,index:H,ptr:j,size:D,datatype:p._datatype})}function u(p,y,w,D){if(!y||y.isIndex!==!0)throw new TypeError("Invalid index");var v=y.size(),x=y.isScalar(),g;if(Re(w)?(g=w.size(),w=w.toArray()):g=Ue(w),x){if(g.length!==0)throw new TypeError("Scalar expected");p.set(y.min(),w,D)}else{if(v.length!==1&&v.length!==2)throw new nt(v.length,p._size.length,"<");if(g.length<v.length){for(var b=0,C=0;v[b]===1&&g[b]===1;)b++;for(;v[b]===1;)C++,b++;w=Cx(w,v.length,C,g)}if(!La(v,g))throw new nt(v,g,">");if(v.length===1){var N=y.dimension(0);S(N,(F,k)=>{Bt(F),p.set([F,0],w[k[0]],D)})}else{var A=y.dimension(0),E=y.dimension(1);S(A,(F,k)=>{Bt(F),S(E,(B,L)=>{Bt(B),p.set([F,B],w[k[0]][L[0]],D)})})}}return p;function S(F,k){ze(F)?k(F,[0]):F.forEach(k)}}a.prototype.get=function(p){if(!Mt(p))throw new TypeError("Array expected");if(p.length!==this._size.length)throw new nt(p.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var y=p[0],w=p[1];Bt(y,this._size[0]),Bt(w,this._size[1]);var D=l(y,this._ptr[w],this._ptr[w+1],this._index);return D<this._ptr[w+1]&&this._index[D]===y?this._values[D]:0},a.prototype.set=function(p,y,w){if(!Mt(p))throw new TypeError("Array expected");if(p.length!==this._size.length)throw new nt(p.length,this._size.length);if(!this._values)throw new Error("Cannot invoke set on a Pattern only matrix");var D=p[0],v=p[1],x=this._size[0],g=this._size[1],b=r,C=0;Yt(this._datatype)&&(b=t.find(r,[this._datatype,this._datatype])||r,C=t.convert(0,this._datatype)),(D>x-1||v>g-1)&&(m(this,Math.max(D+1,x),Math.max(v+1,g),w),x=this._size[0],g=this._size[1]),Bt(D,x),Bt(v,g);var N=l(D,this._ptr[v],this._ptr[v+1],this._index);return N<this._ptr[v+1]&&this._index[N]===D?b(y,C)?c(N,v,this._values,this._index,this._ptr):this._values[N]=y:b(y,C)||f(N,D,v,y,this._values,this._index,this._ptr),this};function l(p,y,w,D){if(w-y===0)return w;for(var v=y;v<w;v++)if(D[v]===p)return v;return y}function c(p,y,w,D,v){w.splice(p,1),D.splice(p,1);for(var x=y+1;x<v.length;x++)v[x]--}function f(p,y,w,D,v,x,g){v.splice(p,0,D),x.splice(p,0,y);for(var b=w+1;b<g.length;b++)g[b]++}a.prototype.resize=function(p,y,w){if(!gn(p))throw new TypeError("Array or Matrix expected");var D=p.valueOf().map(x=>Array.isArray(x)&&x.length===1?x[0]:x);if(D.length!==2)throw new Error("Only two dimensions matrix are supported");D.forEach(function(x){if(!ze(x)||!ke(x)||x<0)throw new TypeError("Invalid size, must contain positive integers (size: "+at(D)+")")});var v=w?this.clone():this;return m(v,D[0],D[1],y)};function m(p,y,w,D){var v=D||0,x=r,g=0;Yt(p._datatype)&&(x=t.find(r,[p._datatype,p._datatype])||r,g=t.convert(0,p._datatype),v=t.convert(v,p._datatype));var b=!x(v,g),C=p._size[0],N=p._size[1],A,E,S;if(w>N){for(E=N;E<w;E++)if(p._ptr[E]=p._values.length,b)for(A=0;A<C;A++)p._values.push(v),p._index.push(A);p._ptr[w]=p._values.length}else w<N&&(p._ptr.splice(w+1,N-w),p._values.splice(p._ptr[w],p._values.length),p._index.splice(p._ptr[w],p._index.length));if(N=w,y>C){if(b){var F=0;for(E=0;E<N;E++){p._ptr[E]=p._ptr[E]+F,S=p._ptr[E+1]+F;var k=0;for(A=C;A<y;A++,k++)p._values.splice(S+k,0,v),p._index.splice(S+k,0,A),F++}p._ptr[N]=p._values.length}}else if(y<C){var B=0;for(E=0;E<N;E++){p._ptr[E]=p._ptr[E]-B;var L=p._ptr[E],M=p._ptr[E+1]-B;for(S=L;S<M;S++)A=p._index[S],A>y-1&&(p._values.splice(S,1),p._index.splice(S,1),B++)}p._ptr[E]=p._values.length}return p._size[0]=y,p._size[1]=w,p}a.prototype.reshape=function(p,y){if(!Mt(p))throw new TypeError("Array expected");if(p.length!==2)throw new Error("Sparse matrices can only be reshaped in two dimensions");p.forEach(function(j){if(!ze(j)||!ke(j)||j<=-2||j===0)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+at(p)+")")});var w=this._size[0]*this._size[1];p=Cd(p,w);var D=p[0]*p[1];if(w!==D)throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var v=y?this.clone():this;if(this._size[0]===p[0]&&this._size[1]===p[1])return v;for(var x=[],g=0;g<v._ptr.length;g++)for(var b=0;b<v._ptr[g+1]-v._ptr[g];b++)x.push(g);for(var C=v._values.slice(),N=v._index.slice(),A=0;A<v._index.length;A++){var E=N[A],S=x[A],F=E*v._size[1]+S;x[A]=F%p[1],N[A]=Math.floor(F/p[1])}v._values.length=0,v._index.length=0,v._ptr.length=p[1]+1,v._size=p.slice();for(var k=0;k<v._ptr.length;k++)v._ptr[k]=0;for(var B=0;B<C.length;B++){var L=N[B],M=x[B],$=C[B],H=l(L,v._ptr[M],v._ptr[M+1],v._index);f(H,L,M,$,v._values,v._index,v._ptr)}return v},a.prototype.clone=function(){var p=new a({values:this._values?Ve(this._values):void 0,index:Ve(this._index),ptr:Ve(this._ptr),size:Ve(this._size),datatype:this._datatype});return p},a.prototype.size=function(){return this._size.slice(0)},a.prototype.map=function(p,y){if(!this._values)throw new Error("Cannot invoke map on a Pattern only matrix");var w=this,D=this._size[0],v=this._size[1],x=Xi(p,w,"map"),g=function(C,N,A){return x.fn(C,[N,A],w)};return d(this,0,D-1,0,v-1,g,y)};function d(p,y,w,D,v,x,g){var b=[],C=[],N=[],A=r,E=0;Yt(p._datatype)&&(A=t.find(r,[p._datatype,p._datatype])||r,E=t.convert(0,p._datatype));for(var S=function(P,X,z){var ie=x(P,X,z);A(ie,E)||(b.push(ie),C.push(X))},F=D;F<=v;F++){N.push(b.length);var k=p._ptr[F],B=p._ptr[F+1];if(g)for(var L=k;L<B;L++){var M=p._index[L];M>=y&&M<=w&&S(p._values[L],M-y,F-D)}else{for(var $={},H=k;H<B;H++){var j=p._index[H];$[j]=p._values[H]}for(var Y=y;Y<=w;Y++){var te=Y in $?$[Y]:0;S(te,Y-y,F-D)}}}return N.push(b.length),new a({values:b,index:C,ptr:N,size:[w-y+1,v-D+1]})}a.prototype.forEach=function(p,y){if(!this._values)throw new Error("Cannot invoke forEach on a Pattern only matrix");for(var w=this,D=this._size[0],v=this._size[1],x=Xi(p,w,"forEach"),g=0;g<v;g++){var b=this._ptr[g],C=this._ptr[g+1];if(y)for(var N=b;N<C;N++){var A=this._index[N];x.fn(this._values[N],[A,g],w)}else{for(var E={},S=b;S<C;S++){var F=this._index[S];E[F]=this._values[S]}for(var k=0;k<D;k++){var B=k in E?E[k]:0;x.fn(B,[k,g],w)}}}},a.prototype[Symbol.iterator]=function*(){if(!this._values)throw new Error("Cannot iterate a Pattern only matrix");for(var p=this._size[1],y=0;y<p;y++)for(var w=this._ptr[y],D=this._ptr[y+1],v=w;v<D;v++){var x=this._index[v];yield{value:this._values[v],index:[x,y]}}},a.prototype.toArray=function(){return h(this._values,this._index,this._ptr,this._size,!0)},a.prototype.valueOf=function(){return h(this._values,this._index,this._ptr,this._size,!1)};function h(p,y,w,D,v){var x=D[0],g=D[1],b=[],C,N;for(C=0;C<x;C++)for(b[C]=[],N=0;N<g;N++)b[C][N]=0;for(N=0;N<g;N++)for(var A=w[N],E=w[N+1],S=A;S<E;S++)C=y[S],b[C][N]=p?v?Ve(p[S]):p[S]:1;return b}return a.prototype.format=function(p){for(var y=this._size[0],w=this._size[1],D=this.density(),v="Sparse Matrix ["+at(y,p)+" x "+at(w,p)+"] density: "+at(D,p)+`
35
+ `,x=0;x<w;x++)for(var g=this._ptr[x],b=this._ptr[x+1],C=g;C<b;C++){var N=this._index[C];v+=`
36
+ (`+at(N,p)+", "+at(x,p)+") ==> "+(this._values?at(this._values[C],p):"X")}return v},a.prototype.toString=function(){return at(this.toArray())},a.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},a.prototype.diagonal=function(p){if(p){if(Ze(p)&&(p=p.toNumber()),!ze(p)||!ke(p))throw new TypeError("The parameter k must be an integer number")}else p=0;var y=p>0?p:0,w=p<0?-p:0,D=this._size[0],v=this._size[1],x=Math.min(D-w,v-y),g=[],b=[],C=[];C[0]=0;for(var N=y;N<v&&g.length<x;N++)for(var A=this._ptr[N],E=this._ptr[N+1],S=A;S<E;S++){var F=this._index[S];if(F===N-y+w){g.push(this._values[S]),b[g.length-1]=F-w;break}}return C.push(g.length),new a({values:g,index:b,ptr:C,size:[x,1]})},a.fromJSON=function(p){return new a(p)},a.diagonal=function(p,y,w,D,v){if(!Mt(p))throw new TypeError("Array expected, size parameter");if(p.length!==2)throw new Error("Only two dimensions matrix are supported");if(p=p.map(function(j){if(Ze(j)&&(j=j.toNumber()),!ze(j)||!ke(j)||j<1)throw new Error("Size values must be positive integers");return j}),w){if(Ze(w)&&(w=w.toNumber()),!ze(w)||!ke(w))throw new TypeError("The parameter k must be an integer number")}else w=0;var x=r,g=0;Yt(v)&&(x=t.find(r,[v,v])||r,g=t.convert(0,v));var b=w>0?w:0,C=w<0?-w:0,N=p[0],A=p[1],E=Math.min(N-C,A-b),S;if(Mt(y)){if(y.length!==E)throw new Error("Invalid value array length");S=function(Y){return y[Y]}}else if(Re(y)){var F=y.size();if(F.length!==1||F[0]!==E)throw new Error("Invalid matrix length");S=function(Y){return y.get([Y])}}else S=function(){return y};for(var k=[],B=[],L=[],M=0;M<A;M++){L.push(k.length);var $=M-b;if($>=0&&$<E){var H=S($);x(H,g)||(B.push($+C),k.push(H))}}return L.push(k.length),new a({values:k,index:B,ptr:L,size:[N,A]})},a.prototype.swapRows=function(p,y){if(!ze(p)||!ke(p)||!ze(y)||!ke(y))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return Bt(p,this._size[0]),Bt(y,this._size[0]),a._swapRows(p,y,this._size[1],this._values,this._index,this._ptr),this},a._forEachRow=function(p,y,w,D,v){for(var x=D[p],g=D[p+1],b=x;b<g;b++)v(w[b],y[b])},a._swapRows=function(p,y,w,D,v,x){for(var g=0;g<w;g++){var b=x[g],C=x[g+1],N=l(p,b,C,v),A=l(y,b,C,v);if(N<C&&A<C&&v[N]===p&&v[A]===y){if(D){var E=D[N];D[N]=D[A],D[A]=E}continue}if(N<C&&v[N]===p&&(A>=C||v[A]!==y)){var S=D?D[N]:void 0;v.splice(A,0,y),D&&D.splice(A,0,S),v.splice(A<=N?N+1:N,1),D&&D.splice(A<=N?N+1:N,1);continue}if(A<C&&v[A]===y&&(N>=C||v[N]!==p)){var F=D?D[A]:void 0;v.splice(N,0,p),D&&D.splice(N,0,F),v.splice(N<=A?A+1:A,1),D&&D.splice(N<=A?A+1:A,1)}}},a},{isClass:!0}),jI="number",qI=["typed"];function RI(e){var t=e.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(t){var r={"0b":2,"0o":8,"0x":16}[t[1]],n=t[2],a=t[3];return{input:e,radix:r,integerPart:n,fractionalPart:a}}else return null}function LI(e){for(var t=parseInt(e.integerPart,e.radix),r=0,n=0;n<e.fractionalPart.length;n++){var a=parseInt(e.fractionalPart[n],e.radix);r+=a/Math.pow(e.radix,n+1)}var i=t+r;if(isNaN(i))throw new SyntaxError('String "'+e.input+'" is not a valid number');return i}var HI=I(jI,qI,e=>{var{typed:t}=e,r=t("number",{"":function(){return 0},number:function(a){return a},string:function(a){if(a==="NaN")return NaN;var i=RI(a);if(i)return LI(i);var o=0,s=a.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);s&&(o=Number(s[2]),a=s[1]);var u=Number(a);if(isNaN(u))throw new SyntaxError('String "'+a+'" is not a valid number');if(s){if(u>2**o-1)throw new SyntaxError('String "'.concat(a,'" is out of range'));u>=2**(o-1)&&(u=u-2**o)}return u},BigNumber:function(a){return a.toNumber()},bigint:function(a){return Number(a)},Fraction:function(a){return a.valueOf()},Unit:t.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),null:function(a){return 0},"Unit, string | Unit":function(a,i){return a.toNumber(i)},"Array | Matrix":t.referToSelf(n=>a=>Qe(a,n))});return r.fromJSON=function(n){return parseFloat(n.value)},r}),GI="bigint",VI=["typed"],UI=I(GI,VI,e=>{var{typed:t}=e,r=t("bigint",{"":function(){return 0n},bigint:function(a){return a},number:function(a){return BigInt(a.toFixed())},BigNumber:function(a){return BigInt(a.round().toString())},Fraction:function(a){return BigInt(a.valueOf().toFixed())},"string | boolean":function(a){return BigInt(a)},null:function(a){return 0n},"Array | Matrix":t.referToSelf(n=>a=>Qe(a,n))});return r.fromJSON=function(n){return BigInt(n.value)},r}),E0="string",WI=["typed"],JI=I(E0,WI,e=>{var{typed:t}=e;return t(E0,{"":function(){return""},number:Ji,null:function(n){return"null"},boolean:function(n){return n+""},string:function(n){return n},"Array | Matrix":t.referToSelf(r=>n=>Qe(n,r)),any:function(n){return String(n)}})}),S0="boolean",KI=["typed"],YI=I(S0,KI,e=>{var{typed:t}=e;return t(S0,{"":function(){return!1},boolean:function(n){return n},number:function(n){return!!n},null:function(n){return!1},BigNumber:function(n){return!n.isZero()},string:function(n){var a=n.toLowerCase();if(a==="true")return!0;if(a==="false")return!1;var i=Number(n);if(n!==""&&!isNaN(i))return!!i;throw new Error('Cannot convert "'+n+'" to a boolean')},"Array | Matrix":t.referToSelf(r=>n=>Qe(n,r))})}),ZI="bignumber",QI=["typed","BigNumber"],XI=I(ZI,QI,e=>{var{typed:t,BigNumber:r}=e;return t("bignumber",{"":function(){return new r(0)},number:function(a){return new r(a+"")},string:function(a){var i=a.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(i){var o=i[2],s=r(i[1]),u=new r(2).pow(Number(o));if(s.gt(u.sub(1)))throw new SyntaxError('String "'.concat(a,'" is out of range'));var l=new r(2).pow(Number(o)-1);return s.gte(l)?s.sub(u):s}return new r(a)},BigNumber:function(a){return a},bigint:function(a){return new r(a.toString())},Unit:t.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),Fraction:function(a){return new r(String(a.n)).div(String(a.d)).times(String(a.s))},null:function(a){return new r(0)},"Array | Matrix":t.referToSelf(n=>a=>Qe(a,n))})}),e7="complex",t7=["typed","Complex"],r7=I(e7,t7,e=>{var{typed:t,Complex:r}=e;return t("complex",{"":function(){return r.ZERO},number:function(a){return new r(a,0)},"number, number":function(a,i){return new r(a,i)},"BigNumber, BigNumber":function(a,i){return new r(a.toNumber(),i.toNumber())},Fraction:function(a){return new r(a.valueOf(),0)},Complex:function(a){return a.clone()},string:function(a){return r(a)},null:function(a){return r(0)},Object:function(a){if("re"in a&&"im"in a)return new r(a.re,a.im);if("r"in a&&"phi"in a||"abs"in a&&"arg"in a)return new r(a);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":t.referToSelf(n=>a=>Qe(a,n))})}),n7="fraction",a7=["typed","Fraction"],i7=I(n7,a7,e=>{var{typed:t,Fraction:r}=e;return t("fraction",{number:function(a){if(!Number.isFinite(a)||isNaN(a))throw new Error(a+" cannot be represented as a fraction");return new r(a)},string:function(a){return new r(a)},"number, number":function(a,i){return new r(a,i)},"bigint, bigint":function(a,i){return new r(a,i)},null:function(a){return new r(0)},BigNumber:function(a){return new r(a.toString())},bigint:function(a){return new r(a.toString())},Fraction:function(a){return a},Unit:t.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),Object:function(a){return new r(a)},"Array | Matrix":t.referToSelf(n=>a=>Qe(a,n))})}),M0="matrix",o7=["typed","Matrix","DenseMatrix","SparseMatrix"],s7=I(M0,o7,e=>{var{typed:t,Matrix:r,DenseMatrix:n,SparseMatrix:a}=e;return t(M0,{"":function(){return i([])},string:function(s){return i([],s)},"string, string":function(s,u){return i([],s,u)},Array:function(s){return i(s)},Matrix:function(s){return i(s,s.storage())},"Array | Matrix, string":i,"Array | Matrix, string, string":i});function i(o,s,u){if(s==="dense"||s==="default"||s===void 0)return new n(o,u);if(s==="sparse")return new a(o,u);throw new TypeError("Unknown matrix type "+JSON.stringify(s)+".")}}),T0="matrixFromFunction",u7=["typed","matrix","isZero"],l7=I(T0,u7,e=>{var{typed:t,matrix:r,isZero:n}=e;return t(T0,{"Array | Matrix, function, string, string":function(o,s,u,l){return a(o,s,u,l)},"Array | Matrix, function, string":function(o,s,u){return a(o,s,u)},"Matrix, function":function(o,s){return a(o,s,"dense")},"Array, function":function(o,s){return a(o,s,"dense").toArray()},"Array | Matrix, string, function":function(o,s,u){return a(o,u,s)},"Array | Matrix, string, string, function":function(o,s,u,l){return a(o,l,s,u)}});function a(i,o,s,u){var l;return u!==void 0?l=r(s,u):l=r(s),l.resize(i),l.forEach(function(c,f){var m=o(f);n(m)||l.set(f,m)}),l}}),F0="matrixFromRows",c7=["typed","matrix","flatten","size"],f7=I(F0,c7,e=>{var{typed:t,matrix:r,flatten:n,size:a}=e;return t(F0,{"...Array":function(u){return i(u)},"...Matrix":function(u){return r(i(u.map(l=>l.toArray())))}});function i(s){if(s.length===0)throw new TypeError("At least one row is needed to construct a matrix.");var u=o(s[0]),l=[];for(var c of s){var f=o(c);if(f!==u)throw new TypeError("The vectors had different length: "+(u|0)+" ≠ "+(f|0));l.push(n(c))}return l}function o(s){var u=a(s);if(u.length===1)return u[0];if(u.length===2){if(u[0]===1)return u[1];if(u[1]===1)return u[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}}),P0="matrixFromColumns",m7=["typed","matrix","flatten","size"],d7=I(P0,m7,e=>{var{typed:t,matrix:r,flatten:n,size:a}=e;return t(P0,{"...Array":function(u){return i(u)},"...Matrix":function(u){return r(i(u.map(l=>l.toArray())))}});function i(s){if(s.length===0)throw new TypeError("At least one column is needed to construct a matrix.");for(var u=o(s[0]),l=[],c=0;c<u;c++)l[c]=[];for(var f of s){var m=o(f);if(m!==u)throw new TypeError("The vectors had different length: "+(u|0)+" ≠ "+(m|0));for(var d=n(f),h=0;h<u;h++)l[h].push(d[h])}return l}function o(s){var u=a(s);if(u.length===1)return u[0];if(u.length===2){if(u[0]===1)return u[1];if(u[1]===1)return u[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}}),k0="splitUnit",h7=["typed"],p7=I(k0,h7,e=>{var{typed:t}=e;return t(k0,{"Unit, Array":function(n,a){return n.splitUnit(a)}})}),O0="unaryMinus",g7=["typed"],v7=I(O0,g7,e=>{var{typed:t}=e;return t(O0,{number:Ix,"Complex | BigNumber | Fraction":r=>r.neg(),bigint:r=>-r,Unit:t.referToSelf(r=>n=>{var a=n.clone();return a.value=t.find(r,a.valueType())(n.value),a}),"Array | Matrix":t.referToSelf(r=>n=>Qe(n,r,!0))})}),B0="unaryPlus",y7=["typed","config","numeric"],b7=I(B0,y7,e=>{var{typed:t,config:r,numeric:n}=e;return t(B0,{number:zx,Complex:function(i){return i},BigNumber:function(i){return i},bigint:function(i){return i},Fraction:function(i){return i},Unit:function(i){return i.clone()},"Array | Matrix":t.referToSelf(a=>i=>Qe(i,a,!0)),boolean:function(i){return n(i?1:0,r.number)},string:function(i){return n(i,vi(i,r))}})}),$0="abs",w7=["typed"],x7=I($0,w7,e=>{var{typed:t}=e;return t($0,{number:Ox,"Complex | BigNumber | Fraction | Unit":r=>r.abs(),bigint:r=>r<0n?-r:r,"Array | Matrix":t.referToSelf(r=>n=>Qe(n,r,!0))})}),_0="mapSlices",D7=["typed","isInteger"],Um=I(_0,D7,e=>{var{typed:t,isInteger:r}=e;return t(_0,{"Array | Matrix, number | BigNumber, function":function(a,i,o){if(!r(i))throw new TypeError("Integer number expected for dimension");var s=Array.isArray(a)?Ue(a):a.size();if(i<0||i>=s.length)throw new Qn(i,s.length);return Re(a)?a.create(ac(a.valueOf(),i,o),a.datatype()):ac(a,i,o)}})},{formerly:"apply"});function ac(e,t,r){var n,a,i;if(t<=0)if(Array.isArray(e[0])){for(i=N7(e),a=[],n=0;n<i.length;n++)a[n]=ac(i[n],t-1,r);return a}else return r(e);else{for(a=[],n=0;n<e.length;n++)a[n]=ac(e[n],t-1,r);return a}}function N7(e){var t=e.length,r=e[0].length,n,a,i=[];for(a=0;a<r;a++){var o=[];for(n=0;n<t;n++)o.push(e[n][a]);i.push(o)}return i}var I0="addScalar",A7=["typed"],C7=I(I0,A7,e=>{var{typed:t}=e;return t(I0,{"number, number":Bx,"Complex, Complex":function(n,a){return n.add(a)},"BigNumber, BigNumber":function(n,a){return n.plus(a)},"bigint, bigint":function(n,a){return n+a},"Fraction, Fraction":function(n,a){return n.add(a)},"Unit, Unit":t.referToSelf(r=>(n,a)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(a.value===null||a.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(a))throw new Error("Units do not match");var i=n.clone();return i.value=t.find(r,[i.valueType(),a.valueType()])(i.value,a.value),i.fixPrefix=!1,i})})}),z0="subtractScalar",E7=["typed"],S7=I(z0,E7,e=>{var{typed:t}=e;return t(z0,{"number, number":$x,"Complex, Complex":function(n,a){return n.sub(a)},"BigNumber, BigNumber":function(n,a){return n.minus(a)},"bigint, bigint":function(n,a){return n-a},"Fraction, Fraction":function(n,a){return n.sub(a)},"Unit, Unit":t.referToSelf(r=>(n,a)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(a.value===null||a.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(a))throw new Error("Units do not match");var i=n.clone();return i.value=t.find(r,[i.valueType(),a.valueType()])(i.value,a.value),i.fixPrefix=!1,i})})}),j0="cbrt",M7=["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],T7=I(j0,M7,e=>{var{config:t,typed:r,isNegative:n,unaryMinus:a,matrix:i,Complex:o,BigNumber:s,Fraction:u}=e;return r(j0,{number:Ss,Complex:l,"Complex, boolean":l,BigNumber:function(m){return m.cbrt()},Unit:c});function l(f,m){var d=f.arg()/3,h=f.abs(),p=new o(Ss(h),0).mul(new o(0,d).exp());if(m){var y=[p,new o(Ss(h),0).mul(new o(0,d+Math.PI*2/3).exp()),new o(Ss(h),0).mul(new o(0,d-Math.PI*2/3).exp())];return t.matrix==="Array"?y:i(y)}else return p}function c(f){if(f.value&&$a(f.value)){var m=f.clone();return m.value=1,m=m.pow(1/3),m.value=l(f.value),m}else{var d=n(f.value);d&&(f.value=a(f.value));var h;Ze(f.value)?h=new s(1).div(3):ru(f.value)?h=new u(1,3):h=1/3;var p=f.pow(h);return d&&(p.value=a(p.value)),p}}}),F7="matAlgo11xS0s",P7=["typed","equalScalar"],Fr=I(F7,P7,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o,s){var u=a._values,l=a._index,c=a._ptr,f=a._size,m=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=f[0],h=f[1],p,y=r,w=0,D=o;typeof m=="string"&&(p=m,y=t.find(r,[p,p]),w=t.convert(0,p),i=t.convert(i,p),D=t.find(o,[p,p]));for(var v=[],x=[],g=[],b=0;b<h;b++){g[b]=x.length;for(var C=c[b],N=c[b+1],A=C;A<N;A++){var E=l[A],S=s?D(i,u[A]):D(u[A],i);y(S,w)||(x.push(E),v.push(S))}}return g[h]=x.length,a.createSparseMatrix({values:v,index:x,ptr:g,size:[d,h],datatype:p})}}),k7="matAlgo12xSfs",O7=["typed","DenseMatrix"],lr=I(k7,O7,e=>{var{typed:t,DenseMatrix:r}=e;return function(a,i,o,s){var u=a._values,l=a._index,c=a._ptr,f=a._size,m=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=f[0],h=f[1],p,y=o;typeof m=="string"&&(p=m,i=t.convert(i,p),y=t.find(o,[p,p]));for(var w=[],D=[],v=[],x=0;x<h;x++){for(var g=x+1,b=c[x],C=c[x+1],N=b;N<C;N++){var A=l[N];D[A]=u[N],v[A]=g}for(var E=0;E<d;E++)x===0&&(w[E]=[]),v[E]===g?w[E][x]=s?y(i,D[E]):y(D[E],i):w[E][x]=s?y(i,0):y(0,i)}return new r({data:w,size:[d,h],datatype:p})}}),B7="matAlgo14xDs",$7=["typed"],$n=I(B7,$7,e=>{var{typed:t}=e;return function(a,i,o,s){var u=a._data,l=a._size,c=a._datatype,f,m=o;typeof c=="string"&&(f=c,i=t.convert(i,f),m=t.find(o,[f,f]));var d=l.length>0?r(m,0,l,l[0],u,i,s):[];return a.createDenseMatrix({data:d,size:Ve(l),datatype:f})};function r(n,a,i,o,s,u,l){var c=[];if(a===i.length-1)for(var f=0;f<o;f++)c[f]=l?n(u,s[f]):n(s[f],u);else for(var m=0;m<o;m++)c[m]=r(n,a+1,i,i[a+1],s[m],u,l);return c}}),Wm="ceil",_7=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],I7=new hi(10),z7=I(Wm,["typed","config","round"],e=>{var{typed:t,config:r,round:n}=e;function a(i){var o=Math.ceil(i),s=n(i);return o===s?o:Ar(i,s,r.relTol,r.absTol)&&!Ar(i,o,r.relTol,r.absTol)?s:o}return t(Wm,{number:a,"number, number":function(o,s){if(!ke(s))throw new RangeError("number of decimals in function ceil must be an integer");if(s<0||s>15)throw new RangeError("number of decimals in ceil number must be in range 0-15");var u=10**s;return a(o*u)/u}})}),j7=I(Wm,_7,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s}=e,u=Fr({typed:t,equalScalar:i}),l=lr({typed:t,DenseMatrix:s}),c=$n({typed:t}),f=z7({typed:t,config:r,round:n});function m(d){var h=(w,D)=>Bn(w,D,r.relTol,r.absTol),p=d.ceil(),y=n(d);return p.eq(y)?p:h(d,y)&&!h(d,p)?y:p}return t("ceil",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(h){return h.ceil()},"Complex, number":function(h,p){return h.ceil(p)},"Complex, BigNumber":function(h,p){return h.ceil(p.toNumber())},BigNumber:m,"BigNumber, BigNumber":function(h,p){var y=I7.pow(p);return m(h.mul(y)).div(y)},bigint:d=>d,"bigint, number":(d,h)=>d,"bigint, BigNumber":(d,h)=>d,Fraction:function(h){return h.ceil()},"Fraction, number":function(h,p){return h.ceil(p)},"Fraction, BigNumber":function(h,p){return h.ceil(p.toNumber())},"Unit, number, Unit":t.referToSelf(d=>function(h,p,y){var w=h.toNumeric(y);return y.multiply(d(w,p))}),"Unit, BigNumber, Unit":t.referToSelf(d=>(h,p,y)=>d(h,p.toNumber(),y)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(d=>(h,p,y)=>Qe(h,w=>d(w,p,y),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(d=>(h,p)=>d(h,0,p)),"Array | Matrix":t.referToSelf(d=>h=>Qe(h,d,!0)),"Array, number | BigNumber":t.referToSelf(d=>(h,p)=>Qe(h,y=>d(y,p),!0)),"SparseMatrix, number | BigNumber":t.referToSelf(d=>(h,p)=>u(h,p,d,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(d=>(h,p)=>c(h,p,d,!1)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(d=>(h,p)=>c(a(p),h,d,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(d=>(h,p)=>i(h,0)?o(p.size(),p.storage()):p.storage()==="dense"?c(p,h,d,!0):l(p,h,d,!0))})}),q0="cube",q7=["typed"],R7=I(q0,q7,e=>{var{typed:t}=e;return t(q0,{number:jx,Complex:function(n){return n.mul(n).mul(n)},BigNumber:function(n){return n.times(n).times(n)},bigint:function(n){return n*n*n},Fraction:function(n){return n.pow(3)},Unit:function(n){return n.pow(3)}})}),R0="exp",L7=["typed"],H7=I(R0,L7,e=>{var{typed:t}=e;return t(R0,{number:qx,Complex:function(n){return n.exp()},BigNumber:function(n){return n.exp()}})}),L0="expm1",G7=["typed","Complex"],V7=I(L0,G7,e=>{var{typed:t,Complex:r}=e;return t(L0,{number:Rx,Complex:function(a){var i=Math.exp(a.re);return new r(i*Math.cos(a.im)-1,i*Math.sin(a.im))},BigNumber:function(a){return a.exp().minus(1)}})}),Jm="fix",U7=["typed","Complex","matrix","ceil","floor","equalScalar","zeros","DenseMatrix"],W7=I(Jm,["typed","ceil","floor"],e=>{var{typed:t,ceil:r,floor:n}=e;return t(Jm,{number:function(i){return i>0?n(i):r(i)},"number, number":function(i,o){return i>0?n(i,o):r(i,o)}})}),J7=I(Jm,U7,e=>{var{typed:t,Complex:r,matrix:n,ceil:a,floor:i,equalScalar:o,zeros:s,DenseMatrix:u}=e,l=lr({typed:t,DenseMatrix:u}),c=$n({typed:t}),f=W7({typed:t,ceil:a,floor:i});return t("fix",{number:f.signatures.number,"number, number | BigNumber":f.signatures["number,number"],Complex:function(d){return new r(d.re>0?Math.floor(d.re):Math.ceil(d.re),d.im>0?Math.floor(d.im):Math.ceil(d.im))},"Complex, number":function(d,h){return new r(d.re>0?i(d.re,h):a(d.re,h),d.im>0?i(d.im,h):a(d.im,h))},"Complex, BigNumber":function(d,h){var p=h.toNumber();return new r(d.re>0?i(d.re,p):a(d.re,p),d.im>0?i(d.im,p):a(d.im,p))},BigNumber:function(d){return d.isNegative()?a(d):i(d)},"BigNumber, number | BigNumber":function(d,h){return d.isNegative()?a(d,h):i(d,h)},bigint:m=>m,"bigint, number":(m,d)=>m,"bigint, BigNumber":(m,d)=>m,Fraction:function(d){return d.s<0n?d.ceil():d.floor()},"Fraction, number | BigNumber":function(d,h){return d.s<0n?a(d,h):i(d,h)},"Unit, number, Unit":t.referToSelf(m=>function(d,h,p){var y=d.toNumeric(p);return p.multiply(m(y,h))}),"Unit, BigNumber, Unit":t.referToSelf(m=>(d,h,p)=>m(d,h.toNumber(),p)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(m=>(d,h,p)=>Qe(d,y=>m(y,h,p),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(m=>(d,h)=>m(d,0,h)),"Array | Matrix":t.referToSelf(m=>d=>Qe(d,m,!0)),"Array | Matrix, number | BigNumber":t.referToSelf(m=>(d,h)=>Qe(d,p=>m(p,h),!0)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(m=>(d,h)=>c(n(h),d,m,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(m=>(d,h)=>o(d,0)?s(h.size(),h.storage()):h.storage()==="dense"?c(h,d,m,!0):l(h,d,m,!0))})}),Km="floor",K7=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],Y7=new hi(10),Z7=I(Km,["typed","config","round"],e=>{var{typed:t,config:r,round:n}=e;function a(i){var o=Math.floor(i),s=n(i);return o===s?o:Ar(i,s,r.relTol,r.absTol)&&!Ar(i,o,r.relTol,r.absTol)?s:o}return t(Km,{number:a,"number, number":function(o,s){if(!ke(s))throw new RangeError("number of decimals in function floor must be an integer");if(s<0||s>15)throw new RangeError("number of decimals in floor number must be in range 0 - 15");var u=10**s;return a(o*u)/u}})}),D2=I(Km,K7,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s}=e,u=Fr({typed:t,equalScalar:i}),l=lr({typed:t,DenseMatrix:s}),c=$n({typed:t}),f=Z7({typed:t,config:r,round:n});function m(d){var h=(w,D)=>Bn(w,D,r.relTol,r.absTol),p=d.floor(),y=n(d);return p.eq(y)?p:h(d,y)&&!h(d,p)?y:p}return t("floor",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(h){return h.floor()},"Complex, number":function(h,p){return h.floor(p)},"Complex, BigNumber":function(h,p){return h.floor(p.toNumber())},BigNumber:m,"BigNumber, BigNumber":function(h,p){var y=Y7.pow(p);return m(h.mul(y)).div(y)},bigint:d=>d,"bigint, number":(d,h)=>d,"bigint, BigNumber":(d,h)=>d,Fraction:function(h){return h.floor()},"Fraction, number":function(h,p){return h.floor(p)},"Fraction, BigNumber":function(h,p){return h.floor(p.toNumber())},"Unit, number, Unit":t.referToSelf(d=>function(h,p,y){var w=h.toNumeric(y);return y.multiply(d(w,p))}),"Unit, BigNumber, Unit":t.referToSelf(d=>(h,p,y)=>d(h,p.toNumber(),y)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(d=>(h,p,y)=>Qe(h,w=>d(w,p,y),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(d=>(h,p)=>d(h,0,p)),"Array | Matrix":t.referToSelf(d=>h=>Qe(h,d,!0)),"Array, number | BigNumber":t.referToSelf(d=>(h,p)=>Qe(h,y=>d(y,p),!0)),"SparseMatrix, number | BigNumber":t.referToSelf(d=>(h,p)=>u(h,p,d,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(d=>(h,p)=>c(h,p,d,!1)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(d=>(h,p)=>c(a(p),h,d,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(d=>(h,p)=>i(h,0)?o(p.size(),p.storage()):p.storage()==="dense"?c(p,h,d,!0):l(p,h,d,!0))})}),Q7="matAlgo02xDS0",X7=["typed","equalScalar"],ea=I(Q7,X7,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o,s){var u=a._data,l=a._size,c=a._datatype||a.getDataType(),f=i._values,m=i._index,d=i._ptr,h=i._size,p=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(l.length!==h.length)throw new nt(l.length,h.length);if(l[0]!==h[0]||l[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+h+")");if(!f)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var y=l[0],w=l[1],D,v=r,x=0,g=o;typeof c=="string"&&c===p&&c!=="mixed"&&(D=c,v=t.find(r,[D,D]),x=t.convert(0,D),g=t.find(o,[D,D]));for(var b=[],C=[],N=[],A=0;A<w;A++){N[A]=C.length;for(var E=d[A],S=d[A+1],F=E;F<S;F++){var k=m[F],B=s?g(f[F],u[k][A]):g(u[k][A],f[F]);v(B,x)||(C.push(k),b.push(B))}}return N[w]=C.length,i.createSparseMatrix({values:b,index:C,ptr:N,size:[y,w],datatype:c===a._datatype&&p===i._datatype?D:void 0})}}),ez="matAlgo03xDSf",tz=["typed"],jr=I(ez,tz,e=>{var{typed:t}=e;return function(n,a,i,o){var s=n._data,u=n._size,l=n._datatype||n.getDataType(),c=a._values,f=a._index,m=a._ptr,d=a._size,h=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==d.length)throw new nt(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var p=u[0],y=u[1],w,D=0,v=i;typeof l=="string"&&l===h&&l!=="mixed"&&(w=l,D=t.convert(0,w),v=t.find(i,[w,w]));for(var x=[],g=0;g<p;g++)x[g]=[];for(var b=[],C=[],N=0;N<y;N++){for(var A=N+1,E=m[N],S=m[N+1],F=E;F<S;F++){var k=f[F];b[k]=o?v(c[F],s[k][N]):v(s[k][N],c[F]),C[k]=A}for(var B=0;B<p;B++)C[B]===A?x[B][N]=b[B]:x[B][N]=o?v(D,s[B][N]):v(s[B][N],D)}return n.createDenseMatrix({data:x,size:[p,y],datatype:l===n._datatype&&h===a._datatype?w:void 0})}}),rz="matAlgo05xSfSf",nz=["typed","equalScalar"],Tc=I(rz,nz,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var s=a._values,u=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),m=i._values,d=i._index,h=i._ptr,p=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==p.length)throw new nt(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+p+")");var w=c[0],D=c[1],v,x=r,g=0,b=o;typeof f=="string"&&f===y&&f!=="mixed"&&(v=f,x=t.find(r,[v,v]),g=t.convert(0,v),b=t.find(o,[v,v]));var C=s&&m?[]:void 0,N=[],A=[],E=C?[]:void 0,S=C?[]:void 0,F=[],k=[],B,L,M,$;for(L=0;L<D;L++){A[L]=N.length;var H=L+1;for(M=l[L],$=l[L+1];M<$;M++)B=u[M],N.push(B),F[B]=H,E&&(E[B]=s[M]);for(M=h[L],$=h[L+1];M<$;M++)B=d[M],F[B]!==H&&N.push(B),k[B]=H,S&&(S[B]=m[M]);if(C)for(M=A[L];M<N.length;){B=N[M];var j=F[B],Y=k[B];if(j===H||Y===H){var te=j===H?E[B]:g,K=Y===H?S[B]:g,P=b(te,K);x(P,g)?N.splice(M,1):(C.push(P),M++)}}}return A[D]=N.length,a.createSparseMatrix({values:C,index:N,ptr:A,size:[w,D],datatype:f===a._datatype&&y===i._datatype?v:void 0})}}),az="matAlgo13xDD",iz=["typed"],N2=I(az,iz,e=>{var{typed:t}=e;return function(a,i,o){var s=a._data,u=a._size,l=a._datatype,c=i._data,f=i._size,m=i._datatype,d=[];if(u.length!==f.length)throw new nt(u.length,f.length);for(var h=0;h<u.length;h++){if(u[h]!==f[h])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+f+")");d[h]=u[h]}var p,y=o;typeof l=="string"&&l===m&&(p=l,y=t.find(o,[p,p]));var w=d.length>0?r(y,0,d,d[0],s,c):[];return a.createDenseMatrix({data:w,size:d,datatype:p})};function r(n,a,i,o,s,u){var l=[];if(a===i.length-1)for(var c=0;c<o;c++)l[c]=n(s[c],u[c]);else for(var f=0;f<o;f++)l[f]=r(n,a+1,i,i[a+1],s[f],u[f]);return l}});function vr(e,t){if(La(e.size(),t.size()))return[e,t];var r=Zl(e.size(),t.size());return[e,t].map(n=>oz(n,r))}function oz(e,t){return La(e.size(),t)?e:e.create(Ui(e.valueOf(),t),e.datatype())}var sz="matrixAlgorithmSuite",uz=["typed","matrix"],$t=I(sz,uz,e=>{var{typed:t,matrix:r}=e,n=N2({typed:t}),a=$n({typed:t});return function(o){var s=o.elop,u=o.SD||o.DS,l;s?(l={"DenseMatrix, DenseMatrix":(d,h)=>n(...vr(d,h),s),"Array, Array":(d,h)=>n(...vr(r(d),r(h)),s).valueOf(),"Array, DenseMatrix":(d,h)=>n(...vr(r(d),h),s),"DenseMatrix, Array":(d,h)=>n(...vr(d,r(h)),s)},o.SS&&(l["SparseMatrix, SparseMatrix"]=(d,h)=>o.SS(...vr(d,h),s,!1)),o.DS&&(l["DenseMatrix, SparseMatrix"]=(d,h)=>o.DS(...vr(d,h),s,!1),l["Array, SparseMatrix"]=(d,h)=>o.DS(...vr(r(d),h),s,!1)),u&&(l["SparseMatrix, DenseMatrix"]=(d,h)=>u(...vr(h,d),s,!0),l["SparseMatrix, Array"]=(d,h)=>u(...vr(r(h),d),s,!0))):(l={"DenseMatrix, DenseMatrix":t.referToSelf(d=>(h,p)=>n(...vr(h,p),d)),"Array, Array":t.referToSelf(d=>(h,p)=>n(...vr(r(h),r(p)),d).valueOf()),"Array, DenseMatrix":t.referToSelf(d=>(h,p)=>n(...vr(r(h),p),d)),"DenseMatrix, Array":t.referToSelf(d=>(h,p)=>n(...vr(h,r(p)),d))},o.SS&&(l["SparseMatrix, SparseMatrix"]=t.referToSelf(d=>(h,p)=>o.SS(...vr(h,p),d,!1))),o.DS&&(l["DenseMatrix, SparseMatrix"]=t.referToSelf(d=>(h,p)=>o.DS(...vr(h,p),d,!1)),l["Array, SparseMatrix"]=t.referToSelf(d=>(h,p)=>o.DS(...vr(r(h),p),d,!1))),u&&(l["SparseMatrix, DenseMatrix"]=t.referToSelf(d=>(h,p)=>u(...vr(p,h),d,!0)),l["SparseMatrix, Array"]=t.referToSelf(d=>(h,p)=>u(...vr(r(p),h),d,!0))));var c=o.scalar||"any",f=o.Ds||o.Ss;f&&(s?(l["DenseMatrix,"+c]=(d,h)=>a(d,h,s,!1),l[c+", DenseMatrix"]=(d,h)=>a(h,d,s,!0),l["Array,"+c]=(d,h)=>a(r(d),h,s,!1).valueOf(),l[c+", Array"]=(d,h)=>a(r(h),d,s,!0).valueOf()):(l["DenseMatrix,"+c]=t.referToSelf(d=>(h,p)=>a(h,p,d,!1)),l[c+", DenseMatrix"]=t.referToSelf(d=>(h,p)=>a(p,h,d,!0)),l["Array,"+c]=t.referToSelf(d=>(h,p)=>a(r(h),p,d,!1).valueOf()),l[c+", Array"]=t.referToSelf(d=>(h,p)=>a(r(p),h,d,!0).valueOf())));var m=o.sS!==void 0?o.sS:o.Ss;return s?(o.Ss&&(l["SparseMatrix,"+c]=(d,h)=>o.Ss(d,h,s,!1)),m&&(l[c+", SparseMatrix"]=(d,h)=>m(h,d,s,!0))):(o.Ss&&(l["SparseMatrix,"+c]=t.referToSelf(d=>(h,p)=>o.Ss(h,p,d,!1))),m&&(l[c+", SparseMatrix"]=t.referToSelf(d=>(h,p)=>m(p,h,d,!0)))),s&&s.signatures&&ax(l,s.signatures),l}}),H0="mod",lz=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix","concat"],A2=I(H0,lz,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s,concat:u}=e,l=D2({typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s}),c=ea({typed:t,equalScalar:i}),f=jr({typed:t}),m=Tc({typed:t,equalScalar:i}),d=Fr({typed:t,equalScalar:i}),h=lr({typed:t,DenseMatrix:s}),p=$t({typed:t,matrix:a,concat:u});return t(H0,{"number, number":y,"BigNumber, BigNumber":function(D,v){return v.isZero()?D:D.sub(v.mul(l(D.div(v))))},"bigint, bigint":function(D,v){if(v===0n)return D;if(D<0){var x=D%v;return x===0n?x:x+v}return D%v},"Fraction, Fraction":function(D,v){return v.equals(0)?D:D.sub(v.mul(l(D.div(v))))}},p({SS:m,DS:f,SD:c,Ss:d,sS:h}));function y(w,D){return D===0?w:w-D*l(w/D)}}),cz="matAlgo01xDSid",fz=["typed"],bi=I(cz,fz,e=>{var{typed:t}=e;return function(n,a,i,o){var s=n._data,u=n._size,l=n._datatype||n.getDataType(),c=a._values,f=a._index,m=a._ptr,d=a._size,h=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==d.length)throw new nt(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var p=u[0],y=u[1],w=typeof l=="string"&&l!=="mixed"&&l===h?l:void 0,D=w?t.find(i,[w,w]):i,v,x,g=[];for(v=0;v<p;v++)g[v]=[];var b=[],C=[];for(x=0;x<y;x++){for(var N=x+1,A=m[x],E=m[x+1],S=A;S<E;S++)v=f[S],b[v]=o?D(c[S],s[v][x]):D(s[v][x],c[S]),C[v]=N;for(v=0;v<p;v++)C[v]===N?g[v][x]=b[v]:g[v][x]=s[v][x]}return n.createDenseMatrix({data:g,size:[p,y],datatype:l===n._datatype&&h===a._datatype?w:void 0})}}),mz="matAlgo04xSidSid",dz=["typed","equalScalar"],Md=I(mz,dz,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var s=a._values,u=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),m=i._values,d=i._index,h=i._ptr,p=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==p.length)throw new nt(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+p+")");var w=c[0],D=c[1],v,x=r,g=0,b=o;typeof f=="string"&&f===y&&f!=="mixed"&&(v=f,x=t.find(r,[v,v]),g=t.convert(0,v),b=t.find(o,[v,v]));var C=s&&m?[]:void 0,N=[],A=[],E=s&&m?[]:void 0,S=s&&m?[]:void 0,F=[],k=[],B,L,M,$,H;for(L=0;L<D;L++){A[L]=N.length;var j=L+1;for($=l[L],H=l[L+1],M=$;M<H;M++)B=u[M],N.push(B),F[B]=j,E&&(E[B]=s[M]);for($=h[L],H=h[L+1],M=$;M<H;M++)if(B=d[M],F[B]===j){if(E){var Y=b(E[B],m[M]);x(Y,g)?F[B]=null:E[B]=Y}}else N.push(B),k[B]=j,S&&(S[B]=m[M]);if(E&&S)for(M=A[L];M<N.length;)B=N[M],F[B]===j?(C[M]=E[B],M++):k[B]===j?(C[M]=S[B],M++):N.splice(M,1)}return A[D]=N.length,a.createSparseMatrix({values:C,index:N,ptr:A,size:[w,D],datatype:f===a._datatype&&y===i._datatype?v:void 0})}}),hz="matAlgo10xSids",pz=["typed","DenseMatrix"],no=I(hz,pz,e=>{var{typed:t,DenseMatrix:r}=e;return function(a,i,o,s){var u=a._values,l=a._index,c=a._ptr,f=a._size,m=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=f[0],h=f[1],p,y=o;typeof m=="string"&&(p=m,i=t.convert(i,p),y=t.find(o,[p,p]));for(var w=[],D=[],v=[],x=0;x<h;x++){for(var g=x+1,b=c[x],C=c[x+1],N=b;N<C;N++){var A=l[N];D[A]=u[N],v[A]=g}for(var E=0;E<d;E++)x===0&&(w[E]=[]),v[E]===g?w[E][x]=s?y(i,D[E]):y(D[E],i):w[E][x]=i}return new r({data:w,size:[d,h],datatype:p})}});function ao(e,t,r,n){if(!(this instanceof ao))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=r,this.max=n,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+r+(n!=null?"-"+n:"")+" expected)",this.stack=new Error().stack}ao.prototype=new Error;ao.prototype.constructor=Error;ao.prototype.name="ArgumentsError";ao.prototype.isArgumentsError=!0;var G0="gcd",gz=["typed","config","round","matrix","equalScalar","zeros","BigNumber","DenseMatrix","concat"],_f="number | BigNumber | Fraction | Matrix | Array",vz="".concat(_f,", ").concat(_f,", ...").concat(_f);function V0(e){return!e.some(t=>Array.isArray(t))}var yz=I(G0,gz,e=>{var{typed:t,matrix:r,config:n,round:a,equalScalar:i,zeros:o,BigNumber:s,DenseMatrix:u,concat:l}=e,c=A2({typed:t,config:n,round:a,matrix:r,equalScalar:i,zeros:o,DenseMatrix:u,concat:l}),f=bi({typed:t}),m=Md({typed:t,equalScalar:i}),d=no({typed:t,DenseMatrix:u}),h=$t({typed:t,matrix:r,concat:l});return t(G0,{"number, number":p,"BigNumber, BigNumber":y,"Fraction, Fraction":(w,D)=>w.gcd(D)},h({SS:m,DS:f,Ss:d}),{[vz]:t.referToSelf(w=>(D,v,x)=>{for(var g=w(D,v),b=0;b<x.length;b++)g=w(g,x[b]);return g}),Array:t.referToSelf(w=>D=>{if(D.length===1&&Array.isArray(D[0])&&V0(D[0]))return w(...D[0]);if(V0(D))return w(...D);throw new ao("gcd() supports only 1d matrices!")}),Matrix:t.referToSelf(w=>D=>w(D.toArray()))});function p(w,D){if(!ke(w)||!ke(D))throw new Error("Parameters in function gcd must be integer numbers");for(var v;D!==0;)v=c(w,D),w=D,D=v;return w<0?-w:w}function y(w,D){if(!w.isInt()||!D.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var v=new s(0);!D.isZero();){var x=c(w,D);w=D,D=x}return w.lt(v)?w.neg():w}}),bz="matAlgo06xS0S0",wz=["typed","equalScalar"],Fc=I(bz,wz,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var s=a._values,u=a._size,l=a._datatype||a._data===void 0?a._datatype:a.getDataType(),c=i._values,f=i._size,m=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(u.length!==f.length)throw new nt(u.length,f.length);if(u[0]!==f[0]||u[1]!==f[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+f+")");var d=u[0],h=u[1],p,y=r,w=0,D=o;typeof l=="string"&&l===m&&l!=="mixed"&&(p=l,y=t.find(r,[p,p]),w=t.convert(0,p),D=t.find(o,[p,p]));for(var v=s&&c?[]:void 0,x=[],g=[],b=v?[]:void 0,C=[],N=[],A=0;A<h;A++){g[A]=x.length;var E=A+1;if(m0(a,A,C,b,N,E,x,D),m0(i,A,C,b,N,E,x,D),b)for(var S=g[A];S<x.length;){var F=x[S];if(N[F]===E){var k=b[F];y(k,w)?x.splice(S,1):(v.push(k),S++)}else x.splice(S,1)}else for(var B=g[A];B<x.length;){var L=x[B];N[L]!==E?x.splice(B,1):B++}}return g[h]=x.length,a.createSparseMatrix({values:v,index:x,ptr:g,size:[d,h],datatype:l===a._datatype&&m===i._datatype?p:void 0})}}),U0="lcm",xz=["typed","matrix","equalScalar","concat"],Dz=I(U0,xz,e=>{var{typed:t,matrix:r,equalScalar:n,concat:a}=e,i=ea({typed:t,equalScalar:n}),o=Fc({typed:t,equalScalar:n}),s=Fr({typed:t,equalScalar:n}),u=$t({typed:t,matrix:r,concat:a}),l="number | BigNumber | Fraction | Matrix | Array",c={};return c["".concat(l,", ").concat(l,", ...").concat(l)]=t.referToSelf(m=>(d,h,p)=>{for(var y=m(d,h),w=0;w<p.length;w++)y=m(y,p[w]);return y}),t(U0,{"number, number":Lx,"BigNumber, BigNumber":f,"Fraction, Fraction":(m,d)=>m.lcm(d)},u({SS:o,DS:i,Ss:s}),c);function f(m,d){if(!m.isInt()||!d.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(m.isZero())return m;if(d.isZero())return d;for(var h=m.times(d);!d.isZero();){var p=d;d=m.mod(p),m=p}return h.div(m).abs()}});function Td(e,t,r,n){return function(a){if(a>0||r.predictable){if(a<=0)return NaN;var i=a.toString(16),o=i.substring(0,15);return e*(i.length-o.length)+t(+("0x"+o))}return n(a.toNumber())}}var W0="log10",Nz=["typed","config","Complex"],Az=ec(16),Cz=I(W0,Nz,e=>{var{typed:t,config:r,Complex:n}=e;function a(o){return o.log().div(Math.LN10)}function i(o){return a(new n(o,0))}return t(W0,{number:function(s){return s>=0||r.predictable?ec(s):i(s)},bigint:Td(Az,ec,r,i),Complex:a,BigNumber:function(s){return!s.isNegative()||r.predictable?s.log():i(s.toNumber())},"Array | Matrix":t.referToSelf(o=>s=>Qe(s,o))})}),J0="log2",Ez=["typed","config","Complex"],Sz=I(J0,Ez,e=>{var{typed:t,config:r,Complex:n}=e;function a(o){return i(new n(o,0))}return t(J0,{number:function(s){return s>=0||r.predictable?Rm(s):a(s)},bigint:Td(4,Rm,r,a),Complex:i,BigNumber:function(s){return!s.isNegative()||r.predictable?s.log(2):a(s.toNumber())},"Array | Matrix":t.referToSelf(o=>s=>Qe(s,o))});function i(o){var s=Math.sqrt(o.re*o.re+o.im*o.im);return new n(Math.log2?Math.log2(s):Math.log(s)/Math.LN2,Math.atan2(o.im,o.re)/Math.LN2)}}),Mz="multiplyScalar",Tz=["typed"],Fz=I(Mz,Tz,e=>{var{typed:t}=e;return t("multiplyScalar",{"number, number":_x,"Complex, Complex":function(n,a){return n.mul(a)},"BigNumber, BigNumber":function(n,a){return n.times(a)},"bigint, bigint":function(n,a){return n*a},"Fraction, Fraction":function(n,a){return n.mul(a)},"number | Fraction | BigNumber | Complex, Unit":(r,n)=>n.multiply(r),"Unit, number | Fraction | BigNumber | Complex | Unit":(r,n)=>r.multiply(n)})}),K0="multiply",Pz=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],kz=I(K0,Pz,e=>{var{typed:t,matrix:r,addScalar:n,multiplyScalar:a,equalScalar:i,dot:o}=e,s=Fr({typed:t,equalScalar:i}),u=$n({typed:t});function l(g,b){switch(g.length){case 1:switch(b.length){case 1:if(g[0]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(g[0]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+g[0]+") must match Matrix rows ("+b[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+b.length+" dimensions)")}break;case 2:switch(b.length){case 1:if(g[1]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+g[1]+") must match Vector length ("+b[0]+")");break;case 2:if(g[1]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+g[1]+") must match Matrix B rows ("+b[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+b.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+g.length+" dimensions)")}}function c(g,b,C){if(C===0)throw new Error("Cannot multiply two empty vectors");return o(g,b)}function f(g,b){if(b.storage()!=="dense")throw new Error("Support for SparseMatrix not implemented");return m(g,b)}function m(g,b){var C=g._data,N=g._size,A=g._datatype||g.getDataType(),E=b._data,S=b._size,F=b._datatype||b.getDataType(),k=N[0],B=S[1],L,M=n,$=a;A&&F&&A===F&&typeof A=="string"&&A!=="mixed"&&(L=A,M=t.find(n,[L,L]),$=t.find(a,[L,L]));for(var H=[],j=0;j<B;j++){for(var Y=$(C[0],E[0][j]),te=1;te<k;te++)Y=M(Y,$(C[te],E[te][j]));H[j]=Y}return g.createDenseMatrix({data:H,size:[B],datatype:A===g._datatype&&F===b._datatype?L:void 0})}var d=t("_multiplyMatrixVector",{"DenseMatrix, any":p,"SparseMatrix, any":D}),h=t("_multiplyMatrixMatrix",{"DenseMatrix, DenseMatrix":y,"DenseMatrix, SparseMatrix":w,"SparseMatrix, DenseMatrix":v,"SparseMatrix, SparseMatrix":x});function p(g,b){var C=g._data,N=g._size,A=g._datatype||g.getDataType(),E=b._data,S=b._datatype||b.getDataType(),F=N[0],k=N[1],B,L=n,M=a;A&&S&&A===S&&typeof A=="string"&&A!=="mixed"&&(B=A,L=t.find(n,[B,B]),M=t.find(a,[B,B]));for(var $=[],H=0;H<F;H++){for(var j=C[H],Y=M(j[0],E[0]),te=1;te<k;te++)Y=L(Y,M(j[te],E[te]));$[H]=Y}return g.createDenseMatrix({data:$,size:[F],datatype:A===g._datatype&&S===b._datatype?B:void 0})}function y(g,b){var C=g._data,N=g._size,A=g._datatype||g.getDataType(),E=b._data,S=b._size,F=b._datatype||b.getDataType(),k=N[0],B=N[1],L=S[1],M,$=n,H=a;A&&F&&A===F&&typeof A=="string"&&A!=="mixed"&&A!=="mixed"&&(M=A,$=t.find(n,[M,M]),H=t.find(a,[M,M]));for(var j=[],Y=0;Y<k;Y++){var te=C[Y];j[Y]=[];for(var K=0;K<L;K++){for(var P=H(te[0],E[0][K]),X=1;X<B;X++)P=$(P,H(te[X],E[X][K]));j[Y][K]=P}}return g.createDenseMatrix({data:j,size:[k,L],datatype:A===g._datatype&&F===b._datatype?M:void 0})}function w(g,b){var C=g._data,N=g._size,A=g._datatype||g.getDataType(),E=b._values,S=b._index,F=b._ptr,k=b._size,B=b._datatype||b._data===void 0?b._datatype:b.getDataType();if(!E)throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");var L=N[0],M=k[1],$,H=n,j=a,Y=i,te=0;A&&B&&A===B&&typeof A=="string"&&A!=="mixed"&&($=A,H=t.find(n,[$,$]),j=t.find(a,[$,$]),Y=t.find(i,[$,$]),te=t.convert(0,$));for(var K=[],P=[],X=[],z=b.createSparseMatrix({values:K,index:P,ptr:X,size:[L,M],datatype:A===g._datatype&&B===b._datatype?$:void 0}),ie=0;ie<M;ie++){X[ie]=P.length;var se=F[ie],V=F[ie+1];if(V>se)for(var _=0,W=0;W<L;W++){for(var ne=W+1,Q=void 0,ue=se;ue<V;ue++){var oe=S[ue];_!==ne?(Q=j(C[W][oe],E[ue]),_=ne):Q=H(Q,j(C[W][oe],E[ue]))}_===ne&&!Y(Q,te)&&(P.push(W),K.push(Q))}}return X[M]=P.length,z}function D(g,b){var C=g._values,N=g._index,A=g._ptr,E=g._datatype||g._data===void 0?g._datatype:g.getDataType();if(!C)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var S=b._data,F=b._datatype||b.getDataType(),k=g._size[0],B=b._size[0],L=[],M=[],$=[],H,j=n,Y=a,te=i,K=0;E&&F&&E===F&&typeof E=="string"&&E!=="mixed"&&(H=E,j=t.find(n,[H,H]),Y=t.find(a,[H,H]),te=t.find(i,[H,H]),K=t.convert(0,H));var P=[],X=[];$[0]=0;for(var z=0;z<B;z++){var ie=S[z];if(!te(ie,K))for(var se=A[z],V=A[z+1],_=se;_<V;_++){var W=N[_];X[W]?P[W]=j(P[W],Y(ie,C[_])):(X[W]=!0,M.push(W),P[W]=Y(ie,C[_]))}}for(var ne=M.length,Q=0;Q<ne;Q++){var ue=M[Q];L[Q]=P[ue]}return $[1]=M.length,g.createSparseMatrix({values:L,index:M,ptr:$,size:[k,1],datatype:E===g._datatype&&F===b._datatype?H:void 0})}function v(g,b){var C=g._values,N=g._index,A=g._ptr,E=g._datatype||g._data===void 0?g._datatype:g.getDataType();if(!C)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var S=b._data,F=b._datatype||b.getDataType(),k=g._size[0],B=b._size[0],L=b._size[1],M,$=n,H=a,j=i,Y=0;E&&F&&E===F&&typeof E=="string"&&E!=="mixed"&&(M=E,$=t.find(n,[M,M]),H=t.find(a,[M,M]),j=t.find(i,[M,M]),Y=t.convert(0,M));for(var te=[],K=[],P=[],X=g.createSparseMatrix({values:te,index:K,ptr:P,size:[k,L],datatype:E===g._datatype&&F===b._datatype?M:void 0}),z=[],ie=[],se=0;se<L;se++){P[se]=K.length;for(var V=se+1,_=0;_<B;_++){var W=S[_][se];if(!j(W,Y))for(var ne=A[_],Q=A[_+1],ue=ne;ue<Q;ue++){var oe=N[ue];ie[oe]!==V?(ie[oe]=V,K.push(oe),z[oe]=H(W,C[ue])):z[oe]=$(z[oe],H(W,C[ue]))}}for(var be=P[se],Me=K.length,Pe=be;Pe<Me;Pe++){var Ee=K[Pe];te[Pe]=z[Ee]}}return P[L]=K.length,X}function x(g,b){var C=g._values,N=g._index,A=g._ptr,E=g._datatype||g._data===void 0?g._datatype:g.getDataType(),S=b._values,F=b._index,k=b._ptr,B=b._datatype||b._data===void 0?b._datatype:b.getDataType(),L=g._size[0],M=b._size[1],$=C&&S,H,j=n,Y=a;E&&B&&E===B&&typeof E=="string"&&E!=="mixed"&&(H=E,j=t.find(n,[H,H]),Y=t.find(a,[H,H]));for(var te=$?[]:void 0,K=[],P=[],X=g.createSparseMatrix({values:te,index:K,ptr:P,size:[L,M],datatype:E===g._datatype&&B===b._datatype?H:void 0}),z=$?[]:void 0,ie=[],se,V,_,W,ne,Q,ue,oe,be=0;be<M;be++){P[be]=K.length;var Me=be+1;for(ne=k[be],Q=k[be+1],W=ne;W<Q;W++)if(oe=F[W],$)for(V=A[oe],_=A[oe+1],se=V;se<_;se++)ue=N[se],ie[ue]!==Me?(ie[ue]=Me,K.push(ue),z[ue]=Y(S[W],C[se])):z[ue]=j(z[ue],Y(S[W],C[se]));else for(V=A[oe],_=A[oe+1],se=V;se<_;se++)ue=N[se],ie[ue]!==Me&&(ie[ue]=Me,K.push(ue));if($)for(var Pe=P[be],Ee=K.length,Oe=Pe;Oe<Ee;Oe++){var Ie=K[Oe];te[Oe]=z[Ie]}}return P[M]=K.length,X}return t(K0,a,{"Array, Array":t.referTo("Matrix, Matrix",g=>(b,C)=>{l(Ue(b),Ue(C));var N=g(r(b),r(C));return Re(N)?N.valueOf():N}),"Matrix, Matrix":function(b,C){var N=b.size(),A=C.size();return l(N,A),N.length===1?A.length===1?c(b,C,N[0]):f(b,C):A.length===1?d(b,C):h(b,C)},"Matrix, Array":t.referTo("Matrix,Matrix",g=>(b,C)=>g(b,r(C))),"Array, Matrix":t.referToSelf(g=>(b,C)=>g(r(b,C.storage()),C)),"SparseMatrix, any":function(b,C){return s(b,C,a,!1)},"DenseMatrix, any":function(b,C){return u(b,C,a,!1)},"any, SparseMatrix":function(b,C){return s(C,b,a,!0)},"any, DenseMatrix":function(b,C){return u(C,b,a,!0)},"Array, any":function(b,C){return u(r(b),C,a,!1).valueOf()},"any, Array":function(b,C){return u(r(C),b,a,!0).valueOf()},"any, any":a,"any, any, ...any":t.referToSelf(g=>(b,C,N)=>{for(var A=g(b,C),E=0;E<N.length;E++)A=g(A,N[E]);return A})})}),Y0="nthRoot",Oz=["typed","matrix","equalScalar","BigNumber","concat"],Bz=I(Y0,Oz,e=>{var{typed:t,matrix:r,equalScalar:n,BigNumber:a,concat:i}=e,o=bi({typed:t}),s=ea({typed:t,equalScalar:n}),u=Fc({typed:t,equalScalar:n}),l=Fr({typed:t,equalScalar:n}),c=$t({typed:t,matrix:r,concat:i});function f(){throw new Error("Complex number not supported in function nthRoot. Use nthRoots instead.")}return t(Y0,{number:p0,"number, number":p0,BigNumber:d=>m(d,new a(2)),"BigNumber, BigNumber":m,Complex:f,"Complex, number":f,Array:t.referTo("DenseMatrix,number",d=>h=>d(r(h),2).valueOf()),DenseMatrix:t.referTo("DenseMatrix,number",d=>h=>d(h,2)),SparseMatrix:t.referTo("SparseMatrix,number",d=>h=>d(h,2)),"SparseMatrix, SparseMatrix":t.referToSelf(d=>(h,p)=>{if(p.density()===1)return u(h,p,d);throw new Error("Root must be non-zero")}),"DenseMatrix, SparseMatrix":t.referToSelf(d=>(h,p)=>{if(p.density()===1)return o(h,p,d,!1);throw new Error("Root must be non-zero")}),"Array, SparseMatrix":t.referTo("DenseMatrix,SparseMatrix",d=>(h,p)=>d(r(h),p)),"number | BigNumber, SparseMatrix":t.referToSelf(d=>(h,p)=>{if(p.density()===1)return l(p,h,d,!0);throw new Error("Root must be non-zero")})},c({scalar:"number | BigNumber",SD:s,Ss:l,sS:!1}));function m(d,h){var p=a.precision,y=a.clone({precision:p+2}),w=new a(0),D=new y(1),v=h.isNegative();if(v&&(h=h.neg()),h.isZero())throw new Error("Root must be non-zero");if(d.isNegative()&&!h.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(d.isZero())return v?new y(1/0):0;if(!d.isFinite())return v?w:d;var x=d.abs().pow(D.div(h));return x=d.isNeg()?x.neg():x,new a((v?D.div(x):x).toPrecision(p))}}),Z0="sign",$z=["typed","BigNumber","Fraction","complex"],_z=I(Z0,$z,e=>{var{typed:t,BigNumber:r,complex:n,Fraction:a}=e;return t(Z0,{number:Lm,Complex:function(o){return o.im===0?n(Lm(o.re)):o.sign()},BigNumber:function(o){return new r(o.cmp(0))},bigint:function(o){return o>0n?1n:o<0n?-1n:0n},Fraction:function(o){return o.n===0n?new a(0):new a(o.s)},"Array | Matrix":t.referToSelf(i=>o=>Qe(o,i,!0)),Unit:t.referToSelf(i=>o=>{if(!o._isDerived()&&o.units[0].unit.offset!==0)throw new TypeError("sign is ambiguous for units with offset");return t.find(i,o.valueType())(o.value)})})}),Iz="sqrt",zz=["config","typed","Complex"],jz=I(Iz,zz,e=>{var{config:t,typed:r,Complex:n}=e;return r("sqrt",{number:a,Complex:function(o){return o.sqrt()},BigNumber:function(o){return!o.isNegative()||t.predictable?o.sqrt():a(o.toNumber())},Unit:function(o){return o.pow(.5)}});function a(i){return isNaN(i)?NaN:i>=0||t.predictable?Math.sqrt(i):new n(i,0).sqrt()}}),Q0="square",qz=["typed"],Rz=I(Q0,qz,e=>{var{typed:t}=e;return t(Q0,{number:Hx,Complex:function(n){return n.mul(n)},BigNumber:function(n){return n.times(n)},bigint:function(n){return n*n},Fraction:function(n){return n.mul(n)},Unit:function(n){return n.pow(2)}})}),X0="subtract",Lz=["typed","matrix","equalScalar","subtractScalar","unaryMinus","DenseMatrix","concat"],Hz=I(X0,Lz,e=>{var{typed:t,matrix:r,equalScalar:n,subtractScalar:a,unaryMinus:i,DenseMatrix:o,concat:s}=e,u=bi({typed:t}),l=jr({typed:t}),c=Tc({typed:t,equalScalar:n}),f=no({typed:t,DenseMatrix:o}),m=lr({typed:t,DenseMatrix:o}),d=$t({typed:t,matrix:r,concat:s});return t(X0,{"any, any":a},d({elop:a,SS:c,DS:u,SD:l,Ss:m,sS:f}))}),ev="xgcd",Gz=["typed","config","matrix","BigNumber"],Vz=I(ev,Gz,e=>{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t(ev,{"number, number":function(s,u){var l=Gx(s,u);return r.matrix==="Array"?l:n(l)},"BigNumber, BigNumber":i});function i(o,s){var u,l,c,f=new a(0),m=new a(1),d=f,h=m,p=m,y=f;if(!o.isInt()||!s.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!s.isZero();)l=o.div(s).floor(),c=o.mod(s),u=d,d=h.minus(l.times(d)),h=u,u=p,p=y.minus(l.times(p)),y=u,o=s,s=c;var w;return o.lt(f)?w=[o.neg(),h.neg(),y.neg()]:w=[o,o.isZero()?0:h,y],r.matrix==="Array"?w:n(w)}}),tv="invmod",Uz=["typed","config","BigNumber","xgcd","equal","smaller","mod","add","isInteger"],Wz=I(tv,Uz,e=>{var{typed:t,config:r,BigNumber:n,xgcd:a,equal:i,smaller:o,mod:s,add:u,isInteger:l}=e;return t(tv,{"number, number":c,"BigNumber, BigNumber":c});function c(f,m){if(!l(f)||!l(m))throw new Error("Parameters in function invmod must be integer numbers");if(f=s(f,m),i(m,0))throw new Error("Divisor must be non zero");var d=a(f,m);d=d.valueOf();var[h,p]=d;return i(h,n(1))?(p=s(p,m),o(p,n(0))&&(p=u(p,m)),p):NaN}}),Jz="matAlgo09xS0Sf",Kz=["typed","equalScalar"],C2=I(Jz,Kz,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var s=a._values,u=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),m=i._values,d=i._index,h=i._ptr,p=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==p.length)throw new nt(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+p+")");var w=c[0],D=c[1],v,x=r,g=0,b=o;typeof f=="string"&&f===y&&f!=="mixed"&&(v=f,x=t.find(r,[v,v]),g=t.convert(0,v),b=t.find(o,[v,v]));var C=s&&m?[]:void 0,N=[],A=[],E=C?[]:void 0,S=[],F,k,B,L,M;for(k=0;k<D;k++){A[k]=N.length;var $=k+1;if(E)for(L=h[k],M=h[k+1],B=L;B<M;B++)F=d[B],S[F]=$,E[F]=m[B];for(L=l[k],M=l[k+1],B=L;B<M;B++)if(F=u[B],E){var H=S[F]===$?E[F]:g,j=b(s[B],H);x(j,g)||(N.push(F),C.push(j))}else N.push(F)}return A[D]=N.length,a.createSparseMatrix({values:C,index:N,ptr:A,size:[w,D],datatype:f===a._datatype&&y===i._datatype?v:void 0})}}),rv="dotMultiply",Yz=["typed","matrix","equalScalar","multiplyScalar","concat"],Zz=I(rv,Yz,e=>{var{typed:t,matrix:r,equalScalar:n,multiplyScalar:a,concat:i}=e,o=ea({typed:t,equalScalar:n}),s=C2({typed:t,equalScalar:n}),u=Fr({typed:t,equalScalar:n}),l=$t({typed:t,matrix:r,concat:i});return t(rv,l({elop:a,SS:s,DS:o,Ss:u}))});function Qz(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitAnd");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);if(e.isZero()||t.eq(-1)||e.eq(t))return e;if(t.isZero()||e.eq(-1))return t;if(!e.isFinite()||!t.isFinite()){if(!e.isFinite()&&!t.isFinite())return e.isNegative()===t.isNegative()?e:new r(0);if(!e.isFinite())return t.isNegative()?e:e.isNegative()?new r(0):t;if(!t.isFinite())return e.isNegative()?t:t.isNegative()?new r(0):e}return Fd(e,t,function(n,a){return n&a})}function Vs(e){if(e.isFinite()&&!e.isInteger())throw new Error("Integer expected in function bitNot");var t=e.constructor,r=t.precision;t.config({precision:1e9});var n=e.plus(new t(1));return n.s=-n.s||null,t.config({precision:r}),n}function Xz(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitOr");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);var n=new r(-1);return e.isZero()||t.eq(n)||e.eq(t)?t:t.isZero()||e.eq(n)?e:!e.isFinite()||!t.isFinite()?!e.isFinite()&&!e.isNegative()&&t.isNegative()||e.isNegative()&&!t.isNegative()&&!t.isFinite()?n:e.isNegative()&&t.isNegative()?e.isFinite()?e:t:e.isFinite()?t:e:Fd(e,t,function(a,i){return a|i})}function Fd(e,t,r){var n=e.constructor,a,i,o=+(e.s<0),s=+(t.s<0);if(o){a=nl(Vs(e));for(var u=0;u<a.length;++u)a[u]^=1}else a=nl(e);if(s){i=nl(Vs(t));for(var l=0;l<i.length;++l)i[l]^=1}else i=nl(t);var c,f,m;a.length<=i.length?(c=a,f=i,m=o):(c=i,f=a,m=s);var d=c.length,h=f.length,p=r(o,s)^1,y=new n(p^1),w=new n(1),D=new n(2),v=n.precision;for(n.config({precision:1e9});d>0;)r(c[--d],f[--h])===p&&(y=y.plus(w)),w=w.times(D);for(;h>0;)r(m,f[--h])===p&&(y=y.plus(w)),w=w.times(D);return n.config({precision:v}),p===0&&(y.s=-y.s),y}function nl(e){for(var t=e.d,r=t[0]+"",n=1;n<t.length;++n){for(var a=t[n]+"",i=7-a.length;i--;)a="0"+a;r+=a}for(var o=r.length;r.charAt(o)==="0";)o--;var s=e.e,u=r.slice(0,o+1||1),l=u.length;if(s>0)if(++s>l)for(s-=l;s--;)u+="0";else s<l&&(u=u.slice(0,s)+"."+u.slice(s));for(var c=[0],f=0;f<u.length;){for(var m=c.length;m--;)c[m]*=10;c[0]+=parseInt(u.charAt(f++));for(var d=0;d<c.length;++d)c[d]>1&&((c[d+1]===null||c[d+1]===void 0)&&(c[d+1]=0),c[d+1]+=c[d]>>1,c[d]&=1)}return c.reverse()}function ej(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitXor");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);if(e.isZero())return t;if(t.isZero())return e;if(e.eq(t))return new r(0);var n=new r(-1);return e.eq(n)?Vs(t):t.eq(n)?Vs(e):!e.isFinite()||!t.isFinite()?!e.isFinite()&&!t.isFinite()?n:new r(e.isNegative()===t.isNegative()?1/0:-1/0):Fd(e,t,function(a,i){return a^i})}function tj(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function leftShift");var r=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new r(NaN):e.isZero()||t.isZero()?e:!e.isFinite()&&!t.isFinite()?new r(NaN):t.lt(55)?e.times(Math.pow(2,t.toNumber())+""):e.times(new r(2).pow(t))}function rj(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function rightArithShift");var r=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new r(NaN):e.isZero()||t.isZero()?e:t.isFinite()?t.lt(55)?e.div(Math.pow(2,t.toNumber())+"").floor():e.div(new r(2).pow(t)).floor():e.isNegative()?new r(-1):e.isFinite()?new r(0):new r(NaN)}var nv="bitAnd",nj=["typed","matrix","equalScalar","concat"],E2=I(nv,nj,e=>{var{typed:t,matrix:r,equalScalar:n,concat:a}=e,i=ea({typed:t,equalScalar:n}),o=Fc({typed:t,equalScalar:n}),s=Fr({typed:t,equalScalar:n}),u=$t({typed:t,matrix:r,concat:a});return t(nv,{"number, number":Ux,"BigNumber, BigNumber":Qz,"bigint, bigint":(l,c)=>l&c},u({SS:o,DS:i,Ss:s}))}),av="bitNot",aj=["typed"],ij=I(av,aj,e=>{var{typed:t}=e;return t(av,{number:Wx,BigNumber:Vs,bigint:r=>~r,"Array | Matrix":t.referToSelf(r=>n=>Qe(n,r))})}),iv="bitOr",oj=["typed","matrix","equalScalar","DenseMatrix","concat"],S2=I(iv,oj,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=bi({typed:t}),s=Md({typed:t,equalScalar:n}),u=no({typed:t,DenseMatrix:a}),l=$t({typed:t,matrix:r,concat:i});return t(iv,{"number, number":Jx,"BigNumber, BigNumber":Xz,"bigint, bigint":(c,f)=>c|f},l({SS:s,DS:o,Ss:u}))}),sj="matAlgo07xSSf",uj=["typed","SparseMatrix"],ma=I(sj,uj,e=>{var{typed:t,SparseMatrix:r}=e;return function(i,o,s){var u=i._size,l=i._datatype||i._data===void 0?i._datatype:i.getDataType(),c=o._size,f=o._datatype||o._data===void 0?o._datatype:o.getDataType();if(u.length!==c.length)throw new nt(u.length,c.length);if(u[0]!==c[0]||u[1]!==c[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+c+")");var m=u[0],d=u[1],h,p=0,y=s;typeof l=="string"&&l===f&&l!=="mixed"&&(h=l,p=t.convert(0,h),y=t.find(s,[h,h]));for(var w=[],D=[],v=new Array(d+1).fill(0),x=[],g=[],b=[],C=[],N=0;N<d;N++){var A=N+1,E=0;n(i,N,b,x,A),n(o,N,C,g,A);for(var S=0;S<m;S++){var F=b[S]===A?x[S]:p,k=C[S]===A?g[S]:p,B=y(F,k);B!==0&&B!==!1&&(D.push(S),w.push(B),E++)}v[N+1]=v[N]+E}return new r({values:w,index:D,ptr:v,size:[m,d],datatype:l===i._datatype&&f===o._datatype?h:void 0})};function n(a,i,o,s,u){for(var l=a._values,c=a._index,f=a._ptr,m=f[i],d=f[i+1];m<d;m++){var h=c[m];o[h]=u,s[h]=l[m]}}}),ov="bitXor",lj=["typed","matrix","DenseMatrix","concat","SparseMatrix"],cj=I(ov,lj,e=>{var{typed:t,matrix:r,DenseMatrix:n,concat:a,SparseMatrix:i}=e,o=jr({typed:t}),s=ma({typed:t,SparseMatrix:i}),u=lr({typed:t,DenseMatrix:n}),l=$t({typed:t,matrix:r,concat:a});return t(ov,{"number, number":Kx,"BigNumber, BigNumber":ej,"bigint, bigint":(c,f)=>c^f},l({SS:s,DS:o,Ss:u}))}),sv="arg",fj=["typed"],mj=I(sv,fj,e=>{var{typed:t}=e;return t(sv,{number:function(n){return Math.atan2(0,n)},BigNumber:function(n){return n.constructor.atan2(0,n)},Complex:function(n){return n.arg()},"Array | Matrix":t.referToSelf(r=>n=>Qe(n,r))})}),uv="conj",dj=["typed"],hj=I(uv,dj,e=>{var{typed:t}=e;return t(uv,{"number | BigNumber | Fraction":r=>r,Complex:r=>r.conjugate(),Unit:t.referToSelf(r=>n=>new n.constructor(r(n.toNumeric()),n.formatUnits())),"Array | Matrix":t.referToSelf(r=>n=>Qe(n,r))})}),lv="im",pj=["typed"],gj=I(lv,pj,e=>{var{typed:t}=e;return t(lv,{number:()=>0,"BigNumber | Fraction":r=>r.mul(0),Complex:r=>r.im,"Array | Matrix":t.referToSelf(r=>n=>Qe(n,r))})}),cv="re",vj=["typed"],yj=I(cv,vj,e=>{var{typed:t}=e;return t(cv,{"number | BigNumber | Fraction":r=>r,Complex:r=>r.re,"Array | Matrix":t.referToSelf(r=>n=>Qe(n,r))})}),fv="not",bj=["typed"],wj=I(fv,bj,e=>{var{typed:t}=e;return t(fv,{"null | undefined":()=>!0,number:e2,Complex:function(n){return n.re===0&&n.im===0},BigNumber:function(n){return n.isZero()||n.isNaN()},bigint:r=>!r,Unit:t.referToSelf(r=>n=>t.find(r,n.valueType())(n.value)),"Array | Matrix":t.referToSelf(r=>n=>Qe(n,r))})}),mv="nullish",xj=["typed","matrix","size","flatten","deepEqual"],M2=I(mv,xj,e=>{var{typed:t,matrix:r,size:n,flatten:a,deepEqual:i}=e,o=jr({typed:t}),s=$n({typed:t}),u=N2({typed:t});return t(mv,{"number|bigint|Complex|BigNumber|Fraction|Unit|string|boolean|SparseMatrix, any":(l,c)=>l,"null, any":(l,c)=>c,"undefined, any":(l,c)=>c,"SparseMatrix, Array | Matrix":(l,c)=>{var f=n(l),m=n(c);if(i(f,m))return l;throw new nt(f,m)},"DenseMatrix, DenseMatrix":t.referToSelf(l=>(c,f)=>u(c,f,l)),"DenseMatrix, SparseMatrix":t.referToSelf(l=>(c,f)=>o(c,f,l,!1)),"DenseMatrix, Array":t.referToSelf(l=>(c,f)=>u(c,r(f),l)),"DenseMatrix, any":t.referToSelf(l=>(c,f)=>s(c,f,l,!1)),"Array, Array":t.referToSelf(l=>(c,f)=>u(r(c),r(f),l).valueOf()),"Array, DenseMatrix":t.referToSelf(l=>(c,f)=>u(r(c),f,l)),"Array, SparseMatrix":t.referToSelf(l=>(c,f)=>o(r(c),f,l,!1)),"Array, any":t.referToSelf(l=>(c,f)=>s(r(c),f,l,!1).valueOf())})}),dv="or",Dj=["typed","matrix","equalScalar","DenseMatrix","concat"],T2=I(dv,Dj,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=jr({typed:t}),s=Tc({typed:t,equalScalar:n}),u=lr({typed:t,DenseMatrix:a}),l=$t({typed:t,matrix:r,concat:i});return t(dv,{"number, number":Hm,"Complex, Complex":function(f,m){return f.re!==0||f.im!==0||m.re!==0||m.im!==0},"BigNumber, BigNumber":function(f,m){return!f.isZero()&&!f.isNaN()||!m.isZero()&&!m.isNaN()},"bigint, bigint":Hm,"Unit, Unit":t.referToSelf(c=>(f,m)=>c(f.value||0,m.value||0))},l({SS:s,DS:o,Ss:u}))}),hv="xor",Nj=["typed","matrix","DenseMatrix","concat","SparseMatrix"],Aj=I(hv,Nj,e=>{var{typed:t,matrix:r,DenseMatrix:n,concat:a,SparseMatrix:i}=e,o=jr({typed:t}),s=ma({typed:t,SparseMatrix:i}),u=lr({typed:t,DenseMatrix:n}),l=$t({typed:t,matrix:r,concat:a});return t(hv,{"number, number":Gm,"Complex, Complex":function(f,m){return(f.re!==0||f.im!==0)!=(m.re!==0||m.im!==0)},"bigint, bigint":Gm,"BigNumber, BigNumber":function(f,m){return(!f.isZero()&&!f.isNaN())!=(!m.isZero()&&!m.isNaN())},"Unit, Unit":t.referToSelf(c=>(f,m)=>c(f.value||0,m.value||0))},l({SS:s,DS:o,Ss:u}))}),pv="concat",Cj=["typed","matrix","isInteger"],F2=I(pv,Cj,e=>{var{typed:t,matrix:r,isInteger:n}=e;return t(pv,{"...Array | Matrix | number | BigNumber":function(i){var o,s=i.length,u=-1,l,c=!1,f=[];for(o=0;o<s;o++){var m=i[o];if(Re(m)&&(c=!0),ze(m)||Ze(m)){if(o!==s-1)throw new Error("Dimension must be specified as last argument");if(l=u,u=m.valueOf(),!n(u))throw new TypeError("Integer number expected for dimension");if(u<0||o>0&&u>l)throw new Qn(u,l+1)}else{var d=Ve(m).valueOf(),h=Ue(d);if(f[o]=d,l=u,u=h.length-1,o>0&&u!==l)throw new nt(l+1,u+1)}}if(f.length===0)throw new SyntaxError("At least one matrix expected");for(var p=f.shift();f.length;)p=Tx(p,f.shift(),u);return c?r(p):p},"...string":function(i){return i.join("")}})}),gv="column",Ej=["typed","Index","matrix","range"],P2=I(gv,Ej,e=>{var{typed:t,Index:r,matrix:n,range:a}=e;return t(gv,{"Matrix, number":i,"Array, number":function(s,u){return i(n(Ve(s)),u).valueOf()}});function i(o,s){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");Bt(s,o.size()[1]);var u=a(0,o.size()[0]),l=new r(u,[s]),c=o.subset(l);return Re(c)?c:n([[c]])}}),vv="count",Sj=["typed","size","prod"],Mj=I(vv,Sj,e=>{var{typed:t,size:r,prod:n}=e;return t(vv,{string:function(i){return i.length},"Matrix | Array":function(i){return n(r(i))}})}),yv="cross",Tj=["typed","matrix","subtract","multiply"],Fj=I(yv,Tj,e=>{var{typed:t,matrix:r,subtract:n,multiply:a}=e;return t(yv,{"Matrix, Matrix":function(s,u){return r(i(s.toArray(),u.toArray()))},"Matrix, Array":function(s,u){return r(i(s.toArray(),u))},"Array, Matrix":function(s,u){return r(i(s,u.toArray()))},"Array, Array":i});function i(o,s){var u=Math.max(Ue(o).length,Ue(s).length);o=Kl(o),s=Kl(s);var l=Ue(o),c=Ue(s);if(l.length!==1||c.length!==1||l[0]!==3||c[0]!==3)throw new RangeError("Vectors with length 3 expected (Size A = ["+l.join(", ")+"], B = ["+c.join(", ")+"])");var f=[n(a(o[1],s[2]),a(o[2],s[1])),n(a(o[2],s[0]),a(o[0],s[2])),n(a(o[0],s[1]),a(o[1],s[0]))];return u>1?[f]:f}}),bv="diag",Pj=["typed","matrix","DenseMatrix","SparseMatrix"],kj=I(bv,Pj,e=>{var{typed:t,matrix:r,DenseMatrix:n,SparseMatrix:a}=e;return t(bv,{Array:function(l){return i(l,0,Ue(l),null)},"Array, number":function(l,c){return i(l,c,Ue(l),null)},"Array, BigNumber":function(l,c){return i(l,c.toNumber(),Ue(l),null)},"Array, string":function(l,c){return i(l,0,Ue(l),c)},"Array, number, string":function(l,c,f){return i(l,c,Ue(l),f)},"Array, BigNumber, string":function(l,c,f){return i(l,c.toNumber(),Ue(l),f)},Matrix:function(l){return i(l,0,l.size(),l.storage())},"Matrix, number":function(l,c){return i(l,c,l.size(),l.storage())},"Matrix, BigNumber":function(l,c){return i(l,c.toNumber(),l.size(),l.storage())},"Matrix, string":function(l,c){return i(l,0,l.size(),c)},"Matrix, number, string":function(l,c,f){return i(l,c,l.size(),f)},"Matrix, BigNumber, string":function(l,c,f){return i(l,c.toNumber(),l.size(),f)}});function i(u,l,c,f){if(!ke(l))throw new TypeError("Second parameter in function diag must be an integer");var m=l>0?l:0,d=l<0?-l:0;switch(c.length){case 1:return o(u,l,f,c[0],d,m);case 2:return s(u,l,f,c,d,m)}throw new RangeError("Matrix for function diag must be 2 dimensional")}function o(u,l,c,f,m,d){var h=[f+m,f+d];if(c&&c!=="sparse"&&c!=="dense")throw new TypeError("Unknown matrix type ".concat(c,'"'));var p=c==="sparse"?a.diagonal(h,u,l):n.diagonal(h,u,l);return c!==null?p:p.valueOf()}function s(u,l,c,f,m,d){if(Re(u)){var h=u.diagonal(l);return c!==null?c!==h.storage()?r(h,c):h:h.valueOf()}for(var p=Math.min(f[0]-m,f[1]-d),y=[],w=0;w<p;w++)y[w]=u[w+m][w+d];return c!==null?r(y):y}}),Oj="filter",Bj=["typed"],k2=I(Oj,Bj,e=>{var{typed:t}=e;return t("filter",{"Array, function":wv,"Matrix, function":function(n,a){return n.create(wv(n.valueOf(),a),n.datatype())},"Array, RegExp":u0,"Matrix, RegExp":function(n,a){return n.create(u0(n.valueOf(),a),n.datatype())}})});function wv(e,t){var r=Xi(t,e,"filter");return r.isUnary?s0(e,r.fn):s0(e,function(n,a,i){return r.fn(n,[a],i)})}var xv="flatten",$j=["typed"],_j=I(xv,$j,e=>{var{typed:t}=e;return t(xv,{Array:function(n){return mt(n)},DenseMatrix:function(n){return n.create(mt(n.valueOf(),!0),n.datatype())},SparseMatrix:function(n){throw new TypeError("SparseMatrix is not supported by function flatten because it does not support 1D vectors. Convert to a DenseMatrix or Array first. Example: flatten(x.toArray())")}})}),Ym="forEach",Ij=["typed"],O2=I(Ym,Ij,e=>{var{typed:t}=e;return t(Ym,{"Array, function":zj,"Matrix, function":function(n,a){n.forEach(a)}})});function zj(e,t){var r=Xi(t,e,Ym);Px(e,r.fn,r.isUnary)}var Dv="getMatrixDataType",jj=["typed"],qj=I(Dv,jj,e=>{var{typed:t}=e;return t(Dv,{Array:function(n){return Sc(n,Ft)},Matrix:function(n){return n.getDataType()}})}),Nv="identity",Rj=["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],Lj=I(Nv,Rj,e=>{var{typed:t,config:r,matrix:n,BigNumber:a,DenseMatrix:i,SparseMatrix:o}=e;return t(Nv,{"":function(){return r.matrix==="Matrix"?n([]):[]},string:function(c){return n(c)},"number | BigNumber":function(c){return u(c,c,r.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, string":function(c,f){return u(c,c,f)},"number | BigNumber, number | BigNumber":function(c,f){return u(c,f,r.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(c,f,m){return u(c,f,m)},Array:function(c){return s(c)},"Array, string":function(c,f){return s(c,f)},Matrix:function(c){return s(c.valueOf(),c.storage())},"Matrix, string":function(c,f){return s(c.valueOf(),f)}});function s(l,c){switch(l.length){case 0:return c?n(c):[];case 1:return u(l[0],l[0],c);case 2:return u(l[0],l[1],c);default:throw new Error("Vector containing two values expected")}}function u(l,c,f){var m=Ze(l)||Ze(c)?a:null;if(Ze(l)&&(l=l.toNumber()),Ze(c)&&(c=c.toNumber()),!ke(l)||l<1)throw new Error("Parameters in function identity must be positive integers");if(!ke(c)||c<1)throw new Error("Parameters in function identity must be positive integers");var d=m?new a(1):1,h=m?new m(0):0,p=[l,c];if(f){if(f==="sparse")return o.diagonal(p,d,0,h);if(f==="dense")return i.diagonal(p,d,0,h);throw new TypeError('Unknown matrix type "'.concat(f,'"'))}for(var y=Jo([],p,h),w=l<c?l:c,D=0;D<w;D++)y[D][D]=d;return y}}),Av="kron",Hj=["typed","matrix","multiplyScalar"],Gj=I(Av,Hj,e=>{var{typed:t,matrix:r,multiplyScalar:n}=e;return t(Av,{"Matrix, Matrix":function(s,u){return r(i(s.toArray(),u.toArray()))},"Matrix, Array":function(s,u){return r(i(s.toArray(),u))},"Array, Matrix":function(s,u){return r(i(s,u.toArray()))},"Array, Array":i});function a(o,s){return o.flatMap(u=>s.map(l=>n(u,l)))}function i(o,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1;if(u<0){var l=Ue(o).length,c=Ue(s).length;for(u=Math.max(l,c);l++<u;)o=[o];for(;c++<u;)s=[s]}return u===1?a(o,s):o.flatMap(f=>s.map(m=>i(f,m,u-1)))}}),If="map",Vj=["typed"],B2=I(If,Vj,e=>{var{typed:t}=e;return t(If,{"Array, function":s,"Matrix, function":function(l,c){return l.map(c)},"Array|Matrix, Array|Matrix, ...Array|Matrix|function":(u,l,c)=>r([u,l,...c.slice(0,c.length-1)],c[c.length-1])});function r(u,l){if(typeof l!="function")throw new Error("Last argument must be a callback function");var c=u[0].isMatrix,f=u.map(g=>g.isMatrix?g.size():Ue(g)),m=Zl(...f),d=u.length,h=c?(g,b)=>g.get(b):Ql,p=u.map((g,b)=>{var C=f[b].map(()=>0);return g.isMatrix?g.get(C):Ql(g,C)}),y=t.isTypedFunction(l)?o(l,p,m.map(()=>0),u):i(l,d);if(y<2){var w=a(y,l,null);return n(u,w)}var D=c?u.map(g=>g.isMatrix?g.create(Ui(g.toArray(),m),g.datatype()):u[0].create(Ui(g.valueOf(),m))):u.map(g=>g.isMatrix?Ui(g.toArray(),m):Ui(g,m)),v=a(y,l,D),x=(g,b)=>v([g,...D.slice(1).map(C=>h(C,b))],b);return c?D[0].map(x):s(D[0],x)}function n(u,l){var c=u[0],f=u.map(g=>g.isMatrix?g.valueOf():g),m=u.map(g=>g.isMatrix?g.size():Ue(g)),d=Zl(...m),h=m.map(g=>d.length-g.length),p=d.length-1,y=l.length>1,w=y?[]:null,D=x(f,0);if(c.isMatrix){var v=c.create();return v._data=D,v._size=d,v}else return D;function x(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=d[b],N=Array(C);if(b<p)for(var A=function(B){w&&(w[b]=B),N[B]=x(g.map((L,M)=>h[M]>b?L:L.length===1?L[0]:L[B]),b+1)},E=0;E<C;E++)A(E);else for(var S=function(B){w&&(w[b]=B),N[B]=l(g.map(L=>L.length===1?L[0]:L[B]),w?w.slice():void 0)},F=0;F<C;F++)S(F);return N}}function a(u,l,c){switch(u){case 0:return f=>l(...f);case 1:return(f,m)=>l(...f,m);case 2:return(f,m)=>l(...f,m,...c)}}function i(u,l){var c=u.toString();if(/arguments/.test(c))return 2;var f=c.match(/\(.*?\)/);return/\.\.\./.test(f)||u.length>l+1?2:u.length===l+1?1:0}function o(u,l,c,f){return t.resolve(u,[...l,c,...f])!==null?2:t.resolve(u,[...l,c])!==null?1:(t.resolve(u,l)!==null,0)}function s(u,l){var c=Xi(l,u,If);return qm(u,c.fn,c.isUnary)}}),Cv="diff",Uj=["typed","matrix","subtract","number"],$2=I(Cv,Uj,e=>{var{typed:t,matrix:r,subtract:n,number:a}=e;return t(Cv,{"Array | Matrix":function(c){return Re(c)?r(o(c.toArray())):o(c)},"Array | Matrix, number":function(c,f){if(!ke(f))throw new RangeError("Dimension must be a whole number");return Re(c)?r(i(c.toArray(),f)):i(c,f)},"Array, BigNumber":t.referTo("Array,number",l=>(c,f)=>l(c,a(f))),"Matrix, BigNumber":t.referTo("Matrix,number",l=>(c,f)=>l(c,a(f)))});function i(l,c){if(Re(l)&&(l=l.toArray()),!Array.isArray(l))throw RangeError("Array/Matrix does not have that many dimensions");if(c>0){var f=[];return l.forEach(m=>{f.push(i(m,c-1))}),f}else{if(c===0)return o(l);throw RangeError("Cannot have negative dimension")}}function o(l){for(var c=[],f=l.length,m=1;m<f;m++)c.push(s(l[m-1],l[m]));return c}function s(l,c){Re(l)&&(l=l.toArray()),Re(c)&&(c=c.toArray());var f=Array.isArray(l),m=Array.isArray(c);if(f&&m)return u(l,c);if(!f&&!m)return n(c,l);throw TypeError("Cannot calculate difference between 1 array and 1 non-array")}function u(l,c){if(l.length!==c.length)throw RangeError("Not all sub-arrays have the same length");for(var f=[],m=l.length,d=0;d<m;d++)f.push(s(l[d],c[d]));return f}}),Wj="ones",Jj=["typed","config","matrix","BigNumber"],Kj=I(Wj,Jj,e=>{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t("ones",{"":function(){return r.matrix==="Array"?i([]):i([],"default")},"...number | BigNumber | string":function(l){var c=l[l.length-1];if(typeof c=="string"){var f=l.pop();return i(l,f)}else return r.matrix==="Array"?i(l):i(l,"default")},Array:i,Matrix:function(l){var c=l.storage();return i(l.valueOf(),c)},"Array | Matrix, string":function(l,c){return i(l.valueOf(),c)}});function i(u,l){var c=o(u),f=c?new a(1):1;if(s(u),l){var m=n(l);return u.length>0?m.resize(u,f):m}else{var d=[];return u.length>0?Jo(d,u,f):d}}function o(u){var l=!1;return u.forEach(function(c,f,m){Ze(c)&&(l=!0,m[f]=c.toNumber())}),l}function s(u){u.forEach(function(l){if(typeof l!="number"||!ke(l)||l<0)throw new Error("Parameters in function ones must be positive integers")})}});function Pd(){throw new Error('No "bignumber" implementation available')}function _2(){throw new Error('No "fraction" implementation available')}function Yj(){throw new Error('No "matrix" implementation available')}var Ev="range",Zj=["typed","config","?matrix","?bignumber","equal","smaller","smallerEq","larger","largerEq","add","isZero","isPositive"],I2=I(Ev,Zj,e=>{var{typed:t,config:r,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:s,largerEq:u,add:l,isZero:c,isPositive:f}=e;return t(Ev,{string:d,"string, boolean":d,number:function(w){throw new TypeError("Too few arguments to function range(): ".concat(w))},boolean:function(w){throw new TypeError("Unexpected type of argument 1 to function range(): ".concat(w,", number|bigint|BigNumber|Fraction"))},"number, number":function(w,D){return m(h(w,D,1,!1))},"number, number, number":function(w,D,v){return m(h(w,D,v,!1))},"number, number, boolean":function(w,D,v){return m(h(w,D,1,v))},"number, number, number, boolean":function(w,D,v,x){return m(h(w,D,v,x))},"bigint, bigint|number":function(w,D){return m(h(w,D,1n,!1))},"number, bigint":function(w,D){return m(h(BigInt(w),D,1n,!1))},"bigint, bigint|number, bigint|number":function(w,D,v){return m(h(w,D,BigInt(v),!1))},"number, bigint, bigint|number":function(w,D,v){return m(h(BigInt(w),D,BigInt(v),!1))},"bigint, bigint|number, boolean":function(w,D,v){return m(h(w,D,1n,v))},"number, bigint, boolean":function(w,D,v){return m(h(BigInt(w),D,1n,v))},"bigint, bigint|number, bigint|number, boolean":function(w,D,v,x){return m(h(w,D,BigInt(v),x))},"number, bigint, bigint|number, boolean":function(w,D,v,x){return m(h(BigInt(w),D,BigInt(v),x))},"BigNumber, BigNumber":function(w,D){var v=w.constructor;return m(h(w,D,new v(1),!1))},"BigNumber, BigNumber, BigNumber":function(w,D,v){return m(h(w,D,v,!1))},"BigNumber, BigNumber, boolean":function(w,D,v){var x=w.constructor;return m(h(w,D,new x(1),v))},"BigNumber, BigNumber, BigNumber, boolean":function(w,D,v,x){return m(h(w,D,v,x))},"Fraction, Fraction":function(w,D){return m(h(w,D,1,!1))},"Fraction, Fraction, Fraction":function(w,D,v){return m(h(w,D,v,!1))},"Fraction, Fraction, boolean":function(w,D,v){return m(h(w,D,1,v))},"Fraction, Fraction, Fraction, boolean":function(w,D,v,x){return m(h(w,D,v,x))},"Unit, Unit, Unit":function(w,D,v){return m(h(w,D,v,!1))},"Unit, Unit, Unit, boolean":function(w,D,v,x){return m(h(w,D,v,x))}});function m(y){return r.matrix==="Matrix"?n?n(y):Yj():y}function d(y,w){var D=p(y);if(!D)throw new SyntaxError('String "'+y+'" is no valid range');return r.number==="BigNumber"?(a===void 0&&Pd(),m(h(a(D.start),a(D.end),a(D.step)))):m(h(D.start,D.end,D.step,w))}function h(y,w,D,v){var x=[];if(c(D))throw new Error("Step must be non-zero");for(var g=f(D)?v?o:i:v?u:s,b=y;g(b,w);)x.push(b),b=l(b,D);return x}function p(y){var w=y.split(":"),D=w.map(function(x){return Number(x)}),v=D.some(function(x){return isNaN(x)});if(v)return null;switch(D.length){case 2:return{start:D[0],end:D[1],step:1};case 3:return{start:D[0],end:D[2],step:D[1]};default:return null}}}),Sv="reshape",Qj=["typed","isInteger","matrix"],Xj=I(Sv,Qj,e=>{var{typed:t,isInteger:r}=e;return t(Sv,{"Matrix, Array":function(a,i){return a.reshape(i,!0)},"Array, Array":function(a,i){return i.forEach(function(o){if(!r(o))throw new TypeError("Invalid size for dimension: "+o)}),Ad(a,i)}})}),eq="resize",tq=["config","matrix"],rq=I(eq,tq,e=>{var{config:t,matrix:r}=e;return function(i,o,s){if(arguments.length!==2&&arguments.length!==3)throw new ao("resize",arguments.length,2,3);if(Re(o)&&(o=o.valueOf()),Ze(o[0])&&(o=o.map(function(c){return Ze(c)?c.toNumber():c})),Re(i))return i.resize(o,s,!0);if(typeof i=="string")return n(i,o,s);var u=Array.isArray(i)?!1:t.matrix!=="Array";if(o.length===0){for(;Array.isArray(i);)i=i[0];return Ve(i)}else{Array.isArray(i)||(i=[i]),i=Ve(i);var l=Jo(i,o,s);return u?r(l):l}};function n(a,i,o){if(o!==void 0){if(typeof o!="string"||o.length!==1)throw new TypeError("Single character expected as defaultValue")}else o=" ";if(i.length!==1)throw new nt(i.length,1);var s=i[0];if(typeof s!="number"||!ke(s))throw new TypeError("Invalid size, must contain positive integers (size: "+at(i)+")");if(a.length>s)return a.substring(0,s);if(a.length<s){for(var u=a,l=0,c=s-a.length;l<c;l++)u+=o;return u}else return a}}),Mv="rotate",nq=["typed","multiply","rotationMatrix"],aq=I(Mv,nq,e=>{var{typed:t,multiply:r,rotationMatrix:n}=e;return t(Mv,{"Array , number | BigNumber | Complex | Unit":function(o,s){a(o,2);var u=r(n(s),o);return u.toArray()},"Matrix , number | BigNumber | Complex | Unit":function(o,s){return a(o,2),r(n(s),o)},"Array, number | BigNumber | Complex | Unit, Array | Matrix":function(o,s,u){a(o,3);var l=r(n(s,u),o);return l},"Matrix, number | BigNumber | Complex | Unit, Array | Matrix":function(o,s,u){return a(o,3),r(n(s,u),o)}});function a(i,o){var s=Array.isArray(i)?Ue(i):i.size();if(s.length>2)throw new RangeError("Vector must be of dimensions 1x".concat(o));if(s.length===2&&s[1]!==1)throw new RangeError("Vector must be of dimensions 1x".concat(o));if(s[0]!==o)throw new RangeError("Vector must be of dimensions 1x".concat(o))}}),Tv="rotationMatrix",iq=["typed","config","multiplyScalar","addScalar","unaryMinus","norm","matrix","BigNumber","DenseMatrix","SparseMatrix","cos","sin"],oq=I(Tv,iq,e=>{var{typed:t,config:r,multiplyScalar:n,addScalar:a,unaryMinus:i,norm:o,BigNumber:s,matrix:u,DenseMatrix:l,SparseMatrix:c,cos:f,sin:m}=e;return t(Tv,{"":function(){return r.matrix==="Matrix"?u([]):[]},string:function(v){return u(v)},"number | BigNumber | Complex | Unit":function(v){return d(v,r.matrix==="Matrix"?"dense":void 0)},"number | BigNumber | Complex | Unit, string":function(v,x){return d(v,x)},"number | BigNumber | Complex | Unit, Array":function(v,x){var g=u(x);return h(g),w(v,g,void 0)},"number | BigNumber | Complex | Unit, Matrix":function(v,x){h(x);var g=x.storage()||(r.matrix==="Matrix"?"dense":void 0);return w(v,x,g)},"number | BigNumber | Complex | Unit, Array, string":function(v,x,g){var b=u(x);return h(b),w(v,b,g)},"number | BigNumber | Complex | Unit, Matrix, string":function(v,x,g){return h(x),w(v,x,g)}});function d(D,v){var x=Ze(D),g=x?new s(-1):-1,b=f(D),C=m(D),N=[[b,n(g,C)],[C,b]];return y(N,v)}function h(D){var v=D.size();if(v.length<1||v[0]!==3)throw new RangeError("Vector must be of dimensions 1x3")}function p(D){return D.reduce((v,x)=>n(v,x))}function y(D,v){if(v){if(v==="sparse")return new c(D);if(v==="dense")return new l(D);throw new TypeError('Unknown matrix type "'.concat(v,'"'))}return D}function w(D,v,x){var g=o(v);if(g===0)throw new RangeError("Rotation around zero vector");var b=Ze(D)?s:null,C=b?new b(1):1,N=b?new b(-1):-1,A=b?new b(v.get([0])/g):v.get([0])/g,E=b?new b(v.get([1])/g):v.get([1])/g,S=b?new b(v.get([2])/g):v.get([2])/g,F=f(D),k=a(C,i(F)),B=m(D),L=a(F,p([A,A,k])),M=a(p([A,E,k]),p([N,S,B])),$=a(p([A,S,k]),p([E,B])),H=a(p([A,E,k]),p([S,B])),j=a(F,p([E,E,k])),Y=a(p([E,S,k]),p([N,A,B])),te=a(p([A,S,k]),p([N,E,B])),K=a(p([E,S,k]),p([A,B])),P=a(F,p([S,S,k])),X=[[L,M,$],[H,j,Y],[te,K,P]];return y(X,x)}}),Fv="row",sq=["typed","Index","matrix","range"],z2=I(Fv,sq,e=>{var{typed:t,Index:r,matrix:n,range:a}=e;return t(Fv,{"Matrix, number":i,"Array, number":function(s,u){return i(n(Ve(s)),u).valueOf()}});function i(o,s){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");Bt(s,o.size()[0]);var u=a(0,o.size()[1]),l=new r([s],u),c=o.subset(l);return Re(c)?c:n([[c]])}}),Pv="size",uq=["typed"],lq=I(Pv,uq,e=>{var{typed:t}=e;return t(Pv,{Matrix:r=>r.size(),Array:Ue,string:r=>[r.length],"number | Complex | BigNumber | Unit | boolean | null":r=>[]})}),kv="squeeze",cq=["typed"],fq=I(kv,cq,e=>{var{typed:t}=e;return t(kv,{Array:function(n){return Kl(Ve(n))},Matrix:function(n){var a=Kl(n.toArray());return Array.isArray(a)?n.create(a,n.datatype()):a},any:function(n){return Ve(n)}})}),Ov="subset",mq=["typed","matrix","zeros","add"],j2=I(Ov,mq,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e;return t(Ov,{"Matrix, Index":function(s,u){return Wo(u)?r():(Jl(s,u),s.subset(u))},"Array, Index":t.referTo("Matrix, Index",function(o){return function(s,u){var l=o(r(s),u);return u.isScalar()?l:l.valueOf()}}),"Object, Index":hq,"string, Index":dq,"Matrix, Index, any, any":function(s,u,l,c){return Wo(u)?s:(Jl(s,u),s.clone().subset(u,i(l,u),c))},"Array, Index, any, any":t.referTo("Matrix, Index, any, any",function(o){return function(s,u,l,c){var f=o(r(s),u,l,c);return f.isMatrix?f.valueOf():f}}),"Array, Index, any":t.referTo("Matrix, Index, any, any",function(o){return function(s,u,l){return o(r(s),u,l,void 0).valueOf()}}),"Matrix, Index, any":t.referTo("Matrix, Index, any, any",function(o){return function(s,u,l){return o(s,u,l,void 0)}}),"string, Index, string":Bv,"string, Index, string, string":Bv,"Object, Index, any":pq});function i(o,s){if(typeof o=="string")throw new Error("can't boradcast a string");if(s.isScalar())return o;var u=s.size();if(u.every(l=>l>0))try{return a(o,n(u))}catch{return o}else return o}});function dq(e,t){if(!wc(t))throw new TypeError("Index expected");if(Wo(t))return"";if(Jl(Array.from(e),t),t.size().length!==1)throw new nt(t.size().length,1);var r=e.length;Bt(t.min()[0],r),Bt(t.max()[0],r);var n=t.dimension(0),a="";function i(o){a+=e.charAt(o)}return Number.isInteger(n)?i(n):n.forEach(i),a}function Bv(e,t,r,n){if(!t||t.isIndex!==!0)throw new TypeError("Index expected");if(Wo(t))return e;if(Jl(Array.from(e),t),t.size().length!==1)throw new nt(t.size().length,1);if(n!==void 0){if(typeof n!="string"||n.length!==1)throw new TypeError("Single character expected as defaultValue")}else n=" ";var a=t.dimension(0),i=Number.isInteger(a)?1:a.size()[0];if(i!==r.length)throw new nt(a.size()[0],r.length);var o=e.length;Bt(t.min()[0]),Bt(t.max()[0]);for(var s=[],u=0;u<o;u++)s[u]=e.charAt(u);function l(m,d){s[m]=r.charAt(d[0])}if(Number.isInteger(a)?l(a,[0]):a.forEach(l),s.length>o)for(var c=o-1,f=s.length;c<f;c++)s[c]||(s[c]=n);return s.join("")}function hq(e,t){if(!Wo(t)){if(t.size().length!==1)throw new nt(t.size(),1);var r=t.dimension(0);if(typeof r!="string")throw new TypeError("String expected as index to retrieve an object property");return Ur(e,r)}}function pq(e,t,r){if(Wo(t))return e;if(t.size().length!==1)throw new nt(t.size(),1);var n=t.dimension(0);if(typeof n!="string")throw new TypeError("String expected as index to retrieve an object property");var a=Ve(e);return Vo(a,n,r),a}var $v="transpose",gq=["typed","matrix"],vq=I($v,gq,e=>{var{typed:t,matrix:r}=e;return t($v,{Array:o=>n(r(o)).valueOf(),Matrix:n,any:Ve});function n(o){var s=o.size(),u;switch(s.length){case 1:u=o.clone();break;case 2:{var l=s[0],c=s[1];if(c===0)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+at(s)+")");switch(o.storage()){case"dense":u=a(o,l,c);break;case"sparse":u=i(o,l,c);break}}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+at(s)+")")}return u}function a(o,s,u){for(var l=o._data,c=[],f,m=0;m<u;m++){f=c[m]=[];for(var d=0;d<s;d++)f[d]=Ve(l[d][m])}return o.createDenseMatrix({data:c,size:[u,s],datatype:o._datatype})}function i(o,s,u){for(var l=o._values,c=o._index,f=o._ptr,m=l?[]:void 0,d=[],h=[],p=[],y=0;y<s;y++)p[y]=0;var w,D,v;for(w=0,D=c.length;w<D;w++)p[c[w]]++;for(var x=0,g=0;g<s;g++)h.push(x),x+=p[g],p[g]=h[g];for(h.push(x),v=0;v<u;v++)for(var b=f[v],C=f[v+1],N=b;N<C;N++){var A=p[c[N]]++;d[A]=v,l&&(m[A]=Ve(l[N]))}return o.createSparseMatrix({values:m,index:d,ptr:h,size:[u,s],datatype:o._datatype})}}),_v="ctranspose",yq=["typed","transpose","conj"],bq=I(_v,yq,e=>{var{typed:t,transpose:r,conj:n}=e;return t(_v,{any:function(i){return n(r(i))}})}),Iv="zeros",wq=["typed","config","matrix","BigNumber"],xq=I(Iv,wq,e=>{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t(Iv,{"":function(){return r.matrix==="Array"?i([]):i([],"default")},"...number | BigNumber | string":function(l){var c=l[l.length-1];if(typeof c=="string"){var f=l.pop();return i(l,f)}else return r.matrix==="Array"?i(l):i(l,"default")},Array:i,Matrix:function(l){var c=l.storage();return i(l.valueOf(),c)},"Array | Matrix, string":function(l,c){return i(l.valueOf(),c)}});function i(u,l){var c=o(u),f=c?new a(0):0;if(s(u),l){var m=n(l);return u.length>0?m.resize(u,f):m}else{var d=[];return u.length>0?Jo(d,u,f):d}}function o(u){var l=!1;return u.forEach(function(c,f,m){Ze(c)&&(l=!0,m[f]=c.toNumber())}),l}function s(u){u.forEach(function(l){if(typeof l!="number"||!ke(l)||l<0)throw new Error("Parameters in function zeros must be positive integers")})}}),zv="fft",Dq=["typed","matrix","addScalar","multiplyScalar","divideScalar","exp","tau","i","dotDivide","conj","pow","ceil","log2"],Nq=I(zv,Dq,e=>{var{typed:t,matrix:r,addScalar:n,multiplyScalar:a,divideScalar:i,exp:o,tau:s,i:u,dotDivide:l,conj:c,pow:f,ceil:m,log2:d}=e;return t(zv,{Array:h,Matrix:function(v){return v.create(h(v.valueOf()),v.datatype())}});function h(D){var v=Ue(D);return v.length===1?w(D,v[0]):p(D.map(x=>h(x,v.slice(1))),0)}function p(D,v){var x=Ue(D);if(v!==0)return new Array(x[0]).fill(0).map((b,C)=>p(D[C],v-1));if(x.length===1)return w(D);function g(b){var C=Ue(b);return new Array(C[1]).fill(0).map((N,A)=>new Array(C[0]).fill(0).map((E,S)=>b[S][A]))}return g(p(g(D),1))}function y(D){for(var v=D.length,x=o(i(a(-1,a(u,s)),v)),g=[],b=1-v;b<v;b++)g.push(f(x,i(f(b,2),2)));for(var C=f(2,m(d(v+v-1))),N=[...new Array(v).fill(0).map((M,$)=>a(D[$],g[v-1+$])),...new Array(C-v).fill(0)],A=[...new Array(v+v-1).fill(0).map((M,$)=>i(1,g[$])),...new Array(C-(v+v-1)).fill(0)],E=w(N),S=w(A),F=new Array(C).fill(0).map((M,$)=>a(E[$],S[$])),k=l(c(h(c(F))),C),B=[],L=v-1;L<v+v-1;L++)B.push(a(k[L],g[L]));return B}function w(D){var v=D.length;if(v===1)return[D[0]];if(v%2===0){for(var x=[...w(D.filter((N,A)=>A%2===0)),...w(D.filter((N,A)=>A%2===1))],g=0;g<v/2;g++){var b=x[g],C=a(x[g+v/2],o(a(a(s,u),i(-g,v))));x[g]=n(b,C),x[g+v/2]=n(b,a(-1,C))}return x}else return y(D)}}),jv="ifft",Aq=["typed","fft","dotDivide","conj"],Cq=I(jv,Aq,e=>{var{typed:t,fft:r,dotDivide:n,conj:a}=e;return t(jv,{"Array | Matrix":function(o){var s=Re(o)?o.size():Ue(o);return n(a(r(a(o))),s.reduce((u,l)=>u*l,1))}})});function Us(e){"@babel/helpers - typeof";return Us=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Us(e)}function Eq(e,t){if(Us(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Us(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sq(e){var t=Eq(e,"string");return Us(t)=="symbol"?t:t+""}function sr(e,t,r){return(t=Sq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Mq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qv(Object(r),!0).forEach(function(n){sr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Tq="solveODE",Fq=["typed","add","subtract","multiply","divide","max","map","abs","isPositive","isNegative","larger","smaller","matrix","bignumber","unaryMinus"],Pq=I(Tq,Fq,e=>{var{typed:t,add:r,subtract:n,multiply:a,divide:i,max:o,map:s,abs:u,isPositive:l,isNegative:c,larger:f,smaller:m,matrix:d,bignumber:h,unaryMinus:p}=e;function y(N){return function(A,E,S,F){var k=!(E.length===2&&(E.every(b)||E.every(dn)));if(k)throw new Error('"tspan" must be an Array of two numeric values or two units [tStart, tEnd]');var B=E[0],L=E[1],M=f(L,B),$=F.firstStep;if($!==void 0&&!l($))throw new Error('"firstStep" must be positive');var H=F.maxStep;if(H!==void 0&&!l(H))throw new Error('"maxStep" must be positive');var j=F.minStep;if(j&&c(j))throw new Error('"minStep" must be positive or zero');var Y=[B,L,$,j,H].filter(O=>O!==void 0);if(!(Y.every(b)||Y.every(dn)))throw new Error('Inconsistent type of "t" dependant variables');for(var te=1,K=F.tol?F.tol:1e-4,P=F.minDelta?F.minDelta:.2,X=F.maxDelta?F.maxDelta:5,z=F.maxIter?F.maxIter:1e4,ie=[B,L,...S,H,j].some(Ze),[se,V,_,W]=ie?[h(N.a),h(N.c),h(N.b),h(N.bp)]:[N.a,N.c,N.b,N.bp],ne=$?M?$:p($):i(n(L,B),te),Q=[B],ue=[S],oe=n(_,W),be=0,Me=0,Pe=x(M),Ee=g(M);Pe(Q[be],L);){var Oe=[];ne=Ee(Q[be],L,ne),Oe.push(A(Q[be],ue[be]));for(var Ie=1;Ie<V.length;++Ie)Oe.push(A(r(Q[be],a(V[Ie],ne)),r(ue[be],a(ne,se[Ie],Oe))));var R=o(u(s(a(oe,Oe),O=>dn(O)?O.value:O)));R<K&&K/R>1/4&&(Q.push(r(Q[be],ne)),ue.push(r(ue[be],a(ne,_,Oe))),be++);var Z=.84*(K/R)**(1/5);if(m(Z,P)?Z=P:f(Z,X)&&(Z=X),Z=ie?h(Z):Z,ne=a(ne,Z),H&&f(u(ne),H)?ne=M?H:p(H):j&&m(u(ne),j)&&(ne=M?j:p(j)),Me++,Me>z)throw new Error("Maximum number of iterations reached, try changing options")}return{t:Q,y:ue}}}function w(N,A,E,S){var F=[[],[.5],[0,.75],[.2222222222222222,.3333333333333333,.4444444444444444]],k=[null,1/2,3/4,1],B=[2/9,1/3,4/9,0],L=[7/24,1/4,1/3,1/8],M={a:F,c:k,b:B,bp:L};return y(M)(N,A,E,S)}function D(N,A,E,S){var F=[[],[.2],[.075,.225],[.9777777777777777,-3.7333333333333334,3.5555555555555554],[2.9525986892242035,-11.595793324188385,9.822892851699436,-.2908093278463649],[2.8462752525252526,-10.757575757575758,8.906422717743473,.2784090909090909,-.2735313036020583],[.09114583333333333,0,.44923629829290207,.6510416666666666,-.322376179245283,.13095238095238096]],k=[null,1/5,3/10,4/5,8/9,1,1],B=[35/384,0,500/1113,125/192,-2187/6784,11/84,0],L=[5179/57600,0,7571/16695,393/640,-92097/339200,187/2100,1/40],M={a:F,c:k,b:B,bp:L};return y(M)(N,A,E,S)}function v(N,A,E,S){var F=S.method?S.method:"RK45",k={RK23:w,RK45:D};if(F.toUpperCase()in k){var B=Mq({},S);return delete B.method,k[F.toUpperCase()](N,A,E,B)}else{var L=Object.keys(k).map($=>'"'.concat($,'"')),M="".concat(L.slice(0,-1).join(", ")," and ").concat(L.slice(-1));throw new Error('Unavailable method "'.concat(F,'". Available methods are ').concat(M))}}function x(N){return N?m:f}function g(N){var A=N?f:m;return function(E,S,F){var k=r(E,F);return A(k,S)?n(S,E):F}}function b(N){return Ze(N)||ze(N)}function C(N,A,E,S){var F=v(N,A.toArray(),E.toArray(),S);return{t:d(F.t),y:d(F.y)}}return t("solveODE",{"function, Array, Array, Object":v,"function, Matrix, Matrix, Object":C,"function, Array, Array":(N,A,E)=>v(N,A,E,{}),"function, Matrix, Matrix":(N,A,E)=>C(N,A,E,{}),"function, Array, number | BigNumber | Unit":(N,A,E)=>{var S=v(N,A,[E],{});return{t:S.t,y:S.y.map(F=>F[0])}},"function, Matrix, number | BigNumber | Unit":(N,A,E)=>{var S=v(N,A.toArray(),[E],{});return{t:d(S.t),y:d(S.y.map(F=>F[0]))}},"function, Array, number | BigNumber | Unit, Object":(N,A,E,S)=>{var F=v(N,A,[E],S);return{t:F.t,y:F.y.map(k=>k[0])}},"function, Matrix, number | BigNumber | Unit, Object":(N,A,E,S)=>{var F=v(N,A.toArray(),[E],S);return{t:d(F.t),y:d(F.y.map(k=>k[0]))}}})}),kq="erf",Oq=["typed"],Bq=I(kq,Oq,e=>{var{typed:t}=e;return t("name",{number:function(o){var s=Math.abs(o);return s>=Iq?ai(o):s<=$q?ai(o)*r(s):s<=4?ai(o)*(1-n(s)):ai(o)*(1-a(s))},"Array | Matrix":t.referToSelf(i=>o=>Qe(o,i))});function r(i){var o=i*i,s=Aa[0][4]*o,u=o,l;for(l=0;l<3;l+=1)s=(s+Aa[0][l])*o,u=(u+So[0][l])*o;return i*(s+Aa[0][3])/(u+So[0][3])}function n(i){var o=Aa[1][8]*i,s=i,u;for(u=0;u<7;u+=1)o=(o+Aa[1][u])*i,s=(s+So[1][u])*i;var l=(o+Aa[1][7])/(s+So[1][7]),c=parseInt(i*16)/16,f=(i-c)*(i+c);return Math.exp(-c*c)*Math.exp(-f)*l}function a(i){var o=1/(i*i),s=Aa[2][5]*o,u=o,l;for(l=0;l<4;l+=1)s=(s+Aa[2][l])*o,u=(u+So[2][l])*o;var c=o*(s+Aa[2][4])/(u+So[2][4]);c=(_q-c)/i,o=parseInt(i*16)/16;var f=(i-o)*(i+o);return Math.exp(-o*o)*Math.exp(-f)*c}}),$q=.46875,_q=.5641895835477563,Aa=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,21531153547440383e-24],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],So=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],Iq=Math.pow(2,53),Rv="zeta",zq=["typed","config","multiply","pow","divide","factorial","equal","smallerEq","isBounded","isNegative","gamma","sin","subtract","add","?Complex","?BigNumber","pi"],jq=I(Rv,zq,e=>{var{typed:t,config:r,multiply:n,pow:a,divide:i,factorial:o,equal:s,smallerEq:u,isBounded:l,isNegative:c,gamma:f,sin:m,subtract:d,add:h,Complex:p,BigNumber:y,pi:w}=e;return t(Rv,{number:C=>D(C,N=>N,()=>20),BigNumber:C=>D(C,N=>new y(N),()=>Math.abs(Math.log10(r.relTol))),Complex:v});function D(C,N,A){return s(C,0)?N(-.5):s(C,1)?N(NaN):l(C)?x(C,N,A,E=>E):c(C)?N(NaN):N(1)}function v(C){return C.re===0&&C.im===0?new p(-.5):C.re===1?new p(NaN,NaN):C.re===1/0&&C.im===0?new p(1):C.im===1/0||C.re===-1/0?new p(NaN,NaN):x(C,N=>N,N=>Math.round(1.3*15+.9*Math.abs(N.im)),N=>N.re)}function x(C,N,A,E){var S=A(C);if(E(C)>-(S-1)/2)return b(C,N(S),N);var F=n(a(2,C),a(N(w),d(C,1)));return F=n(F,m(n(i(N(w),2),C))),F=n(F,f(d(1,C))),n(F,x(d(1,C),N,A,E))}function g(C,N){for(var A=C,E=C;u(E,N);E=h(E,1)){var S=i(n(o(h(N,d(E,1))),a(4,E)),n(o(d(N,E)),o(n(2,E))));A=h(A,S)}return n(N,A)}function b(C,N,A){for(var E=i(1,n(g(A(0),N),d(1,a(2,d(1,C))))),S=A(0),F=A(1);u(F,N);F=h(F,1))S=h(S,i(n((-1)**(F-1),g(F,N)),a(F,C)));return n(E,S)}}),Lv="mode",qq=["typed","isNaN","isNumeric"],Rq=I(Lv,qq,e=>{var{typed:t,isNaN:r,isNumeric:n}=e;return t(Lv,{"Array | Matrix":a,"...":function(o){return a(o)}});function a(i){i=mt(i.valueOf());var o=i.length;if(o===0)throw new Error("Cannot calculate mode of an empty array");for(var s={},u=[],l=0,c=0;c<i.length;c++){var f=i[c];if(n(f)&&r(f))throw new Error("Cannot calculate mode of an array containing NaN values");f in s||(s[f]=0),s[f]++,s[f]===l?u.push(f):s[f]>l&&(l=s[f],u=[f])}return u}});function Yr(e,t,r){var n;return String(e).includes("Unexpected type")?(n=arguments.length>2?" (type: "+Ft(r)+", value: "+JSON.stringify(r)+")":" (type: "+e.data.actual+")",new TypeError("Cannot calculate "+t+", unexpected type of argument"+n)):String(e).includes("complex numbers")?(n=arguments.length>2?" (type: "+Ft(r)+", value: "+JSON.stringify(r)+")":"",new TypeError("Cannot calculate "+t+", no ordering relation is defined for complex numbers"+n)):e}var Hv="prod",Lq=["typed","config","multiplyScalar","numeric"],Hq=I(Hv,Lq,e=>{var{typed:t,config:r,multiplyScalar:n,numeric:a}=e;return t(Hv,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":function(s,u){throw new Error("prod(A, dim) is not yet supported")},"...":function(s){return i(s)}});function i(o){var s;if(pi(o,function(u){try{s=s===void 0?u:n(s,u)}catch(l){throw Yr(l,"prod",u)}}),typeof s=="string"&&(s=a(s,vi(s,r))),s===void 0)throw new Error("Cannot calculate prod of an empty array");return s}}),Gv="format",Gq=["typed"],Vq=I(Gv,Gq,e=>{var{typed:t}=e;return t(Gv,{any:at,"any, Object | function | number | BigNumber":at})}),Vv="bin",Uq=["typed","format"],Wq=I(Vv,Uq,e=>{var{typed:t,format:r}=e;return t(Vv,{"number | BigNumber":function(a){return r(a,{notation:"bin"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"bin",wordSize:i})}})}),Uv="oct",Jq=["typed","format"],Kq=I(Uv,Jq,e=>{var{typed:t,format:r}=e;return t(Uv,{"number | BigNumber":function(a){return r(a,{notation:"oct"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"oct",wordSize:i})}})}),Wv="hex",Yq=["typed","format"],Zq=I(Wv,Yq,e=>{var{typed:t,format:r}=e;return t(Wv,{"number | BigNumber":function(a){return r(a,{notation:"hex"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"hex",wordSize:i})}})}),q2=/\$([\w.]+)/g,Jv="print",Qq=["typed"],R2=I(Jv,Qq,e=>{var{typed:t}=e;return t(Jv,{"string, Object | Array":Kv,"string, Object | Array, number | Object":Kv})});function Kv(e,t,r){return e.replace(q2,function(n,a){var i=a.split("."),o=t[i.shift()];for(o!==void 0&&o.isMatrix&&(o=o.toArray());i.length&&o!==void 0;){var s=i.shift();o=s?o[s]:o+"."}return o!==void 0?Yt(o)?o:at(o,r):n})}var Yv="to",Xq=["typed","matrix","concat"],eR=I(Yv,Xq,e=>{var{typed:t,matrix:r,concat:n}=e,a=$t({typed:t,matrix:r,concat:n});return t(Yv,{"Unit, Unit | string":(i,o)=>i.to(o)},a({Ds:!0}))}),Zv="toBest",tR=["typed"],rR=I(Zv,tR,e=>{var{typed:t}=e;return t(Zv,{Unit:r=>r.toBest(),"Unit, string":(r,n)=>r.toBest(n.split(",")),"Unit, string, Object":(r,n,a)=>r.toBest(n.split(","),a),"Unit, Array":(r,n)=>r.toBest(n),"Unit, Array, Object":(r,n,a)=>r.toBest(n,a)})}),Qv="isPrime",nR=["typed"],aR=I(Qv,nR,e=>{var{typed:t}=e;return t(Qv,{number:function(n){if(n<=3)return n>1;if(n%2===0||n%3===0)return!1;for(var a=5;a*a<=n;a+=6)if(n%a===0||n%(a+2)===0)return!1;return!0},bigint:function(n){if(n<=3n)return n>1n;if(n%2n===0n||n%3n===0n)return!1;for(var a=5n;a*a<=n;a+=6n)if(n%a===0n||n%(a+2n)===0n)return!1;return!0},BigNumber:function(n){if(n.lte(3))return n.gt(1);if(n.mod(2).eq(0)||n.mod(3).eq(0))return!1;if(n.lt(Math.pow(2,32))){for(var a=n.toNumber(),i=5;i*i<=a;i+=6)if(a%i===0||a%(i+2)===0)return!1;return!0}function o(D,v,x){for(var g=1;!v.eq(0);)v.mod(2).eq(0)?(v=v.div(2),D=D.mul(D).mod(x)):(v=v.sub(1),g=D.mul(g).mod(x));return g}var s=n.constructor.clone({precision:n.toFixed(0).length*2});n=new s(n);for(var u=0,l=n.sub(1);l.mod(2).eq(0);)l=l.div(2),u+=1;var c=null;if(n.lt("3317044064679887385961981"))c=[2,3,5,7,11,13,17,19,23,29,31,37,41].filter(D=>D<n);else{var f=Math.min(n.toNumber()-2,Math.floor(2*Math.pow(n.toFixed(0).length*Math.log(10),2)));c=[];for(var m=2;m<=f;m+=1)c.push(f)}for(var d=0;d<c.length;d+=1){var h=c[d],p=o(n.sub(n).add(h),l,n);if(!p.eq(1)){for(var y=0,w=p;!w.eq(n.sub(1));y+=1,w=w.mul(w).mod(n))if(y===u-1)return!1}}return!0},"Array | Matrix":t.referToSelf(r=>n=>Qe(n,r))})}),iR="numeric",oR=["number","?bignumber","?fraction"],sR=I(iR,oR,e=>{var{number:t,bignumber:r,fraction:n}=e,a={string:!0,number:!0,BigNumber:!0,Fraction:!0},i={number:o=>t(o),BigNumber:r?o=>r(o):Pd,bigint:o=>BigInt(o),Fraction:n?o=>n(o):_2};return function(s){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"number",l=arguments.length>2?arguments[2]:void 0;if(l!==void 0)throw new SyntaxError("numeric() takes one or two arguments");var c=Ft(s);if(!(c in a))throw new TypeError("Cannot convert "+s+' of type "'+c+'"; valid input types are '+Object.keys(a).join(", "));if(!(u in i))throw new TypeError("Cannot convert "+s+' to type "'+u+'"; valid output types are '+Object.keys(i).join(", "));return u===c?s:i[u](s)}}),Xv="divideScalar",uR=["typed","numeric"],lR=I(Xv,uR,e=>{var{typed:t,numeric:r}=e;return t(Xv,{"number, number":function(a,i){return a/i},"Complex, Complex":function(a,i){return a.div(i)},"BigNumber, BigNumber":function(a,i){return a.div(i)},"bigint, bigint":function(a,i){return a/i},"Fraction, Fraction":function(a,i){return a.div(i)},"Unit, number | Complex | Fraction | BigNumber | Unit":(n,a)=>n.divide(a),"number | Fraction | Complex | BigNumber, Unit":(n,a)=>a.divideInto(n)})}),e1="pow",cR=["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],fR=I(e1,cR,e=>{var{typed:t,config:r,identity:n,multiply:a,matrix:i,inv:o,number:s,fraction:u,Complex:l}=e;return t(e1,{"number, number":c,"Complex, Complex":function(h,p){return h.pow(p)},"BigNumber, BigNumber":function(h,p){return p.isInteger()||h>=0||r.predictable?h.pow(p):new l(h.toNumber(),0).pow(p.toNumber(),0)},"bigint, bigint":(d,h)=>d**h,"Fraction, Fraction":function(h,p){var y=h.pow(p);if(y!=null)return y;if(r.predictable)throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");return c(h.valueOf(),p.valueOf())},"Array, number":f,"Array, BigNumber":function(h,p){return f(h,p.toNumber())},"Matrix, number":m,"Matrix, BigNumber":function(h,p){return m(h,p.toNumber())},"Unit, number | BigNumber":function(h,p){return h.pow(p)}});function c(d,h){if(r.predictable&&!ke(h)&&d<0)try{var p=u(h),y=s(p);if((h===y||Math.abs((h-y)/h)<1e-14)&&p.d%2n===1n)return(p.n%2n===0n?1:-1)*Math.pow(-d,h)}catch{}return r.predictable&&(d<-1&&h===1/0||d>-1&&d<0&&h===-1/0)?NaN:ke(h)||d>=0||r.predictable?Vx(d,h):d*d<1&&h===1/0||d*d>1&&h===-1/0?0:new l(d,0).pow(h,0)}function f(d,h){if(!ke(h))throw new TypeError("For A^b, b must be an integer (value is "+h+")");var p=Ue(d);if(p.length!==2)throw new Error("For A^b, A must be 2 dimensional (A has "+p.length+" dimensions)");if(p[0]!==p[1])throw new Error("For A^b, A must be square (size is "+p[0]+"x"+p[1]+")");if(h<0)try{return f(o(d),-h)}catch(D){throw D.message==="Cannot calculate inverse, determinant is zero"?new TypeError("For A^b, when A is not invertible, b must be a positive integer (value is "+h+")"):D}for(var y=n(p[0]).valueOf(),w=d;h>=1;)(h&1)===1&&(y=a(w,y)),h>>=1,w=a(w,w);return y}function m(d,h){return i(f(d.valueOf(),h))}}),Mo="Number of decimals in function round must be an integer",t1="round",mR=["typed","config","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],dR=I(t1,mR,e=>{var{typed:t,config:r,matrix:n,equalScalar:a,zeros:i,BigNumber:o,DenseMatrix:s}=e,u=Fr({typed:t,equalScalar:a}),l=lr({typed:t,DenseMatrix:s}),c=$n({typed:t});function f(m){return Math.abs(au(m).exponent)}return t(t1,{number:function(d){var h=As(d,f(r.relTol)),p=Ar(d,h,r.relTol,r.absTol)?h:d;return As(p)},"number, number":function(d,h){var p=f(r.relTol);if(h>=p)return As(d,h);var y=As(d,p),w=Ar(d,y,r.relTol,r.absTol)?y:d;return As(w,h)},"number, BigNumber":function(d,h){if(!h.isInteger())throw new TypeError(Mo);return new o(d).toDecimalPlaces(h.toNumber())},Complex:function(d){return d.round()},"Complex, number":function(d,h){if(h%1)throw new TypeError(Mo);return d.round(h)},"Complex, BigNumber":function(d,h){if(!h.isInteger())throw new TypeError(Mo);var p=h.toNumber();return d.round(p)},BigNumber:function(d){var h=new o(d).toDecimalPlaces(f(r.relTol)),p=Bn(d,h,r.relTol,r.absTol)?h:d;return p.toDecimalPlaces(0)},"BigNumber, BigNumber":function(d,h){if(!h.isInteger())throw new TypeError(Mo);var p=f(r.relTol);if(h>=p)return d.toDecimalPlaces(h.toNumber());var y=d.toDecimalPlaces(p),w=Bn(d,y,r.relTol,r.absTol)?y:d;return w.toDecimalPlaces(h.toNumber())},bigint:m=>m,"bigint, number":(m,d)=>m,"bigint, BigNumber":(m,d)=>m,Fraction:function(d){return d.round()},"Fraction, number":function(d,h){if(h%1)throw new TypeError(Mo);return d.round(h)},"Fraction, BigNumber":function(d,h){if(!h.isInteger())throw new TypeError(Mo);return d.round(h.toNumber())},"Unit, number, Unit":t.referToSelf(m=>function(d,h,p){var y=d.toNumeric(p);return p.multiply(m(y,h))}),"Unit, BigNumber, Unit":t.referToSelf(m=>(d,h,p)=>m(d,h.toNumber(),p)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(m=>(d,h,p)=>Qe(d,y=>m(y,h,p),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(m=>(d,h)=>m(d,0,h)),"Array | Matrix":t.referToSelf(m=>d=>Qe(d,m,!0)),"SparseMatrix, number | BigNumber":t.referToSelf(m=>(d,h)=>u(d,h,m,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(m=>(d,h)=>c(d,h,m,!1)),"Array, number | BigNumber":t.referToSelf(m=>(d,h)=>c(n(d),h,m,!1).valueOf()),"number | Complex | BigNumber | Fraction, SparseMatrix":t.referToSelf(m=>(d,h)=>a(d,0)?i(h.size(),h.storage()):l(h,d,m,!0)),"number | Complex | BigNumber | Fraction, DenseMatrix":t.referToSelf(m=>(d,h)=>a(d,0)?i(h.size(),h.storage()):c(h,d,m,!0)),"number | Complex | BigNumber | Fraction, Array":t.referToSelf(m=>(d,h)=>c(n(h),d,m,!0).valueOf())})}),r1="log",hR=["config","typed","typeOf","divideScalar","Complex"],pR=Math.log(16),gR=I(r1,hR,e=>{var{typed:t,typeOf:r,config:n,divideScalar:a,Complex:i}=e;function o(u){return u.log()}function s(u){return o(new i(u,0))}return t(r1,{number:function(l){return l>=0||n.predictable?h0(l):s(l)},bigint:Td(pR,h0,n,s),Complex:o,BigNumber:function(l){return!l.isNegative()||n.predictable?l.ln():s(l.toNumber())},"any, any":t.referToSelf(u=>(l,c)=>{if(r(l)==="Fraction"&&r(c)==="Fraction"){var f=l.log(c);if(f!==null)return f}return a(u(l),u(c))})})}),n1="log1p",vR=["typed","config","divideScalar","log","Complex"],yR=I(n1,vR,e=>{var{typed:t,config:r,divideScalar:n,log:a,Complex:i}=e;return t(n1,{number:function(u){return u>=-1||r.predictable?s9(u):o(new i(u,0))},Complex:o,BigNumber:function(u){var l=u.plus(1);return!l.isNegative()||r.predictable?l.ln():o(new i(u.toNumber(),0))},"Array | Matrix":t.referToSelf(s=>u=>Qe(u,s)),"any, any":t.referToSelf(s=>(u,l)=>n(s(u),a(l)))});function o(s){var u=s.re+1;return new i(Math.log(Math.sqrt(u*u+s.im*s.im)),Math.atan2(s.im,u))}}),a1="nthRoots",bR=["config","typed","divideScalar","Complex"],wR=I(a1,bR,e=>{var{typed:t,config:r,divideScalar:n,Complex:a}=e,i=[function(u){return new a(u,0)},function(u){return new a(0,u)},function(u){return new a(-u,0)},function(u){return new a(0,-u)}];function o(s,u){if(u<0)throw new Error("Root must be greater than zero");if(u===0)throw new Error("Root must be non-zero");if(u%1!==0)throw new Error("Root must be an integer");if(s===0||s.abs()===0)return[new a(0,0)];var l=typeof s=="number",c;(l||s.re===0||s.im===0)&&(l?c=2*+(s<0):s.im===0?c=2*+(s.re<0):c=2*+(s.im<0)+1);for(var f=s.arg(),m=s.abs(),d=[],h=Math.pow(m,1/u),p=0;p<u;p++){var y=(c+4*p)/u;if(y===Math.round(y)){d.push(i[y%4](h));continue}d.push(new a({r:h,phi:(f+2*Math.PI*p)/u}))}return d}return t(a1,{Complex:function(u){return o(u,2)},"Complex, number":o})}),i1="dotPow",xR=["typed","equalScalar","matrix","pow","DenseMatrix","concat","SparseMatrix"],DR=I(i1,xR,e=>{var{typed:t,equalScalar:r,matrix:n,pow:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=jr({typed:t}),l=ma({typed:t,SparseMatrix:s}),c=Fr({typed:t,equalScalar:r}),f=lr({typed:t,DenseMatrix:i}),m=$t({typed:t,matrix:n,concat:o}),d={};for(var h in a.signatures)Object.prototype.hasOwnProperty.call(a.signatures,h)&&!h.includes("Matrix")&&!h.includes("Array")&&(d[h]=a.signatures[h]);var p=t(d);return t(i1,m({elop:p,SS:l,DS:u,Ss:c,sS:f}))}),o1="dotDivide",NR=["typed","matrix","equalScalar","divideScalar","DenseMatrix","concat","SparseMatrix"],AR=I(o1,NR,e=>{var{typed:t,matrix:r,equalScalar:n,divideScalar:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=ea({typed:t,equalScalar:n}),l=jr({typed:t}),c=ma({typed:t,SparseMatrix:s}),f=Fr({typed:t,equalScalar:n}),m=lr({typed:t,DenseMatrix:i}),d=$t({typed:t,matrix:r,concat:o});return t(o1,d({elop:a,SS:c,DS:l,SD:u,Ss:f,sS:m}))});function iu(e){var{DenseMatrix:t}=e;return function(n,a,i){var o=n.size();if(o.length!==2)throw new RangeError("Matrix must be two dimensional (size: "+at(o)+")");var s=o[0],u=o[1];if(s!==u)throw new RangeError("Matrix must be square (size: "+at(o)+")");var l=[];if(Re(a)){var c=a.size(),f=a._data;if(c.length===1){if(c[0]!==s)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var m=0;m<s;m++)l[m]=[f[m]];return new t({data:l,size:[s,1],datatype:a._datatype})}if(c.length===2){if(c[0]!==s||c[1]!==1)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");if(Hl(a)){if(i){l=[];for(var d=0;d<s;d++)l[d]=[f[d][0]];return new t({data:l,size:[s,1],datatype:a._datatype})}return a}if(Vi(a)){for(var h=0;h<s;h++)l[h]=[0];for(var p=a._values,y=a._index,w=a._ptr,D=w[1],v=w[0];v<D;v++){var x=y[v];l[x][0]=p[v]}return new t({data:l,size:[s,1],datatype:a._datatype})}}throw new RangeError("Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.")}if(Mt(a)){var g=Ue(a);if(g.length===1){if(g[0]!==s)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var b=0;b<s;b++)l[b]=[a[b]];return new t({data:l,size:[s,1]})}if(g.length===2){if(g[0]!==s||g[1]!==1)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var C=0;C<s;C++)l[C]=[a[C][0]];return new t({data:l,size:[s,1]})}throw new RangeError("Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.")}}}var s1="lsolve",CR=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],ER=I(s1,CR,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=iu({DenseMatrix:s});return t(s1,{"SparseMatrix, Array | Matrix":function(m,d){return c(m,d)},"DenseMatrix, Array | Matrix":function(m,d){return l(m,d)},"Array, Array | Matrix":function(m,d){var h=r(m),p=l(h,d);return p.valueOf()}});function l(f,m){m=u(f,m,!0);for(var d=m._data,h=f._size[0],p=f._size[1],y=[],w=f._data,D=0;D<p;D++){var v=d[D][0]||0,x=void 0;if(o(v,0))x=0;else{var g=w[D][D];if(o(g,0))throw new Error("Linear system cannot be solved since matrix is singular");x=n(v,g);for(var b=D+1;b<h;b++)d[b]=[i(d[b][0]||0,a(x,w[b][D]))]}y[D]=[x]}return new s({data:y,size:[h,1]})}function c(f,m){m=u(f,m,!0);for(var d=m._data,h=f._size[0],p=f._size[1],y=f._values,w=f._index,D=f._ptr,v=[],x=0;x<p;x++){var g=d[x][0]||0;if(o(g,0))v[x]=[0];else{for(var b=0,C=[],N=[],A=D[x],E=D[x+1],S=A;S<E;S++){var F=w[S];F===x?b=y[S]:F>x&&(C.push(y[S]),N.push(F))}if(o(b,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var k=n(g,b),B=0,L=N.length;B<L;B++){var M=N[B];d[M]=[i(d[M][0]||0,a(k,C[B]))]}v[x]=[k]}}return new s({data:v,size:[h,1]})}}),u1="usolve",SR=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],MR=I(u1,SR,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=iu({DenseMatrix:s});return t(u1,{"SparseMatrix, Array | Matrix":function(m,d){return c(m,d)},"DenseMatrix, Array | Matrix":function(m,d){return l(m,d)},"Array, Array | Matrix":function(m,d){var h=r(m),p=l(h,d);return p.valueOf()}});function l(f,m){m=u(f,m,!0);for(var d=m._data,h=f._size[0],p=f._size[1],y=[],w=f._data,D=p-1;D>=0;D--){var v=d[D][0]||0,x=void 0;if(o(v,0))x=0;else{var g=w[D][D];if(o(g,0))throw new Error("Linear system cannot be solved since matrix is singular");x=n(v,g);for(var b=D-1;b>=0;b--)d[b]=[i(d[b][0]||0,a(x,w[b][D]))]}y[D]=[x]}return new s({data:y,size:[h,1]})}function c(f,m){m=u(f,m,!0);for(var d=m._data,h=f._size[0],p=f._size[1],y=f._values,w=f._index,D=f._ptr,v=[],x=p-1;x>=0;x--){var g=d[x][0]||0;if(o(g,0))v[x]=[0];else{for(var b=0,C=[],N=[],A=D[x],E=D[x+1],S=E-1;S>=A;S--){var F=w[S];F===x?b=y[S]:F<x&&(C.push(y[S]),N.push(F))}if(o(b,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var k=n(g,b),B=0,L=N.length;B<L;B++){var M=N[B];d[M]=[i(d[M][0],a(k,C[B]))]}v[x]=[k]}}return new s({data:v,size:[h,1]})}}),l1="lsolveAll",TR=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],FR=I(l1,TR,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=iu({DenseMatrix:s});return t(l1,{"SparseMatrix, Array | Matrix":function(m,d){return c(m,d)},"DenseMatrix, Array | Matrix":function(m,d){return l(m,d)},"Array, Array | Matrix":function(m,d){var h=r(m),p=l(h,d);return p.map(y=>y.valueOf())}});function l(f,m){for(var d=[u(f,m,!0)._data.map(N=>N[0])],h=f._data,p=f._size[0],y=f._size[1],w=0;w<y;w++)for(var D=d.length,v=0;v<D;v++){var x=d[v];if(o(h[w][w],0))if(o(x[w],0)){if(v===0){var b=[...x];b[w]=1;for(var C=w+1;C<y;C++)b[C]=i(b[C],h[C][w]);d.push(b)}}else{if(v===0)return[];d.splice(v,1),v-=1,D-=1}else{x[w]=n(x[w],h[w][w]);for(var g=w+1;g<y;g++)x[g]=i(x[g],a(x[w],h[g][w]))}}return d.map(N=>new s({data:N.map(A=>[A]),size:[p,1]}))}function c(f,m){for(var d=[u(f,m,!0)._data.map(te=>te[0])],h=f._size[0],p=f._size[1],y=f._values,w=f._index,D=f._ptr,v=0;v<p;v++)for(var x=d.length,g=0;g<x;g++){for(var b=d[g],C=[],N=[],A=D[v],E=D[v+1],S=0,F=A;F<E;F++){var k=w[F];k===v?S=y[F]:k>v&&(C.push(y[F]),N.push(k))}if(o(S,0))if(o(b[v],0)){if(g===0){var $=[...b];$[v]=1;for(var H=0,j=N.length;H<j;H++){var Y=N[H];$[Y]=i($[Y],C[H])}d.push($)}}else{if(g===0)return[];d.splice(g,1),g-=1,x-=1}else{b[v]=n(b[v],S);for(var B=0,L=N.length;B<L;B++){var M=N[B];b[M]=i(b[M],a(b[v],C[B]))}}}return d.map(te=>new s({data:te.map(K=>[K]),size:[h,1]}))}}),c1="usolveAll",PR=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],kR=I(c1,PR,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=iu({DenseMatrix:s});return t(c1,{"SparseMatrix, Array | Matrix":function(m,d){return c(m,d)},"DenseMatrix, Array | Matrix":function(m,d){return l(m,d)},"Array, Array | Matrix":function(m,d){var h=r(m),p=l(h,d);return p.map(y=>y.valueOf())}});function l(f,m){for(var d=[u(f,m,!0)._data.map(N=>N[0])],h=f._data,p=f._size[0],y=f._size[1],w=y-1;w>=0;w--)for(var D=d.length,v=0;v<D;v++){var x=d[v];if(o(h[w][w],0))if(o(x[w],0)){if(v===0){var b=[...x];b[w]=1;for(var C=w-1;C>=0;C--)b[C]=i(b[C],h[C][w]);d.push(b)}}else{if(v===0)return[];d.splice(v,1),v-=1,D-=1}else{x[w]=n(x[w],h[w][w]);for(var g=w-1;g>=0;g--)x[g]=i(x[g],a(x[w],h[g][w]))}}return d.map(N=>new s({data:N.map(A=>[A]),size:[p,1]}))}function c(f,m){for(var d=[u(f,m,!0)._data.map(te=>te[0])],h=f._size[0],p=f._size[1],y=f._values,w=f._index,D=f._ptr,v=p-1;v>=0;v--)for(var x=d.length,g=0;g<x;g++){for(var b=d[g],C=[],N=[],A=D[v],E=D[v+1],S=0,F=E-1;F>=A;F--){var k=w[F];k===v?S=y[F]:k<v&&(C.push(y[F]),N.push(k))}if(o(S,0))if(o(b[v],0)){if(g===0){var $=[...b];$[v]=1;for(var H=0,j=N.length;H<j;H++){var Y=N[H];$[Y]=i($[Y],C[H])}d.push($)}}else{if(g===0)return[];d.splice(g,1),g-=1,x-=1}else{b[v]=n(b[v],S);for(var B=0,L=N.length;B<L;B++){var M=N[B];b[M]=i(b[M],a(b[v],C[B]))}}}return d.map(te=>new s({data:te.map(K=>[K]),size:[h,1]}))}}),OR="matAlgo08xS0Sid",BR=["typed","equalScalar"],kd=I(OR,BR,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var s=a._values,u=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),m=i._values,d=i._index,h=i._ptr,p=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==p.length)throw new nt(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+p+")");if(!s||!m)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var w=c[0],D=c[1],v,x=r,g=0,b=o;typeof f=="string"&&f===y&&f!=="mixed"&&(v=f,x=t.find(r,[v,v]),g=t.convert(0,v),b=t.find(o,[v,v]));for(var C=[],N=[],A=[],E=[],S=[],F,k,B,L,M=0;M<D;M++){A[M]=N.length;var $=M+1;for(k=l[M],B=l[M+1],F=k;F<B;F++)L=u[F],S[L]=$,E[L]=s[F],N.push(L);for(k=h[M],B=h[M+1],F=k;F<B;F++)L=d[F],S[L]===$&&(E[L]=b(E[L],m[F]));for(F=A[M];F<N.length;){L=N[F];var H=E[L];x(H,g)?N.splice(F,1):(C.push(H),F++)}}return A[D]=N.length,a.createSparseMatrix({values:C,index:N,ptr:A,size:[w,D],datatype:f===a._datatype&&y===i._datatype?v:void 0})}}),Od=I("useMatrixForArrayScalar",["typed","matrix"],e=>{var{typed:t,matrix:r}=e;return{"Array, number":t.referTo("DenseMatrix, number",n=>(a,i)=>n(r(a),i).valueOf()),"Array, BigNumber":t.referTo("DenseMatrix, BigNumber",n=>(a,i)=>n(r(a),i).valueOf()),"number, Array":t.referTo("number, DenseMatrix",n=>(a,i)=>n(a,r(i)).valueOf()),"BigNumber, Array":t.referTo("BigNumber, DenseMatrix",n=>(a,i)=>n(a,r(i)).valueOf())}}),f1="leftShift",$R=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],_R=I(f1,$R,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,s=bi({typed:t}),u=ea({typed:t,equalScalar:n}),l=kd({typed:t,equalScalar:n}),c=no({typed:t,DenseMatrix:i}),f=Fr({typed:t,equalScalar:n}),m=$n({typed:t}),d=$t({typed:t,matrix:r,concat:o}),h=Od({typed:t,matrix:r});return t(f1,{"number, number":Yx,"BigNumber, BigNumber":tj,"bigint, bigint":(p,y)=>p<<y,"SparseMatrix, number | BigNumber":t.referToSelf(p=>(y,w)=>n(w,0)?y.clone():f(y,w,p,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(p=>(y,w)=>n(w,0)?y.clone():m(y,w,p,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(p=>(y,w)=>n(y,0)?a(w.size(),w.storage()):c(w,y,p,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(p=>(y,w)=>n(y,0)?a(w.size(),w.storage()):m(w,y,p,!0))},h,d({SS:l,DS:s,SD:u}))}),m1="rightArithShift",IR=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],zR=I(m1,IR,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,s=bi({typed:t}),u=ea({typed:t,equalScalar:n}),l=kd({typed:t,equalScalar:n}),c=no({typed:t,DenseMatrix:i}),f=Fr({typed:t,equalScalar:n}),m=$n({typed:t}),d=$t({typed:t,matrix:r,concat:o}),h=Od({typed:t,matrix:r});return t(m1,{"number, number":Zx,"BigNumber, BigNumber":rj,"bigint, bigint":(p,y)=>p>>y,"SparseMatrix, number | BigNumber":t.referToSelf(p=>(y,w)=>n(w,0)?y.clone():f(y,w,p,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(p=>(y,w)=>n(w,0)?y.clone():m(y,w,p,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(p=>(y,w)=>n(y,0)?a(w.size(),w.storage()):c(w,y,p,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(p=>(y,w)=>n(y,0)?a(w.size(),w.storage()):m(w,y,p,!0))},h,d({SS:l,DS:s,SD:u}))}),d1="rightLogShift",jR=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],qR=I(d1,jR,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,s=bi({typed:t}),u=ea({typed:t,equalScalar:n}),l=kd({typed:t,equalScalar:n}),c=no({typed:t,DenseMatrix:i}),f=Fr({typed:t,equalScalar:n}),m=$n({typed:t}),d=$t({typed:t,matrix:r,concat:o}),h=Od({typed:t,matrix:r});return t(d1,{"number, number":Qx,"SparseMatrix, number | BigNumber":t.referToSelf(p=>(y,w)=>n(w,0)?y.clone():f(y,w,p,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(p=>(y,w)=>n(w,0)?y.clone():m(y,w,p,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(p=>(y,w)=>n(y,0)?a(w.size(),w.storage()):c(w,y,p,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(p=>(y,w)=>n(y,0)?a(w.size(),w.storage()):m(w,y,p,!0))},h,d({SS:l,DS:s,SD:u}))}),h1="and",RR=["typed","matrix","equalScalar","zeros","not","concat"],L2=I(h1,RR,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,s=ea({typed:t,equalScalar:n}),u=Fc({typed:t,equalScalar:n}),l=Fr({typed:t,equalScalar:n}),c=$n({typed:t}),f=$t({typed:t,matrix:r,concat:o});return t(h1,{"number, number":Vm,"Complex, Complex":function(d,h){return(d.re!==0||d.im!==0)&&(h.re!==0||h.im!==0)},"BigNumber, BigNumber":function(d,h){return!d.isZero()&&!h.isZero()&&!d.isNaN()&&!h.isNaN()},"bigint, bigint":Vm,"Unit, Unit":t.referToSelf(m=>(d,h)=>m(d.value||0,h.value||0)),"SparseMatrix, any":t.referToSelf(m=>(d,h)=>i(h)?a(d.size(),d.storage()):l(d,h,m,!1)),"DenseMatrix, any":t.referToSelf(m=>(d,h)=>i(h)?a(d.size(),d.storage()):c(d,h,m,!1)),"any, SparseMatrix":t.referToSelf(m=>(d,h)=>i(d)?a(d.size(),d.storage()):l(h,d,m,!0)),"any, DenseMatrix":t.referToSelf(m=>(d,h)=>i(d)?a(d.size(),d.storage()):c(h,d,m,!0)),"Array, any":t.referToSelf(m=>(d,h)=>m(r(d),h).valueOf()),"any, Array":t.referToSelf(m=>(d,h)=>m(d,r(h)).valueOf())},f({SS:u,DS:s}))}),ic="compare",LR=["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix","concat"],HR=I(ic,LR,e=>{var{typed:t,config:r,equalScalar:n,matrix:a,BigNumber:i,Fraction:o,DenseMatrix:s,concat:u}=e,l=jr({typed:t}),c=Tc({typed:t,equalScalar:n}),f=lr({typed:t,DenseMatrix:s}),m=$t({typed:t,matrix:a,concat:u}),d=is({typed:t});return t(ic,GR({typed:t,config:r}),{"boolean, boolean":function(p,y){return p===y?0:p>y?1:-1},"BigNumber, BigNumber":function(p,y){return Bn(p,y,r.relTol,r.absTol)?new i(0):new i(p.cmp(y))},"bigint, bigint":function(p,y){return p===y?0n:p>y?1n:-1n},"Fraction, Fraction":function(p,y){return new o(p.compare(y))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},d,m({SS:c,DS:l,Ss:f}))}),GR=I(ic,["typed","config"],e=>{var{typed:t,config:r}=e;return t(ic,{"number, number":function(a,i){return Ar(a,i,r.relTol,r.absTol)?0:a>i?1:-1}})}),zf,p1;function VR(){return p1||(p1=1,zf=function e(t,r){var n=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,a=/(^[ ]*|[ ]*$)/g,i=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,o=/^0x[0-9a-f]+$/i,s=/^0/,u=function(v){return e.insensitive&&(""+v).toLowerCase()||""+v},l=u(t).replace(a,"")||"",c=u(r).replace(a,"")||"",f=l.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=c.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),d=parseInt(l.match(o),16)||f.length!==1&&l.match(i)&&Date.parse(l),h=parseInt(c.match(o),16)||d&&c.match(i)&&Date.parse(c)||null,p,y;if(h){if(d<h)return-1;if(d>h)return 1}for(var w=0,D=Math.max(f.length,m.length);w<D;w++){if(p=!(f[w]||"").match(s)&&parseFloat(f[w])||f[w]||0,y=!(m[w]||"").match(s)&&parseFloat(m[w])||m[w]||0,isNaN(p)!==isNaN(y))return isNaN(p)?1:-1;if(typeof p!=typeof y&&(p+="",y+=""),p<y)return-1;if(p>y)return 1}return 0}),zf}var UR=VR();const To=Js.getDefaultExportFromCjs(UR);var g1="compareNatural",WR=["typed","compare"],JR=I(g1,WR,e=>{var{typed:t,compare:r}=e,n=r.signatures["boolean,boolean"];return t(g1,{"any, any":a});function a(u,l){var c=Ft(u),f=Ft(l),m;if((c==="number"||c==="BigNumber"||c==="Fraction")&&(f==="number"||f==="BigNumber"||f==="Fraction"))return m=r(u,l),m.toString()!=="0"?m>0?1:-1:To(c,f);var d=["Array","DenseMatrix","SparseMatrix"];if(d.includes(c)||d.includes(f))return m=i(a,u,l),m!==0?m:To(c,f);if(c!==f)return To(c,f);if(c==="Complex")return KR(u,l);if(c==="Unit")return u.equalBase(l)?a(u.value,l.value):o(a,u.formatUnits(),l.formatUnits());if(c==="boolean")return n(u,l);if(c==="string")return To(u,l);if(c==="Object")return s(a,u,l);if(c==="null"||c==="undefined")return 0;throw new TypeError('Unsupported type of value "'+c+'"')}function i(u,l,c){return Vi(l)&&Vi(c)?o(u,l.toJSON().values,c.toJSON().values):Vi(l)?i(u,l.toArray(),c):Vi(c)?i(u,l,c.toArray()):Hl(l)?i(u,l.toJSON().data,c):Hl(c)?i(u,l,c.toJSON().data):Array.isArray(l)?Array.isArray(c)?o(u,l,c):i(u,l,[c]):i(u,[l],c)}function o(u,l,c){for(var f=0,m=Math.min(l.length,c.length);f<m;f++){var d=u(l[f],c[f]);if(d!==0)return d}return l.length>c.length?1:l.length<c.length?-1:0}function s(u,l,c){var f=Object.keys(l),m=Object.keys(c);f.sort(To),m.sort(To);var d=o(u,f,m);if(d!==0)return d;for(var h=0;h<f.length;h++){var p=u(l[f[h]],c[m[h]]);if(p!==0)return p}return 0}});function KR(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0}var v1="compareText",YR=["typed","matrix","concat"];zm.signature="any, any";var ZR=I(v1,YR,e=>{var{typed:t,matrix:r,concat:n}=e,a=$t({typed:t,matrix:r,concat:n});return t(v1,zm,a({elop:zm,Ds:!0}))}),oc="equal",QR=["typed","matrix","equalScalar","DenseMatrix","SparseMatrix"],XR=I(oc,QR,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i,SparseMatrix:o}=e,s=jr({typed:t}),u=ma({typed:t,SparseMatrix:o}),l=lr({typed:t,DenseMatrix:a}),c=$t({typed:t,matrix:r});return t(oc,eL({typed:t,equalScalar:n}),c({elop:n,SS:u,DS:s,Ss:l}))}),eL=I(oc,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(oc,{"any, any":function(a,i){return a===null?i===null:i===null?a===null:a===void 0?i===void 0:i===void 0?a===void 0:r(a,i)}})}),y1="equalText",tL=["typed","compareText","isZero"],rL=I(y1,tL,e=>{var{typed:t,compareText:r,isZero:n}=e;return t(y1,{"any, any":function(i,o){return n(r(i,o))}})}),sc="smaller",nL=["typed","config","bignumber","matrix","DenseMatrix","concat","SparseMatrix"],aL=I(sc,nL,e=>{var{typed:t,config:r,bignumber:n,matrix:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=jr({typed:t}),l=ma({typed:t,SparseMatrix:s}),c=lr({typed:t,DenseMatrix:i}),f=$t({typed:t,matrix:a,concat:o}),m=is({typed:t});function d(h,p){return h.lt(p)&&!Bn(h,p,r.relTol,r.absTol)}return t(sc,iL({typed:t,config:r}),{"boolean, boolean":(h,p)=>h<p,"BigNumber, BigNumber":d,"bigint, bigint":(h,p)=>h<p,"Fraction, Fraction":(h,p)=>h.compare(p)===-1,"Fraction, BigNumber":function(p,y){return d(n(p),y)},"BigNumber, Fraction":function(p,y){return d(p,n(y))},"Complex, Complex":function(p,y){throw new TypeError("No ordering relation is defined for complex numbers")}},m,f({SS:l,DS:u,Ss:c}))}),iL=I(sc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(sc,{"number, number":function(a,i){return a<i&&!Ar(a,i,r.relTol,r.absTol)}})}),uc="smallerEq",oL=["typed","config","matrix","DenseMatrix","concat","SparseMatrix"],sL=I(uc,oL,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:a,concat:i,SparseMatrix:o}=e,s=jr({typed:t}),u=ma({typed:t,SparseMatrix:o}),l=lr({typed:t,DenseMatrix:a}),c=$t({typed:t,matrix:n,concat:i}),f=is({typed:t});return t(uc,uL({typed:t,config:r}),{"boolean, boolean":(m,d)=>m<=d,"BigNumber, BigNumber":function(d,h){return d.lte(h)||Bn(d,h,r.relTol,r.absTol)},"bigint, bigint":(m,d)=>m<=d,"Fraction, Fraction":(m,d)=>m.compare(d)!==1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},f,c({SS:u,DS:s,Ss:l}))}),uL=I(uc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(uc,{"number, number":function(a,i){return a<=i||Ar(a,i,r.relTol,r.absTol)}})}),lc="larger",lL=["typed","config","bignumber","matrix","DenseMatrix","concat","SparseMatrix"],cL=I(lc,lL,e=>{var{typed:t,config:r,bignumber:n,matrix:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=jr({typed:t}),l=ma({typed:t,SparseMatrix:s}),c=lr({typed:t,DenseMatrix:i}),f=$t({typed:t,matrix:a,concat:o}),m=is({typed:t});function d(h,p){return h.gt(p)&&!Bn(h,p,r.relTol,r.absTol)}return t(lc,fL({typed:t,config:r}),{"boolean, boolean":(h,p)=>h>p,"BigNumber, BigNumber":d,"bigint, bigint":(h,p)=>h>p,"Fraction, Fraction":(h,p)=>h.compare(p)===1,"Fraction, BigNumber":function(p,y){return d(n(p),y)},"BigNumber, Fraction":function(p,y){return d(p,n(y))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},m,f({SS:l,DS:u,Ss:c}))}),fL=I(lc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(lc,{"number, number":function(a,i){return a>i&&!Ar(a,i,r.relTol,r.absTol)}})}),cc="largerEq",mL=["typed","config","matrix","DenseMatrix","concat","SparseMatrix"],dL=I(cc,mL,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:a,concat:i,SparseMatrix:o}=e,s=jr({typed:t}),u=ma({typed:t,SparseMatrix:o}),l=lr({typed:t,DenseMatrix:a}),c=$t({typed:t,matrix:n,concat:i}),f=is({typed:t});return t(cc,hL({typed:t,config:r}),{"boolean, boolean":(m,d)=>m>=d,"BigNumber, BigNumber":function(d,h){return d.gte(h)||Bn(d,h,r.relTol,r.absTol)},"bigint, bigint":function(d,h){return d>=h},"Fraction, Fraction":(m,d)=>m.compare(d)!==-1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},f,c({SS:u,DS:s,Ss:l}))}),hL=I(cc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(cc,{"number, number":function(a,i){return a>=i||Ar(a,i,r.relTol,r.absTol)}})}),b1="deepEqual",pL=["typed","equal"],gL=I(b1,pL,e=>{var{typed:t,equal:r}=e;return t(b1,{"any, any":function(i,o){return n(i.valueOf(),o.valueOf())}});function n(a,i){if(Array.isArray(a))if(Array.isArray(i)){var o=a.length;if(o!==i.length)return!1;for(var s=0;s<o;s++)if(!n(a[s],i[s]))return!1;return!0}else return!1;else return Array.isArray(i)?!1:r(a,i)}}),fc="unequal",vL=["typed","config","equalScalar","matrix","DenseMatrix","concat","SparseMatrix"],yL=I(fc,vL,e=>{var{typed:t,config:r,equalScalar:n,matrix:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=jr({typed:t}),l=ma({typed:t,SparseMatrix:s}),c=lr({typed:t,DenseMatrix:i}),f=$t({typed:t,matrix:a,concat:o});return t(fc,bL({typed:t,equalScalar:n}),f({elop:m,SS:l,DS:u,Ss:c}));function m(d,h){return!n(d,h)}}),bL=I(fc,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(fc,{"any, any":function(a,i){return a===null?i!==null:i===null?a!==null:a===void 0?i!==void 0:i===void 0?a!==void 0:!r(a,i)}})}),w1="partitionSelect",wL=["typed","isNumeric","isNaN","compare"],xL=I(w1,wL,e=>{var{typed:t,isNumeric:r,isNaN:n,compare:a}=e,i=a,o=(l,c)=>-a(l,c);return t(w1,{"Array | Matrix, number":function(c,f){return s(c,f,i)},"Array | Matrix, number, string":function(c,f,m){if(m==="asc")return s(c,f,i);if(m==="desc")return s(c,f,o);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":s});function s(l,c,f){if(!ke(c)||c<0)throw new Error("k must be a non-negative integer");if(Re(l)){var m=l.size();if(m.length>1)throw new Error("Only one dimensional matrices supported");return u(l.valueOf(),c,f)}if(Array.isArray(l))return u(l,c,f)}function u(l,c,f){if(c>=l.length)throw new Error("k out of bounds");for(var m=0;m<l.length;m++)if(r(l[m])&&n(l[m]))return l[m];for(var d=0,h=l.length-1;d<h;){for(var p=d,y=h,w=l[Math.floor(Math.random()*(h-d+1))+d];p<y;)if(f(l[p],w)>=0){var D=l[y];l[y]=l[p],l[p]=D,--y}else++p;f(l[p],w)>0&&--p,c<=p?h=p:d=p+1}return l[c]}}),x1="sort",DL=["typed","matrix","compare","compareNatural"],NL=I(x1,DL,e=>{var{typed:t,matrix:r,compare:n,compareNatural:a}=e,i=n,o=(c,f)=>-n(c,f);return t(x1,{Array:function(f){return u(f),f.sort(i)},Matrix:function(f){return l(f),r(f.toArray().sort(i),f.storage())},"Array, function":function(f,m){return u(f),f.sort(m)},"Matrix, function":function(f,m){return l(f),r(f.toArray().sort(m),f.storage())},"Array, string":function(f,m){return u(f),f.sort(s(m))},"Matrix, string":function(f,m){return l(f),r(f.toArray().sort(s(m)),f.storage())}});function s(c){if(c==="asc")return i;if(c==="desc")return o;if(c==="natural")return a;throw new Error('String "asc", "desc", or "natural" expected')}function u(c){if(Ue(c).length!==1)throw new Error("One dimensional array expected")}function l(c){if(c.size().length!==1)throw new Error("One dimensional matrix expected")}}),D1="max",AL=["typed","config","numeric","larger","isNaN"],H2=I(D1,AL,e=>{var{typed:t,config:r,numeric:n,larger:a,isNaN:i}=e;return t(D1,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(l,c){return Mc(l,c.valueOf(),o)},"...":function(l){if(rs(l))throw new TypeError("Scalar values expected in function max");return s(l)}});function o(u,l){try{return a(u,l)?u:l}catch(c){throw Yr(c,"max",l)}}function s(u){var l;if(pi(u,function(c){try{(i(c)||l===void 0||a(c,l))&&(l=c)}catch(f){throw Yr(f,"max",c)}}),l===void 0)throw new Error("Cannot calculate max of an empty array");return typeof l=="string"&&(l=n(l,vi(l,r))),l}}),N1="min",CL=["typed","config","numeric","smaller","isNaN"],G2=I(N1,CL,e=>{var{typed:t,config:r,numeric:n,smaller:a,isNaN:i}=e;return t(N1,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(l,c){return Mc(l,c.valueOf(),o)},"...":function(l){if(rs(l))throw new TypeError("Scalar values expected in function min");return s(l)}});function o(u,l){try{return a(u,l)?u:l}catch(c){throw Yr(c,"min",l)}}function s(u){var l;if(pi(u,function(c){try{(i(c)||l===void 0||a(c,l))&&(l=c)}catch(f){throw Yr(f,"min",c)}}),l===void 0)throw new Error("Cannot calculate min of an empty array");return typeof l=="string"&&(l=n(l,vi(l,r))),l}}),EL="ImmutableDenseMatrix",SL=["smaller","DenseMatrix"],ML=I(EL,SL,e=>{var{smaller:t,DenseMatrix:r}=e;function n(a,i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(i&&!Yt(i))throw new Error("Invalid datatype: "+i);if(Re(a)||Mt(a)){var o=new r(a,i);this._data=o._data,this._size=o._size,this._datatype=o._datatype,this._min=null,this._max=null}else if(a&&Mt(a.data)&&Mt(a.size))this._data=a.data,this._size=a.size,this._datatype=a.datatype,this._min=typeof a.min<"u"?a.min:null,this._max=typeof a.max<"u"?a.max:null;else{if(a)throw new TypeError("Unsupported type of data ("+Ft(a)+")");this._data=[],this._size=[0],this._datatype=i,this._min=null,this._max=null}}return n.prototype=new r,n.prototype.type="ImmutableDenseMatrix",n.prototype.isImmutableDenseMatrix=!0,n.prototype.subset=function(a){switch(arguments.length){case 1:{var i=r.prototype.subset.call(this,a);return Re(i)?new n({data:i._data,size:i._size,datatype:i._datatype}):i}case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},n.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},n.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},n.prototype.clone=function(){return new n({data:Ve(this._data),size:Ve(this._size),datatype:this._datatype})},n.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.fromJSON=function(a){return new n(a)},n.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},n.prototype.min=function(){if(this._min===null){var a=null;this.forEach(function(i){(a===null||t(i,a))&&(a=i)}),this._min=a!==null?a:void 0}return this._min},n.prototype.max=function(){if(this._max===null){var a=null;this.forEach(function(i){(a===null||t(a,i))&&(a=i)}),this._max=a!==null?a:void 0}return this._max},n},{isClass:!0}),TL="Index",FL=["ImmutableDenseMatrix","getMatrixDataType"],PL=I(TL,FL,e=>{var{ImmutableDenseMatrix:t,getMatrixDataType:r}=e;function n(){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._sourceSize=[],this._isScalar=!0;for(var i=0,o=arguments.length;i<o;i++){var s=i<0||arguments.length<=i?void 0:arguments[i],u=Mt(s),l=Re(s),c=typeof s,f=null;if(xd(s))this._dimensions.push(s),this._isScalar=!1;else if(u||l){var m=void 0;this._isScalar=!1,r(s)==="boolean"?(u&&(m=a(A1(s).valueOf())),l&&(m=a(A1(s._data).valueOf())),f=s.valueOf().length):m=a(s.valueOf()),this._dimensions.push(m)}else if(c==="number")this._dimensions.push(s);else if(c==="bigint")this._dimensions.push(Number(s));else if(c==="string")this._dimensions.push(s);else throw new TypeError("Dimension must be an Array, Matrix, number, bigint, string, or Range");this._sourceSize.push(f)}}n.prototype.type="Index",n.prototype.isIndex=!0;function a(i){for(var o=0,s=i.length;o<s;o++)if(!ze(i[o])||!ke(i[o]))throw new TypeError("Index parameters must be positive integer numbers");var u=new t;return u._data=i,u._size=[i.length],u}return n.prototype.clone=function(){var i=new n;return i._dimensions=Ve(this._dimensions),i._isScalar=this._isScalar,i._sourceSize=this._sourceSize,i},n.create=function(i){var o=new n;return n.apply(o,i),o},n.prototype.size=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];i[o]=Yt(u)||ze(u)?1:u.size()[0]}return i},n.prototype.max=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];i[o]=Yt(u)||ze(u)?u:u.max()}return i},n.prototype.min=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];i[o]=Yt(u)||ze(u)?u:u.min()}return i},n.prototype.forEach=function(i){for(var o=0,s=this._dimensions.length;o<s;o++)i(this._dimensions[o],o,this)},n.prototype.dimension=function(i){var o;return ze(i)&&(o=this._dimensions[i])!==null&&o!==void 0?o:null},n.prototype.isObjectProperty=function(){return this._dimensions.length===1&&Yt(this._dimensions[0])},n.prototype.getObjectProperty=function(){return this.isObjectProperty()?this._dimensions[0]:null},n.prototype.isScalar=function(){return this._isScalar},n.prototype.toArray=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];i.push(Yt(u)||ze(u)?u:u.toArray())}return i},n.prototype.valueOf=n.prototype.toArray,n.prototype.toString=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];Yt(u)?i.push(JSON.stringify(u)):i.push(u.toString())}return"["+i.join(", ")+"]"},n.prototype.toJSON=function(){return{mathjs:"Index",dimensions:this._dimensions}},n.fromJSON=function(i){return n.create(i.dimensions)},n},{isClass:!0});function A1(e){var t=[];return e.forEach((r,n)=>{r&&t.push(n)}),t}var kL="FibonacciHeap",OL=["smaller","larger"],BL=I(kL,OL,e=>{var{smaller:t,larger:r}=e,n=1/Math.log((1+Math.sqrt(5))/2);function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}a.prototype.type="FibonacciHeap",a.prototype.isFibonacciHeap=!0,a.prototype.insert=function(c,f){var m={key:c,value:f,degree:0};if(this._minimum){var d=this._minimum;m.left=d,m.right=d.right,d.right=m,m.right.left=m,t(c,d.key)&&(this._minimum=m)}else m.left=m,m.right=m,this._minimum=m;return this._size++,m},a.prototype.size=function(){return this._size},a.prototype.clear=function(){this._minimum=null,this._size=0},a.prototype.isEmpty=function(){return this._size===0},a.prototype.extractMinimum=function(){var c=this._minimum;if(c===null)return c;for(var f=this._minimum,m=c.degree,d=c.child;m>0;){var h=d.right;d.left.right=d.right,d.right.left=d.left,d.left=f,d.right=f.right,f.right=d,d.right.left=d,d.parent=null,d=h,m--}return c.left.right=c.right,c.right.left=c.left,c===c.right?f=null:(f=c.right,f=l(f,this._size)),this._size--,this._minimum=f,c},a.prototype.remove=function(c){this._minimum=i(this._minimum,c,-1),this.extractMinimum()};function i(c,f,m){f.key=m;var d=f.parent;return d&&t(f.key,d.key)&&(o(c,f,d),s(c,d)),t(f.key,c.key)&&(c=f),c}function o(c,f,m){f.left.right=f.right,f.right.left=f.left,m.degree--,m.child===f&&(m.child=f.right),m.degree===0&&(m.child=null),f.left=c,f.right=c.right,c.right=f,f.right.left=f,f.parent=null,f.mark=!1}function s(c,f){var m=f.parent;m&&(f.mark?(o(c,f,m),s(m)):f.mark=!0)}var u=function(f,m){f.left.right=f.right,f.right.left=f.left,f.parent=m,m.child?(f.left=m.child,f.right=m.child.right,m.child.right=f,f.right.left=f):(m.child=f,f.right=f,f.left=f),m.degree++,f.mark=!1};function l(c,f){var m=Math.floor(Math.log(f)*n)+1,d=new Array(m),h=0,p=c;if(p)for(h++,p=p.right;p!==c;)h++,p=p.right;for(var y;h>0;){for(var w=p.degree,D=p.right;y=d[w],!!y;){if(r(p.key,y.key)){var v=y;y=p,p=v}u(y,p),d[w]=null,w++}d[w]=p,p=D,h--}c=null;for(var x=0;x<m;x++)y=d[x],y&&(c?(y.left.right=y.right,y.right.left=y.left,y.left=c,y.right=c.right,c.right=y,y.right.left=y,t(y.key,c.key)&&(c=y)):c=y);return c}return a},{isClass:!0}),$L="Spa",_L=["addScalar","equalScalar","FibonacciHeap"],IL=I($L,_L,e=>{var{addScalar:t,equalScalar:r,FibonacciHeap:n}=e;function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new n}return a.prototype.type="Spa",a.prototype.isSpa=!0,a.prototype.set=function(i,o){if(this._values[i])this._values[i].value=o;else{var s=this._heap.insert(i,o);this._values[i]=s}},a.prototype.get=function(i){var o=this._values[i];return o?o.value:0},a.prototype.accumulate=function(i,o){var s=this._values[i];s?s.value=t(s.value,o):(s=this._heap.insert(i,o),this._values[i]=s)},a.prototype.forEach=function(i,o,s){var u=this._heap,l=this._values,c=[],f=u.extractMinimum();for(f&&c.push(f);f&&f.key<=o;)f.key>=i&&(r(f.value,0)||s(f.key,f.value,this)),f=u.extractMinimum(),f&&c.push(f);for(var m=0;m<c.length;m++){var d=c[m];f=u.insert(d.key,d.value),l[f.key]=f}},a.prototype.swap=function(i,o){var s=this._values[i],u=this._values[o];if(!s&&u)s=this._heap.insert(i,u.value),this._heap.remove(u),this._values[i]=s,this._values[o]=void 0;else if(s&&!u)u=this._heap.insert(o,s.value),this._heap.remove(s),this._values[o]=u,this._values[i]=void 0;else if(s&&u){var l=s.value;s.value=u.value,u.value=l}},a},{isClass:!0});function zL(e){var t=0,r=1,n=Object.create(null),a=Object.create(null),i=0,o=function(u){var l=a[u];if(l&&(delete n[l],delete a[u],--t,r===l)){if(!t){i=0,r=1;return}for(;!Object.prototype.hasOwnProperty.call(n,++r););}};return e=Math.abs(e),{hit:function(u){var l=a[u],c=++i;if(n[c]=u,a[u]=c,!l)return++t,t<=e?void 0:(u=n[r],o(u),u);if(delete n[l],r===l)for(;!Object.prototype.hasOwnProperty.call(n,++r););},delete:o,clear:function(){t=i=0,r=1,n=Object.create(null),a=Object.create(null)}}}function ou(e){var{hasher:t,limit:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return r=r??Number.POSITIVE_INFINITY,t=t??JSON.stringify,function n(){typeof n.cache!="object"&&(n.cache={values:new Map,lru:zL(r||Number.POSITIVE_INFINITY)});for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];var o=t(a);if(n.cache.values.has(o))return n.cache.lru.hit(o),n.cache.values.get(o);var s=e.apply(e,a);return n.cache.values.set(o,s),n.cache.values.delete(n.cache.lru.hit(o)),s}}var jL=ou(function(e){return new e(1).exp()},{hasher:Pc}),qL=ou(function(e){return new e(1).plus(new e(5).sqrt()).div(2)},{hasher:Pc}),Bd=ou(function(e){return e.acos(-1)},{hasher:Pc}),RL=ou(function(e){return Bd(e).times(2)},{hasher:Pc});function Pc(e){return e[0].precision}function C1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function jf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C1(Object(r),!0).forEach(function(n){sr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var LL="Unit",HL=["?on","config","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","abs","fix","round","equal","isNumeric","format","number","Complex","BigNumber","Fraction"],GL=I(LL,HL,e=>{var{on:t,config:r,addScalar:n,subtractScalar:a,multiplyScalar:i,divideScalar:o,pow:s,abs:u,fix:l,round:c,equal:f,isNumeric:m,format:d,number:h,Complex:p,BigNumber:y,Fraction:w}=e,D=h,v=!1,x=!0;function g(R,Z){if(!(this instanceof g))throw new Error("Constructor must be called with the new operator");if(!(R==null||m(R)||$a(R)))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(this.fixPrefix=v,this.skipAutomaticSimplification=x,Z===void 0)this.units=[],this.dimensions=X.map(q=>0);else if(typeof Z=="string"){var O=g.parse(Z);this.units=O.units,this.dimensions=O.dimensions}else if(dn(Z)&&Z.value===null)this.fixPrefix=Z.fixPrefix,this.skipAutomaticSimplification=Z.skipAutomaticSimplification,this.dimensions=Z.dimensions.slice(0),this.units=Z.units.map(q=>er({},q));else throw new TypeError("Second parameter in Unit constructor must be a string or valueless Unit");this.value=this._normalize(R)}Object.defineProperty(g,"name",{value:"Unit"}),g.prototype.constructor=g,g.prototype.type="Unit",g.prototype.isUnit=!0;var b,C,N;function A(){for(;N===" "||N===" ";)F()}function E(R){return R>="0"&&R<="9"||R==="."}function S(R){return R>="0"&&R<="9"}function F(){C++,N=b.charAt(C)}function k(R){C=R,N=b.charAt(C)}function B(){var R="",Z=C;if(N==="+"?F():N==="-"&&(R+=N,F()),!E(N))return k(Z),null;if(N==="."){if(R+=N,F(),!S(N))return k(Z),null}else{for(;S(N);)R+=N,F();N==="."&&(R+=N,F())}for(;S(N);)R+=N,F();if(N==="E"||N==="e"){var O="",q=C;if(O+=N,F(),(N==="+"||N==="-")&&(O+=N,F()),!S(N))return k(q),R;for(R=R+O;S(N);)R+=N,F()}return R}function L(){for(var R="";S(N)||g.isValidAlpha(N);)R+=N,F();var Z=R.charAt(0);return g.isValidAlpha(Z)?R:null}function M(R){return N===R?(F(),R):null}g.parse=function(R,Z){if(Z=Z||{},b=R,C=-1,N="",typeof b!="string")throw new TypeError("Invalid argument in Unit.parse, string expected");var O=new g;O.units=[];var q=1,U=!1;F(),A();var ee=B(),re=null;if(ee){if(r.number==="BigNumber")re=new y(ee);else if(r.number==="Fraction")try{re=new w(ee)}catch{re=parseFloat(ee)}else re=parseFloat(ee);A(),M("*")?(q=1,U=!0):M("/")&&(q=-1,U=!0)}for(var ae=[],ye=1;;){for(A();N==="(";)ae.push(q),ye*=q,q=1,F(),A();var me=void 0;if(N){var Ne=N;if(me=L(),me===null)throw new SyntaxError('Unexpected "'+Ne+'" in "'+b+'" at index '+C.toString())}else break;var he=$(me);if(he===null)throw new SyntaxError('Unit "'+me+'" not found.');var ut=q*ye;if(A(),M("^")){A();var ht=B();if(ht===null)throw new SyntaxError('In "'+R+'", "^" must be followed by a floating-point number');ut*=ht}O.units.push({unit:he.unit,prefix:he.prefix,power:ut});for(var yt=0;yt<X.length;yt++)O.dimensions[yt]+=(he.unit.dimensions[yt]||0)*ut;for(A();N===")";){if(ae.length===0)throw new SyntaxError('Unmatched ")" in "'+b+'" at index '+C.toString());ye/=ae.pop(),F(),A()}if(U=!1,M("*")?(q=1,U=!0):M("/")?(q=-1,U=!0):q=1,he.unit.base){var rt=he.unit.base.key;Q.auto[rt]={unit:he.unit,prefix:he.prefix}}}if(A(),N)throw new SyntaxError('Could not parse: "'+R+'"');if(U)throw new SyntaxError('Trailing characters: "'+R+'"');if(ae.length!==0)throw new SyntaxError('Unmatched "(" in "'+b+'"');if(O.units.length===0&&!Z.allowNoUnits)throw new SyntaxError('"'+R+'" contains no units');return O.value=re!==void 0?O._normalize(re):null,O},g.prototype.clone=function(){var R=new g;R.fixPrefix=this.fixPrefix,R.skipAutomaticSimplification=this.skipAutomaticSimplification,R.value=Ve(this.value),R.dimensions=this.dimensions.slice(0),R.units=[];for(var Z=0;Z<this.units.length;Z++){R.units[Z]={};for(var O in this.units[Z])Fe(this.units[Z],O)&&(R.units[Z][O]=this.units[Z][O])}return R},g.prototype.valueType=function(){return Ft(this.value)},g.prototype._isDerived=function(){return this.units.length===0?!1:this.units.length>1||Math.abs(this.units[0].power-1)>1e-15},g.prototype._normalize=function(R){if(R==null||this.units.length===0)return R;for(var Z=R,O=g._getNumberConverter(Ft(R)),q=0;q<this.units.length;q++){var U=O(this.units[q].unit.value),ee=O(this.units[q].prefix.value),re=O(this.units[q].power);Z=i(Z,s(i(U,ee),re))}return Z},g.prototype._denormalize=function(R,Z){if(R==null||this.units.length===0)return R;for(var O=R,q=g._getNumberConverter(Ft(R)),U=0;U<this.units.length;U++){var ee=q(this.units[U].unit.value),re=q(this.units[U].prefix.value),ae=q(this.units[U].power);O=o(O,s(i(ee,re),ae))}return O};var $=ou(R=>{if(Fe(_,R)){var Z=_[R],O=Z.prefixes[""];return{unit:Z,prefix:O}}for(var q in _)if(Fe(_,q)&&G8(R,q)){var U=_[q],ee=R.length-q.length,re=R.substring(0,ee),ae=Fe(U.prefixes,re)?U.prefixes[re]:void 0;if(ae!==void 0)return{unit:U,prefix:ae}}return null},{hasher:R=>R[0],limit:100});g.isValuelessUnit=function(R){return $(R)!==null},g.prototype.hasBase=function(R){if(typeof R=="string"&&(R=z[R]),!R)return!1;for(var Z=0;Z<X.length;Z++)if(Math.abs((this.dimensions[Z]||0)-(R.dimensions[Z]||0))>1e-12)return!1;return!0},g.prototype.equalBase=function(R){for(var Z=0;Z<X.length;Z++)if(Math.abs((this.dimensions[Z]||0)-(R.dimensions[Z]||0))>1e-12)return!1;return!0},g.prototype.equals=function(R){return this.equalBase(R)&&f(this.value,R.value)},g.prototype.multiply=function(R){for(var Z=this.clone(),O=dn(R)?R:new g(R),q=0;q<X.length;q++)Z.dimensions[q]=(this.dimensions[q]||0)+(O.dimensions[q]||0);for(var U=0;U<O.units.length;U++){var ee=jf({},O.units[U]);Z.units.push(ee)}if(this.value!==null||O.value!==null){var re=this.value===null?this._normalize(j(O.value)):this.value,ae=O.value===null?O._normalize(j(this.value)):O.value;Z.value=i(re,ae)}else Z.value=null;return dn(R)&&(Z.skipAutomaticSimplification=!1),H(Z)},g.prototype.divideInto=function(R){return new g(R).divide(this)},g.prototype.divide=function(R){for(var Z=this.clone(),O=dn(R)?R:new g(R),q=0;q<X.length;q++)Z.dimensions[q]=(this.dimensions[q]||0)-(O.dimensions[q]||0);for(var U=0;U<O.units.length;U++){var ee=jf(jf({},O.units[U]),{},{power:-O.units[U].power});Z.units.push(ee)}if(this.value!==null||O.value!==null){var re=this.value===null?this._normalize(j(O.value)):this.value,ae=O.value===null?O._normalize(j(this.value)):O.value;Z.value=o(re,ae)}else Z.value=null;return dn(R)&&(Z.skipAutomaticSimplification=!1),H(Z)},g.prototype.pow=function(R){for(var Z=this.clone(),O=0;O<X.length;O++)Z.dimensions[O]=(this.dimensions[O]||0)*R;for(var q=0;q<Z.units.length;q++)Z.units[q].power*=R;return Z.value!==null?Z.value=s(Z.value,R):Z.value=null,Z.skipAutomaticSimplification=!1,H(Z)};function H(R){return R.equalBase(z.NONE)&&R.value!==null&&!r.predictable?R.value:R}function j(R){var Z=g._getNumberConverter(Ft(R));return Z(1)}g.prototype.abs=function(){var R=this.clone();if(R.value!==null)if(R._isDerived()||R.units.length===0||R.units[0].unit.offset===0)R.value=u(R.value);else{var Z=R._numberConverter(),O=Z(R.units[0].unit.value),q=Z(R.units[0].unit.offset),U=i(O,q);R.value=a(u(n(R.value,U)),U)}for(var ee in R.units)(R.units[ee].unit.name==="VA"||R.units[ee].unit.name==="VAR")&&(R.units[ee].unit=_.W);return R},g.prototype.to=function(R){var Z=this.value===null?this._normalize(1):this.value,O;if(typeof R=="string")O=g.parse(R);else if(dn(R))O=R.clone();else throw new Error("String or Unit expected as parameter");if(!this.equalBase(O))throw new Error("Units do not match ('".concat(O.toString(),"' != '").concat(this.toString(),"')"));if(O.value!==null)throw new Error("Cannot convert to a unit with a value");if(this.value===null||this._isDerived()||this.units.length===0||O.units.length===0||this.units[0].unit.offset===O.units[0].unit.offset)O.value=Ve(Z);else{var q=g._getNumberConverter(Ft(Z)),U=this.units[0].unit.value,ee=this.units[0].unit.offset,re=i(U,ee),ae=O.units[0].unit.value,ye=O.units[0].unit.offset,me=i(ae,ye);O.value=n(Z,q(a(re,me)))}return O.fixPrefix=!0,O.skipAutomaticSimplification=!0,O},g.prototype.toNumber=function(R){return D(this.toNumeric(R))},g.prototype.toNumeric=function(R){var Z;return R?Z=this.to(R):Z=this.clone(),Z._isDerived()||Z.units.length===0?Z._denormalize(Z.value):Z._denormalize(Z.value,Z.units[0].prefix.value)},g.prototype.toString=function(){return this.format()},g.prototype.toJSON=function(){return{mathjs:"Unit",value:this._denormalize(this.value),unit:this.units.length>0?this.formatUnits():null,fixPrefix:this.fixPrefix,skipSimp:this.skipAutomaticSimplification}},g.fromJSON=function(R){var Z,O,q,U=new g(R.value,(Z=R.unit)!==null&&Z!==void 0?Z:void 0);return U.fixPrefix=(O=R.fixPrefix)!==null&&O!==void 0?O:v,U.skipAutomaticSimplification=(q=R.skipSimp)!==null&&q!==void 0?q:x,U},g.prototype.valueOf=g.prototype.toString,g.prototype.simplify=function(){var R=this.clone(),Z=[],O;for(var q in ue)if(Fe(ue,q)&&R.hasBase(z[q])){O=q;break}if(O==="NONE")R.units=[];else{var U;if(O&&Fe(ue,O)&&(U=ue[O]),U)R.units=[{unit:U.unit,prefix:U.prefix,power:1}];else{for(var ee=!1,re=0;re<X.length;re++){var ae=X[re];Math.abs(R.dimensions[re]||0)>1e-12&&(Fe(ue,ae)?Z.push({unit:ue[ae].unit,prefix:ue[ae].prefix,power:R.dimensions[re]||0}):ee=!0)}Z.length<R.units.length&&!ee&&(R.units=Z)}}return R},g.prototype.toSI=function(){for(var R=this.clone(),Z=[],O=0;O<X.length;O++){var q=X[O];if(Math.abs(R.dimensions[O]||0)>1e-12)if(Fe(Q.si,q))Z.push({unit:Q.si[q].unit,prefix:Q.si[q].prefix,power:R.dimensions[O]||0});else throw new Error("Cannot express custom unit "+q+" in SI units")}return R.units=Z,R.fixPrefix=!0,R.skipAutomaticSimplification=!0,this.value!==null?(R.value=null,this.to(R)):R},g.prototype.formatUnits=function(){for(var R="",Z="",O=0,q=0,U=0;U<this.units.length;U++)this.units[U].power>0?(O++,R+=" "+this.units[U].prefix.name+this.units[U].unit.name,Math.abs(this.units[U].power-1)>1e-15&&(R+="^"+this.units[U].power)):this.units[U].power<0&&q++;if(q>0)for(var ee=0;ee<this.units.length;ee++)this.units[ee].power<0&&(O>0?(Z+=" "+this.units[ee].prefix.name+this.units[ee].unit.name,Math.abs(this.units[ee].power+1)>1e-15&&(Z+="^"+-this.units[ee].power)):(Z+=" "+this.units[ee].prefix.name+this.units[ee].unit.name,Z+="^"+this.units[ee].power));R=R.substr(1),Z=Z.substr(1),O>1&&q>0&&(R="("+R+")"),q>1&&O>0&&(Z="("+Z+")");var re=R;return O>0&&q>0&&(re+=" / "),re+=Z,re},g.prototype.toBest=function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(R&&!Array.isArray(R))throw new Error("Invalid unit type. Expected string or Unit.");var O=this.units[0].unit.prefixes;if(R&&R.length>0){var q=R.map(re=>{var ae=null;if(typeof re=="string"){if(ae=g.parse(re),!ae)throw new Error("Invalid unit type. Expected compatible string or Unit.")}else if(!dn(re))throw new Error("Invalid unit type. Expected compatible string or Unit.");ae===null&&(ae=re.clone());try{return this.to(ae.formatUnits()),ae}catch{throw new Error("Invalid unit type. Expected compatible string or Unit.")}}),U=q.map(re=>re.units[0].prefix);this.units[0].unit.prefixes=U.reduce((re,ae)=>(re[ae.name]=ae,re),{}),this.units[0].prefix=U[0]}var ee=Y(this,Z).simp;return this.units[0].unit.prefixes=O,ee.fixPrefix=!0,ee},g.prototype.format=function(R){var{simp:Z,valueStr:O,unitStr:q}=Y(this,R),U=O;return Z.value&&$a(Z.value)&&(U="("+U+")"),q.length>0&&U.length>0&&(U+=" "),U+=q,U};function Y(R){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=R.skipAutomaticSimplification||R.value===null?R.clone():R.simplify();te(O),K(O,Z.offset);var q=O._denormalize(O.value),U=O.value!==null?d(q,Z||{}):"",ee=O.formatUnits();return{simp:O,valueStr:U,unitStr:ee}}function te(R){var Z=!1;typeof R.value<"u"&&R.value!==null&&$a(R.value)&&(Z=Math.abs(R.value.re)<1e-14);for(var O in R.units)Fe(R.units,O)&&R.units[O].unit&&(R.units[O].unit.name==="VA"&&Z?R.units[O].unit=_.VAR:R.units[O].unit.name==="VAR"&&!Z&&(R.units[O].unit=_.VA))}function K(R,Z){R.units.length===1&&!R.fixPrefix&&Math.abs(R.units[0].power-Math.round(R.units[0].power))<1e-14&&(R.units[0].prefix=R._bestPrefix(Z))}g.prototype._bestPrefix=function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1.2;if(this.units.length!==1)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var Z=this.value!==null?u(this.value):0,O=u(this.units[0].unit.value),q=this.units[0].prefix;if(Z===0)return q;var U=this.units[0].power,ee=Math.log(Z/Math.pow(q.value*O,U))/Math.LN10-R;if(ee>-2.200001&&ee<1.800001)return q;ee=Math.abs(ee);var re=this.units[0].unit.prefixes;for(var ae in re)if(Fe(re,ae)){var ye=re[ae];if(ye.scientific){var me=Math.abs(Math.log(Z/Math.pow(ye.value*O,U))/Math.LN10-R);(me<ee||me===ee&&ye.name.length<q.name.length)&&(q=ye,ee=me)}}return q},g.prototype.splitUnit=function(R){for(var Z=this.clone(),O=[],q=0;q<R.length&&(Z=Z.to(R[q]),q!==R.length-1);q++){var U=Z.toNumeric(),ee=c(U),re=void 0,ae=f(ee,U);ae?re=ee:re=l(Z.toNumeric());var ye=new g(re,R[q].toString());O.push(ye),Z=a(Z,ye)}for(var me=0,Ne=0;Ne<O.length;Ne++)me=n(me,O[Ne].value);return f(me,this.value)&&(Z.value=0),O.push(Z),O};var P={NONE:{"":{name:"",value:1,scientific:!0}},SHORT:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:10,scientific:!1},h:{name:"h",value:100,scientific:!1},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0},R:{name:"R",value:1e27,scientific:!0},Q:{name:"Q",value:1e30,scientific:!0},d:{name:"d",value:.1,scientific:!1},c:{name:"c",value:.01,scientific:!1},m:{name:"m",value:.001,scientific:!0},u:{name:"u",value:1e-6,scientific:!0},n:{name:"n",value:1e-9,scientific:!0},p:{name:"p",value:1e-12,scientific:!0},f:{name:"f",value:1e-15,scientific:!0},a:{name:"a",value:1e-18,scientific:!0},z:{name:"z",value:1e-21,scientific:!0},y:{name:"y",value:1e-24,scientific:!0},r:{name:"r",value:1e-27,scientific:!0},q:{name:"q",value:1e-30,scientific:!0}},LONG:{"":{name:"",value:1,scientific:!0},deca:{name:"deca",value:10,scientific:!1},hecto:{name:"hecto",value:100,scientific:!1},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0},ronna:{name:"ronna",value:1e27,scientific:!0},quetta:{name:"quetta",value:1e30,scientific:!0},deci:{name:"deci",value:.1,scientific:!1},centi:{name:"centi",value:.01,scientific:!1},milli:{name:"milli",value:.001,scientific:!0},micro:{name:"micro",value:1e-6,scientific:!0},nano:{name:"nano",value:1e-9,scientific:!0},pico:{name:"pico",value:1e-12,scientific:!0},femto:{name:"femto",value:1e-15,scientific:!0},atto:{name:"atto",value:1e-18,scientific:!0},zepto:{name:"zepto",value:1e-21,scientific:!0},yocto:{name:"yocto",value:1e-24,scientific:!0},ronto:{name:"ronto",value:1e-27,scientific:!0},quecto:{name:"quecto",value:1e-30,scientific:!0}},SQUARED:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:100,scientific:!1},h:{name:"h",value:1e4,scientific:!1},k:{name:"k",value:1e6,scientific:!0},M:{name:"M",value:1e12,scientific:!0},G:{name:"G",value:1e18,scientific:!0},T:{name:"T",value:1e24,scientific:!0},P:{name:"P",value:1e30,scientific:!0},E:{name:"E",value:1e36,scientific:!0},Z:{name:"Z",value:1e42,scientific:!0},Y:{name:"Y",value:1e48,scientific:!0},R:{name:"R",value:1e54,scientific:!0},Q:{name:"Q",value:1e60,scientific:!0},d:{name:"d",value:.01,scientific:!1},c:{name:"c",value:1e-4,scientific:!1},m:{name:"m",value:1e-6,scientific:!0},u:{name:"u",value:1e-12,scientific:!0},n:{name:"n",value:1e-18,scientific:!0},p:{name:"p",value:1e-24,scientific:!0},f:{name:"f",value:1e-30,scientific:!0},a:{name:"a",value:1e-36,scientific:!0},z:{name:"z",value:1e-42,scientific:!0},y:{name:"y",value:1e-48,scientific:!0},r:{name:"r",value:1e-54,scientific:!0},q:{name:"q",value:1e-60,scientific:!0}},CUBIC:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:1e3,scientific:!1},h:{name:"h",value:1e6,scientific:!1},k:{name:"k",value:1e9,scientific:!0},M:{name:"M",value:1e18,scientific:!0},G:{name:"G",value:1e27,scientific:!0},T:{name:"T",value:1e36,scientific:!0},P:{name:"P",value:1e45,scientific:!0},E:{name:"E",value:1e54,scientific:!0},Z:{name:"Z",value:1e63,scientific:!0},Y:{name:"Y",value:1e72,scientific:!0},R:{name:"R",value:1e81,scientific:!0},Q:{name:"Q",value:1e90,scientific:!0},d:{name:"d",value:.001,scientific:!1},c:{name:"c",value:1e-6,scientific:!1},m:{name:"m",value:1e-9,scientific:!0},u:{name:"u",value:1e-18,scientific:!0},n:{name:"n",value:1e-27,scientific:!0},p:{name:"p",value:1e-36,scientific:!0},f:{name:"f",value:1e-45,scientific:!0},a:{name:"a",value:1e-54,scientific:!0},z:{name:"z",value:1e-63,scientific:!0},y:{name:"y",value:1e-72,scientific:!0},r:{name:"r",value:1e-81,scientific:!0},q:{name:"q",value:1e-90,scientific:!0}},BINARY_SHORT_SI:{"":{name:"",value:1,scientific:!0},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0}},BINARY_SHORT_IEC:{"":{name:"",value:1,scientific:!0},Ki:{name:"Ki",value:1024,scientific:!0},Mi:{name:"Mi",value:Math.pow(1024,2),scientific:!0},Gi:{name:"Gi",value:Math.pow(1024,3),scientific:!0},Ti:{name:"Ti",value:Math.pow(1024,4),scientific:!0},Pi:{name:"Pi",value:Math.pow(1024,5),scientific:!0},Ei:{name:"Ei",value:Math.pow(1024,6),scientific:!0},Zi:{name:"Zi",value:Math.pow(1024,7),scientific:!0},Yi:{name:"Yi",value:Math.pow(1024,8),scientific:!0}},BINARY_LONG_SI:{"":{name:"",value:1,scientific:!0},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0}},BINARY_LONG_IEC:{"":{name:"",value:1,scientific:!0},kibi:{name:"kibi",value:1024,scientific:!0},mebi:{name:"mebi",value:Math.pow(1024,2),scientific:!0},gibi:{name:"gibi",value:Math.pow(1024,3),scientific:!0},tebi:{name:"tebi",value:Math.pow(1024,4),scientific:!0},pebi:{name:"pebi",value:Math.pow(1024,5),scientific:!0},exi:{name:"exi",value:Math.pow(1024,6),scientific:!0},zebi:{name:"zebi",value:Math.pow(1024,7),scientific:!0},yobi:{name:"yobi",value:Math.pow(1024,8),scientific:!0}},BTU:{"":{name:"",value:1,scientific:!0},MM:{name:"MM",value:1e6,scientific:!0}}};P.SHORTLONG=er({},P.SHORT,P.LONG),P.BINARY_SHORT=er({},P.BINARY_SHORT_SI,P.BINARY_SHORT_IEC),P.BINARY_LONG=er({},P.BINARY_LONG_SI,P.BINARY_LONG_IEC);var X=["MASS","LENGTH","TIME","CURRENT","TEMPERATURE","LUMINOUS_INTENSITY","AMOUNT_OF_SUBSTANCE","ANGLE","BIT"],z={NONE:{dimensions:[0,0,0,0,0,0,0,0,0]},MASS:{dimensions:[1,0,0,0,0,0,0,0,0]},LENGTH:{dimensions:[0,1,0,0,0,0,0,0,0]},TIME:{dimensions:[0,0,1,0,0,0,0,0,0]},CURRENT:{dimensions:[0,0,0,1,0,0,0,0,0]},TEMPERATURE:{dimensions:[0,0,0,0,1,0,0,0,0]},LUMINOUS_INTENSITY:{dimensions:[0,0,0,0,0,1,0,0,0]},AMOUNT_OF_SUBSTANCE:{dimensions:[0,0,0,0,0,0,1,0,0]},FORCE:{dimensions:[1,1,-2,0,0,0,0,0,0]},SURFACE:{dimensions:[0,2,0,0,0,0,0,0,0]},VOLUME:{dimensions:[0,3,0,0,0,0,0,0,0]},ENERGY:{dimensions:[1,2,-2,0,0,0,0,0,0]},POWER:{dimensions:[1,2,-3,0,0,0,0,0,0]},PRESSURE:{dimensions:[1,-1,-2,0,0,0,0,0,0]},ELECTRIC_CHARGE:{dimensions:[0,0,1,1,0,0,0,0,0]},ELECTRIC_CAPACITANCE:{dimensions:[-1,-2,4,2,0,0,0,0,0]},ELECTRIC_POTENTIAL:{dimensions:[1,2,-3,-1,0,0,0,0,0]},ELECTRIC_RESISTANCE:{dimensions:[1,2,-3,-2,0,0,0,0,0]},ELECTRIC_INDUCTANCE:{dimensions:[1,2,-2,-2,0,0,0,0,0]},ELECTRIC_CONDUCTANCE:{dimensions:[-1,-2,3,2,0,0,0,0,0]},MAGNETIC_FLUX:{dimensions:[1,2,-2,-1,0,0,0,0,0]},MAGNETIC_FLUX_DENSITY:{dimensions:[1,0,-2,-1,0,0,0,0,0]},FREQUENCY:{dimensions:[0,0,-1,0,0,0,0,0,0]},ANGLE:{dimensions:[0,0,0,0,0,0,0,1,0]},BIT:{dimensions:[0,0,0,0,0,0,0,0,1]}};for(var ie in z)Fe(z,ie)&&(z[ie].key=ie);var se={},V={name:"",base:se,value:1,offset:0,dimensions:X.map(R=>0)},_={meter:{name:"meter",base:z.LENGTH,prefixes:P.LONG,value:1,offset:0},inch:{name:"inch",base:z.LENGTH,prefixes:P.NONE,value:.0254,offset:0},foot:{name:"foot",base:z.LENGTH,prefixes:P.NONE,value:.3048,offset:0},yard:{name:"yard",base:z.LENGTH,prefixes:P.NONE,value:.9144,offset:0},mile:{name:"mile",base:z.LENGTH,prefixes:P.NONE,value:1609.344,offset:0},link:{name:"link",base:z.LENGTH,prefixes:P.NONE,value:.201168,offset:0},rod:{name:"rod",base:z.LENGTH,prefixes:P.NONE,value:5.0292,offset:0},chain:{name:"chain",base:z.LENGTH,prefixes:P.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:z.LENGTH,prefixes:P.NONE,value:1e-10,offset:0},m:{name:"m",base:z.LENGTH,prefixes:P.SHORT,value:1,offset:0},in:{name:"in",base:z.LENGTH,prefixes:P.NONE,value:.0254,offset:0},ft:{name:"ft",base:z.LENGTH,prefixes:P.NONE,value:.3048,offset:0},yd:{name:"yd",base:z.LENGTH,prefixes:P.NONE,value:.9144,offset:0},mi:{name:"mi",base:z.LENGTH,prefixes:P.NONE,value:1609.344,offset:0},li:{name:"li",base:z.LENGTH,prefixes:P.NONE,value:.201168,offset:0},rd:{name:"rd",base:z.LENGTH,prefixes:P.NONE,value:5.02921,offset:0},ch:{name:"ch",base:z.LENGTH,prefixes:P.NONE,value:20.1168,offset:0},mil:{name:"mil",base:z.LENGTH,prefixes:P.NONE,value:254e-7,offset:0},m2:{name:"m2",base:z.SURFACE,prefixes:P.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:z.SURFACE,prefixes:P.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:z.SURFACE,prefixes:P.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:z.SURFACE,prefixes:P.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:z.SURFACE,prefixes:P.NONE,value:2589988110336e-6,offset:0},sqrd:{name:"sqrd",base:z.SURFACE,prefixes:P.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:z.SURFACE,prefixes:P.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:z.SURFACE,prefixes:P.NONE,value:64516e-14,offset:0},acre:{name:"acre",base:z.SURFACE,prefixes:P.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:z.SURFACE,prefixes:P.NONE,value:1e4,offset:0},m3:{name:"m3",base:z.VOLUME,prefixes:P.CUBIC,value:1,offset:0},L:{name:"L",base:z.VOLUME,prefixes:P.SHORT,value:.001,offset:0},l:{name:"l",base:z.VOLUME,prefixes:P.SHORT,value:.001,offset:0},litre:{name:"litre",base:z.VOLUME,prefixes:P.LONG,value:.001,offset:0},cuin:{name:"cuin",base:z.VOLUME,prefixes:P.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:z.VOLUME,prefixes:P.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:z.VOLUME,prefixes:P.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:z.VOLUME,prefixes:P.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:z.VOLUME,prefixes:P.NONE,value:15e-6,offset:0},drop:{name:"drop",base:z.VOLUME,prefixes:P.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:z.VOLUME,prefixes:P.NONE,value:5e-8,offset:0},minim:{name:"minim",base:z.VOLUME,prefixes:P.NONE,value:61611519921875e-21,offset:0},fluiddram:{name:"fluiddram",base:z.VOLUME,prefixes:P.NONE,value:36966911953125e-19,offset:0},fluidounce:{name:"fluidounce",base:z.VOLUME,prefixes:P.NONE,value:295735295625e-16,offset:0},gill:{name:"gill",base:z.VOLUME,prefixes:P.NONE,value:.00011829411825,offset:0},cc:{name:"cc",base:z.VOLUME,prefixes:P.NONE,value:1e-6,offset:0},cup:{name:"cup",base:z.VOLUME,prefixes:P.NONE,value:.0002365882365,offset:0},pint:{name:"pint",base:z.VOLUME,prefixes:P.NONE,value:.000473176473,offset:0},quart:{name:"quart",base:z.VOLUME,prefixes:P.NONE,value:.000946352946,offset:0},gallon:{name:"gallon",base:z.VOLUME,prefixes:P.NONE,value:.003785411784,offset:0},beerbarrel:{name:"beerbarrel",base:z.VOLUME,prefixes:P.NONE,value:.117347765304,offset:0},oilbarrel:{name:"oilbarrel",base:z.VOLUME,prefixes:P.NONE,value:.158987294928,offset:0},hogshead:{name:"hogshead",base:z.VOLUME,prefixes:P.NONE,value:.238480942392,offset:0},g:{name:"g",base:z.MASS,prefixes:P.SHORT,value:.001,offset:0},gram:{name:"gram",base:z.MASS,prefixes:P.LONG,value:.001,offset:0},ton:{name:"ton",base:z.MASS,prefixes:P.SHORT,value:907.18474,offset:0},t:{name:"t",base:z.MASS,prefixes:P.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:z.MASS,prefixes:P.LONG,value:1e3,offset:0},grain:{name:"grain",base:z.MASS,prefixes:P.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:z.MASS,prefixes:P.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:z.MASS,prefixes:P.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:z.MASS,prefixes:P.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:z.MASS,prefixes:P.NONE,value:45.359237,offset:0},stick:{name:"stick",base:z.MASS,prefixes:P.NONE,value:.115,offset:0},stone:{name:"stone",base:z.MASS,prefixes:P.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:z.MASS,prefixes:P.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:z.MASS,prefixes:P.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:z.MASS,prefixes:P.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:z.MASS,prefixes:P.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:z.MASS,prefixes:P.NONE,value:45.359237,offset:0},s:{name:"s",base:z.TIME,prefixes:P.SHORT,value:1,offset:0},min:{name:"min",base:z.TIME,prefixes:P.NONE,value:60,offset:0},h:{name:"h",base:z.TIME,prefixes:P.NONE,value:3600,offset:0},second:{name:"second",base:z.TIME,prefixes:P.LONG,value:1,offset:0},sec:{name:"sec",base:z.TIME,prefixes:P.LONG,value:1,offset:0},minute:{name:"minute",base:z.TIME,prefixes:P.NONE,value:60,offset:0},hour:{name:"hour",base:z.TIME,prefixes:P.NONE,value:3600,offset:0},day:{name:"day",base:z.TIME,prefixes:P.NONE,value:86400,offset:0},week:{name:"week",base:z.TIME,prefixes:P.NONE,value:7*86400,offset:0},month:{name:"month",base:z.TIME,prefixes:P.NONE,value:2629800,offset:0},year:{name:"year",base:z.TIME,prefixes:P.NONE,value:31557600,offset:0},decade:{name:"decade",base:z.TIME,prefixes:P.NONE,value:315576e3,offset:0},century:{name:"century",base:z.TIME,prefixes:P.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:z.TIME,prefixes:P.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:z.FREQUENCY,prefixes:P.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:z.FREQUENCY,prefixes:P.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:z.ANGLE,prefixes:P.SHORT,value:1,offset:0},radian:{name:"radian",base:z.ANGLE,prefixes:P.LONG,value:1,offset:0},deg:{name:"deg",base:z.ANGLE,prefixes:P.SHORT,value:null,offset:0},degree:{name:"degree",base:z.ANGLE,prefixes:P.LONG,value:null,offset:0},grad:{name:"grad",base:z.ANGLE,prefixes:P.SHORT,value:null,offset:0},gradian:{name:"gradian",base:z.ANGLE,prefixes:P.LONG,value:null,offset:0},cycle:{name:"cycle",base:z.ANGLE,prefixes:P.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:z.ANGLE,prefixes:P.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:z.ANGLE,prefixes:P.NONE,value:null,offset:0},A:{name:"A",base:z.CURRENT,prefixes:P.SHORT,value:1,offset:0},ampere:{name:"ampere",base:z.CURRENT,prefixes:P.LONG,value:1,offset:0},K:{name:"K",base:z.TEMPERATURE,prefixes:P.SHORT,value:1,offset:0},degC:{name:"degC",base:z.TEMPERATURE,prefixes:P.SHORT,value:1,offset:273.15},degF:{name:"degF",base:z.TEMPERATURE,prefixes:P.SHORT,value:new w(5,9),offset:459.67},degR:{name:"degR",base:z.TEMPERATURE,prefixes:P.SHORT,value:new w(5,9),offset:0},kelvin:{name:"kelvin",base:z.TEMPERATURE,prefixes:P.LONG,value:1,offset:0},celsius:{name:"celsius",base:z.TEMPERATURE,prefixes:P.LONG,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:z.TEMPERATURE,prefixes:P.LONG,value:new w(5,9),offset:459.67},rankine:{name:"rankine",base:z.TEMPERATURE,prefixes:P.LONG,value:new w(5,9),offset:0},mol:{name:"mol",base:z.AMOUNT_OF_SUBSTANCE,prefixes:P.SHORT,value:1,offset:0},mole:{name:"mole",base:z.AMOUNT_OF_SUBSTANCE,prefixes:P.LONG,value:1,offset:0},cd:{name:"cd",base:z.LUMINOUS_INTENSITY,prefixes:P.SHORT,value:1,offset:0},candela:{name:"candela",base:z.LUMINOUS_INTENSITY,prefixes:P.LONG,value:1,offset:0},N:{name:"N",base:z.FORCE,prefixes:P.SHORT,value:1,offset:0},newton:{name:"newton",base:z.FORCE,prefixes:P.LONG,value:1,offset:0},dyn:{name:"dyn",base:z.FORCE,prefixes:P.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:z.FORCE,prefixes:P.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:z.FORCE,prefixes:P.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:z.FORCE,prefixes:P.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:z.FORCE,prefixes:P.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:z.FORCE,prefixes:P.NONE,value:9.80665,offset:0},J:{name:"J",base:z.ENERGY,prefixes:P.SHORT,value:1,offset:0},joule:{name:"joule",base:z.ENERGY,prefixes:P.LONG,value:1,offset:0},erg:{name:"erg",base:z.ENERGY,prefixes:P.SHORTLONG,value:1e-7,offset:0},Wh:{name:"Wh",base:z.ENERGY,prefixes:P.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:z.ENERGY,prefixes:P.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:z.ENERGY,prefixes:P.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:z.ENERGY,prefixes:P.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:z.POWER,prefixes:P.SHORT,value:1,offset:0},watt:{name:"watt",base:z.POWER,prefixes:P.LONG,value:1,offset:0},hp:{name:"hp",base:z.POWER,prefixes:P.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:z.POWER,prefixes:P.SHORT,value:p.I,offset:0},VA:{name:"VA",base:z.POWER,prefixes:P.SHORT,value:1,offset:0},Pa:{name:"Pa",base:z.PRESSURE,prefixes:P.SHORT,value:1,offset:0},psi:{name:"psi",base:z.PRESSURE,prefixes:P.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:z.PRESSURE,prefixes:P.NONE,value:101325,offset:0},bar:{name:"bar",base:z.PRESSURE,prefixes:P.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:z.PRESSURE,prefixes:P.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:z.PRESSURE,prefixes:P.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:z.PRESSURE,prefixes:P.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:z.PRESSURE,prefixes:P.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:z.ELECTRIC_CHARGE,prefixes:P.LONG,value:1,offset:0},C:{name:"C",base:z.ELECTRIC_CHARGE,prefixes:P.SHORT,value:1,offset:0},farad:{name:"farad",base:z.ELECTRIC_CAPACITANCE,prefixes:P.LONG,value:1,offset:0},F:{name:"F",base:z.ELECTRIC_CAPACITANCE,prefixes:P.SHORT,value:1,offset:0},volt:{name:"volt",base:z.ELECTRIC_POTENTIAL,prefixes:P.LONG,value:1,offset:0},V:{name:"V",base:z.ELECTRIC_POTENTIAL,prefixes:P.SHORT,value:1,offset:0},ohm:{name:"ohm",base:z.ELECTRIC_RESISTANCE,prefixes:P.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:z.ELECTRIC_INDUCTANCE,prefixes:P.LONG,value:1,offset:0},H:{name:"H",base:z.ELECTRIC_INDUCTANCE,prefixes:P.SHORT,value:1,offset:0},siemens:{name:"siemens",base:z.ELECTRIC_CONDUCTANCE,prefixes:P.LONG,value:1,offset:0},S:{name:"S",base:z.ELECTRIC_CONDUCTANCE,prefixes:P.SHORT,value:1,offset:0},weber:{name:"weber",base:z.MAGNETIC_FLUX,prefixes:P.LONG,value:1,offset:0},Wb:{name:"Wb",base:z.MAGNETIC_FLUX,prefixes:P.SHORT,value:1,offset:0},tesla:{name:"tesla",base:z.MAGNETIC_FLUX_DENSITY,prefixes:P.LONG,value:1,offset:0},T:{name:"T",base:z.MAGNETIC_FLUX_DENSITY,prefixes:P.SHORT,value:1,offset:0},b:{name:"b",base:z.BIT,prefixes:P.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:z.BIT,prefixes:P.BINARY_LONG,value:1,offset:0},B:{name:"B",base:z.BIT,prefixes:P.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:z.BIT,prefixes:P.BINARY_LONG,value:8,offset:0}},W={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fldr:"fluiddram",fluiddrams:"fluiddram",floz:"fluidounce",fluidounces:"fluidounce",gi:"gill",gills:"gill",cp:"cup",cups:"cup",pt:"pint",pints:"pint",qt:"quart",quarts:"quart",gal:"gallon",gallons:"gallon",bbl:"beerbarrel",beerbarrels:"beerbarrel",obl:"oilbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",amps:"ampere",amp:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function ne(R){if(R.number==="BigNumber"){var Z=Bd(y);_.rad.value=new y(1),_.deg.value=Z.div(180),_.grad.value=Z.div(200),_.cycle.value=Z.times(2),_.arcsec.value=Z.div(648e3),_.arcmin.value=Z.div(10800)}else _.rad.value=1,_.deg.value=Math.PI/180,_.grad.value=Math.PI/200,_.cycle.value=Math.PI*2,_.arcsec.value=Math.PI/648e3,_.arcmin.value=Math.PI/10800;_.radian.value=_.rad.value,_.degree.value=_.deg.value,_.gradian.value=_.grad.value}ne(r),t&&t("config",function(R,Z){R.number!==Z.number&&ne(R)});var Q={si:{NONE:{unit:V,prefix:P.NONE[""]},LENGTH:{unit:_.m,prefix:P.SHORT[""]},MASS:{unit:_.g,prefix:P.SHORT.k},TIME:{unit:_.s,prefix:P.SHORT[""]},CURRENT:{unit:_.A,prefix:P.SHORT[""]},TEMPERATURE:{unit:_.K,prefix:P.SHORT[""]},LUMINOUS_INTENSITY:{unit:_.cd,prefix:P.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:_.mol,prefix:P.SHORT[""]},ANGLE:{unit:_.rad,prefix:P.SHORT[""]},BIT:{unit:_.bits,prefix:P.SHORT[""]},FORCE:{unit:_.N,prefix:P.SHORT[""]},ENERGY:{unit:_.J,prefix:P.SHORT[""]},POWER:{unit:_.W,prefix:P.SHORT[""]},PRESSURE:{unit:_.Pa,prefix:P.SHORT[""]},ELECTRIC_CHARGE:{unit:_.C,prefix:P.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:_.F,prefix:P.SHORT[""]},ELECTRIC_POTENTIAL:{unit:_.V,prefix:P.SHORT[""]},ELECTRIC_RESISTANCE:{unit:_.ohm,prefix:P.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:_.H,prefix:P.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:_.S,prefix:P.SHORT[""]},MAGNETIC_FLUX:{unit:_.Wb,prefix:P.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:_.T,prefix:P.SHORT[""]},FREQUENCY:{unit:_.Hz,prefix:P.SHORT[""]}}};Q.cgs=JSON.parse(JSON.stringify(Q.si)),Q.cgs.LENGTH={unit:_.m,prefix:P.SHORT.c},Q.cgs.MASS={unit:_.g,prefix:P.SHORT[""]},Q.cgs.FORCE={unit:_.dyn,prefix:P.SHORT[""]},Q.cgs.ENERGY={unit:_.erg,prefix:P.NONE[""]},Q.us=JSON.parse(JSON.stringify(Q.si)),Q.us.LENGTH={unit:_.ft,prefix:P.NONE[""]},Q.us.MASS={unit:_.lbm,prefix:P.NONE[""]},Q.us.TEMPERATURE={unit:_.degF,prefix:P.NONE[""]},Q.us.FORCE={unit:_.lbf,prefix:P.NONE[""]},Q.us.ENERGY={unit:_.BTU,prefix:P.BTU[""]},Q.us.POWER={unit:_.hp,prefix:P.NONE[""]},Q.us.PRESSURE={unit:_.psi,prefix:P.NONE[""]},Q.auto=JSON.parse(JSON.stringify(Q.si));var ue=Q.auto;g.setUnitSystem=function(R){if(Fe(Q,R))ue=Q[R];else throw new Error("Unit system "+R+" does not exist. Choices are: "+Object.keys(Q).join(", "))},g.getUnitSystem=function(){for(var R in Q)if(Fe(Q,R)&&Q[R]===ue)return R},g.typeConverters={BigNumber:function(Z){return Z!=null&&Z.isFraction?new y(String(Z.n)).div(String(Z.d)).times(String(Z.s)):new y(Z+"")},Fraction:function(Z){return new w(Z)},Complex:function(Z){return Z},number:function(Z){return Z!=null&&Z.isFraction?h(Z):Z}},g.prototype._numberConverter=function(){var R=g.typeConverters[this.valueType()];if(R)return R;throw new TypeError('Unsupported Unit value type "'+this.valueType()+'"')},g._getNumberConverter=function(R){if(!g.typeConverters[R])throw new TypeError('Unsupported type "'+R+'"');return g.typeConverters[R]};for(var oe in _)if(Fe(_,oe)){var be=_[oe];be.dimensions=be.base.dimensions}for(var Me in W)if(Fe(W,Me)){var Pe=_[W[Me]],Ee={};for(var Oe in Pe)Fe(Pe,Oe)&&(Ee[Oe]=Pe[Oe]);Ee.name=Me,_[Me]=Ee}g.isValidAlpha=function(Z){return/^[a-zA-Z]$/.test(Z)};function Ie(R){for(var Z=0;Z<R.length;Z++){if(N=R.charAt(Z),Z===0&&!g.isValidAlpha(N))throw new Error('Invalid unit name (must begin with alpha character): "'+R+'"');if(Z>0&&!(g.isValidAlpha(N)||S(N)))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+R+'"')}}return g.createUnit=function(R,Z){if(typeof R!="object")throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(Z&&Z.override){for(var O in R)if(Fe(R,O)&&g.deleteUnit(O),R[O].aliases)for(var q=0;q<R[O].aliases.length;q++)g.deleteUnit(R[O].aliases[q])}var U;for(var ee in R)Fe(R,ee)&&(U=g.createUnitSingle(ee,R[ee]));return U},g.createUnitSingle=function(R,Z){if((typeof Z>"u"||Z===null)&&(Z={}),typeof R!="string")throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(Fe(_,R))throw new Error('Cannot create unit "'+R+'": a unit with that name already exists');Ie(R);var O=null,q=[],U=0,ee,re,ae;if(Z&&Z.type==="Unit")O=Z.clone();else if(typeof Z=="string")Z!==""&&(ee=Z);else if(typeof Z=="object")ee=Z.definition,re=Z.prefixes,U=Z.offset,ae=Z.baseName,Z.aliases&&(q=Z.aliases.valueOf());else throw new TypeError('Cannot create unit "'+R+'" from "'+Z.toString()+'": expecting "string" or "Unit" or "Object"');if(q){for(var ye=0;ye<q.length;ye++)if(Fe(_,q[ye]))throw new Error('Cannot create alias "'+q[ye]+'": a unit with that name already exists')}if(ee&&typeof ee=="string"&&!O)try{O=g.parse(ee,{allowNoUnits:!0})}catch(Ye){throw Ye.message='Could not create unit "'+R+'" from "'+ee+'": '+Ye.message,Ye}else ee&&ee.type==="Unit"&&(O=ee.clone());q=q||[],U=U||0,re&&re.toUpperCase?re=P[re.toUpperCase()]||P.NONE:re=P.NONE;var me={};if(O){me={name:R,value:O.value,dimensions:O.dimensions.slice(0),prefixes:re,offset:U};var ht=!1;for(var yt in z)if(Fe(z,yt)){for(var rt=!0,Lt=0;Lt<X.length;Lt++)if(Math.abs((me.dimensions[Lt]||0)-(z[yt].dimensions[Lt]||0))>1e-12){rt=!1;break}if(rt){ht=!0,me.base=z[yt];break}}if(!ht){ae=ae||R+"_STUFF";var T={dimensions:O.dimensions.slice(0)};T.key=ae,z[ae]=T,ue[ae]={unit:me,prefix:P.NONE[""]},me.base=z[ae]}}else{if(ae=ae||R+"_STUFF",X.indexOf(ae)>=0)throw new Error('Cannot create new base unit "'+R+'": a base unit with that name already exists (and cannot be overridden)');X.push(ae);for(var Ne in z)Fe(z,Ne)&&(z[Ne].dimensions[X.length-1]=0);for(var he={dimensions:[]},ut=0;ut<X.length;ut++)he.dimensions[ut]=0;he.dimensions[X.length-1]=1,he.key=ae,z[ae]=he,me={name:R,value:1,dimensions:z[ae].dimensions.slice(0),prefixes:re,offset:U,base:z[ae]},ue[ae]={unit:me,prefix:P.NONE[""]}}g.UNITS[R]=me;for(var J=0;J<q.length;J++){var le=q[J],ve={};for(var qe in me)Fe(me,qe)&&(ve[qe]=me[qe]);ve.name=le,g.UNITS[le]=ve}return delete $.cache,new g(null,R)},g.deleteUnit=function(R){delete g.UNITS[R],delete $.cache},g.PREFIXES=P,g.BASE_DIMENSIONS=X,g.BASE_UNITS=z,g.UNIT_SYSTEMS=Q,g.UNITS=_,g},{isClass:!0}),E1="unit",VL=["typed","Unit"],UL=I(E1,VL,e=>{var{typed:t,Unit:r}=e;return t(E1,{Unit:function(a){return a.clone()},string:function(a){return r.isValuelessUnit(a)?new r(null,a):r.parse(a,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string | Unit":function(a,i){return new r(a,i)},"number | BigNumber | Fraction":function(a){return new r(a)},"Array | Matrix":t.referToSelf(n=>a=>Qe(a,n))})}),S1="sparse",WL=["typed","SparseMatrix"],JL=I(S1,WL,e=>{var{typed:t,SparseMatrix:r}=e;return t(S1,{"":function(){return new r([])},string:function(a){return new r([],a)},"Array | Matrix":function(a){return new r(a)},"Array | Matrix, string":function(a,i){return new r(a,i)}})}),M1="createUnit",KL=["typed","Unit"],YL=I(M1,KL,e=>{var{typed:t,Unit:r}=e;return t(M1,{"Object, Object":function(a,i){return r.createUnit(a,i)},Object:function(a){return r.createUnit(a,{})},"string, Unit | string | Object, Object":function(a,i,o){var s={};return s[a]=i,r.createUnit(s,o)},"string, Unit | string | Object":function(a,i){var o={};return o[a]=i,r.createUnit(o,{})},string:function(a){var i={};return i[a]={},r.createUnit(i,{})}})}),T1="acos",ZL=["typed","config","Complex"],QL=I(T1,ZL,e=>{var{typed:t,config:r,Complex:n}=e;return t(T1,{number:function(i){return i>=-1&&i<=1||r.predictable?Math.acos(i):new n(i,0).acos()},Complex:function(i){return i.acos()},BigNumber:function(i){return i.acos()}})}),F1="acosh",XL=["typed","config","Complex"],eH=I(F1,XL,e=>{var{typed:t,config:r,Complex:n}=e;return t(F1,{number:function(i){return i>=1||r.predictable?n2(i):i<=-1?new n(Math.log(Math.sqrt(i*i-1)-i),Math.PI):new n(i,0).acosh()},Complex:function(i){return i.acosh()},BigNumber:function(i){return i.acosh()}})}),P1="acot",tH=["typed","BigNumber"],rH=I(P1,tH,e=>{var{typed:t,BigNumber:r}=e;return t(P1,{number:a2,Complex:function(a){return a.acot()},BigNumber:function(a){return new r(1).div(a).atan()}})}),k1="acoth",nH=["typed","config","Complex","BigNumber"],aH=I(k1,nH,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(k1,{number:function(o){return o>=1||o<=-1||r.predictable?i2(o):new n(o,0).acoth()},Complex:function(o){return o.acoth()},BigNumber:function(o){return new a(1).div(o).atanh()}})}),O1="acsc",iH=["typed","config","Complex","BigNumber"],oH=I(O1,iH,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(O1,{number:function(o){return o<=-1||o>=1||r.predictable?o2(o):new n(o,0).acsc()},Complex:function(o){return o.acsc()},BigNumber:function(o){return new a(1).div(o).asin()}})}),B1="acsch",sH=["typed","BigNumber"],uH=I(B1,sH,e=>{var{typed:t,BigNumber:r}=e;return t(B1,{number:s2,Complex:function(a){return a.acsch()},BigNumber:function(a){return new r(1).div(a).asinh()}})}),$1="asec",lH=["typed","config","Complex","BigNumber"],cH=I($1,lH,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t($1,{number:function(o){return o<=-1||o>=1||r.predictable?u2(o):new n(o,0).asec()},Complex:function(o){return o.asec()},BigNumber:function(o){return new a(1).div(o).acos()}})}),_1="asech",fH=["typed","config","Complex","BigNumber"],mH=I(_1,fH,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(_1,{number:function(o){if(o<=1&&o>=-1||r.predictable){var s=1/o;if(s>0||r.predictable)return l2(o);var u=Math.sqrt(s*s-1);return new n(Math.log(u-s),Math.PI)}return new n(o,0).asech()},Complex:function(o){return o.asech()},BigNumber:function(o){return new a(1).div(o).acosh()}})}),I1="asin",dH=["typed","config","Complex"],hH=I(I1,dH,e=>{var{typed:t,config:r,Complex:n}=e;return t(I1,{number:function(i){return i>=-1&&i<=1||r.predictable?Math.asin(i):new n(i,0).asin()},Complex:function(i){return i.asin()},BigNumber:function(i){return i.asin()}})}),pH="asinh",gH=["typed"],vH=I(pH,gH,e=>{var{typed:t}=e;return t("asinh",{number:c2,Complex:function(n){return n.asinh()},BigNumber:function(n){return n.asinh()}})}),yH="atan",bH=["typed"],wH=I(yH,bH,e=>{var{typed:t}=e;return t("atan",{number:function(n){return Math.atan(n)},Complex:function(n){return n.atan()},BigNumber:function(n){return n.atan()}})}),z1="atan2",xH=["typed","matrix","equalScalar","BigNumber","DenseMatrix","concat"],DH=I(z1,xH,e=>{var{typed:t,matrix:r,equalScalar:n,BigNumber:a,DenseMatrix:i,concat:o}=e,s=ea({typed:t,equalScalar:n}),u=jr({typed:t}),l=C2({typed:t,equalScalar:n}),c=Fr({typed:t,equalScalar:n}),f=lr({typed:t,DenseMatrix:i}),m=$t({typed:t,matrix:r,concat:o});return t(z1,{"number, number":Math.atan2,"BigNumber, BigNumber":(d,h)=>a.atan2(d,h)},m({scalar:"number | BigNumber",SS:l,DS:u,SD:s,Ss:c,sS:f}))}),j1="atanh",NH=["typed","config","Complex"],AH=I(j1,NH,e=>{var{typed:t,config:r,Complex:n}=e;return t(j1,{number:function(i){return i<=1&&i>=-1||r.predictable?f2(i):new n(i,0).atanh()},Complex:function(i){return i.atanh()},BigNumber:function(i){return i.atanh()}})}),os=I("trigUnit",["typed"],e=>{var{typed:t}=e;return{Unit:t.referToSelf(r=>n=>{if(!n.hasBase(n.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return t.find(r,n.valueType())(n.value)})}}),q1="cos",CH=["typed"],EH=I(q1,CH,e=>{var{typed:t}=e,r=os({typed:t});return t(q1,{number:Math.cos,"Complex | BigNumber":n=>n.cos()},r)}),R1="cosh",SH=["typed"],MH=I(R1,SH,e=>{var{typed:t}=e;return t(R1,{number:g9,"Complex | BigNumber":r=>r.cosh()})}),L1="cot",TH=["typed","BigNumber"],FH=I(L1,TH,e=>{var{typed:t,BigNumber:r}=e,n=os({typed:t});return t(L1,{number:m2,Complex:a=>a.cot(),BigNumber:a=>new r(1).div(a.tan())},n)}),H1="coth",PH=["typed","BigNumber"],kH=I(H1,PH,e=>{var{typed:t,BigNumber:r}=e;return t(H1,{number:d2,Complex:n=>n.coth(),BigNumber:n=>new r(1).div(n.tanh())})}),G1="csc",OH=["typed","BigNumber"],BH=I(G1,OH,e=>{var{typed:t,BigNumber:r}=e,n=os({typed:t});return t(G1,{number:h2,Complex:a=>a.csc(),BigNumber:a=>new r(1).div(a.sin())},n)}),V1="csch",$H=["typed","BigNumber"],_H=I(V1,$H,e=>{var{typed:t,BigNumber:r}=e;return t(V1,{number:p2,Complex:n=>n.csch(),BigNumber:n=>new r(1).div(n.sinh())})}),U1="sec",IH=["typed","BigNumber"],zH=I(U1,IH,e=>{var{typed:t,BigNumber:r}=e,n=os({typed:t});return t(U1,{number:g2,Complex:a=>a.sec(),BigNumber:a=>new r(1).div(a.cos())},n)}),W1="sech",jH=["typed","BigNumber"],qH=I(W1,jH,e=>{var{typed:t,BigNumber:r}=e;return t(W1,{number:v2,Complex:n=>n.sech(),BigNumber:n=>new r(1).div(n.cosh())})}),J1="sin",RH=["typed"],LH=I(J1,RH,e=>{var{typed:t}=e,r=os({typed:t});return t(J1,{number:Math.sin,"Complex | BigNumber":n=>n.sin()},r)}),K1="sinh",HH=["typed"],GH=I(K1,HH,e=>{var{typed:t}=e;return t(K1,{number:y2,"Complex | BigNumber":r=>r.sinh()})}),Y1="tan",VH=["typed"],UH=I(Y1,VH,e=>{var{typed:t}=e,r=os({typed:t});return t(Y1,{number:Math.tan,"Complex | BigNumber":n=>n.tan()},r)}),WH="tanh",JH=["typed"],KH=I(WH,JH,e=>{var{typed:t}=e;return t("tanh",{number:y9,"Complex | BigNumber":r=>r.tanh()})}),Z1="setCartesian",YH=["typed","size","subset","compareNatural","Index","DenseMatrix"],ZH=I(Z1,YH,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(Z1,{"Array | Matrix, Array | Matrix":function(u,l){var c=[];if(n(r(u),new i(0))!==0&&n(r(l),new i(0))!==0){var f=mt(Array.isArray(u)?u:u.toArray()).sort(a),m=mt(Array.isArray(l)?l:l.toArray()).sort(a);c=[];for(var d=0;d<f.length;d++)for(var h=0;h<m.length;h++)c.push([f[d],m[h]])}return Array.isArray(u)&&Array.isArray(l)?c:new o(c)}})}),Q1="setDifference",QH=["typed","size","subset","compareNatural","Index","DenseMatrix"],XH=I(Q1,QH,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(Q1,{"Array | Matrix, Array | Matrix":function(u,l){var c;if(n(r(u),new i(0))===0)c=[];else{if(n(r(l),new i(0))===0)return mt(u.toArray());var f=Ko(mt(Array.isArray(u)?u:u.toArray()).sort(a)),m=Ko(mt(Array.isArray(l)?l:l.toArray()).sort(a));c=[];for(var d,h=0;h<f.length;h++){d=!1;for(var p=0;p<m.length;p++)if(a(f[h].value,m[p].value)===0&&f[h].identifier===m[p].identifier){d=!0;break}d||c.push(f[h])}}return Array.isArray(u)&&Array.isArray(l)?Yl(c):new o(Yl(c))}})}),X1="setDistinct",eG=["typed","size","subset","compareNatural","Index","DenseMatrix"],tG=I(X1,eG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(X1,{"Array | Matrix":function(u){var l;if(n(r(u),new i(0))===0)l=[];else{var c=mt(Array.isArray(u)?u:u.toArray()).sort(a);l=[],l.push(c[0]);for(var f=1;f<c.length;f++)a(c[f],c[f-1])!==0&&l.push(c[f])}return Array.isArray(u)?l:new o(l)}})}),ey="setIntersect",rG=["typed","size","subset","compareNatural","Index","DenseMatrix"],nG=I(ey,rG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(ey,{"Array | Matrix, Array | Matrix":function(u,l){var c;if(n(r(u),new i(0))===0||n(r(l),new i(0))===0)c=[];else{var f=Ko(mt(Array.isArray(u)?u:u.toArray()).sort(a)),m=Ko(mt(Array.isArray(l)?l:l.toArray()).sort(a));c=[];for(var d=0;d<f.length;d++)for(var h=0;h<m.length;h++)if(a(f[d].value,m[h].value)===0&&f[d].identifier===m[h].identifier){c.push(f[d]);break}}return Array.isArray(u)&&Array.isArray(l)?Yl(c):new o(Yl(c))}})}),ty="setIsSubset",aG=["typed","size","subset","compareNatural","Index"],iG=I(ty,aG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(ty,{"Array | Matrix, Array | Matrix":function(s,u){if(n(r(s),new i(0))===0)return!0;if(n(r(u),new i(0))===0)return!1;for(var l=Ko(mt(Array.isArray(s)?s:s.toArray()).sort(a)),c=Ko(mt(Array.isArray(u)?u:u.toArray()).sort(a)),f,m=0;m<l.length;m++){f=!1;for(var d=0;d<c.length;d++)if(a(l[m].value,c[d].value)===0&&l[m].identifier===c[d].identifier){f=!0;break}if(f===!1)return!1}return!0}})}),ry="setMultiplicity",oG=["typed","size","subset","compareNatural","Index"],sG=I(ry,oG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(ry,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(s,u){if(n(r(u),new i(0))===0)return 0;for(var l=mt(Array.isArray(u)?u:u.toArray()),c=0,f=0;f<l.length;f++)a(l[f],s)===0&&c++;return c}})}),ny="setPowerset",uG=["typed","size","subset","compareNatural","Index"],lG=I(ny,uG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(ny,{"Array | Matrix":function(l){if(n(r(l),new i(0))===0)return[];for(var c=mt(Array.isArray(l)?l:l.toArray()).sort(a),f=[],m=0;m.toString(2).length<=c.length;)f.push(o(c,m.toString(2).split("").reverse())),m++;return s(f)}});function o(u,l){for(var c=[],f=0;f<l.length;f++)l[f]==="1"&&c.push(u[f]);return c}function s(u){for(var l=[],c=u.length-1;c>0;c--)for(var f=0;f<c;f++)u[f].length>u[f+1].length&&(l=u[f],u[f]=u[f+1],u[f+1]=l);return u}}),ay="setSize",cG=["typed","compareNatural"],fG=I(ay,cG,e=>{var{typed:t,compareNatural:r}=e;return t(ay,{"Array | Matrix":function(a){return Array.isArray(a)?mt(a).length:mt(a.toArray()).length},"Array | Matrix, boolean":function(a,i){if(i===!1||a.length===0)return Array.isArray(a)?mt(a).length:mt(a.toArray()).length;for(var o=mt(Array.isArray(a)?a:a.toArray()).sort(r),s=1,u=1;u<o.length;u++)r(o[u],o[u-1])!==0&&s++;return s}})}),iy="setSymDifference",mG=["typed","size","concat","subset","setDifference","Index"],dG=I(iy,mG,e=>{var{typed:t,size:r,concat:n,subset:a,setDifference:i,Index:o}=e;return t(iy,{"Array | Matrix, Array | Matrix":function(u,l){if(a(r(u),new o(0))===0)return mt(l);if(a(r(l),new o(0))===0)return mt(u);var c=mt(u),f=mt(l);return n(i(c,f),i(f,c))}})}),oy="setUnion",hG=["typed","size","concat","subset","setIntersect","setSymDifference","Index"],pG=I(oy,hG,e=>{var{typed:t,size:r,concat:n,subset:a,setIntersect:i,setSymDifference:o,Index:s}=e;return t(oy,{"Array | Matrix, Array | Matrix":function(l,c){if(a(r(l),new s(0))===0)return mt(c);if(a(r(c),new s(0))===0)return mt(l);var f=mt(l),m=mt(c);return n(o(f,m),i(f,m))}})}),sy="add",gG=["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix","concat"],vG=I(sy,gG,e=>{var{typed:t,matrix:r,addScalar:n,equalScalar:a,DenseMatrix:i,SparseMatrix:o,concat:s}=e,u=bi({typed:t}),l=Md({typed:t,equalScalar:a}),c=no({typed:t,DenseMatrix:i}),f=$t({typed:t,matrix:r,concat:s});return t(sy,{"any, any":n,"any, any, ...any":t.referToSelf(m=>(d,h,p)=>{for(var y=m(d,h),w=0;w<p.length;w++)y=m(y,p[w]);return y})},f({elop:n,DS:u,SS:l,Ss:c}))}),uy="hypot",yG=["typed","abs","addScalar","divideScalar","multiplyScalar","sqrt","smaller","isPositive"],bG=I(uy,yG,e=>{var{typed:t,abs:r,addScalar:n,divideScalar:a,multiplyScalar:i,sqrt:o,smaller:s,isPositive:u}=e;return t(uy,{"... number | BigNumber":l,Array:l,Matrix:c=>l(mt(c.toArray(),!0))});function l(c){for(var f=0,m=0,d=0;d<c.length;d++){if($a(c[d]))throw new TypeError("Unexpected type of argument to hypot");var h=r(c[d]);s(m,h)?(f=i(f,i(a(m,h),a(m,h))),f=n(f,1),m=h):f=n(f,u(h)?i(a(h,m),a(h,m)):h)}return i(m,o(f))}}),ly="norm",wG=["typed","abs","add","pow","conj","sqrt","multiply","equalScalar","larger","smaller","matrix","ctranspose","eigs"],xG=I(ly,wG,e=>{var{typed:t,abs:r,add:n,pow:a,conj:i,sqrt:o,multiply:s,equalScalar:u,larger:l,smaller:c,matrix:f,ctranspose:m,eigs:d}=e;return t(ly,{number:Math.abs,Complex:function(N){return N.abs()},BigNumber:function(N){return N.abs()},boolean:function(N){return Math.abs(N)},Array:function(N){return b(f(N),2)},Matrix:function(N){return b(N,2)},"Array, number | BigNumber | string":function(N,A){return b(f(N),A)},"Matrix, number | BigNumber | string":function(N,A){return b(N,A)}});function h(C){var N=0;return C.forEach(function(A){var E=r(A);l(E,N)&&(N=E)},!0),N}function p(C){var N;return C.forEach(function(A){var E=r(A);(!N||c(E,N))&&(N=E)},!0),N||0}function y(C,N){if(N===Number.POSITIVE_INFINITY||N==="inf")return h(C);if(N===Number.NEGATIVE_INFINITY||N==="-inf")return p(C);if(N==="fro")return b(C,2);if(typeof N=="number"&&!isNaN(N)){if(!u(N,0)){var A=0;return C.forEach(function(E){A=n(a(r(E),N),A)},!0),a(A,1/N)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}function w(C){var N=0;return C.forEach(function(A,E){N=n(N,s(A,i(A)))}),r(o(N))}function D(C){var N=[],A=0;return C.forEach(function(E,S){var F=S[1],k=n(N[F]||0,r(E));l(k,A)&&(A=k),N[F]=k},!0),A}function v(C){var N=C.size();if(N[0]!==N[1])throw new RangeError("Invalid matrix dimensions");var A=m(C),E=s(A,C),S=d(E).values.toArray(),F=S[S.length-1];return r(o(F))}function x(C){var N=[],A=0;return C.forEach(function(E,S){var F=S[0],k=n(N[F]||0,r(E));l(k,A)&&(A=k),N[F]=k},!0),A}function g(C,N){if(N===1)return D(C);if(N===Number.POSITIVE_INFINITY||N==="inf")return x(C);if(N==="fro")return w(C);if(N===2)return v(C);throw new Error("Unsupported parameter value "+N)}function b(C,N){var A=C.size();if(A.length===1)return y(C,N);if(A.length===2){if(A[0]&&A[1])return g(C,N);throw new RangeError("Invalid matrix dimensions")}}}),cy="dot",DG=["typed","addScalar","multiplyScalar","conj","size"],NG=I(cy,DG,e=>{var{typed:t,addScalar:r,multiplyScalar:n,conj:a,size:i}=e;return t(cy,{"Array | DenseMatrix, Array | DenseMatrix":s,"SparseMatrix, SparseMatrix":u});function o(l,c){var f=i(l),m=i(c),d,h;if(f.length===1)d=f[0];else if(f.length===2&&f[1]===1)d=f[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+f.join(", ")+")");if(m.length===1)h=m[0];else if(m.length===2&&m[1]===1)h=m[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+m.join(", ")+")");if(d!==h)throw new RangeError("Vectors must have equal length ("+d+" != "+h+")");if(d===0)throw new RangeError("Cannot calculate the dot product of empty vectors");return d}function s(l,c){var f=o(l,c),m=Re(l)?l._data:l,d=Re(l)?l._datatype||l.getDataType():void 0,h=Re(c)?c._data:c,p=Re(c)?c._datatype||c.getDataType():void 0,y=i(l).length===2,w=i(c).length===2,D=r,v=n;if(d&&p&&d===p&&typeof d=="string"&&d!=="mixed"){var x=d;D=t.find(r,[x,x]),v=t.find(n,[x,x])}if(!y&&!w){for(var g=v(a(m[0]),h[0]),b=1;b<f;b++)g=D(g,v(a(m[b]),h[b]));return g}if(!y&&w){for(var C=v(a(m[0]),h[0][0]),N=1;N<f;N++)C=D(C,v(a(m[N]),h[N][0]));return C}if(y&&!w){for(var A=v(a(m[0][0]),h[0]),E=1;E<f;E++)A=D(A,v(a(m[E][0]),h[E]));return A}if(y&&w){for(var S=v(a(m[0][0]),h[0][0]),F=1;F<f;F++)S=D(S,v(a(m[F][0]),h[F][0]));return S}}function u(l,c){o(l,c);for(var f=l._index,m=l._values,d=c._index,h=c._values,p=0,y=r,w=n,D=0,v=0;D<f.length&&v<d.length;){var x=f[D],g=d[v];if(x<g){D++;continue}if(x>g){v++;continue}x===g&&(p=y(p,w(m[D],h[v])),D++,v++)}return p}}),AG="trace",CG=["typed","matrix","add"],EG=I(AG,CG,e=>{var{typed:t,matrix:r,add:n}=e;return t("trace",{Array:function(s){return a(r(s))},SparseMatrix:i,DenseMatrix:a,any:Ve});function a(o){var s=o._size,u=o._data;switch(s.length){case 1:if(s[0]===1)return Ve(u[0]);throw new RangeError("Matrix must be square (size: "+at(s)+")");case 2:{var l=s[0],c=s[1];if(l===c){for(var f=0,m=0;m<l;m++)f=n(f,u[m][m]);return f}else throw new RangeError("Matrix must be square (size: "+at(s)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+at(s)+")")}}function i(o){var s=o._values,u=o._index,l=o._ptr,c=o._size,f=c[0],m=c[1];if(f===m){var d=0;if(s.length>0)for(var h=0;h<m;h++)for(var p=l[h],y=l[h+1],w=p;w<y;w++){var D=u[w];if(D===h){d=n(d,s[w]);break}if(D>h)break}return d}throw new RangeError("Matrix must be square (size: "+at(c)+")")}}),fy="index",SG=["typed","Index"],MG=I(fy,SG,e=>{var{typed:t,Index:r}=e;return t(fy,{"...number | string | BigNumber | Range | Array | Matrix":function(a){var i=a.map(function(s){return Ze(s)?s.toNumber():Mt(s)||Re(s)?s.map(function(u){return Ze(u)?u.toNumber():u}):s}),o=new r;return r.apply(o,i),o}})}),V2=new Set(["end"]),TG="Node",FG=["mathWithTransform"],PG=I(TG,FG,e=>{var{mathWithTransform:t}=e;function r(a){for(var i of[...V2])if(a.has(i))throw new Error('Scope contains an illegal symbol, "'+i+'" is a reserved keyword')}class n{get type(){return"Node"}get isNode(){return!0}evaluate(i){return this.compile().evaluate(i)}compile(){var i=this._compile(t,{}),o={},s=null;function u(l){var c=qo(l);return r(c),i(c,o,s)}return{evaluate:u}}_compile(i,o){throw new Error("Method _compile must be implemented by type "+this.type)}forEach(i){throw new Error("Cannot run forEach on a Node interface")}map(i){throw new Error("Cannot run map on a Node interface")}_ifNode(i){if(!Ct(i))throw new TypeError("Callback function must return a Node");return i}traverse(i){i(this,null,null);function o(s,u){s.forEach(function(l,c,f){u(l,c,f),o(l,u)})}o(this,i)}transform(i){function o(s,u,l){var c=i(s,u,l);return c!==s?c:s.map(o)}return o(this,null,null)}filter(i){var o=[];return this.traverse(function(s,u,l){i(s,u,l)&&o.push(s)}),o}clone(){throw new Error("Cannot clone a Node interface")}cloneDeep(){return this.map(function(i){return i.cloneDeep()})}equals(i){return i?this.type===i.type&&La(this,i):!1}toString(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toString(i)}_toString(){throw new Error("_toString not implemented for "+this.type)}toJSON(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)}toHTML(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toHTML(i)}_toHTML(){throw new Error("_toHTML not implemented for "+this.type)}toTex(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toTex(i)}_toTex(i){throw new Error("_toTex not implemented for "+this.type)}_getCustomString(i){if(i&&typeof i=="object")switch(typeof i.handler){case"object":case"undefined":return;case"function":return i.handler(this,i);default:throw new TypeError("Object or function expected as callback")}}getIdentifier(){return this.type}getContent(){return this}}return n},{isClass:!0,isNode:!0});function Zr(e){return e&&e.isIndexError?new Qn(e.index+1,e.min+1,e.max!==void 0?e.max+1:void 0):e}function U2(e){var{subset:t}=e;return function(n,a){try{if(Array.isArray(n))return t(n,a);if(n&&typeof n.subset=="function")return n.subset(a);if(typeof n=="string")return t(n,a);if(typeof n=="object"){if(!a.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return Ur(n,a.getObjectProperty())}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(i){throw Zr(i)}}}var al="AccessorNode",kG=["subset","Node"],OG=I(al,kG,e=>{var{subset:t,Node:r}=e,n=U2({subset:t});function a(o){return!(qa(o)||Tn(o)||ct(o)||mi(o)||Dc(o)||Ra(o)||xr(o))}class i extends r{constructor(s,u){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(super(),!Ct(s))throw new TypeError('Node expected for parameter "object"');if(!ts(u))throw new TypeError('IndexNode expected for parameter "index"');this.object=s,this.index=u,this.optionalChaining=l}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return al}get isAccessorNode(){return!0}_compile(s,u){var l=this.object._compile(s,u),c=this.index._compile(s,u),f=this.optionalChaining,m=qa(this.object)&&this.object.optionalChaining;if(this.index.isObjectProperty()){var d=this.index.getObjectProperty();return function(p,y,w){var D=w||{},v=l(p,y,D);if(f&&v==null){D.optionalShortCircuit=!0;return}if(!(m&&D!==null&&D!==void 0&&D.optionalShortCircuit))return Ur(v,d)}}else return function(p,y,w){var D=w||{},v=l(p,y,D);if(f&&v==null){D.optionalShortCircuit=!0;return}if(!(m&&D!==null&&D!==void 0&&D.optionalShortCircuit)){var x=c(p,y,v);return n(v,x)}}}forEach(s){s(this.object,"object",this),s(this.index,"index",this)}map(s){return new i(this._ifNode(s(this.object,"object",this)),this._ifNode(s(this.index,"index",this)),this.optionalChaining)}clone(){return new i(this.object,this.index,this.optionalChaining)}_toString(s){var u=this.object.toString(s);a(this.object)&&(u="("+u+")");var l=this.optionalChaining?this.index.dotNotation?"?":"?.":"";return u+l+this.index.toString(s)}_toHTML(s){var u=this.object.toHTML(s);return a(this.object)&&(u='<span class="math-parenthesis math-round-parenthesis">(</span>'+u+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+this.index.toHTML(s)}_toTex(s){var u=this.object.toTex(s);return a(this.object)&&(u="\\left(' + object + '\\right)"),u+this.index.toTex(s)}toJSON(){return{mathjs:al,object:this.object,index:this.index,optionalChaining:this.optionalChaining}}static fromJSON(s){return new i(s.object,s.index,s.optionalChaining)}}return sr(i,"name",al),i},{isClass:!0,isNode:!0}),il="ArrayNode",BG=["Node"],$G=I(il,BG,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),this.items=a||[],!Array.isArray(this.items)||!this.items.every(Ct))throw new TypeError("Array containing Nodes expected")}get type(){return il}get isArrayNode(){return!0}_compile(a,i){var o=ui(this.items,function(l){return l._compile(a,i)}),s=a.config.matrix!=="Array";if(s){var u=a.matrix;return function(c,f,m){return u(ui(o,function(d){return d(c,f,m)}))}}else return function(c,f,m){return ui(o,function(d){return d(c,f,m)})}}forEach(a){for(var i=0;i<this.items.length;i++){var o=this.items[i];a(o,"items["+i+"]",this)}}map(a){for(var i=[],o=0;o<this.items.length;o++)i[o]=this._ifNode(a(this.items[o],"items["+o+"]",this));return new r(i)}clone(){return new r(this.items.slice(0))}_toString(a){var i=this.items.map(function(o){return o.toString(a)});return"["+i.join(", ")+"]"}toJSON(){return{mathjs:il,items:this.items}}static fromJSON(a){return new r(a.items)}_toHTML(a){var i=this.items.map(function(o){return o.toHTML(a)});return'<span class="math-parenthesis math-square-parenthesis">[</span>'+i.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'}_toTex(a){function i(o,s){var u=o.some(Tn)&&!o.every(Tn),l=s||u,c=l?"&":"\\\\",f=o.map(function(m){return m.items?i(m.items,!s):m.toTex(a)}).join(c);return u||!l||l&&!s?"\\begin{bmatrix}"+f+"\\end{bmatrix}":f}return i(this.items,!1)}}return sr(r,"name",il),r},{isClass:!0,isNode:!0});function _G(e){var{subset:t,matrix:r}=e;return function(a,i,o){try{if(Array.isArray(a)){var s=r(a).subset(i,o).valueOf();return s.forEach((u,l)=>{a[l]=u}),a}else{if(a&&typeof a.subset=="function")return a.subset(i,o);if(typeof a=="string")return t(a,i,o);if(typeof a=="object"){if(!i.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return Vo(a,i.getObjectProperty(),o),a}else throw new TypeError("Cannot apply index: unsupported type of object")}}catch(u){throw Zr(u)}}}var Wn=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{op:"or",associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{op:"xor",associativity:"left",associativeWith:[]}},{"OperatorNode:and":{op:"and",associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{op:"|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{op:"^|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{op:"&",associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{op:"==",associativity:"left",associativeWith:[]},"OperatorNode:unequal":{op:"!=",associativity:"left",associativeWith:[]},"OperatorNode:smaller":{op:"<",associativity:"left",associativeWith:[]},"OperatorNode:larger":{op:">",associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{op:"<=",associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{op:">=",associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{op:"<<",associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{op:">>",associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{op:">>>",associativity:"left",associativeWith:[]}},{"OperatorNode:to":{op:"to",associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{op:"+",associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{op:"-",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{op:"*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{op:"/",associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{op:".*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{op:"./",associativity:"left",associativeWith:[]},"OperatorNode:mod":{op:"mod",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]}},{"OperatorNode:unaryPlus":{op:"+",associativity:"right"},"OperatorNode:unaryMinus":{op:"-",associativity:"right"},"OperatorNode:bitNot":{op:"~",associativity:"right"},"OperatorNode:not":{op:"not",associativity:"right"}},{"OperatorNode:pow":{op:"^",associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{op:".^",associativity:"right",associativeWith:[]}},{"OperatorNode:nullish":{op:"??",associativity:"left",associativeWith:[]}},{"OperatorNode:factorial":{op:"!",associativity:"left"}},{"OperatorNode:ctranspose":{op:"'",associativity:"left"}}];function ol(e,t){if(!t||t!=="auto")return e;for(var r=e;Ra(r);)r=r.content;return r}function Tt(e,t,r,n){var a=e;t!=="keep"&&(a=e.getContent());for(var i=a.getIdentifier(),o=null,s=0;s<Wn.length;s++)if(i in Wn[s]){o=s;break}if(i==="OperatorNode:multiply"&&a.implicit&&r!=="show"){var u=ol(a.args[0],t);!(ct(u)&&n&&n.getIdentifier()==="OperatorNode:divide"&&Om(ol(n.args[0],t)))&&!(u.getIdentifier()==="OperatorNode:divide"&&Om(ol(u.args[0],t))&&ct(ol(u.args[1])))&&(o+=1)}return o}function Cs(e,t){var r=e;t!=="keep"&&(r=e.getContent());var n=r.getIdentifier(),a=Tt(r,t);if(a===null)return null;var i=Wn[a][n];if(Fe(i,"associativity")){if(i.associativity==="left")return"left";if(i.associativity==="right")return"right";throw Error("'"+n+"' has the invalid associativity '"+i.associativity+"'.")}return null}function qf(e,t,r){var n=r!=="keep"?e.getContent():e,a=r!=="keep"?e.getContent():t,i=n.getIdentifier(),o=a.getIdentifier(),s=Tt(n,r);if(s===null)return null;var u=Wn[s][i];if(Fe(u,"associativeWith")&&u.associativeWith instanceof Array){for(var l=0;l<u.associativeWith.length;l++)if(u.associativeWith[l]===o)return!0;return!1}return null}function IG(e){var t="OperatorNode:"+e;for(var r of Wn)if(t in r)return r[t].op;return null}var sl="AssignmentNode",zG=["subset","?matrix","Node"],jG=I(sl,zG,e=>{var{subset:t,matrix:r,Node:n}=e,a=U2({subset:t}),i=_G({subset:t,matrix:r});function o(u,l,c){l||(l="keep");var f=Tt(u,l,c),m=Tt(u.value,l,c);return l==="all"||m!==null&&m<=f}class s extends n{constructor(l,c,f){if(super(),this.object=l,this.index=f?c:null,this.value=f||c,!xr(l)&&!qa(l))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(xr(l)&&l.name==="end")throw new Error('Cannot assign to symbol "end"');if(this.index&&!ts(this.index))throw new TypeError('IndexNode expected as "index"');if(!Ct(this.value))throw new TypeError('Node expected as "value"')}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return sl}get isAssignmentNode(){return!0}_compile(l,c){var f=this.object._compile(l,c),m=this.index?this.index._compile(l,c):null,d=this.value._compile(l,c),h=this.object.name;if(this.index)if(this.index.isObjectProperty()){var p=this.index.getObjectProperty();return function(x,g,b){var C=f(x,g,b),N=d(x,g,b);return Vo(C,p,N),N}}else{if(xr(this.object))return function(x,g,b){var C=f(x,g,b),N=d(x,g,b),A=m(x,g,C);return x.set(h,i(C,A,N)),N};var y=this.object.object._compile(l,c);if(this.object.index.isObjectProperty()){var w=this.object.index.getObjectProperty();return function(x,g,b){var C=y(x,g,b),N=Ur(C,w),A=m(x,g,N),E=d(x,g,b);return Vo(C,w,i(N,A,E)),E}}else{var D=this.object.index._compile(l,c);return function(x,g,b){var C=y(x,g,b),N=D(x,g,C),A=a(C,N),E=m(x,g,A),S=d(x,g,b);return i(C,N,i(A,E,S)),S}}}else{if(!xr(this.object))throw new TypeError("SymbolNode expected as object");return function(x,g,b){var C=d(x,g,b);return x.set(h,C),C}}}forEach(l){l(this.object,"object",this),this.index&&l(this.index,"index",this),l(this.value,"value",this)}map(l){var c=this._ifNode(l(this.object,"object",this)),f=this.index?this._ifNode(l(this.index,"index",this)):null,m=this._ifNode(l(this.value,"value",this));return new s(c,f,m)}clone(){return new s(this.object,this.index,this.value)}_toString(l){var c=this.object.toString(l),f=this.index?this.index.toString(l):"",m=this.value.toString(l);return o(this,l&&l.parenthesis,l&&l.implicit)&&(m="("+m+")"),c+f+" = "+m}toJSON(){return{mathjs:sl,object:this.object,index:this.index,value:this.value}}static fromJSON(l){return new s(l.object,l.index,l.value)}_toHTML(l){var c=this.object.toHTML(l),f=this.index?this.index.toHTML(l):"",m=this.value.toHTML(l);return o(this,l&&l.parenthesis,l&&l.implicit)&&(m='<span class="math-paranthesis math-round-parenthesis">(</span>'+m+'<span class="math-paranthesis math-round-parenthesis">)</span>'),c+f+'<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+m}_toTex(l){var c=this.object.toTex(l),f=this.index?this.index.toTex(l):"",m=this.value.toTex(l);return o(this,l&&l.parenthesis,l&&l.implicit)&&(m="\\left(".concat(m,"\\right)")),c+f+"="+m}}return sr(s,"name",sl),s},{isClass:!0,isNode:!0}),ul="BlockNode",qG=["ResultSet","Node"],RG=I(ul,qG,e=>{var{ResultSet:t,Node:r}=e;class n extends r{constructor(i){if(super(),!Array.isArray(i))throw new Error("Array expected");this.blocks=i.map(function(o){var s=o&&o.node,u=o&&o.visible!==void 0?o.visible:!0;if(!Ct(s))throw new TypeError('Property "node" must be a Node');if(typeof u!="boolean")throw new TypeError('Property "visible" must be a boolean');return{node:s,visible:u}})}get type(){return ul}get isBlockNode(){return!0}_compile(i,o){var s=ui(this.blocks,function(u){return{evaluate:u.node._compile(i,o),visible:u.visible}});return function(l,c,f){var m=[];return Sx(s,function(h){var p=h.evaluate(l,c,f);h.visible&&m.push(p)}),new t(m)}}forEach(i){for(var o=0;o<this.blocks.length;o++)i(this.blocks[o].node,"blocks["+o+"].node",this)}map(i){for(var o=[],s=0;s<this.blocks.length;s++){var u=this.blocks[s],l=this._ifNode(i(u.node,"blocks["+s+"].node",this));o[s]={node:l,visible:u.visible}}return new n(o)}clone(){var i=this.blocks.map(function(o){return{node:o.node,visible:o.visible}});return new n(i)}_toString(i){return this.blocks.map(function(o){return o.node.toString(i)+(o.visible?"":";")}).join(`
37
+ `)}toJSON(){return{mathjs:ul,blocks:this.blocks}}static fromJSON(i){return new n(i.blocks)}_toHTML(i){return this.blocks.map(function(o){return o.node.toHTML(i)+(o.visible?"":'<span class="math-separator">;</span>')}).join('<span class="math-separator"><br /></span>')}_toTex(i){return this.blocks.map(function(o){return o.node.toTex(i)+(o.visible?"":";")}).join(`\\;\\;
38
+ `)}}return sr(n,"name",ul),n},{isClass:!0,isNode:!0}),ll="ConditionalNode",LG=["Node"],HG=I(ll,LG,e=>{var{Node:t}=e;function r(a){if(typeof a=="number"||typeof a=="boolean"||typeof a=="string")return!!a;if(a){if(Ze(a))return!a.isZero();if($a(a))return!!(a.re||a.im);if(dn(a))return!!a.value}if(a==null)return!1;throw new TypeError('Unsupported type of condition "'+Ft(a)+'"')}class n extends t{constructor(i,o,s){if(super(),!Ct(i))throw new TypeError("Parameter condition must be a Node");if(!Ct(o))throw new TypeError("Parameter trueExpr must be a Node");if(!Ct(s))throw new TypeError("Parameter falseExpr must be a Node");this.condition=i,this.trueExpr=o,this.falseExpr=s}get type(){return ll}get isConditionalNode(){return!0}_compile(i,o){var s=this.condition._compile(i,o),u=this.trueExpr._compile(i,o),l=this.falseExpr._compile(i,o);return function(f,m,d){return r(s(f,m,d))?u(f,m,d):l(f,m,d)}}forEach(i){i(this.condition,"condition",this),i(this.trueExpr,"trueExpr",this),i(this.falseExpr,"falseExpr",this)}map(i){return new n(this._ifNode(i(this.condition,"condition",this)),this._ifNode(i(this.trueExpr,"trueExpr",this)),this._ifNode(i(this.falseExpr,"falseExpr",this)))}clone(){return new n(this.condition,this.trueExpr,this.falseExpr)}_toString(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=Tt(this,o,i&&i.implicit),u=this.condition.toString(i),l=Tt(this.condition,o,i&&i.implicit);(o==="all"||this.condition.type==="OperatorNode"||l!==null&&l<=s)&&(u="("+u+")");var c=this.trueExpr.toString(i),f=Tt(this.trueExpr,o,i&&i.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||f!==null&&f<=s)&&(c="("+c+")");var m=this.falseExpr.toString(i),d=Tt(this.falseExpr,o,i&&i.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||d!==null&&d<=s)&&(m="("+m+")"),u+" ? "+c+" : "+m}toJSON(){return{mathjs:ll,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}static fromJSON(i){return new n(i.condition,i.trueExpr,i.falseExpr)}_toHTML(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=Tt(this,o,i&&i.implicit),u=this.condition.toHTML(i),l=Tt(this.condition,o,i&&i.implicit);(o==="all"||this.condition.type==="OperatorNode"||l!==null&&l<=s)&&(u='<span class="math-parenthesis math-round-parenthesis">(</span>'+u+'<span class="math-parenthesis math-round-parenthesis">)</span>');var c=this.trueExpr.toHTML(i),f=Tt(this.trueExpr,o,i&&i.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||f!==null&&f<=s)&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>');var m=this.falseExpr.toHTML(i),d=Tt(this.falseExpr,o,i&&i.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||d!==null&&d<=s)&&(m='<span class="math-parenthesis math-round-parenthesis">(</span>'+m+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+'<span class="math-operator math-conditional-operator">?</span>'+c+'<span class="math-operator math-conditional-operator">:</span>'+m}_toTex(i){return"\\begin{cases} {"+this.trueExpr.toTex(i)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(i)+"}\\\\{"+this.falseExpr.toTex(i)+"}, &\\quad{\\text{otherwise}}\\end{cases}"}}return sr(n,"name",ll),n},{isClass:!0,isNode:!0}),Rf,my;function GG(){if(my)return Rf;my=1;var e=Object.assign||function(a){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(a[s]=o[s])}return a},t={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},r={"–":"\\--","—":"\\---"," ":"~"," ":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"},n=function(i,o){return e({},i,o)};return Rf=function(a){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.preserveFormatting,s=o===void 0?!1:o,u=i.escapeMapFn,l=u===void 0?n:u,c=String(a),f="",m=l(e({},t),s?e({},r):{}),d=Object.keys(m),h=function(){var y=!1;d.forEach(function(w,D){y||c.length>=w.length&&c.slice(0,w.length)===w&&(f+=m[d[D]],c=c.slice(w.length,c.length),y=!0)}),y||(f+=c.slice(0,1),c=c.slice(1,c.length))};c;)h();return f},Rf}var VG=GG();const UG=Js.getDefaultExportFromCjs(VG);var Zm={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},ft={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},dy={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(ft.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(ft.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(ft.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(ft.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(ft.pow,"{${args[0]}}-1\\right)"),fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},fraction:{2:"\\frac{${args[0]}}{${args[1]}}"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:"\\left(${args[0]}".concat(ft.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(ft.multiply,"${args[1]}\\right)")},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"},nthRoots:{2:"\\{y : y^${args[1]} = {${args[0]}}\\}"},pow:{2:"\\left(${args[0]}\\right)".concat(ft.pow,"{${args[1]}}")},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:"\\left(${args[0]}".concat(ft.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(ft.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(ft.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(ft.bitAnd,"${args[1]}\\right)")},bitNot:{1:ft.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(ft.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(ft.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(ft.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(ft.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(ft.rightLogShift,"${args[1]}\\right)")},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:"\\left(${args[0]}".concat(ft.and,"${args[1]}\\right)")},not:{1:ft.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(ft.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(ft.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(ft.ctranspose)},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},pinv:{1:"\\left(${args[0]}\\right)^{+}"},sqrtm:{1:"{${args[0]}}".concat(ft.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(ft.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(ft.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(ft.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(ft.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(ft.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(ft.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(ft.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(ft.unequal,"${args[1]}\\right)")},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:"\\left(${args[0]}".concat(ft.to,"${args[1]}\\right)")},numeric:function(t,r){return t.args[0].toTex()},number:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:"0",1:"\\left(${args[0]}\\right)"},bigint:{0:"0",1:"\\left(${args[0]}\\right)"},complex:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+".concat(Zm.i,"\\cdot\\left(${args[1]}\\right)\\right)")},matrix:{0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}},WG="\\mathrm{${name}}\\left(${args}\\right)",hy={deg:"^\\circ"};function Qm(e){return UG(e,{preserveFormatting:!0})}function W2(e,t){return t=typeof t>"u"?!1:t,t?Fe(hy,e)?hy[e]:"\\mathrm{"+Qm(e)+"}":Fe(Zm,e)?Zm[e]:Qm(e)}var cl="ConstantNode",JG=["Node","isBounded"],KG=I(cl,JG,e=>{var{Node:t,isBounded:r}=e;class n extends t{constructor(i){super(),this.value=i}get type(){return cl}get isConstantNode(){return!0}_compile(i,o){var s=this.value;return function(){return s}}forEach(i){}map(i){return this.clone()}clone(){return new n(this.value)}_toString(i){return at(this.value,i)}_toHTML(i){var o=this._toString(i);switch(Ft(this.value)){case"number":case"bigint":case"BigNumber":case"Fraction":return'<span class="math-number">'+o+"</span>";case"string":return'<span class="math-string">'+o+"</span>";case"boolean":return'<span class="math-boolean">'+o+"</span>";case"null":return'<span class="math-null-symbol">'+o+"</span>";case"undefined":return'<span class="math-undefined">'+o+"</span>";default:return'<span class="math-symbol">'+o+"</span>"}}toJSON(){return{mathjs:cl,value:this.value}}static fromJSON(i){return new n(i.value)}_toTex(i){var o=this._toString(i),s=Ft(this.value);switch(s){case"string":return"\\mathtt{"+Qm(o)+"}";case"number":case"BigNumber":{if(!r(this.value))return this.value.valueOf()<0?"-\\infty":"\\infty";var u=o.toLowerCase().indexOf("e");return u!==-1?o.substring(0,u)+"\\cdot10^{"+o.substring(u+1)+"}":o}case"bigint":return o.toString();case"Fraction":return this.value.toLatex();default:return o}}}return sr(n,"name",cl),n},{isClass:!0,isNode:!0}),fl="FunctionAssignmentNode",YG=["typed","Node"],ZG=I(fl,YG,e=>{var{typed:t,Node:r}=e;function n(i,o,s){var u=Tt(i,o,s),l=Tt(i.expr,o,s);return o==="all"||l!==null&&l<=u}class a extends r{constructor(o,s,u){if(super(),typeof o!="string")throw new TypeError('String expected for parameter "name"');if(!Array.isArray(s))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!Ct(u))throw new TypeError('Node expected for parameter "expr"');if(V2.has(o))throw new Error('Illegal function name, "'+o+'" is a reserved keyword');var l=new Set;for(var c of s){var f=typeof c=="string"?c:c.name;if(l.has(f))throw new Error('Duplicate parameter name "'.concat(f,'"'));l.add(f)}this.name=o,this.params=s.map(function(m){return m&&m.name||m}),this.types=s.map(function(m){return m&&m.type||"any"}),this.expr=u}get type(){return fl}get isFunctionAssignmentNode(){return!0}_compile(o,s){var u=Object.create(s);Sx(this.params,function(p){u[p]=!0});var l=this.expr,c=l._compile(o,u),f=this.name,m=this.params,d=l0(this.types,","),h=f+"("+l0(this.params,", ")+")";return function(y,w,D){var v={};v[d]=function(){for(var g=Object.create(w),b=0;b<m.length;b++)g[m[b]]=arguments[b];return c(y,g,D)};var x=t(f,v);return x.syntax=h,x.expr=l.toString(),y.set(f,x),x}}forEach(o){o(this.expr,"expr",this)}map(o){var s=this._ifNode(o(this.expr,"expr",this));return new a(this.name,this.params.slice(0),s)}clone(){return new a(this.name,this.params.slice(0),this.expr)}_toString(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=this.expr.toString(o);return n(this,s,o&&o.implicit)&&(u="("+u+")"),this.name+"("+this.params.join(", ")+") = "+u}toJSON(){var o=this.types;return{mathjs:fl,name:this.name,params:this.params.map(function(s,u){return{name:s,type:o[u]}}),expr:this.expr}}static fromJSON(o){return new a(o.name,o.params,o.expr)}_toHTML(o){for(var s=o&&o.parenthesis?o.parenthesis:"keep",u=[],l=0;l<this.params.length;l++)u.push('<span class="math-symbol math-parameter">'+kn(this.params[l])+"</span>");var c=this.expr.toHTML(o);return n(this,s,o&&o.implicit)&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>'),'<span class="math-function">'+kn(this.name)+'</span><span class="math-parenthesis math-round-parenthesis">(</span>'+u.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-round-parenthesis">)</span><span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+c}_toTex(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=this.expr.toTex(o);return n(this,s,o&&o.implicit)&&(u="\\left(".concat(u,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(W2).join(",")+"\\right)="+u}}return sr(a,"name",fl),a},{isClass:!0,isNode:!0}),ml="IndexNode",QG=["Node","size"],XG=I(ml,QG,e=>{var{Node:t,size:r}=e;class n extends t{constructor(i,o){if(super(),this.dimensions=i,this.dotNotation=o||!1,!Array.isArray(i)||!i.every(Ct))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}get type(){return ml}get isIndexNode(){return!0}_compile(i,o){var s=ui(this.dimensions,function(l,c){var f=l.filter(h=>h.isSymbolNode&&h.name==="end").length>0;if(f){var m=Object.create(o);m.end=!0;var d=l._compile(i,m);return function(p,y,w){if(!Re(w)&&!Mt(w)&&!Yt(w))throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+Ft(w));var D=r(w),v=Object.create(y);return v.end=D[c],d(p,v,w)}}else return l._compile(i,o)}),u=Ur(i,"index");return function(c,f,m){var d=ui(s,function(h){return h(c,f,m)});return u(...d)}}forEach(i){for(var o=0;o<this.dimensions.length;o++)i(this.dimensions[o],"dimensions["+o+"]",this)}map(i){for(var o=[],s=0;s<this.dimensions.length;s++)o[s]=this._ifNode(i(this.dimensions[s],"dimensions["+s+"]",this));return new n(o,this.dotNotation)}clone(){return new n(this.dimensions.slice(0),this.dotNotation)}isObjectProperty(){return this.dimensions.length===1&&ct(this.dimensions[0])&&typeof this.dimensions[0].value=="string"}getObjectProperty(){return this.isObjectProperty()?this.dimensions[0].value:null}_toString(i){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"}toJSON(){return{mathjs:ml,dimensions:this.dimensions,dotNotation:this.dotNotation}}static fromJSON(i){return new n(i.dimensions,i.dotNotation)}_toHTML(i){for(var o=[],s=0;s<this.dimensions.length;s++)o[s]=this.dimensions[s].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+kn(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+o.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'}_toTex(i){var o=this.dimensions.map(function(s){return s.toTex(i)});return this.dotNotation?"."+this.getObjectProperty():"_{"+o.join(",")+"}"}}return sr(n,"name",ml),n},{isClass:!0,isNode:!0}),dl="ObjectNode",eV=["Node"],tV=I(dl,eV,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),this.properties=a||{},a&&(typeof a!="object"||!Object.keys(a).every(function(i){return Ct(a[i])})))throw new TypeError("Object containing Nodes expected")}get type(){return dl}get isObjectNode(){return!0}_compile(a,i){var o={};for(var s in this.properties)if(Fe(this.properties,s)){var u=zo(s),l=JSON.parse(u),c=Ur(this.properties,s);o[l]=c._compile(a,i)}return function(m,d,h){var p={};for(var y in o)Fe(o,y)&&(p[y]=o[y](m,d,h));return p}}forEach(a){for(var i in this.properties)Fe(this.properties,i)&&a(this.properties[i],"properties["+zo(i)+"]",this)}map(a){var i={};for(var o in this.properties)Fe(this.properties,o)&&(i[o]=this._ifNode(a(this.properties[o],"properties["+zo(o)+"]",this)));return new r(i)}clone(){var a={};for(var i in this.properties)Fe(this.properties,i)&&(a[i]=this.properties[i]);return new r(a)}_toString(a){var i=[];for(var o in this.properties)Fe(this.properties,o)&&i.push(zo(o)+": "+this.properties[o].toString(a));return"{"+i.join(", ")+"}"}toJSON(){return{mathjs:dl,properties:this.properties}}static fromJSON(a){return new r(a.properties)}_toHTML(a){var i=[];for(var o in this.properties)Fe(this.properties,o)&&i.push('<span class="math-symbol math-property">'+kn(o)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[o].toHTML(a));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+i.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'}_toTex(a){var i=[];for(var o in this.properties)Fe(this.properties,o)&&i.push("\\mathbf{"+o+":} & "+this.properties[o].toTex(a)+"\\\\");var s="\\left\\{\\begin{array}{ll}"+i.join(`
39
+ `)+"\\end{array}\\right\\}";return s}}return sr(r,"name",dl),r},{isClass:!0,isNode:!0});function Ms(e,t){return new Qw(e,new bc(t),new Set(Object.keys(t)))}var hl="OperatorNode",rV=["Node"],nV=I(hl,rV,e=>{var{Node:t}=e;function r(i,o){var s=i;if(o==="auto")for(;Ra(s);)s=s.content;return ct(s)?!0:Xt(s)?r(s.args[0],o):!1}function n(i,o,s,u,l){var c=Tt(i,o,s),f=Cs(i,o);if(o==="all"||u.length>2&&i.getIdentifier()!=="OperatorNode:add"&&i.getIdentifier()!=="OperatorNode:multiply")return u.map(function(E){switch(E.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});var m;switch(u.length){case 0:m=[];break;case 1:{var d=Tt(u[0],o,s,i);if(l&&d!==null){var h,p;if(o==="keep"?(h=u[0].getIdentifier(),p=i.getIdentifier()):(h=u[0].getContent().getIdentifier(),p=i.getContent().getIdentifier()),Wn[c][p].latexLeftParens===!1){m=[!1];break}if(Wn[d][h].latexParens===!1){m=[!1];break}}if(d===null){m=[!1];break}if(d<=c){m=[!0];break}m=[!1]}break;case 2:{var y,w=Tt(u[0],o,s,i),D=qf(i,u[0],o);w===null?y=!1:w===c&&f==="right"&&!D||w<c?y=!0:y=!1;var v,x=Tt(u[1],o,s,i),g=qf(i,u[1],o);if(x===null?v=!1:x===c&&f==="left"&&!g||x<c?v=!0:v=!1,l){var b,C,N;o==="keep"?(b=i.getIdentifier(),C=i.args[0].getIdentifier(),N=i.args[1].getIdentifier()):(b=i.getContent().getIdentifier(),C=i.args[0].getContent().getIdentifier(),N=i.args[1].getContent().getIdentifier()),w!==null&&(Wn[c][b].latexLeftParens===!1&&(y=!1),Wn[w][C].latexParens===!1&&(y=!1)),x!==null&&(Wn[c][b].latexRightParens===!1&&(v=!1),Wn[x][N].latexParens===!1&&(v=!1))}m=[y,v]}break;default:(i.getIdentifier()==="OperatorNode:add"||i.getIdentifier()==="OperatorNode:multiply")&&(m=u.map(function(E){var S=Tt(E,o,s,i),F=qf(i,E,o),k=Cs(E,o);return S===null?!1:c===S&&f===k&&!F?!0:S<c}));break}if(u.length>=2&&i.getIdentifier()==="OperatorNode:multiply"&&i.implicit&&o!=="all"&&s==="hide")for(var A=1;A<m.length;++A)r(u[A],o)&&!m[A-1]&&(o!=="keep"||!Ra(u[A-1]))&&(m[A]=!0);return m}class a extends t{constructor(o,s,u,l,c){if(super(),typeof o!="string")throw new TypeError('string expected for parameter "op"');if(typeof s!="string")throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(u)||!u.every(Ct))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=l===!0,this.isPercentage=c===!0,this.op=o,this.fn=s,this.args=u||[]}get type(){return hl}get isOperatorNode(){return!0}_compile(o,s){if(typeof this.fn!="string"||!wd(o,this.fn))throw o[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var u=Ur(o,this.fn),l=ui(this.args,function(h){return h._compile(o,s)});if(typeof u=="function"&&u.rawArgs===!0){var c=this.args;return function(p,y,w){return u(c,o,Ms(p,y))}}else if(l.length===1){var f=l[0];return function(p,y,w){return u(f(p,y,w))}}else if(l.length===2){var m=l[0],d=l[1];return function(p,y,w){return u(m(p,y,w),d(p,y,w))}}else return function(p,y,w){return u.apply(null,ui(l,function(D){return D(p,y,w)}))}}forEach(o){for(var s=0;s<this.args.length;s++)o(this.args[s],"args["+s+"]",this)}map(o){for(var s=[],u=0;u<this.args.length;u++)s[u]=this._ifNode(o(this.args[u],"args["+u+"]",this));return new a(this.op,this.fn,s,this.implicit,this.isPercentage)}clone(){return new a(this.op,this.fn,this.args.slice(0),this.implicit,this.isPercentage)}isUnary(){return this.args.length===1}isBinary(){return this.args.length===2}_toString(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",l=this.args,c=n(this,s,u,l,!1);if(l.length===1){var f=Cs(this,s),m=l[0].toString(o);c[0]&&(m="("+m+")");var d=/[a-zA-Z]+/.test(this.op);return f==="right"?this.op+(d?" ":"")+m:f==="left"?m+(d?" ":"")+this.op:m+this.op}else if(l.length===2){var h=l[0].toString(o),p=l[1].toString(o);return c[0]&&(h="("+h+")"),c[1]&&(p="("+p+")"),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?h+" "+p:h+" "+this.op+" "+p}else if(l.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var y=l.map(function(w,D){return w=w.toString(o),c[D]&&(w="("+w+")"),w});return this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?y.join(" "):y.join(" "+this.op+" ")}else return this.fn+"("+this.args.join(", ")+")"}toJSON(){return{mathjs:hl,op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}}static fromJSON(o){return new a(o.op,o.fn,o.args,o.implicit,o.isPercentage)}_toHTML(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",l=this.args,c=n(this,s,u,l,!1);if(l.length===1){var f=Cs(this,s),m=l[0].toHTML(o);return c[0]&&(m='<span class="math-parenthesis math-round-parenthesis">(</span>'+m+'<span class="math-parenthesis math-round-parenthesis">)</span>'),f==="right"?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+kn(this.op)+"</span>"+m:m+'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+kn(this.op)+"</span>"}else if(l.length===2){var d=l[0].toHTML(o),h=l[1].toHTML(o);return c[0]&&(d='<span class="math-parenthesis math-round-parenthesis">(</span>'+d+'<span class="math-parenthesis math-round-parenthesis">)</span>'),c[1]&&(h='<span class="math-parenthesis math-round-parenthesis">(</span>'+h+'<span class="math-parenthesis math-round-parenthesis">)</span>'),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?d+'<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'+h:d+'<span class="math-operator math-binary-operator math-explicit-binary-operator">'+kn(this.op)+"</span>"+h}else{var p=l.map(function(y,w){return y=y.toHTML(o),c[w]&&(y='<span class="math-parenthesis math-round-parenthesis">(</span>'+y+'<span class="math-parenthesis math-round-parenthesis">)</span>'),y});return l.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")?this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?p.join('<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'):p.join('<span class="math-operator math-binary-operator math-explicit-binary-operator">'+kn(this.op)+"</span>"):'<span class="math-function">'+kn(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+p.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}}_toTex(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",l=this.args,c=n(this,s,u,l,!0),f=ft[this.fn];if(f=typeof f>"u"?this.op:f,l.length===1){var m=Cs(this,s),d=l[0].toTex(o);return c[0]&&(d="\\left(".concat(d,"\\right)")),m==="right"?f+d:d+f}else if(l.length===2){var h=l[0],p=h.toTex(o);c[0]&&(p="\\left(".concat(p,"\\right)"));var y=l[1],w=y.toTex(o);c[1]&&(w="\\left(".concat(w,"\\right)"));var D;switch(s==="keep"?D=h.getIdentifier():D=h.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return f+"{"+p+"}{"+w+"}";case"OperatorNode:pow":switch(p="{"+p+"}",w="{"+w+"}",D){case"ConditionalNode":case"OperatorNode:divide":p="\\left(".concat(p,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&u==="hide")return p+"~"+w}return p+f+w}else if(l.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var v=l.map(function(x,g){return x=x.toTex(o),c[g]&&(x="\\left(".concat(x,"\\right)")),x});return this.getIdentifier()==="OperatorNode:multiply"&&this.implicit&&u==="hide"?v.join("~"):v.join(f)}else return"\\mathrm{"+this.fn+"}\\left("+l.map(function(x){return x.toTex(o)}).join(",")+"\\right)"}getIdentifier(){return this.type+":"+this.fn}}return sr(a,"name",hl),a},{isClass:!0,isNode:!0}),pl="ParenthesisNode",aV=["Node"],iV=I(pl,aV,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),!Ct(a))throw new TypeError('Node expected for parameter "content"');this.content=a}get type(){return pl}get isParenthesisNode(){return!0}_compile(a,i){return this.content._compile(a,i)}getContent(){return this.content.getContent()}forEach(a){a(this.content,"content",this)}map(a){var i=a(this.content,"content",this);return new r(i)}clone(){return new r(this.content)}_toString(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?"("+this.content.toString(a)+")":this.content.toString(a)}toJSON(){return{mathjs:pl,content:this.content}}static fromJSON(a){return new r(a.content)}_toHTML(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?'<span class="math-parenthesis math-round-parenthesis">(</span>'+this.content.toHTML(a)+'<span class="math-parenthesis math-round-parenthesis">)</span>':this.content.toHTML(a)}_toTex(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?"\\left(".concat(this.content.toTex(a),"\\right)"):this.content.toTex(a)}}return sr(r,"name",pl),r},{isClass:!0,isNode:!0}),gl="RangeNode",oV=["Node"],sV=I(gl,oV,e=>{var{Node:t}=e;function r(a,i,o){var s=Tt(a,i,o),u={},l=Tt(a.start,i,o);if(u.start=l!==null&&l<=s||i==="all",a.step){var c=Tt(a.step,i,o);u.step=c!==null&&c<=s||i==="all"}var f=Tt(a.end,i,o);return u.end=f!==null&&f<=s||i==="all",u}class n extends t{constructor(i,o,s){if(super(),!Ct(i))throw new TypeError("Node expected");if(!Ct(o))throw new TypeError("Node expected");if(s&&!Ct(s))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=i,this.end=o,this.step=s||null}get type(){return gl}get isRangeNode(){return!0}needsEnd(){var i=this.filter(function(o){return xr(o)&&o.name==="end"});return i.length>0}_compile(i,o){var s=i.range,u=this.start._compile(i,o),l=this.end._compile(i,o);if(this.step){var c=this.step._compile(i,o);return function(m,d,h){return s(u(m,d,h),l(m,d,h),c(m,d,h))}}else return function(m,d,h){return s(u(m,d,h),l(m,d,h))}}forEach(i){i(this.start,"start",this),i(this.end,"end",this),this.step&&i(this.step,"step",this)}map(i){return new n(this._ifNode(i(this.start,"start",this)),this._ifNode(i(this.end,"end",this)),this.step&&this._ifNode(i(this.step,"step",this)))}clone(){return new n(this.start,this.end,this.step&&this.step)}_toString(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=r(this,o,i&&i.implicit),u,l=this.start.toString(i);if(s.start&&(l="("+l+")"),u=l,this.step){var c=this.step.toString(i);s.step&&(c="("+c+")"),u+=":"+c}var f=this.end.toString(i);return s.end&&(f="("+f+")"),u+=":"+f,u}toJSON(){return{mathjs:gl,start:this.start,end:this.end,step:this.step}}static fromJSON(i){return new n(i.start,i.end,i.step)}_toHTML(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=r(this,o,i&&i.implicit),u,l=this.start.toHTML(i);if(s.start&&(l='<span class="math-parenthesis math-round-parenthesis">(</span>'+l+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u=l,this.step){var c=this.step.toHTML(i);s.step&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+='<span class="math-operator math-range-operator">:</span>'+c}var f=this.end.toHTML(i);return s.end&&(f='<span class="math-parenthesis math-round-parenthesis">(</span>'+f+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+='<span class="math-operator math-range-operator">:</span>'+f,u}_toTex(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=r(this,o,i&&i.implicit),u=this.start.toTex(i);if(s.start&&(u="\\left(".concat(u,"\\right)")),this.step){var l=this.step.toTex(i);s.step&&(l="\\left(".concat(l,"\\right)")),u+=":"+l}var c=this.end.toTex(i);return s.end&&(c="\\left(".concat(c,"\\right)")),u+=":"+c,u}}return sr(n,"name",gl),n},{isClass:!0,isNode:!0}),vl="RelationalNode",uV=["Node"],lV=I(vl,uV,e=>{var{Node:t}=e,r={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="};class n extends t{constructor(i,o){if(super(),!Array.isArray(i))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(o))throw new TypeError("Parameter params must be an array");if(i.length!==o.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=i,this.params=o}get type(){return vl}get isRelationalNode(){return!0}_compile(i,o){var s=this,u=this.params.map(l=>l._compile(i,o));return function(c,f,m){for(var d,h=u[0](c,f,m),p=0;p<s.conditionals.length;p++){d=h,h=u[p+1](c,f,m);var y=Ur(i,s.conditionals[p]);if(!y(d,h))return!1}return!0}}forEach(i){this.params.forEach((o,s)=>i(o,"params["+s+"]",this),this)}map(i){return new n(this.conditionals.slice(),this.params.map((o,s)=>this._ifNode(i(o,"params["+s+"]",this)),this))}clone(){return new n(this.conditionals,this.params)}_toString(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",s=Tt(this,o,i&&i.implicit),u=this.params.map(function(f,m){var d=Tt(f,o,i&&i.implicit);return o==="all"||d!==null&&d<=s?"("+f.toString(i)+")":f.toString(i)}),l=u[0],c=0;c<this.conditionals.length;c++)l+=" "+r[this.conditionals[c]],l+=" "+u[c+1];return l}toJSON(){return{mathjs:vl,conditionals:this.conditionals,params:this.params}}static fromJSON(i){return new n(i.conditionals,i.params)}_toHTML(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",s=Tt(this,o,i&&i.implicit),u=this.params.map(function(f,m){var d=Tt(f,o,i&&i.implicit);return o==="all"||d!==null&&d<=s?'<span class="math-parenthesis math-round-parenthesis">(</span>'+f.toHTML(i)+'<span class="math-parenthesis math-round-parenthesis">)</span>':f.toHTML(i)}),l=u[0],c=0;c<this.conditionals.length;c++)l+='<span class="math-operator math-binary-operator math-explicit-binary-operator">'+kn(r[this.conditionals[c]])+"</span>"+u[c+1];return l}_toTex(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",s=Tt(this,o,i&&i.implicit),u=this.params.map(function(f,m){var d=Tt(f,o,i&&i.implicit);return o==="all"||d!==null&&d<=s?"\\left("+f.toTex(i)+"\right)":f.toTex(i)}),l=u[0],c=0;c<this.conditionals.length;c++)l+=ft[this.conditionals[c]]+u[c+1];return l}}return sr(n,"name",vl),n},{isClass:!0,isNode:!0}),cV="SymbolNode",fV=["math","?Unit","Node"],mV=I(cV,fV,e=>{var{math:t,Unit:r,Node:n}=e;function a(o){return r?r.isValuelessUnit(o):!1}class i extends n{constructor(s){if(super(),typeof s!="string")throw new TypeError('String expected for parameter "name"');this.name=s}get type(){return"SymbolNode"}get isSymbolNode(){return!0}_compile(s,u){var l=this.name;if(u[l]===!0)return function(f,m,d){return Ur(m,l)};if(l in s)return function(f,m,d){return f.has(l)?f.get(l):Ur(s,l)};var c=a(l);return function(f,m,d){return f.has(l)?f.get(l):c?new r(null,l):i.onUndefinedSymbol(l)}}forEach(s){}map(s){return this.clone()}static onUndefinedSymbol(s){throw new Error("Undefined symbol "+s)}clone(){return new i(this.name)}_toString(s){return this.name}_toHTML(s){var u=kn(this.name);return u==="true"||u==="false"?'<span class="math-symbol math-boolean">'+u+"</span>":u==="i"?'<span class="math-symbol math-imaginary-symbol">'+u+"</span>":u==="Infinity"?'<span class="math-symbol math-infinity-symbol">'+u+"</span>":u==="NaN"?'<span class="math-symbol math-nan-symbol">'+u+"</span>":u==="null"?'<span class="math-symbol math-null-symbol">'+u+"</span>":u==="undefined"?'<span class="math-symbol math-undefined-symbol">'+u+"</span>":'<span class="math-symbol">'+u+"</span>"}toJSON(){return{mathjs:"SymbolNode",name:this.name}}static fromJSON(s){return new i(s.name)}_toTex(s){var u=!1;typeof t[this.name]>"u"&&a(this.name)&&(u=!0);var l=W2(this.name,u);return l[0]==="\\"?l:" "+l}}return i},{isClass:!0,isNode:!0}),yl="FunctionNode",dV=["math","Node","SymbolNode"],hV=I(yl,dV,e=>{var t,{math:r,Node:n,SymbolNode:a}=e,i=u=>at(u,{truncate:78});function o(u,l,c){for(var f="",m=/\$(?:\{([a-z_][a-z_0-9]*)(?:\[([0-9]+)\])?\}|\$)/gi,d=0,h;(h=m.exec(u))!==null;)if(f+=u.substring(d,h.index),d=h.index,h[0]==="$$")f+="$",d++;else{d+=h[0].length;var p=l[h[1]];if(!p)throw new ReferenceError("Template: Property "+h[1]+" does not exist.");if(h[2]===void 0)switch(typeof p){case"string":f+=p;break;case"object":if(Ct(p))f+=p.toTex(c);else if(Array.isArray(p))f+=p.map(function(y,w){if(Ct(y))return y.toTex(c);throw new TypeError("Template: "+h[1]+"["+w+"] is not a Node.")}).join(",");else throw new TypeError("Template: "+h[1]+" has to be a Node, String or array of Nodes");break;default:throw new TypeError("Template: "+h[1]+" has to be a Node, String or array of Nodes")}else if(Ct(p[h[2]]&&p[h[2]]))f+=p[h[2]].toTex(c);else throw new TypeError("Template: "+h[1]+"["+h[2]+"] is not a Node.")}return f+=u.slice(d),f}class s extends n{constructor(l,c,f){if(super(),typeof l=="string"&&(l=new a(l)),!Ct(l))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(c)||!c.every(Ct))throw new TypeError('Array containing Nodes expected for parameter "args"');var m=typeof f;if(!(m==="undefined"||m==="boolean"))throw new TypeError("optional flag, if specified, must be boolean");this.fn=l,this.args=c||[],this.optional=!!f}get name(){return this.fn.name||""}get type(){return yl}get isFunctionNode(){return!0}_compile(l,c){var f=this.args.map(A=>A._compile(l,c)),m=this.optional||qa(this.fn)&&this.fn.optionalChaining;if(xr(this.fn)){var d=this.fn.name;if(c[d]){var D=this.args;return function(E,S,F){var k=Ur(S,d);if(!(m&&k===void 0)){if(typeof k!="function")throw new TypeError("Argument '".concat(d,"' was not a function; received: ").concat(i(k)));if(k.rawArgs)return k(D,l,Ms(E,S));var B=f.map(L=>L(E,S,F));return k.apply(k,B)}}}else{var h=d in l?Ur(l,d):void 0,p=typeof h=="function"&&h.rawArgs===!0,y=A=>{var E;if(A.has(d))E=A.get(d);else if(d in l)E=Ur(l,d);else if(m)E=void 0;else return s.onUndefinedFunction(d);if(typeof E=="function"||m&&E===void 0)return E;throw new TypeError("'".concat(d,`' is not a function; its value is:
40
+ `).concat(i(E)))};if(p){var w=this.args;return function(E,S,F){var k=y(E);if(k.rawArgs===!0)return k(w,l,Ms(E,S));var B=f.map(L=>L(E,S,F));return k(...B)}}else switch(f.length){case 0:return function(E,S,F){var k=y(E);if(!(m&&k===void 0))return k()};case 1:return function(E,S,F){var k=y(E);if(!(m&&k===void 0)){var B=f[0];return k(B(E,S,F))}};case 2:return function(E,S,F){var k=y(E);if(!(m&&k===void 0)){var B=f[0],L=f[1];return k(B(E,S,F),L(E,S,F))}};default:return function(E,S,F){var k=y(E);if(!(m&&k===void 0)){var B=f.map(L=>L(E,S,F));return k(...B)}}}}}else if(qa(this.fn)&&ts(this.fn.index)&&this.fn.index.isObjectProperty()){var v=this.fn.object._compile(l,c),x=this.fn.index.getObjectProperty(),g=this.args;return function(E,S,F){var k=v(E,S,F);if(!(m&&(k==null||k[x]===void 0))){var B=$6(k,x);if(B!=null&&B.rawArgs)return B(g,l,Ms(E,S));var L=f.map(M=>M(E,S,F));return B.apply(k,L)}}}else{var b=this.fn.toString(),C=this.fn._compile(l,c),N=this.args;return function(E,S,F){var k=C(E,S,F);if(!(m&&k===void 0)){if(typeof k!="function")throw new TypeError("Expression '".concat(b,"' did not evaluate to a function; value is:")+`
41
+ `.concat(i(k)));if(k.rawArgs)return k(N,l,Ms(E,S));var B=f.map(L=>L(E,S,F));return k.apply(k,B)}}}}forEach(l){l(this.fn,"fn",this);for(var c=0;c<this.args.length;c++)l(this.args[c],"args["+c+"]",this)}map(l){for(var c=this._ifNode(l(this.fn,"fn",this)),f=[],m=0;m<this.args.length;m++)f[m]=this._ifNode(l(this.args[m],"args["+m+"]",this));return new s(c,f)}clone(){return new s(this.fn,this.args.slice(0))}toString(l){var c,f=this.fn.toString(l);return l&&typeof l.handler=="object"&&Fe(l.handler,f)&&(c=l.handler[f](this,l)),typeof c<"u"?c:super.toString(l)}_toString(l){var c=this.args.map(function(m){return m.toString(l)}),f=nu(this.fn)?"("+this.fn.toString(l)+")":this.fn.toString(l);return f+"("+c.join(", ")+")"}toJSON(){return{mathjs:yl,fn:this.fn,args:this.args}}_toHTML(l){var c=this.args.map(function(f){return f.toHTML(l)});return'<span class="math-function">'+kn(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+c.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}toTex(l){var c;return l&&typeof l.handler=="object"&&Fe(l.handler,this.name)&&(c=l.handler[this.name](this,l)),typeof c<"u"?c:super.toTex(l)}_toTex(l){var c=this.args.map(function(d){return d.toTex(l)}),f;dy[this.name]&&(f=dy[this.name]),r[this.name]&&(typeof r[this.name].toTex=="function"||typeof r[this.name].toTex=="object"||typeof r[this.name].toTex=="string")&&(f=r[this.name].toTex);var m;switch(typeof f){case"function":m=f(this,l);break;case"string":m=o(f,this,l);break;case"object":switch(typeof f[c.length]){case"function":m=f[c.length](this,l);break;case"string":m=o(f[c.length],this,l);break}}return typeof m<"u"?m:o(WG,this,l)}getIdentifier(){return this.type+":"+this.name}}return t=s,sr(s,"name",yl),sr(s,"onUndefinedFunction",function(u){throw new Error("Undefined function "+u)}),sr(s,"fromJSON",function(u){return new t(u.fn,u.args)}),s},{isClass:!0,isNode:!0}),py="parse",pV=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],gV=I(py,pV,e=>{var{typed:t,numeric:r,config:n,AccessorNode:a,ArrayNode:i,AssignmentNode:o,BlockNode:s,ConditionalNode:u,ConstantNode:l,FunctionAssignmentNode:c,FunctionNode:f,IndexNode:m,ObjectNode:d,OperatorNode:h,ParenthesisNode:p,RangeNode:y,RelationalNode:w,SymbolNode:D}=e,v=t(py,{string:function(J){return te(J,{})},"Array | Matrix":function(J){return x(J,{})},"string, Object":function(J,le){var ve=le.nodes!==void 0?le.nodes:{};return te(J,ve)},"Array | Matrix, Object":x});function x(T){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=J.nodes!==void 0?J.nodes:{};return Qe(T,function(ve){if(typeof ve!="string")throw new TypeError("String expected");return te(ve,le)})}var g={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},b={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"?.":!0,"??":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},C={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},N={true:!0,false:!1,null:null,undefined:void 0},A=["NaN","Infinity"],E={'"':'"',"'":"'","\\":"\\","/":"/",b:"\b",f:"\f",n:`
42
+ `,r:"\r",t:" "};function S(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:g.NULL,nestingLevel:0,conditionalLevel:null}}function F(T,J){return T.expression.substr(T.index,J)}function k(T){return F(T,1)}function B(T){T.index++}function L(T){return T.expression.charAt(T.index-1)}function M(T){return T.expression.charAt(T.index+1)}function $(T){for(T.tokenType=g.NULL,T.token="",T.comment="";;){if(k(T)==="#")for(;k(T)!==`
43
+ `&&k(T)!=="";)T.comment+=k(T),B(T);if(v.isWhitespace(k(T),T.nestingLevel))B(T);else break}if(k(T)===""){T.tokenType=g.DELIMITER;return}if(k(T)===`
44
+ `&&!T.nestingLevel){T.tokenType=g.DELIMITER,T.token=k(T),B(T);return}var J=k(T),le=F(T,2),ve=F(T,3);if(ve.length===3&&b[ve]){T.tokenType=g.DELIMITER,T.token=ve,B(T),B(T),B(T);return}if(le.length===2&&b[le]&&(le!=="?."||!v.isDigit(T.expression.charAt(T.index+2)))){T.tokenType=g.DELIMITER,T.token=le,B(T),B(T);return}if(b[J]){T.tokenType=g.DELIMITER,T.token=J,B(T);return}if(v.isDigitDot(J)){T.tokenType=g.NUMBER;var qe=F(T,2);if(qe==="0b"||qe==="0o"||qe==="0x"){for(T.token+=k(T),B(T),T.token+=k(T),B(T);v.isAlpha(k(T),L(T),M(T))||v.isDigit(k(T));)T.token+=k(T),B(T);if(k(T)===".")for(T.token+=".",B(T);v.isAlpha(k(T),L(T),M(T))||v.isDigit(k(T));)T.token+=k(T),B(T);else if(k(T)==="i")for(T.token+="i",B(T);v.isDigit(k(T));)T.token+=k(T),B(T);return}if(k(T)==="."){if(T.token+=k(T),B(T),!v.isDigit(k(T))){T.tokenType=g.DELIMITER;return}}else{for(;v.isDigit(k(T));)T.token+=k(T),B(T);v.isDecimalMark(k(T),M(T))&&(T.token+=k(T),B(T))}for(;v.isDigit(k(T));)T.token+=k(T),B(T);if(k(T)==="E"||k(T)==="e"){if(v.isDigit(M(T))||M(T)==="-"||M(T)==="+"){if(T.token+=k(T),B(T),(k(T)==="+"||k(T)==="-")&&(T.token+=k(T),B(T)),!v.isDigit(k(T)))throw rt(T,'Digit expected, got "'+k(T)+'"');for(;v.isDigit(k(T));)T.token+=k(T),B(T);if(v.isDecimalMark(k(T),M(T)))throw rt(T,'Digit expected, got "'+k(T)+'"')}else if(v.isDecimalMark(M(T),T.expression.charAt(T.index+2)))throw B(T),rt(T,'Digit expected, got "'+k(T)+'"')}return}if(v.isAlpha(k(T),L(T),M(T))){for(;v.isAlpha(k(T),L(T),M(T))||v.isDigit(k(T));)T.token+=k(T),B(T);Fe(C,T.token)?T.tokenType=g.DELIMITER:T.tokenType=g.SYMBOL;return}for(T.tokenType=g.UNKNOWN;k(T)!=="";)T.token+=k(T),B(T);throw rt(T,'Syntax error in part "'+T.token+'"')}function H(T){do $(T);while(T.token===`
45
+ `)}function j(T){T.nestingLevel++}function Y(T){T.nestingLevel--}v.isAlpha=function(J,le,ve){return v.isValidLatinOrGreek(J)||v.isValidMathSymbol(J,ve)||v.isValidMathSymbol(le,J)},v.isValidLatinOrGreek=function(J){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(J)},v.isValidMathSymbol=function(J,le){return/^[\uD835]$/.test(J)&&/^[\uDC00-\uDFFF]$/.test(le)&&/^[^\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]$/.test(le)},v.isWhitespace=function(J,le){return J===" "||J===" "||J===" "||J===`
46
+ `&&le>0},v.isDecimalMark=function(J,le){return J==="."&&le!=="/"&&le!=="*"&&le!=="^"},v.isDigitDot=function(J){return J>="0"&&J<="9"||J==="."},v.isDigit=function(J){return J>="0"&&J<="9"};function te(T,J){var le=S();er(le,{expression:T,extraNodes:J}),$(le);var ve=K(le);if(le.token!=="")throw le.tokenType===g.DELIMITER?Lt(le,"Unexpected operator "+le.token):rt(le,'Unexpected part "'+le.token+'"');return ve}function K(T){var J,le=[],ve;for(T.token!==""&&T.token!==`
47
+ `&&T.token!==";"&&(J=P(T),T.comment&&(J.comment=T.comment));T.token===`
48
+ `||T.token===";";)le.length===0&&J&&(ve=T.token!==";",le.push({node:J,visible:ve})),$(T),T.token!==`
49
+ `&&T.token!==";"&&T.token!==""&&(J=P(T),T.comment&&(J.comment=T.comment),ve=T.token!==";",le.push({node:J,visible:ve}));return le.length>0?new s(le):(J||(J=new l(void 0),T.comment&&(J.comment=T.comment)),J)}function P(T){var J,le,ve,qe,Ye=X(T);if(T.token==="="){if(xr(Ye))return J=Ye.name,H(T),ve=P(T),new o(new D(J),ve);if(qa(Ye)){if(Ye.optionalChaining)throw rt(T,"Cannot assign to optional chain");return H(T),ve=P(T),new o(Ye.object,Ye.index,ve)}else if(mi(Ye)&&xr(Ye.fn)&&(qe=!0,le=[],J=Ye.name,Ye.args.forEach(function(Rr,mo){xr(Rr)?le[mo]=Rr.name:qe=!1}),qe))return H(T),ve=P(T),new c(J,le,ve);throw rt(T,"Invalid left hand side of assignment operator =")}return Ye}function X(T){for(var J=z(T);T.token==="?";){var le=T.conditionalLevel;T.conditionalLevel=T.nestingLevel,H(T);var ve=J,qe=P(T);if(T.token!==":")throw rt(T,"False part of conditional expression expected");T.conditionalLevel=null,H(T);var Ye=P(T);J=new u(ve,qe,Ye),T.conditionalLevel=le}return J}function z(T){for(var J=ie(T);T.token==="or";)H(T),J=new h("or","or",[J,ie(T)]);return J}function ie(T){for(var J=se(T);T.token==="xor";)H(T),J=new h("xor","xor",[J,se(T)]);return J}function se(T){for(var J=V(T);T.token==="and";)H(T),J=new h("and","and",[J,V(T)]);return J}function V(T){for(var J=_(T);T.token==="|";)H(T),J=new h("|","bitOr",[J,_(T)]);return J}function _(T){for(var J=W(T);T.token==="^|";)H(T),J=new h("^|","bitXor",[J,W(T)]);return J}function W(T){for(var J=ne(T);T.token==="&";)H(T),J=new h("&","bitAnd",[J,ne(T)]);return J}function ne(T){for(var J=[Q(T)],le=[],ve={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};Fe(ve,T.token);){var qe={name:T.token,fn:ve[T.token]};le.push(qe),H(T),J.push(Q(T))}return J.length===1?J[0]:J.length===2?new h(le[0].name,le[0].fn,J):new w(le.map(Ye=>Ye.fn),J)}function Q(T){var J,le,ve,qe;J=ue(T);for(var Ye={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};Fe(Ye,T.token);)le=T.token,ve=Ye[le],H(T),qe=[J,ue(T)],J=new h(le,ve,qe);return J}function ue(T){var J,le,ve,qe;J=oe(T);for(var Ye={to:"to",in:"to"};Fe(Ye,T.token);)le=T.token,ve=Ye[le],H(T),le==="in"&&"])},;".includes(T.token)?J=new h("*","multiply",[J,new D("in")],!0):(qe=[J,oe(T)],J=new h(le,ve,qe));return J}function oe(T){var J,le=[];if(T.token===":"?J=new l(1):J=be(T),T.token===":"&&T.conditionalLevel!==T.nestingLevel){for(le.push(J);T.token===":"&&le.length<3;)H(T),T.token===")"||T.token==="]"||T.token===","||T.token===""?le.push(new D("end")):le.push(be(T));le.length===3?J=new y(le[0],le[2],le[1]):J=new y(le[0],le[1])}return J}function be(T){var J,le,ve,qe;J=Me(T);for(var Ye={"+":"add","-":"subtract"};Fe(Ye,T.token);){le=T.token,ve=Ye[le],H(T);var Rr=Me(T);Rr.isPercentage?qe=[J,new h("*","multiply",[J,Rr])]:qe=[J,Rr],J=new h(le,ve,qe)}return J}function Me(T){var J,le,ve,qe;J=Pe(T),le=J;for(var Ye={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide","%":"mod",mod:"mod"};Fe(Ye,T.token);)ve=T.token,qe=Ye[ve],H(T),le=Pe(T),J=new h(ve,qe,[J,le]);return J}function Pe(T){var J,le;for(J=Ee(T),le=J;T.tokenType===g.SYMBOL||T.token==="in"&&ct(J)||T.token==="in"&&Xt(J)&&J.fn==="unaryMinus"&&ct(J.args[0])||T.tokenType===g.NUMBER&&!ct(le)&&(!Xt(le)||le.op==="!")||T.token==="(";)le=Ee(T),J=new h("*","multiply",[J,le],!0);return J}function Ee(T){for(var J=Oe(T),le=J,ve=[];T.token==="/"&&Om(le);)if(ve.push(er({},T)),H(T),T.tokenType===g.NUMBER)if(ve.push(er({},T)),H(T),T.tokenType===g.SYMBOL||T.token==="("||T.token==="in")er(T,ve.pop()),ve.pop(),le=Oe(T),J=new h("/","divide",[J,le]);else{ve.pop(),er(T,ve.pop());break}else{er(T,ve.pop());break}return J}function Oe(T){var J=Ie(T);if(T.token==="%"){var le=er({},T);H(T);try{Ie(T),er(T,le)}catch{J=new h("/","divide",[J,new l(100)],!1,!0)}}return J}function Ie(T){var J,le,ve,qe={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Fe(qe,T.token)?(ve=qe[T.token],J=T.token,H(T),le=[Ie(T)],new h(J,ve,le)):R(T)}function R(T){var J,le,ve,qe;return J=Z(T),(T.token==="^"||T.token===".^")&&(le=T.token,ve=le==="^"?"pow":"dotPow",H(T),qe=[J,Ie(T)],J=new h(le,ve,qe)),J}function Z(T){for(var J=O(T);T.token==="??";)H(T),J=new h("??","nullish",[J,O(T)]);return J}function O(T){var J,le,ve,qe;J=q(T);for(var Ye={"!":"factorial","'":"ctranspose"};Fe(Ye,T.token);)le=T.token,ve=Ye[le],$(T),qe=[J],J=new h(le,ve,qe),J=ee(T,J);return J}function q(T){var J=[];if(T.tokenType===g.SYMBOL&&Fe(T.extraNodes,T.token)){var le=T.extraNodes[T.token];if($(T),T.token==="("){if(J=[],j(T),$(T),T.token!==")")for(J.push(P(T));T.token===",";)$(T),J.push(P(T));if(T.token!==")")throw rt(T,"Parenthesis ) expected");Y(T),$(T)}return new le(J)}return U(T)}function U(T){var J,le;return T.tokenType===g.SYMBOL||T.tokenType===g.DELIMITER&&T.token in C?(le=T.token,$(T),Fe(N,le)?J=new l(N[le]):A.includes(le)?J=new l(r(le,"number")):J=new D(le),J=ee(T,J),J):re(T)}function ee(T,J,le){for(var ve;;){var qe=!1;T.token==="?."&&(qe=!0,$(T));var Ye=(T.token==="("||T.token==="["||T.token===".")&&!0;if(!(qe||Ye))break;if(ve=[],T.token==="(")if(qe||xr(J)||qa(J)){if(j(T),$(T),T.token!==")")for(ve.push(P(T));T.token===",";)$(T),ve.push(P(T));if(T.token!==")")throw rt(T,"Parenthesis ) expected");Y(T),$(T),J=new f(J,ve,qe)}else return J;else if(T.token==="["){if(j(T),$(T),T.token!=="]")for(ve.push(P(T));T.token===",";)$(T),ve.push(P(T));if(T.token!=="]")throw rt(T,"Parenthesis ] expected");Y(T),$(T),J=new a(J,new m(ve),qe)}else{qe||$(T);var Rr=T.tokenType===g.SYMBOL||T.tokenType===g.DELIMITER&&T.token in C;if(!Rr){var mo="Property name expected after ";throw mo+=qe?"optional chain":"dot",rt(T,mo)}ve.push(new l(T.token)),$(T);var Lc=!0;J=new a(J,new m(ve,Lc),qe)}}return J}function re(T){var J,le;return T.token==='"'||T.token==="'"?(le=ae(T,T.token),J=new l(le),J=ee(T,J),J):ye(T)}function ae(T,J){for(var le="";k(T)!==""&&k(T)!==J;)if(k(T)==="\\"){B(T);var ve=k(T),qe=E[ve];if(qe!==void 0)le+=qe,T.index+=1;else if(ve==="u"){var Ye=T.expression.slice(T.index+1,T.index+5);if(/^[0-9A-Fa-f]{4}$/.test(Ye))le+=String.fromCharCode(parseInt(Ye,16)),T.index+=5;else throw rt(T,"Invalid unicode character \\u".concat(Ye))}else throw rt(T,"Bad escape character \\".concat(ve))}else le+=k(T),B(T);if($(T),T.token!==J)throw rt(T,"End of string ".concat(J," expected"));return $(T),le}function ye(T){var J,le,ve,qe;if(T.token==="["){if(j(T),$(T),T.token!=="]"){var Ye=me(T);if(T.token===";"){for(ve=1,le=[Ye];T.token===";";)$(T),T.token!=="]"&&(le[ve]=me(T),ve++);if(T.token!=="]")throw rt(T,"End of matrix ] expected");Y(T),$(T),qe=le[0].items.length;for(var Rr=1;Rr<ve;Rr++)if(le[Rr].items.length!==qe)throw Lt(T,"Column dimensions mismatch ("+le[Rr].items.length+" !== "+qe+")");J=new i(le)}else{if(T.token!=="]")throw rt(T,"End of matrix ] expected");Y(T),$(T),J=Ye}}else Y(T),$(T),J=new i([]);return ee(T,J)}return Ne(T)}function me(T){for(var J=[P(T)],le=1;T.token===",";)$(T),T.token!=="]"&&T.token!==";"&&(J[le]=P(T),le++);return new i(J)}function Ne(T){if(T.token==="{"){j(T);var J,le={};do if($(T),T.token!=="}"){if(T.token==='"'||T.token==="'")J=ae(T,T.token);else if(T.tokenType===g.SYMBOL||T.tokenType===g.DELIMITER&&T.token in C)J=T.token,$(T);else throw rt(T,"Symbol or string expected as object key");if(T.token!==":")throw rt(T,"Colon : expected after object key");$(T),le[J]=P(T)}while(T.token===",");if(T.token!=="}")throw rt(T,"Comma , or bracket } expected after object value");Y(T),$(T);var ve=new d(le);return ve=ee(T,ve),ve}return he(T)}function he(T){var J;if(T.tokenType===g.NUMBER){J=T.token,$(T);var le=vi(J,n),ve=r(J,le);return new l(ve)}return ut(T)}function ut(T){var J;if(T.token==="("){if(j(T),$(T),J=P(T),T.token!==")")throw rt(T,"Parenthesis ) expected");return Y(T),$(T),J=new p(J),J=ee(T,J),J}return ht(T)}function ht(T){throw T.token===""?rt(T,"Unexpected end of expression"):rt(T,"Value expected")}function yt(T){return T.index-T.token.length+1}function rt(T,J){var le=yt(T),ve=new SyntaxError(J+" (char "+le+")");return ve.char=le,ve}function Lt(T,J){var le=yt(T),ve=new SyntaxError(J+" (char "+le+")");return ve.char=le,ve}return t.addConversion({from:"string",to:"Node",convert:v}),v}),gy="compile",vV=["typed","parse"],yV=I(gy,vV,e=>{var{typed:t,parse:r}=e;return t(gy,{string:function(a){return r(a).compile()},"Array | Matrix":function(a){return Qe(a,function(i){return r(i).compile()})}})}),vy="evaluate",bV=["typed","parse"],wV=I(vy,bV,e=>{var{typed:t,parse:r}=e;return t(vy,{string:function(a){var i=Hs();return r(a).compile().evaluate(i)},"string, Map | Object":function(a,i){return r(a).compile().evaluate(i)},"Array | Matrix":function(a){var i=Hs();return Qe(a,function(o){return r(o).compile().evaluate(i)})},"Array | Matrix, Map | Object":function(a,i){return Qe(a,function(o){return r(o).compile().evaluate(i)})}})}),xV="Parser",DV=["evaluate","parse"],NV=I(xV,DV,e=>{var{evaluate:t,parse:r}=e;function n(){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");Object.defineProperty(this,"scope",{value:Hs(),writable:!1})}n.prototype.type="Parser",n.prototype.isParser=!0,n.prototype.evaluate=function(i){return t(i,this.scope)},n.prototype.get=function(i){if(this.scope.has(i))return this.scope.get(i)},n.prototype.getAll=function(){return j6(this.scope)},n.prototype.getAllAsMap=function(){return this.scope};function a(i){if(i.length===0)return!1;for(var o=0;o<i.length;o++){var s=i.charAt(o-1),u=i.charAt(o),l=i.charAt(o+1),c=r.isAlpha(u,s,l)||o>0&&r.isDigit(u);if(!c)return!1}return!0}return n.prototype.set=function(i,o){if(!a(i))throw new Error("Invalid variable name: '".concat(i,"'. Variable names must follow the specified rules."));return this.scope.set(i,o),o},n.prototype.remove=function(i){this.scope.delete(i)},n.prototype.clear=function(){this.scope.clear()},n.prototype.toJSON=function(){var i={mathjs:"Parser",variables:{},functions:{}};for(var[o,s]of this.scope)if(tx(s)){if(!AV(s))throw new Error("Cannot serialize external function ".concat(o));i.functions[o]="".concat(s.syntax," = ").concat(s.expr)}else i.variables[o]=s;return i},n.fromJSON=function(i){var o=new n;return Object.entries(i.variables).forEach(s=>{var[u,l]=s;return o.set(u,l)}),Object.entries(i.functions).forEach(s=>{var[u,l]=s;return o.evaluate(l)}),o},n},{isClass:!0});function AV(e){return typeof e=="function"&&typeof e.syntax=="string"&&typeof e.expr=="string"}var yy="parser",CV=["typed","Parser"],EV=I(yy,CV,e=>{var{typed:t,Parser:r}=e;return t(yy,{"":function(){return new r}})}),by="lup",SV=["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtractScalar","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],MV=I(by,SV,e=>{var{typed:t,matrix:r,abs:n,addScalar:a,divideScalar:i,multiplyScalar:o,subtractScalar:s,larger:u,equalScalar:l,unaryMinus:c,DenseMatrix:f,SparseMatrix:m,Spa:d}=e;return t(by,{DenseMatrix:function(w){return h(w)},SparseMatrix:function(w){return p(w)},Array:function(w){var D=r(w),v=h(D);return{L:v.L.valueOf(),U:v.U.valueOf(),p:v.p}}});function h(y){var w=y._size[0],D=y._size[1],v=Math.min(w,D),x=Ve(y._data),g=[],b=[w,v],C=[],N=[v,D],A,E,S,F=[];for(A=0;A<w;A++)F[A]=A;for(E=0;E<D;E++){if(E>0)for(A=0;A<w;A++){var k=Math.min(A,E),B=0;for(S=0;S<k;S++)B=a(B,o(x[A][S],x[S][E]));x[A][E]=s(x[A][E],B)}var L=E,M=0,$=0;for(A=E;A<w;A++){var H=x[A][E],j=n(H);u(j,M)&&(L=A,M=j,$=H)}if(E!==L&&(F[E]=[F[L],F[L]=F[E]][0],f._swapRows(E,L,x)),E<w)for(A=E+1;A<w;A++){var Y=x[A][E];l(Y,0)||(x[A][E]=i(x[A][E],$))}}for(E=0;E<D;E++)for(A=0;A<w;A++){if(E===0&&(A<D&&(C[A]=[]),g[A]=[]),A<E){A<D&&(C[A][E]=x[A][E]),E<w&&(g[A][E]=0);continue}if(A===E){A<D&&(C[A][E]=x[A][E]),E<w&&(g[A][E]=1);continue}A<D&&(C[A][E]=0),E<w&&(g[A][E]=x[A][E])}var te=new f({data:g,size:b}),K=new f({data:C,size:N}),P=[];for(A=0,v=F.length;A<v;A++)P[F[A]]=A;return{L:te,U:K,p:P,toString:function(){return"L: "+this.L.toString()+`
50
+ U: `+this.U.toString()+`
51
+ P: `+this.p}}}function p(y){var w=y._size[0],D=y._size[1],v=Math.min(w,D),x=y._values,g=y._index,b=y._ptr,C=[],N=[],A=[],E=[w,v],S=[],F=[],k=[],B=[v,D],L,M,$,H=[],j=[];for(L=0;L<w;L++)H[L]=L,j[L]=L;var Y=function(P,X){var z=j[P],ie=j[X];H[z]=X,H[ie]=P,j[P]=ie,j[X]=z},te=function(){var P=new d;M<w&&(A.push(C.length),C.push(1),N.push(M)),k.push(S.length);var X=b[M],z=b[M+1];for($=X;$<z;$++)L=g[$],P.set(H[L],x[$]);M>0&&P.forEach(0,M-1,function(_,W){m._forEachRow(_,C,N,A,function(ne,Q){ne>_&&P.accumulate(ne,c(o(Q,W)))})});var ie=M,se=P.get(M),V=n(se);P.forEach(M+1,w-1,function(_,W){var ne=n(W);u(ne,V)&&(ie=_,V=ne,se=W)}),M!==ie&&(m._swapRows(M,ie,E[1],C,N,A),m._swapRows(M,ie,B[1],S,F,k),P.swap(M,ie),Y(M,ie)),P.forEach(0,w-1,function(_,W){_<=M?(S.push(W),F.push(_)):(W=i(W,se),l(W,0)||(C.push(W),N.push(_)))})};for(M=0;M<D;M++)te();return k.push(S.length),A.push(C.length),{L:new m({values:C,index:N,ptr:A,size:E}),U:new m({values:S,index:F,ptr:k,size:B}),p:H,toString:function(){return"L: "+this.L.toString()+`
52
+ U: `+this.U.toString()+`
53
+ P: `+this.p}}}}),wy="qr",TV=["typed","matrix","zeros","identity","isZero","equal","sign","sqrt","conj","unaryMinus","addScalar","divideScalar","multiplyScalar","subtractScalar","complex"],FV=I(wy,TV,e=>{var{typed:t,matrix:r,zeros:n,identity:a,isZero:i,equal:o,sign:s,sqrt:u,conj:l,unaryMinus:c,addScalar:f,divideScalar:m,multiplyScalar:d,subtractScalar:h,complex:p}=e;return er(t(wy,{DenseMatrix:function(x){return w(x)},SparseMatrix:function(x){return D()},Array:function(x){var g=r(x),b=w(g);return{Q:b.Q.valueOf(),R:b.R.valueOf()}}}),{_denseQRimpl:y});function y(v){var x=v._size[0],g=v._size[1],b=a([x],"dense"),C=b._data,N=v.clone(),A=N._data,E,S,F,k=n([x],"");for(F=0;F<Math.min(g,x);++F){var B=A[F][F],L=c(o(B,0)?1:s(B)),M=l(L),$=0;for(E=F;E<x;E++)$=f($,d(A[E][F],l(A[E][F])));var H=d(L,u($));if(!i(H)){var j=h(B,H);for(k[F]=1,E=F+1;E<x;E++)k[E]=m(A[E][F],j);var Y=c(l(m(j,H))),te=void 0;for(S=F;S<g;S++){for(te=0,E=F;E<x;E++)te=f(te,d(l(k[E]),A[E][S]));for(te=d(te,Y),E=F;E<x;E++)A[E][S]=d(h(A[E][S],d(k[E],te)),M)}for(E=0;E<x;E++){for(te=0,S=F;S<x;S++)te=f(te,d(C[E][S],k[S]));for(te=d(te,Y),S=F;S<x;++S)C[E][S]=m(h(C[E][S],d(te,l(k[S]))),M)}}}return{Q:b,R:N,toString:function(){return"Q: "+this.Q.toString()+`
54
+ R: `+this.R.toString()}}}function w(v){var x=y(v),g=x.R._data;if(v._data.length>0)for(var b=g[0][0].type==="Complex"?p(0):0,C=0;C<g.length;++C)for(var N=0;N<C&&N<(g[0]||[]).length;++N)g[C][N]=b;return x}function D(v){throw new Error("qr not implemented for sparse matrices yet")}});function PV(e,t,r,n){e._values;for(var a=e._index,i=e._ptr,o=e._size,s=e._datatype,u=o[0],l=o[1],c=null,f=[],m=[],d=0,h=0;h<l;h++){m[h]=d;for(var p=r?r[h]:h,y=i[p],w=i[p+1],D=y;D<w;D++){var v=a[D];f[d]=v,d++}}return m[l]=d,e.createSparseMatrix({values:c,index:f,ptr:m,size:[u,l],datatype:s})}function J2(e,t,r,n,a,i,o){var s=0;for(r[o]=e;s>=0;){var u=r[o+s],l=r[n+u];l===-1?(s--,i[t++]=u):(r[n+u]=r[a+l],++s,r[o+s]=l)}return t}function kV(e,t){if(!e)return null;var r=0,n,a=[],i=[],o=0,s=t,u=2*t;for(n=0;n<t;n++)i[o+n]=-1;for(n=t-1;n>=0;n--)e[n]!==-1&&(i[s+n]=i[o+e[n]],i[o+e[n]]=n);for(n=0;n<t;n++)e[n]===-1&&(r=J2(n,r,i,o,s,a,u));return a}function OV(e,t){if(!e)return null;var r=e._index,n=e._ptr,a=e._size,i=a[0],o=a[1],s=[],u=[],l=0,c=o,f,m;for(f=0;f<i;f++)u[c+f]=-1;for(var d=0;d<o;d++){s[d]=-1,u[l+d]=-1;for(var h=n[d],p=n[d+1],y=h;y<p;y++){var w=r[y];for(f=u[c+w];f!==-1&&f<d;f=m)m=u[l+f],u[l+f]=d,m===-1&&(s[f]=d);u[c+w]=d}}return s}function BV(e,t,r){for(var n=e._values,a=e._index,i=e._ptr,o=e._size,s=o[1],u=0,l=0;l<s;l++){var c=i[l];for(i[l]=u;c<i[l+1];c++)t(a[c],l,n?n[c]:1,r)&&(a[u]=a[c],n&&(n[u]=n[c]),u++)}return i[s]=u,a.splice(u,a.length-u),n&&n.splice(u,n.length-u),u}function Xa(e){return-e-2}var $V="csAmd",_V=["add","multiply","transpose"],IV=I($V,_V,e=>{var{add:t,multiply:r,transpose:n}=e;return function(c,f){if(!f||c<=0||c>3)return null;var m=f._size,d=m[0],h=m[1],p=0,y=Math.max(16,10*Math.sqrt(h));y=Math.min(h-2,y);var w=a(c,f,d,h,y);BV(w,u,null);for(var D=w._index,v=w._ptr,x=v[h],g=[],b=[],C=0,N=h+1,A=2*(h+1),E=3*(h+1),S=4*(h+1),F=5*(h+1),k=6*(h+1),B=7*(h+1),L=g,M=i(h,v,b,C,E,L,A,B,N,k,S,F),$=o(h,v,b,F,S,k,y,N,E,L,A),H=0,j,Y,te,K,P,X,z,ie,se,V,_,W,ne,Q,ue,oe;$<h;){for(te=-1;H<h&&(te=b[E+H])===-1;H++);b[A+te]!==-1&&(L[b[A+te]]=-1),b[E+H]=b[A+te];var be=b[S+te],Me=b[N+te];$+=Me;var Pe=0;b[N+te]=-Me;var Ee=v[te],Oe=be===0?Ee:x,Ie=Oe;for(K=1;K<=be+1;K++){for(K>be?(X=te,z=Ee,ie=b[C+te]-be):(X=D[Ee++],z=v[X],ie=b[C+X]),P=1;P<=ie;P++)j=D[z++],!((se=b[N+j])<=0)&&(Pe+=se,b[N+j]=-se,D[Ie++]=j,b[A+j]!==-1&&(L[b[A+j]]=L[j]),L[j]!==-1?b[A+L[j]]=b[A+j]:b[E+b[F+j]]=b[A+j]);X!==te&&(v[X]=Xa(te),b[k+X]=0)}for(be!==0&&(x=Ie),b[F+te]=Pe,v[te]=Oe,b[C+te]=Ie-Oe,b[S+te]=-2,M=s(M,p,b,k,h),V=Oe;V<Ie;V++)if(j=D[V],!((_=b[S+j])<=0)){se=-b[N+j];var R=M-se;for(Ee=v[j],W=v[j]+_-1;Ee<=W;Ee++)X=D[Ee],b[k+X]>=M?b[k+X]-=se:b[k+X]!==0&&(b[k+X]=b[F+X]+R)}for(V=Oe;V<Ie;V++){for(j=D[V],W=v[j],ne=W+b[S+j]-1,Q=W,ue=0,oe=0,Ee=W;Ee<=ne;Ee++)if(X=D[Ee],b[k+X]!==0){var Z=b[k+X]-M;Z>0?(oe+=Z,D[Q++]=X,ue+=X):(v[X]=Xa(te),b[k+X]=0)}b[S+j]=Q-W+1;var O=Q,q=W+b[C+j];for(Ee=ne+1;Ee<q;Ee++){Y=D[Ee];var U=b[N+Y];U<=0||(oe+=U,D[Q++]=Y,ue+=Y)}oe===0?(v[j]=Xa(te),se=-b[N+j],Pe-=se,Me+=se,$+=se,b[N+j]=0,b[S+j]=-1):(b[F+j]=Math.min(b[F+j],oe),D[Q]=D[O],D[O]=D[W],D[W]=te,b[C+j]=Q-W+1,ue=(ue<0?-ue:ue)%h,b[A+j]=b[B+ue],b[B+ue]=j,L[j]=ue)}for(b[F+te]=Pe,p=Math.max(p,Pe),M=s(M+p,p,b,k,h),V=Oe;V<Ie;V++)if(j=D[V],!(b[N+j]>=0))for(ue=L[j],j=b[B+ue],b[B+ue]=-1;j!==-1&&b[A+j]!==-1;j=b[A+j],M++){for(ie=b[C+j],_=b[S+j],Ee=v[j]+1;Ee<=v[j]+ie-1;Ee++)b[k+D[Ee]]=M;var ee=j;for(Y=b[A+j];Y!==-1;){var re=b[C+Y]===ie&&b[S+Y]===_;for(Ee=v[Y]+1;re&&Ee<=v[Y]+ie-1;Ee++)b[k+D[Ee]]!==M&&(re=0);re?(v[Y]=Xa(j),b[N+j]+=b[N+Y],b[N+Y]=0,b[S+Y]=-1,Y=b[A+Y],b[A+ee]=Y):(ee=Y,Y=b[A+Y])}}for(Ee=Oe,V=Oe;V<Ie;V++)j=D[V],!((se=-b[N+j])<=0)&&(b[N+j]=se,oe=b[F+j]+Pe-se,oe=Math.min(oe,h-$-se),b[E+oe]!==-1&&(L[b[E+oe]]=j),b[A+j]=b[E+oe],L[j]=-1,b[E+oe]=j,H=Math.min(H,oe),b[F+j]=oe,D[Ee++]=j);b[N+te]=Me,(b[C+te]=Ee-Oe)===0&&(v[te]=-1,b[k+te]=0),be!==0&&(x=Ee)}for(j=0;j<h;j++)v[j]=Xa(v[j]);for(Y=0;Y<=h;Y++)b[E+Y]=-1;for(Y=h;Y>=0;Y--)b[N+Y]>0||(b[A+Y]=b[E+v[Y]],b[E+v[Y]]=Y);for(X=h;X>=0;X--)b[N+X]<=0||v[X]!==-1&&(b[A+X]=b[E+v[X]],b[E+v[X]]=X);for(te=0,j=0;j<=h;j++)v[j]===-1&&(te=J2(j,te,b,E,A,g,k));return g.splice(g.length-1,1),g};function a(l,c,f,m,d){var h=n(c);if(l===1&&m===f)return t(c,h);if(l===2){for(var p=h._index,y=h._ptr,w=0,D=0;D<f;D++){var v=y[D];if(y[D]=w,!(y[D+1]-v>d))for(var x=y[D+1];v<x;v++)p[w++]=p[v]}return y[f]=w,c=n(h),r(h,c)}return r(h,c)}function i(l,c,f,m,d,h,p,y,w,D,v,x){for(var g=0;g<l;g++)f[m+g]=c[g+1]-c[g];f[m+l]=0;for(var b=0;b<=l;b++)f[d+b]=-1,h[b]=-1,f[p+b]=-1,f[y+b]=-1,f[w+b]=1,f[D+b]=1,f[v+b]=0,f[x+b]=f[m+b];var C=s(0,0,f,D,l);return f[v+l]=-2,c[l]=-1,f[D+l]=0,C}function o(l,c,f,m,d,h,p,y,w,D,v){for(var x=0,g=0;g<l;g++){var b=f[m+g];if(b===0)f[d+g]=-2,x++,c[g]=-1,f[h+g]=0;else if(b>p)f[y+g]=0,f[d+g]=-1,x++,c[g]=Xa(l),f[y+l]++;else{var C=f[w+b];C!==-1&&(D[C]=g),f[v+g]=f[w+b],f[w+b]=g}}return x}function s(l,c,f,m,d){if(l<2||l+c<0){for(var h=0;h<d;h++)f[m+h]!==0&&(f[m+h]=1);l=2}return l}function u(l,c){return l!==c}});function zV(e,t,r,n,a,i,o){var s,u,l=0,c;if(e<=t||r[n+t]<=r[a+e])return-1;r[a+e]=r[n+t];var f=r[i+e];if(r[i+e]=t,f===-1)l=1,c=e;else{for(l=2,c=f;c!==r[o+c];c=r[o+c]);for(s=f;s!==c;s=u)u=r[o+s],r[o+s]=c}return{jleaf:l,q:c}}var jV="csCounts",qV=["transpose"],RV=I(jV,qV,e=>{var{transpose:t}=e;return function(r,n,a,i){if(!r||!n||!a)return null;var o=r._size,s=o[0],u=o[1],l,c,f,m,d,h,p,y=4*u+(i?u+s+1:0),w=[],D=0,v=u,x=2*u,g=3*u,b=4*u,C=5*u+1;for(f=0;f<y;f++)w[f]=-1;var N=[],A=t(r),E=A._index,S=A._ptr;for(f=0;f<u;f++)for(c=a[f],N[c]=w[g+c]===-1?1:0;c!==-1&&w[g+c]===-1;c=n[c])w[g+c]=f;if(i){for(f=0;f<u;f++)w[a[f]]=f;for(l=0;l<s;l++){for(f=u,h=S[l],p=S[l+1],d=h;d<p;d++)f=Math.min(f,w[E[d]]);w[C+l]=w[b+f],w[b+f]=l}}for(l=0;l<u;l++)w[D+l]=l;for(f=0;f<u;f++){for(c=a[f],n[c]!==-1&&N[n[c]]--,m=i?w[b+f]:c;m!==-1;m=i?w[C+m]:-1)for(d=S[m];d<S[m+1];d++){l=E[d];var F=zV(l,c,w,g,v,x,D);F.jleaf>=1&&N[c]++,F.jleaf===2&&N[F.q]--}n[c]!==-1&&(w[D+c]=n[c])}for(c=0;c<u;c++)n[c]!==-1&&(N[n[c]]+=N[c]);return N}}),LV="csSqr",HV=["add","multiply","transpose"],GV=I(LV,HV,e=>{var{add:t,multiply:r,transpose:n}=e,a=IV({add:t,multiply:r,transpose:n}),i=RV({transpose:n});return function(u,l,c){var f=l._ptr,m=l._size,d=m[1],h,p={};if(p.q=a(u,l),u&&!p.q)return null;if(c){var y=u?PV(l,null,p.q):l;p.parent=OV(y);var w=kV(p.parent,d);if(p.cp=i(y,p.parent,w,1),y&&p.parent&&p.cp&&o(y,p))for(p.unz=0,h=0;h<d;h++)p.unz+=p.cp[h]}else p.unz=4*f[d]+d,p.lnz=p.unz;return p};function o(s,u){var l=s._ptr,c=s._index,f=s._size,m=f[0],d=f[1];u.pinv=[],u.leftmost=[];var h=u.parent,p=u.pinv,y=u.leftmost,w=[],D=0,v=m,x=m+d,g=m+2*d,b,C,N,A,E;for(C=0;C<d;C++)w[v+C]=-1,w[x+C]=-1,w[g+C]=0;for(b=0;b<m;b++)y[b]=-1;for(C=d-1;C>=0;C--)for(A=l[C],E=l[C+1],N=A;N<E;N++)y[c[N]]=C;for(b=m-1;b>=0;b--)p[b]=-1,C=y[b],C!==-1&&(w[g+C]++===0&&(w[x+C]=b),w[D+b]=w[v+C],w[v+C]=b);for(u.lnz=0,u.m2=m,C=0;C<d;C++)if(b=w[v+C],u.lnz++,b<0&&(b=u.m2++),p[b]=C,!(--g[C]<=0)){u.lnz+=w[g+C];var S=h[C];S!==-1&&(w[g+S]===0&&(w[x+S]=w[x+C]),w[D+w[x+C]]=w[v+S],w[v+S]=w[D+b],w[g+S]+=w[g+C])}for(b=0;b<m;b++)p[b]<0&&(p[b]=C++);return!0}});function Xm(e,t){return e[t]<0}function K2(e,t){e[t]=Xa(e[t])}function xy(e){return e<0?Xa(e):e}function VV(e,t,r,n,a){var i=t._index,o=t._ptr,s=t._size,u=s[1],l,c,f,m=0;for(n[0]=e;m>=0;){e=n[m];var d=a?a[e]:e;Xm(o,e)||(K2(o,e),n[u+m]=d<0?0:xy(o[d]));var h=1;for(c=n[u+m],f=d<0?0:xy(o[d+1]);c<f;c++)if(l=i[c],!Xm(o,l)){n[u+m]=c,n[++m]=l,h=0;break}h&&(m--,n[--r]=e)}return r}function UV(e,t,r,n,a){var i=e._ptr,o=e._size,s=t._index,u=t._ptr,l=o[1],c,f,m,d=l;for(f=u[r],m=u[r+1],c=f;c<m;c++){var h=s[c];Xm(i,h)||(d=VV(h,e,d,n,a))}for(c=d;c<l;c++)K2(i,n[c]);return d}var WV="csSpsolve",JV=["divideScalar","multiply","subtract"],KV=I(WV,JV,e=>{var{divideScalar:t,multiply:r,subtract:n}=e;return function(i,o,s,u,l,c,f){var m=i._values,d=i._index,h=i._ptr,p=i._size,y=p[1],w=o._values,D=o._index,v=o._ptr,x,g,b,C,N=UV(i,o,s,u,c);for(x=N;x<y;x++)l[u[x]]=0;for(g=v[s],b=v[s+1],x=g;x<b;x++)l[D[x]]=w[x];for(var A=N;A<y;A++){var E=u[A],S=c?c[E]:E;if(!(S<0))for(g=h[S],b=h[S+1],l[E]=t(l[E],m[f?g:b-1]),x=f?g+1:g,C=f?b:b-1;x<C;x++){var F=d[x];l[F]=n(l[F],r(m[x],l[E]))}}return N}}),YV="csLu",ZV=["abs","divideScalar","multiply","subtract","larger","largerEq","SparseMatrix"],QV=I(YV,ZV,e=>{var{abs:t,divideScalar:r,multiply:n,subtract:a,larger:i,largerEq:o,SparseMatrix:s}=e,u=KV({divideScalar:r,multiply:n,subtract:a});return function(c,f,m){if(!c)return null;var d=c._size,h=d[1],p,y=100,w=100;f&&(p=f.q,y=f.lnz||y,w=f.unz||w);var D=[],v=[],x=[],g=new s({values:D,index:v,ptr:x,size:[h,h]}),b=[],C=[],N=[],A=new s({values:b,index:C,ptr:N,size:[h,h]}),E=[],S,F,k=[],B=[];for(S=0;S<h;S++)k[S]=0,E[S]=-1,x[S+1]=0;y=0,w=0;for(var L=0;L<h;L++){x[L]=y,N[L]=w;var M=p?p[L]:L,$=u(g,c,M,B,k,E,1),H=-1,j=-1;for(F=$;F<h;F++)if(S=B[F],E[S]<0){var Y=t(k[S]);i(Y,j)&&(j=Y,H=S)}else C[w]=E[S],b[w++]=k[S];if(H===-1||j<=0)return null;E[M]<0&&o(t(k[M]),n(j,m))&&(H=M);var te=k[H];for(C[w]=L,b[w++]=te,E[H]=L,v[y]=H,D[y++]=1,F=$;F<h;F++)S=B[F],E[S]<0&&(v[y]=S,D[y++]=r(k[S],te)),k[S]=0}for(x[h]=y,N[h]=w,F=0;F<y;F++)v[F]=E[v[F]];return D.splice(y,D.length-y),v.splice(y,v.length-y),b.splice(w,b.length-w),C.splice(w,C.length-w),{L:g,U:A,pinv:E}}}),Dy="slu",XV=["typed","abs","add","multiply","transpose","divideScalar","subtract","larger","largerEq","SparseMatrix"],eU=I(Dy,XV,e=>{var{typed:t,abs:r,add:n,multiply:a,transpose:i,divideScalar:o,subtract:s,larger:u,largerEq:l,SparseMatrix:c}=e,f=GV({add:n,multiply:a,transpose:i}),m=QV({abs:r,divideScalar:o,multiply:a,subtract:s,larger:u,largerEq:l,SparseMatrix:c});return t(Dy,{"SparseMatrix, number, number":function(h,p,y){if(!ke(p)||p<0||p>3)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(y<0||y>1)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var w=f(p,h,!1),D=m(h,w,y);return{L:D.L,U:D.U,p:D.pinv,q:w.q,toString:function(){return"L: "+this.L.toString()+`
55
+ U: `+this.U.toString()+`
56
+ p: `+this.p.toString()+(this.q?`
57
+ q: `+this.q.toString():"")+`
58
+ `}}}})});function Ny(e,t){var r,n=t.length,a=[];if(e)for(r=0;r<n;r++)a[e[r]]=t[r];else for(r=0;r<n;r++)a[r]=t[r];return a}var Ay="lusolve",tU=["typed","matrix","lup","slu","usolve","lsolve","DenseMatrix"],rU=I(Ay,tU,e=>{var{typed:t,matrix:r,lup:n,slu:a,usolve:i,lsolve:o,DenseMatrix:s}=e,u=iu({DenseMatrix:s});return t(Ay,{"Array, Array | Matrix":function(m,d){m=r(m);var h=n(m),p=c(h.L,h.U,h.p,null,d);return p.valueOf()},"DenseMatrix, Array | Matrix":function(m,d){var h=n(m);return c(h.L,h.U,h.p,null,d)},"SparseMatrix, Array | Matrix":function(m,d){var h=n(m);return c(h.L,h.U,h.p,null,d)},"SparseMatrix, Array | Matrix, number, number":function(m,d,h,p){var y=a(m,h,p);return c(y.L,y.U,y.p,y.q,d)},"Object, Array | Matrix":function(m,d){return c(m.L,m.U,m.p,m.q,d)}});function l(f){if(Re(f))return f;if(Mt(f))return r(f);throw new TypeError("Invalid Matrix LU decomposition")}function c(f,m,d,h,p){f=l(f),m=l(m),d&&(p=u(f,p,!0),p._data=Ny(d,p._data));var y=o(f,p),w=i(m,y);return h&&(w._data=Ny(h,w._data)),w}}),Cy="polynomialRoot",nU=["typed","isZero","equalScalar","add","subtract","multiply","divide","sqrt","unaryMinus","cbrt","typeOf","im","re"],aU=I(Cy,nU,e=>{var{typed:t,isZero:r,equalScalar:n,add:a,subtract:i,multiply:o,divide:s,sqrt:u,unaryMinus:l,cbrt:c,typeOf:f,im:m,re:d}=e;return t(Cy,{"number|Complex, ...number|Complex":(h,p)=>{for(var y=[h,...p];y.length>0&&r(y[y.length-1]);)y.pop();if(y.length<2)throw new RangeError("Polynomial [".concat(h,", ").concat(p,"] must have a non-zero non-constant coefficient"));switch(y.length){case 2:return[l(s(y[0],y[1]))];case 3:{var[w,D,v]=y,x=o(2,v),g=o(D,D),b=o(4,v,w);if(n(g,b))return[s(l(D),x)];var C=u(i(g,b));return[s(i(C,D),x),s(i(l(C),D),x)]}case 4:{var[N,A,E,S]=y,F=l(o(3,S)),k=o(E,E),B=o(3,S,A),L=a(o(2,E,E,E),o(27,S,S,N)),M=o(9,S,E,A);if(n(k,B)&&n(L,M))return[s(E,F)];var $=i(k,B),H=i(L,M),j=a(o(18,S,E,A,N),o(E,E,A,A)),Y=a(o(4,E,E,E,N),o(4,S,A,A,A),o(27,S,S,N,N));if(n(j,Y))return[s(i(o(4,S,E,A),a(o(9,S,S,N),o(E,E,E))),o(S,$)),s(i(o(9,S,N),o(E,A)),o(2,$))];var te;n(k,B)?te=H:te=s(a(H,u(i(o(H,H),o(4,$,$,$)))),2);var K=!0,P=c(te,K).toArray().map(X=>s(a(E,X,s($,X)),F));return P.map(X=>f(X)==="Complex"&&n(d(X),d(X)+m(X))?d(X):X)}default:throw new RangeError("only implemented for cubic or lower-order polynomials, not ".concat(y))}}})}),iU="Help",oU=["evaluate"],sU=I(iU,oU,e=>{var{evaluate:t}=e;function r(n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!n)throw new Error('Argument "doc" missing');this.doc=n}return r.prototype.type="Help",r.prototype.isHelp=!0,r.prototype.toString=function(){var n=this.doc||{},a=`
59
+ `;if(n.name&&(a+="Name: "+n.name+`
60
+
61
+ `),n.category&&(a+="Category: "+n.category+`
62
+
63
+ `),n.description&&(a+=`Description:
64
+ `+n.description+`
65
+
66
+ `),n.syntax&&(a+=`Syntax:
67
+ `+n.syntax.join(`
68
+ `)+`
69
+
70
+ `),n.examples){a+=`Examples:
71
+ `;for(var i=!1,o=t("config()"),s={config:f=>(i=!0,t("config(newConfig)",{newConfig:f}))},u=0;u<n.examples.length;u++){var l=n.examples[u];a+=" "+l+`
72
+ `;var c=void 0;try{c=t(l,s)}catch(f){c=f}c!==void 0&&!ex(c)&&(a+=" "+at(c,{precision:14})+`
73
+ `)}a+=`
74
+ `,i&&t("config(originalConfig)",{originalConfig:o})}return n.mayThrow&&n.mayThrow.length&&(a+="Throws: "+n.mayThrow.join(", ")+`
75
+
76
+ `),n.seealso&&n.seealso.length&&(a+="See also: "+n.seealso.join(", ")+`
77
+ `),a},r.prototype.toJSON=function(){var n=Ve(this.doc);return n.mathjs="Help",n},r.fromJSON=function(n){var a={};return Object.keys(n).filter(i=>i!=="mathjs").forEach(i=>{a[i]=n[i]}),new r(a)},r.prototype.valueOf=r.prototype.toString,r},{isClass:!0}),uU="Chain",lU=["?on","math","typed"],cU=I(uU,lU,e=>{var{on:t,math:r,typed:n}=e;function a(l){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");nx(l)?this.value=l.value:this.value=l}a.prototype.type="Chain",a.prototype.isChain=!0,a.prototype.done=function(){return this.value},a.prototype.valueOf=function(){return this.value},a.prototype.toString=function(){return at(this.value)},a.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},a.fromJSON=function(l){return new a(l.value)};function i(l,c){typeof c=="function"&&(a.prototype[l]=s(c))}function o(l,c){Q6(a.prototype,l,function(){var m=c();if(typeof m=="function")return s(m)})}function s(l){return function(){if(arguments.length===0)return new a(l(this.value));for(var c=[this.value],f=0;f<arguments.length;f++)c[f+1]=arguments[f];if(n.isTypedFunction(l)){var m=n.resolve(l,c);if(m.params.length===1)throw new Error("chain function "+l.name+" cannot match rest parameter between chain value and additional arguments.");return new a(m.implementation.apply(l,c))}return new a(l.apply(l,c))}}a.createProxy=function(l,c){if(typeof l=="string")i(l,c);else{var f=function(h){Fe(l,h)&&u[h]===void 0&&o(h,()=>l[h])};for(var m in l)f(m)}};var u={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return a.createProxy(r),t&&t("import",function(l,c,f){f||o(l,c)}),a},{isClass:!0}),Ey={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]},fU={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]},mU={name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]},dU={name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]},hU={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]},pU={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]},gU={name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]},vU={name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]},yU={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]},bU={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]},wU={name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]},Sy={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]},xU={name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]},DU={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]},NU={name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]},AU={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]},CU={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]},EU={name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","bigint","complex","fraction","index","matrix","string","unit"]},SU={name:"bigint",category:"Construction",syntax:["bigint(x)"],description:"Create a bigint, an integer with an arbitrary number of digits, from a number or string.",examples:["123123123123123123 # a large number will lose digits",'bigint("123123123123123123")','bignumber(["1", "3", "5"])'],seealso:["boolean","bignumber","number","complex","fraction","index","matrix","string","unit"]},MU={name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]},TU={name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]},FU={name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]},PU={name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(matrix)","fraction(num,den)","fraction({n: num, d: den})"],description:"Create a fraction from a number or from integer numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)","fraction({n: 333, d: 53})","fraction([sqrt(9), sqrt(10), sqrt(11)])"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]},kU={name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[1:2, 1:2] = 1","B = [1, 2, 3]","B[B>1 and B<3]"],seealso:["bignumber","boolean","complex","matrix","number","range","string","unit"]},OU={name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]},BU={name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","bigint","boolean","complex","fraction","index","matrix","string","unit"]},$U={name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]},_U={name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]},IU={name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]},zU={name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]},jU={name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]},qU={name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]},RU={name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number": f(x)=x+x, "string": f(x)=concat(x,x) })',"double(2)",'double("hello")'],seealso:[]},LU={name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]},HU={name:"leafCount",category:"Algebra",syntax:["leafCount(expr)"],description:"Computes the number of leaves in the parse tree of the given expression",examples:['leafCount("e^(i*pi)-1")','leafCount(parse("{a: 22/7, b: 10^(1/2)}"))'],seealso:["simplify"]},GU={name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolveAll","lup","lusolve","usolve","matrix","sparse"]},VU={name:"lsolveAll",category:"Algebra",syntax:["x=lsolveAll(L, b)"],description:"Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolve","lup","lusolve","usolve","matrix","sparse"]},UU={name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]},WU={name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]},JU={name:"polynomialRoot",category:"Algebra",syntax:["x=polynomialRoot(-6, 3)","x=polynomialRoot(4, -4, 1)","x=polynomialRoot(-8, 12, -6, 1)"],description:"Finds the roots of a univariate polynomial given by its coefficients starting from constant, linear, and so on, increasing in degree.",examples:["a = polynomialRoot(-6, 11, -6, 1)"],seealso:["cbrt","sqrt"]},KU={name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])"],seealso:["lup","slu","matrix"]},YU={name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]},ZU={name:"resolve",category:"Algebra",syntax:["resolve(node, scope)"],description:"Recursively substitute variables in an expression tree.",examples:['resolve(parse("1 + x"), { x: 7 })','resolve(parse("size(text)"), { text: "Hello World" })','resolve(parse("x + y"), { x: parse("3z") })','resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })'],seealso:["simplify","evaluate"],mayThrow:["ReferenceError"]},QU={name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["simplifyCore","derivative","evaluate","parse","rationalize","resolve"]},XU={name:"simplifyConstant",category:"Algebra",syntax:["simplifyConstant(expr)","simplifyConstant(expr, options)"],description:"Replace constant subexpressions of node with their values.",examples:['simplifyConstant("(3-3)*x")','simplifyConstant(parse("z-cos(tau/8)"))'],seealso:["simplify","simplifyCore","evaluate"]},eW={name:"simplifyCore",category:"Algebra",syntax:["simplifyCore(node)"],description:"Perform simple one-pass simplifications on an expression tree.",examples:['simplifyCore(parse("0*x"))','simplifyCore(parse("(x+0)*2"))'],seealso:["simplify","simplifyConstant","evaluate"]},tW={name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]},rW={name:"symbolicEqual",category:"Algebra",syntax:["symbolicEqual(expr1, expr2)","symbolicEqual(expr1, expr2, options)"],description:"Returns true if the difference of the expressions simplifies to 0",examples:['symbolicEqual("x*y","y*x")','symbolicEqual("abs(x^2)", "x^2")','symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})'],seealso:["simplify","evaluate"]},nW={name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds one solution of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolveAll","lup","lusolve","lsolve","matrix","sparse"]},aW={name:"usolveAll",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolve","lup","lusolve","lsolve","matrix","sparse"]},iW={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]},oW={name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]},sW={name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]},uW={name:"ceil",category:"Arithmetic",syntax:["ceil(x)","ceil(x, n)","ceil(unit, valuelessUnit)","ceil(unit, n, valuelessUnit)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)","ceil(3.241cm, cm)","ceil(3.241cm, 2, cm)"],seealso:["floor","fix","round"]},lW={name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]},cW={name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]},fW={name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]},mW={name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]},dW={name:"dotPow",category:"Operators",syntax:["x .^ y","dotPow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]},hW={name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula"],seealso:["expm","expm1","pow","log"]},pW={name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]},gW={name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]},vW={name:"fix",category:"Arithmetic",syntax:["fix(x)","fix(x, n)","fix(unit, valuelessUnit)","fix(unit, n, valuelessUnit)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)","fix(3.241cm, cm)","fix(3.241cm, 2, cm)"],seealso:["ceil","floor","round"]},yW={name:"floor",category:"Arithmetic",syntax:["floor(x)","floor(x, n)","floor(unit, valuelessUnit)","floor(unit, n, valuelessUnit)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)","floor(3.241cm, cm)","floor(3.241cm, 2, cm)"],seealso:["ceil","fix","round"]},bW={name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]},wW={name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenuse of a list with values.",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]},xW={name:"invmod",category:"Arithmetic",syntax:["invmod(a, b)"],description:"Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax ≣ 1 (mod b)",examples:["invmod(8, 12)","invmod(7, 13)","invmod(15151, 15122)"],seealso:["gcd","xgcd"]},DW={name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]},NW={name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]},AW={name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]},CW={name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]},EW={name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]},SW={name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]},MW={name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]},TW={name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']},FW={name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]},PW={name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]},kW={name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)","pow([[1, 2], [4, 3]], 2)","pow([[1, 2], [4, 3]], -1)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]},OW={name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)","round(unit, valuelessUnit)","round(unit, n, valuelessUnit)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)","round(3.241cm, 2, cm)","round([3.2, 3.8, -4.7])"],seealso:["ceil","floor","fix"]},BW={name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>0, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]},$W={name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]},_W={name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[33, 24], [48, 57]])"],seealso:["sqrt","abs","square","multiply"]},IW={name:"sylvester",category:"Algebra",syntax:["sylvester(A,B,C)"],description:"Solves the real-valued Sylvester equation AX+XB=C for X",examples:["sylvester([[-1, -2], [1, 1]], [[-2, 1], [-1, 2]], [[-3, 2], [3, 0]])","A = [[-1, -2], [1, 1]]; B = [[2, -1], [1, -2]]; C = [[-3, 2], [3, 0]]","sylvester(A, B, C)"],seealso:["schur","lyap"]},zW={name:"schur",category:"Algebra",syntax:["schur(A)"],description:"Performs a real Schur decomposition of the real matrix A = UTU'",examples:["schur([[1, 0], [-4, 3]])","A = [[1, 0], [-4, 3]]","schur(A)"],seealso:["lyap","sylvester"]},jW={name:"lyap",category:"Algebra",syntax:["lyap(A,Q)"],description:"Solves the Continuous-time Lyapunov equation AP+PA'+Q=0 for P",examples:["lyap([[-2, 0], [1, -4]], [[3, 1], [1, 3]])","A = [[-2, 0], [1, -4]]","Q = [[3, 1], [1, 3]]","lyap(A,Q)"],seealso:["schur","sylvester"]},qW={name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]},RW={name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]},LW={name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]},HW={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]},GW={name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]},VW={name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},UW={name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},WW={name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]},JW={name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]},KW={name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]},YW={name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]},ZW={name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]},QW={name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]},XW={name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]},eJ={name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]},tJ={name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"The Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers","bernoulli"]},rJ={name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]},nJ={name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]},aJ={name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]},iJ={name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]},oJ={name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate(expression, scope)","evaluate([expr1, expr2, expr3, ...])","evaluate([expr1, expr2, expr3, ...], scope)"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(16)")','evaluate("2 inch to cm")','evaluate("sin(x * pi)", { "x": 1/2 })','evaluate(["width=2", "height=4","width*height"])'],seealso:["parser","parse","compile"]},sJ={name:"parser",category:"Expression",syntax:["parser()"],description:"Create a parser object that keeps a context of variables and their values, allowing the evaluation of expressions in that context.",examples:["myParser = parser()",'myParser.evaluate("sqrt(3^2 + 4^2)")','myParser.set("x", 3)','myParser.evaluate("y = x + 3")','myParser.evaluate(["y = x + 3", "y = y + 1"])','myParser.get("y")'],seealso:["evaluate","parse","compile"]},uJ={name:"parse",category:"Expression",syntax:["parse(expr)","parse(expr, options)","parse([expr1, expr2, expr3, ...])","parse([expr1, expr2, expr3, ...], options)"],description:"Parse an expression. Returns a node tree, which can be evaluated by invoking node.evaluate() or transformed into a functional object via node.compile().",examples:['node1 = parse("sqrt(3^2 + 4^2)")',"node1.evaluate()","code1 = node1.compile()","code1.evaluate()","scope = {a: 3, b: 4}",'node2 = parse("a * b")',"node2.evaluate(scope)","code2 = node2.compile()","code2.evaluate(scope)"],seealso:["parser","evaluate","compile"]},lJ={name:"compile",category:"Expression",syntax:["compile(expr) ","compile([expr1, expr2, expr3, ...])"],description:"Parse and compile an expression. Returns a an object with a function evaluate([scope]) to evaluate the compiled expression.",examples:['code1 = compile("sqrt(3^2 + 4^2)")',"code1.evaluate() ",'code2 = compile("a * b")',"code2.evaluate({a: 3, b: 4})"],seealso:["parser","parse","evaluate"]},cJ={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]},fJ={name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2]])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]},mJ={name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])"],seealso:[]},dJ={name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]},hJ={name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]},pJ={name:"nullish",category:"Logical",syntax:["x ?? y","nullish(x, y)"],description:"Nullish coalescing operator. Returns the right-hand operand when the left-hand operand is null or undefined, and otherwise returns the left-hand operand.",examples:["null ?? 42","undefined ?? 42","0 ?? 42","false ?? 42","null ?? undefined ?? 42"],seealso:["and","or","not"]},gJ={name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]},vJ={name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]},yJ={name:"mapSlices",category:"Matrix",syntax:["mapSlices(A, dim, callback)"],description:"Generate a matrix one dimension less than A by applying callback to each slice of A along dimension dim.",examples:["A = [[1, 2], [3, 4]]","mapSlices(A, 1, sum)","mapSlices(A, 2, prod)"],seealso:["map","forEach"]},bJ={name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row","matrixFromColumns"]},wJ={name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},xJ={name:"count",category:"Matrix",syntax:["count(x)"],description:"Count the number of elements of a matrix, array or string.",examples:["a = [1, 2; 3, 4; 5, 6]","count(a)","size(a)",'count("hello world")'],seealso:["size"]},DJ={name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0], [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4], [5, 6, 7])"],seealso:["multiply","dot"]},NJ={name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},AJ={name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},CJ={name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},EJ={name:"diff",category:"Matrix",syntax:["diff(arr)","diff(arr, dim)"],description:["Create a new matrix or array with the difference of the passed matrix or array.","Dim parameter is optional and used to indicate the dimension of the array/matrix to apply the difference","If no dimension parameter is passed it is assumed as dimension 0","Dimension is zero-based in javascript and one-based in the parser","Arrays must be 'rectangular' meaning arrays like [1, 2]","If something is passed as a matrix it will be returned as a matrix but other than that all matrices are converted to arrays"],examples:["A = [1, 2, 4, 7, 0]","diff(A)","diff(A, 1)","B = [[1, 2], [3, 4]]","diff(B)","diff(B, 1)","diff(B, 2)","diff(B, bignumber(2))","diff([[1, 2], matrix([3, 4])], 2)"],seealso:["subtract","partitionSelect"]},SJ={name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]},MJ={name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and optionally eigenvectors of a square matrix",examples:["eigs([[5, 2.3], [2.3, 1]])","eigs([[1, 2, 3], [4, 5, 6], [7, 8, 9]], { precision: 1e-6, eigenvectors: false })"],seealso:["inv"]},TJ={name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]},FJ={name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]},PJ={name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["numberOfPets = {}","addPet(n) = numberOfPets[n] = (numberOfPets[n] ? numberOfPets[n]:0 ) + 1;",'forEach(["Dog","Cat","Cat"], addPet)',"numberOfPets"],seealso:["map","sort","filter"]},kJ={name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]},OJ={name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},BJ={name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]},$J={name:"pinv",category:"Matrix",syntax:["pinv(x)"],description:"Calculate the Moore–Penrose inverse of a matrix",examples:["pinv([1, 2; 3, 4])","pinv([[1, 0], [0, 1], [0, 1]])","pinv(4)"],seealso:["inv"]},_J={name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the Kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]},IJ={name:"map",category:"Matrix",syntax:["map(x, callback)","map(x, y, ..., callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array or the matrices/arrays.",examples:["map([1, 2, 3], square)","map([1, 2], [3, 4], f(a,b) = a + b)"],seealso:["filter","forEach"]},zJ={name:"matrixFromColumns",category:"Matrix",syntax:["matrixFromColumns(...arr)","matrixFromColumns(row1, row2)","matrixFromColumns(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual columns.",examples:["matrixFromColumns([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromRows","matrixFromFunction","zeros"]},jJ={name:"matrixFromFunction",category:"Matrix",syntax:["matrixFromFunction(size, fn)","matrixFromFunction(size, fn, format)","matrixFromFunction(size, fn, format, datatype)","matrixFromFunction(size, format, fn)","matrixFromFunction(size, format, datatype, fn)"],description:"Create a matrix by evaluating a generating function at each index.",examples:["f(I) = I[1] - I[2]","matrixFromFunction([3,3], f)","g(I) = I[1] - I[2] == 1 ? 4 : 0",'matrixFromFunction([100, 100], "sparse", g)',"matrixFromFunction([5], random)"],seealso:["matrix","matrixFromRows","matrixFromColumns","zeros"]},qJ={name:"matrixFromRows",category:"Matrix",syntax:["matrixFromRows(...arr)","matrixFromRows(row1, row2)","matrixFromRows(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual rows.",examples:["matrixFromRows([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromColumns","matrixFromFunction","zeros"]},RJ={name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]},LJ={name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1, compareText)',"arr = [5, 2, 1]","partitionSelect(arr, 0) # returns 1, arr is now: [1, 2, 5]","arr","partitionSelect(arr, 1, 'desc') # returns 2, arr is now: [5, 2, 1]","arr"],seealso:["sort"]},HJ={name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"range(1m, 1m, 3m)","a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]},GJ={name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])","reshape([1, 2, 3, 4], [-1, 2])"],seealso:["size","squeeze","resize"]},VJ={name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]},UJ={name:"rotate",category:"Matrix",syntax:["rotate(w, theta)","rotate(w, theta, v)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotate([1, 0], pi / 2)",'rotate(matrix([1, 0]), unit("35deg"))','rotate([1, 0, 0], unit("90deg"), [0, 0, 1])','rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],seealso:["matrix","rotationMatrix"]},WJ={name:"rotationMatrix",category:"Matrix",syntax:["rotationMatrix(theta)","rotationMatrix(theta, v)","rotationMatrix(theta, v, format)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotationMatrix(pi / 2)",'rotationMatrix(unit("45deg"), [0, 0, 1])','rotationMatrix(1, matrix([0, 0, 1]), "sparse")'],seealso:["cos","sin"]},JJ={name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column","matrixFromRows"]},KJ={name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","count","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]},YJ={name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"], "natural")',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]},ZJ={name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]},QJ={name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of the entries of a matrix or characters of a string. Indexes are one-based. There should be one index specification for each dimension of the target. Each specification can be a single index, a list of indices, or a range in colon notation `l:u`. In a range, both the lower bound l and upper bound u are included; and if a bound is omitted it defaults to the most extreme valid value. The cartesian product of the indices specified in each dimension determines the target of the operation.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]","f[[1,2], [1,3]] = [9, 10; 11, 12]","f"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]},XJ={name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]},eK={name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},tK={name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]},rK={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional Fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]},nK={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse Fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]},aK={name:"bernoulli",category:"Probability",syntax:["bernoulli(n)"],description:"The nth Bernoulli number",examples:["bernoulli(4)","bernoulli(fraction(12))"],seealso:["combinations","gamma","stirlingS2"]},iK={name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]},oK={name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]},sK={name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]},uK={name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]},lK={name:"lgamma",category:"Probability",syntax:["lgamma(n)"],description:"Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.",examples:["lgamma(4)","lgamma(1/2)","lgamma(i)","lgamma(complex(1.1, 2))"],seealso:["gamma"]},cK={name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]},fK={name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]},mK={name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]},dK={name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]},hK={name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]},pK={name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]},gK={name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]},vK={name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]},yK={name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]},bK={name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]},wK={name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]},xK={name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]},DK={name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not. Comparing a value with NaN returns false.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]},NK={name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]},AK={name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not. Comparing a value with NaN returns false.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]},CK={name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]},EK={name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]},SK={name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays and the values will be sorted in ascending order before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]},MK={name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]},TK={name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]},FK={name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]},PK={name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]},kK={name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]},OK={name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]},BK={name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]},$K={name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]},_K={name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]},IK={name:"zpk2tf",category:"Signal",syntax:["zpk2tf(z, p, k)"],description:"Compute the transfer function of a zero-pole-gain model.",examples:["zpk2tf([1, 2], [-1, -2], 1)","zpk2tf([1, 2], [-1, -2])","zpk2tf([1 - 3i, 2 + 2i], [-1, -2])"],seealso:[]},zK={name:"freqz",category:"Signal",syntax:["freqz(b, a)","freqz(b, a, w)"],description:"Calculates the frequency response of a filter given its numerator and denominator coefficients.",examples:["freqz([1, 2], [1, 2, 3])","freqz([1, 2], [1, 2, 3], [0, 1])","freqz([1, 2], [1, 2, 3], 512)"],seealso:[]},jK={name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]},qK={name:"zeta",category:"Special",syntax:["zeta(s)"],description:"Compute the Riemann Zeta Function using an infinite series and Riemann's Functional Equation for the entire complex plane",examples:["zeta(0.2)","zeta(-0.5)","zeta(4)"],seealso:[]},RK={name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]},LK={name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dimension)"],description:"Compute the maximum value of a list of values. If any NaN values are found, the function yields the last NaN in the input.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","variance"]},HK={name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dimension)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","variance"]},GK={name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","variance","quantileSeq"]},VK={name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dimension)"],description:"Compute the minimum value of a list of values. If any NaN values are found, the function yields the last NaN in the input.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]},UK={name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","variance"]},WK={name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","variance"]},JK={name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:`Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probability are: Number, BigNumber.
78
+
79
+ In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]},KK={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]},YK={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]},ZK={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","variance"]},QK={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]},XK={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]},eY={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]},tY={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]},rY={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]},nY={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the inverse hyperbolic tangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]},aY={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]},iY={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the inverse hyperbolic cosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]},oY={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]},sY={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]},uY={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]},lY={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]},cY={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]},fY={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]},mY={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]},dY={name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]},hY={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]},pY={name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]},gY={name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]},vY={name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]},yY={name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]},bY={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]},wY={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]},xY={name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]},DY={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]},NY={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]},AY={name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]},CY={name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]},EY={name:"toBest",category:"Units",syntax:["toBest(x)","toBest(x, unitList)","toBest(x, unitList, options)"],description:"Converts to the most appropriate display unit.",examples:['toBest(unit(5000, "m"))','toBest(unit(3500000, "W"))','toBest(unit(0.000000123, "A"))','toBest(unit(10, "m"), "cm")','toBest(unit(10, "m"), "mm,km", {offset: 1.5})'],seealso:[]},SY={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]},MY={name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables, and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]},TY={name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]},FY={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]},PY={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]},kY={name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]},OY={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero","isFinite","isBounded"]},BY={name:"isBounded",category:"Utils",syntax:["isBounded(x)"],description:"Test whether a value or its entries are bounded.",examples:["isBounded(Infinity)","isBounded(bigint(3))","isBounded([3, -Infinity, -3])"],seealso:["isFinite","isNumeric","isNaN","isNegative","isPositive"]},$Y={name:"isFinite",category:"Utils",syntax:["isFinite(x)"],description:"Test whether a value is finite, elementwise on collections.",examples:["isFinite(Infinity)","isFinite(bigint(3))","isFinite([3, -Infinity, -3])"],seealso:["isBounded","isNumeric","isNaN","isNegative","isPositive"]},_Y={name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]},IY={name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue","isFinite","isBounded"]},zY={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},jY={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},qY={name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]},RY={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, bigint, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "bigint")','numeric("4", "BigNumber")','numeric("4", "Fraction")','numeric(4, "Fraction")','numeric(fraction(2, 5), "number")'],seealso:["number","bigint","fraction","bignumber","string","format"]},LY={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]},HY={name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $1, $2, $3", [6, 9, 4])'],seealso:["format"]},GY={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]},VY={name:"solveODE",category:"Numeric",syntax:["solveODE(func, tspan, y0)","solveODE(func, tspan, y0, options)"],description:"Numerical Integration of Ordinary Differential Equations.",examples:["f(t,y) = y","tspan = [0, 4]","solveODE(f, tspan, 1)","solveODE(f, tspan, [1, 2])",'solveODE(f, tspan, 1, { method:"RK23", maxStep:0.1 })'],seealso:["derivative","simplifyCore"]},UY={bignumber:EU,bigint:SU,boolean:MU,complex:TU,createUnit:FU,fraction:PU,index:kU,matrix:OU,number:BU,sparse:$U,splitUnit:_U,string:IU,unit:zU,e:Ey,E:Ey,false:fU,i:mU,Infinity:dU,LN2:pU,LN10:hU,LOG2E:vU,LOG10E:gU,NaN:yU,null:bU,pi:Sy,PI:Sy,phi:wU,SQRT1_2:xU,SQRT2:DU,tau:NU,true:AU,version:CU,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant. Deprecated in favor of coulombConstant",examples:["coulombConstant"]},coulombConstant:{description:"Coulomb's constant",examples:["coulombConstant"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Bohr magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Bohr radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:LU,lsolve:GU,lsolveAll:VU,lup:UU,lusolve:WU,leafCount:HU,polynomialRoot:JU,resolve:ZU,simplify:QU,simplifyConstant:XU,simplifyCore:eW,symbolicEqual:rW,rationalize:YU,slu:tW,usolve:nW,usolveAll:aW,qr:KU,abs:iW,add:oW,cbrt:sW,ceil:uW,cube:lW,divide:cW,dotDivide:fW,dotMultiply:mW,dotPow:dW,exp:hW,expm:pW,expm1:gW,fix:vW,floor:yW,gcd:bW,hypot:wW,lcm:DW,log:NW,log2:EW,log1p:CW,log10:AW,mod:SW,multiply:MW,norm:TW,nthRoot:FW,nthRoots:PW,pow:kW,round:OW,sign:BW,sqrt:$W,sqrtm:_W,square:qW,subtract:RW,unaryMinus:LW,unaryPlus:HW,xgcd:GW,invmod:xW,bitAnd:VW,bitNot:UW,bitOr:WW,bitXor:JW,leftShift:KW,rightArithShift:YW,rightLogShift:ZW,bellNumbers:QW,catalan:XW,composition:eJ,stirlingS2:tJ,config:jU,import:qU,typed:RU,arg:rJ,conj:nJ,re:iJ,im:aJ,evaluate:oJ,help:cJ,parse:uJ,parser:sJ,compile:lJ,distance:fJ,intersect:mJ,and:dJ,not:hJ,nullish:pJ,or:gJ,xor:vJ,mapSlices:yJ,concat:wJ,count:xJ,cross:DJ,column:bJ,ctranspose:NJ,det:AJ,diag:CJ,diff:EJ,dot:SJ,getMatrixDataType:kJ,identity:OJ,filter:TJ,flatten:FJ,forEach:PJ,inv:BJ,pinv:$J,eigs:MJ,kron:_J,matrixFromFunction:jJ,matrixFromRows:qJ,matrixFromColumns:zJ,map:IJ,ones:RJ,partitionSelect:LJ,range:HJ,resize:VJ,reshape:GJ,rotate:UJ,rotationMatrix:WJ,row:JJ,size:KJ,sort:YJ,squeeze:ZJ,subset:QJ,trace:XJ,transpose:eK,zeros:tK,fft:rK,ifft:nK,sylvester:IW,schur:zW,lyap:jW,solveODE:VY,bernoulli:aK,combinations:iK,combinationsWithRep:oK,factorial:sK,gamma:uK,kldivergence:cK,lgamma:lK,multinomial:fK,permutations:mK,pickRandom:dK,random:hK,randomInt:pK,compare:gK,compareNatural:vK,compareText:yK,deepEqual:bK,equal:wK,equalText:xK,larger:DK,largerEq:NK,smaller:AK,smallerEq:CK,unequal:EK,setCartesian:SK,setDifference:MK,setDistinct:TK,setIntersect:FK,setIsSubset:PK,setMultiplicity:kK,setPowerset:OK,setSize:BK,setSymDifference:$K,setUnion:_K,zpk2tf:IK,freqz:zK,erf:jK,zeta:qK,cumsum:YK,mad:RK,max:LK,mean:HK,median:GK,min:VK,mode:UK,prod:WK,quantileSeq:JK,std:KK,sum:ZK,variance:QK,corr:XK,acos:eY,acosh:tY,acot:rY,acoth:nY,acsc:aY,acsch:iY,asec:oY,asech:sY,asin:uY,asinh:lY,atan:cY,atanh:mY,atan2:fY,cos:dY,cosh:hY,cot:pY,coth:gY,csc:vY,csch:yY,sec:bY,sech:wY,sin:xY,sinh:DY,tan:NY,tanh:AY,to:CY,toBest:EY,clone:MY,format:TY,bin:SY,oct:LY,hex:PY,isNaN:OY,isBounded:BY,isFinite:$Y,isInteger:kY,isNegative:_Y,isNumeric:IY,hasNumericValue:FY,isPositive:zY,isPrime:jY,isZero:qY,print:HY,typeOf:GY,numeric:RY},My="help",WY=["typed","mathWithTransform","Help"],JY=I(My,WY,e=>{var{typed:t,mathWithTransform:r,Help:n}=e;return t(My,{any:function(i){var o,s=i;if(typeof i!="string"){for(o in r)if(Fe(r,o)&&i===r[o]){s=o;break}}var u=Ur(UY,s);if(!u){var l=typeof s=="function"?s.name:s;throw new Error('No documentation found on "'+l+'"')}return new n(u)}})}),Ty="chain",KY=["typed","Chain"],YY=I(Ty,KY,e=>{var{typed:t,Chain:r}=e;return t(Ty,{"":function(){return new r},any:function(a){return new r(a)}})}),Fy="det",ZY=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],QY=I(Fy,ZY,e=>{var{typed:t,matrix:r,subtractScalar:n,multiply:a,divideScalar:i,isZero:o,unaryMinus:s}=e;return t(Fy,{any:function(c){return Ve(c)},"Array | Matrix":function(c){var f;switch(Re(c)?f=c.size():Array.isArray(c)?(c=r(c),f=c.size()):f=[],f.length){case 0:return Ve(c);case 1:if(f[0]===1)return Ve(c.valueOf()[0]);if(f[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+at(f)+")");case 2:{var m=f[0],d=f[1];if(m===d)return u(c.clone().valueOf(),m);if(d===0)return 1;throw new RangeError("Matrix must be square (size: "+at(f)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+at(f)+")")}}});function u(l,c,f){if(c===1)return Ve(l[0][0]);if(c===2)return n(a(l[0][0],l[1][1]),a(l[1][0],l[0][1]));for(var m=!1,d=new Array(c).fill(0).map((C,N)=>N),h=0;h<c;h++){var p=d[h];if(o(l[p][h])){var y=void 0;for(y=h+1;y<c;y++)if(!o(l[d[y]][h])){p=d[y],d[y]=d[h],d[h]=p,m=!m;break}if(y===c)return l[p][h]}for(var w=l[p][h],D=h===0?1:l[d[h-1]][h-1],v=h+1;v<c;v++)for(var x=d[v],g=h+1;g<c;g++)l[x][g]=i(n(a(l[x][g],w),a(l[x][h],l[p][g])),D)}var b=l[d[c-1]][c-1];return m?s(b):b}}),Py="inv",XY=["typed","matrix","divideScalar","addScalar","multiply","unaryMinus","det","identity","abs"],eZ=I(Py,XY,e=>{var{typed:t,matrix:r,divideScalar:n,addScalar:a,multiply:i,unaryMinus:o,det:s,identity:u,abs:l}=e;return t(Py,{"Array | Matrix":function(m){var d=Re(m)?m.size():Ue(m);switch(d.length){case 1:if(d[0]===1)return Re(m)?r([n(1,m.valueOf()[0])]):[n(1,m[0])];throw new RangeError("Matrix must be square (size: "+at(d)+")");case 2:{var h=d[0],p=d[1];if(h===p)return Re(m)?r(c(m.valueOf(),h,p),m.storage()):c(m,h,p);throw new RangeError("Matrix must be square (size: "+at(d)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+at(d)+")")}},any:function(m){return n(1,m)}});function c(f,m,d){var h,p,y,w,D;if(m===1){if(w=f[0][0],w===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,w)]]}else if(m===2){var v=s(f);if(v===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(f[1][1],v),n(o(f[0][1]),v)],[n(o(f[1][0]),v),n(f[0][0],v)]]}else{var x=f.concat();for(h=0;h<m;h++)x[h]=x[h].concat();for(var g=u(m).valueOf(),b=0;b<d;b++){var C=l(x[b][b]),N=b;for(h=b+1;h<m;)l(x[h][b])>C&&(C=l(x[h][b]),N=h),h++;if(C===0)throw Error("Cannot calculate inverse, determinant is zero");h=N,h!==b&&(D=x[b],x[b]=x[h],x[h]=D,D=g[b],g[b]=g[h],g[h]=D);var A=x[b],E=g[b];for(h=0;h<m;h++){var S=x[h],F=g[h];if(h!==b){if(S[b]!==0){for(y=n(o(S[b]),A[b]),p=b;p<d;p++)S[p]=a(S[p],i(y,A[p]));for(p=0;p<d;p++)F[p]=a(F[p],i(y,E[p]))}}else{for(y=A[b],p=b;p<d;p++)S[p]=n(S[p],y);for(p=0;p<d;p++)F[p]=n(F[p],y)}}}return g}}}),ky="pinv",tZ=["typed","matrix","inv","deepEqual","equal","dotDivide","dot","ctranspose","divideScalar","multiply","add","Complex"],rZ=I(ky,tZ,e=>{var{typed:t,matrix:r,inv:n,deepEqual:a,equal:i,dotDivide:o,dot:s,ctranspose:u,divideScalar:l,multiply:c,add:f,Complex:m}=e;return t(ky,{"Array | Matrix":function(v){var x=Re(v)?v.size():Ue(v);switch(x.length){case 1:return w(v)?u(v):x[0]===1?n(v):o(u(v),s(v,v));case 2:{if(w(v))return u(v);var g=x[0],b=x[1];if(g===b)try{return n(v)}catch(C){if(!(C instanceof Error&&C.message.match(/Cannot calculate inverse, determinant is zero/)))throw C}return Re(v)?r(d(v.valueOf(),g,b),v.storage()):d(v,g,b)}default:throw new RangeError("Matrix must be two dimensional (size: "+at(x)+")")}},any:function(v){return i(v,0)?Ve(v):l(1,v)}});function d(D,v,x){var{C:g,F:b}=p(D,v,x),C=c(n(c(u(g),g)),u(g)),N=c(u(b),n(c(b,u(b))));return c(N,C)}function h(D,v,x){for(var g=Ve(D),b=0,C=0;C<v;C++){if(x<=b)return g;for(var N=C;y(g[N][b]);)if(N++,v===N&&(N=C,b++,x===b))return g;[g[N],g[C]]=[g[C],g[N]];for(var A=g[C][b],E=0;E<x;E++)g[C][E]=o(g[C][E],A);for(var S=0;S<v;S++)if(S!==C){A=g[S][b];for(var F=0;F<x;F++)g[S][F]=f(g[S][F],c(-1,c(A,g[C][F])))}b++}return g}function p(D,v,x){var g=h(D,v,x),b=D.map((N,A)=>N.filter((E,S)=>S<v&&!y(s(g[S],g[S])))),C=g.filter((N,A)=>!y(s(g[A],g[A])));return{C:b,F:C}}function y(D){return i(f(D,m(1,1)),f(0,m(1,1)))}function w(D){return a(f(D,m(1,1)),f(c(D,0),m(1,1)))}});function nZ(e){var{addScalar:t,subtract:r,flatten:n,multiply:a,multiplyScalar:i,divideScalar:o,sqrt:s,abs:u,bignumber:l,diag:c,size:f,reshape:m,inv:d,qr:h,usolve:p,usolveAll:y,equal:w,complex:D,larger:v,smaller:x,matrixFromColumns:g,dot:b}=e;function C(K,P,X,z){var ie=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,se=N(K,P,X,z,ie);A(K,P,X,z,ie,se);var{values:V,C:_}=E(K,P,X,z,ie);if(ie){var W=S(K,P,_,se,V,X,z);return{values:V,eigenvectors:W}}return{values:V}}function N(K,P,X,z,ie){var se=z==="BigNumber",V=z==="Complex",_=se?l(0):0,W=se?l(1):V?D(1):1,ne=se?l(1):1,Q=se?l(10):2,ue=i(Q,Q),oe;ie&&(oe=Array(P).fill(W));for(var be=!1;!be;){be=!0;for(var Me=0;Me<P;Me++){for(var Pe=_,Ee=_,Oe=0;Oe<P;Oe++)Me!==Oe&&(Pe=t(Pe,u(K[Oe][Me])),Ee=t(Ee,u(K[Me][Oe])));if(!w(Pe,0)&&!w(Ee,0)){for(var Ie=ne,R=Pe,Z=o(Ee,Q),O=i(Ee,Q);x(R,Z);)R=i(R,ue),Ie=i(Ie,Q);for(;v(R,O);)R=o(R,ue),Ie=o(Ie,Q);var q=x(o(t(R,Ee),Ie),i(t(Pe,Ee),.95));if(q){be=!1;for(var U=o(1,Ie),ee=0;ee<P;ee++)Me!==ee&&(K[Me][ee]=i(K[Me][ee],U),K[ee][Me]=i(K[ee][Me],Ie));ie&&(oe[Me]=i(oe[Me],U))}}}}return ie?c(oe):null}function A(K,P,X,z,ie,se){var V=z==="BigNumber",_=z==="Complex",W=V?l(0):_?D(0):0;V&&(X=l(X));for(var ne=0;ne<P-2;ne++){for(var Q=0,ue=W,oe=ne+1;oe<P;oe++){var be=K[oe][ne];x(u(ue),u(be))&&(ue=be,Q=oe)}if(!x(u(ue),X)){if(Q!==ne+1){var Me=K[Q];K[Q]=K[ne+1],K[ne+1]=Me;for(var Pe=0;Pe<P;Pe++){var Ee=K[Pe][Q];K[Pe][Q]=K[Pe][ne+1],K[Pe][ne+1]=Ee}if(ie){var Oe=se[Q];se[Q]=se[ne+1],se[ne+1]=Oe}}for(var Ie=ne+2;Ie<P;Ie++){var R=o(K[Ie][ne],ue);if(R!==0){for(var Z=0;Z<P;Z++)K[Ie][Z]=r(K[Ie][Z],i(R,K[ne+1][Z]));for(var O=0;O<P;O++)K[O][ne+1]=t(K[O][ne+1],i(R,K[O][Ie]));if(ie)for(var q=0;q<P;q++)se[Ie][q]=r(se[Ie][q],i(R,se[ne+1][q]))}}}}return se}function E(K,P,X,z,ie){var se=z==="BigNumber",V=z==="Complex",_=se?l(1):V?D(1):1;se&&(X=l(X));for(var W=Ve(K),ne=[],Q=P,ue=[],oe=ie?c(Array(P).fill(_)):void 0,be=ie?c(Array(Q).fill(_)):void 0,Me=0;Me<=100;){Me+=1;for(var Pe=W[Q-1][Q-1],Ee=0;Ee<Q;Ee++)W[Ee][Ee]=r(W[Ee][Ee],Pe);var{Q:Oe,R:Ie}=h(W);W=a(Ie,Oe);for(var R=0;R<Q;R++)W[R][R]=t(W[R][R],Pe);if(ie&&(be=a(be,Oe)),Q===1||x(u(W[Q-1][Q-2]),X)){Me=0,ne.push(W[Q-1][Q-1]),ie&&(ue.unshift([[1]]),B(be,P),oe=a(oe,be),Q>1&&(be=c(Array(Q-1).fill(_)))),Q-=1,W.pop();for(var Z=0;Z<Q;Z++)W[Z].pop()}else if(Q===2||x(u(W[Q-2][Q-3]),X)){Me=0;var O=F(W[Q-2][Q-2],W[Q-2][Q-1],W[Q-1][Q-2],W[Q-1][Q-1]);ne.push(...O),ie&&(ue.unshift(k(W[Q-2][Q-2],W[Q-2][Q-1],W[Q-1][Q-2],W[Q-1][Q-1],O[0],O[1],X,z)),B(be,P),oe=a(oe,be),Q>2&&(be=c(Array(Q-2).fill(_)))),Q-=2,W.pop(),W.pop();for(var q=0;q<Q;q++)W[q].pop(),W[q].pop()}if(Q===0)break}if(ne.sort((re,ae)=>+r(u(re),u(ae))),Me>100){var U=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+ne.join(", "));throw U.values=ne,U.vectors=[],U}var ee=ie?a(oe,L(ue,P)):void 0;return{values:ne,C:ee}}function S(K,P,X,z,ie,se,V){var _=d(X),W=a(_,K,X),ne=V==="BigNumber",Q=V==="Complex",ue=ne?l(0):Q?D(0):0,oe=ne?l(1):Q?D(1):1,be=[],Me=[];for(var Pe of ie){var Ee=M(be,Pe,w);Ee===-1?(be.push(Pe),Me.push(1)):Me[Ee]+=1}for(var Oe=[],Ie=be.length,R=Array(P).fill(ue),Z=c(Array(P).fill(oe)),O=function(){var ee=be[q],re=r(W,a(ee,Z)),ae=y(re,R);for(ae.shift();ae.length<Me[q];){var ye=$(re,P,ae,se,V);if(ye===null)break;ae.push(ye)}var me=a(d(z),X);ae=ae.map(Ne=>a(me,Ne)),Oe.push(...ae.map(Ne=>({value:ee,vector:n(Ne)})))},q=0;q<Ie;q++)O();return Oe}function F(K,P,X,z){var ie=t(K,z),se=r(i(K,z),i(P,X)),V=i(ie,.5),_=i(s(r(i(ie,ie),i(4,se))),.5);return[t(V,_),r(V,_)]}function k(K,P,X,z,ie,se,V,_){var W=_==="BigNumber",ne=_==="Complex",Q=W?l(0):ne?D(0):0,ue=W?l(1):ne?D(1):1;if(x(u(X),V))return[[ue,Q],[Q,ue]];if(v(u(r(ie,se)),V))return[[r(ie,z),r(se,z)],[X,X]];var oe=r(K,ie),be=r(z,ie);return x(u(P),V)&&x(u(be),V)?[[oe,ue],[X,Q]]:[[P,Q],[be,ue]]}function B(K,P){for(var X=0;X<K.length;X++)K[X].push(...Array(P-K[X].length).fill(0));for(var z=K.length;z<P;z++)K.push(Array(P).fill(0)),K[z][z]=1;return K}function L(K,P){for(var X=[],z=0;z<P;z++)X[z]=Array(P).fill(0);var ie=0;for(var se of K){for(var V=se.length,_=0;_<V;_++)for(var W=0;W<V;W++)X[ie+_][ie+W]=se[_][W];ie+=V}return X}function M(K,P,X){for(var z=0;z<K.length;z++)if(X(K[z],P))return z;return-1}function $(K,P,X,z,ie){for(var se=ie==="BigNumber"?l(1e3):1e3,V,_=0;_<5;++_){V=H(P,X,ie);try{V=p(K,V)}catch{continue}if(v(Y(V),se))break}if(_>=5)return null;for(_=0;;){var W=p(K,V);if(x(Y(j(V,[W])),z))break;if(++_>=10)return null;V=te(W)}return V}function H(K,P,X){var z=X==="BigNumber",ie=X==="Complex",se=Array(K).fill(0).map(V=>2*Math.random()-1);return z&&(se=se.map(V=>l(V))),ie&&(se=se.map(V=>D(V))),se=j(se,P),te(se,X)}function j(K,P){var X=f(K);for(var z of P)z=m(z,X),K=r(K,a(o(b(z,K),b(z,z)),z));return K}function Y(K){return u(s(b(K,K)))}function te(K,P){var X=P==="BigNumber",z=P==="Complex",ie=X?l(1):z?D(1):1;return a(o(ie,Y(K)),K)}return C}function aZ(e){var{config:t,addScalar:r,subtract:n,abs:a,atan:i,cos:o,sin:s,multiplyScalar:u,inv:l,bignumber:c,multiply:f,add:m}=e;function d(A,E){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.relTol,F=arguments.length>3?arguments[3]:void 0,k=arguments.length>4?arguments[4]:void 0;if(F==="number")return h(A,S,k);if(F==="BigNumber")return p(A,S,k);throw TypeError("Unsupported data type: "+F)}function h(A,E,S){var F=A.length,k=Math.abs(E/F),B,L;if(S){L=new Array(F);for(var M=0;M<F;M++)L[M]=Array(F).fill(0),L[M][M]=1}for(var $=b(A);Math.abs($[1])>=Math.abs(k);){var H=$[0][0],j=$[0][1];B=y(A[H][H],A[j][j],A[H][j]),A=g(A,B,H,j),S&&(L=D(L,B,H,j)),$=b(A)}for(var Y=Array(F).fill(0),te=0;te<F;te++)Y[te]=A[te][te];return N(Ve(Y),L,S)}function p(A,E,S){var F=A.length,k=a(E/F),B,L;if(S){L=new Array(F);for(var M=0;M<F;M++)L[M]=Array(F).fill(0),L[M][M]=1}for(var $=C(A);a($[1])>=a(k);){var H=$[0][0],j=$[0][1];B=w(A[H][H],A[j][j],A[H][j]),A=x(A,B,H,j),S&&(L=v(L,B,H,j)),$=C(A)}for(var Y=Array(F).fill(0),te=0;te<F;te++)Y[te]=A[te][te];return N(Ve(Y),L,S)}function y(A,E,S){var F=E-A;return Math.abs(F)<=t.relTol?Math.PI/4:.5*Math.atan(2*S/(E-A))}function w(A,E,S){var F=n(E,A);return a(F)<=t.relTol?c(-1).acos().div(4):u(.5,i(f(2,S,l(F))))}function D(A,E,S,F){for(var k=A.length,B=Math.cos(E),L=Math.sin(E),M=Array(k).fill(0),$=Array(k).fill(0),H=0;H<k;H++)M[H]=B*A[H][S]-L*A[H][F],$[H]=L*A[H][S]+B*A[H][F];for(var j=0;j<k;j++)A[j][S]=M[j],A[j][F]=$[j];return A}function v(A,E,S,F){for(var k=A.length,B=o(E),L=s(E),M=Array(k).fill(c(0)),$=Array(k).fill(c(0)),H=0;H<k;H++)M[H]=n(u(B,A[H][S]),u(L,A[H][F])),$[H]=r(u(L,A[H][S]),u(B,A[H][F]));for(var j=0;j<k;j++)A[j][S]=M[j],A[j][F]=$[j];return A}function x(A,E,S,F){for(var k=A.length,B=c(o(E)),L=c(s(E)),M=u(B,B),$=u(L,L),H=Array(k).fill(c(0)),j=Array(k).fill(c(0)),Y=f(c(2),B,L,A[S][F]),te=r(n(u(M,A[S][S]),Y),u($,A[F][F])),K=m(u($,A[S][S]),Y,u(M,A[F][F])),P=0;P<k;P++)H[P]=n(u(B,A[S][P]),u(L,A[F][P])),j[P]=r(u(L,A[S][P]),u(B,A[F][P]));A[S][S]=te,A[F][F]=K,A[S][F]=c(0),A[F][S]=c(0);for(var X=0;X<k;X++)X!==S&&X!==F&&(A[S][X]=H[X],A[X][S]=H[X],A[F][X]=j[X],A[X][F]=j[X]);return A}function g(A,E,S,F){for(var k=A.length,B=Math.cos(E),L=Math.sin(E),M=B*B,$=L*L,H=Array(k).fill(0),j=Array(k).fill(0),Y=M*A[S][S]-2*B*L*A[S][F]+$*A[F][F],te=$*A[S][S]+2*B*L*A[S][F]+M*A[F][F],K=0;K<k;K++)H[K]=B*A[S][K]-L*A[F][K],j[K]=L*A[S][K]+B*A[F][K];A[S][S]=Y,A[F][F]=te,A[S][F]=0,A[F][S]=0;for(var P=0;P<k;P++)P!==S&&P!==F&&(A[S][P]=H[P],A[P][S]=H[P],A[F][P]=j[P],A[P][F]=j[P]);return A}function b(A){for(var E=A.length,S=0,F=[0,1],k=0;k<E;k++)for(var B=k+1;B<E;B++)Math.abs(S)<Math.abs(A[k][B])&&(S=Math.abs(A[k][B]),F=[k,B]);return[F,S]}function C(A){for(var E=A.length,S=0,F=[0,1],k=0;k<E;k++)for(var B=k+1;B<E;B++)a(S)<a(A[k][B])&&(S=a(A[k][B]),F=[k,B]);return[F,S]}function N(A,E,S){var F=A.length,k=Array(F),B;if(S){B=Array(F);for(var L=0;L<F;L++)B[L]=Array(F)}for(var M=0;M<F;M++){for(var $=0,H=A[0],j=0;j<A.length;j++)a(A[j])<a(H)&&($=j,H=A[$]);if(k[M]=A.splice($,1)[0],S)for(var Y=0;Y<F;Y++)B[M][Y]=E[Y][$],E[Y].splice($,1)}if(!S)return{values:k};var te=B.map((K,P)=>({value:k[P],vector:K}));return{values:k,eigenvectors:te}}return d}var iZ="eigs",oZ=["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","divideScalar","inv","bignumber","multiply","add","larger","column","flatten","number","complex","sqrt","diag","size","reshape","qr","usolve","usolveAll","im","re","smaller","matrixFromColumns","dot"],sZ=I(iZ,oZ,e=>{var{config:t,typed:r,matrix:n,addScalar:a,subtract:i,equal:o,abs:s,atan:u,cos:l,sin:c,multiplyScalar:f,divideScalar:m,inv:d,bignumber:h,multiply:p,add:y,larger:w,column:D,flatten:v,number:x,complex:g,sqrt:b,diag:C,size:N,reshape:A,qr:E,usolve:S,usolveAll:F,im:k,re:B,smaller:L,matrixFromColumns:M,dot:$}=e,H=aZ({config:t,addScalar:a,subtract:i,abs:s,atan:u,cos:l,sin:c,multiplyScalar:f,inv:d,bignumber:h,multiply:p,add:y}),j=nZ({addScalar:a,subtract:i,multiply:p,multiplyScalar:f,flatten:v,divideScalar:m,sqrt:b,abs:s,bignumber:h,diag:C,size:N,reshape:A,qr:E,inv:d,usolve:S,usolveAll:F,equal:o,complex:g,larger:w,smaller:L,matrixFromColumns:M,dot:$});return r("eigs",{Array:function(se){return Y(n(se))},"Array, number|BigNumber":function(se,V){return Y(n(se),{precision:V})},"Array, Object"(ie,se){return Y(n(ie),se)},Matrix:function(se){return Y(se,{matricize:!0})},"Matrix, number|BigNumber":function(se,V){return Y(se,{precision:V,matricize:!0})},"Matrix, Object":function(se,V){var _={matricize:!0};return er(_,V),Y(se,_)}});function Y(ie){var se,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_="eigenvectors"in V?V.eigenvectors:!0,W=(se=V.precision)!==null&&se!==void 0?se:t.relTol,ne=te(ie,W,_);return V.matricize&&(ne.values=n(ne.values),_&&(ne.eigenvectors=ne.eigenvectors.map(Q=>{var{value:ue,vector:oe}=Q;return{value:ue,vector:n(oe)}}))),_&&Object.defineProperty(ne,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),ne}function te(ie,se,V){var _=ie.toArray(),W=ie.size();if(W.length!==2||W[0]!==W[1])throw new RangeError("Matrix must be square (size: ".concat(at(W),")"));var ne=W[0];if(P(_,ne,se)&&(X(_,ne),K(_,ne,se))){var Q=z(ie,_,ne);return H(_,ne,se,Q,V)}var ue=z(ie,_,ne);return j(_,ne,se,ue,V)}function K(ie,se,V){for(var _=0;_<se;_++)for(var W=_;W<se;W++)if(w(h(s(i(ie[_][W],ie[W][_]))),V))return!1;return!0}function P(ie,se,V){for(var _=0;_<se;_++)for(var W=0;W<se;W++)if(w(h(s(k(ie[_][W]))),V))return!1;return!0}function X(ie,se){for(var V=0;V<se;V++)for(var _=0;_<se;_++)ie[V][_]=B(ie[V][_])}function z(ie,se,V){var _=ie.datatype();if(_==="number"||_==="BigNumber"||_==="Complex")return _;for(var W=!1,ne=!1,Q=!1,ue=0;ue<V;ue++)for(var oe=0;oe<V;oe++){var be=se[ue][oe];if(ze(be)||ru(be))W=!0;else if(Ze(be))ne=!0;else if($a(be))Q=!0;else throw TypeError("Unsupported type in Matrix: "+Ft(be))}if(ne&&Q&&console.warn("Complex BigNumbers not supported, this operation will lose precission."),Q){for(var Me=0;Me<V;Me++)for(var Pe=0;Pe<V;Pe++)se[Me][Pe]=g(se[Me][Pe]);return"Complex"}if(ne){for(var Ee=0;Ee<V;Ee++)for(var Oe=0;Oe<V;Oe++)se[Ee][Oe]=h(se[Ee][Oe]);return"BigNumber"}if(W){for(var Ie=0;Ie<V;Ie++)for(var R=0;R<V;R++)se[Ie][R]=x(se[Ie][R]);return"number"}else throw TypeError("Matrix contains unsupported types only.")}}),Oy="expm",uZ=["typed","abs","add","identity","inv","multiply"],lZ=I(Oy,uZ,e=>{var{typed:t,abs:r,add:n,identity:a,inv:i,multiply:o}=e;return t(Oy,{Matrix:function(f){var m=f.size();if(m.length!==2||m[0]!==m[1])throw new RangeError("Matrix must be square (size: "+at(m)+")");for(var d=m[0],h=1e-15,p=s(f),y=u(p,h),w=y.q,D=y.j,v=o(f,Math.pow(2,-D)),x=a(d),g=a(d),b=1,C=v,N=-1,A=1;A<=w;A++)A>1&&(C=o(C,v),N=-N),b=b*(w-A+1)/((2*w-A+1)*A),x=n(x,o(b,C)),g=n(g,o(b*N,C));for(var E=o(i(g),x),S=0;S<D;S++)E=o(E,E);return Vi(f)?f.createSparseMatrix(E):E}});function s(c){for(var f=c.size()[0],m=0,d=0;d<f;d++){for(var h=0,p=0;p<f;p++)h+=r(c.get([d,p]));m=Math.max(h,m)}return m}function u(c,f){for(var m=30,d=0;d<m;d++)for(var h=0;h<=d;h++){var p=d-h;if(l(c,h,p)<f)return{q:h,j:p}}throw new Error("Could not find acceptable parameters to compute the matrix exponential (try increasing maxSearchSize in expm.js)")}function l(c,f,m){for(var d=1,h=2;h<=f;h++)d*=h;for(var p=d,y=f+1;y<=2*f;y++)p*=y;var w=p*(2*f+1);return 8*Math.pow(c/Math.pow(2,m),2*f)*d*d/(p*w)}}),By="sqrtm",cZ=["typed","abs","add","multiply","map","sqrt","subtract","inv","size","max","identity"],fZ=I(By,cZ,e=>{var{typed:t,abs:r,add:n,multiply:a,map:i,sqrt:o,subtract:s,inv:u,size:l,max:c,identity:f}=e,m=1e3,d=1e-6;function h(p){var y,w=0,D=p,v=f(l(p));do{var x=D;if(D=a(.5,n(x,u(v))),v=a(.5,n(v,u(x))),y=c(r(s(D,x))),y>d&&++w>m)throw new Error("computing square root of matrix: iterative method could not converge")}while(y>d);return D}return t(By,{"Array | Matrix":function(y){var w=Re(y)?y.size():Ue(y);switch(w.length){case 1:if(w[0]===1)return i(y,o);throw new RangeError("Matrix must be square (size: "+at(w)+")");case 2:{var D=w[0],v=w[1];if(D===v)return h(y);throw new RangeError("Matrix must be square (size: "+at(w)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+at(w)+")")}}})}),$y="sylvester",mZ=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],dZ=I($y,mZ,e=>{var{typed:t,schur:r,matrixFromColumns:n,matrix:a,multiply:i,range:o,concat:s,transpose:u,index:l,subset:c,add:f,subtract:m,identity:d,lusolve:h,abs:p,config:y}=e;return t($y,{"Matrix, Matrix, Matrix":w,"Array, Matrix, Matrix":function(v,x,g){return w(a(v),x,g)},"Array, Array, Matrix":function(v,x,g){return w(a(v),a(x),g)},"Array, Matrix, Array":function(v,x,g){return w(a(v),x,a(g))},"Matrix, Array, Matrix":function(v,x,g){return w(v,a(x),g)},"Matrix, Array, Array":function(v,x,g){return w(v,a(x),a(g))},"Matrix, Matrix, Array":function(v,x,g){return w(v,x,a(g))},"Array, Array, Array":function(v,x,g){return w(a(v),a(x),a(g)).toArray()}});function w(D,v,x){for(var g=v.size()[0],b=D.size()[0],C=r(D),N=C.T,A=C.U,E=r(i(-1,v)),S=E.T,F=E.U,k=i(i(u(A),x),F),B=o(0,b),L=[],M=(ue,oe)=>s(ue,oe,1),$=(ue,oe)=>s(ue,oe,0),H=0;H<g;H++)if(H<g-1&&p(c(S,l(H+1,H)))>1e-5){for(var j=$(c(k,l(B,[H])),c(k,l(B,[H+1]))),Y=0;Y<H;Y++)j=f(j,$(i(L[Y],c(S,l(Y,H))),i(L[Y],c(S,l(Y,H+1)))));var te=i(d(b),i(-1,c(S,l(H,H)))),K=i(d(b),i(-1,c(S,l(H+1,H)))),P=i(d(b),i(-1,c(S,l(H,H+1)))),X=i(d(b),i(-1,c(S,l(H+1,H+1)))),z=$(M(f(N,te),K),M(P,f(N,X))),ie=h(z,j);L[H]=ie.subset(l(o(0,b),[0])),L[H+1]=ie.subset(l(o(b,2*b),[0])),H++}else{for(var se=c(k,l(B,[H])),V=0;V<H;V++)se=f(se,i(L[V],c(S,l(V,H))));var _=c(S,l(H,H)),W=m(N,i(_,d(b)));L[H]=h(W,se)}var ne=a(n(...L)),Q=i(A,i(ne,u(F)));return Q}}),_y="schur",hZ=["typed","matrix","identity","multiply","qr","norm","subtract"],pZ=I(_y,hZ,e=>{var{typed:t,matrix:r,identity:n,multiply:a,qr:i,norm:o,subtract:s}=e;return t(_y,{Array:function(c){var f=u(r(c));return{U:f.U.valueOf(),T:f.T.valueOf()}},Matrix:function(c){return u(c)}});function u(l){var c=l.size()[0],f=l,m=n(c),d=0,h;do{h=f;var p=i(f),y=p.Q,w=p.R;if(f=a(w,y),m=a(m,y),d++>100)break}while(o(s(f,h))>1e-4);return{U:m,T:f}}}),Iy="lyap",gZ=["typed","matrix","sylvester","multiply","transpose"],vZ=I(Iy,gZ,e=>{var{typed:t,matrix:r,sylvester:n,multiply:a,transpose:i}=e;return t(Iy,{"Matrix, Matrix":function(s,u){return n(s,i(s),a(-1,u))},"Array, Matrix":function(s,u){return n(r(s),i(r(s)),a(-1,u))},"Matrix, Array":function(s,u){return n(s,i(r(s)),r(a(-1,u)))},"Array, Array":function(s,u){return n(r(s),i(r(s)),r(a(-1,u))).toArray()}})}),yZ="divide",bZ=["typed","matrix","multiply","equalScalar","divideScalar","inv"],wZ=I(yZ,bZ,e=>{var{typed:t,matrix:r,multiply:n,equalScalar:a,divideScalar:i,inv:o}=e,s=Fr({typed:t,equalScalar:a}),u=$n({typed:t});return t("divide",ax({"Array | Matrix, Array | Matrix":function(c,f){return n(c,o(f))},"DenseMatrix, any":function(c,f){return u(c,f,i,!1)},"SparseMatrix, any":function(c,f){return s(c,f,i,!1)},"Array, any":function(c,f){return u(r(c),f,i,!1).valueOf()},"any, Array | Matrix":function(c,f){return n(c,o(f))}},i.signatures))}),zy="distance",xZ=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],DZ=I(zy,xZ,e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:a,divideScalar:i,deepEqual:o,sqrt:s,abs:u}=e;return t(zy,{"Array, Array, Array":function(g,b,C){if(g.length===2&&b.length===2&&C.length===2){if(!c(g))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!c(b))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!c(C))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(o(b,C))throw new TypeError("LinePoint1 should not be same with LinePoint2");var N=n(C[1],b[1]),A=n(b[0],C[0]),E=n(a(C[0],b[1]),a(b[0],C[1]));return y(g[0],g[1],N,A,E)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(g,b,C){if(Object.keys(g).length===2&&Object.keys(b).length===2&&Object.keys(C).length===2){if(!c(g))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!c(b))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!c(C))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(o(h(b),h(C)))throw new TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in g&&"pointY"in g&&"lineOnePtX"in b&&"lineOnePtY"in b&&"lineTwoPtX"in C&&"lineTwoPtY"in C){var N=n(C.lineTwoPtY,b.lineOnePtY),A=n(b.lineOnePtX,C.lineTwoPtX),E=n(a(C.lineTwoPtX,b.lineOnePtY),a(b.lineOnePtX,C.lineTwoPtY));return y(g.pointX,g.pointY,N,A,E)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(g,b){if(g.length===2&&b.length===3){if(!c(g))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!f(b))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return y(g[0],g[1],b[0],b[1],b[2])}else if(g.length===3&&b.length===6){if(!f(g))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!d(b))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return w(g[0],g[1],g[2],b[0],b[1],b[2],b[3],b[4],b[5])}else if(g.length===b.length&&g.length>0){if(!m(g))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!m(b))throw new TypeError("All values of an array should be numbers or BigNumbers");return D(g,b)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(g,b){if(Object.keys(g).length===2&&Object.keys(b).length===3){if(!c(g))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!f(b))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in g&&"pointY"in g&&"xCoeffLine"in b&&"yCoeffLine"in b&&"constant"in b)return y(g.pointX,g.pointY,b.xCoeffLine,b.yCoeffLine,b.constant);throw new TypeError("Key names do not match")}else if(Object.keys(g).length===3&&Object.keys(b).length===6){if(!f(g))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!d(b))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in g&&"pointY"in g&&"x0"in b&&"y0"in b&&"z0"in b&&"a"in b&&"b"in b&&"c"in b)return w(g.pointX,g.pointY,g.pointZ,b.x0,b.y0,b.z0,b.a,b.b,b.c);throw new TypeError("Key names do not match")}else if(Object.keys(g).length===2&&Object.keys(b).length===2){if(!c(g))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!c(b))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in g&&"pointOneY"in g&&"pointTwoX"in b&&"pointTwoY"in b)return D([g.pointOneX,g.pointOneY],[b.pointTwoX,b.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(g).length===3&&Object.keys(b).length===3){if(!f(g))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!f(b))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in g&&"pointOneY"in g&&"pointOneZ"in g&&"pointTwoX"in b&&"pointTwoY"in b&&"pointTwoZ"in b)return D([g.pointOneX,g.pointOneY,g.pointOneZ],[b.pointTwoX,b.pointTwoY,b.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(g){if(!p(g))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return v(g)}});function l(x){return typeof x=="number"||Ze(x)}function c(x){return x.constructor!==Array&&(x=h(x)),l(x[0])&&l(x[1])}function f(x){return x.constructor!==Array&&(x=h(x)),l(x[0])&&l(x[1])&&l(x[2])}function m(x){return Array.isArray(x)||(x=h(x)),x.every(l)}function d(x){return x.constructor!==Array&&(x=h(x)),l(x[0])&&l(x[1])&&l(x[2])&&l(x[3])&&l(x[4])&&l(x[5])}function h(x){for(var g=Object.keys(x),b=[],C=0;C<g.length;C++)b.push(x[g[C]]);return b}function p(x){if(x[0].length===2&&l(x[0][0])&&l(x[0][1])){if(x.some(g=>g.length!==2||!l(g[0])||!l(g[1])))return!1}else if(x[0].length===3&&l(x[0][0])&&l(x[0][1])&&l(x[0][2])){if(x.some(g=>g.length!==3||!l(g[0])||!l(g[1])||!l(g[2])))return!1}else return!1;return!0}function y(x,g,b,C,N){var A=u(r(r(a(b,x),a(C,g)),N)),E=s(r(a(b,b),a(C,C)));return i(A,E)}function w(x,g,b,C,N,A,E,S,F){var k=[n(a(n(N,g),F),a(n(A,b),S)),n(a(n(A,b),E),a(n(C,x),F)),n(a(n(C,x),S),a(n(N,g),E))];k=s(r(r(a(k[0],k[0]),a(k[1],k[1])),a(k[2],k[2])));var B=s(r(r(a(E,E),a(S,S)),a(F,F)));return i(k,B)}function D(x,g){for(var b=x.length,C=0,N=0,A=0;A<b;A++)N=n(x[A],g[A]),C=r(a(N,N),C);return s(C)}function v(x){for(var g=[],b=[],C=[],N=0;N<x.length-1;N++)for(var A=N+1;A<x.length;A++)x[0].length===2?(b=[x[N][0],x[N][1]],C=[x[A][0],x[A][1]]):x[0].length===3&&(b=[x[N][0],x[N][1],x[N][2]],C=[x[A][0],x[A][1],x[A][2]]),g.push(D(b,C));return g}}),NZ="intersect",AZ=["typed","config","abs","add","addScalar","matrix","multiply","multiplyScalar","divideScalar","subtract","smaller","equalScalar","flatten","isZero","isNumeric"],CZ=I(NZ,AZ,e=>{var{typed:t,config:r,abs:n,add:a,addScalar:i,matrix:o,multiply:s,multiplyScalar:u,divideScalar:l,subtract:c,smaller:f,equalScalar:m,flatten:d,isZero:h,isNumeric:p}=e;return t("intersect",{"Array, Array, Array":y,"Array, Array, Array, Array":w,"Matrix, Matrix, Matrix":function(S,F,k){var B=y(S.valueOf(),F.valueOf(),k.valueOf());return B===null?null:o(B)},"Matrix, Matrix, Matrix, Matrix":function(S,F,k,B){var L=w(S.valueOf(),F.valueOf(),k.valueOf(),B.valueOf());return L===null?null:o(L)}});function y(E,S,F){if(E=D(E),S=D(S),F=D(F),!x(E))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!x(S))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!g(F))throw new TypeError("Array with 4 numbers expected as third argument");return A(E[0],E[1],E[2],S[0],S[1],S[2],F[0],F[1],F[2],F[3])}function w(E,S,F,k){if(E=D(E),S=D(S),F=D(F),k=D(k),E.length===2){if(!v(E))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!v(S))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!v(F))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!v(k))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return b(E,S,F,k)}else if(E.length===3){if(!x(E))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!x(S))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!x(F))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!x(k))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return N(E[0],E[1],E[2],S[0],S[1],S[2],F[0],F[1],F[2],k[0],k[1],k[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function D(E){return E.length===1?E[0]:E.length>1&&Array.isArray(E[0])&&E.every(S=>Array.isArray(S)&&S.length===1)?d(E):E}function v(E){return E.length===2&&p(E[0])&&p(E[1])}function x(E){return E.length===3&&p(E[0])&&p(E[1])&&p(E[2])}function g(E){return E.length===4&&p(E[0])&&p(E[1])&&p(E[2])&&p(E[3])}function b(E,S,F,k){var B=E,L=F,M=c(B,S),$=c(L,k),H=c(u(M[0],$[1]),u($[0],M[1]));if(h(H)||f(n(H),r.relTol))return null;var j=u($[0],B[1]),Y=u($[1],B[0]),te=u($[0],L[1]),K=u($[1],L[0]),P=l(i(c(c(j,Y),te),K),H);return a(s(M,P),B)}function C(E,S,F,k,B,L,M,$,H,j,Y,te){var K=u(c(E,S),c(F,k)),P=u(c(B,L),c(M,$)),X=u(c(H,j),c(Y,te));return i(i(K,P),X)}function N(E,S,F,k,B,L,M,$,H,j,Y,te){var K=C(E,M,j,M,S,$,Y,$,F,H,te,H),P=C(j,M,k,E,Y,$,B,S,te,H,L,F),X=C(E,M,k,E,S,$,B,S,F,H,L,F),z=C(j,M,j,M,Y,$,Y,$,te,H,te,H),ie=C(k,E,k,E,B,S,B,S,L,F,L,F),se=c(u(K,P),u(X,z)),V=c(u(ie,z),u(P,P));if(h(V))return null;var _=l(se,V),W=l(i(K,u(_,P)),z),ne=i(E,u(_,c(k,E))),Q=i(S,u(_,c(B,S))),ue=i(F,u(_,c(L,F))),oe=i(M,u(W,c(j,M))),be=i($,u(W,c(Y,$))),Me=i(H,u(W,c(te,H)));return m(ne,oe)&&m(Q,be)&&m(ue,Me)?[ne,Q,ue]:null}function A(E,S,F,k,B,L,M,$,H,j){var Y=u(E,M),te=u(k,M),K=u(S,$),P=u(B,$),X=u(F,H),z=u(L,H),ie=c(c(c(j,Y),K),X),se=c(c(c(i(i(te,P),z),Y),K),X),V=l(ie,se),_=i(E,u(V,c(k,E))),W=i(S,u(V,c(B,S))),ne=i(F,u(V,c(L,F)));return[_,W,ne]}}),jy="sum",EZ=["typed","config","add","numeric"],Y2=I(jy,EZ,e=>{var{typed:t,config:r,add:n,numeric:a}=e;return t(jy,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":o,"...":function(u){if(rs(u))throw new TypeError("Scalar values expected in function sum");return i(u)}});function i(s){var u;return pi(s,function(l){try{u=u===void 0?l:n(u,l)}catch(c){throw Yr(c,"sum",l)}}),u===void 0&&(u=a(0,r.number)),typeof u=="string"&&(u=a(u,vi(u,r))),u}function o(s,u){try{var l=Mc(s,u,n);return l}catch(c){throw Yr(c,"sum")}}}),bl="cumsum",SZ=["typed","add","unaryPlus"],Z2=I(bl,SZ,e=>{var{typed:t,add:r,unaryPlus:n}=e;return t(bl,{Array:a,Matrix:function(l){return l.create(a(l.valueOf(),l.datatype()))},"Array, number | BigNumber":o,"Matrix, number | BigNumber":function(l,c){return l.create(o(l.valueOf(),c),l.datatype())},"...":function(l){if(rs(l))throw new TypeError("All values expected to be scalar in function cumsum");return a(l)}});function a(u){try{return i(u)}catch(l){throw Yr(l,bl)}}function i(u){if(u.length===0)return[];for(var l=[n(u[0])],c=1;c<u.length;++c)l.push(r(l[c-1],u[c]));return l}function o(u,l){var c=Ue(u);if(l<0||l>=c.length)throw new Qn(l,c.length);try{return s(u,l)}catch(f){throw Yr(f,bl)}}function s(u,l){var c,f,m;if(l<=0){var d=u[0][0];if(Array.isArray(d)){for(m=kx(u),f=[],c=0;c<m.length;c++)f[c]=s(m[c],l-1);return f}else return i(u)}else{for(f=[],c=0;c<u.length;c++)f[c]=s(u[c],l-1);return f}}}),qy="mean",MZ=["typed","add","divide"],Q2=I(qy,MZ,e=>{var{typed:t,add:r,divide:n}=e;return t(qy,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":a,"...":function(s){if(rs(s))throw new TypeError("Scalar values expected in function mean");return i(s)}});function a(o,s){try{var u=Mc(o,s,r),l=Array.isArray(o)?Ue(o):o.size();return n(u,l[s])}catch(c){throw Yr(c,"mean")}}function i(o){var s,u=0;if(pi(o,function(l){try{s=s===void 0?l:r(s,l),u++}catch(c){throw Yr(c,"mean",l)}}),u===0)throw new Error("Cannot calculate the mean of an empty array");return n(s,u)}}),Ry="median",TZ=["typed","add","divide","compare","partitionSelect"],FZ=I(Ry,TZ,e=>{var{typed:t,add:r,divide:n,compare:a,partitionSelect:i}=e;function o(l){try{l=mt(l.valueOf());var c=l.length;if(c===0)throw new Error("Cannot calculate median of an empty array");if(c%2===0){for(var f=c/2-1,m=i(l,f+1),d=l[f],h=0;h<f;++h)a(l[h],d)>0&&(d=l[h]);return u(d,m)}else{var p=i(l,(c-1)/2);return s(p)}}catch(y){throw Yr(y,"median")}}var s=t({"number | BigNumber | Complex | Unit":function(c){return c}}),u=t({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(c,f){return n(r(c,f),2)}});return t(Ry,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(c,f){throw new Error("median(A, dim) is not yet supported")},"...":function(c){if(rs(c))throw new TypeError("Scalar values expected in function median");return o(c)}})}),Ly="mad",PZ=["typed","abs","map","median","subtract"],kZ=I(Ly,PZ,e=>{var{typed:t,abs:r,map:n,median:a,subtract:i}=e;return t(Ly,{"Array | Matrix":o,"...":function(u){return o(u)}});function o(s){if(s=mt(s.valueOf()),s.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var u=a(s);return a(n(s,function(l){return r(i(l,u))}))}catch(l){throw l instanceof TypeError&&l.message.includes("median")?new TypeError(l.message.replace("median","mad")):Yr(l,"mad")}}}),Lf="unbiased",Hy="variance",OZ=["typed","add","subtract","multiply","divide","mapSlices","isNaN"],X2=I(Hy,OZ,e=>{var{typed:t,add:r,subtract:n,multiply:a,divide:i,mapSlices:o,isNaN:s}=e;return t(Hy,{"Array | Matrix":function(f){return u(f,Lf)},"Array | Matrix, string":u,"Array | Matrix, number | BigNumber":function(f,m){return l(f,m,Lf)},"Array | Matrix, number | BigNumber, string":l,"...":function(f){return u(f,Lf)}});function u(c,f){var m,d=0;if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(pi(c,function(y){try{m=m===void 0?y:r(m,y),d++}catch(w){throw Yr(w,"variance",y)}}),d===0)throw new Error("Cannot calculate variance of an empty array");var h=i(m,d);if(m=void 0,pi(c,function(y){var w=n(y,h);m=m===void 0?a(w,w):r(m,a(w,w))}),s(m))return m;switch(f){case"uncorrected":return i(m,d);case"biased":return i(m,d+1);case"unbiased":{var p=Ze(m)?m.mul(0):0;return d===1?p:i(m,d-1)}default:throw new Error('Unknown normalization "'+f+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function l(c,f,m){try{if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return o(c,f,d=>u(d,m))}catch(d){throw Yr(d,"variance")}}}),Gy="quantileSeq",BZ=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger","mapSlices"],eD=I(Gy,BZ,e=>{var{typed:t,bignumber:r,add:n,subtract:a,divide:i,multiply:o,partitionSelect:s,compare:u,isInteger:l,smaller:c,smallerEq:f,larger:m,mapSlices:d}=e;return t(Gy,{"Array | Matrix, number | BigNumber":(D,v)=>p(D,v,!1),"Array | Matrix, number | BigNumber, number":(D,v,x)=>h(D,v,!1,x,p),"Array | Matrix, number | BigNumber, boolean":p,"Array | Matrix, number | BigNumber, boolean, number":(D,v,x,g)=>h(D,v,x,g,p),"Array | Matrix, Array | Matrix":(D,v)=>y(D,v,!1),"Array | Matrix, Array | Matrix, number":(D,v,x)=>h(D,v,!1,x,y),"Array | Matrix, Array | Matrix, boolean":y,"Array | Matrix, Array | Matrix, boolean, number":(D,v,x,g)=>h(D,v,x,g,y)});function h(D,v,x,g,b){return d(D,g,C=>b(C,v,x))}function p(D,v,x){var g,b=D.valueOf();if(c(v,0))throw new Error("N/prob must be non-negative");if(f(v,1))return ze(v)?w(b,v,x):r(w(b,v,x));if(m(v,1)){if(!l(v))throw new Error("N must be a positive integer");if(m(v,4294967295))throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var C=n(v,1);g=[];for(var N=0;c(N,v);N++){var A=i(N+1,C);g.push(w(b,A,x))}return ze(v)?g:r(g)}}function y(D,v,x){for(var g=D.valueOf(),b=v.valueOf(),C=[],N=0;N<b.length;++N)C.push(w(g,b[N],x));return C}function w(D,v,x){var g=mt(D),b=g.length;if(b===0)throw new Error("Cannot calculate quantile of an empty sequence");var C=ze(v)?v*(b-1):v.times(b-1),N=ze(v)?Math.floor(C):C.floor().toNumber(),A=ze(v)?C%1:C.minus(N);if(l(C))return x?g[C]:s(g,ze(v)?C:C.valueOf());var E,S;if(x)E=g[N],S=g[N+1];else{S=s(g,N+1),E=g[N];for(var F=0;F<N;++F)u(g[F],E)>0&&(E=g[F])}return n(o(E,a(1,A)),o(S,A))}}),Vy="std",$Z=["typed","map","sqrt","variance"],tD=I(Vy,$Z,e=>{var{typed:t,map:r,sqrt:n,variance:a}=e;return t(Vy,{"Array | Matrix":i,"Array | Matrix, string":i,"Array | Matrix, number | BigNumber":i,"Array | Matrix, number | BigNumber, string":i,"...":function(s){return i(s)}});function i(o,s){if(o.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var u=a.apply(null,arguments);return gn(u)?r(u,n):n(u)}catch(l){throw l instanceof TypeError&&l.message.includes(" variance")?new TypeError(l.message.replace(" variance"," std")):l}}}),Uy="corr",_Z=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],IZ=I(Uy,_Z,e=>{var{typed:t,matrix:r,sqrt:n,sum:a,add:i,subtract:o,multiply:s,pow:u,divide:l}=e;return t(Uy,{"Array, Array":function(d,h){return c(d,h)},"Matrix, Matrix":function(d,h){var p=c(d.toArray(),h.toArray());return Array.isArray(p)?r(p):p}});function c(m,d){var h=[];if(Array.isArray(m[0])&&Array.isArray(d[0])){if(m.length!==d.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var p=0;p<m.length;p++){if(m[p].length!==d[p].length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same number of elements.");h.push(f(m[p],d[p]))}return h}else{if(m.length!==d.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same number of elements.");return f(m,d)}}function f(m,d){var h=m.length,p=a(m),y=a(d),w=m.reduce((b,C,N)=>i(b,s(C,d[N])),0),D=a(m.map(b=>u(b,2))),v=a(d.map(b=>u(b,2))),x=o(s(h,w),s(p,y)),g=n(s(o(s(h,D),u(p,2)),o(s(h,v),u(y,2))));return l(x,g)}}),Wy="bernoulli",zZ=["typed","config","isInteger","number","?BigNumber","?Fraction"],jZ=I(Wy,zZ,e=>{var{typed:t,config:r,number:n,BigNumber:a,Fraction:i}=e,o=[void 0],s=[void 0],u=[void 0],l=50;return t(Wy,{number:c=>Hf(c,f=>f,o,(f,m)=>f+m,(f,m)=>f*m,(f,m)=>f/m),"bigint | Fraction":c=>Hf(n(c),f=>new i(f),s,(f,m)=>f.add(m),(f,m)=>f.mul(m),(f,m)=>f.div(m)),BigNumber:c=>(r.precision!==l&&(u=[void 0],l=r.precision),Hf(n(c),f=>new a(f),u,(f,m)=>f.add(m),(f,m)=>f.mul(m),(f,m)=>f.div(m)))})});function Hf(e,t,r,n,a,i){if(e<0||!ke(e))throw new RangeError("Bernoulli index must be nonnegative integer");if(e===0)return t(1);if(e===1)return i(t(-1),t(2));if(e%2===1)return t(0);var o=t(1);r.length===1&&r.push([i(o,t(-3)),i(o,t(-2)),i(o,t(6))]);for(var s=e/2,u=t(0),l=t(2);r.length<=s;){for(var c=r.length,f=Math.floor((c+1)/2),m=u,d=1;d<f;++d)m=n(m,a(r[d][0],r[c-d][0]));m=a(m,l),c%2===0&&(m=n(m,a(r[f][0],r[f][0]))),m=i(m,t(-(2*c+1)));var h=i(a(r[c-1][1],t(-c*(2*c-1))),l);r.push([m,h,a(h,m)])}return r[s][2]}var Jy="combinations",qZ=["typed"],RZ=I(Jy,qZ,e=>{var{typed:t}=e;return t(Jy,{"number, number":Xx,"BigNumber, BigNumber":function(n,a){var i=n.constructor,o,s,u=n.minus(a),l=new i(1);if(!Ky(n)||!Ky(a))throw new TypeError("Positive integer value expected in function combinations");if(a.gt(n))throw new TypeError("k must be less than n in function combinations");if(o=l,a.lt(u))for(s=l;s.lte(u);s=s.plus(l))o=o.times(a.plus(s)).dividedBy(s);else for(s=l;s.lte(a);s=s.plus(l))o=o.times(u.plus(s)).dividedBy(s);return o}})});function Ky(e){return e.isInteger()&&e.gte(0)}var Yy="combinationsWithRep",LZ=["typed"],HZ=I(Yy,LZ,e=>{var{typed:t}=e;return t(Yy,{"number, number":function(n,a){if(!ke(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!ke(a)||a<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(n<1)throw new TypeError("k must be less than or equal to n + k - 1");if(a<n-1){var i=Ba(n,n+a-1);return i/Ba(1,a)}var o=Ba(a+1,n+a-1);return o/Ba(1,n-1)},"BigNumber, BigNumber":function(n,a){var i=n.constructor,o,s,u=new i(1),l=n.minus(u);if(!Zy(n)||!Zy(a))throw new TypeError("Positive integer value expected in function combinationsWithRep");if(n.lt(u))throw new TypeError("k must be less than or equal to n + k - 1 in function combinationsWithRep");if(o=u,a.lt(l))for(s=u;s.lte(l);s=s.plus(u))o=o.times(a.plus(s)).dividedBy(s);else for(s=u;s.lte(a);s=s.plus(u))o=o.times(l.plus(s)).dividedBy(s);return o}})});function Zy(e){return e.isInteger()&&e.gte(0)}var Qy="gamma",GZ=["typed","config","multiplyScalar","pow","BigNumber","Complex"],VZ=I(Qy,GZ,e=>{var{typed:t,config:r,multiplyScalar:n,pow:a,BigNumber:i,Complex:o}=e;function s(l){if(l.im===0)return tc(l.re);if(l.re<.5){var c=new o(1-l.re,-l.im),f=new o(Math.PI*l.re,Math.PI*l.im);return new o(Math.PI).div(f.sin()).div(s(c))}l=new o(l.re-1,l.im);for(var m=new o(Lo[0],0),d=1;d<Lo.length;++d){var h=new o(Lo[d],0);m=m.add(h.div(l.add(d)))}var p=new o(l.re+t2+.5,l.im),y=Math.sqrt(2*Math.PI),w=p.pow(l.add(.5)),D=p.neg().exp();return m.mul(y).mul(w).mul(D)}return t(Qy,{number:tc,Complex:s,BigNumber:function(c){if(c.isInteger())return c.isNegative()||c.isZero()?new i(1/0):u(c.minus(1));if(!c.isFinite())return new i(c.isNegative()?NaN:1/0);throw new Error("Integer BigNumber expected")}});function u(l){if(l<8)return new i([1,1,2,6,24,120,720,5040][l]);var c=r.precision+(Math.log(l.toNumber())|0),f=i.clone({precision:c});if(l%2===1)return l.times(u(new i(l-1)));for(var m=l,d=new f(l),h=l.toNumber();m>2;)m-=2,h+=m,d=d.times(h);return new i(d.toPrecision(i.precision))}}),Xy="lgamma",UZ=["Complex","typed"],WZ=I(Xy,UZ,e=>{var{Complex:t,typed:r}=e,n=7,a=7,i=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return r(Xy,{number:rc,Complex:o,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function o(l){var c=6.283185307179586,f=1.1447298858494002,m=.1;if(l.isNaN())return new t(NaN,NaN);if(l.im===0)return new t(rc(l.re),0);if(l.re>=n||Math.abs(l.im)>=a)return s(l);if(l.re<=m){var d=b9(c,l.im)*Math.floor(.5*l.re+.25),h=l.mul(Math.PI).sin().log(),p=o(new t(1-l.re,-l.im));return new t(f,d).sub(h).sub(p)}else return l.im>=0?u(l):u(l.conjugate()).conjugate()}function s(l){for(var c=l.sub(.5).mul(l.log()).sub(l).add(r2),f=new t(1,0).div(l),m=f.div(l),d=i[0],h=i[1],p=2*m.re,y=m.re*m.re+m.im*m.im,w=2;w<8;w++){var D=h;h=-y*d+i[w],d=p*d+D}var v=f.mul(m.mul(d).add(h));return c.add(v)}function u(l){var c=0,f=0,m=l;for(l=l.add(1);l.re<=n;){m=m.mul(l);var d=m.im<0?1:0;d!==0&&f===0&&c++,f=d,l=l.add(1)}return s(l).sub(m.log()).sub(new t(0,c*2*Math.PI*1))}}),eb="factorial",JZ=["typed","gamma"],KZ=I(eb,JZ,e=>{var{typed:t,gamma:r}=e;return t(eb,{number:function(a){if(a<0)throw new Error("Value must be non-negative");return r(a+1)},BigNumber:function(a){if(a.isNegative())throw new Error("Value must be non-negative");return r(a.plus(1))},"Array | Matrix":t.referToSelf(n=>a=>Qe(a,n))})}),tb="kldivergence",YZ=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],ZZ=I(tb,YZ,e=>{var{typed:t,matrix:r,divide:n,sum:a,multiply:i,map:o,dotDivide:s,log:u,isNumeric:l}=e;return t(tb,{"Array, Array":function(m,d){return c(r(m),r(d))},"Matrix, Array":function(m,d){return c(m,r(d))},"Array, Matrix":function(m,d){return c(r(m),d)},"Matrix, Matrix":function(m,d){return c(m,d)}});function c(f,m){var d=m.size().length,h=f.size().length;if(d>1)throw new Error("first object must be one dimensional");if(h>1)throw new Error("second object must be one dimensional");if(d!==h)throw new Error("Length of two vectors must be equal");var p=a(f);if(p===0)throw new Error("Sum of elements in first object must be non zero");var y=a(m);if(y===0)throw new Error("Sum of elements in second object must be non zero");var w=n(f,a(f)),D=n(m,a(m)),v=a(i(w,o(s(w,D),x=>u(x))));return l(v)?v:Number.NaN}}),rb="multinomial",QZ=["typed","add","divide","multiply","factorial","isInteger","isPositive"],XZ=I(rb,QZ,e=>{var{typed:t,add:r,divide:n,multiply:a,factorial:i,isInteger:o,isPositive:s}=e;return t(rb,{"Array | Matrix":function(l){var c=0,f=1;return pi(l,function(m){if(!o(m)||!s(m))throw new TypeError("Positive integer value expected in function multinomial");c=r(c,m),f=a(f,i(m))}),n(i(c),f)}})}),nb="permutations",eQ=["typed","factorial"],tQ=I(nb,eQ,e=>{var{typed:t,factorial:r}=e;return t(nb,{"number | BigNumber":r,"number, number":function(a,i){if(!ke(a)||a<0)throw new TypeError("Positive integer value expected in function permutations");if(!ke(i)||i<0)throw new TypeError("Positive integer value expected in function permutations");if(i>a)throw new TypeError("second argument k must be less than or equal to first argument n");return Ba(a-i+1,a)},"BigNumber, BigNumber":function(a,i){var o,s;if(!ab(a)||!ab(i))throw new TypeError("Positive integer value expected in function permutations");if(i.gt(a))throw new TypeError("second argument k must be less than or equal to first argument n");var u=a.mul(0).add(1);for(o=u,s=a.minus(i).plus(1);s.lte(a);s=s.plus(1))o=o.times(s);return o}})});function ab(e){return e.isInteger()&&e.gte(0)}var Sl={exports:{}},rQ=Sl.exports,ib;function nQ(){return ib||(ib=1,(function(e){(function(t,r,n){function a(u){var l=this,c=s();l.next=function(){var f=2091639*l.s0+l.c*23283064365386963e-26;return l.s0=l.s1,l.s1=l.s2,l.s2=f-(l.c=f|0)},l.c=1,l.s0=c(" "),l.s1=c(" "),l.s2=c(" "),l.s0-=c(u),l.s0<0&&(l.s0+=1),l.s1-=c(u),l.s1<0&&(l.s1+=1),l.s2-=c(u),l.s2<0&&(l.s2+=1),c=null}function i(u,l){return l.c=u.c,l.s0=u.s0,l.s1=u.s1,l.s2=u.s2,l}function o(u,l){var c=new a(u),f=l&&l.state,m=c.next;return m.int32=function(){return c.next()*4294967296|0},m.double=function(){return m()+(m()*2097152|0)*11102230246251565e-32},m.quick=m,f&&(typeof f=="object"&&i(f,c),m.state=function(){return i(c,{})}),m}function s(){var u=4022871197,l=function(c){c=String(c);for(var f=0;f<c.length;f++){u+=c.charCodeAt(f);var m=.02519603282416938*u;u=m>>>0,m-=u,m*=u,u=m>>>0,m-=u,u+=m*4294967296}return(u>>>0)*23283064365386963e-26};return l}r&&r.exports?r.exports=o:this.alea=o})(rQ,e)})(Sl)),Sl.exports}var Ml={exports:{}},aQ=Ml.exports,ob;function iQ(){return ob||(ob=1,(function(e){(function(t,r,n){function a(s){var u=this,l="";u.x=0,u.y=0,u.z=0,u.w=0,u.next=function(){var f=u.x^u.x<<11;return u.x=u.y,u.y=u.z,u.z=u.w,u.w^=u.w>>>19^f^f>>>8},s===(s|0)?u.x=s:l+=s;for(var c=0;c<l.length+64;c++)u.x^=l.charCodeAt(c)|0,u.next()}function i(s,u){return u.x=s.x,u.y=s.y,u.z=s.z,u.w=s.w,u}function o(s,u){var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var m=l.next()>>>11,d=(l.next()>>>0)/4294967296,h=(m+d)/(1<<21);while(h===0);return h},f.int32=l.next,f.quick=f,c&&(typeof c=="object"&&i(c,l),f.state=function(){return i(l,{})}),f}r&&r.exports?r.exports=o:this.xor128=o})(aQ,e)})(Ml)),Ml.exports}var Tl={exports:{}},oQ=Tl.exports,sb;function sQ(){return sb||(sb=1,(function(e){(function(t,r,n){function a(s){var u=this,l="";u.next=function(){var f=u.x^u.x>>>2;return u.x=u.y,u.y=u.z,u.z=u.w,u.w=u.v,(u.d=u.d+362437|0)+(u.v=u.v^u.v<<4^(f^f<<1))|0},u.x=0,u.y=0,u.z=0,u.w=0,u.v=0,s===(s|0)?u.x=s:l+=s;for(var c=0;c<l.length+64;c++)u.x^=l.charCodeAt(c)|0,c==l.length&&(u.d=u.x<<10^u.x>>>4),u.next()}function i(s,u){return u.x=s.x,u.y=s.y,u.z=s.z,u.w=s.w,u.v=s.v,u.d=s.d,u}function o(s,u){var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var m=l.next()>>>11,d=(l.next()>>>0)/4294967296,h=(m+d)/(1<<21);while(h===0);return h},f.int32=l.next,f.quick=f,c&&(typeof c=="object"&&i(c,l),f.state=function(){return i(l,{})}),f}r&&r.exports?r.exports=o:this.xorwow=o})(oQ,e)})(Tl)),Tl.exports}var Fl={exports:{}},uQ=Fl.exports,ub;function lQ(){return ub||(ub=1,(function(e){(function(t,r,n){function a(s){var u=this;u.next=function(){var c=u.x,f=u.i,m,d;return m=c[f],m^=m>>>7,d=m^m<<24,m=c[f+1&7],d^=m^m>>>10,m=c[f+3&7],d^=m^m>>>3,m=c[f+4&7],d^=m^m<<7,m=c[f+7&7],m=m^m<<13,d^=m^m<<9,c[f]=d,u.i=f+1&7,d};function l(c,f){var m,d=[];if(f===(f|0))d[0]=f;else for(f=""+f,m=0;m<f.length;++m)d[m&7]=d[m&7]<<15^f.charCodeAt(m)+d[m+1&7]<<13;for(;d.length<8;)d.push(0);for(m=0;m<8&&d[m]===0;++m);for(m==8?d[7]=-1:d[m],c.x=d,c.i=0,m=256;m>0;--m)c.next()}l(u,s)}function i(s,u){return u.x=s.x.slice(),u.i=s.i,u}function o(s,u){s==null&&(s=+new Date);var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var m=l.next()>>>11,d=(l.next()>>>0)/4294967296,h=(m+d)/(1<<21);while(h===0);return h},f.int32=l.next,f.quick=f,c&&(c.x&&i(c,l),f.state=function(){return i(l,{})}),f}r&&r.exports?r.exports=o:this.xorshift7=o})(uQ,e)})(Fl)),Fl.exports}var Pl={exports:{}},cQ=Pl.exports,lb;function fQ(){return lb||(lb=1,(function(e){(function(t,r,n){function a(s){var u=this;u.next=function(){var c=u.w,f=u.X,m=u.i,d,h;return u.w=c=c+1640531527|0,h=f[m+34&127],d=f[m=m+1&127],h^=h<<13,d^=d<<17,h^=h>>>15,d^=d>>>12,h=f[m]=h^d,u.i=m,h+(c^c>>>16)|0};function l(c,f){var m,d,h,p,y,w=[],D=128;for(f===(f|0)?(d=f,f=null):(f=f+"\0",d=0,D=Math.max(D,f.length)),h=0,p=-32;p<D;++p)f&&(d^=f.charCodeAt((p+32)%f.length)),p===0&&(y=d),d^=d<<10,d^=d>>>15,d^=d<<4,d^=d>>>13,p>=0&&(y=y+1640531527|0,m=w[p&127]^=d+y,h=m==0?h+1:0);for(h>=128&&(w[(f&&f.length||0)&127]=-1),h=127,p=512;p>0;--p)d=w[h+34&127],m=w[h=h+1&127],d^=d<<13,m^=m<<17,d^=d>>>15,m^=m>>>12,w[h]=d^m;c.w=y,c.X=w,c.i=h}l(u,s)}function i(s,u){return u.i=s.i,u.w=s.w,u.X=s.X.slice(),u}function o(s,u){s==null&&(s=+new Date);var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var m=l.next()>>>11,d=(l.next()>>>0)/4294967296,h=(m+d)/(1<<21);while(h===0);return h},f.int32=l.next,f.quick=f,c&&(c.X&&i(c,l),f.state=function(){return i(l,{})}),f}r&&r.exports?r.exports=o:this.xor4096=o})(cQ,e)})(Pl)),Pl.exports}var kl={exports:{}},mQ=kl.exports,cb;function dQ(){return cb||(cb=1,(function(e){(function(t,r,n){function a(s){var u=this,l="";u.next=function(){var f=u.b,m=u.c,d=u.d,h=u.a;return f=f<<25^f>>>7^m,m=m-d|0,d=d<<24^d>>>8^h,h=h-f|0,u.b=f=f<<20^f>>>12^m,u.c=m=m-d|0,u.d=d<<16^m>>>16^h,u.a=h-f|0},u.a=0,u.b=0,u.c=-1640531527,u.d=1367130551,s===Math.floor(s)?(u.a=s/4294967296|0,u.b=s|0):l+=s;for(var c=0;c<l.length+20;c++)u.b^=l.charCodeAt(c)|0,u.next()}function i(s,u){return u.a=s.a,u.b=s.b,u.c=s.c,u.d=s.d,u}function o(s,u){var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var m=l.next()>>>11,d=(l.next()>>>0)/4294967296,h=(m+d)/(1<<21);while(h===0);return h},f.int32=l.next,f.quick=f,c&&(typeof c=="object"&&i(c,l),f.state=function(){return i(l,{})}),f}r&&r.exports?r.exports=o:this.tychei=o})(mQ,e)})(kl)),kl.exports}var Ol={exports:{}};const hQ={},pQ=Object.freeze(Object.defineProperty({__proto__:null,default:hQ},Symbol.toStringTag,{value:"Module"})),gQ=Js.getAugmentedNamespace(pQ);var vQ=Ol.exports,fb;function yQ(){return fb||(fb=1,(function(e){(function(t,r,n){var a=256,i=6,o=52,s="random",u=n.pow(a,i),l=n.pow(2,o),c=l*2,f=a-1,m;function d(x,g,b){var C=[];g=g==!0?{entropy:!0}:g||{};var N=w(y(g.entropy?[x,v(r)]:x??D(),3),C),A=new h(C),E=function(){for(var S=A.g(i),F=u,k=0;S<l;)S=(S+k)*a,F*=a,k=A.g(1);for(;S>=c;)S/=2,F/=2,k>>>=1;return(S+k)/F};return E.int32=function(){return A.g(4)|0},E.quick=function(){return A.g(4)/4294967296},E.double=E,w(v(A.S),r),(g.pass||b||function(S,F,k,B){return B&&(B.S&&p(B,A),S.state=function(){return p(A,{})}),k?(n[s]=S,F):S})(E,N,"global"in g?g.global:this==n,g.state)}function h(x){var g,b=x.length,C=this,N=0,A=C.i=C.j=0,E=C.S=[];for(b||(x=[b++]);N<a;)E[N]=N++;for(N=0;N<a;N++)E[N]=E[A=f&A+x[N%b]+(g=E[N])],E[A]=g;(C.g=function(S){for(var F,k=0,B=C.i,L=C.j,M=C.S;S--;)F=M[B=f&B+1],k=k*a+M[f&(M[B]=M[L=f&L+F])+(M[L]=F)];return C.i=B,C.j=L,k})(a)}function p(x,g){return g.i=x.i,g.j=x.j,g.S=x.S.slice(),g}function y(x,g){var b=[],C=typeof x,N;if(g&&C=="object")for(N in x)try{b.push(y(x[N],g-1))}catch{}return b.length?b:C=="string"?x:x+"\0"}function w(x,g){for(var b=x+"",C,N=0;N<b.length;)g[f&N]=f&(C^=g[f&N]*19)+b.charCodeAt(N++);return v(g)}function D(){try{var x;return m&&(x=m.randomBytes)?x=x(a):(x=new Uint8Array(a),(t.crypto||t.msCrypto).getRandomValues(x)),v(x)}catch{var g=t.navigator,b=g&&g.plugins;return[+new Date,t,b,t.screen,v(r)]}}function v(x){return String.fromCharCode.apply(0,x)}if(w(n.random(),r),e.exports){e.exports=d;try{m=gQ}catch{}}else n["seed"+s]=d})(typeof self<"u"?self:vQ,[],Math)})(Ol)),Ol.exports}var Gf,mb;function bQ(){if(mb)return Gf;mb=1;var e=nQ(),t=iQ(),r=sQ(),n=lQ(),a=fQ(),i=dQ(),o=yQ();return o.alea=e,o.xor128=t,o.xorwow=r,o.xorshift7=n,o.xor4096=a,o.tychei=i,Gf=o,Gf}var wQ=bQ();const rD=Js.getDefaultExportFromCjs(wQ);var xQ=rD(Date.now());function Yo(e){var t;function r(a){t=a===null?xQ:rD(String(a))}r(e);function n(){return t()}return n}var db="pickRandom",DQ=["typed","config","?on"],NQ=I(db,DQ,e=>{var{typed:t,config:r,on:n}=e,a=Yo(r.randomSeed);return n&&n("config",function(o,s){o.randomSeed!==s.randomSeed&&(a=Yo(o.randomSeed))}),t(db,{"Array | Matrix":function(s){return i(s,{})},"Array | Matrix, Object":function(s,u){return i(s,u)},"Array | Matrix, number":function(s,u){return i(s,{number:u})},"Array | Matrix, Array | Matrix":function(s,u){return i(s,{weights:u})},"Array | Matrix, Array | Matrix, number":function(s,u,l){return i(s,{number:l,weights:u})},"Array | Matrix, number, Array | Matrix":function(s,u,l){return i(s,{number:u,weights:l})}});function i(o,s){var{number:u,weights:l,elementWise:c=!0}=s,f=typeof u>"u";f&&(u=1);var m=Re(o)?o.create:Re(l)?l.create:null;o=o.valueOf(),l&&(l=l.valueOf()),c===!0&&(o=mt(o),l=mt(l));var d=0;if(typeof l<"u"){if(l.length!==o.length)throw new Error("Weights must have the same length as possibles");for(var h=0,p=l.length;h<p;h++){if(!ze(l[h])||l[h]<0)throw new Error("Weights must be an array of positive numbers");d+=l[h]}}for(var y=o.length,w=[],D;w.length<u;){if(typeof l>"u")D=o[Math.floor(a()*y)];else for(var v=a()*d,x=0,g=o.length;x<g;x++)if(v-=l[x],v<0){D=o[x];break}w.push(D)}return f?w[0]:m?m(w):w}});function $d(e,t){var r=[];if(e=e.slice(0),e.length>1)for(var n=0,a=e.shift();n<a;n++)r.push($d(e,t));else for(var i=0,o=e.shift();i<o;i++)r.push(t());return r}var hb="random",AQ=["typed","config","?on"],CQ=I(hb,AQ,e=>{var{typed:t,config:r,on:n}=e,a=Yo(r.randomSeed);return n&&n("config",function(s,u){s.randomSeed!==u.randomSeed&&(a=Yo(s.randomSeed))}),t(hb,{"":()=>o(0,1),number:s=>o(0,s),"number, number":(s,u)=>o(s,u),"Array | Matrix":s=>i(s,0,1),"Array | Matrix, number":(s,u)=>i(s,0,u),"Array | Matrix, number, number":(s,u,l)=>i(s,u,l)});function i(s,u,l){var c=$d(s.valueOf(),()=>o(u,l));return Re(s)?s.create(c,"number"):c}function o(s,u){return s+a()*(u-s)}}),pb="randomInt",EQ=["typed","config","log2","?on"],SQ=I(pb,EQ,e=>{var{typed:t,config:r,log2:n,on:a}=e,i=Yo(r.randomSeed);return a&&a("config",function(l,c){l.randomSeed!==c.randomSeed&&(i=Yo(l.randomSeed))}),t(pb,{"":()=>s(0,2),number:l=>s(0,l),"number, number":(l,c)=>s(l,c),bigint:l=>u(0n,l),"bigint, bigint":u,"Array | Matrix":l=>o(l,0,1),"Array | Matrix, number":(l,c)=>o(l,0,c),"Array | Matrix, number, number":(l,c,f)=>o(l,c,f)});function o(l,c,f){var m=$d(l.valueOf(),()=>s(c,f));return Re(l)?l.create(m,"number"):m}function s(l,c){return Math.floor(l+i()*(c-l))}function u(l,c){var f=2n**30n,m=c-l;if(m<=f)return l+BigInt(s(0,Number(m)));for(var d=n(m),h=m;h>=m;){h=0n;for(var p=0;p<d;++p)h=2n*h+(i()<.5?0n:1n)}return l+h}}),gb="stirlingS2",MQ=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],TQ=I(gb,MQ,e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:a,divideScalar:i,pow:o,factorial:s,combinations:u,isNegative:l,isInteger:c,number:f,bignumber:m,larger:d}=e,h=[],p=[];return t(gb,{"number | BigNumber, number | BigNumber":function(w,D){if(!c(w)||l(w)||!c(D)||l(D))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(d(D,w))throw new TypeError("k must be less than or equal to n in function stirlingS2");var v=!(ze(w)&&ze(D)),x=v?p:h,g=v?m:f,b=f(w),C=f(D);if(x[b]&&x[b].length>C)return x[b][C];for(var N=0;N<=b;++N)if(x[N]||(x[N]=[g(N===0?1:0)]),N!==0)for(var A=x[N],E=x[N-1],S=A.length;S<=N&&S<=C;++S)S===N?A[S]=1:A[S]=r(a(g(S),E[S]),E[S-1]);return x[b][C]}})}),vb="bellNumbers",FQ=["typed","addScalar","isNegative","isInteger","stirlingS2"],PQ=I(vb,FQ,e=>{var{typed:t,addScalar:r,isNegative:n,isInteger:a,stirlingS2:i}=e;return t(vb,{"number | BigNumber":function(s){if(!a(s)||n(s))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var u=0,l=0;l<=s;l++)u=r(u,i(s,l));return u}})}),yb="catalan",kQ=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],OQ=I(yb,kQ,e=>{var{typed:t,addScalar:r,divideScalar:n,multiplyScalar:a,combinations:i,isNegative:o,isInteger:s}=e;return t(yb,{"number | BigNumber":function(l){if(!s(l)||o(l))throw new TypeError("Non-negative integer value expected in function catalan");return n(i(a(l,2),l),r(l,1))}})}),bb="composition",BQ=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],$Q=I(bb,BQ,e=>{var{typed:t,addScalar:r,combinations:n,isPositive:a,isNegative:i,isInteger:o,larger:s}=e;return t(bb,{"number | BigNumber, number | BigNumber":function(l,c){if(!o(l)||!a(l)||!o(c)||!a(c))throw new TypeError("Positive integer value expected in function composition");if(s(c,l))throw new TypeError("k must be less than or equal to n in function composition");return n(r(l,-1),r(c,-1))}})}),wb="leafCount",_Q=["parse","typed"],IQ=I(wb,_Q,e=>{var{parse:t,typed:r}=e;function n(a){var i=0;return a.forEach(o=>{i+=n(o)}),i||1}return r(wb,{Node:function(i){return n(i)}})});function xb(e){return ct(e)||Xt(e)&&e.isUnary()&&ct(e.args[0])}function mc(e){return!!(ct(e)||(mi(e)||Xt(e))&&e.args.every(mc)||Ra(e)&&mc(e.content))}function Db(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Vf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Db(Object(r),!0).forEach(function(n){sr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Db(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var zQ="simplifyUtil",jQ=["FunctionNode","OperatorNode","SymbolNode"],_d=I(zQ,jQ,e=>{var{FunctionNode:t,OperatorNode:r,SymbolNode:n}=e,a=!0,i=!1,o="defaultF",s={add:{trivial:a,total:a,commutative:a,associative:a},unaryPlus:{trivial:a,total:a,commutative:a,associative:a},subtract:{trivial:i,total:a,commutative:i,associative:i},multiply:{trivial:a,total:a,commutative:a,associative:a},divide:{trivial:i,total:a,commutative:i,associative:i},paren:{trivial:a,total:a,commutative:a,associative:i},defaultF:{trivial:i,total:a,commutative:i,associative:i}},u={divide:{total:i},log:{total:i}},l={subtract:{total:i},abs:{trivial:a},log:{total:a}};function c(v,x){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:s,b=o;if(typeof v=="string"?b=v:Xt(v)?b=v.fn.toString():mi(v)?b=v.name:Ra(v)&&(b="paren"),Fe(g,b)){var C=g[b];if(Fe(C,x))return C[x];if(Fe(s,b))return s[b][x]}if(Fe(g,o)){var N=g[o];return Fe(N,x)?N[x]:s[o][x]}if(Fe(s,b)){var A=s[b];if(Fe(A,x))return A[x]}return s[o][x]}function f(v){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s;return c(v,"commutative",x)}function m(v){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s;return c(v,"associative",x)}function d(v,x){var g=Vf({},v);for(var b in x)Fe(v,b)?g[b]=Vf(Vf({},x[b]),v[b]):g[b]=x[b];return g}function h(v,x){if(!v.args||v.args.length===0)return v;v.args=p(v,x);for(var g=0;g<v.args.length;g++)h(v.args[g],x)}function p(v,x){var g,b=[],C=function(A){for(var E=0;E<A.args.length;E++){var S=A.args[E];Xt(S)&&g===S.op?C(S):b.push(S)}};return m(v,x)?(g=v.op,C(v),b):v.args}function y(v,x){if(!(!v.args||v.args.length===0)){for(var g=D(v),b=v.args.length,C=0;C<b;C++)y(v.args[C],x);if(b>2&&m(v,x)){for(var N=v.args.pop();v.args.length>0;)N=g([v.args.pop(),N]);v.args=N.args}}}function w(v,x){if(!(!v.args||v.args.length===0)){for(var g=D(v),b=v.args.length,C=0;C<b;C++)w(v.args[C],x);if(b>2&&m(v,x)){for(var N=v.args.shift();v.args.length>0;)N=g([N,v.args.shift()]);v.args=N.args}}}function D(v){return Xt(v)?function(x){try{return new r(v.op,v.fn,x,v.implicit)}catch(g){return console.error(g),[]}}:function(x){return new t(new n(v.name),x)}}return{createMakeNodeFunction:D,hasProperty:c,isCommutative:f,isAssociative:m,mergeContext:d,flatten:h,allChildren:p,unflattenr:y,unflattenl:w,defaultContext:s,realContext:u,positiveContext:l}}),qQ="simplify",RQ=["typed","parse","equal","resolve","simplifyConstant","simplifyCore","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode","replacer"],LQ=I(qQ,RQ,e=>{var{typed:t,parse:r,equal:n,resolve:a,simplifyConstant:i,simplifyCore:o,AccessorNode:s,ArrayNode:u,ConstantNode:l,FunctionNode:c,IndexNode:f,ObjectNode:m,OperatorNode:d,ParenthesisNode:h,SymbolNode:p,replacer:y}=e,{hasProperty:w,isCommutative:D,isAssociative:v,mergeContext:x,flatten:g,unflattenr:b,unflattenl:C,createMakeNodeFunction:N,defaultContext:A,realContext:E,positiveContext:S}=_d({FunctionNode:c,OperatorNode:d,SymbolNode:p});t.addConversion({from:"Object",to:"Map",convert:qo});var F=t("simplify",{Node:j,"Node, Map":(V,_)=>j(V,!1,_),"Node, Map, Object":(V,_,W)=>j(V,!1,_,W),"Node, Array":j,"Node, Array, Map":j,"Node, Array, Map, Object":j});t.removeConversion({from:"Object",to:"Map",convert:qo}),F.defaultContext=A,F.realContext=E,F.positiveContext=S;function k(V){return V.transform(function(_){return Ra(_)?k(_.content):_})}var B={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};F.rules=[o,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},i,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},i,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n+-(n1)",r:"n-(n1)"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];function L(V,_){var W={};if(V.s){var ne=V.s.split("->");if(ne.length===2)W.l=ne[0],W.r=ne[1];else throw SyntaxError("Could not parse rule: "+V.s)}else W.l=V.l,W.r=V.r;W.l=k(r(W.l)),W.r=k(r(W.r));for(var Q of["imposeContext","repeat","assuming"])Q in V&&(W[Q]=V[Q]);if(V.evaluate&&(W.evaluate=r(V.evaluate)),v(W.l,_)){var ue=!D(W.l,_),oe;ue&&(oe=H());var be=N(W.l),Me=H();W.expanded={},W.expanded.l=be([W.l,Me]),g(W.expanded.l,_),b(W.expanded.l,_),W.expanded.r=be([W.r,Me]),ue&&(W.expandedNC1={},W.expandedNC1.l=be([oe,W.l]),W.expandedNC1.r=be([oe,W.r]),W.expandedNC2={},W.expandedNC2.l=be([oe,W.expanded.l]),W.expandedNC2.r=be([oe,W.expanded.r]))}return W}function M(V,_){for(var W=[],ne=0;ne<V.length;ne++){var Q=V[ne],ue=void 0,oe=typeof Q;switch(oe){case"string":Q={s:Q};case"object":ue=L(Q,_);break;case"function":ue=Q;break;default:throw TypeError("Unsupported type of rule: "+oe)}W.push(ue)}return W}var $=0;function H(){return new p("_p"+$++)}function j(V,_){var W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Hs(),ne=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Q=ne.consoleDebug;_=M(_||F.rules,ne.context);var ue=a(V,W);ue=k(ue);for(var oe={},be=ue.toString({parenthesis:"all"});!oe[be];){oe[be]=!0,$=0;var Me=be;Q&&console.log("Working on: ",be);for(var Pe=0;Pe<_.length;Pe++){var Ee="";if(typeof _[Pe]=="function"?(ue=_[Pe](ue,ne),Q&&(Ee=_[Pe].name)):(g(ue,ne.context),ue=te(ue,_[Pe],ne.context),Q&&(Ee="".concat(_[Pe].l.toString()," -> ").concat(_[Pe].r.toString()))),Q){var Oe=ue.toString({parenthesis:"all"});Oe!==Me&&(console.log("Applying",Ee,"produced",Oe),Me=Oe)}C(ue,ne.context)}be=ue.toString({parenthesis:"all"})}return ue}function Y(V,_,W){var ne=V;if(V)for(var Q=0;Q<V.length;++Q){var ue=te(V[Q],_,W);ue!==V[Q]&&(ne===V&&(ne=V.slice()),ne[Q]=ue)}return ne}function te(V,_,W){if(_.assuming){for(var ne in _.assuming)for(var Q in _.assuming[ne])if(w(ne,Q,W)!==_.assuming[ne][Q])return V}var ue=x(_.imposeContext,W),oe=V;if(oe instanceof d||oe instanceof c){var be=Y(oe.args,_,W);be!==oe.args&&(oe=oe.clone(),oe.args=be)}else if(oe instanceof h){if(oe.content){var Me=te(oe.content,_,W);Me!==oe.content&&(oe=new h(Me))}}else if(oe instanceof u){var Pe=Y(oe.items,_,W);Pe!==oe.items&&(oe=new u(Pe))}else if(oe instanceof s){var Ee=oe.object;oe.object&&(Ee=te(oe.object,_,W));var Oe=oe.index;oe.index&&(Oe=te(oe.index,_,W)),(Ee!==oe.object||Oe!==oe.index)&&(oe=new s(Ee,Oe))}else if(oe instanceof f){var Ie=Y(oe.dimensions,_,W);Ie!==oe.dimensions&&(oe=new f(Ie))}else if(oe instanceof m){var R=!1,Z={};for(var O in oe.properties)Z[O]=te(oe.properties[O],_,W),Z[O]!==oe.properties[O]&&(R=!0);R&&(oe=new m(Z))}var q=_.r,U=ie(_.l,oe,ue)[0];if(!U&&_.expanded&&(q=_.expanded.r,U=ie(_.expanded.l,oe,ue)[0]),!U&&_.expandedNC1&&(q=_.expandedNC1.r,U=ie(_.expandedNC1.l,oe,ue)[0],U||(q=_.expandedNC2.r,U=ie(_.expandedNC2.l,oe,ue)[0])),U){var ee=oe.implicit;oe=q.clone(),ee&&"implicit"in q&&(oe.implicit=!0),oe=oe.transform(function(re){return re.isSymbolNode&&Fe(U.placeholders,re.name)?U.placeholders[re.name].clone():re})}return _.repeat&&oe!==V&&(oe=te(oe,_,W)),oe}function K(V,_){var W=[],ne,Q,ue=N(V);if(D(V,_))for(var oe=0;oe<V.args.length;oe++)Q=V.args.slice(0),Q.splice(oe,1),ne=Q.length===1?Q[0]:ue(Q),W.push(ue([V.args[oe],ne]));else for(var be=1;be<V.args.length;be++){var Me=V.args[0];be>1&&(Me=ue(V.args.slice(0,be))),Q=V.args.slice(be),ne=Q.length===1?Q[0]:ue(Q),W.push(ue([Me,ne]))}return W}function P(V,_){var W={placeholders:{}};if(!V.placeholders&&!_.placeholders)return W;if(V.placeholders){if(!_.placeholders)return V}else return _;for(var ne in V.placeholders)if(Fe(V.placeholders,ne)&&(W.placeholders[ne]=V.placeholders[ne],Fe(_.placeholders,ne)&&!se(V.placeholders[ne],_.placeholders[ne])))return null;for(var Q in _.placeholders)Fe(_.placeholders,Q)&&(W.placeholders[Q]=_.placeholders[Q]);return W}function X(V,_){var W=[];if(V.length===0||_.length===0)return W;for(var ne,Q=0;Q<V.length;Q++)for(var ue=0;ue<_.length;ue++)ne=P(V[Q],_[ue]),ne&&W.push(ne);return W}function z(V){if(V.length===0)return V;for(var _=V.reduce(X),W=[],ne={},Q=0;Q<_.length;Q++){var ue=JSON.stringify(_[Q],y);ne[ue]||(ne[ue]=!0,W.push(_[Q]))}return W}function ie(V,_,W,ne){var Q=[{placeholders:{}}];if(V instanceof d&&_ instanceof d||V instanceof c&&_ instanceof c){if(V instanceof d){if(V.op!==_.op||V.fn!==_.fn)return[]}else if(V instanceof c&&V.name!==_.name)return[];if(_.args.length===1&&V.args.length===1||!v(_,W)&&_.args.length===V.args.length||ne){for(var ue=[],oe=0;oe<V.args.length;oe++){var be=ie(V.args[oe],_.args[oe],W);if(be.length===0)break;ue.push(be)}if(ue.length!==V.args.length){if(!D(_,W)||V.args.length===1)return[];if(V.args.length>2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var Me=ie(V.args[0],_.args[1],W);if(Me.length===0)return[];var Pe=ie(V.args[1],_.args[0],W);if(Pe.length===0)return[];ue=[Me,Pe]}Q=z(ue)}else if(_.args.length>=2&&V.args.length===2){for(var Ee=K(_,W),Oe=[],Ie=0;Ie<Ee.length;Ie++){var R=ie(V,Ee[Ie],W,!0);Oe=Oe.concat(R)}return Oe}else{if(V.args.length>2)throw Error("Unexpected non-binary associative function: "+V.toString());return[]}}else if(V instanceof p){if(V.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(B[V.name]){if(V.name!==_.name)return[]}else switch(V.name[1]>="a"&&V.name[1]<="z"?V.name.substring(0,2):V.name[0]){case"n":case"_p":Q[0].placeholders[V.name]=_;break;case"c":case"cl":if(ct(_))Q[0].placeholders[V.name]=_;else return[];break;case"v":if(!ct(_))Q[0].placeholders[V.name]=_;else return[];break;case"vl":if(xr(_))Q[0].placeholders[V.name]=_;else return[];break;case"cd":if(xb(_))Q[0].placeholders[V.name]=_;else return[];break;case"vd":if(!xb(_))Q[0].placeholders[V.name]=_;else return[];break;case"ce":if(mc(_))Q[0].placeholders[V.name]=_;else return[];break;case"ve":if(!mc(_))Q[0].placeholders[V.name]=_;else return[];break;default:throw new Error("Invalid symbol in rule: "+V.name)}}else if(V instanceof l){if(!n(V.value,_.value))return[]}else return[];return Q}function se(V,_){if(V instanceof l&&_ instanceof l){if(!n(V.value,_.value))return!1}else if(V instanceof p&&_ instanceof p){if(V.name!==_.name)return!1}else if(V instanceof d&&_ instanceof d||V instanceof c&&_ instanceof c){if(V instanceof d){if(V.op!==_.op||V.fn!==_.fn)return!1}else if(V instanceof c&&V.name!==_.name)return!1;if(V.args.length!==_.args.length)return!1;for(var W=0;W<V.args.length;W++)if(!se(V.args[W],_.args[W]))return!1}else return!1;return!0}return F}),HQ="simplifyConstant",GQ=["typed","config","mathWithTransform","matrix","isBounded","?fraction","?bignumber","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode"],VQ=I(HQ,GQ,e=>{var{typed:t,config:r,mathWithTransform:n,matrix:a,isBounded:i,fraction:o,bignumber:s,AccessorNode:u,ArrayNode:l,ConstantNode:c,FunctionNode:f,IndexNode:m,ObjectNode:d,OperatorNode:h,SymbolNode:p}=e,{isCommutative:y,isAssociative:w,allChildren:D,createMakeNodeFunction:v}=_d({FunctionNode:f,OperatorNode:h,SymbolNode:p}),x=t("simplifyConstant",{Node:M=>N(L(M,{})),"Node, Object":function($,H){return N(L($,H))}});function g(M){return ru(M)?M.valueOf():M instanceof Array?M.map(g):Re(M)?a(g(M.valueOf())):M}function b(M,$,H){try{return n[M].apply(null,$)}catch{return $=$.map(g),E(n[M].apply(null,$),H)}}var C=t({Fraction:F,number:function($){return $<0?S(new c(-$)):new c($)},BigNumber:function($){return $<0?S(new c(-$)):new c($)},bigint:function($){return $<0n?S(new c(-$)):new c($)},Complex:function($){throw new Error("Cannot convert Complex number to Node")},string:function($){return new c($)},Matrix:function($){return new l($.valueOf().map(H=>C(H)))}});function N(M){return Ct(M)?M:C(M)}function A(M,$){var H=$&&$.exactFractions!==!1;if(H&&i(M)&&o){var j=o(M),Y=$&&typeof $.fractionsLimit=="number"?$.fractionsLimit:1/0;if(j.valueOf()===M&&j.n<Y&&j.d<Y)return j}return M}var E=t({"string, Object":function($,H){var j=vi($,r);if(j==="BigNumber")return s===void 0&&Pd(),s($);if(j==="bigint")return BigInt($);if(j==="Fraction")return o===void 0&&_2(),o($);var Y=parseFloat($);return A(Y,H)},"Fraction, Object":function($,H){return $},"BigNumber, Object":function($,H){return $},"number, Object":function($,H){return A($,H)},"bigint, Object":function($,H){return $},"Complex, Object":function($,H){return $.im!==0?$:A($.re,H)},"Matrix, Object":function($,H){return a(A($.valueOf()))},"Array, Object":function($,H){return $.map(A)}});function S(M){return new h("-","unaryMinus",[M])}function F(M){var $=Y=>r.number==="BigNumber"&&s?s(Y):Number(Y),H=M.s*M.n,j=H<0n?new h("-","unaryMinus",[new c(-$(H))]):new c($(H));return M.d===1n?j:new h("/","divide",[j,new c($(M.d))])}function k(M,$,H){if(!ts($))return new u(N(M),N($));if(Tn(M)||Re(M)){for(var j=Array.from($.dimensions);j.length>0;)if(ct(j[0])&&typeof j[0].value!="string"){var Y=E(j.shift().value,H);Tn(M)?M=M.items[Y-1]:(M=M.valueOf()[Y-1],M instanceof Array&&(M=a(M)))}else if(j.length>1&&ct(j[1])&&typeof j[1].value!="string"){var te=E(j[1].value,H),K=[],P=Tn(M)?M.items:M.valueOf();for(var X of P)if(Tn(X))K.push(X.items[te-1]);else if(Re(M))K.push(X[te-1]);else break;if(K.length===P.length)Tn(M)?M=new l(K):M=a(K),j.splice(1,1);else break}else break;return j.length===$.dimensions.length?new u(N(M),$):j.length>0?($=new m(j),new u(N(M),$)):M}if(Dc(M)&&$.dimensions.length===1&&ct($.dimensions[0])){var z=$.dimensions[0].value;return z in M.properties?M.properties[z]:new c}return new u(N(M),$)}function B(M,$,H,j){var Y=$.shift(),te=$.reduce((K,P)=>{if(!Ct(P)){var X=K.pop();if(Ct(X))return[X,P];try{return K.push(b(M,[X,P],j)),K}catch{K.push(X)}}K.push(N(K.pop()));var z=K.length===1?K[0]:H(K);return[H([z,N(P)])]},[Y]);return te.length===1?te[0]:H([te[0],C(te[1])])}function L(M,$){switch(M.type){case"SymbolNode":return M;case"ConstantNode":switch(typeof M.value){case"number":return E(M.value,$);case"bigint":return E(M.value,$);case"string":return M.value;default:if(!isNaN(M.value))return E(M.value,$)}return M;case"FunctionNode":if(n[M.name]&&n[M.name].rawArgs)return M;{var H=["add","multiply"];if(!H.includes(M.name)){var j=M.args.map(Q=>L(Q,$));if(!j.some(Ct))try{return b(M.name,j,$)}catch{}if(M.name==="size"&&j.length===1&&Tn(j[0])){for(var Y=[],te=j[0];Tn(te);)Y.push(te.items.length),te=te.items[0];return a(Y)}return new f(M.name,j.map(N))}}case"OperatorNode":{var K=M.fn.toString(),P,X,z=v(M);if(Xt(M)&&M.isUnary())P=[L(M.args[0],$)],Ct(P[0])?X=z(P):X=b(K,P,$);else if(w(M,$.context))if(P=D(M,$.context),P=P.map(Q=>L(Q,$)),y(K,$.context)){for(var ie=[],se=[],V=0;V<P.length;V++)Ct(P[V])?se.push(P[V]):ie.push(P[V]);ie.length>1?(X=B(K,ie,z,$),se.unshift(X),X=B(K,se,z,$)):X=B(K,P,z,$)}else X=B(K,P,z,$);else P=M.args.map(Q=>L(Q,$)),X=B(K,P,z,$);return X}case"ParenthesisNode":return L(M.content,$);case"AccessorNode":return k(L(M.object,$),L(M.index,$),$);case"ArrayNode":{var _=M.items.map(Q=>L(Q,$));return _.some(Ct)?new l(_.map(N)):a(_)}case"IndexNode":return new m(M.dimensions.map(Q=>x(Q,$)));case"ObjectNode":{var W={};for(var ne in M.properties)W[ne]=x(M.properties[ne],$);return new d(W)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(M.type))}}return x}),Nb="simplifyCore",UQ=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],WQ=I(Nb,UQ,e=>{var{typed:t,parse:r,equal:n,isZero:a,add:i,subtract:o,multiply:s,divide:u,pow:l,AccessorNode:c,ArrayNode:f,ConstantNode:m,FunctionNode:d,IndexNode:h,ObjectNode:p,OperatorNode:y,ParenthesisNode:w,SymbolNode:D}=e,v=new m(0),x=new m(1),g=new m(!0),b=new m(!1);function C(S){return Xt(S)&&["and","not","or"].includes(S.op)}var{hasProperty:N,isCommutative:A}=_d({FunctionNode:d,OperatorNode:y,SymbolNode:D});function E(S){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=F?F.context:void 0;if(N(S,"trivial",k)){if(mi(S)&&S.args.length===1)return E(S.args[0],F);var B=!1,L=0;if(S.forEach(ie=>{++L,L===1&&(B=E(ie,F))}),L===1)return B}var M=S;if(mi(M)){var $=IG(M.name);if($){if(M.args.length>2&&N(M,"associative",k))for(;M.args.length>2;){var H=M.args.pop(),j=M.args.pop();M.args.push(new y($,M.name,[H,j]))}M=new y($,M.name,M.args)}else return new d(E(M.fn),M.args.map(ie=>E(ie,F)))}if(Xt(M)&&M.isUnary()){var Y=E(M.args[0],F);if(M.op==="~"&&Xt(Y)&&Y.isUnary()&&Y.op==="~"||M.op==="not"&&Xt(Y)&&Y.isUnary()&&Y.op==="not"&&C(Y.args[0]))return Y.args[0];var te=!0;if(M.op==="-"&&Xt(Y)&&(Y.isBinary()&&Y.fn==="subtract"&&(M=new y("-","subtract",[Y.args[1],Y.args[0]]),te=!1),Y.isUnary()&&Y.op==="-"))return Y.args[0];if(te)return new y(M.op,M.fn,[Y])}if(Xt(M)&&M.isBinary()){var K=E(M.args[0],F),P=E(M.args[1],F);if(M.op==="+"){if(ct(K)&&a(K.value))return P;if(ct(P)&&a(P.value))return K;Xt(P)&&P.isUnary()&&P.op==="-"&&(P=P.args[0],M=new y("-","subtract",[K,P]))}if(M.op==="-")return Xt(P)&&P.isUnary()&&P.op==="-"?E(new y("+","add",[K,P.args[0]]),F):ct(K)&&a(K.value)?E(new y("-","unaryMinus",[P])):ct(P)&&a(P.value)?K:new y(M.op,M.fn,[K,P]);if(M.op==="*"){if(ct(K)){if(a(K.value))return v;if(n(K.value,1))return P}if(ct(P)){if(a(P.value))return v;if(n(P.value,1))return K;if(A(M,k))return new y(M.op,M.fn,[P,K],M.implicit)}return new y(M.op,M.fn,[K,P],M.implicit)}if(M.op==="/")return ct(K)&&a(K.value)?v:ct(P)&&n(P.value,1)?K:new y(M.op,M.fn,[K,P]);if(M.op==="^"&&ct(P)){if(a(P.value))return x;if(n(P.value,1))return K}if(M.op==="and"){if(ct(K))if(K.value){if(C(P))return P;if(ct(P))return P.value?g:b}else return b;if(ct(P))if(P.value){if(C(K))return K}else return b}if(M.op==="or"){if(ct(K)){if(K.value)return g;if(C(P))return P}if(ct(P)){if(P.value)return g;if(C(K))return K}}return new y(M.op,M.fn,[K,P])}if(Xt(M))return new y(M.op,M.fn,M.args.map(ie=>E(ie,F)));if(Tn(M))return new f(M.items.map(ie=>E(ie,F)));if(qa(M))return new c(E(M.object,F),E(M.index,F));if(ts(M))return new h(M.dimensions.map(ie=>E(ie,F)));if(Dc(M)){var X={};for(var z in M.properties)X[z]=E(M.properties[z],F);return new p(X)}return M}return t(Nb,{Node:E,"Node,Object":E})}),JQ="resolve",KQ=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],YQ=I(JQ,KQ,e=>{var{typed:t,parse:r,ConstantNode:n,FunctionNode:a,OperatorNode:i,ParenthesisNode:o}=e;function s(u,l){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!l)return u;if(xr(u)){if(c.has(u.name)){var f=Array.from(c).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(f,"}"))}var m=l.get(u.name);if(Ct(m)){var d=new Set(c);return d.add(u.name),s(m,l,d)}else return typeof m=="number"?r(String(m)):m!==void 0?new n(m):u}else if(Xt(u)){var h=u.args.map(function(y){return s(y,l,c)});return new i(u.op,u.fn,h,u.implicit)}else{if(Ra(u))return new o(s(u.content,l,c));if(mi(u)){var p=u.args.map(function(y){return s(y,l,c)});return new a(u.name,p)}}return u.map(y=>s(y,l,c))}return t("resolve",{Node:s,"Node, Map | null | undefined":s,"Node, Object":(u,l)=>s(u,qo(l)),"Array | Matrix":t.referToSelf(u=>l=>l.map(c=>u(c))),"Array | Matrix, null | undefined":t.referToSelf(u=>l=>l.map(c=>u(c))),"Array, Object":t.referTo("Array,Map",u=>(l,c)=>u(l,qo(c))),"Matrix, Object":t.referTo("Matrix,Map",u=>(l,c)=>u(l,qo(c))),"Array | Matrix, Map":t.referToSelf(u=>(l,c)=>l.map(f=>u(f,c)))})}),Ab="symbolicEqual",ZQ=["parse","simplify","typed","OperatorNode"],QQ=I(Ab,ZQ,e=>{var{parse:t,simplify:r,typed:n,OperatorNode:a}=e;function i(o,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=new a("-","subtract",[o,s]),c=r(l,{},u);return ct(c)&&!c.value}return n(Ab,{"Node, Node":i,"Node, Node, Object":i})}),Cb="derivative",XQ=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],eX=I(Cb,XQ,e=>{var{typed:t,config:r,parse:n,simplify:a,equal:i,isZero:o,numeric:s,ConstantNode:u,FunctionNode:l,OperatorNode:c,ParenthesisNode:f,SymbolNode:m}=e;function d(x,g){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},C=new Map,N=g.name;function A(S){var F=C.get(S);if(F!==void 0)return F;var k=w(A,S,N);return C.set(S,k),k}var E=D(x,A);return b.simplify?a(E):E}function h(x){var g=n(x);if(!g.isSymbolNode)throw new TypeError("Invalid variable. "+"Cannot parse ".concat(JSON.stringify(x)," into a variable in function derivative"));return g}var p=t(Cb,{"Node, SymbolNode":d,"Node, SymbolNode, Object":d,"Node, string":(x,g)=>d(x,h(g)),"Node, string, Object":(x,g,b)=>d(x,h(g),b)});p._simplify=!0,p.toTex=function(x){return y.apply(null,x.args)};var y=t("_derivTex",{"Node, SymbolNode":function(g,b){return ct(g)&&Ft(g.value)==="string"?y(n(g.value).toString(),b.toString(),1):y(g.toTex(),b.toString(),1)},"Node, ConstantNode":function(g,b){if(Ft(b.value)==="string")return y(g,n(b.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(g,b,C){return y(g.toString(),b.name,C.value)},"string, string, number":function(g,b,C){var N;return C===1?N="{d\\over d"+b+"}":N="{d^{"+C+"}\\over d"+b+"^{"+C+"}}",N+"\\left[".concat(g,"\\right]")}}),w=t("_isConst",{"function, ConstantNode, string":function(){return!0},"function, SymbolNode, string":function(g,b,C){return b.name!==C},"function, ParenthesisNode, string":function(g,b,C){return g(b.content,C)},"function, FunctionAssignmentNode, string":function(g,b,C){return b.params.includes(C)?g(b.expr,C):!0},"function, FunctionNode | OperatorNode, string":function(g,b,C){return b.args.every(N=>g(N,C))}}),D=t("_derivative",{"ConstantNode, function":function(){return v(0)},"SymbolNode, function":function(g,b){return b(g)?v(0):v(1)},"ParenthesisNode, function":function(g,b){return new f(D(g.content,b))},"FunctionAssignmentNode, function":function(g,b){return b(g)?v(0):D(g.expr,b)},"FunctionNode, function":function(g,b){if(b(g))return v(0);var C=g.args[0],N,A=!1,E=!1,S;switch(g.name){case"cbrt":A=!0,S=new c("*","multiply",[v(3),new c("^","pow",[C,new c("/","divide",[v(2),v(3)])])]);break;case"sqrt":case"nthRoot":if(g.args.length===1)A=!0,S=new c("*","multiply",[v(2),new l("sqrt",[C])]);else if(g.args.length===2)return N=new c("/","divide",[v(1),g.args[1]]),D(new c("^","pow",[C,N]),b);break;case"log10":N=v(10);case"log":if(!N&&g.args.length===1)S=C.clone(),A=!0;else if(g.args.length===1&&N||g.args.length===2&&b(g.args[1]))S=new c("*","multiply",[C.clone(),new l("log",[N||g.args[1]])]),A=!0;else if(g.args.length===2)return D(new c("/","divide",[new l("log",[C]),new l("log",[g.args[1]])]),b);break;case"pow":if(g.args.length===2)return D(new c("^","pow",[C,g.args[1]]),b);break;case"exp":S=new l("exp",[C.clone()]);break;case"sin":S=new l("cos",[C.clone()]);break;case"cos":S=new c("-","unaryMinus",[new l("sin",[C.clone()])]);break;case"tan":S=new c("^","pow",[new l("sec",[C.clone()]),v(2)]);break;case"sec":S=new c("*","multiply",[g,new l("tan",[C.clone()])]);break;case"csc":E=!0,S=new c("*","multiply",[g,new l("cot",[C.clone()])]);break;case"cot":E=!0,S=new c("^","pow",[new l("csc",[C.clone()]),v(2)]);break;case"asin":A=!0,S=new l("sqrt",[new c("-","subtract",[v(1),new c("^","pow",[C.clone(),v(2)])])]);break;case"acos":A=!0,E=!0,S=new l("sqrt",[new c("-","subtract",[v(1),new c("^","pow",[C.clone(),v(2)])])]);break;case"atan":A=!0,S=new c("+","add",[new c("^","pow",[C.clone(),v(2)]),v(1)]);break;case"asec":A=!0,S=new c("*","multiply",[new l("abs",[C.clone()]),new l("sqrt",[new c("-","subtract",[new c("^","pow",[C.clone(),v(2)]),v(1)])])]);break;case"acsc":A=!0,E=!0,S=new c("*","multiply",[new l("abs",[C.clone()]),new l("sqrt",[new c("-","subtract",[new c("^","pow",[C.clone(),v(2)]),v(1)])])]);break;case"acot":A=!0,E=!0,S=new c("+","add",[new c("^","pow",[C.clone(),v(2)]),v(1)]);break;case"sinh":S=new l("cosh",[C.clone()]);break;case"cosh":S=new l("sinh",[C.clone()]);break;case"tanh":S=new c("^","pow",[new l("sech",[C.clone()]),v(2)]);break;case"sech":E=!0,S=new c("*","multiply",[g,new l("tanh",[C.clone()])]);break;case"csch":E=!0,S=new c("*","multiply",[g,new l("coth",[C.clone()])]);break;case"coth":E=!0,S=new c("^","pow",[new l("csch",[C.clone()]),v(2)]);break;case"asinh":A=!0,S=new l("sqrt",[new c("+","add",[new c("^","pow",[C.clone(),v(2)]),v(1)])]);break;case"acosh":A=!0,S=new l("sqrt",[new c("-","subtract",[new c("^","pow",[C.clone(),v(2)]),v(1)])]);break;case"atanh":A=!0,S=new c("-","subtract",[v(1),new c("^","pow",[C.clone(),v(2)])]);break;case"asech":A=!0,E=!0,S=new c("*","multiply",[C.clone(),new l("sqrt",[new c("-","subtract",[v(1),new c("^","pow",[C.clone(),v(2)])])])]);break;case"acsch":A=!0,E=!0,S=new c("*","multiply",[new l("abs",[C.clone()]),new l("sqrt",[new c("+","add",[new c("^","pow",[C.clone(),v(2)]),v(1)])])]);break;case"acoth":A=!0,E=!0,S=new c("-","subtract",[v(1),new c("^","pow",[C.clone(),v(2)])]);break;case"abs":S=new c("/","divide",[new l(new m("abs"),[C.clone()]),C.clone()]);break;case"gamma":default:throw new Error('Cannot process function "'+g.name+'" in derivative: the function is not supported, undefined, or the number of arguments passed to it are not supported')}var F,k;A?(F="/",k="divide"):(F="*",k="multiply");var B=D(C,b);return E&&(B=new c("-","unaryMinus",[B])),new c(F,k,[B,S])},"OperatorNode, function":function(g,b){if(b(g))return v(0);if(g.op==="+")return new c(g.op,g.fn,g.args.map(function(M){return D(M,b)}));if(g.op==="-"){if(g.isUnary())return new c(g.op,g.fn,[D(g.args[0],b)]);if(g.isBinary())return new c(g.op,g.fn,[D(g.args[0],b),D(g.args[1],b)])}if(g.op==="*"){var C=g.args.filter(function(M){return b(M)});if(C.length>0){var N=g.args.filter(function(M){return!b(M)}),A=N.length===1?N[0]:new c("*","multiply",N),E=C.concat(D(A,b));return new c("*","multiply",E)}return new c("+","add",g.args.map(function(M){return new c("*","multiply",g.args.map(function($){return $===M?D($,b):$.clone()}))}))}if(g.op==="/"&&g.isBinary()){var S=g.args[0],F=g.args[1];return b(F)?new c("/","divide",[D(S,b),F]):b(S)?new c("*","multiply",[new c("-","unaryMinus",[S]),new c("/","divide",[D(F,b),new c("^","pow",[F.clone(),v(2)])])]):new c("/","divide",[new c("-","subtract",[new c("*","multiply",[D(S,b),F.clone()]),new c("*","multiply",[S.clone(),D(F,b)])]),new c("^","pow",[F.clone(),v(2)])])}if(g.op==="^"&&g.isBinary()){var k=g.args[0],B=g.args[1];if(b(k))return ct(k)&&(o(k.value)||i(k.value,1))?v(0):new c("*","multiply",[g,new c("*","multiply",[new l("log",[k.clone()]),D(B.clone(),b)])]);if(b(B)){if(ct(B)){if(o(B.value))return v(0);if(i(B.value,1))return D(k,b)}var L=new c("^","pow",[k.clone(),new c("-","subtract",[B,v(1)])]);return new c("*","multiply",[B.clone(),new c("*","multiply",[D(k,b),L])])}return new c("*","multiply",[new c("^","pow",[k.clone(),B.clone()]),new c("+","add",[new c("*","multiply",[D(k,b),new c("/","divide",[B.clone(),k.clone()])]),new c("*","multiply",[D(B,b),new l("log",[k.clone()])])])])}throw new Error('Cannot process operator "'+g.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function v(x,g){return new u(s(x,vi(String(x),r)))}return p}),Eb="rationalize",tX=["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplifyConstant","simplifyCore","simplify","?bignumber","?fraction","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode","ParenthesisNode"],rX=I(Eb,tX,e=>{var{config:t,typed:r,equal:n,isZero:a,add:i,subtract:o,multiply:s,divide:u,pow:l,parse:c,simplifyConstant:f,simplifyCore:m,simplify:d,fraction:h,bignumber:p,mathWithTransform:y,matrix:w,AccessorNode:D,ArrayNode:v,ConstantNode:x,FunctionNode:g,IndexNode:b,ObjectNode:C,OperatorNode:N,SymbolNode:A,ParenthesisNode:E}=e;function S(M){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,j=k(),Y=F(M,$,!0,j.firstRules),te=Y.variables.length,K={exactFractions:!1},P={exactFractions:!0};if(M=Y.expression,te>=1){M=B(M);var X,z,ie=!0,se=!1;M=d(M,j.firstRules,{},K);for(var V;z=ie?j.distrDivRules:j.sucDivRules,M=d(M,z,{},P),ie=!ie,V=M.toString(),V!==X;)se=!0,X=V;se&&(M=d(M,j.firstRulesAgain,{},K)),M=d(M,j.finalRules,{},K)}var _=[],W={};return M.type==="OperatorNode"&&M.isBinary()&&M.op==="/"?(te===1&&(M.args[0]=L(M.args[0],_),M.args[1]=L(M.args[1])),H&&(W.numerator=M.args[0],W.denominator=M.args[1])):(te===1&&(M=L(M,_)),H&&(W.numerator=M,W.denominator=null)),H?(W.coefficients=_,W.variables=Y.variables,W.expression=M,W):M}return r(Eb,{Node:S,"Node, boolean":(M,$)=>S(M,{},$),"Node, Object":S,"Node, Object, boolean":S});function F(M,$,H,j){var Y=[],te=d(M,j,$,{exactFractions:!1});H=!!H;var K="+-*"+(H?"/":"");X(te);var P={};return P.expression=te,P.variables=Y,P;function X(z){var ie=z.type;if(ie==="FunctionNode")throw new Error("There is an unsolved function call");if(ie==="OperatorNode")if(z.op==="^"){if(z.args[1].type!=="ConstantNode"||!ke(parseFloat(z.args[1].value)))throw new Error("There is a non-integer exponent");X(z.args[0])}else{if(!K.includes(z.op))throw new Error("Operator "+z.op+" invalid in polynomial expression");for(var se=0;se<z.args.length;se++)X(z.args[se])}else if(ie==="SymbolNode"){var V=z.name,_=Y.indexOf(V);_===-1&&Y.push(V)}else if(ie==="ParenthesisNode")X(z.content);else if(ie!=="ConstantNode")throw new Error("type "+ie+" is not allowed in polynomial expression")}}function k(){var M=[m,{l:"n+n",r:"2*n"},{l:"n+-n",r:"0"},f,{l:"n*(n1^-1)",r:"n/n1"},{l:"n*n1^-n2",r:"n/n1^n2"},{l:"n1^-1",r:"1/n1"},{l:"n*(n1/n2)",r:"(n*n1)/n2"},{l:"1*n",r:"n"}],$=[{l:"(-n1)/(-n2)",r:"n1/n2"},{l:"(-n1)*(-n2)",r:"n1*n2"},{l:"n1--n2",r:"n1+n2"},{l:"n1-n2",r:"n1+(-n2)"},{l:"(n1+n2)*n3",r:"(n1*n3 + n2*n3)"},{l:"n1*(n2+n3)",r:"(n1*n2+n1*n3)"},{l:"c1*n + c2*n",r:"(c1+c2)*n"},{l:"c1*n + n",r:"(c1+1)*n"},{l:"c1*n - c2*n",r:"(c1-c2)*n"},{l:"c1*n - n",r:"(c1-1)*n"},{l:"v/c",r:"(1/c)*v"},{l:"v/-c",r:"-(1/c)*v"},{l:"-v*-c",r:"c*v"},{l:"-v*c",r:"-c*v"},{l:"v*-c",r:"-c*v"},{l:"v*c",r:"c*v"},{l:"-(-n1*n2)",r:"(n1*n2)"},{l:"-(n1*n2)",r:"(-n1*n2)"},{l:"-(-n1+n2)",r:"(n1-n2)"},{l:"-(n1+n2)",r:"(-n1-n2)"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"},{l:"-(-n1/n2)",r:"(n1/n2)"},{l:"-(n1/n2)",r:"(-n1/n2)"}],H=[{l:"(n1/n2 + n3/n4)",r:"((n1*n4 + n3*n2)/(n2*n4))"},{l:"(n1/n2 + n3)",r:"((n1 + n3*n2)/n2)"},{l:"(n1 + n2/n3)",r:"((n1*n3 + n2)/n3)"}],j=[{l:"(n1/(n2/n3))",r:"((n1*n3)/n2)"},{l:"(n1/n2/n3)",r:"(n1/(n2*n3))"}],Y={};return Y.firstRules=M.concat($,j),Y.distrDivRules=H,Y.sucDivRules=j,Y.firstRulesAgain=M.concat($),Y.finalRules=[m,{l:"n*-n",r:"-n^2"},{l:"n*n",r:"n^2"},f,{l:"n*-n^n1",r:"-n^(n1+1)"},{l:"n*n^n1",r:"n^(n1+1)"},{l:"n^n1*-n^n2",r:"-n^(n1+n2)"},{l:"n^n1*n^n2",r:"n^(n1+n2)"},{l:"n^n1*-n",r:"-n^(n1+1)"},{l:"n^n1*n",r:"n^(n1+1)"},{l:"n^n1/-n",r:"-n^(n1-1)"},{l:"n^n1/n",r:"n^(n1-1)"},{l:"n/-n^n1",r:"-n^(1-n1)"},{l:"n/n^n1",r:"n^(1-n1)"},{l:"n^n1/-n^n2",r:"n^(n1-n2)"},{l:"n^n1/n^n2",r:"n^(n1-n2)"},{l:"n1+(-n2*n3)",r:"n1-n2*n3"},{l:"v*(-c)",r:"-c*v"},{l:"n1+-n2",r:"n1-n2"},{l:"v*c",r:"c*v"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"}],Y}function B(M,$,H){var j=M.type,Y=arguments.length>1;if(j==="OperatorNode"&&M.isBinary()){var te=!1,K;if(M.op==="^"&&(M.args[0].type==="ParenthesisNode"||M.args[0].type==="OperatorNode")&&M.args[1].type==="ConstantNode"&&(K=parseFloat(M.args[1].value),te=K>=2&&ke(K)),te){if(K>2){var P=M.args[0],X=new N("^","pow",[M.args[0].cloneDeep(),new x(K-1)]);M=new N("*","multiply",[P,X])}else M=new N("*","multiply",[M.args[0],M.args[0].cloneDeep()]);Y&&(H==="content"?$.content=M:$.args[H]=M)}}if(j==="ParenthesisNode")B(M.content,M,"content");else if(j!=="ConstantNode"&&j!=="SymbolNode")for(var z=0;z<M.args.length;z++)B(M.args[z],M,z);if(!Y)return M}function L(M,$){$===void 0&&($=[]),$[0]=0;var H={};H.cte=1,H.oper="+",H.fire="";var j=0,Y="";V(M,null,H),j=$.length-1;for(var te=!0,K,P=j;P>=0;P--)if($[P]!==0){var X=new x(te?$[P]:Math.abs($[P])),z=$[P]<0?"-":"+";if(P>0){var ie=new A(Y);if(P>1){var se=new x(P);ie=new N("^","pow",[ie,se])}$[P]===-1&&te?X=new N("-","unaryMinus",[ie]):Math.abs($[P])===1?X=ie:X=new N("*","multiply",[X,ie])}te?K=X:z==="+"?K=new N("+","add",[K,X]):K=new N("-","subtract",[K,X]),te=!1}if(te)return new x(0);return K;function V(_,W,ne){var Q=_.type;if(Q==="FunctionNode")throw new Error("There is an unsolved function call");if(Q==="OperatorNode"){if(!"+-*^".includes(_.op))throw new Error("Operator "+_.op+" invalid");if(W!==null){if((_.fn==="unaryMinus"||_.fn==="pow")&&W.fn!=="add"&&W.fn!=="subtract"&&W.fn!=="multiply")throw new Error("Invalid "+_.op+" placing");if((_.fn==="subtract"||_.fn==="add"||_.fn==="multiply")&&W.fn!=="add"&&W.fn!=="subtract")throw new Error("Invalid "+_.op+" placing");if((_.fn==="subtract"||_.fn==="add"||_.fn==="unaryMinus")&&ne.noFil!==0)throw new Error("Invalid "+_.op+" placing")}(_.op==="^"||_.op==="*")&&(ne.fire=_.op);for(var ue=0;ue<_.args.length;ue++)_.fn==="unaryMinus"&&(ne.oper="-"),(_.op==="+"||_.fn==="subtract")&&(ne.fire="",ne.cte=1,ne.oper=ue===0?"+":_.op),ne.noFil=ue,V(_.args[ue],_,ne)}else if(Q==="SymbolNode"){if(_.name!==Y&&Y!=="")throw new Error("There is more than one variable");if(Y=_.name,W===null){$[1]=1;return}if(W.op==="^"&&ne.noFil!==0)throw new Error("In power the variable should be the first parameter");if(W.op==="*"&&ne.noFil!==1)throw new Error("In multiply the variable should be the second parameter");(ne.fire===""||ne.fire==="*")&&(j<1&&($[1]=0),$[1]+=ne.cte*(ne.oper==="+"?1:-1),j=Math.max(1,j))}else if(Q==="ConstantNode"){var oe=parseFloat(_.value);if(W===null){$[0]=oe;return}if(W.op==="^"){if(ne.noFil!==1)throw new Error("Constant cannot be powered");if(!ke(oe)||oe<=0)throw new Error("Non-integer exponent is not allowed");for(var be=j+1;be<oe;be++)$[be]=0;oe>j&&($[oe]=0),$[oe]+=ne.cte*(ne.oper==="+"?1:-1),j=Math.max(oe,j);return}ne.cte=oe,ne.fire===""&&($[0]+=ne.cte*(ne.oper==="+"?1:-1))}else throw new Error("Type "+Q+" is not allowed")}}}),Sb="zpk2tf",nX=["typed","add","multiply","Complex","number"],aX=I(Sb,nX,e=>{var{typed:t,add:r,multiply:n,Complex:a,number:i}=e;return t(Sb,{"Array,Array,number":function(l,c,f){return o(l,c,f)},"Array,Array":function(l,c){return o(l,c,1)},"Matrix,Matrix,number":function(l,c,f){return o(l.valueOf(),c.valueOf(),f)},"Matrix,Matrix":function(l,c){return o(l.valueOf(),c.valueOf(),1)}});function o(u,l,c){u.some(D=>D.type==="BigNumber")&&(u=u.map(D=>i(D))),l.some(D=>D.type==="BigNumber")&&(l=l.map(D=>i(D)));for(var f=[a(1,0)],m=[a(1,0)],d=0;d<u.length;d++){var h=u[d];typeof h=="number"&&(h=a(h,0)),f=s(f,[a(1,0),a(-h.re,-h.im)])}for(var p=0;p<l.length;p++){var y=l[p];typeof y=="number"&&(y=a(y,0)),m=s(m,[a(1,0),a(-y.re,-y.im)])}for(var w=0;w<f.length;w++)f[w]=n(f[w],c);return[f,m]}function s(u,l){for(var c=[],f=0;f<u.length+l.length-1;f++){c[f]=a(0,0);for(var m=0;m<u.length;m++)f-m>=0&&f-m<l.length&&(c[f]=r(c[f],n(u[m],l[f-m])))}return c}}),Mb="freqz",iX=["typed","add","multiply","Complex","divide","matrix"],oX=I(Mb,iX,e=>{var{typed:t,add:r,multiply:n,Complex:a,divide:i,matrix:o}=e;return t(Mb,{"Array, Array":function(c,f){var m=u(512);return s(c,f,m)},"Array, Array, Array":function(c,f,m){return s(c,f,m)},"Array, Array, number":function(c,f,m){if(m<0)throw new Error("w must be a positive number");var d=u(m);return s(c,f,d)},"Matrix, Matrix":function(c,f){var m=u(512),{w:d,h}=s(c.valueOf(),f.valueOf(),m);return{w:o(d),h:o(h)}},"Matrix, Matrix, Matrix":function(c,f,m){var{h:d}=s(c.valueOf(),f.valueOf(),m.valueOf());return{h:o(d),w:o(m)}},"Matrix, Matrix, number":function(c,f,m){if(m<0)throw new Error("w must be a positive number");var d=u(m),{h}=s(c.valueOf(),f.valueOf(),d);return{h:o(h),w:o(d)}}});function s(l,c,f){for(var m=[],d=[],h=0;h<f.length;h++){for(var p=a(0,0),y=a(0,0),w=0;w<l.length;w++)p=r(p,n(l[w],a(Math.cos(-w*f[h]),Math.sin(-w*f[h]))));for(var D=0;D<c.length;D++)y=r(y,n(c[D],a(Math.cos(-D*f[h]),Math.sin(-D*f[h]))));m.push(p),d.push(y)}for(var v=[],x=0;x<m.length;x++)v.push(i(m[x],d[x]));return{h:v,w:f}}function u(l){for(var c=[],f=0;f<l;f++)c.push(f/l*Math.PI);return c}}),sX="reviver",uX=["classes"],lX=I(sX,uX,e=>{var{classes:t}=e;return function(n,a){var i=t[a&&a.mathjs];return i&&typeof i.fromJSON=="function"?i.fromJSON(a):a}}),cX="replacer",fX=[],mX=I(cX,fX,()=>function(t,r){return typeof r=="number"&&(!Number.isFinite(r)||isNaN(r))?{mathjs:"number",value:String(r)}:typeof r=="bigint"?{mathjs:"bigint",value:String(r)}:r}),dX="15.1.0",hX=I("true",[],()=>!0),pX=I("false",[],()=>!1),gX=I("null",[],()=>null),vX=yn("Infinity",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1/0):1/0}),yX=yn("NaN",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(NaN):NaN}),bX=yn("pi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?Bd(r):uI}),wX=yn("tau",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?RL(r):lI}),xX=yn("e",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?jL(r):cI}),DX=yn("phi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?qL(r):fI}),NX=yn("LN2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(2).ln():Math.LN2}),AX=yn("LN10",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(10).ln():Math.LN10}),CX=yn("LOG2E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1).div(new r(2).ln()):Math.LOG2E}),EX=yn("LOG10E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1).div(new r(10).ln()):Math.LOG10E}),SX=yn("SQRT1_2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r("0.5").sqrt():Math.SQRT1_2}),MX=yn("SQRT2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(2).sqrt():Math.SQRT2}),TX=yn("i",["Complex"],e=>{var{Complex:t}=e;return t.I}),FX=I("version",[],()=>dX);function yn(e,t,r){return I(e,t,r,{recreateOnConfigChange:!0})}var PX=We("speedOfLight","299792458","m s^-1"),kX=We("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),OX=We("planckConstant","6.62607015e-34","J s"),BX=We("reducedPlanckConstant","1.0545718176461565e-34","J s"),$X=We("magneticConstant","1.25663706212e-6","N A^-2"),_X=We("electricConstant","8.8541878128e-12","F m^-1"),IX=We("vacuumImpedance","376.730313667","ohm"),zX=We("coulomb","8.987551792261171e9","N m^2 C^-2"),jX=We("coulombConstant","8.987551792261171e9","N m^2 C^-2"),qX=We("elementaryCharge","1.602176634e-19","C"),RX=We("bohrMagneton","9.2740100783e-24","J T^-1"),LX=We("conductanceQuantum","7.748091729863649e-5","S"),HX=We("inverseConductanceQuantum","12906.403729652257","ohm"),GX=We("magneticFluxQuantum","2.0678338484619295e-15","Wb"),VX=We("nuclearMagneton","5.0507837461e-27","J T^-1"),UX=We("klitzing","25812.807459304513","ohm"),WX=We("bohrRadius","5.29177210903e-11","m"),JX=We("classicalElectronRadius","2.8179403262e-15","m"),KX=We("electronMass","9.1093837015e-31","kg"),YX=We("fermiCoupling","1.1663787e-5","GeV^-2"),ZX=kc("fineStructure",.0072973525693),QX=We("hartreeEnergy","4.3597447222071e-18","J"),XX=We("protonMass","1.67262192369e-27","kg"),eee=We("deuteronMass","3.3435830926e-27","kg"),tee=We("neutronMass","1.6749271613e-27","kg"),ree=We("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),nee=We("rydberg","10973731.568160","m^-1"),aee=We("thomsonCrossSection","6.6524587321e-29","m^2"),iee=kc("weakMixingAngle",.2229),oee=kc("efimovFactor",22.7),see=We("atomicMass","1.66053906660e-27","kg"),uee=We("avogadro","6.02214076e23","mol^-1"),lee=We("boltzmann","1.380649e-23","J K^-1"),cee=We("faraday","96485.33212331001","C mol^-1"),fee=We("firstRadiation","3.7417718521927573e-16","W m^2"),mee=We("loschmidt","2.686780111798444e25","m^-3"),dee=We("gasConstant","8.31446261815324","J K^-1 mol^-1"),hee=We("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),pee=We("molarVolume","0.022413969545014137","m^3 mol^-1"),gee=kc("sackurTetrode",-1.16487052358),vee=We("secondRadiation","0.014387768775039337","m K"),yee=We("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),bee=We("wienDisplacement","2.897771955e-3","m K"),wee=We("molarMass","0.99999999965e-3","kg mol^-1"),xee=We("molarMassC12","11.9999999958e-3","kg mol^-1"),Dee=We("gravity","9.80665","m s^-2"),Nee=We("planckLength","1.616255e-35","m"),Aee=We("planckMass","2.176435e-8","kg"),Cee=We("planckTime","5.391245e-44","s"),Eee=We("planckCharge","1.87554603778e-18","C"),See=We("planckTemperature","1.416785e+32","K");function We(e,t,r){var n=["config","Unit","BigNumber"];return I(e,n,a=>{var{config:i,Unit:o,BigNumber:s}=a,u=i.number==="BigNumber"?new s(t):parseFloat(t),l=new o(u,r);return l.fixPrefix=!0,l})}function kc(e,t){var r=["config","BigNumber"];return I(e,r,n=>{var{config:a,BigNumber:i}=n;return a.number==="BigNumber"?new i(t):t})}function Tb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Mee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tb(Object(r),!0).forEach(function(n){sr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Tee="mapSlices",Fee=["typed","isInteger"],Pee=I(Tee,Fee,e=>{var{typed:t,isInteger:r}=e,n=Um({typed:t,isInteger:r});return t("mapSlices",{"...any":function(i){var o=i[1];ze(o)?i[1]=o-1:Ze(o)&&(i[1]=o.minus(1));try{return n.apply(null,i)}catch(s){throw Zr(s)}}})},Mee({isTransformFunction:!0},Um.meta)),kee="column",Oee=["typed","Index","matrix","range"],Bee=I(kee,Oee,e=>{var{typed:t,Index:r,matrix:n,range:a}=e,i=P2({typed:t,Index:r,matrix:n,range:a});return t("column",{"...any":function(s){var u=s.length-1,l=s[u];ze(l)&&(s[u]=l-1);try{return i.apply(null,s)}catch(c){throw Zr(c)}}})},{isTransformFunction:!0});function Id(e,t,r){var n=e.filter(function(u){return xr(u)&&!(u.name in t)&&!r.has(u.name)})[0];if(!n)throw new Error('No undefined variable found in inline expression "'+e+'"');var a=n.name,i=new Map,o=new Qw(r,i,new Set([a])),s=e.compile();return function(l){return i.set(a,l),s.evaluate(o)}}var $ee="transformCallback",_ee=["typed"],zd=I($ee,_ee,e=>{var{typed:t}=e;return function(n,a){return t.isTypedFunction(n)?r(n,a):Fb(n,n.length,a)};function r(n,a){var i=Object.fromEntries(Object.entries(n.signatures).map(o=>{var[s,u]=o,l=s.split(",").length;return t.isTypedFunction(u)?[s,r(u,a)]:[s,Fb(u,l,a)]}));return typeof n.name=="string"?t(n.name,i):t(i)}});function Fb(e,t,r){return t===r?e:t===r+1?function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.slice(0,r),s=Pb(a[r]);return e(...o,s)}:t>r+1?function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.slice(0,r),s=Pb(a[r]),u=a.slice(r+1);return e(...o,s,...u)}:e}function Pb(e){return e.map(t=>t+1)}var Iee="filter",zee=["typed"],jee=I(Iee,zee,e=>{var{typed:t}=e;function r(a,i,o){var s=k2({typed:t}),u=zd({typed:t});if(a.length===0)return s();var l=a[0];if(a.length===1)return s(l);var c=a.length-1,f=a[c];return l&&(l=n(l,o)),f&&(xr(f)||nu(f)?f=n(f,o):f=Id(f,i,o)),s(l,u(f,c))}r.rawArgs=!0;function n(a,i){return a.compile().evaluate(i)}return r},{isTransformFunction:!0}),qee="forEach",Ree=["typed"],Lee=I(qee,Ree,e=>{var{typed:t}=e,r=O2({typed:t}),n=zd({typed:t});function a(o,s,u){if(o.length===0)return r();var l=o[0];if(o.length===1)return r(l);var c=o.length-1,f=o[c];return l&&(l=i(l,u)),f&&(xr(f)||nu(f)?f=i(f,u):f=Id(f,s,u)),r(l,n(f,c))}a.rawArgs=!0;function i(o,s){return o.compile().evaluate(s)}return a},{isTransformFunction:!0}),Hee="index",Gee=["Index","getMatrixDataType"],Vee=I(Hee,Gee,e=>{var{Index:t,getMatrixDataType:r}=e;return function(){for(var a=[],i=0,o=arguments.length;i<o;i++){var s=arguments[i];if(xd(s))s.start--,s.end-=s.step>0?0:2;else if(s&&s.isSet===!0)s=s.map(function(l){return l-1});else if(Mt(s)||Re(s))r(s)!=="boolean"&&(s=s.map(function(l){return l-1}));else if(ze(s)||Os(s))s--;else if(Ze(s))s=s.toNumber()-1;else if(typeof s!="string")throw new TypeError("Dimension must be an Array, Matrix, number, bigint, string, or Range");a[i]=s}var u=new t;return t.apply(u,a),u}},{isTransformFunction:!0}),Uee="map",Wee=["typed"],Jee=I(Uee,Wee,e=>{var{typed:t}=e,r=B2({typed:t}),n=zd({typed:t});function a(i,o,s){if(i.length===0)return r();if(i.length===1)return r(i[0]);var u=i.length-1,l=i.slice(0,u),c=i[u];return l=l.map(m=>f(m,s)),c&&(xr(c)||nu(c)?c=f(c,s):c=Id(c,o,s)),r(...l,n(c,u));function f(m,d){return m.compile().evaluate(d)}}return a.rawArgs=!0,a},{isTransformFunction:!0});function Kee(e){return ze(e)?e-1:Ze(e)?e.minus(1):e}function Yee(e){return ze(e)||Ze(e)}function wi(e){if(e.length===2&&gn(e[0])){e=e.slice();var t=e[1];Yee(t)&&(e[1]=Kee(t))}return e}var Zee="max",Qee=["typed","config","numeric","larger","isNaN"],Xee=I(Zee,Qee,e=>{var{typed:t,config:r,numeric:n,larger:a,isNaN:i}=e,o=H2({typed:t,config:r,numeric:n,larger:a,isNaN:i});return t("max",{"...any":function(u){u=wi(u);try{return o.apply(null,u)}catch(l){throw Zr(l)}}})},{isTransformFunction:!0}),ete="mean",tte=["typed","add","divide"],rte=I(ete,tte,e=>{var{typed:t,add:r,divide:n}=e,a=Q2({typed:t,add:r,divide:n});return t("mean",{"...any":function(o){o=wi(o);try{return a.apply(null,o)}catch(s){throw Zr(s)}}})},{isTransformFunction:!0}),nte="min",ate=["typed","config","numeric","smaller","isNaN"],ite=I(nte,ate,e=>{var{typed:t,config:r,numeric:n,smaller:a,isNaN:i}=e,o=G2({typed:t,config:r,numeric:n,smaller:a,isNaN:i});return t("min",{"...any":function(u){u=wi(u);try{return o.apply(null,u)}catch(l){throw Zr(l)}}})},{isTransformFunction:!0}),ote="range",ste=["typed","config","?matrix","?bignumber","equal","smaller","smallerEq","larger","largerEq","add","isZero","isPositive"],ute=I(ote,ste,e=>{var{typed:t,config:r,matrix:n,bignumber:a,equal:i,smaller:o,smallerEq:s,larger:u,largerEq:l,add:c,isZero:f,isPositive:m}=e,d=I2({typed:t,config:r,matrix:n,bignumber:a,equal:i,smaller:o,smallerEq:s,larger:u,largerEq:l,add:c,isZero:f,isPositive:m});return t("range",{"...any":function(p){var y=p.length-1,w=p[y];return typeof w!="boolean"&&p.push(!0),d.apply(null,p)}})},{isTransformFunction:!0}),lte="row",cte=["typed","Index","matrix","range"],fte=I(lte,cte,e=>{var{typed:t,Index:r,matrix:n,range:a}=e,i=z2({typed:t,Index:r,matrix:n,range:a});return t("row",{"...any":function(s){var u=s.length-1,l=s[u];ze(l)&&(s[u]=l-1);try{return i.apply(null,s)}catch(c){throw Zr(c)}}})},{isTransformFunction:!0}),mte="subset",dte=["typed","matrix","zeros","add"],hte=I(mte,dte,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e,i=j2({typed:t,matrix:r,zeros:n,add:a});return t("subset",{"...any":function(s){try{return i.apply(null,s)}catch(u){throw Zr(u)}}})},{isTransformFunction:!0}),pte="concat",gte=["typed","matrix","isInteger"],vte=I(pte,gte,e=>{var{typed:t,matrix:r,isInteger:n}=e,a=F2({typed:t,matrix:r,isInteger:n});return t("concat",{"...any":function(o){var s=o.length-1,u=o[s];ze(u)?o[s]=u-1:Ze(u)&&(o[s]=u.minus(1));try{return a.apply(null,o)}catch(l){throw Zr(l)}}})},{isTransformFunction:!0}),kb="diff",yte=["typed","matrix","subtract","number","bignumber"],bte=I(kb,yte,e=>{var{typed:t,matrix:r,subtract:n,number:a,bignumber:i}=e,o=$2({typed:t,matrix:r,subtract:n,number:a,bignumber:i});return t(kb,{"...any":function(u){u=wi(u);try{return o.apply(null,u)}catch(l){throw Zr(l)}}})},{isTransformFunction:!0}),wte="std",xte=["typed","map","sqrt","variance"],Dte=I(wte,xte,e=>{var{typed:t,map:r,sqrt:n,variance:a}=e,i=tD({typed:t,map:r,sqrt:n,variance:a});return t("std",{"...any":function(s){s=wi(s);try{return i.apply(null,s)}catch(u){throw Zr(u)}}})},{isTransformFunction:!0}),Ob="sum",Nte=["typed","config","add","numeric"],Ate=I(Ob,Nte,e=>{var{typed:t,config:r,add:n,numeric:a}=e,i=Y2({typed:t,config:r,add:n,numeric:a});return t(Ob,{"...any":function(s){s=wi(s);try{return i.apply(null,s)}catch(u){throw Zr(u)}}})},{isTransformFunction:!0}),Cte="quantileSeq",Ete=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger","mapSlices"],Ste=I(Cte,Ete,e=>{var{typed:t,bignumber:r,add:n,subtract:a,divide:i,multiply:o,partitionSelect:s,compare:u,isInteger:l,smaller:c,smallerEq:f,larger:m,mapSlices:d}=e,h=eD({typed:t,bignumber:r,add:n,subtract:a,divide:i,multiply:o,partitionSelect:s,compare:u,isInteger:l,smaller:c,smallerEq:f,larger:m,mapSlices:d});return t("quantileSeq",{"Array | Matrix, number | BigNumber":h,"Array | Matrix, number | BigNumber, number":(y,w,D)=>h(y,w,p(D)),"Array | Matrix, number | BigNumber, boolean":h,"Array | Matrix, number | BigNumber, boolean, number":(y,w,D,v)=>h(y,w,D,p(v)),"Array | Matrix, Array | Matrix":h,"Array | Matrix, Array | Matrix, number":(y,w,D)=>h(y,w,p(D)),"Array | Matrix, Array | Matrix, boolean":h,"Array | Matrix, Array | Matrix, boolean, number":(y,w,D,v)=>h(y,w,D,p(v))});function p(y){return wi([[],y])[1]}},{isTransformFunction:!0}),Bb="cumsum",Mte=["typed","add","unaryPlus"],Tte=I(Bb,Mte,e=>{var{typed:t,add:r,unaryPlus:n}=e,a=Z2({typed:t,add:r,unaryPlus:n});return t(Bb,{"...any":function(o){if(o.length===2&&gn(o[0])){var s=o[1];ze(s)?o[1]=s-1:Ze(s)&&(o[1]=s.minus(1))}try{return a.apply(null,o)}catch(u){throw Zr(u)}}})},{isTransformFunction:!0}),$b="variance",Fte=["typed","add","subtract","multiply","divide","mapSlices","isNaN"],Pte=I($b,Fte,e=>{var{typed:t,add:r,subtract:n,multiply:a,divide:i,mapSlices:o,isNaN:s}=e,u=X2({typed:t,add:r,subtract:n,multiply:a,divide:i,mapSlices:o,isNaN:s});return t($b,{"...any":function(c){c=wi(c);try{return u.apply(null,c)}catch(f){throw Zr(f)}}})},{isTransformFunction:!0}),_b="print",kte=["typed","matrix","zeros","add"],Ote=I(_b,kte,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e,i=R2({typed:t,matrix:r,zeros:n,add:a});return t(_b,{"string, Object | Array":function(u,l){return i(o(u),l)},"string, Object | Array, number | Object":function(u,l,c){return i(o(u),l,c)}});function o(s){return s.replace(q2,u=>{var l=u.slice(1).split("."),c=l.map(function(f){return!isNaN(f)&&f.length>0?parseInt(f)-1:f});return"$"+c.join(".")})}},{isTransformFunction:!0}),Bte="and",$te=["typed","matrix","zeros","add","equalScalar","not","concat"],_te=I(Bte,$te,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,s=L2({typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o});function u(l,c,f){var m=l[0].compile().evaluate(f);if(!gn(m)&&!s(m,!0))return!1;var d=l[1].compile().evaluate(f);return s(m,d)}return u.rawArgs=!0,u},{isTransformFunction:!0}),Ite="or",zte=["typed","matrix","equalScalar","DenseMatrix","concat"],jte=I(Ite,zte,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=T2({typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i});function s(u,l,c){var f=u[0].compile().evaluate(c);if(!gn(f)&&o(f,!1))return!0;var m=u[1].compile().evaluate(c);return o(f,m)}return s.rawArgs=!0,s},{isTransformFunction:!0}),qte="nullish",Rte=["typed","matrix","size","flatten","deepEqual"],Lte=I(qte,Rte,e=>{var{typed:t,matrix:r,size:n,flatten:a,deepEqual:i}=e,o=M2({typed:t,matrix:r,size:n,flatten:a,deepEqual:i});function s(u,l,c){var f=u[0].compile().evaluate(c);if(!gn(f)&&f!=null&&f!==void 0)return f;var m=u[1].compile().evaluate(c);return o(f,m)}return s.rawArgs=!0,s},{isTransformFunction:!0}),Hte="bitAnd",Gte=["typed","matrix","zeros","add","equalScalar","not","concat"],Vte=I(Hte,Gte,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,s=E2({typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o});function u(l,c,f){var m=l[0].compile().evaluate(f);if(!gn(m)){if(isNaN(m))return NaN;if(m===0||m===!1)return 0}var d=l[1].compile().evaluate(f);return s(m,d)}return u.rawArgs=!0,u},{isTransformFunction:!0}),Ute="bitOr",Wte=["typed","matrix","equalScalar","DenseMatrix","concat"],Jte=I(Ute,Wte,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=S2({typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i});function s(u,l,c){var f=u[0].compile().evaluate(c);if(!gn(f)){if(isNaN(f))return NaN;if(f===-1)return-1;if(f===!0)return 1}var m=u[1].compile().evaluate(c);return o(f,m)}return s.rawArgs=!0,s},{isTransformFunction:!0}),xe=x8({config:ce}),Pt=E8({}),Ib=xX({BigNumber:xe,config:ce}),Kte=pX({}),Yte=ZX({BigNumber:xe,config:ce}),xi=B8({}),nD=TX({Complex:Pt}),Zte=vX({BigNumber:xe,config:ce}),Qte=AX({BigNumber:xe,config:ce}),Xte=EX({BigNumber:xe,config:ce}),Oc=q8({}),ere=yX({BigNumber:xe,config:ce}),tre=gX({}),rre=DX({BigNumber:xe,config:ce}),nre=I8({}),aD=C9({}),are=SX({BigNumber:xe,config:ce}),ire=gee({BigNumber:xe,config:ce}),iD=wX({BigNumber:xe,config:ce}),ore=hX({}),sre=FX({}),tt=rI({Matrix:Oc,config:ce}),ure=oee({BigNumber:xe,config:ce}),lre=NX({BigNumber:xe,config:ce}),ed=bX({BigNumber:xe,config:ce}),oD=mX({}),cre=MX({BigNumber:xe,config:ce}),G=x9({BigNumber:xe,Complex:Pt,DenseMatrix:tt,Fraction:xi}),fre=iee({BigNumber:xe,config:ce}),Qr=x7({typed:G}),mre=QL({Complex:Pt,config:ce,typed:G}),dre=rH({BigNumber:xe,typed:G}),hre=oH({BigNumber:xe,Complex:Pt,config:ce,typed:G}),cr=C7({typed:G}),pre=mj({typed:G}),gre=mH({BigNumber:xe,Complex:Pt,config:ce,typed:G}),vre=vH({typed:G}),sD=wH({typed:G}),yre=AH({Complex:Pt,config:ce,typed:G}),bre=UI({typed:G}),wre=ij({typed:G}),xre=YI({typed:G}),Dre=aI({typed:G}),Bc=RZ({typed:G}),$c=r7({Complex:Pt,typed:G}),io=hj({typed:G}),jd=EH({typed:G}),Nre=FH({BigNumber:xe,typed:G}),Are=BH({BigNumber:xe,typed:G}),Cre=R7({typed:G}),it=$I({config:ce,typed:G}),Ere=Bq({typed:G}),uD=H7({typed:G}),Sre=V7({Complex:Pt,typed:G}),Mre=k2({typed:G}),oo=_j({typed:G}),Tre=O2({typed:G}),su=Vq({typed:G}),qd=qj({typed:G}),Fre=Zq({format:su,typed:G}),Rd=gj({typed:G}),uu=MI({typed:G}),_a=EI({typed:G}),so=yI({typed:G}),Pre=aR({typed:G}),kre=CX({BigNumber:xe,config:ce}),Ore=WZ({Complex:Pt,typed:G}),Bre=Cz({Complex:Pt,config:ce,typed:G}),Ld=Sz({Complex:Pt,config:ce,typed:G}),Di=B2({typed:G}),$re=Rq({isNaN:_a,isNumeric:so,typed:G}),Qt=Fz({typed:G}),dc=wj({typed:G}),da=HI({typed:G}),_re=Kq({format:su,typed:G}),Ire=NQ({config:ce,typed:G}),zre=R2({typed:G}),jre=CQ({config:ce,typed:G}),Hd=yj({typed:G}),qre=zH({BigNumber:xe,typed:G}),lD=_z({BigNumber:xe,Fraction:xi,complex:$c,typed:G}),_c=LH({typed:G}),fr=lq({typed:G}),mr=zI({Matrix:Oc,equalScalar:it,typed:G}),Rre=p7({typed:G}),Lre=Rz({typed:G}),Hre=JI({typed:G}),_n=S7({typed:G}),Gre=UH({typed:G}),Vre=rR({typed:G}),Gd=kI({typed:G}),Ure=eH({Complex:Pt,config:ce,typed:G}),Wre=uH({BigNumber:xe,typed:G}),Jre=cH({BigNumber:xe,Complex:Pt,config:ce,typed:G}),on=XI({BigNumber:xe,typed:G}),Kre=HZ({typed:G}),Yre=MH({typed:G}),Zre=_H({BigNumber:xe,typed:G}),Ic=NG({addScalar:cr,conj:io,multiplyScalar:Qt,size:fr,typed:G}),Qre=wI({isNumeric:so,typed:G}),Xre=FI({isBounded:uu,map:Di,typed:G}),Ni=gI({config:ce,typed:G}),In=AI({equalScalar:it,typed:G}),we=s7({DenseMatrix:tt,Matrix:Oc,SparseMatrix:mr,typed:G}),ene=l7({isZero:In,matrix:we,typed:G}),xt=kz({addScalar:cr,dot:Ic,equalScalar:it,matrix:we,multiplyScalar:Qt,typed:G}),tne=Kj({BigNumber:xe,config:ce,matrix:we,typed:G}),rne=SQ({config:ce,log2:Ld,typed:G}),nne=rq({config:ce,matrix:we}),ane=qH({BigNumber:xe,typed:G}),ine=GH({typed:G}),one=JL({SparseMatrix:mr,typed:G}),ta=jz({Complex:Pt,config:ce,typed:G}),sne=fq({typed:G}),une=KH({typed:G}),lu=vq({matrix:we,typed:G}),cD=Vz({BigNumber:xe,config:ce,matrix:we,typed:G}),Mr=xq({BigNumber:xe,config:ce,matrix:we,typed:G}),lne=aH({BigNumber:xe,Complex:Pt,config:ce,typed:G}),cne=hH({Complex:Pt,config:ce,typed:G}),fne=Wq({format:su,typed:G}),mne=kH({BigNumber:xe,typed:G}),Vd=bq({conj:io,transpose:lu,typed:G}),fD=kj({DenseMatrix:tt,SparseMatrix:mr,matrix:we,typed:G}),Xr=XR({DenseMatrix:tt,SparseMatrix:mr,equalScalar:it,matrix:we,typed:G}),cu=i7({Fraction:xi,typed:G}),Ai=Lj({BigNumber:xe,DenseMatrix:tt,SparseMatrix:mr,config:ce,matrix:we,typed:G}),Wr=oI({equal:Xr,typed:G}),dne=Gj({matrix:we,multiplyScalar:Qt,typed:G}),Ws=Um({isInteger:Wr,typed:G}),Ud=d7({flatten:oo,matrix:we,size:fr,typed:G}),On=sR({bignumber:on,fraction:cu,number:da}),mD=Hq({config:ce,multiplyScalar:Qt,numeric:On,typed:G}),dD=Xj({isInteger:Wr,matrix:we,typed:G}),ss=dR({BigNumber:xe,DenseMatrix:tt,config:ce,equalScalar:it,matrix:we,typed:G,zeros:Mr}),ha=v7({typed:G}),hne=jZ({BigNumber:xe,Fraction:xi,config:ce,isInteger:Wr,number:da,typed:G}),hD=T7({BigNumber:xe,Complex:Pt,Fraction:xi,config:ce,isNegative:Ni,matrix:we,typed:G,unaryMinus:ha}),dt=F2({isInteger:Wr,matrix:we,typed:G}),pne=Mj({prod:mD,size:fr,typed:G}),fu=gL({equal:Xr,typed:G}),Ut=lR({numeric:On,typed:G}),gne=Zz({concat:dt,equalScalar:it,matrix:we,multiplyScalar:Qt,typed:G}),pD=D2({DenseMatrix:tt,config:ce,equalScalar:it,matrix:we,round:ss,typed:G,zeros:Mr}),vne=yz({BigNumber:xe,DenseMatrix:tt,concat:dt,config:ce,equalScalar:it,matrix:we,round:ss,typed:G,zeros:Mr}),uo=DI({config:ce,typed:G}),Jr=cL({DenseMatrix:tt,SparseMatrix:mr,bignumber:on,concat:dt,config:ce,matrix:we,typed:G}),yne=Dz({concat:dt,equalScalar:it,matrix:we,typed:G}),bne=_R({DenseMatrix:tt,concat:dt,equalScalar:it,matrix:we,typed:G,zeros:Mr}),gD=ER({DenseMatrix:tt,divideScalar:Ut,equalScalar:it,matrix:we,multiplyScalar:Qt,subtractScalar:_n,typed:G}),Wd=H2({config:ce,isNaN:_a,larger:Jr,numeric:On,typed:G}),vD=A2({DenseMatrix:tt,concat:dt,config:ce,equalScalar:it,matrix:we,round:ss,typed:G,zeros:Mr}),wne=Bz({BigNumber:xe,concat:dt,equalScalar:it,matrix:we,typed:G}),xne=M2({deepEqual:fu,flatten:oo,matrix:we,size:fr,typed:G}),Dne=T2({DenseMatrix:tt,concat:dt,equalScalar:it,matrix:we,typed:G}),Jd=FV({addScalar:cr,complex:$c,conj:io,divideScalar:Ut,equal:Xr,identity:Ai,isZero:In,matrix:we,multiplyScalar:Qt,sign:lD,sqrt:ta,subtractScalar:_n,typed:G,unaryMinus:ha,zeros:Mr}),Nne=zR({DenseMatrix:tt,concat:dt,equalScalar:it,matrix:we,typed:G,zeros:Mr}),Kr=aL({DenseMatrix:tt,SparseMatrix:mr,bignumber:on,concat:dt,config:ce,matrix:we,typed:G}),rr=Hz({DenseMatrix:tt,concat:dt,equalScalar:it,matrix:we,subtractScalar:_n,typed:G,unaryMinus:ha}),Ane=eR({concat:dt,matrix:we,typed:G}),Kd=b7({config:ce,numeric:On,typed:G}),Yd=MR({DenseMatrix:tt,divideScalar:Ut,equalScalar:it,matrix:we,multiplyScalar:Qt,subtractScalar:_n,typed:G}),Cne=Aj({DenseMatrix:tt,SparseMatrix:mr,concat:dt,matrix:we,typed:G}),lt=vG({DenseMatrix:tt,SparseMatrix:mr,addScalar:cr,concat:dt,equalScalar:it,matrix:we,typed:G}),Ene=DH({BigNumber:xe,DenseMatrix:tt,concat:dt,equalScalar:it,matrix:we,typed:G}),Sne=E2({concat:dt,equalScalar:it,matrix:we,typed:G}),Mne=S2({DenseMatrix:tt,concat:dt,equalScalar:it,matrix:we,typed:G}),Tne=cj({DenseMatrix:tt,SparseMatrix:mr,concat:dt,matrix:we,typed:G}),Fne=OQ({addScalar:cr,combinations:Bc,divideScalar:Ut,isInteger:Wr,isNegative:Ni,multiplyScalar:Qt,typed:G}),lo=HR({BigNumber:xe,DenseMatrix:tt,Fraction:xi,concat:dt,config:ce,equalScalar:it,matrix:we,typed:G}),yD=ZR({concat:dt,matrix:we,typed:G}),Pne=$Q({addScalar:cr,combinations:Bc,isInteger:Wr,isNegative:Ni,isPositive:uo,larger:Jr,typed:G}),kne=Fj({matrix:we,multiply:xt,subtract:rr,typed:G}),bD=QY({divideScalar:Ut,isZero:In,matrix:we,multiply:xt,subtractScalar:_n,typed:G,unaryMinus:ha}),One=$2({matrix:we,number:da,subtract:rr,typed:G}),Bne=DZ({abs:Qr,addScalar:cr,deepEqual:fu,divideScalar:Ut,multiplyScalar:Qt,sqrt:ta,subtractScalar:_n,typed:G}),mu=AR({DenseMatrix:tt,SparseMatrix:mr,concat:dt,divideScalar:Ut,equalScalar:it,matrix:we,typed:G}),$ne=rL({compareText:yD,isZero:In,typed:G}),wD=BL({larger:Jr,smaller:Kr}),_ne=bG({abs:Qr,addScalar:cr,divideScalar:Ut,isPositive:uo,multiplyScalar:Qt,smaller:Kr,sqrt:ta,typed:G}),xD=ML({DenseMatrix:tt,smaller:Kr}),_r=PL({ImmutableDenseMatrix:xD,getMatrixDataType:qd}),Ine=CZ({abs:Qr,add:lt,addScalar:cr,config:ce,divideScalar:Ut,equalScalar:it,flatten:oo,isNumeric:so,isZero:In,matrix:we,multiply:xt,multiplyScalar:Qt,smaller:Kr,subtract:rr,typed:G}),zne=Wz({BigNumber:xe,add:lt,config:ce,equal:Xr,isInteger:Wr,mod:vD,smaller:Kr,typed:G,xgcd:cD}),zc=dL({DenseMatrix:tt,SparseMatrix:mr,concat:dt,config:ce,matrix:we,typed:G}),Zd=gR({Complex:Pt,config:ce,divideScalar:Ut,typeOf:Gd,typed:G}),jne=FR({DenseMatrix:tt,divideScalar:Ut,equalScalar:it,matrix:we,multiplyScalar:Qt,subtractScalar:_n,typed:G}),qne=f7({flatten:oo,matrix:we,size:fr,typed:G}),Rne=G2({config:ce,isNaN:_a,numeric:On,smaller:Kr,typed:G}),Lne=wR({Complex:Pt,config:ce,divideScalar:Ut,typed:G}),jc=xL({compare:lo,isNaN:_a,isNumeric:so,typed:G}),Hne=qR({DenseMatrix:tt,concat:dt,equalScalar:it,matrix:we,typed:G,zeros:Mr}),DD=eU({SparseMatrix:mr,abs:Qr,add:lt,divideScalar:Ut,larger:Jr,largerEq:zc,multiply:xt,subtract:rr,transpose:lu,typed:G}),ND=IL({FibonacciHeap:wD,addScalar:cr,equalScalar:it}),bn=j2({add:lt,matrix:we,typed:G,zeros:Mr}),Qd=Y2({add:lt,config:ce,numeric:On,typed:G}),Gne=EG({add:lt,matrix:we,typed:G}),AD=kR({DenseMatrix:tt,divideScalar:Ut,equalScalar:it,matrix:we,multiplyScalar:Qt,subtractScalar:_n,typed:G}),Vne=aX({Complex:Pt,add:lt,multiply:xt,number:da,typed:G}),Xd=j7({DenseMatrix:tt,config:ce,equalScalar:it,matrix:we,round:ss,typed:G,zeros:Mr}),pa=JR({compare:lo,typed:G}),Une=Z2({add:lt,typed:G,unaryPlus:Kd}),CD=J7({Complex:Pt,DenseMatrix:tt,ceil:Xd,equalScalar:it,floor:pD,matrix:we,typed:G,zeros:Mr}),ED=MG({Index:_r,typed:G}),co=eZ({abs:Qr,addScalar:cr,det:bD,divideScalar:Ut,identity:Ai,matrix:we,multiply:xt,typed:G,unaryMinus:ha}),Wne=yR({Complex:Pt,config:ce,divideScalar:Ut,log:Zd,typed:G}),SD=MV({DenseMatrix:tt,Spa:ND,SparseMatrix:mr,abs:Qr,addScalar:cr,divideScalar:Ut,equalScalar:it,larger:Jr,matrix:we,multiplyScalar:Qt,subtractScalar:_n,typed:G,unaryMinus:ha}),Jne=rZ({Complex:Pt,add:lt,ctranspose:Vd,deepEqual:fu,divideScalar:Ut,dot:Ic,dotDivide:mu,equal:Xr,inv:co,matrix:we,multiply:xt,typed:G}),ra=fR({Complex:Pt,config:ce,fraction:cu,identity:Ai,inv:co,matrix:we,multiply:xt,number:da,typed:G}),Kne=ZH({DenseMatrix:tt,Index:_r,compareNatural:pa,size:fr,subset:bn,typed:G}),Yne=tG({DenseMatrix:tt,Index:_r,compareNatural:pa,size:fr,subset:bn,typed:G}),Zne=iG({Index:_r,compareNatural:pa,size:fr,subset:bn,typed:G}),Qne=lG({Index:_r,compareNatural:pa,size:fr,subset:bn,typed:G}),Zo=sL({DenseMatrix:tt,SparseMatrix:mr,concat:dt,config:ce,matrix:we,typed:G}),Xne=NL({compare:lo,compareNatural:pa,matrix:we,typed:G}),eae=fZ({abs:Qr,add:lt,identity:Ai,inv:co,map:Di,max:Wd,multiply:xt,size:fr,sqrt:ta,subtract:rr,typed:G}),tae=yL({DenseMatrix:tt,SparseMatrix:mr,concat:dt,config:ce,equalScalar:it,matrix:we,typed:G}),rae=L2({concat:dt,equalScalar:it,matrix:we,not:dc,typed:G,zeros:Mr}),Tr=wZ({divideScalar:Ut,equalScalar:it,inv:co,matrix:we,multiply:xt,typed:G}),nae=lZ({abs:Qr,add:lt,identity:Ai,inv:co,multiply:xt,typed:G}),MD=Nq({addScalar:cr,ceil:Xd,conj:io,divideScalar:Ut,dotDivide:mu,exp:uD,i:nD,log2:Ld,matrix:we,multiplyScalar:Qt,pow:ra,tau:iD,typed:G}),aae=oX({Complex:Pt,add:lt,divide:Tr,matrix:we,multiply:xt,typed:G}),eh=VZ({BigNumber:xe,Complex:Pt,config:ce,multiplyScalar:Qt,pow:ra,typed:G}),iae=Cq({conj:io,dotDivide:mu,fft:MD,typed:G}),oae=ZZ({divide:Tr,dotDivide:mu,isNumeric:so,log:Zd,map:Di,matrix:we,multiply:xt,sum:Qd,typed:G}),TD=rU({DenseMatrix:tt,lsolve:gD,lup:SD,matrix:we,slu:DD,typed:G,usolve:Yd}),FD=Q2({add:lt,divide:Tr,typed:G}),PD=FZ({add:lt,compare:lo,divide:Tr,partitionSelect:jc,typed:G}),sae=aU({add:lt,cbrt:hD,divide:Tr,equalScalar:it,im:Rd,isZero:In,multiply:xt,re:Hd,sqrt:ta,subtract:rr,typeOf:Gd,typed:G,unaryMinus:ha}),uae=eD({bignumber:on,add:lt,compare:lo,divide:Tr,isInteger:Wr,larger:Jr,mapSlices:Ws,multiply:xt,partitionSelect:jc,smaller:Kr,smallerEq:Zo,subtract:rr,typed:G}),Qo=I2({bignumber:on,matrix:we,add:lt,config:ce,equal:Xr,isPositive:uo,isZero:In,larger:Jr,largerEq:zc,smaller:Kr,smallerEq:Zo,typed:G}),lae=z2({Index:_r,matrix:we,range:Qo,typed:G}),kD=XH({DenseMatrix:tt,Index:_r,compareNatural:pa,size:fr,subset:bn,typed:G}),cae=sG({Index:_r,compareNatural:pa,size:fr,subset:bn,typed:G}),OD=dG({Index:_r,concat:dt,setDifference:kD,size:fr,subset:bn,typed:G}),fae=Pq({abs:Qr,add:lt,bignumber:on,divide:Tr,isNegative:Ni,isPositive:uo,larger:Jr,map:Di,matrix:we,max:Wd,multiply:xt,smaller:Kr,subtract:rr,typed:G,unaryMinus:ha}),Le=GL({BigNumber:xe,Complex:Pt,Fraction:xi,abs:Qr,addScalar:cr,config:ce,divideScalar:Ut,equal:Xr,fix:CD,format:su,isNumeric:so,multiplyScalar:Qt,number:da,pow:ra,round:ss,subtractScalar:_n}),mae=IX({BigNumber:xe,Unit:Le,config:ce}),dae=see({BigNumber:xe,Unit:Le,config:ce}),hae=RX({BigNumber:xe,Unit:Le,config:ce}),pae=lee({BigNumber:xe,Unit:Le,config:ce}),BD=P2({Index:_r,matrix:we,range:Qo,typed:G}),gae=LX({BigNumber:xe,Unit:Le,config:ce}),vae=zX({BigNumber:xe,Unit:Le,config:ce}),yae=YL({Unit:Le,typed:G}),bae=eee({BigNumber:xe,Unit:Le,config:ce}),$D=sZ({abs:Qr,add:lt,addScalar:cr,atan:sD,bignumber:on,column:BD,complex:$c,config:ce,cos:jd,diag:fD,divideScalar:Ut,dot:Ic,equal:Xr,flatten:oo,im:Rd,inv:co,larger:Jr,matrix:we,matrixFromColumns:Ud,multiply:xt,multiplyScalar:Qt,number:da,qr:Jd,re:Hd,reshape:dD,sin:_c,size:fr,smaller:Kr,sqrt:ta,subtract:rr,typed:G,usolve:Yd,usolveAll:AD}),wae=KX({BigNumber:xe,Unit:Le,config:ce}),du=KZ({gamma:eh,typed:G}),xae=YX({BigNumber:xe,Unit:Le,config:ce}),Dae=dee({BigNumber:xe,Unit:Le,config:ce}),Nae=Dee({BigNumber:xe,Unit:Le,config:ce}),Aae=UX({BigNumber:xe,Unit:Le,config:ce}),Cae=mee({BigNumber:xe,Unit:Le,config:ce}),Eae=kZ({abs:Qr,map:Di,median:PD,subtract:rr,typed:G}),Sae=GX({BigNumber:xe,Unit:Le,config:ce}),Mae=wee({BigNumber:xe,Unit:Le,config:ce}),Tae=hee({BigNumber:xe,Unit:Le,config:ce}),Fae=XZ({add:lt,divide:Tr,factorial:du,isInteger:Wr,isPositive:uo,multiply:xt,typed:G}),th=xG({abs:Qr,add:lt,conj:io,ctranspose:Vd,eigs:$D,equalScalar:it,larger:Jr,matrix:we,multiply:xt,pow:ra,smaller:Kr,sqrt:ta,typed:G}),Pae=tQ({factorial:du,typed:G}),kae=OX({BigNumber:xe,Unit:Le,config:ce}),Oae=Aee({BigNumber:xe,Unit:Le,config:ce}),Bae=Cee({BigNumber:xe,Unit:Le,config:ce}),$ae=BX({BigNumber:xe,Unit:Le,config:ce}),_D=oq({BigNumber:xe,DenseMatrix:tt,SparseMatrix:mr,addScalar:cr,config:ce,cos:jd,matrix:we,multiplyScalar:Qt,norm:th,sin:_c,typed:G,unaryMinus:ha}),_ae=nee({BigNumber:xe,Unit:Le,config:ce}),Iae=vee({BigNumber:xe,Unit:Le,config:ce}),zae=fG({compareNatural:pa,typed:G}),jae=PX({BigNumber:xe,Unit:Le,config:ce}),qae=yee({BigNumber:xe,Unit:Le,config:ce}),Rae=aee({BigNumber:xe,Unit:Le,config:ce}),rh=X2({add:lt,divide:Tr,isNaN:_a,mapSlices:Ws,multiply:xt,subtract:rr,typed:G}),Lae=jq({BigNumber:xe,Complex:Pt,add:lt,config:ce,divide:Tr,equal:Xr,factorial:du,gamma:eh,isBounded:uu,isNegative:Ni,multiply:xt,pi:ed,pow:ra,sin:_c,smallerEq:Zo,subtract:rr,typed:G}),Hae=uee({BigNumber:xe,Unit:Le,config:ce}),Gae=WX({BigNumber:xe,Unit:Le,config:ce}),Vae=IZ({add:lt,divide:Tr,matrix:we,mean:FD,multiply:xt,pow:ra,sqrt:ta,subtract:rr,sum:Qd,typed:G}),Uae=DR({DenseMatrix:tt,SparseMatrix:mr,concat:dt,equalScalar:it,matrix:we,pow:ra,typed:G}),Wae=qX({BigNumber:xe,Unit:Le,config:ce}),Jae=cee({BigNumber:xe,Unit:Le,config:ce}),Kae=QX({BigNumber:xe,Unit:Le,config:ce}),Yae=HX({BigNumber:xe,Unit:Le,config:ce}),Zae=$X({BigNumber:xe,Unit:Le,config:ce}),Qae=xee({BigNumber:xe,Unit:Le,config:ce}),Xae=tee({BigNumber:xe,Unit:Le,config:ce}),eie=Eee({BigNumber:xe,Unit:Le,config:ce}),tie=See({BigNumber:xe,Unit:Le,config:ce}),rie=ree({BigNumber:xe,Unit:Le,config:ce}),ID=nG({DenseMatrix:tt,Index:_r,compareNatural:pa,size:fr,subset:bn,typed:G}),nie=tD({map:Di,sqrt:ta,typed:G,variance:rh}),zD=TQ({bignumber:on,addScalar:cr,combinations:Bc,divideScalar:Ut,factorial:du,isInteger:Wr,isNegative:Ni,larger:Jr,multiplyScalar:Qt,number:da,pow:ra,subtractScalar:_n,typed:G}),aie=UL({Unit:Le,typed:G}),iie=PQ({addScalar:cr,isInteger:Wr,isNegative:Ni,stirlingS2:zD,typed:G}),oie=_X({BigNumber:xe,Unit:Le,config:ce}),sie=fee({BigNumber:xe,Unit:Le,config:ce}),uie=VX({BigNumber:xe,Unit:Le,config:ce}),lie=Nee({BigNumber:xe,Unit:Le,config:ce}),cie=aq({multiply:xt,rotationMatrix:_D,typed:G}),fie=pG({Index:_r,concat:dt,setIntersect:ID,setSymDifference:OD,size:fr,subset:bn,typed:G}),mie=bee({BigNumber:xe,Unit:Le,config:ce}),die=JX({BigNumber:xe,Unit:Le,config:ce}),hie=pee({BigNumber:xe,Unit:Le,config:ce}),jD=pZ({identity:Ai,matrix:we,multiply:xt,norm:th,qr:Jd,subtract:rr,typed:G}),pie=jX({BigNumber:xe,Unit:Le,config:ce}),gie=kX({BigNumber:xe,Unit:Le,config:ce}),vie=XX({BigNumber:xe,Unit:Le,config:ce}),qD=dZ({abs:Qr,add:lt,concat:dt,identity:Ai,index:ED,lusolve:TD,matrix:we,matrixFromColumns:Ud,multiply:xt,range:Qo,schur:jD,subset:bn,subtract:rr,transpose:lu,typed:G}),yie=vZ({matrix:we,multiply:xt,sylvester:qD,transpose:lu,typed:G}),us={},hu={},RD={},qr=PG({mathWithTransform:hu}),ls=tV({Node:qr}),Va=nV({Node:qr}),fo=iV({Node:qr}),LD=lV({Node:qr}),cs=$G({Node:qr}),HD=RG({Node:qr,ResultSet:aD}),GD=HG({Node:qr}),VD=sV({Node:qr}),bie=lX({classes:RD}),nh=cU({math:us,typed:G}),UD=ZG({Node:qr,typed:G}),wie=YY({Chain:nh,typed:G}),Ci=KG({Node:qr,isBounded:uu}),fs=XG({Node:qr,size:fr}),ms=OG({Node:qr,subset:bn}),WD=jG({matrix:we,Node:qr,subset:bn}),Ei=mV({Unit:Le,Node:qr,math:us}),Si=hV({Node:qr,SymbolNode:Ei,math:us}),na=gV({AccessorNode:ms,ArrayNode:cs,AssignmentNode:WD,BlockNode:HD,ConditionalNode:GD,ConstantNode:Ci,FunctionAssignmentNode:UD,FunctionNode:Si,IndexNode:fs,ObjectNode:ls,OperatorNode:Va,ParenthesisNode:fo,RangeNode:VD,RelationalNode:LD,SymbolNode:Ei,config:ce,numeric:On,typed:G}),JD=YQ({ConstantNode:Ci,FunctionNode:Si,OperatorNode:Va,ParenthesisNode:fo,parse:na,typed:G}),ah=VQ({bignumber:on,fraction:cu,AccessorNode:ms,ArrayNode:cs,ConstantNode:Ci,FunctionNode:Si,IndexNode:fs,ObjectNode:ls,OperatorNode:Va,SymbolNode:Ei,config:ce,isBounded:uu,mathWithTransform:hu,matrix:we,typed:G}),xie=yV({parse:na,typed:G}),Die=IQ({parse:na,typed:G}),ih=WQ({AccessorNode:ms,ArrayNode:cs,ConstantNode:Ci,FunctionNode:Si,IndexNode:fs,ObjectNode:ls,OperatorNode:Va,ParenthesisNode:fo,SymbolNode:Ei,add:lt,divide:Tr,equal:Xr,isZero:In,multiply:xt,parse:na,pow:ra,subtract:rr,typed:G}),qc=wV({parse:na,typed:G}),KD=sU({evaluate:qc}),YD=NV({evaluate:qc,parse:na}),Nie=EV({Parser:YD,typed:G}),Rc=LQ({AccessorNode:ms,ArrayNode:cs,ConstantNode:Ci,FunctionNode:Si,IndexNode:fs,ObjectNode:ls,OperatorNode:Va,ParenthesisNode:fo,SymbolNode:Ei,equal:Xr,parse:na,replacer:oD,resolve:JD,simplifyConstant:ah,simplifyCore:ih,typed:G}),Aie=QQ({OperatorNode:Va,parse:na,simplify:Rc,typed:G}),Cie=eX({ConstantNode:Ci,FunctionNode:Si,OperatorNode:Va,ParenthesisNode:fo,SymbolNode:Ei,config:ce,equal:Xr,isZero:In,numeric:On,parse:na,simplify:Rc,typed:G}),Eie=JY({Help:KD,mathWithTransform:hu,typed:G}),Sie=rX({bignumber:on,fraction:cu,AccessorNode:ms,ArrayNode:cs,ConstantNode:Ci,FunctionNode:Si,IndexNode:fs,ObjectNode:ls,OperatorNode:Va,ParenthesisNode:fo,SymbolNode:Ei,add:lt,config:ce,divide:Tr,equal:Xr,isZero:In,mathWithTransform:hu,matrix:we,multiply:xt,parse:na,pow:ra,simplify:Rc,simplifyConstant:ah,simplifyCore:ih,subtract:rr,typed:G});er(us,{e:Ib,false:Kte,fineStructure:Yte,i:nD,Infinity:Zte,LN10:Qte,LOG10E:Xte,NaN:ere,null:tre,phi:rre,SQRT1_2:are,sackurTetrode:ire,tau:iD,true:ore,E:Ib,version:sre,efimovFactor:ure,LN2:lre,pi:ed,replacer:oD,reviver:bie,SQRT2:cre,typed:G,PI:ed,weakMixingAngle:fre,abs:Qr,acos:mre,acot:dre,acsc:hre,addScalar:cr,arg:pre,asech:gre,asinh:vre,atan:sD,atanh:yre,bigint:bre,bitNot:wre,boolean:xre,clone:Dre,combinations:Bc,complex:$c,conj:io,cos:jd,cot:Nre,csc:Are,cube:Cre,equalScalar:it,erf:Ere,exp:uD,expm1:Sre,filter:Mre,flatten:oo,forEach:Tre,format:su,getMatrixDataType:qd,hex:Fre,im:Rd,isBounded:uu,isNaN:_a,isNumeric:so,isPrime:Pre,LOG2E:kre,lgamma:Ore,log10:Bre,log2:Ld,map:Di,mode:$re,multiplyScalar:Qt,not:dc,number:da,oct:_re,pickRandom:Ire,print:zre,random:jre,re:Hd,sec:qre,sign:lD,sin:_c,size:fr,splitUnit:Rre,square:Lre,string:Hre,subtractScalar:_n,tan:Gre,toBest:Vre,typeOf:Gd,acosh:Ure,acsch:Wre,asec:Jre,bignumber:on,chain:wie,combinationsWithRep:Kre,cosh:Yre,csch:Zre,dot:Ic,hasNumericValue:Qre,isFinite:Xre,isNegative:Ni,isZero:In,matrix:we,matrixFromFunction:ene,multiply:xt,ones:tne,randomInt:rne,resize:nne,sech:ane,sinh:ine,sparse:one,sqrt:ta,squeeze:sne,tanh:une,transpose:lu,xgcd:cD,zeros:Mr,acoth:lne,asin:cne,bin:fne,coth:mne,ctranspose:Vd,diag:fD,equal:Xr,fraction:cu,identity:Ai,isInteger:Wr,kron:dne,mapSlices:Ws,matrixFromColumns:Ud,numeric:On,prod:mD,reshape:dD,round:ss,unaryMinus:ha,bernoulli:hne,cbrt:hD,concat:dt,count:pne,deepEqual:fu,divideScalar:Ut,dotMultiply:gne,floor:pD,gcd:vne,isPositive:uo,larger:Jr,lcm:yne,leftShift:bne,lsolve:gD,max:Wd,mod:vD,nthRoot:wne,nullish:xne,or:Dne,qr:Jd,rightArithShift:Nne,smaller:Kr,subtract:rr,to:Ane,unaryPlus:Kd,usolve:Yd,xor:Cne,add:lt,atan2:Ene,bitAnd:Sne,bitOr:Mne,bitXor:Tne,catalan:Fne,compare:lo,compareText:yD,composition:Pne,cross:kne,det:bD,diff:One,distance:Bne,dotDivide:mu,equalText:$ne,hypot:_ne,intersect:Ine,invmod:zne,largerEq:zc,log:Zd,lsolveAll:jne,matrixFromRows:qne,min:Rne,nthRoots:Lne,partitionSelect:jc,rightLogShift:Hne,slu:DD,subset:bn,sum:Qd,trace:Gne,usolveAll:AD,zpk2tf:Vne,ceil:Xd,compareNatural:pa,cumsum:Une,fix:CD,index:ED,inv:co,log1p:Wne,lup:SD,pinv:Jne,pow:ra,setCartesian:Kne,setDistinct:Yne,setIsSubset:Zne,setPowerset:Qne,smallerEq:Zo,sort:Xne,sqrtm:eae,unequal:tae,and:rae,divide:Tr,expm:nae,fft:MD,freqz:aae,gamma:eh,ifft:iae,kldivergence:oae,lusolve:TD,mean:FD,median:PD,polynomialRoot:sae,quantileSeq:uae,range:Qo,row:lae,setDifference:kD,setMultiplicity:cae,setSymDifference:OD,solveODE:fae,vacuumImpedance:mae,atomicMass:dae,bohrMagneton:hae,boltzmann:pae,column:BD,conductanceQuantum:gae,coulomb:vae,createUnit:yae,deuteronMass:bae,eigs:$D,electronMass:wae,factorial:du,fermiCoupling:xae,gasConstant:Dae,gravity:Nae,klitzing:Aae,loschmidt:Cae,mad:Eae,magneticFluxQuantum:Sae,molarMass:Mae,molarPlanckConstant:Tae,multinomial:Fae,norm:th,permutations:Pae,planckConstant:kae,planckMass:Oae,planckTime:Bae,reducedPlanckConstant:$ae,rotationMatrix:_D,rydberg:_ae,secondRadiation:Iae,setSize:zae,speedOfLight:jae,stefanBoltzmann:qae,thomsonCrossSection:Rae,variance:rh,zeta:Lae,avogadro:Hae,bohrRadius:Gae,corr:Vae,dotPow:Uae,elementaryCharge:Wae,faraday:Jae,hartreeEnergy:Kae,inverseConductanceQuantum:Yae,magneticConstant:Zae,molarMassC12:Qae,neutronMass:Xae,parse:na,planckCharge:eie,planckTemperature:tie,quantumOfCirculation:rie,resolve:JD,setIntersect:ID,simplifyConstant:ah,std:nie,stirlingS2:zD,unit:aie,bellNumbers:iie,compile:xie,electricConstant:oie,firstRadiation:sie,leafCount:Die,nuclearMagneton:uie,planckLength:lie,rotate:cie,setUnion:fie,simplifyCore:ih,wienDisplacement:mie,classicalElectronRadius:die,evaluate:qc,molarVolume:hie,schur:jD,coulombConstant:pie,gravitationConstant:gie,parser:Nie,simplify:Rc,symbolicEqual:Aie,derivative:Cie,protonMass:vie,sylvester:qD,help:Eie,rationalize:Sie,lyap:yie,config:ce});er(hu,us,{map:Jee({typed:G}),filter:jee({typed:G}),forEach:Lee({typed:G}),mapSlices:Pee({isInteger:Wr,typed:G}),and:_te({add:lt,concat:dt,equalScalar:it,matrix:we,not:dc,typed:G,zeros:Mr}),cumsum:Tte({add:lt,typed:G,unaryPlus:Kd}),nullish:Lte({deepEqual:fu,flatten:oo,matrix:we,size:fr,typed:G}),print:Ote({add:lt,matrix:we,typed:G,zeros:Mr}),bitAnd:Vte({add:lt,concat:dt,equalScalar:it,matrix:we,not:dc,typed:G,zeros:Mr}),concat:vte({isInteger:Wr,matrix:we,typed:G}),diff:bte({bignumber:on,matrix:we,number:da,subtract:rr,typed:G}),max:Xee({config:ce,isNaN:_a,larger:Jr,numeric:On,typed:G}),min:ite({config:ce,isNaN:_a,numeric:On,smaller:Kr,typed:G}),or:jte({DenseMatrix:tt,concat:dt,equalScalar:it,matrix:we,typed:G}),subset:hte({add:lt,matrix:we,typed:G,zeros:Mr}),bitOr:Jte({DenseMatrix:tt,concat:dt,equalScalar:it,matrix:we,typed:G}),sum:Ate({add:lt,config:ce,numeric:On,typed:G}),variance:Pte({add:lt,divide:Tr,isNaN:_a,mapSlices:Ws,multiply:xt,subtract:rr,typed:G}),index:Vee({Index:_r,getMatrixDataType:qd}),quantileSeq:Ste({add:lt,bignumber:on,compare:lo,divide:Tr,isInteger:Wr,larger:Jr,mapSlices:Ws,multiply:xt,partitionSelect:jc,smaller:Kr,smallerEq:Zo,subtract:rr,typed:G}),range:ute({bignumber:on,matrix:we,add:lt,config:ce,equal:Xr,isPositive:uo,isZero:In,larger:Jr,largerEq:zc,smaller:Kr,smallerEq:Zo,typed:G}),column:Bee({Index:_r,matrix:we,range:Qo,typed:G}),row:fte({Index:_r,matrix:we,range:Qo,typed:G}),mean:rte({add:lt,divide:Tr,typed:G}),std:Dte({map:Di,sqrt:ta,typed:G,variance:rh})});er(RD,{BigNumber:xe,Complex:Pt,Fraction:xi,Matrix:Oc,Node:qr,ObjectNode:ls,OperatorNode:Va,ParenthesisNode:fo,Range:nre,RelationalNode:LD,ResultSet:aD,ArrayNode:cs,BlockNode:HD,ConditionalNode:GD,DenseMatrix:tt,RangeNode:VD,Chain:nh,FunctionAssignmentNode:UD,SparseMatrix:mr,ConstantNode:Ci,IndexNode:fs,FibonacciHeap:wD,ImmutableDenseMatrix:xD,Index:_r,Spa:ND,AccessorNode:ms,AssignmentNode:WD,Unit:Le,SymbolNode:Ei,FunctionNode:Si,Help:KD,Parser:YD});nh.createProxy(us);const oh=({ref:e,onChange:t,value:r,dragDirection:n,showDragHandle:a=!0,dragScale:i,selectOnFocus:o=!0,bounds:s=ge.H.INFINITE,resetValue:u,variant:l="outlined",className:c,children:f,disabled:m,onBlur:d,units:h,size:p,color:y,contrast:w,...D})=>{const[v,x,g]=an.useCombinedStateAndRef(r.toString()),[b,C,N]=an.useCombinedStateAndRef(!0),A=an.useSyncedRef(r),E=wr.useCallback(()=>{if(N.current)return;C(!0);let M=null;try{const $=qc(g.current);$ instanceof Le?M=$.toNumber():typeof $=="number"&&!isNaN($)&&(M=$)}catch{M=null}M!=null?t?.(ge.H.clamp(s,M)):x(A.current.toString())},[t,x]),S=an.useSyncedRef(E),F=wr.useCallback(()=>{d?.(),E()},[d,E]);wr.useEffect(()=>()=>S.current?.(),[]);const k=wr.useCallback(M=>{C(!1),x(M)},[x,C]),B=b?r:v,L=wr.useCallback(M=>{C(!0),t?.(ge.H.clamp(s,Math.round(M)))},[t,C]);return i==null&&ge.H.isFinite(s)&&(i={x:ge.H.span(s)*.01,y:ge.H.span(s)*.02}),(m||l==="preview")&&(a=!1),Ae.jsxRuntimeExports.jsxs(za.Text,{ref:e,type:"text",variant:l,value:B.toString(),onChange:k,disabled:m,selectOnFocus:o,onKeyDown:M=>{Pa.eventKey(M)==="Enter"&&(E(),d?.())},onBlur:F,size:p,color:y,contrast:w,...D,children:[a&&Ae.jsxRuntimeExports.jsx(hc,{direction:n,value:r,onChange:L,dragScale:i,resetValue:u,onBlur:F,size:p,color:y,contrast:w}),f]})},Mie=({location:e="left",size:t="9rem",className:r,style:n,bordered:a=!1,...i})=>{const o=ge.K.construct(e),s=ge.K.direction(o),u=ge.p.swap(s);return Ae.jsxRuntimeExports.jsx(ar.Box$1,{className:ge.CSS(ge.CSS.B("navbar"),a&&ge.CSS.bordered(ge.K.swap(o)),ge.CSS.dir(u),ge.CSS.loc(o),r),direction:u,style:{[ge.p.dimension(s)]:t,...n},align:"center",empty:!0,...i})},pu=e=>(({bordered:t=!1,className:r,...n})=>Ae.jsxRuntimeExports.jsx(ar.Box$1,{className:ge.CSS(ge.CSS.BE("navbar","content"),e==="absolute-center"?ge.CSS.M(e):ge.CSS.align(e),e!==""&&t&&ge.CSS.bordered(e),r),align:"center",...n})),ZD=pu("start");ZD.displayName="NavbarStart";const QD=pu("end");QD.displayName="NavbarEnd";const XD=pu("center");XD.displayName="NavbarCenter";const eN=pu("");eN.displayName="NavbarContent";const tN=pu("absolute-center");tN.displayName="NavbarAbsoluteCenter";const Ia=Mie;Ia.Start=ZD;Ia.Center=XD;Ia.End=QD;Ia.AbsoluteCenter=tN;Ia.Content=eN;const Tie=({value:e,onChange:t,onBlur:r,onlyChangeOnBlur:n,variant:a,...i})=>{const[o,s]=wr.useState(null),u=(h,p=!1)=>{const y=h.toString();if(s(y),!(typeof h=="string")){t(Number(h)),s(null);return}const D=new ge.r(y,"local");(!n||p)&&(t(Number(D.valueOf())),s(null))},l=h=>{u(h.target.value,!0),s(null),r?.(h)},c=new ge.r(e,"UTC"),f=c.toString("ISO","local").slice(0,-1),[m,d]=wr.useState(!1);return Ae.jsxRuntimeExports.jsxs(jb.Frame,{visible:m,variant:"modal",zIndex:500,onVisibleChange:d,children:[Ae.jsxRuntimeExports.jsx(za.Text,{className:ge.CSS.BE("input","datetime"),variant:a,type:"datetime-local",onBlur:l,required:!1,value:o??f,onChange:u,step:1e-5,...i,children:Ae.jsxRuntimeExports.jsx(Fn.Button,{onClick:()=>d(!m),variant:a,children:Ae.jsxRuntimeExports.jsx(Pa.Calendar,{})})}),Ae.jsxRuntimeExports.jsx(kie,{value:c,onChange:h=>t(Number(h.valueOf()))})]})},Fie=et.extend(B6),Pie=["Control","Enter"],kie=({value:e,onChange:t})=>{const{close:r}=jb.useContext();return Ae.jsxRuntimeExports.jsx(kN.Dialog,{children:Ae.jsxRuntimeExports.jsxs(ar.Box$1,{className:ge.CSS.B("datetime-modal"),empty:!0,children:[Ae.jsxRuntimeExports.jsxs(ar.Box$1,{className:ge.CSS.B("datetime-modal-container"),children:[Ae.jsxRuntimeExports.jsx(ar.Box$1,{x:!0,className:ge.CSS.B("header"),children:Ae.jsxRuntimeExports.jsx(qb,{level:"h3",format:"preciseDate",children:e})}),Ae.jsxRuntimeExports.jsx(Fn.Button,{variant:"text",className:ge.CSS.B("close-btn"),onClick:r,children:Ae.jsxRuntimeExports.jsx(Pa.Close,{})}),Ae.jsxRuntimeExports.jsxs(ar.Box$1,{x:!0,className:ge.CSS.B("content"),children:[Ae.jsxRuntimeExports.jsx($ie,{value:e,onChange:t,close:r}),Ae.jsxRuntimeExports.jsx(_ie,{value:e,onChange:t})]})]}),Ae.jsxRuntimeExports.jsxs(Ia,{location:"bottom",size:"7rem",children:[Ae.jsxRuntimeExports.jsxs(Ia.Start,{gap:"small",children:[Ae.jsxRuntimeExports.jsx(Pa.Text,{level:"small",trigger:Pie}),Ae.jsxRuntimeExports.jsx(an.Text,{level:"small",children:"To Finish"})]}),Ae.jsxRuntimeExports.jsx(Ia.End,{children:Ae.jsxRuntimeExports.jsx(Fn.Button,{onClick:r,variant:"outlined",children:"Done"})})]})]})})},Oie=e=>{const t=Bl.useItem(e.key);return Ae.jsxRuntimeExports.jsx(Bl.Item,{...e,children:Ae.jsxRuntimeExports.jsx(an.Text,{children:t?.name})})},Bie=Fn.renderProp(Oie),$ie=({value:e,onChange:t,close:r})=>{const[n,a]=wr.useState(""),[i,o]=wr.useState([]),{data:s,getItem:u}=ON.useStaticData({data:i}),l=f=>{const m=Fie(f),d=m.dates().get(),h=[];h.push(...d.map(y=>{const w=new ge.r(y.start);return{key:y.start,name:w.toString("preciseDate","local"),onSelect:()=>{t(w),r()}}})),o(h);const p=m.durations().get();h.push(...p.map(y=>{let w=new ge.a$1(0);y.hour!=null&&(w=w.add(ge.a$1.hours(y.hour))),y.minute!=null&&(w=w.add(ge.a$1.minutes(y.minute))),y.second!=null&&(w=w.add(ge.a$1.seconds(y.second))),y.millisecond!=null&&(w=w.add(ge.a$1.milliseconds(y.millisecond)));const D=e.add(w);return{key:D.valueOf().toString(),name:D.toString("preciseDate","local"),onSelect:()=>{t(D),r()}}})),a(f)},c=f=>{const m=i.find(d=>d.key===f);m&&m.onSelect(),a(""),o([])};return Ae.jsxRuntimeExports.jsxs(ar.Box$1,{pack:!0,y:!0,className:ge.CSS.B("ai-selector"),background:1,full:"y",children:[Ae.jsxRuntimeExports.jsx(za.Text,{value:n,onChange:l,autoFocus:!0,placeholder:"AI Suggestion",full:"x"}),Ae.jsxRuntimeExports.jsx(za.Frame,{data:s,allowNone:!0,onChange:c,getItem:u,children:Ae.jsxRuntimeExports.jsx(Bl.Items,{className:ge.CSS.B("ai-list"),bordered:!0,borderColor:5,full:"y",emptyContent:Ae.jsxRuntimeExports.jsx(ar.Box$1,{empty:!0,grow:!0,align:"center",justify:"center",children:Ae.jsxRuntimeExports.jsxs(ar.Box$1,{y:!0,gap:"tiny",children:[Ae.jsxRuntimeExports.jsx(an.Text,{level:"small",color:"var(--pluto-gray-l7)",children:'"April 1 at 2PM"'}),Ae.jsxRuntimeExports.jsx(an.Text,{level:"small",color:"var(--pluto-gray-l7)",children:'"Add 2 two hours"'}),Ae.jsxRuntimeExports.jsx(an.Text,{level:"small",color:"var(--pluto-gray-l7)",children:'"Next Friday"'})]})}),children:Bie})})]})},zb=[{name:"January",days:31},{name:"February",days:28},{name:"March",days:31},{name:"April",days:30},{name:"May",days:31},{name:"June",days:30},{name:"July",days:31},{name:"August",days:31},{name:"September",days:30},{name:"October",days:31},{name:"November",days:30},{name:"December",days:31}],_ie=({value:e,onChange:t})=>{const r=e.month,n=e.year,a=e.day,i=u=>t(e.setMonth(u)),o=u=>t(e.setYear(u)),s=u=>t(e.setDay(u));return Ae.jsxRuntimeExports.jsxs(ar.Box$1,{pack:!0,x:!0,className:ge.CSS.B("datetime-picker"),rounded:!0,children:[Ae.jsxRuntimeExports.jsxs(ar.Box$1,{pack:!0,y:!0,align:"stretch",className:ge.CSS.B("calendar"),children:[Ae.jsxRuntimeExports.jsxs(ar.Box$1,{pack:!0,x:!0,grow:!0,className:ge.CSS.B("calendar-header"),children:[Ae.jsxRuntimeExports.jsx(Fn.Button,{onClick:()=>i(r-1),variant:"outlined",children:Ae.jsxRuntimeExports.jsx(Pa.Caret.Left,{})}),Ae.jsxRuntimeExports.jsx(an.Text,{level:"small",style:{flexGrow:1,paddingLeft:"1rem"},className:ge.CSS.BE("calendar-header","month"),children:zb[r].name}),Ae.jsxRuntimeExports.jsx(Fn.Button,{onClick:()=>i(r+1),style:{borderTopRightRadius:0},variant:"outlined",children:Ae.jsxRuntimeExports.jsx(Pa.Caret.Right,{})})]}),Ae.jsxRuntimeExports.jsxs(ar.Box$1,{pack:!0,x:!0,grow:!0,sharp:!0,children:[Ae.jsxRuntimeExports.jsx(Fn.Button,{onClick:()=>o(n-1),variant:"outlined",children:Ae.jsxRuntimeExports.jsx(Pa.Caret.Left,{})}),Ae.jsxRuntimeExports.jsx(an.Text,{level:"small",style:{flexGrow:1,paddingLeft:"1rem"},children:n}),Ae.jsxRuntimeExports.jsx(Fn.Button,{onClick:()=>o(n+1),variant:"outlined",children:Ae.jsxRuntimeExports.jsx(Pa.Caret.Right,{})})]}),Ae.jsxRuntimeExports.jsx(ar.Box$1,{x:!0,wrap:!0,gap:"tiny",style:{padding:"0.5rem",height:"100%"},children:Array.from({length:zb[r].days}).map((u,l)=>Ae.jsxRuntimeExports.jsx(Fn.Button,{variant:l+1===a?"outlined":"text",onClick:()=>s(l+1),square:!0,children:Ae.jsxRuntimeExports.jsx(an.Text,{level:"small",children:l+1})},l))})]}),Ae.jsxRuntimeExports.jsx(Hie,{value:e,onChange:t})]})},Iie={padding:"0rem",paddingLeft:"2rem",height:"4rem",minHeight:"4rem",maxHeight:"4rem"},zie=e=>Ae.jsxRuntimeExports.jsx(za.ListItem,{...e,style:Iie,children:e.index}),jie=Fn.renderProp(zie),sh=e=>{const t=Array.from({length:e},(n,a)=>a),r=({value:n,onChange:a})=>Ae.jsxRuntimeExports.jsx(za.Frame,{data:t,value:n,onChange:a,children:Ae.jsxRuntimeExports.jsx(Bl.Items,{className:ge.CSS.B("time-list"),children:jie})});return r.displayName="TimeList",r},qie=sh(24),Rie=sh(60),Lie=sh(60),Hie=({value:e,onChange:t})=>Ae.jsxRuntimeExports.jsxs(ar.Box$1,{pack:!0,y:!0,className:ge.CSS.B("time-selector"),children:[Ae.jsxRuntimeExports.jsxs(ar.Box$1,{pack:!0,x:!0,grow:!0,className:ge.CSS.B("time-selector-list"),children:[Ae.jsxRuntimeExports.jsx(qie,{value:e.hour,onChange:r=>t(e.setHour(r))}),Ae.jsxRuntimeExports.jsx(Rie,{value:e.minute,onChange:r=>t(e.setMinute(r))}),Ae.jsxRuntimeExports.jsx(Lie,{value:e.second,onChange:r=>t(e.setSecond(r))})]}),Ae.jsxRuntimeExports.jsx(oh,{size:"small",value:e.millisecond,onChange:r=>t(e.setMillisecond(r)),endContent:"ms",showDragHandle:!1,borderColor:5})]}),td=({className:e,variant:t,...r})=>Ae.jsxRuntimeExports.jsx(an.Text,{className:ge.CSS(ge.CSS.B("input-help-text"),e),color:8,status:ge.tn.removeVariants(t,"success"),level:"small",...r}),rN=({className:e,required:t=!1,children:r,...n})=>Ae.jsxRuntimeExports.jsxs("label",{className:ge.CSS(ge.CSS.B("input-label"),e),...n,children:[r," ",t&&Ae.jsxRuntimeExports.jsx("span",{className:ge.CSS.B("required-indicator"),children:"*"})]}),Gie=(e,t="y")=>e??(ge.p.construct(t)==="y"?"stretch":"center"),nN=({label:e,showLabel:t=!0,helpText:r,direction:n,x:a,y:i,className:o,children:s,required:u,align:l,gap:c="small",padHelpText:f=!1,status:m,showHelpText:d=!0,...h})=>{const p=ar.parseDirection(n,a,i,!1);let y;const w=d&&r!=null&&r.length>0,D=t&&e!=null&&e.length>0;return!w&&!D?s:(p==="x"?y=Ae.jsxRuntimeExports.jsxs(ar.Box$1,{y:!0,gap:"small",children:[s,d&&(f||r!=null&&r.length>0)&&Ae.jsxRuntimeExports.jsx(td,{variant:m,children:r})]}):y=Ae.jsxRuntimeExports.jsxs(ar.Box$1,{y:!0,gap:1/3,align:"stretch",children:[s,(f||r!=null&&r.length>0)&&Ae.jsxRuntimeExports.jsx(td,{variant:m,children:r})]}),Ae.jsxRuntimeExports.jsxs(ar.Box$1,{className:ge.CSS(ge.CSS.BE("input","item"),o),direction:p,gap:c,align:Gie(l,p),...h,children:[D&&Ae.jsxRuntimeExports.jsx(rN,{required:u,children:e}),y]}))},aN=e=>Ae.jsxRuntimeExports.jsx(Rb,{...e,inputType:"switch"}),Vie=(e,t)=>new ge.r(e).add(t).sub(ge.r.utcOffset),Uie={x:Number(ge.a$1.SECOND.valueOf())*.5,y:Number(ge.a$1.MINUTE.valueOf())},iN=({value:e,onChange:t,tzInfo:r})=>{const n=new ge.r(e,"UTC"),a=n.sub(ge.r.utcOffset);if(a.after(ge.r.DAY)){const s=a.remainder(ge.r.DAY);t(Number(new ge.r(s,"local").valueOf()))}const i=wr.useCallback(s=>{let u;if(typeof s=="number")u=new ge.r(s,"UTC");else{if(s.length===0)return;u=new ge.r(s,"local")}t(Number(u.valueOf()))},[t,r]);return{inputValue:n.toString("time",r),ts:n,handleChange:i}},Wie=({ref:e,size:t,value:r,tzInfo:n="local",onChange:a,dragDirection:i,showDragHandle:o=!0,className:s,children:u,...l})=>{const{inputValue:c,ts:f,handleChange:m}=iN({value:r,onChange:a,tzInfo:n});return Ae.jsxRuntimeExports.jsxs(za.Text,{ref:e,value:c,className:ge.CSS(ge.CSS.B("input-time"),s),type:"time",step:"1",onChange:m,...l,children:[o&&Ae.jsxRuntimeExports.jsx(hc,{direction:i,value:Number(f.valueOf()),onChange:m,dragScale:Uie}),u]})},Jie=Object.freeze(Object.defineProperty({__proto__:null,Checkbox:$N,Date:IN,DateTime:Tie,DragButton:hc,HelpText:td,Item:nN,Label:rN,Numeric:oh,Switch:aN,Text:za.Text,Time:Wie,combineDateAndTimeValue:Vie,useDate:Gb,useTime:iN},Symbol.toStringTag,{value:"Module"}));exports.Bar=Ia;exports.Item=nN;exports.Numeric=oh;exports.Switch=aN;exports.TimeStamp=qb;exports.external=Jie;